Jump to content

I want to make a tweaked version of SCS Smarter Mages


nakedDave

Recommended Posts

Hi! I've been curious about adjusting SCS to better suit my tastes for some time. I've read through enough of the code to have an idea of how things work, along with the (now-ancient) guide to SSL here http://forums.gibberlings3.net/index.php?showtopic=13725

 

I've never touched IE modding however, so I wanted to run my ideas past DavidW, or anyone else who knows more about how SCS works?

 

Quick summary of what I'm trying to achieve: I love that SCS plays smart, and 'optimally', where possible within the constraints of the game. But I don't enjoy having to deal with long pages of layered buffs, or Spell Immunity, since I'll never use them myself and it adds a lot of busywork to fights which I am insufficiently hardcore for :)

From forum debates I've read around prebuffing, this is not a new opinion, but it's at odds with what most people want, so it's not likely to change. Hence making my own alterations!

 

------------

 

I'd like to try to remove or substitute SI:Div wherever it appears, which seems to only be in triggers/contingencies. Any disastrous consequences to be aware of if I drop all the

ReallyForceSpell(Myself,WIZARD_SPELL_IMMUNITY_DIVINATION)
lines from the .ssl files in the prepblocks directory? I think I should be able to replace that with any valid spell name- I don't need to worry whether the mage actually knows the spell, since SCS doesn't seem to check that either from what I've seen.
I'd also have to change a bunch of entries in renew.ssl, like
Action(TriggerMyself,0,WIZARD_IMPROVED_INVISIBILITY,WIZARD_SPELL_IMMUNITY_DIVINATION,WIZARD_SPELL_SHIELD|100|100)

to remove SI. Bonus question here - what do the |100|100 represent? The action definition for triggerMyself doesn't seem to include any more arguments after the spell names. I'm hoping they're probabilities, but couldn't find any documentation for this.

 

I'd also like to introduce a bit of randomness to other prebuffs, so all mages won't necessarily have all resistances set up. Options I've seen for changing this are

 

in defensive_spells_mage.tph,

PATCH_MATCH RANDOM (1 2) WITH
              1 BEGIN PUSH spells PROTECTION_FROM_FIRE END
              2 BEGIN PUSH spells PROTECTION_FROM_COLD END
              DEFAULT END

I can change that to eg RANDOM (1 4) so we skip the spell half the time. Is that going to have the desired effect of some mages not casting those spells, or will there be issues with them having fewer spells than expected? Alternatively, I considered editing bits of eg longprep_core.ssl where the spells are actually cast -

THEN
RESPONSE #100
        RemoveSpell(WIZARD_PROTECTION_FROM_FIRE)
ApplySpellRES("%WIZARD_PROTECTION_FROM_FIRE_PREBUFF%",Myself)
Continue()
END

would changing this to RESPONSE #50 do what I want more neatly?

 

OR, even, changing the action definition for SpellPrecast to replace RESPONSE #scsprob1 with a number less than 100 so we miss out an a few random buffs each time?

 

 

There's a few other things I mean to do, like let enemy mages very occasionally try casting spells at PCs, even if they might be protected. SCS' behaviour tends to mean that mages don't ever try spells that might not get through, so your lovely protections never get tested. Again, not combat optimal, but more entertaining for me!

 

Thanks to anyone who read all that. I'm going to just have a bash and see what happens, but in the meantime any pointers would be great!

 

 

 

 

Link to comment

Any disastrous consequences to be aware of if I drop all the

ReallyForceSpell(Myself,WIZARD_SPELL_IMMUNITY_DIVINATION)

lines from the .ssl files in the prepblocks directory?

Not really.

 

I'd also have to change a bunch of entries in renew.ssl, like
Action(TriggerMyself,0,WIZARD_IMPROVED_INVISIBILITY,WIZARD_SPELL_IMMUNITY_DIVINATION,WIZARD_SPELL_SHIELD|100|100)

to remove SI. Bonus question here - what do the |100|100 represent? The action definition for triggerMyself doesn't seem to include any more arguments after the spell names. I'm hoping they're probabilities, but couldn't find any documentation for this.

 

 

It translates into

THEN
  RESPONSE #100
    // run the action block
  RESPONSE #100
    Continue()
END

I.e. the spells will be cast 100 / (100+100) = 0.5 of the time.

 

I can change that to eg RANDOM (1 4) so we skip the spell half the time. Is that going to have the desired effect of some mages not casting those spells, or will there be issues with them having fewer spells than expected?

 

From memory, first go the hand-picked defensive spells, then the rest of the slots are randomly filled from pre-defined lists of offensive spells. If you skip some spells in defensive setup, there'll be more space left for other spells to memorize.

 

would changing this to RESPONSE #50 do what I want more neatly?

 

Those are weights, not percentage value. If you want to halve the probability of executing that block, you'll need

THEN
RESPONSE #100
        RemoveSpell(WIZARD_PROTECTION_FROM_FIRE)
ApplySpellRES("%WIZARD_PROTECTION_FROM_FIRE_PREBUFF%",Myself)
Continue()
RESPONSE #100
Continue()
END

Or 50+50, or 200+200, you get the idea.

Link to comment

Thanks a lot!

 

When testing this stuff, should I be ok if I use the following process?

 

uninstall all SCS components (it's the last mod in my install order)

apply modifications to the SCS scripts

reinstall SCS components

start a new game to test with

 

Just want to avoid any conflicts or cached scripts in savegames...

Link to comment

Archived

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

×
×
  • Create New...