Jump to content

Enhanced Powergaming Scripts


Guest morpheus562

Recommended Posts

55 minutes ago, morpheus562 said:

Scripts don't have a good means to track when a player clicks those buttons versus when the computer does it.

And there are some things that can be done by clicking those buttons that can't be done with scripts - notably, attacking and detecting (Detect Traps/Illusions) at the same time (You click attack, and then you click detect). The closest a script can come on that one is a complicated scheme involving spells that fake the detection.

What I'm saying? There are limits to what any script can do to automate player character actions. Perfection is impossible. Compromises must be made.

Link to comment

I installed Near Infinity and found out how to customize your script. 

It's really well done and has a great structure to adjust something for personal preference. Personally I only want to use pre buffing and the defensive spells option. 

Regarding your two casting speed setups. You could consider a third option. I currently use the cd tweaks option that grants +100% walking speed and improved alacrity outside of combat and then installed your normal casting speed. For me this is the perfect compromise between cheating and quality of life. 

Link to comment

@morpheus562 Hey morpheus, this is excellent stuff, really great.

I wonder if you could make Holy Power take into account the priest level, and if level 9 and higher, be cast even if current str is higher than 18/00?

at level 9 to 11, Righteous magic and DuHM will add 3 str each, which means 18/00+6 = 24.

add thac0 from figther table and 9 to 11 extra hp from Holy Power. The result, as compared to only Righteous magic and DuHM is 11 extra hp, 1 better thac0 and 2 less damage. Which in my book is a good tradeoff, loosing only 2 damage, for 11 hp extra and 1 better thac0.

AND, from level 12 and onwards Righteous magic and DuHM will add 4 str each, which means 18/00+8 = 26 (25), completely nullyfing the drawback of Holy Power lowering your strenght to 18/00.

 

Maybe the script could check "if player strenght is higher than 18/00 don't cast it unless player level is 9 or higher and both Righteous Magic and DuHM are available, cast it"?

 

Cheers,

 

Link to comment
12 hours ago, morpheus562 said:

That's a horrible tradeoff and can cost 20dpr. Clerics gain good thac0, so they are not going to be needing more, and 11hp gain is negligible. There are better 4th level spells to choose from than Holy Power.

I can do an or(3) check if either righteous magic or duhm is available, but either way you cut it, there are going to be better spells to choose from at that level.

But each hit will be 5% higher chance to hit. i can see that loosing say 2 damage from a 20 damage hit equals a 10% loss in raw damage. But damage is not everything. I'd gladly trade 10% less damage, for 5% higher chance to hit (which nets to 5% less damage), AND 5% higher chance to apply my weapon effects.

"Clerics gain good thac0" it doesn't compare to warrior's, at lvls 10ish the difference is 4 thac0 (20% less chance to hit), at lvl 20 and up its 6 (30% less chance to hit!). 

Anyways, beyond the phylosophical discussion on the 9 to 11 range, from 12 and onwards there's nothing to loose and everything to gain, especially at higher levels, giving your cleric a warrior's thac0 (extra +30% to hit at lvl 20), extra 20hp (about 15% extra hp) with no drawback thanks to RM or DUHM is a no brainer.

 

Hopefully you'll reconsider! if not, we'll keep on casting it manually before buffing. Thanks,

Link to comment

Hello, i'm having the problem with spell rev (4.19rc4) where my sorc is spamming mage armor. @morpheus562 i'm gessing that if i want to keep spell rev i have to make a small modification in your script. Would it be possible for you to guide me in this modification?

 

Edit 

My install is with BWS (it's maintained for FR) 

I found mocore.baf in Steam/common/BG2EE/enhanced-powergaming-script/baf/normal and opened it with Near Infinity, but all reference to mage armor seem to be related to 5e spellcasting. It's checking spell state MAGE_ARMOR 

In SPWI102.SPL it says that the spell applies State : MAGE_ARMOR spell state 328 and modify script state 282

 

Edit2

So i kept digging and there is a SPWI102u.SPL inside the overwrite folder, i think it's the one from SpellRev from my understanding it overwrite the SPWI102 and give innate ability 171

Effect type 171 directly apply the spell specified by the ressource key wich is SPWI102.SPL. So the problem is the spell is not cast? but directly applied?

 

Edited by Exal
Link to comment
14 minutes ago, morpheus562 said:

baf\normal\sr is the base path for the SR scripts, and lib\bg2ee has sr_prebuff_5e.tpa file which further modifies the script to account for the changes with 5e spellcasting being introduced. Components/bg2ee has main_component.tpa which will further modify the script file and maps the 5e version of the spell to its correct spell name as they are dynamically generated.

You can look at bddefai.bcs to see the exact spell being cast from 5e and then working down the rabbit hole to see which spell should be applying the MAGE_ARMOR spellstate.

 

Ok bad explanation on my part i only have Spell Rev that modify spells, no 5e casting. But am gessing that sr_ stands for Spell Rev in your files

Thanks for the replay, so much more complicated than i though :)

 

Link to comment
12 minutes ago, morpheus562 said:

Yes, I use sr to another spell Revisions files within my file structure.

 

I think i need to switch to SR Revised or let go of spell rev. It also mean that i need to switch to Item Revision revised if i want full compatibility. Problem is that they are not translated so it makes the install with BWS_FR dicey :) I did not see in the compatibility section that it was the revised version ^^

 

