Houserule Gaming
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Some MapTool macros for d20

Go down

Some MapTool macros for d20 Empty Some MapTool macros for d20

Post  Oriet Thu Sep 15, 2011 8:23 pm

I've developed a standard attack macro in MapTool for d20 games. It's pretty basic in that you have to personally compare the attack result to the AC/Defence of their target, and then apply any damage the do to the target either manually or with another macro. It does, however, check if the initial d20 roll was in the weapon's threat range and automatically rolls a confirmation attack.

Simply replace the opening descriptive text with what you want it to initially say when you attack (such as a catch phrase or exactly what the attack is with and using), then replace the pound signs (#) with the appropriate values. The ThreatRangeMiminum value is the lowest number in the weapon's threat range; do not put the entire range in here, as it will read it as an equation and insert a negative value for it.

Code:
Descriptive text for the attack.

[h: AttackBonus = #]
[h: ThreatRangeMinimum = #]
[h: CriticalMultiplier = #]

<br>
[r: "Attack : "]
[h: d20roll = 1d20]
[h,if(d20roll == 1),r: "Critical failure!"]
[h,if(d20roll == 20),r: "Automatic hit!"]
[h,if(d20roll > 1),r: "Hits AC "]
[h,if(d20roll > 1),t: d20roll + AttackBonus]
[h,if(d20roll >= ThreatRangeMinimum),r: ", confirms with"]
[h,if(d20roll >= ThreatRangeMinimum),t: 1d20 + AttackBonus]
[h,if(d20roll > 1),r: ", for "]
[h,if(d20roll > 1),t: #]
[h,if(d20roll > 1 && d20roll < ThreatRangeMinimum),r: "damage."]
[h,if(d20roll >= ThreatRangeMinimum),r: "damage, or x"]
[h,if(d20roll >= ThreatRangeMinimum),t: CriticalMultiplier]
[h,if(d20roll >= ThreatRangeMinimum),r: "that if confirmed."]
Oriet
Oriet
Admin

Posts : 25
Join date : 2011-09-14
Location : Lost in the gears of the Dreamwatch of time.

https://houserulegaming.board-directory.net

Back to top Go down

Some MapTool macros for d20 Empty Re: Some MapTool macros for d20

Post  Oriet Sat Sep 17, 2011 4:06 am

Decided to throw in some more macros, this time for keeping track of people's health. These do require having the following Campaign Properties: Constitution, NonLethal, HP, MaxHP. Also requires the following States: Dead, Prone, Unconscious.

HP Loss: Currently set up for Pathfinder games; just replace "-Constitution" with 10, or whatever Property is being used as the threshold for death (don't just put in 10, or things like undead and constructs won't be destroyed upon reaching 0 HP) (also make sure to put some value in for the Property, maybe even giving it a default, or it will cause errors).
Code:
[h: DeathValue = -Constitution]
[h: Damage = AmountOfDamage]
[h: HP = HP - Damage]

Loses [r: Damage] hit points.

[h,if(HP < 0 && HP > DeathValue): setState("Disabled", 1)]
[h,if(HP < 0 && HP > DeathValue): setState("Prone", 1)]
[h,if(HP < 0 && HP > DeathValue),r: token.name]
[h,if(HP < 0 && HP > DeathValue),r: "is disabled."]

[h,if(HP <= DeathValue): setState("Dead", 1)]
[h,if(HP <= DeathValue),r: token.name]
[h,if(HP <= DeathValue),r: "has died."]

[h: bar.Health = HP / MaxHP]

[h,if(NonLethal != ""),code:
{
   [bar.NonLethal = NonLethal / MaxHP]
   [if(HP < NonLethal): setState("Unconscious", 1)]
   [if(HP < NonLethal): setState("Prone", 1)]
};
{
   [bar.NonLethal = 0]
};]

HP Gain: Always need an easy way to recover HP, such as from curative spells, potions, first aid, fast healing, or whatever. Also currently set up for Pathfinder, so just change it as above for different games.
Code:
[h: DeathValue = -Constitution]
[h: restoration = AmountOfRestoration]
[h: HP = HP + restoration]
[if(HP > MaxHP),CODE:
{
   [h: HP = MaxHP]
   Is fully healed.
};
{
   Regains [r: restoration] hit points.
};]
[if(HP >= DeathValue),CODE:
{
   [h: setState("Dead", 0)]
};
{
};]
[h,if(HP >= 0): setState("Disabled", 0)]

[h: bar.Health = HP / MaxHP]

[h,if(NonLethal != ""),code:
{
   [bar.NonLethal = NonLethal / MaxHP]
   [if(HP >= NonLethal): setState("Unconscious", 0)]
};
{
   [bar.NonLethal = 0]
};]

NonLethal: Just because not every attack is with lethal damage. Already working in conjunction with the HP macros above, so that any time HP is less than the NonLethal amount the character is made Unconscious (and Prone).
Code:
[h: Damage = AmountOfDamage]
Takes [r: Damage] nonlethal damage.
[h: NonLethal = NonLethal + Damage]
[h,if(NonLethal > HP): setState("Unconscious", 1)]
[h,if(HP < NonLethal): setState("Prone", 1)]
[h,if(NonLethal > HP),r: token.name]
[h,if(NonLethal > HP),r: "has fallen unconscious from the blow."]

[h,if(NonLethal != ""): bar.NonLethal = NonLethal / MaxHP]
[h,if(NonLethal == ""): bar.NonLethal = 0]

NonLethal Recovery: Because NonLethal damage isn't permanent, even less so than lethal damage. Note that this is not automatically recovered by the above HP Gain macro!
Code:
[h: Restoration = AmountOfRestoration]
[h: NonLethal = NonLethal - Restoration]
[if(NonLethal <= 0),CODE:
{
   Recovered from all nonlethal damage.
   [h,if(NonLethal <= HP): setState("Unconscious", 0)]
   [h: NonLethal = ""]
};
{
   Recovers from [r: Restoration] nonlethal damage.
   [h,if(NonLethal <= HP): setState("Unconscious", 0)]
};]

[h,if(NonLethal != ""): bar.NonLethal = NonLethal / MaxHP]
[h,if(NonLethal == ""): bar.NonLethal = 0]

Health Reset: Sometimes you want a fast way to reset your entire health quickly, and this macro does just that. Resets HP, NonLethal, and all States.
Code:
Hit Points and Status have all been reset.
[h: HP = MaxHP]
[h: NonLethal = ""]
[h: setAllStates(0)]
[h: bar.Health = HP / MaxHP]
[h: bar.NonLethal = 0]

Of course, it doesn't do much good to have health levels that adjust health bars if you don't have health bars to nicely show it. The following are ones I made to do just that.

Background for Hit Points:
Some MapTool macros for d20 HealthMeter17

Green bar for Hit Points:
Some MapTool macros for d20 HealthMeter12

Blue bar to overlap on top of the HP bar, so that you get a nice comparison of Non-Lethal to lethal damage.
Some MapTool macros for d20 HealthMeter15

Transparent background to use with the Non-Lethal bar so that it works properly but doesn't cover the HP bar.
Some MapTool macros for d20 WoundMeterBlank
(It's seriously there; just click&drag to select to see, or right click between here and the previous line of text (on the left side) to find it.)
Oriet
Oriet
Admin

Posts : 25
Join date : 2011-09-14
Location : Lost in the gears of the Dreamwatch of time.

https://houserulegaming.board-directory.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum