derpnik wrote: ↑Mon Aug 07, 2023 8:27 pm
Is it possible to permanently add damage/boosts to a weapon?
I've tried using the "Boost Equipped Weapon" script under Testing Stuff>Miscellaneous, but it appears to revert on load.
Changing "AddBoosts" to "RemoveBoosts" also doesn't appear to add a boost that's on a weapon, is there any way to do that?
Boosts are tied to your character I believe.
Here is an example of a script that will apply +999 all magic damage types, plus add 25 to your initiative and 999 to your attack roll so you should almost always hit your target.
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
local boosts = "CharacterWeaponDamage(999,Poison);Initiative(25);RollBonus(Attack,999);CharacterWeaponDamage(999,Acid);CharacterWeaponDamage(999,Thunder);CharacterWeaponDamage(999,Fire);CharacterWeaponDamage(999,Cold)"
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
PrepareCall("AddBoosts")
writePointer(cmdArgs + 0x18, cmdStr1)
writeString(cmdStr1, boosts)
writeBytes(cmdStr1 + #boosts, 0)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 0)
executeCodeEx(0, nil, cmdCall)
{$asm}
[DISABLE]
{$lua}
if syntaxcheck then return end
local boosts = "CharacterWeaponDamage(999,Poison);Initiative(25);RollBonus(Attack,999);CharacterWeaponDamage(999,Acid);CharacterWeaponDamage(999,Thunder);CharacterWeaponDamage(999,Fire);CharacterWeaponDamage(999,Cold)"
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
PrepareCall("RemoveBoosts")
writePointer(cmdArgs + 0x18, cmdStr1)
writeString(cmdStr1, boosts)
writeBytes(cmdStr1 + #boosts, 0)
writeQword(cmdArgs + 0x28, 0)
writeQword(cmdArgs + 0x38, 0)
executeCodeEx(0, nil, cmdCall)
{$asm}
From what i've tested, saving with this effect on and reloading the save will remove the boosts.