MinLL / GameInterfaceForToys

Scripts to control toys for Skyrim and other games.
29 stars 10 forks source link

Idea for development: Using regex capture groups for parameters in functions #13

Open Ernesti224 opened 1 year ago

Ernesti224 commented 1 year ago

This is based on an example I'm trying to add support for (Spank That Ass, STA). Not sure whether it would make sense in this exact way, but the basic idea is visible in the example below:

/data/events/games/skyrim/spankthatass.yaml

- STA Spank Counter:
    regex: ".*_STA_: Spanky: CounteR: ([0-9]+).*"
    function: generic_random_vibrate
    params:
        duration: $1
        strength: 100
Ernesti224 commented 1 year ago

I suppose to make it really useful, it would need some way of mathematically manipulating that value, which would really make it more difficult to implement. Perhaps some kind of additional param, like duration_multiplier and strength_multiplier?