[(BG1\2)] Opcodes 146, 148 and 177 when used on/by containers
Galactygon
Member, Developer Posts: 412
CURRENT BEHAVIOR (BG1,2):
Opcode 146 works on containers but setting param2 "Type" to 1 does not. The .spl is cast normally (as if param2=0) rather than applied (when param2=1) silently. Download attachment SPWI207 (Knock) and then cast it on any container to reproduce.
Opcode 148 does not work with containers. Opcode 148 can be useful if you have many .spls embedded/cast by one spell. Download attachment SPWI011, CLUA yourself to AR3016 (BGII: ToB), and open the trapped containers at x=1145 y=860 or x=1365 y=860 to reproduce.
[See SPWI011 and SPWI207 attachments in the second post]
Opcode 177 crashes the game if used by a container (such as a trap) to summon a creature for example. I made this report more than a year ago in the ToBEx forums:
http://www.shsforums.net/topic/47510-withheld-cast-spell-at-creature-opcode-mod/page__view__findpost__p__508854
This can be reproduced in BGII:ToB by downloading SPWI810.spl (Incendiary Cloud) from the attachment in the above linked post, and then CLUA-ing yourself to AR6012 (BGII:ToB) to open the trapped bookcase.
Opcode 146 works on containers but setting param2 "Type" to 1 does not. The .spl is cast normally (as if param2=0) rather than applied (when param2=1) silently. Download attachment SPWI207 (Knock) and then cast it on any container to reproduce.
Opcode 148 does not work with containers. Opcode 148 can be useful if you have many .spls embedded/cast by one spell. Download attachment SPWI011, CLUA yourself to AR3016 (BGII: ToB), and open the trapped containers at x=1145 y=860 or x=1365 y=860 to reproduce.
[See SPWI011 and SPWI207 attachments in the second post]
Opcode 177 crashes the game if used by a container (such as a trap) to summon a creature for example. I made this report more than a year ago in the ToBEx forums:
http://www.shsforums.net/topic/47510-withheld-cast-spell-at-creature-opcode-mod/page__view__findpost__p__508854
This can be reproduced in BGII:ToB by downloading SPWI810.spl (Incendiary Cloud) from the attachment in the above linked post, and then CLUA-ing yourself to AR6012 (BGII:ToB) to open the trapped bookcase.
Post edited by Tanthalas on
1
Comments
Opcode 146 param2=1 should work as intended, you should be able to launch a fireball onto the container/door of your choosing without disrupting any subsequent actions
Opcode 148 should work, the two trapped containers in AR3016 should launch a fireball and a flame arrow to the trap triggerer.
Opcode 177 should not crash the game, the marilith should be summoned normally.
[Still can't post long posts]
-Galactygon
This can be a problem in BG2, especially ToB where traps use the same version spell as cast by the PCs. There are plenty of unused bytes in the container header of the .are file format, so it's possible to set one short to determine the casting level of the priest/wizard/innate .spl.
-Galactygon
I think I have 177 working. There may be some files missing for the DEMOSUMM effect, but SUMDJINN works fine.
146, 148: Yes, they should work if 146 is cast onto a door (even if nested in a 177 that calls for an EA of INANIMATE), and 148 should work if it's cast by the trap (note: 148 almost always uses target=self). In other words, the trap should be able to cast the 148 just like a normal .cre.
177 is not working (tested in BGII:ToB) due to a memory leak which is fixed by ToBEx. I'll drop @Ascension64's name, since he knows about this more than I do.
-Galactygon
177: Reported in TobEx bugs as A64_16.
O: Effect #177 “Use EFF File” causes a crash when used in a trap script for containers/doors because of double delete
E: Effect #177 “Use EFF File” does not cause a crash when used in a trap script for containers/doors
Sounds like 177 got fixed anyhoo.
At least, definitely killed one bug.
Potentially fixed - The behaviours have been extended onto doors and traps.
Is Opcode 177 handled by ToBEX16 then? I'll probably cross-list this one to keep filling out the ToBEx numbers... if I can figure out how to test any of the three Opcodes...
Doesnt look like it. I started to last night- downloaded the files mentioned- but I'm not sure yet how to test it in-game both in vBG1 and BGEE to see if it crashes the former and works in the latter
Modified ACT11.BCS to: Got SPWI810.SPL from http://www.shsforums.net/topic/47510-withheld-cast-spell-at-creature-opcode-mod/page__view__findpost__p__508854.
Modified DEMOSUM1.EFF to summon Ajantis instead of Marilith.
Started new game, went into Candlekeep Inn, lock bashed the drawers, and then opened.
Viola, a very very violent Ajantis!
Haven't tested the other two opcodes.
As a side note, because all the BIOWARE_ASSERTs have been removed, an invalid CRE animId now just crashes the game without any message.
-OPCODE177:
Sought out the original source in vBG2's AR6012 mentioned by @Galactygon in the outside link mentioned in the OP, created a BGEE trap BCS using the same script from AR6012's trap- i.e.: Then placed the spell SPWI810 from the outside link to Overrides, trapped the bookcase in Withrop's Inn and added the new BCS to it, went in-game and opened the bookcase... Crashed game. It did start to make a fire animation though, showed the "Trap Sprung" display string, and the noblefolks started running for the door. Maybe that spell won't work in BGEE for some reason? Missing resources?
All that said, I don't see where OPCODE177 ever shows up in the preparation for that test, so...
-OPCODE146
Created a scroll that casts SPWI207(Knock), downloaded the attached SPWI207 and put it in Overrides. Went in-game, clicked to use the spell... Fireball exploded on caster... ??? No crash... :-)
-OPCODE148
Looked for one of the containers in AR3016 mentioned in the OP, found one at 1347,885 (Container 4, "Table2") that was trapped. Copied the trap BCS and created it for BGEE: Added it to the locked chest in WIthrop's inn. Went in-game and... Success: exploding arrow shot in from... somewhere. Boom-o. Again no crash.
No idea if any of that is an improvment... Or a valid test...
Now that I think about it, from reading Ascension64's post you're probably getting a crash because Marilith's aren't present in BGEE. You could probably try getting it from BG2 and dropping it in the override.
Though, it looks like Ascension already confirmed that one to be working anyway.