phylll / mychs-macro-magic

A simple, sane, and friendly little scripting language for your Roll20 macros.
MIT License
0 stars 0 forks source link

Review use of the `character_name`, `token_name` and `name` attributes for NPCs #17

Closed phylll closed 2 years ago

phylll commented 2 years ago

See https://github.com/michael-buschbeck/mychs-macro-magic/pull/141

senseLogic, for one, might be doing it wrong where NPCs (foeName) are concerned. Check all scripts.

phylll commented 2 years ago

senseLogic: Indeed, this line ...

 !mmm       set charName = getattr(tokenId, "character_name")

... is going to return the wrong information if used on generic NPCs. You'd expect "Orc 1" but you'll receive "Standard Orc" or something.

waterWalkerBlastEffect: what happens if a target token linked to a generic NPC sheet does not have a token name of its own? Does the script then display the generic NPC character_name instead to deliver foe.name, despite the fact that the GM might want to keep that generic name hidden? If so, the same problem is present in meleeAttack, rangedAttack and probably defense.

phylll commented 2 years ago

Fixed & closing via https://github.com/michael-buschbeck/mychs-macro-magic/pull/193