
I'm trying to use !spawn to add randomness to whether a trap is there or not by using the --expand optional 3rd param that deletes spawned token after animation completes with a roll query that either gives a 1 (that would delete the token) or a 0 (that i thought would just be ignored). I used the roll query to add options of probability to the event, see below for the code: !Spawn {{
--name|trap
--expand|30,30, ?{???|yes,1|probably,[[round(1d4/3)]]|maybe,[[1d2-1]]|probably not,[[floor(1d4/4)]]|no,0}
}} It isn't working as !spawn just errors if it gets anything but 1/yes/true in that 3rd --expand param. Any chance this is an easy tweak for !spawn or if not does someone have any ideas that can point me towards an easy way to randomise the chances of a macro being called. What i've been trying to do is create a standard thing i can put before a macro that would randomise whether it was called or not i've never quite got it to work so i've ended up just tweaking different custom methods for different situations. Before i thought of this method for the trap i was using the following: !Spawn {{
--name|trap?{???|yes,1|probably,[[round(1d4/3)]]|maybe,[[1d2-1]]|probably not,[[floor(1d4/4)]]|no,0}
}} this way i just named the trap item trap1, so if the roll query resulted in 1 it would spawn the trap, if not it would just give an error no token my this name exists etc. it worked but was messy and annoying having to put a number at the end of the item name.