Using MapTool Version: 1.3.b91
First question:
Is there a way to dynamically set a variable name? The use case is as follows:
I have a number of token properties labeled SkillnameAdds where skill name will vary for each property. I have another property called LastUsedSkill. I want to get the specific value in the appropriate SkillnameAdds based on the value of LastUsedSkill.
Second question:
Is there away to append the notes? I see the setNotes function, but it seems to overwrite what's there.
Thanks so much
Two macro questions
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Two macro questions
Yes, there is a way.Zandel wrote: First question:
Is there a way to dynamically set a variable name? The use case is as follows:
I have a number of token properties labeled SkillnameAdds where skill name will vary for each property. I have another property called LastUsedSkill. I want to get the specific value in the appropriate SkillnameAdds based on the value of LastUsedSkill.
Something like this:
Code: Select all
[h: skillName = LastUsedSkill]
[h: skillValue = eval(skillName+"Adds")]
It may just be easier to double click the tokens and edit the notes there. But I think someone (Aliasmask I think) made a drop-in for editing notes around here somewhere... I believe I've used it as a base for editing notes in my framework, but I've hacked it up something fierce to suit my particular needs so I don't know what use it would be now.Is there away to append the notes? I see the setNotes function, but it seems to overwrite what's there.
In short you display the notes using getNotes() in a text area, edit the notes there, then setNotes().
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Two macro questions
Thanks for the help!
Re: Two macro questions
So I am not trying to do the reverse of what I asked above. I am trying to update a specific token property, specified by another token property.
I have a property called BlessedSkill
I want to set the "Skill"Temp Property for the skill in the BlessedSkill Property back to 0 when I cancel the Bless
So for example if BlessedSkill contains Taunt, I want to set TauntTemp to 0, if it contains Dodge, I want to set DodgeTemp to 0.
I tried this
But it does not seem to update the appropriate skill to 0.
Is there a way to do this?
Thanks
I have a property called BlessedSkill
I want to set the "Skill"Temp Property for the skill in the BlessedSkill Property back to 0 when I cancel the Bless
So for example if BlessedSkill contains Taunt, I want to set TauntTemp to 0, if it contains Dodge, I want to set DodgeTemp to 0.
I tried this
Code: Select all
[h: eval(BlessedSkill+"Temp") = 0]
Is there a way to do this?
Thanks
Re: Two macro questions
Code: Select all
[h: set(BlessedSkill+"Temp", 0)]
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Two macro questions
That did the trick thanks!