Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Conjure Animals - ScriptCard help

Hello all.&nbsp; I found this wonderful post about how to build a random conjure animals script from @David M. <a href="https://app.roll20.net/forum/permalink/10072117/" rel="nofollow">https://app.roll20.net/forum/permalink/10072117/</a> I would like to tweak this a bit to add the various environments (i.e. you can't summon non-swamp creatures while in the swamp).&nbsp; I've not really used script cards before so I am trying to figure out how to do this.&nbsp; I tried added a prompt for the environment, then using that to generate the table name, but it does not seem to work that way: !scriptcards {{ --:SETTINGS| &nbsp; --#hideCard|1 &nbsp; --#title|Nature's Allies &nbsp; --=CR|?{How many creatures?|1x CR 2,2|2x CR 1,1|4x CR 1/2,0.5|8x CR 1/4,0.25} &nbsp; --=ENV|?{Select your environment|Grassland|Hill} &nbsp; --C[$CR.Total]|2:&gt;RollTable;SpawnBeastsCR2_[$ENV.Total]|1:&gt;RollTable;SpawnBeastsCR1_[$ENV.Total]|0.5:&gt;RollTable;SpawnBeastsCR0.5_[$ENV.Total]|0.25:&gt;RollTable;SpawnBeastsCR0.25_[$ENV.Total] &nbsp; --@forselected|[$SpawnSyntax.tableEntryText] &nbsp; --X| End macro --:PROCEDURES| &nbsp; --:RollTable| &nbsp; &nbsp; &nbsp; &nbsp; --=SpawnSyntax|[T#[%1%]] &nbsp; --&lt;| }} I did figure out I can create separate macros, one for each environment, and if that is the only way to do it I will, but if anyone that is more familiar with ScriptCards can help me find a way to prompt for the environment as part of the macro that would be ideal! This works for a specific environment.&nbsp; How can I prompt for "Hill" and make it part of the table name? !scriptcards {{ --:SETTINGS| &nbsp; --#title|Nature's Allies &nbsp; --=CR|?{How many creatures?|1x CR 2,2|2x CR 1,1|4x CR 1/2,0.5|8x CR 1/4,0.25} &nbsp; --C[$CR.Total]|2:&gt;RollTable;SpawnBeastsCR2_Hill|1:&gt;RollTable;SpawnBeastsCR1_Hill|0.5:&gt;RollTable;SpawnBeastsCR0.5_Hill|0.25:&gt;RollTable;SpawnBeastsCR0.25_Hill &nbsp; --@forselected|[$SpawnSyntax.tableEntryText] &nbsp; --X| End macro --:PROCEDURES| &nbsp; --:RollTable| &nbsp; &nbsp; &nbsp; &nbsp; --=SpawnSyntax|[T#[%1%]] &nbsp; --&lt;| }} Thanks all you API scripters :)
1637990248

Edited 1637990273
David M.
Pro
API Scripter
Try this with your first code block [untested]. Turn your roll variable: &nbsp; --=ENV|?{Select your environment|Grassland|Hill} into a string variable: &nbsp; --&amp;ENV|?{Select your environment|Grassland|Hill} ...then reference the string variable with: --C[$CR.Total]|2:&gt;RollTable;SpawnBeastsCR2_ [&amp;ENV] |...etc.
Thank you!&nbsp; That works great! One more question.&nbsp; I use&nbsp;TokenNameNumber so that new tokens have a unique name, but when they are spawned I am seeing "Wolf %%NUMBERED%%" for the name.&nbsp; Is there a way to combine the two scripts?&nbsp; Or to have it roll for HP when they are spawned?
1638047241

Edited 1638048063
David M.
Pro
API Scripter
It used to work, but unfortunately something broke with TokenNameNumber compatibility a while ago. Aaron &amp; I chatted about it briefly at the time but it obviously got lost in the shuffle. I'll try to refresh my memory on what the issue was. Thanks for the reminder!
Thanks David.&nbsp; And thanks for the really cool idea.&nbsp; I'm going to have to dig into Script Card (and select manager) myself.&nbsp; Really appreciate the help
One other thing I have noticed is that token being spawned are loosing their vision (pretty sure it's related to the UDL bug I have heard about).&nbsp; I have to open each and re-turn on vision.&nbsp; When I drag them from the journal to the map they work fine.
1638233765
David M.
Pro
API Scripter
Yep, that's the UDL bug. Hopefully one day we can have nice things :(