• 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

HP bonus fron avility modifier

sutt0157

Member
I am trying to figure out how to get the ability modifier from CHA to grant bonus HP instead of con, like undead. I would like to leave CON in as a stat for the player so I would have to make a new creature subtype.

I have looked at the undead subtype but cannot tell how that is altering how the bonus HP is calculated. Am I missing something obvious? Is what I am trying to do even possible?
 
Would it be beneficial for me to post all the things I have already tried but have not worked? I am just looking for ideas. I'm assuming most would not even attempt something like this.
 
I was trying to work it into the race by changing the humanoid subtype. Where I am stuck is figuring out how the undead subtype actually modifies the ability scores to remove con, and to base the HP bonus on CHA. I am possibly looking in the wrong spot for this info.

A feat type would work as well, but I run into the same problem. I dont know how the undead type is modifying the scores and how they affect HP bonus.
 
Unfortunately, the way the undead type does this is to make All things dependant on Con use Cha instead, Like so:

Code:
      ~undead use their CHA mod in place of their CON mod
      perform hero.child[aCON].assign[AttrSub.aCHA]

This means it will also adjust the fortitude save as well as HP.

My advice is to multiply the Con modifier by the character's HD, and then subtract that from the total HP field on the hero. Then do the same for Cha, but add it instead. Some visual cues will be off (like the + next to the class levels), but that's the most simple way.
 
That is exactly what I was looking for!!!!!! Does this remove con score though? I want HP and fort save to be dependant on the cha for character backstory reasons.

How/where did you find that? I am feeling a bit silly now. Perhaps I need to go through the help files again to better understand the language. Knowing the right answer is good and I appreciate it a lot. I would also like to understand how to get to the answer, if you have time for that.

Thank you so much!
 
For that bit of code, go to the Racial Specials tab, and make a copy of an ability called "Undead Traits", and look at its Eval Script.

If you look at several different undead creatures, or templates that make creatures into undead, you'll see that most of them add that same ability.

Removing the con score is a separate thing from substituting the bonus.
 
Thank you for the clarification. I still have not been able to make it work, but I still have a lot of tinkering to do. I will make sure to complete all of the help files again and come back If I have more questions. Thank you all for your help!
 
After a few days of bashing my head on a brick wall and not getting very far I would like someone to tell me where I am going wrong. Here is what I have done so far.

~undead use their CHA mod in place of their CON mod
perform hero.child[aCON].assign[AttrSub.aCHA]

Entered this script into as a new eval script and named it, gave it a unique ID. I then added it to the changeling race under racial specials, gave changeling a new name and unique ID. That didn't work. Still using the con score for HP.
I tried updating subrace the same way thinking this might be the issue. No Dice. Then I copied undead traits in the racial specials making no changes then applying that, it did remove the con score and added cha modifier to HP. Knowing the copy worked I removed the
~we don't have a CON score
perform hero.child[aCON].assign[Helper.NoScore]

No dice. Still used the con score to calculate hp bonus.

So this is how I am reading the scripts
~we don't have a CON score
perform hero.child[aCON].assign[Helper.NoScore] - perform the task on the hero constitution score assign no score.

~undead use their CHA mod in place of their CON mod
perform hero.child[aCON].assign[AttrSub.aCHA] - perform the task on the hero CON assign a substitution attribute of CHA.

Since removing the first script breaks it, I assume that attribute substitutions cannot happen unless there is no score in that original attribute that is being substituted?
 
What did you place the eval script in (is it on the race, or in a racial special)? If on in a racial special, did you bootstrap that to your race?

What phase and priority did you assign the eval script?
 
I placed the eval script in racial special, and I did boostrap the racial special in the race.

the phase and priority were phase first priority 5000. That is what was in the undead type eval script so I assumed that would be the correct timing.
 
You are understanding the code correctly and I thought what you were trying should work, but it looks like you're right. Sorry for having to ask the simple questions.

I did a bit of further digging to see what's going wrong, and it looks like the eval script which does the substitution only runs if there is a Helper.NoScore tag present. So, rather than using the tag method, we'll have to just straight override things in our own eval script.

Try this script at Attr 100003
Code:
     hero.childfound[aCON].field[aModBonus].value = hero.childfound[aCHA].field[aModBonus].value

That works according to my initial tests, to make the Con mod effectively = the Cha mod.
 
You, sir, have just made my whole week. Thank you. Everything I was trying was WAY more complex. A simple = statement never even occurred to me.

Are there resources to understand the statements other than what is in the help files? Or is there a method of deconstructing and reconstructing that you would recommend? There are many edits I will have to do after this one, and I don't want to use up others time with questions I can answer on my own (with enough practice).
 
Well, there is the authoring kit wiki, which can be useful for language intrinsics and basic stuff like that: http://hlkitwiki.wolflair.com/index.php5/Main_Page

And chiefweasel has some intro videos on the editor posted to youtube, For example: http://www.youtube.com/watch?v=mc6bOPf99Mg

There is the old "Copy something and modify it" method, but that's more of a long term path to understanding.

You can do a search on the boards for similar threads, or you can always post a new thread looking for help. If Mathias or I can't get around to your question, there are usually other fans who are willing to give pointers.

Over all, I'd just say stick with it. When I started doing this, I was completely new to any sort of programming, so I can say that with enough practice it'll become second nature.
 
Back
Top