Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
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. |
#11 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
|
|
#12 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#13 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#14 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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 by Kendall-DM; January 18th, 2011 at 11:28 PM. |
#15 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
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 |
#16 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
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? |
|
#17 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
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). |
#18 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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? |
#19 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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. |
#20 |
|
|