![]() |
Junior Member
Join Date: Mar 2012
Posts: 2
|
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. |
![]() |
![]() |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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) |
![]() |
![]() |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
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.
|
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
![]() |
![]() |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
Quote:
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> 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) |
|
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
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. |
![]() |
![]() |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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 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) |
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Please be more specific than "should work, it didn't". Without details, I can't help you figure out what went wrong.
|
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
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. |
![]() |
![]() |
![]() |
|
|