Automating Encounter Prep with Mods

  Рет қаралды 1,769

Nick Olivo

Nick Olivo

Күн бұрын

This video shows how to spawn monsters onto the map and automatically create an encounter in Encounter Helper. Note that a Pro account is required in order to do this.
💥My Patreon: / nickolivo
🎲My Upcoming Games: www.startplaying.games/gm/nic...
📗My Books: us.amazon.com/stores/Nicholas...
Get 5% off VoiceMod voicechanger (link.xsolla.com/vhF53pwM) with code NICKOLIVO5
The macro from the video
!{{
!Spawn --name|?{Which Monster|Goblin|Orc|Werewolf} --qty|?{How Many} --placement|surround --tokenName|?{Encounter Name}
(^)!eh add ?{Encounter Name} {^&select ?{Encounter Name}*}{^&delay .3}
(^)!forselected token-mod --set name|?{Which Monster|Goblin|Orc|Werewolf} {^& select ?{Encounter Name}*}
}}
Documentation re: Spawn Default Token app.roll20.net/forum/post/964... (Refer to the Caveats/Known Issues section for information about images)
Several people have asked about using these mods with the TokenNameNumber mod - the amazing Timmaugh has provided this answer:
You can add the %%NUMBERED%% syntax to the name, then run a TokenNameNumber command line as another batched line within the ZeroFrame batch... however there is another option. The forselected handle actually produces individualized results for each token it iterates over, and it offers you another syntax token to represent the index of the token for this run of iterated tokens:
{&i}
If you have three tokens you are iterating over, the first would see that {&i} tag resolve to 0, the second would resolve to 1, and the third to 2. In fact, the tag takes simple offsets, so you could have a lower bound of 1 (instead of 0) simply by adding 1 to the tag:
{&i+1}
So when you are renaming the tokens with TokenMod, just include that tag to have them already numbered as you wish:
(^)!forselected token-mod --set name|?{Which Monster|Goblin|Orc|Werewolf}{&i+1} {^&select ?{Encounter Name}*}
(Remember if you include a space in the name you will need to enclose the name in quotation marks so TokenMod recognizes all of it as part of the name.)
If you were going to use a simple offset like this, you will end up with duplicate numbers between one Spawned encounter and the next (each starting at 1), so perhaps you would want to include a "squad" component of the name just to be able to differentiate them (perhaps breaking the Encounter name into 2 queries and using one as a squad identifier). This is what Nick was trying to avoid though, going through the process of renaming the tokens, so to keep with Nick's aesthetic of keeping a cleaner Turn Order, you could put a simple query for the offset into the {&i} tag. The idea is you would simply supply the number of creatures-of-the-chosen-type you had already added to the map:
{&i + ?{How many already exist?|0}}
So if you Spawn 3 Orcs... the first time you would say 0, and you'd get Orc0, Orc1, and Orc2. Then next time you Spawn 4 Orcs, you'd answer that there were 3 Orcs already on the map, and you would get Orc3, Orc4, Orc5, and Orc6. The next time you'd answer that there were 7 Orcs, etc.

Пікірлер: 26
@DanielMaenle
@DanielMaenle 9 ай бұрын
You have the coolest stuff for Roll20! Just wow!
@Enbolsa
@Enbolsa 14 күн бұрын
Hi Nick, when I use the first command !Spawn --name|?{Which Monster |Goblin|Orc |Werewolf} --qty|?{How Many} --placement|surround I can't get the tokens to appear. I have all the MODS installed and I place the enemies in the library, I write the name as it appears in the character sheet and I have created the Encounter Token, BUT I can't get it to create the tokens automatically, what can I do?? Thanks for everything and I want to tell you that I love your videos
@NickOlivo
@NickOlivo 13 күн бұрын
Hi There! Are you using the new Jumpgate, by any chance? I understand some of the mods have issues with that.
@mds000123
@mds000123 9 ай бұрын
So excited by this mod. Added the required mods and created the macro with the above code. When I ran it, just as I enter the encounter name and clicked "submit", the sandbox crashed. I can give you the error and stack if you want. Thanks in advance.🙂
@chadmoore2439
@chadmoore2439 8 ай бұрын
I am having the same problem, unfortunately.
@sinkler123
@sinkler123 9 ай бұрын
Interesting ! already had some of the mods, picked up the new ones and the macro. it is "nice to have" but unfortunately a bit problematic to use for me. for example - if u have monster names that are not just 1 word (i tend to add the monster CR to the character name so i can easily see it), or the fact that every possible monster type need to be manually added to the macro / manually typed to the prompt when used with a custom macro. I was thinking about making a menu macro to select CR, and for each CR call a different macro populated with different monsters with that CR. Wish i could figure out a way to use it with the numbered tokens mod and really integrate it into my workflow.
@matthewdaniels3817
@matthewdaniels3817 9 ай бұрын
Would be usable with the TokenNameNumber mod?
@NickOlivo
@NickOlivo 9 ай бұрын
Hi Matthew - yes. Timmaugh has provided an answer on that, and I've posted it in the video's description. Thanks for watching, and happy gaming!
@Aluvial
@Aluvial 9 ай бұрын
I have a few questions. 1) What happens if you add more than 8? 2) is there a way to add name/number (forget the actual mod right now… but it uses the %%NUMBERED%% command in the token name line) to this?
@timmaughsroll2031
@timmaughsroll2031 9 ай бұрын
Hey, Aluvial... you can add the %%NUMBERED%% syntax to the name, then run a TokenNameNumber command line as another batched line within the ZeroFrame batch... however there is another option. The forselected handle actually produces individualized results for each token it iterates over, and it offers you another syntax token to represent the index of the token for this run of iterated tokens: {&i} If you have three tokens you are iterating over, the first would see that {&i} tag resolve to 0, the second would resolve to 1, and the third to 2. In fact, the tag takes simple offsets, so you could have a lower bound of 1 (instead of 0) simply by adding 1 to the tag: {&i+1} So when you are renaming the tokens with TokenMod, just include that tag to have them already numbered as you wish: (^)!forselected token-mod --set name|?{Which Monster|Goblin|Orc|Werewolf}{&i+1} {^&select ?{Encounter Name}*} (Remember if you include a space in the name you will need to enclose the name in quotation marks so TokenMod recognizes all of it as part of the name.) If you were going to use a simple offset like this, you will end up with duplicate numbers between one Spawned encounter and the next (each starting at 1), so perhaps you would want to include a "squad" component of the name just to be able to differentiate them (perhaps breaking the Encounter name into 2 queries and using one as a squad identifier). This is what Nick was trying to avoid though, going through the process of renaming the tokens, so to keep with Nick's aesthetic of keeping a cleaner Turn Order, you could put a simple query for the offset into the {&i} tag. The idea is you would simply supply the number of creatures-of-the-chosen-type you had already added to the map: {&i + ?{How many already exist?|0}} So if you Spawn 3 Orcs... the first time you would say 0, and you'd get Orc0, Orc1, and Orc2. Then next time you Spawn 4 Orcs, you'd answer that there were 3 Orcs already on the map, and you would get Orc3, Orc4, Orc5, and Orc6. The next time you'd answer that there were 7 Orcs, etc. If you want to have your answer of how-many-creatures-of-type already exist to be increased by 1 (to have a 1-based list instead of a 0-based list), that is doable, too. However, as it requires one more metascript beyond what Nick discussed in this video, I'll reserve it for now unless someone asks for it, just to keep this response clean and on topic to the mods Nick discussed. Post back if you want that syntax tweak.
@NickOlivo
@NickOlivo 9 ай бұрын
If you have more than 8 tokens, they will continue to spawn around the origin point. I'll let Timmaugh's comment below handle the TokenNameNumber bit :)
@andrewtomlinson5237
@andrewtomlinson5237 9 ай бұрын
Ah, the old "The image HAS to be in YOUR library" issue. I think that has led to more "WHY WONT MY API WORK?????" questions on the R20 forum than any other. I've never used [!eh add XX] as a command for Encounter Helper. I've always used [!eh create XX] Didn't even know "add" was a command. Are they the same or is there a subtle difference? Logic and instinct tell me they are the same. But... I know there are a few Mods/APIs that use different terms to achieve the same Command, but there are also ones where similar words can mean very different things... Quick question before I get started using this... if you are using theAaron's TokenNameNumber Mod, will it use the numbering format when renaming the tokens?
@timmaughsroll2031
@timmaughsroll2031 9 ай бұрын
You can add the %%NUMBERED%% syntax to the name during the TokenMod command, then run a TokenNameNumber command line as another batched line within the ZeroFrame batch. You'll want another {&select} tag which appropriately selects the correct tokens (while leaving aside the ones that have already been renamed and numbered). However, there is an option right within the forselected syntax to rename AND number the tokens directly when TokenMod first touches them. See my response to Aluvial for details.
@NickOlivo
@NickOlivo 9 ай бұрын
Encounter Helper's Add command is new - the great thing about it is that it will add a new token to an existing encounter, or it will create the encounter if it doesn't exist yet.
@andrewtomlinson5237
@andrewtomlinson5237 9 ай бұрын
@@NickOlivo That's great news, Kurt said something about updating it when we were talking about being able to use it to move objects to the Map and Wall layers on another of your videos. (added 5 minutes later) I looked at the Mod Library and its not showing any new Commands on the main support page for the Mod. (added a further 5 minutes later...) Unfortunately, I've just tried it out in a new test game and EH is still using just the show and hide buttons so I'm guessing that it still works for only Token and GM layers. The version of EH I'm using was modified by someone to allow all 4 layers to be used. So I can transfer light tokens to the Wall/Light layer from the GM layer and move terrain to and from the Map layer for something like swapping out a bridge image with a broken bride image, for example. I'm afraid I've come to rely on those Map and Light layer shifts to make fast changes to map environments. So not going to be able to try this out after all. Which is a shame because this looks like a real time saver.
@mds000123
@mds000123 9 ай бұрын
Any ideas?
@NickOlivo
@NickOlivo 8 ай бұрын
Sure, drop the error and stack here and I'll see what I can do.
@chadmoore2439
@chadmoore2439 8 ай бұрын
Did anyone find a fix by chance? I have the same problem.@@NickOlivo The spawn default token works individually. Encounter helper works individually. Wrapping it all up in the code causes the crash. I tried a brand new game with only the required API/mods and I still get the same error, but the numbers are different. For reference, the error message generated was: TypeError: Cannot read properties of undefined (reading 'who') TypeError: Cannot read properties of undefined (reading 'who') at handleInput (apiscript.js:34555:43) at eval (eval at (/home/node/d20-api-server/api.js:168:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:168:1), :70:8) at /home/node/d20-api-server/api.js:1762:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:461
@normanhills3118
@normanhills3118 6 ай бұрын
Getting the following error when I run the macro (tokens are definitely in my Library,; TypeError: Cannot read properties of undefined (reading 'who') TypeError: Cannot read properties of undefined (reading 'who') at handleInput (apiscript.js:11310:43) at eval (eval at (/home/node/d20-api-server/api.js:168:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:168:1), :70:8) at /home/node/d20-api-server/api.js:1762:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:461
@NickOlivo
@NickOlivo 6 ай бұрын
"who" usually means it' can't find the desired character - does your macro have the character names exactly as they appear on their character sheets?
@normanhills3118
@normanhills3118 6 ай бұрын
@@NickOlivo yup, as far as I can see they're there, a Wolf and Bear, token name is Wolf or Bear, represents Wolf or Bear and and character name is Wolf or Bear, my library image files are called Wolf or Bear. Doublechecked the images were in my library, only thing I changed in your macro was the creature names - !{{ !Spawn --name|?{Which Monster|Wolf|Bear} --qty|?{How Many} --placement|surround --tokenName|?{Encounter Name} (^)!eh add ?{Encounter Name} {^&select ?{Encounter Name}*}{^&delay .3} (^)!forselected token-mod --set name|?{Which Monster|Wolf|Bear} {^& select ?{Encounter Name}*} }}
@NickOlivo
@NickOlivo 6 ай бұрын
Do the commands work individually? Like if you run the Spawn line by itself, does it add tokens?
@colin1238
@colin1238 Ай бұрын
@@NickOlivo I'm having the same issue. I can run each command individually and it works just fine. but when they are together I get the error above. This is the macro that doesn't work, !{{ !Spawn --name|?{Which Monster|Imp|Spined Devil|Bearded Devil|Barbed Devil|Chain Devil|Bone Devil} --qty|?{How Many} --placement|surround --tokenName|?{Encounter Name} (^)!eh add ?{Encounter Name} {^&select ?{Encounter Name}*}{^&delay .3} (^)!forselected token-mod --set name|?{Which Monster|Imp|"Spined Devil"|"Bearded Devil"|"Barbed Devil"|"Chain Devil"|"Bone Devil"} {^& select ?{Encounter Name}*} }} I even tried increasing the delay to 3.0 to see if it was still too fast, but got the same error. However, these ran individually work, !Spawn --name|?{Which Monster|Imp|Spined Devil|Bearded Devil|Barbed Devil|Chain Devil|Bone Devil} --qty|?{How Many} --placement|surround --tokenName|?{Encounter Name} !eh add ?{Encounter Name} {&select ?{Encounter Name}*} !forselected token-mod --set name|?{Which Monster|Imp|"Spined Devil"|"Bearded Devil"|"Barbed Devil"|"Chain Devil"|"Bone Devil"} {& select ?{Encounter Name}*} I'm not sure what I'm doing wrong
@agentpyro2350
@agentpyro2350 9 ай бұрын
FIRST
Creating a One-Click Werewolf Attack
7:12
Nick Olivo
Рет қаралды 952
Overview of the Select Manager Mod for Roll20
13:23
Nick Olivo
Рет қаралды 1,3 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 1 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 4,5 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 54 МЛН
Streamlining Combat with the Encounter Helper API in Roll20
11:18
Roll20 101: Setting Up Dynamic Lighting
18:13
Nick Olivo
Рет қаралды 2,6 М.
Toggling Light Sources On & Off In Roll20
11:07
Nick Olivo
Рет қаралды 894
Someone Made Pay 2 Win: The Game And Its Hilarious
14:11
MitchManix
Рет қаралды 3 МЛН
Roll20  101: Setting Up Your First Encounter
11:21
Nick Olivo
Рет қаралды 1 М.
Working with Tooltips In Roll20
6:47
Nick Olivo
Рет қаралды 1,7 М.
Wicked Engine in 2023 - This Engine Blows My Mind!
11:49
Gamefromscratch
Рет қаралды 31 М.
How to Make a Character on Roll20 - WARNING! EDUCATIONAL!
10:26
Davvy Chappy
Рет қаралды 117 М.
ВСТРЕТИЛ ПОУ В ЗАКУЛИСЬЕ Garry's mod
19:18
НУБАСТЕР
Рет қаралды 394 М.