Jump to content

Shohy's Weapon Style Rebalance v0.7


Recommended Posts

Rebalance for Two-Handed Weapon Style, Sword and Shield Style, Single-Weapon Style and Two-Weapon Style, in order that all Weapon Styles are useful.
All ajustments take effect only in combat, not in peacetime.
You can click the mode switch button on the protagonist's skill bar to activate the mechanism or not. The button is obtained in the first battle.
One glitch: After a battle, the time to save the game may be delayed for a few seconds.

Download here

///////////Compatibility////////////

This MOD doesn't modify any of the original game data, it only temporarily adds additional adjustments in combat, so it is compatible with everything.

///////////Components///////////

①Rebalance for Weapon Styles

You can click the mode switch button on the protagonist's skill bar to chooce modification modes. The button is automatically obtained in the first battle.
Mode 1 (by default): turns on all effects, for both allies and foes.
Mode 2: turn off Detailed ajustments for weapons and retains Modification of Weapon Styles, for both allies and foes.
Mode 3: turn on all effects, valid only for teammates.
Mode 4: turn off Detailed ajustments for weapons and retains Modification of Weapon Styles, valid only for teammates.
Mode 0: turn off all effects.

Modification of Weapon Styles:

[Single-Weapon Style]
1 Slot: +2 to attack speed, one special attack in each round for tripping your enemy, grappling him temporarily or flipping him to the floor.
2 Slots: +4 to attack speed, one special attack in each round for tripping your enemy, grappling him or flipping him to the floor for a slightly longer duration, with 10% chance to disarm his weapons (only affects humanoids).
The tripping takes effect when the enemy's strength does not exceed the character's strength by more than 2 points. The enemy can also make a save vs. breath with a +4 bonus to avoid being tripped (-1 save penalty for every 5 levels of the attacker).
A hasted character can make two trip attacks in one round.
Some creatures (such as wraiths or slimes) can not be tripped.

[Two-Handed Weapon Style]
1 Slot: +1/2 attack per round.
2 Slots: +1 attack per round.
Strength modifier to your melee damage is increased by 50%.

[Two-Weapon Style]
-1/2 attack per round, unless 5 proficiency points are put into Two-Weapon Style (See the component 'More proficiency points can be spent to all Weapon Styles').
0 Slot: -2 to melee damage.
1 Slot: -2 to melee damage while +1 bonus to melee AC.
2 Slots: -1 to melee damage while +2 bonus to melee AC.
3 Slots: +2 bonus to melee AC.

[Sword and Shield Style]
With a shield that blocks the enemy's view, you can make a sudden strike with +2 bonus to attack rolls per round.
1 Slot: +1 bonus to melee AC, one additional Shield Bash on nearest enemy per round besides normal attacks, which can break down your enemy's defense (-2 penalty to AC) for a while and knock him back. The enemy can make a save vs. breath with a +4 bonus to avoid the shield bash (-1 save penalty for every 5 levels of the attacker).
2 Slots: +2 bonus to melee AC, one additional Shield Bash on nearest enemy per round besides normal attacks, which casues stunning damage of 1D4 + strength modifier and an extra stunning check.  The enemy can make a save vs. breath with a +4 bonus to avoid being stunned (-1 save penalty for every 5 levels of the attacker), but he'll still suffer a defense break and being knocked back.
A hasted character can cast sudden strike and shield bash twice in one round.

[Unarmed (Monks only)]
One special attack in each round for tripping your enemy. When the monk has something in his hand, his special attack works as a tripping of rank 1 Single-Weapon Style. While nothing in hand, it works as a tripping of rank 2 Single-Weapon Style.


Detailed ajustments for weapons:

If you have an one-handed light weapon (dagger, short sword, wakizashi, etc., or with bare hands) in one hand with another hand unarmed, your dexterity modifier is added to THAC0 (the bonus is 1, 2, 3, 4, 5 when dexterity reaches 16, 17, 19, 21, 24); if the other hand is armed, there is no dexterity modifier, but +1 bonus to melee AC and off-hand THAC0.
If you're using a two-handed light weapon (spear, staff), you gets +1 bonus to melee AC and THAC0.

