Skip to content

4. Common Scripts

Sklore edited this page Sep 26, 2016 · 41 revisions

The Hero Labs 5e Community Pack Knowledge Base

WORK IN PROGRESS - PLEASE ADD TO THIS KNOWLEDGE

Before starting any work on the Hero Labs 5e Community Pack, please ensure you have read the articles below. This will ensure you have an understanding of the basic rules we have put in place to make managing the content easier.

Below is some information that will be useful. The majority of this information can be obtained from the Hero Labs help files.

Below are a list of categories that contain script examples. This collection is designed to assist in mimicking common script requirements.

Add a "extra damage" text to all melee weapon

timing: postlevels 10000

~ If we're disabled, do nothing
doneif (tagis[Helper.Disable] <> 0)
foreach pick in hero from BaseWep where "wCategory.Melee"
   #extradamage[eachpick, " damage plus 10 (3d6) poison", field[thingname].text]
nexteach	

Set (the below code does not double. In example 2d6 will not become 4d6) damage dice for large monster with specific weapon

postlevels 10000

~if we've been replaced, get out now
doneif (tagis[Helper.Disable] <> 0)

foreach pick in hero from BaseWep where "IsWeapon.wGreataxe"
  eachpick.field[wDieCount].value = 2
nexteach

Set Custom Name for Natural Attack

  • Natural Attack > ADD Other melee natural attack | Other ranged natural attack Fields > Add New > Field Id: livename > Value: Assign > OK
  • Natural Attack > ADD Other melee natural attack | Other ranged natural attack Fields > Add New > Field Id: sbName > Value: Assign > OK

Modify skill value

first 100

#skillbonus[skReligion] += 2

Add Resistance Add Tag Group Id: DamageRes TagID: dtPoison Name: Poison Abbrev: Poison

~if we've been replaced, get out now doneif (tagis[Helper.Disable] <> 0)

  `perform hero.pushtags[DamageRes.?]`

  `#situational[hero.child[svAll],"Advantage vs. poison",field[thingname].text]`

Tags DamageRes = dtCold, dtFire, dtLightnin, DamageImm = dtAcid, dtPoison CondImm = pcnCharmed, pcnPoison

Add expertise with a skill

Phase: First Priority: 10000

Script:

  ~if we've been disabled, get out now
  doneif (tagis[Helper.Disable] <> 0)

  ~assign our weapon proficiencies to the hero
  perform hero.pushtags[ProfDouble.?]

Tag:

Group id: ProfDouble Tag id: sk(WantedSkill)

Name: (Name of the skill) Abbrev: (Name of the skill)

Spellcasting

Helper > RaceSpell StandardDC > aCHA Usage > AtWill, Day trkMax > # > Assign