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

Using !Markov to Set Name with !Tokenmod ?

I'm no coder, is this possible via an API script ? Why? I only run Pre-gen adventures. So before we start playing sweep through the tokens to turn off their Nameplate by !token-mod --set showname|no (cause I don't want players to know it's a Duergar Assassin, Doppelganger, 3 Kobolds in a trenchcoat, etc...)  What I'd rather do is to re-name the selected token individually (Steve, Bob, Stevebob, Cleatus, etc...) by !Markov (or something similar). Any solution where I do this token by token is fine (as I'm using bar1|[[@{selected|npc_hpformula}]] as part of the Macro as well. Anyone got any ideas ? Thanks
1593619743
The Aaron
Roll20 Production Team
API Scripter
Easiest would probably be extending Markov to set names when you call it with tokens selected, particularly by adding additional arguments or commands.
1593624433

Edited 1593624485
Writing a new script would probably be the best solution, as i foresee the requirement to choose names from different lists of names. The Markov script has 5943 lines of code, out which almost 5500 make up the single list of names. If someone would code a new script. What would be the best name to handle different name sets as input? Rollable Tables? Handouts?
1593624647
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Handouts would be easiest for importing or setting values.
1593624782
The Aaron
Roll20 Production Team
API Scripter
I think handouts would be nice.  They're easily copied between games with the Transmogriphier. Using a naming convention for the name would let the generator load them dynamically at startup, and perhaps cache the parsed data in the GMNotes section.  The name of the handout could also be used to select it from the command line. [NAMES] Elven !gen-name --Elven --set-selected That kind of thing.
I'm obviously doing something very very very wrong. I can't even get the latin example from !markov to recognise the handout. Advanced Use Markov uses over 2000 of "mostly" English names as the default nameset of English names to seed the Markov name generator. You can include your own namesets for the Markov name generator to use. To do this create a handout in this format: Example Name: latin Notes: Neque,porro,quisquam,est,qui,dolorem,ipsum,quia,dolor,sit,amet,consectetur,adipisci,velit GM Notes: markov To use this above example you would need to restart the API sandbox after saving the handout and then you can use the latin nameset with this command: !markov latin Example output: consciam ectet ques  
1593695485
The Aaron
Roll20 Production Team
API Scripter
Looks like the script predates the updated text editor on handouts: Here's a version that's patched for that problem:&nbsp; <a href="https://gist.github.com/shdwjk/387e5b16a8ba5d5f4de72cf31a87fe63" rel="nofollow">https://gist.github.com/shdwjk/387e5b16a8ba5d5f4de72cf31a87fe63</a> I'll see about pushing it up to the 1-click.
1594204147

Edited 1594204167
OK. Got the latin working (and thus other handouts are not a problem). Can you please point me in the direction of the API that uses !gen-name ? can't find any help on it in the forums
1594212507
The Aaron
Roll20 Production Team
API Scripter
Oh, there isn't one that I know of, that was just in answer to Martijn S. about a possible interface.&nbsp;
So in conclusion... no way to do this. That's OK. I found your old posts about creating a rollable table of names so I'm just going to generate 1000 monster names and 1000 player names and use that method instead.