Link to comment

@morpheus562 i decided to go down the rabbit hole :) with some help on the french side of things. Here are my findings !

Edit : note that my character is spamming mage armor without having to tell him to prebuff, don't know if it's important

 

Script bloc that is spamming Mage Armor

IF
    OR(2)
        ActionListEmpty()
        EEex_LuaTrigger("return AmAttacking()")
    Global("BDAI_DISABLE_DEFENSIVE","LOCALS",0)
    OR(2)
        !GlobalTimerNotExpired("MO_SpellCastTimer","LOCALS")
        CheckStatGT(Myself,0,AURACLEANSING)
    !GlobalTimerNotExpired("MO_ItemUsedTimer","LOCALS")
    OR(2)
        !StateCheck(Myself,STATE_INVISIBLE)
        !Global("BDAI_SKILL_MODE","LOCALS",2)
    !See([EVILCUTOFF])
    !EEex_LuaTrigger("return AmMoving()")
    HaveSpell(WIZARD_ARMOR)  // SPWI102.SPL (Armure de Mage)
    !CheckSpellState(Myself,MAGE_ARMOR)
    CheckStatLT(Myself,20,SPELLFAILUREMAGE)
    !CheckStatGT(Myself,0,CLERIC_INSECT_PLAGUE)
    !StateCheck(Myself,STATE_POISONED)
    !StateCheck(Myself,STATE_SILENCED)
    Global("MO_CastAthkatla","LOCALS",1)
    !CheckSpellState(Myself,WILD_MAGIC_AREA)
    !CheckSpellState(Myself,DEAD_MAGIC_AREA)
THEN
    RESPONSE #100
        DisplayStringHead(Myself,321164)  // Running block 199 of BDDEFAI.BCS
        SetGlobal("MO_SpellCast","LOCALS",1)
        SetGlobalTimer("MO_SpellCastTimer","LOCALS",ONE_ROUND)
        SetInterrupt(FALSE)
        Spell(Myself,WIZARD_ARMOR)  // SPWI102.SPL (Armure de Mage)
        SetInterrupt(TRUE)
END

 

Effect applied by spwi102.spl

Effect 0: Type: Apply effects list (326),Target: Preset target (2),Power: 0,Unused: 0,Creature type: STAT SPELLPEN = 1 (225),Timing mode: Instant/Permanent until death - 1,Dispel/Resistance: Natural/Nonmagical (0),Duration: 0,Probability 1: 100,Probability 2: 0,Reso
Effect 1: Type: Apply effects list (326),Target: Preset target (2),Power: 0,Unused: 0,Creature type: STAT SPELLPEN = 2 (226),Timing mode: Instant/Permanent until death - 1,Dispel/Resistance: Natural/Nonmagical (0),Duration: 0,Probability 1: 100,Probability 2: 0,Reso
Effect 2: Type: Remove effects by resource (321),Target: Self (1),Power: 0,Unused: 0,Type: Default (0),Timing mode: Instant/Permanent until death - 1,Dispel/Resistance: Natural/Nonmagical (0),Duration: 0,Probability 1: 100,Probability 2: 0,Resource: SPWI102.SPL (Arm
Effect 3: Type: AC bonus (0),Target: Self (1),Power: 1,AC value: 5,Bonus to: ( Set base AC to value(4) ),Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Unused: 00 00 00 00 00 00 00 
Effect 4: Type: Set spell state (328),Target: Self (1),Power: 1,Unused: 3,State: MAGE_ARMOR - 260,Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Unused: 00 00 00 00 00 00 00 00 h,# 
Effect 5: Type: Modify script state (282),Target: Self (1),Power: 1,Value: 3,State: Scripting State 5 / Defensive Modifier (4),Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Unused:
Effect 6: Type: Display portrait icon (142),Target: Self (1),Power: 1,Unused: 0,Icon: Armure magique (12),Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Unused: 00 00 00 00 00 00 00
Effect 7: Type: Play sound (174),Target: Self (1),Power: 1,Unused: 0,Unused: 0,Timing mode: Delay/Permanent - 4,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Resource: D5EFF02.WAV,# dice thrown/maximum level: 0,Di
Effect 8: Type: Play visual effect (215),Target: Self (1),Power: 1,Unused: 0,Play where?: Over target (attached) (1),Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 3,Probability 1: 100,Probability 2: 0,Resource: ICARMOR.VV
Effect 9: Type: Protection from spell (206),Target: Self (1),Power: 1,String: <NO TEXT>,Unused: 0,Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Resource: SPWI317.SPL (Armure Fantom
Effect 10: Type: Protection from spell (206),Target: Self (1),Power: 1,String: <NO TEXT>,Unused: 0,Timing mode: Instant/Limited - 0,Dispel/Resistance: Dispel/Bypass resistance (3),Duration: 2400,Probability 1: 100,Probability 2: 0,Resource: SPWI414.SPL (Armure Spirit

My understanding is not the best but, since it applies MAGE_ARMOR at effect 4 it should not cause problem no?

 

And last, is the effect applied on the save on the screenshot.

Is there anything easy that you see from those info? (spwi102 is only affected by SR, i did a changelog)

 

Capture_d'écran_091723_110624_AM.jpg

Edited by Exal
Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...