Jump to content

Dexterity Modifier instead of Strength for light weapons Help.


libidoking

Recommended Posts

I would like to create a mod where all light weapons(short swords, daggers) use your Dexterity instead of strength to determine your attack modifier. Now, I thought this was possible through scripting, so i decided to edit the baldur.bcs file by writing a line of script into it, because I heard that it is the only script that runs all the time anywhere in the game. So I did, and not only did nothing happen I'm pretty sure I corrupted the whole file, because now the Summon familiar doesn't work properly anymore(you can summon it, but when you put it away you can no longer bring it back out, and if you try, it just disappears from your inventory.) So I'll just post the line I wrote, and if anyone can tell me whats wrong with it that would be great.

 

IF

CheckStatGT(Player1,15,Dex)

Global("Finesse_Bonus","GLOBAL",0)

THEN

RESPONSE #100

ApplySpellRES("DexBonus",Player1)

Global("Finesse_Bonus","GLOBAL",1)

END

 

Link to comment

Yeah you can install via Weidu with an APPEND command, I've used it once, if you want to look at an example check in Miscellaneous Mods, Scales of Balance, unzip it and look at the very end of /scales_of_balance/components/250_proficiency_overhaul.tpa

 

More broadly, my (very limited) understanding is that scripting is pretty flaky in BG, I try to use it as little as possible. Using it for something like physical attacks that happen multiple times per round seems like asking for trouble.

 

Unfortunately I've looked at every way to do what you want to do, and scripting is the *only* way to reasonably achieve it. The closest I came to making it work was turning light bladed weapons into missile weapons. I.e. make a copy of the returning dart, set range to 1, set the BAMs and attack animation to look like a short sword, and there you go, a sword with DEX thac0 bonus. But:

- How do you account for the hardcoded thac0/AC bonuses for someone wielding a missile weapon at close range? You could grant a corresponding bonus, but then there would be an outstanding bonus when *not* at close range... so maybe you'd need a further penalty to AC vs. missiles... but I think there would still be situations where things aren't right.

- How do you set your missile-weapon-short sword to get the style bonuses from single-weapon or sword-and-shield styles? I don't know if this can be done.

 

Long story short, I have a feature request in with the Beamdog folks to create an item opcode to let melee weapons use the DEX missile weapon thac0 bonus... without official support this seems not possible. If you want to continue with the scripting route, you should talk to @wolpak, he could do it.

Link to comment

Long story short, I have a feature request in with the Beamdog folks to create an item opcode to let melee weapons use the DEX missile weapon thac0 bonus... without official support this seems not possible. If you want to continue with the scripting route, you should talk to @wolpak, he could do it.

It's actually possible to do this with IWDEE engine functionality. You will have to have an equipped effect with opcode 272 that calls an external .eff with opcode 146 (both params=1). That external .spl called via opcodes 272->146 would then have several instances of opcode 326 (apply .spl based on conditions in SPLPROT.2da) that then have a series of spells that grant bonuses to THAC0/damage/whatever for a duration of 1. The reason for a duration of one is because these spells would be applied once every second via a carried instance of opcode 272 in the .itm.

 

I think the hardest part here is coming up with new entries in SPLPROT.2da to check for DEX=x and then having then patched during installation in a mod-friendly way.

Link to comment

Could be as simple as:

For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long.

DexBonus is 8 letters...

 

Case and length do not matter for it.

Link to comment

I hate replying on my phone and it disappears.

 

First, you need to SetGlobal in the response.

 

Second, you need to compensate for strength bonus, as a character with 18 str and 18 Dex will have double the damage than one with either 18 str or 18 Dex.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...