• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help with Modifying 3.5

I have two main things in 3.5 that I wish to modify, but for the life of me I can't find where the original things are. So, I'm asking the community for some help. Here goes.

I want to modify the attack bonuses from attributes so that they are one-half what they currently are. For example, an 18 Strength normally gives a +4 to your attack, but in my homebrew it only supplies +2 (half as much). My rule is thus, all bonuses to attack values are halved, rounded down, but at least providing a +1 if you have a bonus (so that 12-13 range still gives +1). Notice this has no effect on penalties, only the bonuses. So I need to 1) code a conditional into the attack bonus calculations, and 2) adjust those bonuses appropriately. Any help for where (or if) I can do that would be appreciated.

Secondly, I have a modified skills so that base classes have class skills, cross-class skills, and general skills. The class skills and cross-class skills work normally, but my general skills are bought like class skills, but are limited to the max ranks of a cross-class skill. Any clues how I can implement that would be appreciated. I know I can define general skills in the base classes, just not sure how to implement them code wise (again, I seem to have trouble finding where exactly the system code does its thing).

I'm familiar with XML, but not fluent (I only just learned the basics this past fall). I am a programmer, so any help won't be too far over my head. Lay it on me. Thanks.
 
For #1 you could either recreate each of the classes with a special to do this, or and I just thought of this so I don't know that it will work, make a single adjustment for the in play tab.

For this adjustment, if it is clicked, its script:
A - detects the hero.child[aSTR].field[aModBonus].value
B - If negative, do nothing, done
C - If positive, subtract that value from the hero.child[Attack].field[tAtkMelee].value
D - Halve and round down the aModBonus value, minimum 1
E - Add that number back into the tAtkMelee field

For general skills, it sounds like you want to do something similar to the Jack of All Trades gnome racial special I made. Look at this forum post http://forums.wolflair.com/showpost.php?p=25396&postcount=52 . Obviously not the exact same thing, the relevant parts are giving 1 rank for cross class skills and enforcing an error if more than CC ranks are applied.
 
Something to keep in mind is phase and priority is paramount. #1 should either be late in the Attributes phase or more likely, early in the Post Attributes phase.

For the linked forum post Colen set the limit as "if we have more than 5 ranks", but you'll have to define what the current CC max rank is in the script and set that value in place of the 5.
 
For #1 you could either recreate each of the classes with a special to do this, or and I just thought of this so I don't know that it will work, make a single adjustment for the in play tab.

For this adjustment, if it is clicked, its script:
A - detects the hero.child[aSTR].field[aModBonus].value
B - If negative, do nothing, done
C - If positive, subtract that value from the hero.child[Attack].field[tAtkMelee].value
D - Halve and round down the aModBonus value, minimum 1
E - Add that number back into the tAtkMelee field

For general skills, it sounds like you want to do something similar to the Jack of All Trades gnome racial special I made. Look at this forum post http://forums.wolflair.com/showpost.php?p=25396&postcount=52 . Obviously not the exact same thing, the relevant parts are giving 1 rank for cross class skills and enforcing an error if more than CC ranks are applied.

Not sure it is possible to do this in the In Play tab, since I don't see any way I can alter or even create a script. Where, exactly, is it calculating the attack values, from the classes? I have to go through and alter most of the classes anyhow, due to the skill system I have (all classes get a minimum of 4 skill points plus Int mod per level).

If I do redo the classes, is it possible to remove the old classes or overwrite them? Or does it matter, since mine will have the same names with different unique ids?
 
Just thought of another complication. Well, not a complication, something I'd like to do that I can do manually if necessary. Armors are house ruled in my game based on a percentage of the character's Dexterity. *grumble grumble*

I've been delving into the d20 XML files, and I can see places where I can make simple changes. However, the calculated changes are nowhere to be found there, so I'm wondering where that's being done at. If it's internal, then I can't do anything about that, but being that Hero Lab is highly modifiable, as it shows with its Savage World example of a whole new game system, I don't see why it should be internal. Something in the d20 files has to be scripting the calculation, I just can't find it. I would like to do what Savage World is doing, as there is a specific example of calculating the attack values, but where that is located in the d20 files is a mystery.
 
Sorry, I misspoke. While I said In Play, I meant the Adjustment Tab. You can add a new Condition in the editor that when checked would do the things I listed.

