• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Changing the Summary text on a special ability?

bodrin

Well-known member
I'm attempting to append / change the summary text of the vampires blood drain ability.

I've successfully managed to alter the description contained in the main text body utilising this code.

Code:
First 1000

~ change the Vampire Blood Drain text to our other benefit

perform state.thing[xVamBlood].amendthing[description, replace(state.thing[xVamBlood].field[descript].text,"A vampire can suck blood from a grappled opponent; if the vampire establishes or maintains a pin, it drains blood, dealing 1d4 points of Constitution damage. The vampire heals 5 hit points or gains 5 temporary hit points for 1 hour (up to a maximum number of temporary hit points equal to its full normal hit points) each round it drains blood.","A vampire can suck blood from a grappled opponent; if the vampire establishes or maintains a pin, it drains blood, dealing 1d6 Constitution damage The vampire heals 10 hit points or gains 10 temporary hit points for 1 hour (up to a maximum number of temporary hit points equal to its full normal hit points) each round it drains blood.",0)]
I'm using this code after investigating the ability fields and spotting that the summary is identified with the ID abSumm.

The following script compiles and appears to work correctly, However I'm unable to alter / change the ability summary text, I keep getting this error.

HTML:
Cannot amend thing 'xVamBlood' with an empty name or description.
Code:
First 1000
~ change the Vampire Blood Drain summary to our new improved summary

perform state.thing[xVamBlood].amendthing[description, replace(state.thing[xVamBlood].field[abSumm].text,"Suck blood for 1d4 CON dam and gain 5 Hp when pin foe","Suck blood for 1d6 CON dam and gain 10 Hp when pin foe",0)]
I've tried altering the phase / Priority to Render 10000.

Also tried #appendsumm just in case there was a macro to change the summary text. and tried amendthing[summary to no avail.

:confused:??
 
Last edited:
Just change field[abSumm].text directly.

This may seem obvious to you but How?:confused:

I can't seem to alter the summary text at all, is it even possible utilising the scripts?:(

I have numerous errors occuring

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'fWoWRedFe' (Eval Script '#2') on line 3
-> Invalid use of a reserved word in script

Last script tried

Code:
perform state.thing[xVamBlood].amendthing[description, replace(state.thing[abSumm].field[text].text,"OUR TEXT SUMMARY HERE",0)]
Syntax error in 'eval' script for Thing 'fWoWRedFe' (Eval Script '#2') on line 3
-> Reference to undeclared variable: 'state'


Syntax error in 'eval' script for Thing 'fWoWRedFe' (Eval Script '#2') on line 3
-> Invalid amendthing syntax used

Syntax error in 'eval' script for Thing 'fWoWRedFe' (Eval Script '#2') on line 3
-> Non-existent thing 'abSumm' used by script

I also can't get all the instances of Blood Drain to disappear when I add my custom feat.
I've tried a perform hero.childfound[xVamBlood].delete method but that doesn't seem to work. Priority 500 upwards
 
Last edited:
Render 10000
Code:
hero.childfound[UNIQUEID].field[abSumm].text = "THIS IS THE NEW SUMMARY"
 
Last edited:
Render 10000
Code:
hero.childfound[UNIQUEID].field[abSumm].text = "THIS IS THE NEW SUMMARY"

Banging head upon table, repeatedly.
Banging head upon table, repeatedly.
Banging head upon table, repeatedly.
Banging head upon table, repeatedly.

It's always that easy isn't it?:o

Thank you.

Now just to find out how to remove all the instances of Blood Drain except the new custom version.:rolleyes:
 
Last edited:
Okay I've now got a new yet related problem. I thought my earlier change the blood drain description script would work for the Lich template touch attack ability but I get a derived field error, presume the xLichTouch description field is altered differently?

Code:
First 1000

~ change the Lich negative touch text to our other benefit

perform state.thing[xLichTouch].amendthing[description, replace(state.thing[xLichTouch].field[descript].text,"OUR CUSTOM DESCRIPTION HERE",0)]

The summary text script works without a hitch though.

Code:
hero.childfound[UNIQUEID].field[abSumm].text = "THIS IS THE NEW SUMMARY"
Weird?!?@??
 
Usually the HL standard is to use the #appenddesc[] macro to append new text on to the Thing with the updated/changed rules. This way the gamer has all the original information and the info on how the ability was modified.

