OK, For the Doubled Enteries the rules state that a roll >= to the 1st # followed by a second roll >= to the 2nd #. So you acctually need 2 successful rolls of target #'s back to back. I personaly don't care for this rule, but I'm trying to stick with the original rules as much as possible.
Unfotunately I'm not a good math guy, You spelled it out and I'm still missing something. I see the difference between Str and Def, but the target roll's I'm at a loss. I'll keep looking in hopes it will just click.
In your opinion "should" this framework be simple enough for a new guy to learn, or is this to advanced to start out?
Lord of the Rings SBG need macro Help
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: Lord of the Rings SBG need macro Help
Have a look at the list again and maybe you'll notice that
D-S : wound when roll equals or is higher then
< -1 : 3
0 or -1 : 4
1 or 2 : 5
>2 : 6
D-S means defence with strength subtracted.
Eg D = 5, S=4, wound on a roll of 5 or higher.
Do you think you can create an if() structure around that?
Note that || is the OR operator so
If( (DmS==1 || DmS==2) && roll >=5 ): wound=1
He parenthesis are needed as && takes precedence over || same as 2+3*5, where the * takes precedence over the +, so in that case it's 17 and (2+3)*5 = 25.
Also note the == and = the first is an operator (equals to) the latter assigns a value to a variable.
D-S : wound when roll equals or is higher then
< -1 : 3
0 or -1 : 4
1 or 2 : 5
>2 : 6
D-S means defence with strength subtracted.
Eg D = 5, S=4, wound on a roll of 5 or higher.
Do you think you can create an if() structure around that?
Note that || is the OR operator so
If( (DmS==1 || DmS==2) && roll >=5 ): wound=1
He parenthesis are needed as && takes precedence over || same as 2+3*5, where the * takes precedence over the +, so in that case it's 17 and (2+3)*5 = 25.
Also note the == and = the first is an operator (equals to) the latter assigns a value to a variable.
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: Lord of the Rings SBG need macro Help
OK thanks, I'm not sure I fully understand but I will play with options to try to figure it out.
In moving forward I decided to go with something simple for the moment. To stay productive I am working on Jump, Climb and Thrown Rider Macros. Not to hard, a simple d6 with 3 outcomes. This is where I am, and suprise to me it works, well mostly. Here's my problem, I am not figuring out the "TokenName" part. I have tried several ways from tutorials and just can't get it to populate, What am I doing wrong? Also Concerning the second if() option is there a way to "Limit" the greater than portion to reflect >2 but <5?
In moving forward I decided to go with something simple for the moment. To stay productive I am working on Jump, Climb and Thrown Rider Macros. Not to hard, a simple d6 with 3 outcomes. This is where I am, and suprise to me it works, well mostly. Here's my problem, I am not figuring out the "TokenName" part. I have tried several ways from tutorials and just can't get it to populate, What am I doing wrong? Also Concerning the second if() option is there a way to "Limit" the greater than portion to reflect >2 but <5?
Code: Select all
[h:JumpRoll = 1d6]
<b>[r:JumpRoll]<b>
[if(JumpRoll == 1): "Failure!, {r:token.name} stumbles and is halted."]
[if(JumpRoll >= 2): "Success!"]
[if(JumpRoll == 6): "{r:token.name} effortlessly makes the jump and continues on!"]
Last edited by DrnkBstrd on Fri Jan 31, 2014 7:57 am, edited 1 time in total.
Re: Lord of the Rings SBG need macro Help
Code: Select all
[if(JumpRoll == 6): token.name+" effortlessly makes the jump and continues on!"]
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: Lord of the Rings SBG need macro Help
Thanks for all the help so far.
Token name worked, thanx, but is there a way to do this without impersonating the token? I've been looking at tutorials on tokens, I am looking to just use as selected token for macros.
I did, however not figure out the 2nd if() line. What did I do wrong?
And for the Wound Chart table, does this look right? I'm trying to build off the Fighting macro from earlier, with no success, and want to know if this is even right.
Thanx
Token name worked, thanx, but is there a way to do this without impersonating the token? I've been looking at tutorials on tokens, I am looking to just use as selected token for macros.
I did, however not figure out the 2nd if() line. What did I do wrong?
Code: Select all
h:JumpRoll = 1d6]
<b>[r:JumpRoll]<b>
[if(JumpRoll == 1): token.name+" stumbles and is halted."]
[if(JumpRoll >= 2 || <= 5): "Success!"]
[if(JumpRoll == 6): token.name+" effortlessly makes the jump and continues on!"]
Code: Select all
[If( (D-S<= -2) && roll >=3 ): Wounds=1]
[If( (D==S || D-S== -1) && roll >=4 ): Wounds=1]
[If( (D-S==1 || D-S==2) && roll >=5 ): Wounds=1]
[If( (D-S>=2) && roll >=6 ): Wounds=1]
Last edited by DrnkBstrd on Fri Jan 31, 2014 7:54 am, edited 1 time in total.
Re: Lord of the Rings SBG need macro Help
Could you pls edit your post and add code tags?
from a quick look it looks like you got the latter part right, save the fact that you made quite some syntax errors (missing (), [, etc), but its annoying to read code without the tags. I would in this case even suggest to edit the tags from
[c ode][/code]
to
[c ode=php][/code]
note that I added the space on purpose so this forum doesnt interpret them, in cause then you would see:
I would in this case even suggest to edit the tags from
to
which wouldn't make much sense.
from a quick look it looks like you got the latter part right, save the fact that you made quite some syntax errors (missing (), [, etc), but its annoying to read code without the tags. I would in this case even suggest to edit the tags from
[c ode][/code]
to
[c ode=php][/code]
note that I added the space on purpose so this forum doesnt interpret them, in cause then you would see:
I would in this case even suggest to edit the tags from
Code: Select all
Code: Select all
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
- metatheurgist
- Dragon
- Posts: 364
- Joined: Mon Oct 26, 2009 5:51 am
Re: Lord of the Rings SBG need macro Help
Computers are really dumb. You have to spell everything out for them and make sure you get it right. If you're learning to code it's a good idea to run through the code and mentally execute what's on the screen (not what you want to happen, what you've actually told it to do! This is an important distinction).
This seems more likely:
If you going to use (D-S) that often you might as well stick it in a variable. It's less important today but it's inefficient to make that calculation multiple times. It's also more readable.
If JumpRoll is greater than or equal to 2 OR ? is less than or equal to 5 then success!. What am I comparing in the second part of that if? If I plug 1 into JumpRoll and run it through the code then 1 is <=5, if I plug 6 into JumpRoll and run it through the code then 6 is >=2. Seems like anything from 1 to 6 is a success. That can't be right?DrnkBstrd wrote: [if(JumpRoll >= 2 || <= 5): "Success!"]
This seems more likely:
Code: Select all
[if(JumpRoll >= 2 && JumpRoll<= 5): "Success!"]
DrnkBstrd wrote: [If( (D-S<= -2) && roll >=3 ): Wounds=1]
[If( (D==S || D-S== -1) && roll >=4 ): Wounds=1]
[If( (D-S==1 || D-S==2) && roll >=5 ): Wounds=1]
[If( (D-S>=2) && roll >=6 ): Wounds=1]