Contingencies and Sequencers Post v2.0 - How or Why?
kjeron
Member Posts: 2,368
Does anyone know how to use Opcode 234 (Create Contingency) or Opcode 257 (Create Spell Sequencer) in v.2.0 or later without hijacking one of the vanilla spell's parent resref's (SPWI420, SPWI617, SPWI710, SPWI809, or SPWI908)?
So far it appears to now be hard-coded to require one of these parent resources, otherwise the game crashes immediately upon activating the effect or completing the spell selection, depending on how its used.
Are we now limited to a maximum of 5 different Contingency/Sequencer spells?
Their related opcodes (232, 256, 258, & 260) all continue to work just fine, as they did pre-v.2.0.
So far it appears to now be hard-coded to require one of these parent resources, otherwise the game crashes immediately upon activating the effect or completing the spell selection, depending on how its used.
Are we now limited to a maximum of 5 different Contingency/Sequencer spells?
Their related opcodes (232, 256, 258, & 260) all continue to work just fine, as they did pre-v.2.0.
0
Comments
I found the issue, and as suspected, its the new UI.
Need to add a line: In UI.menu,here: And other Parent Resources will work.
please make a bug report for this.
I think it's a terrible place to put this functionality, but the fact that after extending the table to include my custom spell it works perfectly, it does appear intended.
I made a function to suit my needs, but current Weidu does not extract .MENU or .LUA files yet, so they have to be exported manually with NI first:
Most of the other tables that are hardcoded are stored in BGEE.lua (eg the portraits table). Therefore, I would suggest to raise it as an issue on redmine with the suggestion to move the table to BGEE.lua, if possible.
Then, a simple M_*.lua file can edit the table at the start of each game session, adding in the extra line items as needed (much like @Dee suggested with the portraits table).
I've done some testing with @kjeron regarding using a lua file on it's own, but it DOES need to be called from the UI.menu first (requiring a UI.menu edit). Having the table in BGEE.lua should eliminate this...
WEIDU can build lua files and edit them... the portrait picker mod that I wrote does it... Calling @Pecca to the thread...
If your not worried about translation strings, this is all you would need in each file(replace the variables):