If you are doing all classes anyway then you can just put the script into a Unique Special bootstrapped to each class.

Yes, you can have your new classes replace the old ones. Look to the right side of the editor and you can see the "Replaces Thing ID" field. Enter the replaced things unique ID there to have your new one supercede the old.

Answer your other questions later. Late for a meeting.
 
Ok, I shall try that. Not too keen on the character class adjustment, but if worst comes to worst, I'll try that as well. My script comes out something like:

if (hero.child[aSTR].field[aModBonus].value > 0) then
hero.child[Attack].field[tAtkMelee].value -= hero.child[aSTR].field[aModBonus].value
var temp_mod as number
temp_mod = round (hero.child[aSTR].field[aModBonus].value / 2, 0, -1)
temp_mod = maximum (temp_mod, 1)
hero.child[Attack].field[tAtkMelee].value += temp_mod
endif

With another script to cover Dexterity and Ranged attacks. I set it Post Attribute, but I haven't yet tested it. Again, I feel that there should be an easier way to do this right inside the XML code.
 
Last edited:
Bah, seems in order to change what I want in the d20 files, I would have to do a whole recreation. I certainly don't want to do that. But without the skeleton files, which according to the documentation is where you set up all the internal calculations, I can't seem to change the things I want (I'm actually editing the XML files directly and compiling them). Unfortunately, some things are defined in ways I can't access (such as tAtk and tAttack), as they are not present in any of the XML files as a calculated field (which is what it is). *grumble*
 
You can do a lot through the editor if you know how to work it, but I don't know if you can do enough for what you want. I have no experience working directly with the XML code, so I can't help you there.
 
I'm making progress on my changes. Found out there is a HeroLab file that actually does some things behind the scenes for different game systems, which is annoying, since it is already a compiled file and I can't delve into its contents. One thing that bugs me though, I changed some things in the XML file, but I can't see any of those changes unless I load that particular file into the Editor and test it. For example, I went directly into the Fighter XML file and changed its 2 skill points to 4 skill points. But when I load the d20 file into HeroLab and create a Fighter, no changes are present, and I have to go into the Editor and load the Fighter and test it. I'm not editing anything at all in the Editor, but I still have to compile it with the Editor, even if I change the actual XML files to new skill point values and load up HeroLab. Seems that when I choose the d20 file, it should be recognizing the changes I made, but it doesn't. Perplexes me.
 
If you're talking about the Source folder, that's a reference, not the code HL uses. Only files in the /data directory, not its subfolders, are incorporated into HL.

Changes to the files are made by creating replacements and new things in the editor. The "New (Copy)" button on the bottom left, combined with the "Replaces Thing Id" field on the center-right are what you want to use in order to edit an existing thing.
 
If you're talking about the Source folder, that's a reference, not the code HL uses. Only files in the /data directory, not its subfolders, are incorporated into HL.

Changes to the files are made by creating replacements and new things in the editor. The "New (Copy)" button on the bottom left, combined with the "Replaces Thing Id" field on the center-right are what you want to use in order to edit an existing thing.

So I would need to know the id that I was replacing, and type it into that Replaces Thing Id field?
 
Well, I'll be a monkey's uncle. I didn't realize that my data file had additional files in it. I just looked at the first few and thought they were all graphics files. Stupid me. I might be able to pull this off afterall, assuming I know what I'm doing. I'm still getting the hang of XML, though it seems rather easy to me, so I might be missing some nuance. I was always in the source folder, like a dunce.
 
Not sure what I'm doing wrong here, as the tutorial and everything I have found here says the same thing that I am doing. I created a new Fighter class to replace the old Fighter class. I used the Replace Unique ID to replace the cHelpFtr. Now, when I return to HL, there are two Fighter classes listed when I select a level. That shouldn't be there, and I don't know why it is listing my new class and the old class as well. Anyhow, I created a Fighter for my new class, and the tabs now show both the new Fighter tab AND the old Fighter tab alongside it. What, or where, the heck did I go wrong? I've tried manipulating this but it keeps showing up no matter how I try to fix it.
 
Seems I've got that all figured out, and I've also figured out how to get the attack bonuses to work. Thanks Lawful_g, that method of making new classes with a bootstrap worked perfectly. I'm trying to figure out how to do this with the armor rule in my game. Armor no longer has a max Dex bonus, but has a 1, .75, or .5 multiplied to the character's Dex bonus and added into the Armor Class. For example, light armor is x1, medium x.75, and heavy x.5 (rounded down). I've tried making new armors with this maximum Dex percentage as a tag, but I'm having problems implementing it. Here is the script I was using for determining max Dex bonus to armor.

if (hero.child[aDEX].field[aModBonus].value > 0) then
hero.child[ArmorClass].field[Bonus].value -= minimum(hero.child[aDEX].field[aModBonus].value, hero.child[ArmorClass].field[mMaxDex].value)
var temp_mod as number
temp_mod = round (hero.child[ArmorClass].field[mMaxDex].value * hero.child[ArmorClass].field[mPctDex].value, 1, -1)
hero.child[ArmorClass].field[Bonus].value += temp_mod
endif

It simply doesn't recognize the mPctDex in my new chain shirt armor I made, even though I have created a tag there. Problem is, if I make it a user tag, it has no way of accessing it. One solution I thought of was to create three new abilities to bootstrap to my armors that has the 1, .75, and .5 modifiers. Thanks in advance for any pointers.
 
Last edited:
If all light armor, medium armor, or heavy armor has the same multiplier, you can use:

Code:
if (tagis[mClass.Light] <> 0) then
...
elseif (tagis[mClass.Medium] <> 0) then
...
elseif (tagis[mClass.Heavy] <> 0) then
...
endif

New fields and new tag groups need to be defined in the structural files for the game system - you can't just create them on the fly.
 
If all light armor, medium armor, or heavy armor has the same multiplier, you can use:

Code:
if (tagis[mClass.Light] <> 0) then
...
elseif (tagis[mClass.Medium] <> 0) then
...
elseif (tagis[mClass.Heavy] <> 0) then
...
endif

New fields and new tag groups need to be defined in the structural files for the game system - you can't just create them on the fly.

Unfortunately, I have some crossover. For example, hide is medium armor, but has a Dex multiplier of x1. Half-plate, a heavy armor, has a x.75 mulitplier. So the crossover causes a problem. Fail to understand why the editor gives you the option to create new tags or fields, when you can't create them in the editor. Kind of self-defeating. So, essentially, if I want to make my own hide armor, I can't add anything new to it? All armors just conform to the strict letter of the d20 system? That's disappointing.

So, could I do this then? Add a script to each armor, that resets it's mMaxDex to the hero's Dex bonus * that armor's percentage modifier? How would I phase that?
 
You can create new tags for tag groups that have been defined as being dynamic - that's what the User tag group that's at the bottom of most editor pages is.

So, there, you can create the DexFrac1, DexFrac075 and DexFrac05 tags in the user group, and assign the correct one to each armor. Then, look for User.DexFrac1, User.DexFrac075 and User.DexFrac05 in that if...then I gave you.

The Tags and Fields buttons at the top right, if that's what you're talking about, allow you to set any value you like for any field that's already defined for the thing you're creating (rarely there are reasons to go outside what can be set with the options that are pre-defined within the body of the editor), or to add any tag that exists to the thing (or a new tag within an existing tag group if that group is dynamic).
 
Aha, I see what's happening here. While XML is completely flexibile, within the domain of tags you pre-defined, the HL program has can't have additional pre-defined tags outside of what it recognizes except for creating a user tag (which is added into the particular data file and is not added into the program itself). While it limits ultimate flexibility, as standalone XML is, in order for HL to "not break" it can only allow changes within the system the Editor (and thus the user file). So all my work directly editing the XML files won't work (outside of altering pre-defined values), so that clears up my wrong headed way of thinking I could edit this. I'm going to have to bite the bullet and read through the entire Authoring Kit guide and tutorial just to know what I'm doing to make HL happy.

One other thing. Seems that I thought I had fixed the duplicated Fighter tag in HL, but it has shown up again. Not sure what I did wrong or how to get rid of the old Fighter tab. Any suggestions what I did wrong or what I can do?
 
I would make sure that both the class helper and the class levels are replaced in the user file. Maybe you only put the unique ID for the class levels in the Replaces Thing field, and didn't do the same for your class helper.

By the way, a good way of looking up how to do things is to pattern your own code after what has already been done. There is a large body of d20 stuff entered by myself and others whose examples might or might not help. You sound like someone who already understands coding, much better than I do, but I have managed to make things in the editor seemed daunting at first.
 
Back
Top