If you have an one-handed long-edged weapon (scimitar, long sword, bastar sword, katana, etc.) in one hand with another hand unarmed, you have 30% chance to exert a small AOE with slashing damage of 1D6 plus 50% of strength modifier. However, the direct damage of this attack is reduced by 3 points and minus 50% of strength modifier. If the other hand is also armed, the probability of exerting AOE is halved.
If you're using a two-handed long-edged weapon (two-handed sword in original game, two-handed katana and bastar sword provided by other MODs),  you have 60% chance to exert a larger AOE with slashing damage of 1D10 plus 50% of strength modifier (as the Component of 'Rebalance for Weapon Styles' raises the two-handed strength modifier to 150%, the modifier here is actually 75% of the original strength modifier). However, the direct damage of this attack is reduced by 5 points and minus 50% of strength modifier.
There is also an AOE with a two-handed halberds, but the probability is 30%.
For convenience, such AOEs won't hurt teammates.

If you have an one-handed bludgeon weapon (war hammer, mace, flail, morning star, etc.) in one hand with another hand unarmed, you have chance (grows with your strength, 0% at 10 str, 30% at 25 str, half for one-handed axe) to exert a mighty blow, which can break down your enemy's defense (-2 penalty to AC) for a while and knock him back (save vs. breath). If the other hand is also armed, the probability of mighty blow is halved.
If you're using a two-handed hammer (provided by other MODs), you have chance (grows with your strength, 0% at 10 str, 45% at 25 str, half for two-handed axe from Icewind Dale or other MODs) to exert a mighty blow, which can stun your enemy or even knock them down. The enemy who makes a save vs. breath only suffers a short penalty of -2 to AC and knocking back.

If you're using an one-handed weapon with tripping property (axe, war hammer, or one-handed halberd provided by other MODs), you obtain one special attack in each round that can hook your foe's weapon, aromr or limbs to drag him. The enemy loses his balance (-4 penalty to AC and THAC0) for a short while unless saves vs. breath.
If you're using an two-handed weapon with tripping property (halberd, or two-handed axe and war hammer provided by other MODs), you obtain one special attack in each round that can hook your foe's weapon, aromr or limbs to drag him down to the floor unless saves vs. breath, with 10% chance to disarm his weapons (only affects humanoids).
The dragging takes effect when the enemy's strength does not exceed the character's strength by more than 2 points.
A hasted character can make two dragging attacks in one round.

If you're using an two-handed spear, you get +2 to damage.

For the special attacks above that require save vs. breath, the enemy can make save with a +4 bonus, and with -1 save penalty for every 5 levels of the attacker.

 

Allies and foes also obtain similar Modification of Weapon Styles:

Creatures of warrior classes that hold spears, staves or halberds are treated to be rank 2 in Two-Handed Weapon Style, for non-warrior classes they're treated to be rank 1.
Creatures of warrior classes that hold shields are treated to be rank 2 in Sword and Shield Style, for non-warrior classes they're treated to be rank 1.
Creatures of warrior classes without shields in hands obtain +1/2 attack per round.
Monks obtain a trip attack per round, which acts the same as trip attack of rank 2 Single-Weapon Style.

Allies and foes also obtain similar Detailed ajustments for weapons:

Creatures with one-handed light weapons gain dexterity modifier on THAC0; Creatures with two-handed light weapons gain +1 bonus to melee AC and THAC0.
Creatures without shields in hands who equip long-edged weapons, bludgeon weapons, or weapons with tripping property, can also cast cleave, mighty blow and hook attacks respectively. Such special attacks are switched to two-handed version whe their strengths are over 18.

 

②More proficiency points can be spent to all Weapon Styles

When each Weapon Style reaches rank 2, it automaticly decreases to rank 1 ( in battle ) in exchange for +1 bonus to melee damage, melee AC, tohit and attack speed. There's no more decline when it reaches rank 2 again.
When Two-Weapon Style reaches rank 3, it decreases to rank 2 ( in battle ). When it reaches rank 3 again (5 points invested totally), the penalty of -1/2 attack per round no longer exists.


///////////Version History///////////

V 0.7
Added a mode switch button to the protagonist's skill bar to chooce modification modes.
Components 'Detailed ajustments for different weapons' and 'Similar benefits for allies and enemies' are merged into 'Rebalance for Weapon Styles'.

V 0.6
Fixed the problem that Cleave hurts allies.
Adjustment of Cleave's range.
Tried again to reduce waiting time before saving the game.
Increase the sprint speed of the character when casting Shield Bash.

