That did it. Thanks!
A couple points...Franky H. said:
I can't get this macro to properly compare conditionals.
!power {{
--name|Attack
--roll|[[ [$Roll1] {1d10-1}*10 + [$Roll2] {1d10-1}]]
--?? $Roll1 <> $Roll ?? Damage|[^Roll1]
--?? $Roll1 == $Roll2 ?? MAX DAMAGE|[[floor(?{skill level}*0.10)]]
--?? $Roll2 == 0 ?? Target|Head
--?? $Roll2 == 1 ?? Target|Left Chest
--?? $Roll2 == 2 ?? Target|Right Chest
--?? $Roll2 == 3 ?? Target|Abdomen
--?? $Roll2 == 4 ?? Target|Left Arm
--?? $Roll2 == 5 ?? Target|Right Arm
--?? $Roll2 == 6 ?? Target|Left Hand
--?? $Roll2 == 7 ?? Target|Right Hand
--?? $Roll2 == 8 ?? Target|Left Leg
--?? $Roll2 == 9 ?? Target|Right Leg
}}
any idea where I went wrong?
--hrolls|[[ [$loc] 0d0 + ?{Familiarity?|Very Familiar,0|Studied Carefully,1|Seen Casually,2|Viewed Once,3|False destination,4} ]]-[[ [$hit] 1d100+0d0 ]]-[[ [$mis] 1d20+80 ]]Sorry for the wall of text...
--?? $loc.total == 0 AND $hit.total < 98 ?? !1|On Target
--?? $loc.total == 0 AND $hit.total > 97 AND $hit.total < 100 ?? !2|Off Target by [[1d10*1d10]]% of the distance to be travelled in a random direction
--?? $loc.total == 0 AND $hit.total == 100 ?? !3|Similar Area - You arrive in a visually or thematically similar place to the target area
--?? $loc.total == 1 AND $hit.total < 95 ?? !4|On Target
--?? $loc.total == 1 AND $hit.total > 94 AND $hit.total < 98 ?? !5|Off Target by [[1d10*1d10]]% of the distance to be travelled in a random direction
--?? $loc.total == 1 AND $hit.total > 97 AND $hit.total < 100 ?? !6|Similar Area - You arrive in a visually or thematically similar place to the target area
--?? $loc.total == 1 AND $hit.total == 100 ?? !7|Mishap! Each creature teleported takes [[1d10]] damage, keep rolling Mishaps with damage dealt on each failure.
--?? $loc.total == 2 AND $hit.total < 89 ?? !8|On Target
--?? $loc.total == 2 AND $hit.total > 88 AND $hit.total < 95 ?? !9|Off Target by [[1d10*1d10]]% of the distance to be travelled in a random direction
--?? $loc.total == 2 AND $hit.total > 94 AND $hit.total < 99 ?? !10|Similar Area - You arrive in a visually or thematically similar place to the target area
--?? $loc.total == 2 AND $hit.total > 98 ?? !11|Mishap! Each creature teleported takes [[1d10]] damage, keep rolling Mishaps with damage dealt on each failure.
--?? $loc.total == 3 AND $hit.total < 77 ?? !12|On Target
--?? $loc.total == 3 AND $hit.total > 76 AND $hit.total < 89 ?? !13|Off Target by [[1d10*1d10]]% of the distance to be travelled in a random direction
--?? $loc.total == 3 AND $hit.total > 88 AND $hit.total < 97 ?? !14|Similar Area - You arrive in a visually or thematically similar place to the target area
--?? $loc.total == 3 AND $hit.total > 96 ?? !15|Mishap! Each creature teleported takes [[1d10]] damage, keep rolling Mishaps with damage dealt on each failure.
--?? $loc.total == 4 AND $mis.total < 93 !16|Similar Area - You arrive in a visually or thematically similar place to the target area
--?? $loc.total == 4 AND $mis.total > 92 ?? !17|Mishap! Each creature teleported takes [[1d10]] damage, keep rolling Mishaps with damage dealt on each failure.
!power {{ --name|Create a New Agent --format|encounter --leftsub|?{Agent Name|007} --rightsub|Attribute Rolls --STR| [^Str] --REF| [^Ref] --INT| [^Intl] --WIL| [^Wil] --CON| [^Con] --?? $points <= 0 ?? !Total Skill Points| Your attributes sum to at least 275, so you do not receive any bonus skill points to raise them. --?? $points >= 1 ?? !Raise Your Attributes| You have a total of [[ [$points|NH] 275 - ([$Str] {d60+10} + [$Ref] {d60+10} + [$Intl] {d60+10} + [$Wil] {d60+10} + [$Con] {d60+10}) ]] bonus points to raise your attributes, but no individual attribute may be raised above **70**. --!Notes| **MOV** and **DEX** will be caclulated based on your final STR, REF, and INT. ^^ ~C **Good luck, Agent ?{Agent Name}.** ~C }}
Silvyre said:
You'll have to use --whisper|all to add Command Buttons, though
[[ [$HPchecker] @{target|Target1|hp} / @{target|Target1|hp|max} ]] |
Could not determine result type of: [{"type":"L","text":"$HPchecker"},{"type":"M","expr":"52/93"}] ) |
!power {{ --name|Damage Assessment --tokenid|@{selected|token_id} --emote|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health. --Calculator(ignore me)|[[ [$HPchecker] @{target|Target1|hp}/@{target|Target1|hp|max}]] --?? [$HPchecker.total] < .1 Status|Near Death --?? [$HPchecker.total] > .1 AND [$HPchecker.total] < .3 ?? Status|Gravely Wounded --?? [$HPchecker.total] > .3 AND [$HPchecker.total] < .5 ?? Status|Severely Wounded --?? [$HPchecker.total] > .5 AND [$HPchecker.total] < .7 ?? Status|Moderately Wounded --?? [$HPchecker.total] > .7 AND [$HPchecker.total] < .9 ?? Status|Mildly Wounded --?? [$HPchecker.total] > .9 ?? Status|Healthy }} |
!power {{ --name|Damage Assessment --tokenid|@{selected|token_id} --emote|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health. --hroll|[[ [$HPchecker] @{target|Target1|hp}/@{target|Target1|hp|max} * 100 + 0d0]] --?? $HPchecker < 10 ?? Status|Near Death --?? $HPchecker >= 10 AND $HPchecker < 30 ?? Status|Gravely Wounded --?? $HPchecker >= 30 AND $HPchecker < 50 ?? Status|Severely Wounded --?? $HPchecker >= 50 AND $HPchecker < 70 ?? Status|Moderately Wounded --?? $HPchecker >= 70 AND $HPchecker < 90 ?? Status|Mildly Wounded --?? $HPchecker >= 90 ?? Status|Healthy }}
&{template:default} {{Saving Throw= vs ?{Action|STR, [Strength] (@{selected|STR})|REF, [Reflex] (@{selected|REF})|INT, [Intelligence] (@{selected|INT})|WIL, [Willpower] (@{selected|WIL})|CON, [Constitution] (@{selected|CON})|MOV, [Movement] (@{selected|MOV})|DEX, [Dexterity] (@{selected|DEX})} }} {{name=Ability Check }} {{Roll= [[ 1d100cs100cs<4cf>95 ]] }} {{1/2 ?{Action}:= [[ ceil([[@{selected|str} + 0d0]] / 2) ]] }} {{1/4 ?{Action}:= [[ ceil([[@{selected|str} + 0d0]] / 4) ]] }}
!power {{ --leftsub|Ability Check
--name|Saving Throw vs ?{Action|STR, [Strength] (@{selected|STR})|REF, [Reflex] (@{selected|REF})|INT, [Intelligence] (@{selected|INT})|WIL, [Willpower] (@{selected|WIL})|CON, [Constitution] (@{selected|CON})|MOV, [Movement] (@{selected|MOV})|DEX, [Dexterity] (@{selected|DEX})} --Roll| [[ 1d100cs100cs<4cf>95 ]] --1/2 ?{Action}:| [[ ceil([[@{selected|str} + 0d0]] / 2) ]] --1/4 ?{Action}:| [[ ceil([[@{selected|str} + 0d0]] / 4) ]] }}
SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. |
--?? $Atk1.base >= [[ 20 - @{extendedcrit} ]] ?? hroll|[[ [$DmgTotal] [$Dmg1] + [$Dmg2] + 0d0 ]] |
!power {{ --hroll|[[ [$DmgTotal] [$Dmg1] {1d8} + [$Dmg2] {1d6} ]] --Atk1|[[ 1d20cs>[[20 - @{extendedcrit}]] ]] --Dmg1|[^Dmg1] or [! [^Dmg1] !] --Dmg2|[^Dmg2] or [! [^Dmg2] !] --?? $Atk1.base >= [[ 20 - @{extendedcrit} ]] ?? DmgTotal|[^DmgTotal] or [! [$DmgTotal] !] }}
!power {{ --charid|@{character_id} --emote|**@{selected|token_name}** makes a roll! --name|Initiative --Action|**@{selected|token_name}** rolls for Initiative! --Init Roll|~R [NH|TRKR] {(@Wits + @Athletics + ?{Pool Mod|0})d10s}>4f1~R }}As you can see in the code the first two integers reference to Attributes the third can be modified by other circumstances and they have a floor of 4, meaning that anything higher than 4 is a success. When I try to run the code I get the error "TypeError: Cannot read property 'substring' of undefined". Any help would be appreciated.
Silvyre said:
Your Attribute calls are missing curly braces and your 'inline roll' is missing square brackets.
--Init Roll|~R[[ [NH|TRKR] {(@{Wits} + @{Athletics} + ?{Pool Mod|0})d10s}>4f1]]~R
Silvyre said:
Post the full macro you're using, now.
!power {{ --charid|@{character_id} --emote|**@{selected|token_name}** makes a roll! --name|Initiative --Action|**@{selected|token_name}** rolls for Initiative! --Init Roll|~R[[ [NH|TRKR] {(@{Wits} + @{Athletics} + ?{Pool Mod|0})d10s}>4f1]]~R }}
Silvyre said:
I would update PowerCards. Also, what does the Text Chat return when you enter @{selected|Wits} + @{selected|Athletics}?
Silvyre said:
What does the Text Chat return when you enter @{selected|Wits} + @{selected|Athletics}?
!power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** makes a roll! --name|Initiative --Action|**@{selected|token_name}** rolls for Initiative! --Init Roll|~R[[ [NH|TRKR] {(@{selected|Wits} + @{selected|Athletics} + ?{Pool Mod|0})d10s}>4f1 ]]~R }}Does this work?
Silvyre said:
!power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** makes a roll! --name|Initiative --Action|**@{selected|token_name}** rolls for Initiative! --Init Roll|~R[[ [NH|TRKR] {(@{selected|Wits} + @{selected|Athletics} + ?{Pool Mod|0})d10s}>4f1 ]]~R }}Does this work?
Silvyre said:
Attribute calls (e.g. @{AC}) that are not placed within one of tabs of a Character Window (e.g. within a field on the Character Sheet Tab or within an Ability on the Attributes & Abilities Tab) must use a keyword to let the parser know which Character you intend to call that Attribute from (e.g. @{selected|AC}).
Silvyre said:
!power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** makes a roll! --name|Initiative --Action|**@{selected|token_name}** rolls for Initiative! --Init Roll|~R[[ [NH|TRKR] {(@{selected|Wits} + @{selected|Athletics} + ?{Pool Mod|0})d10s}>4f1 ]]~R }}Does this work?
[XPND] - This inline roll option expands the roll into the full formula/expression instead of just the result.
- [[1d20 + @{Dex Mod}]] becomes [(18) + 3 = 21] instead of [21]
- Minor Update: Added RPND which is a reverse of XPND. [[ [rpnd] 1d20 + 4 ]] will show up as Total = Roll + Mods (YAGKR... =^_^= )
- Update: Added an option to display number of successes or test against number of successes using Conditionals.
- [^RollID.ss] will display the number of successes from that roll.
- [^RollID.base] is always a sum of all the rolls, no modifiers. Base has nothing to do with successes at all.
- [^RollID.total] is always a sum of the successes of all rolls in the inline roll, not just the RollID used. So if you use multiple roll ID's in the same inline roll as below, it will always be the total result of all the rolls.
- The use of .ss is to break out successes from individual rolls within a multi-roll inline roll like this: [[ [$R1] 3d6>3 + [$R2] 3d6>3 ]]. The use of ^R1.ss will only show the successes from the first roll.
--Init Roll|~R[[ [NH|TRKR] {(@{selected|Dexterity} + @{selected|Melee} + ?{Pool Mod|0})d10s}>?{Difficulty|4}f1 ]]~R }}Is there a way to write this code that would automatically add 1 to the difficulty ">?{Difficulty|4}f1"?
Silvyre said:
Replace ?{Difficulty|4} with [[1 + ?{Difficulty|4}]]