Moonboy187 Posted February 2, 2023 Share Posted February 2, 2023 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. Quote Link to comment
jmerry Posted February 2, 2023 Share Posted February 2, 2023 It certainly can be done, so you're missing something. What does your attempt look like? Quote Link to comment
Moonboy187 Posted February 2, 2023 Author Share Posted February 2, 2023 I have created a copy of the spell, added it into Spell.ids, changed the spell type to "Innate", the ability location to "Ability" and left it at that. This was the same way I had done for other spells, e.g. StoneSkin, Lightning Bolt - and they are all worked fine. Quote Link to comment
subtledoctor Posted February 2, 2023 Share Posted February 2, 2023 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. Quote Link to comment
jmerry Posted February 2, 2023 Share Posted February 2, 2023 (edited) 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 February 2, 2023 by jmerry Quote Link to comment
subtledoctor Posted February 2, 2023 Share Posted February 2, 2023 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. Quote Link to comment
Moonboy187 Posted February 3, 2023 Author Share Posted February 3, 2023 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? Quote Link to comment
subtledoctor Posted February 3, 2023 Share Posted February 3, 2023 24 minutes ago, Moonboy187 said: Why does the game crash with only these spell types though? Does it happen with other spells as well? Most other spells just cast spells. Sequencers and Contingencies use the UI for their basic function. Quote Link to comment
jmerry Posted February 3, 2023 Share Posted February 3, 2023 (edited) 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 February 3, 2023 by jmerry Quote Link to comment
Recommended Posts
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.