V 0.5
Fixed the problem that component 4 did not work. Now component 4 also allows friendly creatures to gain similar abilities.
Creatures will not cast Shield Bash under special conditions such as invisibility, singing, disability, etc.
Fixed a problem that damage of Shield Bash failed to increase with strength.
Shield Bash now shows "A Shield Bash B" instead of "B Bashed by shield" .
Action of the shield strike is more obvious, and now has a sound effect.
Each Weapon Style will give a hint when its rank decreases due to component 2.
Fix some other details.

V 0.4
Added a little visual effect better than nothing for shield bash.
Fixed the problem that damage with Two-Handed Weapon Style was greater than expected.
Fixed the problem that tohit of sudden strike with Sword and Shield Style may be greater than expected.
The problem that the game could not be saved immediately after a battle was not solved, but the waiting time before saving the game is greatly reduced.

V 0.3
Fixed a serious problem that causes game crashing.
Fixed some detailed bugs.
Increased damage of cleave (50% of strength bonus).

V 0.2
Fixed some problems.
New components: 'Detailed ajustments for different weapons' and 'Similar benefits for enemies'

V 0.1
Components: 'Rebalance for Weapon Styles' and 'More proficiency points can be spent to all Weapon Styles'

Edited by shohy
Link to comment

Interesting, you use unseen creatures & scripts to keep track of weapon type and number of proficiencies? I considered something like that but was worried it would be too cluttered with slowdowns.

About the styles:

Quote

[Two-Handed Weapon Style]
1 Slot: +1/2 attack per round.
2 Slots: +1 attack per round.
Strength modifier to your melee damage is increased by 50%.

Without mods it's 2 proficiency slots (specialization) to get an extra 1 attack per 2 rounds , or 5 (grand mastery) for a whole extra APR, but only with a specific weapon, whereas this modification applies to all weapons of the two handed type. The +50% melee damage from strength will also be greater or equal the +5 damage bonus you'd normally get from weapon grandmastery once the character's strength is 22 or higher.

My point being, it looks like a better idea for characters in the early game to spend slots on this style than in actually specializing with specific weapons.

Quote

[Two-Weapon Style]
-1/2 attack per round, unless 5 proficiency points are put into Two-Weapon Style (See the component 'More proficiency points can be spent to all Weapon Styles').
0 Slot: -2 to melee damage.
1 Slot: -2 to melee damage while +1 bonus to melee AC.
2 Slots: -1 to melee damage while +2 bonus to melee AC.
3 Slots: +2 bonus to melee AC.

[Sword and Shield Style]
With a shield that blocks the enemy's view, you can make a sudden strike with +2 bonus to attack rolls per round.
1 Slot: +1 bonus to melee AC, one additional shield bash on nearest enemy per round besides normal attacks, which can break down your enemy's defense (-2 penalty to AC) for a while and knock him back. The enemy can make a save vs. breath with a +4 bonus to avoid the shield bash (-1 save penalty for every 5 levels of the attacker).
2 Slots: +2 bonus to melee AC, one additional shield bash on nearest enemy per round besides normal attacks, which casues stunning damage of 1D4 + strength modifier and an extra stunning check.  The enemy can make a save vs. breath with a +4 bonus to avoid being stunned (-1 save penalty for every 5 levels of the attacker), but he'll still suffer a defense break and being knocked back.
A hasted character can cast sudden strike and shield bash twice in one round.

