Member
Join Date: Aug 2009
Posts: 86
|
Now this one is for my husbands game, he's reworked how to figure Limits and wants to know if there is a way to redo the formula in herolab. I've put the new formula here hoping you can help. Thanks
Physical =((Agility x2)+Strength+Body+Reaction)/4 Mental =((Logic x2)+(Intuition x2)+Willpower)/4 Social = ((Charisma x2)+Intuition+Willpower+Essence)/4 |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In the Develop menu, make sure Enable Data File Debugging is turned on.
Then, right-click on each of the limits, and choose "Show Debug Tags for XXXXX". Study the tag lists - can you see how the attribute values are being set? |
#2 |
Member
Join Date: Aug 2009
Posts: 86
|
Where in the editor would I make the changes?
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In the general grouping, find the mechanics tab, and create a new mechanic.
Now, with mechanics, there's a special note. The "Test Now!" button will not work for mechanics, so you'll need to go back to the main HL window, and from the Develop menu, choose "Quick-reload data files". ctrl-r is the keyboard shortcut for that. You'll need to have Enable Data File Debugging turned on (at the top of the list in the Develop menu) before quick-reload becomes available. Now, on your mechanic, add a new Eval Script. For this, I think Pre-Traits/10000 will be a good phase & priority. To delete a tag, here's the code: Code:
perform hero.childfound[ilPhysical].delete[AttrDicDiv.3] Code:
perform hero.childfound[ilPhysical].assign[AttrDicDiv.4] Code:
perform hero.childfound[ilPhysical].tagreplace[AttrDicDiv.3,AttrDicDiv.4] To get the Ids for mental & social, right-click that limit, and choose "Copy unique Id", which is at the bottom of that list. |
#4 |
Member
Join Date: Aug 2009
Posts: 38
|
I can see where this changes the multiplier, but how to change the formula (attributes in the Calculations hover pop-up and all). It has changed by adding another attribute (so as to keep the overall limit level similar) and the physical limit has changed more drastically. Cannot see where the editor tells you where the formulas are.
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The other piece of the puzzle is the AttrDicDiv tag.
So, for physical, for example, it has the following tags that are used in the calculation: AttrValue.attrBod AttrValue.attrRea AttrValue2.attrStr So, Bod + Rea + Str * 2 Then, it has AttrDicDiv.3 Which means to divide all that by 3 So, assemble those together, and you get: [(Strength x 2) + Body + Reaction] / 3 (round up) |
#6 |
Member
Join Date: Aug 2009
Posts: 38
|
So (I haven't programmed since GWBasic so please forgive me) putting those together and replacing the original formula I would have to delete the old formula:
perform hero.childfound[ilPhysical].delete[AttrValue.attrBod, AttrValue.attrRea, AttrValue2.attrStr, AttrDicDiv.3]? and replace it with: perform hero.childfound[ilPhysical].assign[AttrValue.attrBod, AttrValue.attrRea, AttrValue2.attAgi, AttrValue.attrStr, AttrDicDiv.4]? And then just do the same for [ilMental] and [ilSocial]? |
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
You can only delete/assign one per line, but yes.
Also, since your equation still uses Body x 1 and Reaction x 1, no need to delete/assign those attributes. |
#8 |
Member
Join Date: Aug 2009
Posts: 38
|
Thank you, works perfect now
|
#9 |
|
|