Make a script trigger event effect

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 121
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Make a script trigger event effect

Post by PennyJim »

We now have CustomEventPrototypes, and I think this promotion should trickle down to the script triggers. This could be by modifying the script trigger effect, but I'm thinking more like an alternative effect entirely.

I fairly regularly make my script trigger handlers a lookup based on the effect_id, but being able to specify an entirely separate event would let that kind of filtering be on the Engine side instead of Lua.

I also sometimes put 'arguments' encoded into the effect_id, and some field like effect_id that would be passsed along the EventData for the CustomEvent would allow me to actually use those arguments without string manipulation before the lookup.

I would prefer the arguments to possibly be fairly arbitrary, but I don't hold out much hope for anything more than a string or maybe an array of strings.
The Ultimate idea would be a table of key value pairs that are put into the EventData (erroring on any keys that would squash the normal values). I don't hold any hope for that though.
Post Reply

Return to “Modding interface requests”