Wouldn't that be the better way to go and easier to use the Macro then?
 
I've not worked with amendthings much, but I think the issue might be in the replace there in the middle. Try:

Code:
perform state.thing[xLichTouch].amendthing[description,"OUR CUSTOM DESCRIPTION HERE"]
 
ShadowChemosh is right, we do already have a macro which appends some text to the description, and that's what we usually use. You'd have to use Amendthing if you wanted to overwite the existing text though.
 
ShadowChemosh is right, we do already have a macro which appends some text to the description, and that's what we usually use. You'd have to use Amendthing if you wanted to overwite the existing text though.

Tried the example provided

Code:
perform state.thing[xLichTouch].amendthing[description,"Your touch attack deals 2d8 points of negative energy damage +1 point of damage per Hit Dice of the lich.

If you use your touch attack to heal any undead (includng yourself) the undead heals at this improved rate."]

and got this error

HTML:
Syntax error in 'eval' script for Thing 'fWoWWitTou' (Eval Script '#3') on line 11
  -> Invalid amendthing syntax used

also tried this macro

Code:
#appenddesc[xLichTouch,"{b}Withering Touch{/b}: Your touch attack deals 2d8 points of negative energy damage +1 point of damage per Hit Dice of the lich.

If you use your touch attack to heal any undead (includng yourself) the undead heals at this improved rate."]

resulting in this error message

Hero Lab was forced to stop compilation after the following errors were detected:
HTML:
Syntax error in 'eval' script for Thing 'fWoWWitTou' (Eval Script '#4') on line 1
  -> Invalid macro reference encountered in script

Officially befuddled!?@%£%%£$!?
 
In each of your examples, the "If you use your touch attack" line is separate from the original. Is that the way it looks in your code, or is the extra line an artifact of how you copied the code?

If it isn't an artifact, get it all on one line.
 
In each of your examples, the "If you use your touch attack" line is separate from the original. Is that the way it looks in your code, or is the extra line an artifact of how you copied the code?

If it isn't an artifact, get it all on one line.

It was on a seperate line, deleting the extra space worked.:D Not an obvious problem, **Happy Dance**.

Thank you for the assistance everyone.
 
Last edited:
Alter the description of a Special Ability

Script(s) posted for future reference

Render 10000

Code:
~ Change our Touch attack summary to the withering touch benefit.

 hero.childfound[xLichTouch].field[abSumm].text = "2d8+" & field[abValue].value & " damage, plus Fort save or be paralyzed."

hero.childfound[xLichTouch].field[livename].text = "Negative Energy Touch Attack 2d8+" & field[abValue].value

field[abValue].value += round(herofield[tHitDice].value/1,0,-1)

perform state.thing[xLichTouch].amendthing[description,"{b} Withering Touch {/b}: Your touch attack deals 2d8 points of negative energy damage +1 point of damage per Hit Dice of the lich. If you use your touch attack to heal any undead (includng yourself) the undead heals at this improved rate."]

Post-levels 10000

Code:
~ Ensure our Withering Touch title contains our Damage and DC info

field[abValue].value += round(herofield[tHitDice].value/1,0,-1)
      field[livename].text = field[name].text & " 2d8+" & field[abValue].value
      field[abSumm].text = "2d8+" & field[abValue].value & " damage, plus Fort save or be paralyzed."

Post-levels 5000

Code:
~lets get our total hit dice divided by 2 because we want to
 ~add half again

 Var Bonus as number

 Bonus = round(herofield[tHitDice].value/2,0,-1)

 ~Now lets add it to our Negative energy Touch attack
  #value[xLichTouch] += Bonus

See attached screenshot for the effects including one using the
#appenddesc macro.:cool:

Render 10000

Code:
~ Change our Touch attack summary to the withering touch benefit.

field[abValue].value += round(herofield[tHitDice].value/1,0,-1)

hero.childfound[xLichTouch].field[abSumm].text = "2d8+" & field[abValue].value & " damage, plus Fort save or be paralyzed."

hero.childfound[xLichTouch].field[livename].text = "Negative Energy Touch Attack 2d8+" & field[abValue].value 

#appenddesc[xLichTouch,"{b} Withering Touch {/b}: Your touch attack deals 2d8 points of negative energy damage +1 point of damage per Hit Dice of the lich. If you use your touch attack to heal any undead (includng yourself) the undead heals at this improved rate."]
 
Back
Top