Jump to content

Adding spell refresh as ability


Lesten

Recommended Posts

Hi! I'm thinking of doing more modding than usual for my next BG playthrough (1+2 enhanced edition), but my entire idea hinges on that I can add a specific ability to an item or as an innate ability.

 

So what I want to do is add an innate ability or an item with the following ability:

** Restore the entire party's spell slots and innate abilities... but NOT this ability itself or items with daily uses

... much like if you had rested (except I don't want items to recharge their uses), or that wild surge result that refreshes your spells.

 

The problem is, I don't know how to add that effect to an innate ability or an item, or if it's even possible. I was hoping someone here knew how and could help me out :)

 

Thanks

 

 

(PS. If possible I'd also like this ability to have secondary effects (but these are not as important):

* stun the entire party for 1 rounds (ignoring spell resistance and immunities)

* reduce AC of the entire party for 2 rounds

* make time progress 1 hour)

Link to comment

You know, I made a mod that adds a timer to all spells that restore a spell charge of the same level when the spell is casted with user defined delay.

Technically you can make a spell that applies the opcode effect 261 multiple times(say like 50) to each player char, and thus ensures that they all get it, but that's just the tip of the iceberg, as you want to progress the time by an hour, why not 8 and thus who cares that this cheat even exist... reduced AC is not a penalty... and 2 rounds... that's nothing if out of combat. And even the stun is not bad... considering that it usually takes more than 6 seconds to kill a PC, unless you are fighting excessive opponents like mindflayers ...

 

Innate abilities will be a lot harder than you think... but it can be (probably if correctly) done. But only in my mod... yourz nope, as it requires editing the spells themselves.

Link to comment

Yeah, I considered your mod but a delay refresh wasn't really what I was looking for so I thought I'd try to make my own thing :)

 

I was thinking of making the item usable like twice a day, so that you can take "short rests" and refresh your spells twice. I don't really allow my party to take actual rests more than like once every game day because I find it immersion-breaking (once I enter a dungeon I want to finish it without resting or going back to town), and that often makes spell-casters boring since I'll have dozens of combats each day. I also prepare spells based on what the characters know, so I usually don't allow my mages to prepare specific protection spells even if *I* know what enemies they'll face. (I tried just adding more spell slots but that became a bit over-powered instead.)

 

And the stun and AC penalty (which I obviously meant) is just there to make sure I can't try to "cheat" and use the ability during combat (but a longer stun would be annoying when out of combat since I don't want to wait around). But like I said, those effects aren't really needed and would just be there for immersion purposes, but I can probably role-play around it anyway. I also intend to lower the amount of spell slots per day and make a ton of other modifications to the game, but I asked about this particular issue because it was the one I didn't know how to do.

 

I'll look into the wondrous recall effect, it'll do if there are no other solutions. But doesn't it only effect spells up to a certain level and only priest spells?

Also, if I just want a refresh on everything (as if the party had taken a rest or gotten the "I feel refreshed" wild surge result) what effect would that be?

Link to comment

The wondrous recall uses the opcode 261 yes, but not to it's full effect, like my mod does, as you can set it to restore either a mage spell or a divine spell level; via the Parameter 2 in the .spl files feature blocks's offset 0x08, zero for mages/bards, and 1 for druids, clerics rangers and paladins.

You can set the maximum level of the restored spell by setting the feature blocks offset 0x04, aka Parameter 1, to be that level.

And you obviously would make the spell cast multiple of the same effects for both divine and arcane targets and make that affect the whole party.

 

... if I recall correctly. :devlook:

... yeah there was an edit to this already.

Link to comment

I think he only wants something usable 1x per day.

 

Easy enough to create an innate ability with the "magical rest" opcode... I don't think it restores items (but I could be wrong).

 

Problem is, I think the ability would restore itself... giving you infinite casting.

 

Best I can think of is to have the ability remove itself with opcode 172, and then grant itself again with opcode 171 on a delay of like 1200 seconds. But there might be issues if you die during that time...

Link to comment

So what I want to do is add an innate ability or an item with the following ability:

I think he only wants something usable 1x per day....

You know, you could just read the first post to be thorough. So S/he wants an item.

 

And no, if it's an innate ability, it won't restore itself as the 261 can't do a thing to the innate spells. Now if he wants innate spells to be restored too... that's not POSSIBLE via a spell or an item. Why, cause you can't relay on this system if the player sleeps and that's about as far as you'll be able to go with it. As removing the abilities will be easy via the opcode you mentioned, but restoring them... what if that never happens ? You just removed an ability from the player they should have. Yes, the EE games probably will be able to compensate that ... but that's not a good option either way.

Link to comment

Base Spell, Innate Ability, Flagged Non-Combat, Ignore Wild/Dead magic

Global Effect: Remove Spell(172): This Spell, target=self(1)

Global Effect: Give Innate Ability(171): This Spell, target=self(1)

Ability Effect: Cast Spell(146): SubSpell1, target=self(1)

Ability Effect: Sleep(39): Wake on Damage, timing=delay(4), duration=12, target=self(1)

Ability Effect: Use Eff File(177): duration=12, SubEff, target=self(1)

 

SubEff: Cast Spell On Condition(232): Caster, on hit, Subspell2

 

Subspell1, Innate

Ability Effect: Rest(316), target=self(1)

Ability Effect: Current HP Bonus(17): Remove Limited Effects(Param2=2), target=self(1)

Ability Effect: Protection from Spell(206), duration=1200(4hr), Basespell, target=self(1)

