PDA

View Full Version : Help request using the editor to add a background


gamera_spinning
July 15th, 2009, 08:00 PM
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!

Mathias
July 15th, 2009, 10:32 PM
Edit: My answer wouldn't have worked - sorry - I'll be able to think about it better in the morning.

Mathias
July 16th, 2009, 12:19 PM
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.

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:


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:


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:


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


That applies the bonus that was calculated to HP.

gamera_spinning
July 16th, 2009, 05:57 PM
Thanks for your help with this.

I entered the script based on Toughness, and it gave me the following error:
http://gameraisreallyneat.org/dnd/scrnsht3.jpg

Here is my entry of the script:
http://gameraisreallyneat.org/dnd/scrnsht1.jpg
http://gameraisreallyneat.org/dnd/scrnsht2.jpg

Mathias
July 16th, 2009, 08:22 PM
What unique ID did you give your background? (the script looks fine, I think something else is wrong).

gamera_spinning
July 16th, 2009, 08:45 PM
What unique ID did you give your background? (the script looks fine, I think something else is wrong).

bornunder

Colen
July 21st, 2009, 04:18 PM
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.

gamera_spinning
July 22nd, 2009, 07:24 PM
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! :)

Tileann
July 26th, 2009, 01:49 PM
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?

Colen
August 5th, 2009, 01:33 PM
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.

Tileann
August 10th, 2009, 01:15 AM
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. :)