These look good actually, but maybe reserve the shield bashing thing for 2 proficiency slots and its improvement to 3 (if you're going to expand allowable proficiency point spending). A +1 to AC vs melee weapons and a +2 bonus to the first attack in a round is already pretty good for 1 proficiency spent, especially at low levels when you have few attacks per round and it's more notable to boost even one.

Link to comment
Guest morpheus562

How do the scripts work if I am in combat, transition to another area, and am immediately in combat in the new area? Taking a quick look over the scripts, I don't see a mechanism for the invisible creature to transition with the party.

How does the script handle monks who equip an item in the offhand, but keep their main hand open for fist attacks?

Link to comment
21 hours ago, polytope said:

Interesting, you use unseen creatures & scripts to keep track of weapon type and number of proficiencies? I considered something like that but was worried it would be too cluttered with slowdowns.

About the styles:

Without mods it's 2 proficiency slots (specialization) to get an extra 1 attack per 2 rounds , or 5 (grand mastery) for a whole extra APR, but only with a specific weapon, whereas this modification applies to all weapons of the two handed type. The +50% melee damage from strength will also be greater or equal the +5 damage bonus you'd normally get from weapon grandmastery once the character's strength is 22 or higher.

My point being, it looks like a better idea for characters in the early game to spend slots on this style than in actually specializing with specific weapons.

These look good actually, but maybe reserve the shield bashing thing for 2 proficiency slots and its improvement to 3 (if you're going to expand allowable proficiency point spending). A +1 to AC vs melee weapons and a +2 bonus to the first attack in a round is already pretty good for 1 proficiency spent, especially at low levels when you have few attacks per round and it's more notable to boost even one.

Effects of 2 proficiency slots for some of the Weapon Styles are quite overpowered in the early game. So I provided a component that reduces 2 proficiency slots to 1 as a restriction.

Link to comment
20 hours ago, morpheus562 said:

How do the scripts work if I am in combat, transition to another area, and am immediately in combat in the new area? Taking a quick look over the scripts, I don't see a mechanism for the invisible creature to transition with the party.

How does the script handle monks who equip an item in the offhand, but keep their main hand open for fist attacks?

The scripts exactly don't work when moving to another area. As the effectless only lasts for 0~5 seconds, and it's difficult to keep the invisible creature moving with the party, I decided to ignore this problem 😛

Link to comment

V0.4
Added a little visual effect better than nothing for shield bash.
Fixed the problem that damage with Two-Handed Weapon Style was greater than expected.
Fixed the problem that tohit of sudden strike with Sword and Shield Style may be greater than expected.
The problem that the game could not be saved immediately after a battle was not solved, but the waiting time before saving the game is greatly reduced.

Link to comment

V 0.5
Fixed the problem that component 4 did not work. Now component 4 also allows friendly creatures to gain similar abilities.
Creatures will not cast Shield Bash under special conditions such as invisibility, singing, disability, etc.
Fixed a problem that damage of Shield Bash failed to increase with strength.
Shield Bash now shows "A Shield Bash B" instead of "B Bashed by shield" .
Action of the shield strike is more obvious, and now has a sound effect.
Each Weapon Style will give a hint when its rank decreases due to component 2.
Fix some other details.

Link to comment

Not to highjack your thread, but I am looking for advice modding something analogous what is coded here.  You see I have permission to update Abdel Adrian's Eldritch Magic (BGEE/BG2EE/IWDEE) for EET and to be closer to pnp.  As a part of the update, I want to create a new weapon style called Bladesong that can be used by any elf.  While I am also going to update the Bladesinging kit itself, the weapon style is a separate option; both are in the Complete Book of Elves for 2nd Ed.  

I know how to code the actual selectable weapon style here:

// Add Bladesong
COPY_EXISTING ~stylbonu.2da~ ~override~
  APPEND stylbonu.2da ~BLADESINGING-0	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-1	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-2	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-3	0                0                0                0                0                0                0                0~

But what I do not know is how to limit this only to elves and how to have rank 2 and 3 of this style to grant abilities.  I have three bladesongs, which only one should be active at a time, that I want granted at rank 2, and more powerful versions replace them at rank 3 (yes, this style should take two proficiencies to get any benefit, granting nothing at rank 0 and 1).  I know you can use the appropriate clab****.2da to grant abilities for the actual kit, but I do not see anything for weapon style to grant abilities. 

Then I saw these Weapon Style Rebalance and Bardsong Switching mods.  Between the two, the READMEs suggest there is code restricting unarmed style to monks and grant disarm, loose balance, and trip abilities based on weapon style.  The Bardsong Switching mod also suggests a superior ability switching system to what I currently use in my fork of Eldritch Magic.  Between the two, everything I want to do seems possible.  However, I do not know Chinese and because any comments are written that language, reading the code is quite difficult.  For example, in Weapon Style Rebalance, you have "SAY NAME1 @22" written under SH#WTRIP.spl, and @22 is supposed be "Disarm" according to your game.tra file.  So something is off, but I am guessing comment in the code, 卸除武器, means something that might make it make sense.  Any help from the mod author or anyone would be appreciated.

Link to comment

Why is there a "%MOD_FOLDER%" variable in so many lines of the mods .tp2 code ?
Is it so unconfutable to write the actual mod folder name to the lines ? And perhaps you could rename the folder to be something else than "Shohy's_Weapon_Style_Rebalance" ... just things to consider.

Link to comment
28 minutes ago, Jarno Mikkola said:

Why is there a "%MOD_FOLDER%" variable in so many lines of the mods .tp2 code ?
Is it so unconfutable to write the actual mod folder name to the lines ?

It's because that's the only way to make it work if the mod is installed from a folder that's not the game's base directory. ALIEN's asked me to do it because it lets PI keep a single copy of the mod yet use it on multiple installs (IIRC). I think it's generally better practice too, because if for any reason the mod's folder name is changed, it still works, so no reason not to take the option that's more robust, and has no downsides.

Link to comment
Posted (edited)
8 hours ago, CrevsDaak said:

and has no downsides.

Alright, let's see if there's some we can dig up.
So we have a mod that has conflict with another, we check if it's installed to the game folder by identifying a mod file specifically for that mod, via predefined file-prefix. And for sake of insanity, we go an uninstall it, cause why not. We just command that via UNINSTALL ~modname~ modcomponent , and have that constructed so that it explodes and leaves no one alive, cause the mod that was uninstalled used the %MOD_FOLDER% -expression, cause it has a inherited value.
Reminder, that: weiduunisytalle.jpg

Edited by Jarno Mikkola
Link to comment

That's not how it works though, WeiDU isn't that feeble when it comes to defining the proper system variables for each mod when it handles it (TP2 name and all, are taken care even when you do stuff like that), not to mention that that's already a ridiculous example, so what's the point?.

Link to comment
On 6/1/2024 at 6:22 AM, MindTyrant said:

Not to highjack your thread, but I am looking for advice modding something analogous what is coded here.  You see I have permission to update Abdel Adrian's Eldritch Magic (BGEE/BG2EE/IWDEE) for EET and to be closer to pnp.  As a part of the update, I want to create a new weapon style called Bladesong that can be used by any elf.  While I am also going to update the Bladesinging kit itself, the weapon style is a separate option; both are in the Complete Book of Elves for 2nd Ed.  

I know how to code the actual selectable weapon style here:

// Add Bladesong
COPY_EXISTING ~stylbonu.2da~ ~override~
  APPEND stylbonu.2da ~BLADESINGING-0	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-1	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-2	0                0                0                0                0                0                0                0~
  APPEND stylbonu.2da ~BLADESINGING-3	0                0                0                0                0                0                0                0~

But what I do not know is how to limit this only to elves and how to have rank 2 and 3 of this style to grant abilities.  I have three bladesongs, which only one should be active at a time, that I want granted at rank 2, and more powerful versions replace them at rank 3 (yes, this style should take two proficiencies to get any benefit, granting nothing at rank 0 and 1).  I know you can use the appropriate clab****.2da to grant abilities for the actual kit, but I do not see anything for weapon style to grant abilities. 

Then I saw these Weapon Style Rebalance and Bardsong Switching mods.  Between the two, the READMEs suggest there is code restricting unarmed style to monks and grant disarm, loose balance, and trip abilities based on weapon style.  The Bardsong Switching mod also suggests a superior ability switching system to what I currently use in my fork of Eldritch Magic.  Between the two, everything I want to do seems possible.  However, I do not know Chinese and because any comments are written that language, reading the code is quite difficult.  For example, in Weapon Style Rebalance, you have "SAY NAME1 @22" written under SH#WTRIP.spl, and @22 is supposed be "Disarm" according to your game.tra file.  So something is off, but I am guessing comment in the code, 卸除武器, means something that might make it make sense.  Any help from the mod author or anyone would be appreciated.

I haven't tried to modify stylbonu.2da, so I don't know whether it's feasible to add entries to it. But it should not be possible to use 2da to limit weapon styles to work only on a certain race.
In my Weapon Style Rebalance MOD, an invisible bird casts spell each round, and # 326 is used in the spell to help checking class and weapon of each target.
As for the comments I wrote in TP2, they are too simple, and most of them are only for the installation process, which should not be helpful to you. It's better to open the spell files and see their contents after installation.

Link to comment

V 0.7
Added a mode switch button to the protagonist's skill bar to chooce modification modes.
Components 'Detailed ajustments for different weapons' and 'Similar benefits for allies and enemies' are merged into 'Rebalance for Weapon Styles'.

V 0.6
Fixed the problem that Cleave hurts allies.
Adjustment of Cleave's range.
Tried again to reduce waiting time before saving the game.
Increase the sprint speed of the character when casting Shield Bash.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...