Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Shadowrun
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Kesendeja
Member
 
Join Date: Aug 2009
Posts: 86

Old August 12th, 2016, 02:35 PM
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
Kesendeja is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 12th, 2016, 02:39 PM
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?
Mathias is online now   #2 Reply With Quote
Kesendeja
Member
 
Join Date: Aug 2009
Posts: 86

Old August 12th, 2016, 02:51 PM
Where in the editor would I make the changes?
Kesendeja is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 15th, 2016, 08:11 AM
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]
And then to add a new tag

Code:
perform hero.childfound[ilPhysical].assign[AttrDicDiv.4]
Those can also be combined in a single line:
Code:
perform hero.childfound[ilPhysical].tagreplace[AttrDicDiv.3,AttrDicDiv.4]
So you'll build up a list of changes that you're making to each limit, in order to change the equation each one is using. Since all mechanics exist on all characters all the time, you'll probably want to add a source to your mechanic. That means that if the source is turned off, the mechanic is non-live, and it won't run its eval script and make these changes to the limits.

To get the Ids for mental & social, right-click that limit, and choose "Copy unique Id", which is at the bottom of that list.
Mathias is online now   #4 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old August 17th, 2016, 04:38 AM
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.
Jareth Valar is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 17th, 2016, 06:19 AM
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)
Mathias is online now   #6 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old August 17th, 2016, 02:45 PM
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]?
Jareth Valar is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 17th, 2016, 03:07 PM
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.
Mathias is online now   #8 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old August 22nd, 2016, 04:46 AM
Thank you, works perfect now
Jareth Valar is offline   #9 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:51 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.