Ok, hoping to be able to explain it right:
being a programmer myself, I've no problem with macro concepts and all (cool feature, if I can say it).
I've learnt how to create a token, save it and reinsert it several times in my campaign, and I've even worked with macro on token properties.
What I'm not able to achieve is this:
is there a way to put a random value (ex. a {1d20} macro command) as a property value, and make it so that value is calculated ONLY when the token is inserted first time on the board from the Library?
What I'm basically aiming for is a way to semi-randomize the HP of enemies, by preparing one token with proper dice rolls and then just put them on my maps.
Current state is, that by putting a dice roll macro on a property that changes everytime I look at the tooltip sheet of that token (and this is clearly TOO MUCH randomization )
Token properties and macro
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
Re: Token properties and macro
You can do this:
The first time the token is moused over it will set the HP to a value overwriting the formula.
Code: Select all
*@stat.hitpoints(HP):[r: stat.hitpoints = 1d20]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Token properties and macro
alternatively you can use exactly that same trick to call a macro that rolls all the values instead of using the statsheet directly.
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
-
- Dragon
- Posts: 304
- Joined: Mon Mar 23, 2009 4:48 pm
Re: Token properties and macro
I don't know how to make a token roll hp just by putting it on the board (the mouseover idea sounds clever), but the way I do it is with a property called HitDice. Then I have a campaign macro that I run on all monster tokens when I put them on the board, that works like this:
You could also embed it into an initiative macro if you wanted to skip a step, something like:
You can drop however many tokens you want, select them all, and then run that macro. It's an extra step, but it isn't terribly cumbersome.[h:MaxHP=eval(HitDice)]
[h:HP=MaxHP]
You could also embed it into an initiative macro if you wanted to skip a step, something like:
[InitRoll=(1d20+Initiative)]
[h:addToInitiative()]
[h:setInitiative(InitRoll)]
[h:sortInitiative()]
[if(isNPC()),code:{
[h:MaxHP=eval(HitDice)]
[h:HP=MaxHP]
};{}]
Re: Token properties and macro
How do you do it, exactly? It keeps giving me errors.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.