Jump to content

Innate Chain Contingency is crashing game?


Recommended Posts

Hi,

I was wanting to make a variant of Chain Contingency which acts like an Innate ability, however whenever I cast the spell the game crashes every time. I have added the spell in the SPELL.IDS just in case, but even then it still causes a crash. Is there a way around it or is there something I am missing?

Thank you.

Link to comment

I turned Contingencies into innate abilities in Tome & Blood, and in a different component I gave Diviners the ability to innately cast Contingency right from level 1. And I have made a mage robe that allows casting Contingency as an item ability.

However, those all use opcode 146 to cast the original resource, SPWI617. If you want to make a different Contingency spell, it is more involved; since the EE 2.0 update, any new such spells need to do some work in the UI to function without crashing. Maybe, probably, so that the contingency can be reported in the "Contingencies" screen within the spellbook. I think?

More info here - though, be warned, that thread is from the introduction of the 2.0 patch; the particulars of the needed UI.menu edits might have changed slightly with the 2.5 or 2.6 patch.

Link to comment

For the record, the SCS component edits the contingency/trigger spells in place. Contingency cares about caster level, so it gets an innate wrapper to cast the original mage spell.

As for the UI bits ... definitely changed since 2.0. It's in BGEE.LUA now; here are lines 185-191 in the unmodified BG2EE 2.6 version of that file:

mageBookStrings = {
	SPWI908 = {tip = 55373, title = 'CHAIN_CONTINGENCY_TITLE', action = "ADD_SPELLS_CONTINGENCY_LABEL"},
	SPWI617 = {tip = 55373, title = 'CONTINGENCY_TITLE', action = "ADD_SPELLS_CONTINGENCY_LABEL"},
	SPWI809 = {tip = 55372, title = 'SPELL_TRIGGER_TITLE', action = "ADD_SPELLS_TRIGGER_LABEL"},
	SPWI710 = {tip = 60420, title = 'SPELL_SEQUENCER_TITLE', action = "ADD_SPELLS_SEQUENCER_LABEL"},
	SPWI420 = {tip = 60420, title = 'MINOR_SEQUENCER_TITLE', action = "ADD_SPELLS_SEQUENCER_LABEL"},
	}

That's presumably where you need to add any new resources that use the sequencer/contingency interface elements. 2.5 also has them in BGEE.LUA, and I don't have any older versions of the game around to check exactly when the shift was done.

Edited by jmerry
Link to comment
7 hours ago, jmerry said:

As for the UI bits ... definitely changed since 2.0. It's in BGEE.LUA now; here are lines 185-191 in the unmodified BG2EE 2.6 version of that file:

Oh interesting. From reading the linked post, it seems this change may have been made by Beamdog in response. And presumably now you can just add what you need to in M_x.lua files rather than trying to patch bgee.lua. 

Link to comment
21 hours ago, subtledoctor said:

IHowever, those all use opcode 146 to cast the original resource, SPWI617. If you want to make a different Contingency spell, it is more involved; since the EE 2.0 update, any new such spells need to do some work in the UI to function without crashing. Maybe, probably, so that the contingency can be reported in the "Contingencies" screen within the spellbook. I think?

.

Very interesting, I am assuming this will also apply to the Sequencer spells too. Why does the game crash with only these spell types though? Does it happen with other spells as well?

Link to comment

Specifically, anything that uses opcodes 234 (contingencies) or 257 (sequencers) needs that. The IESDP even says the following for op257:

Important: As of v2.3, an entry for the "Parent Resource" or "Activation Key" must be added to the mageBookStrings{} lua table, or the game will crash upon use.

And ... it really should say that for the other one. New report over in that forum, I suppose.

Scratch that. Opcode 234 has that warning too. I don't know how I missed it at first.

Edited by jmerry
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...