• 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

Help request using the editor to add a background

I'm looking to use the Editor to replicate either the "Born Under a Bad Sign" or "Auspicious Birth" backgrounds from the "Scales of War" article from Dragon Magazine 366, and I'm not sure how to create it.

The Benefit of the "Born under a Bad Sign"/"Auspicious Birth" backgrounds is "You substitute your highest ability score for Constitution to determine your initial hit points". How do I simulate that benefit inside the Editor for a background?

Any help is appreciated. Thanks!
 
Edit: My answer wouldn't have worked - sorry - I'll be able to think about it better in the morning.
 
Last edited:
First, I'd say go to the toughness feat, select all the text in its script, and paste that into the script for your background, since that gives you a starting point on how to modify HP. Also, note that the Toughness feat acts at Traits, 1000, so change your background's timing to that. Add many extra lines at the top so you have space to work.

The first thing you want to do is set up variables to store the CON and the bonus we'll be adding. Then, we'll start with each of them equal to the current CON.
Code:
var convalue as number
var bonus as number
 
convalue = hero.child[attrCon].field[trtFinal].value
bonus= hero.child[attrCon].field[trtFinal].value

now, we'll search through all the attributes, and if it's bonus is higher than the current bonus, we'll replace it:

Code:
bonus = maximum(bonus, hero.child[attrStr].field[trtFinal].value)

Repeat that line for each of the other four attributes (attrDex, attrInt, attrWis, attrCha)

Now that we know what our highest attribute value is, we'll subtract the con score from that:

Code:
bonus -= convalue

Now, bonus represents how much higher our highest attribute is than our CON.

Go down to the Toughness feat's code, and delete everything but:

Code:
      #traitmodify[trHealth,trtBonus,bonus,""]

That applies the bonus that was calculated to HP.
 
Thanks for your help with this.

I entered the script based on Toughness, and it gave me the following error:
scrnsht3.jpg


Here is my entry of the script:
scrnsht1.jpg

scrnsht2.jpg
 
What unique ID did you give your background? (the script looks fine, I think something else is wrong).
 
In the editor, go to the Tools menu and choose "Find Line Number". Enter "20", then it should tell you something like this:

"Line 20: thing '????' (unique id: adj?) from component set 'Adjustment'"

Look for the tab with the name of that component set - there's probably a thing there with an invalid unique id. Delete it, and you should be good to go.
 
Fixed!

In the editor, go to the Tools menu and choose "Find Line Number". Enter "20", then it should tell you something like this:

"Line 20: thing '????' (unique id: adj?) from component set 'Adjustment'"

Look for the tab with the name of that component set - there's probably a thing there with an invalid unique id. Delete it, and you should be good to go.

That fixed it. Fantastic! I really appreciate the customer support. You folks are the best! :)
 
Hi, I actually had the same question, and tried this code.
But when I select the background, nothing happens. It still uses Con
to calculate hitpoints.

Any advice?
 
The timing needs to be after Traits / 3000 for the script to work - that's the point at which the final attribute value is calculated. So change the timing to Traits/5000 or something and it should work fine.
 
The timing needs to be after Traits / 3000 for the script to work - that's the point at which the final attribute value is calculated. So change the timing to Traits/5000 or something and it should work fine.

That did it!

Thank you very much. :)
 
Back
Top