Help/Advice for Weapon Style Modding
Reddbane
Member Posts: 222
I’ve begun working on a mod which edits the Weapon Styles within the EE games, to go along with my suite of 3.5 edition tweak mods, the purpose of which is to make minor tweaks which replicate several balance changes introduced in 3.5 edition and pathfinder; this latest mod, as its name implies, deals with the weapon styles in the proficiency screen.
I’ve come here to ask for some advice from some more experienced modders. Despite having made a few mods, I’m still quite an amateur with weidu.
Here is the mod, as is.
Now, I’ve finished the base aspect of the mod (which seems to be the simplest part), in which the STYLBONU file is replaced, and the “Weapon Style” strings for the descriptions have been updated (which I’ve made compatible with BG1EE, BG2EE, and IWDEE). This all seems to work fine at the moment, though please do notify me if any of my coding so far shows a problem, or if I approached it in an inefficient way. But what I require help with is several other parts I need to add to the mod, whose method of creation eludes me at this current moment.
First, I need to make a weidu code that will easily edit the existing WEAPPROF (where the number of proficiency selection and limit per class is set), rather than simply overwrite it with a pre-made file, in order to account for new kits added by other mods.
Here is what I need to accomplish through weidu: I need to change all “3”s in the “2WEAPON” row into “2”s; I need to make all Thieves, Bards, their various kits, and multi-classes have “2”s in their “2WEAPON” and “SINGLEWEAPON” rows; and I need all mages, sorcerers, and their respective kits to have “1”s in their “SINGLEWEAPON” and “2HANDED” rows.
Second, I want to make it so all Quaterstaves can no longer backstab (so there are no longer any two-handed weapons that can backstab), but I could not discover what determines whether a weapon can backstab within the files. Is it determined within the .itm files or somewhere else, and then how should I code that change.
Third, I want to add a passive modifier to all Rangers, given at the first level, that improves offhand thac0 by -2. Now, I know how to create this ability, and add it to the Ranger clabs manually. But how can I program it in weidu so that the mod will always add this ability (I assume through a new row in the clab) to each and every Ranger, kit, and ranger-multiclass that it detects in the current game? Again, so as to account for new Ranger kits added by mods.
As always, thank you for your time.
I’ve come here to ask for some advice from some more experienced modders. Despite having made a few mods, I’m still quite an amateur with weidu.
Here is the mod, as is.
Now, I’ve finished the base aspect of the mod (which seems to be the simplest part), in which the STYLBONU file is replaced, and the “Weapon Style” strings for the descriptions have been updated (which I’ve made compatible with BG1EE, BG2EE, and IWDEE). This all seems to work fine at the moment, though please do notify me if any of my coding so far shows a problem, or if I approached it in an inefficient way. But what I require help with is several other parts I need to add to the mod, whose method of creation eludes me at this current moment.
First, I need to make a weidu code that will easily edit the existing WEAPPROF (where the number of proficiency selection and limit per class is set), rather than simply overwrite it with a pre-made file, in order to account for new kits added by other mods.
Here is what I need to accomplish through weidu: I need to change all “3”s in the “2WEAPON” row into “2”s; I need to make all Thieves, Bards, their various kits, and multi-classes have “2”s in their “2WEAPON” and “SINGLEWEAPON” rows; and I need all mages, sorcerers, and their respective kits to have “1”s in their “SINGLEWEAPON” and “2HANDED” rows.
Second, I want to make it so all Quaterstaves can no longer backstab (so there are no longer any two-handed weapons that can backstab), but I could not discover what determines whether a weapon can backstab within the files. Is it determined within the .itm files or somewhere else, and then how should I code that change.
Third, I want to add a passive modifier to all Rangers, given at the first level, that improves offhand thac0 by -2. Now, I know how to create this ability, and add it to the Ranger clabs manually. But how can I program it in weidu so that the mod will always add this ability (I assume through a new row in the clab) to each and every Ranger, kit, and ranger-multiclass that it detects in the current game? Again, so as to account for new Ranger kits added by mods.
As always, thank you for your time.
0
Comments
Second, if you want to apply changes to all kits of a class, you first need to look in KITLIST.2DA. This file has lists the kits in the game and also says what class they belong to. If you want to give all rangers an ability, here's what you do:
For each row in KITLIST.2DA:
If the CLASS column for that row = 12 (Ranger class):
Look at the ABILITIES column for that row and get the filename.
Go to the 2DA file with that name.
Put an extra row giving the ability you want.
You also need to give the ability to the unkitted class.
As for the proficiencies question, do the same thing: look in KITLIST.2DA to determine which kits belong to the classes you want to change, then change the proficiencies of those kits in WEAPPROF.2DA.
Okay, solved. Just needed to update my NearInfinity.
I've managed to cannibalize your code (thanks again) to make all the major changes to class (and kits) weapon style availability as desired, but there is still one thing I would like help on, as I'm still a little lost.
As I brought up earlier, I want to as well make a code that changes certain entries in the WEAPPROF irrespective of class or kit, to more specific i need a code that can scan the 2WEAPON entries (row 34) and if the entry is “3” it changes that to "2" but if it is any other number (like "1" or "0") it does nothing, that is it leaves the entry as is. (The need for this is to create a catch-all way to lower all the classes with maximum "Two weapon Style" gain from 3 to 2, but to avoid possible new warrior kits, which might remove dual wielding as a feature, from accidentally gaining full 2WEAPON access.)
Thanks for your time.
Thanks.
COPY_EXISTING_REGEXP "^.+\.itm" override
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
READ_SHORT 0x31 weaprof
PATCH_IF (weaprof = 102) BEGIN
WRITE_BYTE 0x1b (THIS BOR [?])
END
END
BUT_ONLY_IF_IT_CHANGES
But in reading CamDawg's Byte/Bor tutorial I'm finding myself a little lost. [?] denotes the part I'm not sure about, that is the binary code I should input. I could use some help on that part: that is how to make sure this enables "EE/Ex: Toggle critcal hits (25)" but leaves all the other toggles in that subset unchanged? Also I want to make sure my codding otherwise, beyond this missing binary is fine.
I've arranged the code as so, but I keep getting errors.
COPY_EXISTING ~WEAPPROF.2DA~ override
COUNT_2DA_COLS cols
FOR (col = 3; col < cols; ++col) BEGIN
READ_2DA_ENTRY 34 cols col val
PATCH_IF %val% = 3 BEGIN
SET_2DA_ENTRY 34 cols col 2
END
END
Also I wonder if you can help me about item/Quarterstaves question I posted above?
I'm greatly sorry If I'm appearing a bit of a fool and a time-waster, but much of Weidu is Greek to me.
As an aside, as someone who taught themselves Weidu coding, how would you recommend a newcomer approach systematically teaching themselves how understand and code Weidu? Every time I begin reading through Weimer's WeiDU Documentation I find myself quickly beyond my element and wind up somehow feeling like I know less about the process than when I began. Granted, I have very little experience in coding to begin with.
Type: Modify proficiencies (233)
Target: Self (1)
Power: 0
# stars: Active class: 4, Original class: 0
Proficiency: PROFICIENCY2WEAPON - 114
Behavior: Set if higher (0)
Timing mode: Instant/While equipped - 2
Dispel/Resistance: Natural/Nonmagical (0)
Duration: 0
Probability 1: 100
Probability 2: 0
Unused: 00 00 00 00 00 00 00 00 h
# dice thrown/maximum level: 0
Dice size/minimum level: 0
Save type: ( No save )
Save bonus: 0
Special: 0
What it should do is raise "Two weapon Style" to 4 pips (for reference, I added a functional 4th level to 2 Weapon style), while the item is equipped. But for some reason this does not seem to work. The code itself is based on some of Wiemar's items which increase proficiency values with weapons.
Does anyone know why this is not working?
To clear out some obvious answers, the 4th level of "Two weapon Style" works properly if given to a character via EEkeeper, and opcode (233) does apparently work with "Two weapon Style", as applying it as an effect in EEkeeper to a character does produce the desired effect (4 pips in Two Weapon style).
Anyone?