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

How to set (overwrite) an attribute with a text value?

July 31 (9 years ago)
I'm gearing up for the new campaign I will be running and am trying to automate some NPC rolls and actions. I want to create an attribute on their character sheet for their morale status I that I can then quickly modify using a marco (or possibly the API). I envision it working something like 1) Click the button 2) A prompt for the new status 3) Click enter and when that attribute is called it now has the status I just set.

This seems like it should be simple but I am apparently not making the right connections. 
July 31 (9 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
There a couple of options here that i can see on the face of it:
  1. Have your NPC's got tokens? If so set one of the bubbles as their Morale, then you can edit on the fly like you would with hit points etc
  2. As above but using Aaron's TokenMod script you could easily write a macro to help set the status complete with a drop down query for consistent options :)
  3. Pester Aaron to finish his CharacterMod script which would allow you to update/amend attributes without them having to be set as token bars!
Please correct me if i've got the wrong end of the stick.
July 31 (9 years ago)
Option 1 should do the trick until 3 comes about! I didn't realize you could put string values through the bubbles.

Thank you very much for the help!
July 31 (9 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
No problem, I'll return to poking Aaron with a sharp, but motivational, stick.

Let me know if there any problems getting it to work and i'll take another look (unable to do testing today, non-stop meetings :( )
July 31 (9 years ago)
Gen Kitty
Forum Champion
Big Blue EyesTM tends to work better than Sharp Pointy StickTM, just saying. ^_-
There is another macro that lets you modify any attribute that is already created on your sheet. The instructions arent all that clear and there isnt a help function, but wgat you would use it fir would look like:

!setattrib Morale 12 or !setattrib Morale Terrified
Just remember to have the attribute, Morale in this case, already created on the character sheet.

It also has functions to inc or dec an attribute, but those obviously need to be numeric in nature.

Hope this makes sense and helps.
August 01 (9 years ago)
If my understanding of the code (limited as it is) is correct it seems to require the token representing the character to be selected?

If so, while nifty, I don't think it will do quite what I hoped as I was looking to edit those attribute without the tokens being present. Thank you for pointing me to it though, I might be able to find some other uses for it!
What situation would require changes, but no token present? Possibly you don't use tokens? I am very curious!
August 01 (9 years ago)
The group is stranded on an island and the NPCs present have to make Will saves each day to keep up their morale (or increasingly bad things happen). They might or might not be with the PCs when a save is needed (hence no token). I was looking to have a macro I could click at the beginning of each day after I roll a batch of Will saves and just select the character and the new status and send it through so it is recorded with the character for future reference.

I realize this can all be done old-school via notes but half the charm of Roll20 for me is the automation of stuff like that!
August 01 (9 years ago)

Edited August 01 (9 years ago)
Have a page with all the NPC tokens on it by themselves, go to that page, select them, change or not, go back to player map?

You could also just move their token to the gm layer and do the check/update there.
August 01 (9 years ago)
I was kind of settling on option the first option. If they aren't with the PCs they should be back at the camp (along with their token) and I can just go change it there.