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!