Ability Effect: Protection From Spell(319): target=everyone except self(8), Not Allies(50), This spell. - Could replace with ally-only projectile for nonEE.

Ability Effect: Slay(55): GENDER=SUMMONED, target=everyone except self(8)

Ability Effect: Slay(55): GENDER=SUMMONED_DEMON, target=everyone except self(8)

Ability Effect: Slay(55): GENDER=ILLUSIONARY, target=everyone except self(8)

 

Subspell2, Innate

EE : Ability Effect: Remove Effects by Resource(321): BaseSpell, target=self(1)

Non-EE: Ability Effect: Protection from Spell(206): Subspell1, duration=12, target=self(1)

 

Only usable outside of combat, puts the user to sleep for two rounds, after which, if they were not hit/damaged during that time, they are rested(spells, innates, and items), all temporary effects are removed(buffs/debuffs), all allied summons are destroyed, and they cannot use the ability again for 4 hours.

 

You can't split restoring innate abilities and daily items, its both or neither, unless you want to get exceedingly complicated and overhaul things.

Wild-surge refresh is hard-coded and also affects daily items.

Opcode 261 is horribly broken in the EE's - it fails if it tries to restore priest spells of your highest available spell level, for all but the shaman.

Link to comment

Opcode 261 is horribly broken in the EE's - it fails if it tries to restore priest spells of your highest available spell level, for all but the shaman.

Hows that ? As yeah, you apply MULTIPLE of them(opcode 261 effects) to restore multiple spells... so that's why you do it 50 times in a row in the same spell. Dah.

 

The opcode 316 is not what was requested... for example it restores the fatigue back to zero... which was not requested. And it restores also the use of the ability that was just casted. Duh. So you would just end up with a cheat button.

Link to comment

 

So what I want to do is add an innate ability or an item with the following ability:

I think he only wants something usable 1x per day....

You know, you could just read the first post to be thorough. So S/he wants an item.

 

And no, if it's an innate ability, it won't restore itself as the 261 can't do a thing to the innate spells. Now if he wants innate spells to be restored too... that's not POSSIBLE via a spell or an item.

Yes, it is. But it would infinitely refresh itself (which the poster says he doesn't want)... unless you use kjeron's witchery up there. :)

Link to comment

 

Opcode 261 is horribly broken in the EE's - it fails if it tries to restore priest spells of your highest available spell level, for all but the shaman.

Hows that ? As yeah, you apply MULTIPLE of them(opcode 261 effects) to restore multiple spells... so that's why you do it 50 times in a row in the same spell. Dah.

 

The opcode 316 is not what was requested... for example it restores the fatigue back to zero... which was not requested. And it restores also the use of the ability that was just casted. Duh. So you would just end up with a cheat button.

 

Doesn't matter how many you apply if the effect is bugged and does not work properly.

 

The ability is restored, but your also immune to it for 4 hrs(or however long you prefer), so you can decide how often it may be used.

You can circumvent the fatigue loss in the EE's if really necessary, but it was neither requested to occur or to be avoided.

Link to comment

Yes, it is. But it would infinitely refresh itself (which the poster says he doesn't want)... unless you use kjeron's witchery up there. :)

How would it refresh itself WHEN it's casted, if you use the opcode 261 ? Here's a little hint: One effect only applies itself to the highest arcane MEMORIZED spell slot in the mages spellbook, if you use the Parameter 1 as zero. If the Parameter 1 is one, then it's the highest MEMORIZED divine spell. Assuming already used spell is MEMORIZED. If there is not in that level it tries to restore a lower level one, and if there's none. NO SPELL is restored. The Parameter 1 value 2, 3, 4 nor 5 work.

 

Doesn't matter how many you apply if the effect is bugged and does not work properly.

You seem not to have been able to get the effect work... as you suppose it works. TRY AGAIN. With the info above.

Seems like I have to make an item that uses the effect... it will only restore a few spells(5 per kind)... but if you want to extend the amount of the effects(7*12 divine and 9*12 arcane), then go right ahead.. this item just slightly modified wand of fear, and so it should work the exact same like, except to caster and the party next to the caster as the range is set at 60. Cheat it in by CLUAConsoling it in, using the item name "ij#wand".

IJ#WAND.zip

 

This does not feature the casting time nor stun effects... but if you like them, then I can try to add such features separately.

Link to comment

I guess I should have been more specific in my original post.

 

I like the secondary effects you added in your example, kjeron. I'll try to implement them if I can figure out how :) As for the main effect of refreshing spells it wouldn't really work since it would be refreshing itself and also remove fatigue.

 

I'll try the wand you made, Jarno. Thanks :)

Link to comment

 

 

Opcode 261 is horribly broken in the EE's - it fails if it tries to restore priest spells of your highest available spell level, for all but the shaman.

Hows that ? As yeah, you apply MULTIPLE of them(opcode 261 effects) to restore multiple spells... so that's why you do it 50 times in a row in the same spell. Dah.

 

The opcode 316 is not what was requested... for example it restores the fatigue back to zero... which was not requested. And it restores also the use of the ability that was just casted. Duh. So you would just end up with a cheat button.

 

Doesn't matter how many you apply if the effect is bugged and does not work properly.

 

The ability is restored, but your also immune to it for 4 hrs(or however long you prefer), so you can decide how often it may be used.

You can circumvent the fatigue loss in the EE's if really necessary, but it was neither requested to occur or to be avoided.

 

 

How opcode 261 is broken?

Link to comment

Archived

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

×
×
  • Create New...