Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Grymdal
Junior Member
 
Join Date: Mar 2012
Posts: 2

Old February 1st, 2014, 08:07 AM
My group and I are about to start a new Campaign with Savage Worlds and are all HeroLab users/fans. I'm going to table rule a few things and I'm trying to figure it out in HL Editor but I'm not having much success.

I want to change the amount of XP it takes to go from one rank (Novice to Seasoned to Veteran...etc) from 20xp to 25xp and be able to share the file or setting with my group so we are all on the same page.

Please bear in mind I'm not a tech-guy or coder or anything like that (I work in healthcare) so feel free to dumb it down as much as you need to.

Thanks in advance.
Grymdal is offline   #1 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old February 1st, 2014, 02:35 PM
Yeah, that is NOT a newbie question! In fact it's something that exists on the requested features thread to have added to Hero Lab for Savage Worlds, some method for doing that. So thanks for totally stumping me with a "newbie" question!

That being said I think this is one of those situations where you wouldn't be able to just do it in the Editor. I think you would have to copy out the entire game system to a new one and then modify C:\ProgramData\Hero Lab\data\savage\source\actor.str file (that "savage" part would actually be whatever you name your new system) to change how acRank is calculated (changing the 20 in that calculation to 25).

Because acRank is an integral part of the base files I'm not so sure you can just directly change it without making a new game system to do it in. In any case I don't think that's an easy change, but there are some other far more knowledgeable folk here who might know how to do it, I'm just not one of them I'm sorry to say.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #2 Reply With Quote
jbearwillis
Senior Member
 
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797

Old February 1st, 2014, 03:22 PM
LOL - it stump me also zarlor - that's why I didn't reply until you had a look at it. I was pretty sure it would be a major pain, not sure if you could rig a mechanic to make it work, but I knew I would have to think about it real hard before giving an answer to whether it could be done without Cape having to work it into the system itself.
jbearwillis is offline   #3 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old February 1st, 2014, 04:09 PM
I have already whined about it a few times. Now I am just whining to get the updated Super Power Companion and Sci-Fi Companion.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #4 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old February 1st, 2014, 08:24 PM
Quote:
Originally Posted by SeeleyOne View Post
I have already whined about it a few times. Now I am just whining to get the updated Super Power Companion and Sci-Fi Companion.
May not be a bad time. Caped is definitely going to be knee deep in the code to cover those, I think. Then again it may also mean he's swamped trying to get those done which could push something like this to the backburner. I made sure it's in that consolidate list of requested items if that helps him any. I realized that the original thread quickly became a mix of stuff being asked for and stuff already done or that was mentioned couldn't be done (or at least not in the way we might have wanted) so I'm hoping that can make it a little easier for him to find it all nicely consolidated in one place where I can easily edit it to remove things that get added in from it.

At any rate I can see were the code for this is in the actor.str file, but I don't know if you can override something like that using a script in he Mechanic tab. I think it would be pretty heavily timing dependent, but also thing it's so heavily integrated at different layers that I'm not too sure you could override it that way.

Basically it is all taken care of with this:
Code:
<field
  id="acRank"
  name="Current Rank"
  type="derived">
  <calculate phase="Final" priority="1000"><![CDATA[
    var xp as number
    xp = hero.child[resXP].field[resMax].value
    if (xp < 80) then
      @value = round(xp / 20,0,-1)
    else
      @value = 4
      endif
    ]]></calculate>
  </field>
And you'd need to get that line for "@value = round(xp / 20,0,-1)" changed to "@value = round(xp / 25,0,-1)", if I'm reading that correctly. But it's calculated at Final/1000. Maybe if you set the timing at Final,1001 you could override how it's calculated and it would still work right?

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old February 2nd, 2014, 10:00 AM
zarlor, this is something you can override using a mechanic:

