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

Paladin Aura script Modification.

Hi all,  I Know that there's a Paladin Aura  script detecting the proximity of token from a paladin to add a token marker. Could this be tweaked to add/write a trait on an npc character sheet when close to a special NPC character ? For example : A ghast grants advatage on Turn Undead saving throws to ghouls when at less than 30ft. So I'd like to have this proximity detected and automatically assign/Write a npc trait (and thus removing it if too far from the Ghast).  This is to be used jointly with the turn undead scriptcard that reads the traits and detects if there's resistance or immunity to turn... Doable ? If needed and if cannot write/erase a NPC trait, then could it be added in the resistance field ? (then i'll have to modify the scriptcard but that's still doable) Thanks for your answers.  Lionel
1684465841
The Aaron
Roll20 Production Team
API Scripter
Paladin Aura is designed around player characters, so there is only one character to one token.  With NPCs, the same character represents all of them, so writing an attribute to it would not be limited to all the ones that are close to the ghast.  You'd need to do something with statusmarkers or one of the bars, probably...
Hey Aaron,  Got your point.  So that means that we should have that npc transform to another npc.  Question, bescause i always get mixed up with the Names on a token, does chaging the name of the token chéanges that token to a specific token ? or is it only when changing the "represents" that it makes it unique ? My train of thoughts :  Option 1 : Have a ghoul be detected as close to a ghast,  Change the name of that token when detected auto Write a NPC trait to that newly named token Option 2 :  Create a GhoulR npc character with the Turn resistant trait Spawn/replace the existing ghoul to that special GhoulR when detected as close to the ghast  ReSpawn the original ghoul to replace the GhoulR if ghoulR is away from the ghast. Any of these options "easily" achievable ?
1684519157
The Aaron
Roll20 Production Team
API Scripter
Token name is independent of character association.  You'd have to change the represents. If I were in control of the whole system, I would annotate the token in some fashion, either by setting one of the bars, or placing a status marker with some num ber, or writing in the tooltip, or the like.  I know you want to use this with the scriptcard, I'd check and see what it can use for data sources on a token.
1684546336

Edited 1684546391
Thank you aaron for your thoughts. Actually, looking at the paladin aura script, there's this toggleauratarget ability that could maybe do the job.  If i Understand the function well, in the script, it would toggle either the npc is affected by the aura of the paladin (used for example with familiars or stuff ike that).  gif I could easily have that to toggle the fact that it is under the influence of the ghast, and i don't really care if it does it to all the ghouls in the page as it would react normally whenever the ghast is close to any ghoul.  The only thing would be to replace the add status marker function of this script to a write trait (or add the "turn" in the resistance field of the npc sheet) to then have it reacting correctly to the turn undead scriptcard. Is my logic correct ? Thanks
1684555256
The Aaron
Roll20 Production Team
API Scripter
That sounds like it could probably work...
Thnaks. So now i need to have that aura script adapted to not check on paladin class but on ghast representation, and have it not put a status marker on ghouls but write/erase the npc trait instead...