Put this eval script on your mechanic (note the phase & priority I'm using, and how it compares to the original):

Code:
 
<eval index="1" phase="Final" priority="1010"><![CDATA[
    var xp as number
    var xpperrank as number
    xpperrank = 25
    xp = hero.child[resXP].field[resMax].value
    if (xp < xpperrank * 4) then
      herofield[acRank].value = round(xp / xpperrank,0,-1)
    else
      herofield[acRank].value = 4
      endif
  ]]></eval>

Last edited by Mathias; February 2nd, 2014 at 10:03 AM.
Mathias is offline   #6 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old February 2nd, 2014, 10:44 AM
Ah, well there you go Grymdal. Thanks as always, Mathias!

I didn't realize it would quite work there, but Mathias is definitely a coding guru on Hero Lab without a doubt. To do that just open up the Editor and open the .user file you are using for your setting (or just a blank one if you are creating a new one. Click on the Tab labeled "Mechanic". If you are modifying an existing file and there is already a Mechanic there then you can just click on it's name to use that one, otherwise just click on the "New (Blank)" button at the bottom. Replace the ???? marks in the name with whatever you want to name this. If I were modifying my House Rules file, for example, I might called it House Rules Mechanic, for example. For UniqueID I would use something like mecHRHouse or mecHRRank (the latter is fine if you want to have separate ones for various mechanics, but I usually just stick with one and throw any mechanics changes into that one.)

You may also want to click on the Edit button at the bottom next to where is says "Sources". If you already have a source created for this setting then just select that one, or if this is something new then check the box for -New Source- and click OK. Then for Source Name you could use something like House Rules, with a UniqueID of something like HouseRules. Then click OK and that will save your new Source in this file. This also makes it easier when you are selecting what sources you want to use in Hero Lab to be able to select your own House Rules file.

I'm going to digress a moment to cover that whole Source idea. If you want the 25xp/rank to be the standard for games you run with Hero Lab then House Rules is a good enough name. But if you want to be able to just select that Mechanic separately from anything else you do, just adding it in when you want to use just that rule, then you might give it a more descriptive name for the source so you'll see it as that specific rule. So instead of House Rules you might call it "25xp per Rank", for example, and use appropriate codes above to reflect that (so a UniqueID of a 25xp and instead of "HR" in the UniqueID above use "25", or something like that.)

So back to filling out the mechanic. In the Description Text box just describe what you are doing with this mechanic so you'll know when you look at it later, something like "This mechanic makes all Rank increases cost 25xp instead of 20xp." Then click on the Eval Scripts button on the right. Change the Phase from Initialization to be Final. Set the Priority to 1010. Don't worry about the Index number.

Next in the big box under "Script" type in (or just cut and paste from here) the following:

Code:
    var xp as number
    var xpperrank as number
    xpperrank = 25
    xp = hero.child[resXP].field[resMax].value
    if (xp < xpperrank * 4) then
      herofield[acRank].value = round(xp / xpperrank,0,-1)
    else
      herofield[acRank].value = 4
      endif
Click OK, then click Save at the bottom left and save your .user file. That's it. After that just select the source on your Configure Hero screen for the character your making to include your new House Rule (or whatever you name it) source and it should apply from there.

NOTE: I haven't actually tested the above, but I trust Mathias' coding so you should be good there. However if you do run into any issues just let us know and I'm sure one of us will do our best to help out!

Thanks again, Mathias!

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #7 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old February 2nd, 2014, 04:18 PM
Thanks for the help. While the code looks like it should work, it didn't. It is probably a timing issue. It would probably be better if it were more like Pathfinder, where having a built in "replaces XP table" thing were built in.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old February 2nd, 2014, 04:25 PM
Please be more specific than "should work, it didn't". Without details, I can't help you figure out what went wrong.
Mathias is offline   #9 Reply With Quote
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old February 2nd, 2014, 05:55 PM
OK, I created the mechanic as described. But when I tested it by putting XP on the character it retained the use of the original XP table. The mechanic had no apparent effect.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #10 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 05:09 PM.


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