Jump to content
Sign in to follow this  
CamDawg

Random stuff gathered from elsewhere

Recommended Posts

Rather than spam the board with a new thread, some recent issues to consider or ignore:

- Salamanders really are unkillable (IIRC, this used to work fine in SoA), because they all have RING95 now (God only knows why; that ring is usually reserved for undead), which, among other things, gives them immunity to slay. I just add a RemoveItem EFF (a la CFTROLL), but it requires two hits to kill them (one to destroy the item, the second to slay). A KillTarget EFF would probably work better.

- The asylum crush trap really does kill people it isn't supposed to (usually mages). My final conclusion was that the LastTrigger check is picking up something other than the last object that triggered the trap (LastTrigger is set by a number of triggers; I think they're the SVTRIOBJ triggers, but they don't all work with LastTrigger very well). Simply removing the two extraneous blocks fixes this (I've never seen the trap fail, so they aren't doing anything worthwhile). Which leads to the recommendation of never using LastTrigger outside of a block that sets LastTrigger.

- AMUL23 and AMUL24 have separate, unused graphics. They don't look too shitty in-game (some of the unused ones, like HAMM05, are intolerable).

- All of the short bow +1 graphics were wrong (I neglected to update the description image to CBOW06).

- InMyArea() only wants specific object references (things like InMyArea([PC]) don't seem to really work). I think this affects all of one script in the game. EDIT: this is not true. The problem was that Random*() actions are persistent, so any ActionListEmpty() triggers will fail if a creature is RandomWalking/Turning.

- MoveToObject() only seems to work with specific object references where the object in question isn't framed prior to the action (so, something like See([PC]) ... MoveToObject([PC]) works fine, but !Range([PC],20) ... MoveToObject([PC]) does nothing). A couple scripts may be affected by this (BioWare seems to have been pretty careful here).

- If you change the class of summoned creatures (so they cast spells at the appropriate level, instead of at level 1), make sure to update their weapons (so they have appropriate icons and don't show up as "Skull" in the toolbar). It's also a good idea to fill out their weapon slots so they can't be disarmed (although it can be amusing to see a Deva whack on some bad guy with it's fists).

- HARP_V6 has the wrong number of tracks listed (it's 5, but should be 6). I think the last track is just SPC1, so it won't make much difference. BioWare's dedication to the aural experience continues to amaze...

- For the Glaicas fix, make sure to ActionOverride("kpglai01",ApplySpell()), just to be safe. Directly casting a spell from an area object tends not to work (just about everything in that block needs to be ActionOverride()d, IIRC).

- One of the triggers in AR1301 checks for LOCALS, causing it to fail immediately (triggers don't get, and can't check LOCALS). IIRC, the last sentence in the DisplayString makes no sense at all. I'm sure SimDing0 can come up with something.

- The Wand of the Heavens tries to use both the old and new Flame Strike animations (the new is done with two Play3DEffect effects, whereas the old is hard-coded projectile 67); the projectile should be set to 1 (or 0 or some other invalid number). It may be worth changing this for Dace's Flame Strike (you only need to worry about level 1) and the trap Flame Strike (both of which use the old, crappy animation).

- For reference, the no-rebound lightning bolt (hard-coded projectile 206) really sucks (it flies way off-center, and rarely hits the target). Don't use it (the lightning mephits use this, which is why they're so weak; I tried to use it for Gesen's bow to replace that slow-ass bolt of glory and found out how crappy it was).

 

There's probably more, but whatever.

Share this post


Link to post
Oh, and Bruenor's axe isn't marked as magical. I never payed attention to whether he was actually damaging the vampires or not (I don't know if the magical flag would break this, or if it's just based off enchantment level).

Share this post


Link to post
I honestly believe they were both supposed to be 25K. Whatever.

 

The perfect thread to hijack:

- The wizard version of Farsight has really funky timings (I couldn't find any logical pattern, so I just set it to the stated 3 + 1/level to match the priest version and description).

- The Dispel Magic scroll uses the priest description, instead of the mage description.

- AR1404 has AR1404.MOS and AR1404N.MOS area maps (despite not being an extended night area). I simply COPY_EXISTING ~AR1404N.MOS~ ~OVERRIDE/AR1404.MOS~ so that the map will always be correct (this is the "evil" temple ruins forest area).

- AR0522.BCS has the following gem:

IF
 Global("PlayerAttackedActors","GLOBAL",1)
 Global("SamuelAttacks","LOCALS",0) // Area objects can't check locals
THEN
 RESPONSE #100
   SetGlobal("SamuelAttacks","LOCALS",1) // Area objects don't get locals
   ActionOverride("ffbart",Enemy())
   ActionOverride("ffwench",Enemy())
   Wait(2)
   CreateCreatureOffScreen("AMNCEN1",0) // Amnish Centurion
   CreateCreatureOffScreen("AMNLEG1",0) // Amnish Legionary
   CreateCreatureOffScreen("AMNLEG1",0) // Amnish Legionary
   CreateCreatureOffScreen("AMNLEG1",0) // Amnish Legionary
   CreateCreatureOffScreen("COWENF1",0) // Cowled Enforcer
END

- Mazzy is supposed to have one dialogue after her stupid altar, but it never plays because of funky variable manipulation in the area script and her dialogue. This is particularly important, because the missed sequence ActionOverride("uhrang01",StartDialogueNoSet(Player1)); since Merella is just a body, it's pretty easy to ignore here entirely.

- The Cloak of the Wolf is actually in the game. It's on Wallag's body. You just can't ever access it. Not really a bug (UB to the rescue!).

- Quayle the slime will cause the nearest PC to continually fart if Aerie is in the party. He only has one top-level state that checks to make sure Aerie's not in the party; if you get within 5 feet of him and Aerie's InParty(), he'll continuously try to initiate dialogue (and since he has nothing to say, the feedback window will fill up with "Bumbling simpeltons, get out of my way!"). Simply adding an action SetNumTimesTalkedTo(1) to state 0 (EXTERN from AerieJ) should solve this.

Share this post


Link to post
I don't agree that stat drains shouldn't affect usability (if a particular item is tailored to you, and your stats drop, why would you still be able to use that item?). Whatever.

 

Make sure you check the Harper Pin (it should only be usable by Harpers = Jaheira). I'd also suggest setting the price of NPC items to 0 so you can't sell them.

 

EDIT: and don't bother setting the INT on anything. If you have 2 INT, you're going to die soon, and I doubt you'll have time to fidget with your equipment.

Share this post


Link to post

Slowly working through these finally.

 

- Salamanders really are unkillable (IIRC, this used to work fine in SoA), because they all have RING95 now (God only knows why; that ring is usually reserved for undead), which, among other things, gives them immunity to slay. I just add a RemoveItem EFF (a la CFTROLL), but it requires two hits to kill them (one to destroy the item, the second to slay). A KillTarget EFF would probably work better.

 

This was in reference to the Wave halberd. We have already corrected the race of salamanders, leaving just this issue. Fixed as follows:

 

// wave should kill salamanders; salas are flagged incorrectly (fixed in creature racial patches) and wear ring95 which
// prevents slay opcode. Change wave to use an eff with Kill Target opcode instead.
COPY_EXISTING ~halb09.itm~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN
   READ_BYTE ("%abil_off%" + (0x38 * "%index%")) "type"
   PATCH_IF ("%type%" = 1) BEGIN // melee
     READ_SHORT ("%abil_off%" + 0x1e + (0x38 * "%index%")) "abil_fx_num"
     READ_SHORT ("%abil_off%" + 0x20 + (0x38 * "%index%")) "abil_fx_idx"
     FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
       READ_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
       PATCH_IF ("%opcode%" = 55) BEGIN // slay effect
         WRITE_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) 177        // use eff opcode
         WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) ~death~ #8 // death.eff
       END
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

- The asylum crush trap really does kill people it isn't supposed to (usually mages). My final conclusion was that the LastTrigger check is picking up something other than the last object that triggered the trap (LastTrigger is set by a number of triggers; I think they're the SVTRIOBJ triggers, but they don't all work with LastTrigger very well). Simply removing the two extraneous blocks fixes this (I've never seen the trap fail, so they aren't doing anything worthwhile). Which leads to the recommendation of never using LastTrigger outside of a block that sets LastTrigger.

 

Left one block just so that the variable can reset--not that it appears to do anything.

 

// asylum crushing trap hitting wrong folks
COPY_EXISTING ~ppcrus1.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~!StateCheck(LastTrigger,STATE_REALLY_DEAD)~ ~False()~
   REPLACE_TEXTUALLY ~StateCheck(LastTrigger,STATE_REALLY_DEAD)~ ~~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 

- AMUL23 and AMUL24 have separate, unused graphics. They don't look too shitty in-game (some of the unused ones, like HAMM05, are intolerable).

 

// amul23 and amul24 have different BAMs than amul22
COPY_EXISTING ~amul23.itm~ ~override~
             ~amul24.itm~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 WRITE_EVALUATED_ASCII 0x3a ~i%SOURCE_RES%~ #8
 WRITE_EVALUATED_ASCII 0x58 ~c%SOURCE_RES%~ #8
 BUT_ONLY_IF_IT_CHANGES

 

- All of the short bow +1 graphics were wrong (I neglected to update the description image to CBOW06).

 

Already fixed elsewhere.

 

- InMyArea() only wants specific object references (things like InMyArea([PC]) don't seem to really work). I think this affects all of one script in the game. EDIT: this is not true. The problem was that Random*() actions are persistent, so any ActionListEmpty() triggers will fail if a creature is RandomWalking/Turning.

 

This one is ugly. Doing searches for NI for ActionListEmpty() triggers, RandomWalk/WalkContinuous/Turn/Fly, and then crosschecking creatures to see if they have scripts with both yields this list:

 

Err: AMBOY02.CRE has an issue.
Err: AMFEM03.CRE has an issue.
Err: AMFEM04.CRE has an issue.
Err: AMGIRL02.CRE has an issue.
Err: AMMAN03.CRE has an issue.
Err: AMMAN04.CRE has an issue.
Err: AMSHEP01.CRE has an issue.
Err: AMSMUG02.CRE has an issue.
Err: BEARBL.CRE has an issue.
Err: BEARBR.CRE has an issue.
Err: BEARGR.CRE has an issue.
Err: BEARPOSU.CRE has an issue.
Err: BODVAM01.CRE has an issue.
Err: BODVAM02.CRE has an issue.
Err: BOTSMITH.CRE has an issue.
Err: C6VAMP01.CRE has an issue.
Err: CHAK.CRE has an issue.
Err: CLGOL01.CRE has an issue.
Err: COHNTA.CRE has an issue.
Err: COWLD.CRE has an issue.
Err: COWLED01.CRE has an issue.
Err: DOCSOL01.CRE has an issue.
Err: DROW06.CRE has an issue.
Err: DSTONE1.CRE has an issue.
Err: ELAIR01.CRE has an issue.
Err: ELAIRG01.CRE has an issue.
Err: ELAIRL01.CRE has an issue.
Err: ELARIL01.CRE has an issue.
Err: ELEAR01.CRE has an issue.
Err: ELEARG01.CRE has an issue.
Err: ELEARL01.CRE has an issue.
Err: ELEEEL01.CRE has an issue.
Err: ELEFEL01.CRE has an issue.
Err: ELEKOB01.CRE has an issue.
Err: ELFIR.CRE has an issue.
Err: ELFIR01.CRE has an issue.
Err: ELFIRG01.CRE has an issue.
Err: ELFIRL01.CRE has an issue.
Err: ELWATG01.CRE has an issue.
Err: GOLADA01.CRE has an issue.
Err: GOLBRA01.CRE has an issue.
Err: GOLCLA01.CRE has an issue.
Err: GOLEM01.CRE has an issue.
Err: GOLFLE01.CRE has an issue.
Err: GOLJUG01.CRE has an issue.
Err: GOLKILL2.CRE has an issue.
Err: GOLSAN01.CRE has an issue.
Err: GOLSTO01.CRE has an issue.
Err: GONCE.CRE has an issue.
Err: GORBAT1.CRE has an issue.
Err: GORBAT2.CRE has an issue.
Err: GORFIR01.CRE has an issue.
Err: GORFIR02.CRE has an issue.
Err: GORFIR03.CRE has an issue.
Err: GORFIR04.CRE has an issue.
Err: ICSALCOL.CRE has an issue.
Err: ICSALFIR.CRE has an issue.
Err: IVAMP01.CRE has an issue.
Err: JUGJUG02.CRE has an issue.
Err: KEARTH.CRE has an issue.
Err: KOBCOM01.CRE has an issue.
Err: KOBSLA01.CRE has an issue.
Err: LAUNE.CRE has an issue.
Err: NEVM4.CRE has an issue.
Err: OBSFIR06.CRE has an issue.
Err: PAIREL01.CRE has an issue.
Err: PPBODHI3.CRE has an issue.
Err: SALGRICE.CRE has an issue.
Err: SARVAM01.CRE has an issue.
Err: SARVAM02.CRE has an issue.
Err: SARVAM03.CRE has an issue.
Err: SHEARTH.CRE has an issue.
Err: STGOL01.CRE has an issue.
Err: SUAIR.CRE has an issue.
Err: SUEARTH.CRE has an issue.
Err: SUFIRE.CRE has an issue.
Err: TELICESA.CRE has an issue.
Err: TREVIL04.CRE has an issue.
Err: UDCOM01.CRE has an issue.
Err: UDCOM02.CRE has an issue.
Err: UDCOM03.CRE has an issue.
Err: UDDROW32.CRE has an issue.
Err: UDELDA.CRE has an issue.
Err: UDELDE.CRE has an issue.
Err: UDELDF.CRE has an issue.
Err: UDGOLEM.CRE has an issue.
Err: UDSLV04.CRE has an issue.
Err: UHOGRE02.CRE has an issue.
Err: VAMANC01.CRE has an issue.
Err: VAMEMI01.CRE has an issue.
Err: VAMFLF01.CRE has an issue.
Err: VAMFLM01.CRE has an issue.
Err: VAMMAT01.CRE has an issue.
Err: VAMOLD01.CRE has an issue.
Err: VAMPAT01.CRE has an issue.
Err: VAMPIF01.CRE has an issue.
Err: VAMPIM01.CRE has an issue.
Err: VAMPM01.CRE has an issue.
Err: VAMVER01.CRE has an issue.
Err: VBEARBR.CRE has an issue.
Err: XGOLEM.CRE has an issue.

 

I'm going to try and look at these individually and see if there's an easy way to mass-patch them. Is there a way to cancel a RandomWalk action?

Edited by CamDawg

Share this post


Link to post

It was not an issue or bug in the AI, but an issue in my understanding of the Random*() actions (it's a persistent, almost modal action). This does not affect creature AI, as the scripts are run normally (any new actions will be executed as expected, either clearing the Random*() action or by some other method). The only issue was that if a creature is executing a Random*() action, the ActionListEmpty() trigger should return false. I'm not aware of any actual issues in-game (ActionListEmpty() isn't really used very often). I'll look through some of the ones you posted to see if I think there's any real issue; don't bother doing anything with this for now.

 

Since this is my dump thread:

 

There's a possible issue with one of Aerie's banters -- two of her banters check the same variable, and there is no variable 8 (i.e., there are two tied to BAERIEWHATEVER7, and then it jumps directly to 9).

 

Twice so far I've found an instance of the following trigger -- !GlobalGT("AerieRomanceActive","GLOBAL",0) !GlobalLT("AerieRomanceActive","GLOBAL",3) -- obviously, this trigger will always be false (should be !Global(1) and !Global(2)). I think these were in Cernd's quest dialogue (one of the CEFALDOR dialogues, and one I don't remember).

 

the bigg was right about the power value -- it affects immunity to spell level. As such, all effect power values should be corrected. Additionally, some effects that target self should actually have 0 power. In particular, most summoning spells run Use EFF file with Target: Self, and this fails if you cast the spell while granted immunity to that spell level (e.g., casting Monster Summoning I fails if you have Minor Globe on). Setting the power to 0 for these spells allows them to be cast when the caster has immunity effects (I do this for all summoning spells and all create item spells). Finally, this also extends to items (if a creature has immunity to spell level LT 8 and you shoot a fire arrow at it, the normal damage is applied but the fire damage is resisted and the Spell Ineffective message runs), but the situation is a bit stickier. I doubt this has an appreciable effect on gameplay, however.

Edited by devSin

Share this post


Link to post
It was not an issue or bug in the AI, but an issue in my understanding of the Random*() actions (it's a persistent, almost modal action). This does not affect creature AI, as the scripts are run normally (any new actions will be executed as expected, either clearing the Random*() action or by some other method). The only issue was that if a creature is executing a Random*() action, the ActionListEmpty() trigger should return false. I'm not aware of any actual issues in-game (ActionListEmpty() isn't really used very often). I'll look through some of the ones you posted to see if I think there's any real issue; don't bother doing anything with this for now.

 

Since this is my dump thread:

 

There's a possible issue with one of Aerie's banters -- two of her banters check the same variable, and there is no variable 8 (i.e., there are two tied to BAERIEWHATEVER7, and then it jumps directly to 9).

 

Twice so far I've found an instance of the following trigger -- !GlobalGT("AerieRomanceActive","GLOBAL",0) !GlobalLT("AerieRomanceActive","GLOBAL",3) -- obviously, this trigger will always be false (should be !Global(1) and !Global(2)). I think these were in Cernd's quest dialogue (one of the CEFALDOR dialogues, and one I don't remember).

 

the bigg was right about the power value -- it affects immunity to spell level. As such, all effect power values should be corrected. Additionally, some effects that target self should actually have 0 power. In particular, most summoning spells run Use EFF file with Target: Self, and this fails if you cast the spell while granted immunity to that spell level (e.g., casting Monster Summoning I fails if you have Minor Globe on). Setting the power to 0 for these spells allows them to be cast when the caster has immunity effects (I do this for all summoning spells and all create item spells). Finally, this also extends to items (if a creature has immunity to spell level LT 8 and you shoot a fire arrow at it, the normal damage is applied but the fire damage is resisted and the Spell Ineffective message runs), but the situation is a bit stickier. I doubt this has an appreciable effect on gameplay, however.

 

Nice job on confirming the Power issue, devSin. :) I've heard it for years, but I don't recall anyone ever actually bothering to test it.

Share this post


Link to post
It was not an issue or bug in the AI, but an issue in my understanding of the Random*() actions (it's a persistent, almost modal action). This does not affect creature AI, as the scripts are run normally (any new actions will be executed as expected, either clearing the Random*() action or by some other method). The only issue was that if a creature is executing a Random*() action, the ActionListEmpty() trigger should return false. I'm not aware of any actual issues in-game (ActionListEmpty() isn't really used very often). I'll look through some of the ones you posted to see if I think there's any real issue; don't bother doing anything with this for now.

Most of the ActionListEmpty triggers seem to be for Shout actions. I've never seen Bioware AI use shouts terribly effectively, perhaps because or in spite of this. :)

Share this post


Link to post
Rather than spam the board with a new thread,

- MoveToObject() only seems to work with specific object references where the object in question isn't framed prior to the action (so, something like See([PC]) ... MoveToObject([PC]) works fine, but !Range([PC],20) ... MoveToObject([PC]) does nothing). A couple scripts may be affected by this (BioWare seems to have been pretty careful here).

I found about 10 scripts where this is the case. Does something like MoveToObject(Nearest([PC])) work as an alternative?

Share this post


Link to post

If you can post a list of the scripts, I'll do a bit more investigating and let you know. It's probable that these work fine (even if my observation is correct, all it would take is one See([2]) in any of the object's running scripts to make things like this work).

 

Nearest() doesn't work very well (when I was doing dragon breath weapons way back when, Nearest([255]) ended up targeting the PC more often than not).

Share this post


Link to post
If you can post a list of the scripts, I'll do a bit more investigating and let you know. It's probable that these work fine (even if my observation is correct, all it would take is one See([2]) in any of the object's running scripts to make things like this work).

 

Nearest() doesn't work very well (when I was doing dragon breath weapons way back when, Nearest([255]) ended up targeting the PC more often than not).

This is just a quick search for MoveToObject. The majority either used Player1 or a DV; these were the leftovers after screening out the blocks that had a See([foo]) or Detect([foo]) trigger.

 

antifire
cut08b
cut212b
dadrow12
kaypal02
mage14t
monkwand
ppjoye
trskin01
yoshimox

Share this post


Link to post

There's no problem with explicit objects (either object IDs or script names), only with generic object IDs.

 

Until (if?) I can do more thorough testing (or even check at least one of these), I'd say just ignore it. There aren't any clear issues I can remember from the list of scripts.

Share this post


Link to post
- If you change the class of summoned creatures (so they cast spells at the appropriate level, instead of at level 1), make sure to update their weapons (so they have appropriate icons and don't show up as "Skull" in the toolbar). It's also a good idea to fill out their weapon slots so they can't be disarmed (although it can be amusing to see a Deva whack on some bad guy with it's fists).

 

COPY_EXISTING ~basilg1.itm~  ~override~ // -1
             ~basilg2.itm~  ~override~ // -1
             ~basilg3.itm~  ~override~ // -1
             ~basill1.itm~  ~override~ // -1
             ~basill2.itm~  ~override~ // -1
             ~b1-6.itm~     ~override~ // 8777
             ~b1-8.itm~     ~override~ // 8777
             ~b1-8m1.itm~   ~override~ // 8777
             ~b1-10m2.itm~  ~override~ // 8777
             ~b1-12.itm~    ~override~ // 8777
             ~b1-12m3.itm~  ~override~ // 8777
             ~b1-20m3.itm~  ~override~ // -1
             ~b1-20m4.itm~  ~override~ // -1
             ~b2-16.itm~    ~override~ // 8777
             ~b3-24.itm~    ~override~ // -1
             ~b4-32.itm~    ~override~ // 8777
             ~b4-32m3.itm~  ~override~ // -1
             ~b4-32m4.itm~  ~override~ // -1
             ~catjag.itm~   ~override~ // 8777
             ~catlio.itm~   ~override~ // 8777
             ~carrio1.itm~  ~override~ // -1
             ~dogwawp.itm~  ~override~ // 8777
             ~elairl.itm~   ~override~ // 8777
             ~etterc1.itm~  ~override~ // -1
             ~etterc2.itm~  ~override~ // -1
             ~figspid.itm~  ~override~ // -1
             ~fireelel.itm~ ~override~ // 8777
             ~fireelem.itm~ ~override~ // 8777
             ~genscim.itm~  ~override~ // 8777
             ~ghast1.itm~   ~override~ // -1
             ~golfle.itm~   ~override~ // 8777
             ~golcla.itm~   ~override~ // -1
             ~golsto.itm~   ~override~ // -1
             ~jellmu1.itm~  ~override~ // 14182
             ~lacedo.itm~   ~override~ // -1
             ~mistpo.itm~   ~override~ // 8777
             ~nishruu.itm~  ~override~ // -1
             ~ogre1.itm~    ~override~ // -1
             ~p1-4.itm~     ~override~ // 8777
             ~p1-8.itm~     ~override~ // 8777
             ~p1-8m1.itm~   ~override~ // 8777
             ~p3-12m4.itm~  ~override~ // -1
             ~s1-8.itm~     ~override~ // 8777
             ~s1-10m4.itm~  ~override~ // 8777
             ~spidgi1.itm~  ~override~ // -1
             ~spidph1.itm~  ~override~ // -1
             ~spidsw1.itm~  ~override~ // -1
             ~stalkesu.itm~ ~override~ // 2898
             ~wolfwi1.itm~  ~override~ // -1
             ~wolfwi2.itm~  ~override~ // -1
             ~wraith1.itm~  ~override~ // -1
             ~wyvern1.itm~  ~override~ // -1
             ~wyvern2.itm~  ~override~ // -1
 SAY NAME1 #10966
 SAY NAME2 #10966
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~basilgsu.cre~ ~override~
             ~basillsu.cre~ ~override~
             ~bearblsu.cre~ ~override~
             ~bearbrsu.cre~ ~override~
             ~bearcasu.cre~ ~override~
             ~beargrsu.cre~ ~override~
             ~bearposu.cre~ ~override~
             ~berser02.cre~ ~override~
             ~berser03.cre~ ~override~
             ~bersersu.cre~ ~override~
             ~c6guen.cre~   ~override~
             ~carriosu.cre~ ~override~
             ~catjagsu.cre~ ~override~
             ~catjagwp.cre~ ~override~
             ~catliosu.cre~ ~override~
             ~catliowp.cre~ ~override~
             ~dagnoll.cre~  ~override~
             ~daumber.cre~  ~override~
             ~deckfele.cre~ ~override~
             ~djinnisu.cre~ ~override~
             ~dogwasu.cre~  ~override~
             ~dogwawp.cre~  ~override~
             ~dogwisu.cre~  ~override~
             ~druear01.cre~ ~override~
             ~drufir01.cre~ ~override~
             ~efreetsu.cre~ ~override~
             ~elairsu1.cre~ ~override~
             ~elairsu2.cre~ ~override~
             ~elairsu3.cre~ ~override~
             ~elairsuw.cre~ ~override~
             ~elearpr.cre~  ~override~
             ~elearpr2.cre~ ~override~
             ~elearpr3.cre~ ~override~
             ~elearsu1.cre~ ~override~
             ~elearsu2.cre~ ~override~
             ~elearsu3.cre~ ~override~
             ~elearsu4.cre~ ~override~
             ~elearsuw.cre~ ~override~
             ~elfirpr.cre~  ~override~
             ~elfirpr2.cre~ ~override~
             ~elfirpr3.cre~ ~override~
             ~elfirsu.cre~  ~override~
             ~elfirsu1.cre~ ~override~
             ~elfirsu2.cre~ ~override~
             ~elfirsu3.cre~ ~override~
             ~elfirsu4.cre~ ~override~
             ~elfirsuw.cre~ ~override~
             ~ettercsu.cre~ ~override~
             ~ghastgsu.cre~ ~override~
             ~ghastsu.cre~  ~override~
             ~gibbersu.cre~ ~override~
             ~globsham.cre~ ~override~
             ~gnollsu.cre~  ~override~
             ~gormistp.cre~ ~override~
             ~gpskel1.cre~  ~override~
             ~haksu.cre~    ~override~
             ~hamasu.cre~   ~override~
             ~hobgobsu.cre~ ~override~
             ~jaguarsu.cre~ ~override~
             ~jellmusu.cre~ ~override~
             ~koboldsu.cre~ ~override~
             ~mistpo01.cre~ ~override~
             ~moondog.cre~  ~override~
             ~nishrusu.cre~ ~override~
             ~nymphsu.cre~  ~override~
             ~ogregrsu.cre~ ~override~
             ~ogrelesu.cre~ ~override~
             ~ogremasu.cre~ ~override~
             ~ogresu.cre~   ~override~
             ~sahangu.cre~  ~override~
             ~sahlace.cre~  ~override~
             ~sahskel.cre~  ~override~
             ~sahzomb.cre~  ~override~
             ~senstalk.cre~ ~override~
             ~servsu.cre~   ~override~
             ~shadowsu.cre~ ~override~
             ~skelwasu.cre~ ~override~
             ~smoundsu.cre~ ~override~
             ~spidfgsu.cre~ ~override~
             ~spidgisu.cre~ ~override~
             ~spidphsu.cre~ ~override~
             ~spidswsu.cre~ ~override~
             ~spirbear.cre~ ~override~
             ~spirlion.cre~ ~override~
             ~spirsnak.cre~ ~override~
             ~spirwolf.cre~ ~override~
             ~stalke.cre~   ~override~
             ~sumdjinn.cre~ ~override~
             ~sumefree.cre~ ~override~
             ~sumelair.cre~ ~override~
             ~sumelear.cre~ ~override~
             ~sumelfir.cre~ ~override~
             ~sumtan01.cre~ ~override~
             ~sumtan02.cre~ ~override~
             ~swaair01.cre~ ~override~
             ~swaair02.cre~ ~override~
             ~swaear01.cre~ ~override~
             ~swaear02.cre~ ~override~
             ~swafir01.cre~ ~override~
             ~swafir02.cre~ ~override~
             ~sword01.cre~  ~override~
             ~sword02.cre~  ~override~
             ~tasloisu.cre~ ~override~
             ~telelfir.cre~ ~override~
             ~telicesa.cre~ ~override~
             ~tomegol1.cre~ ~override~
             ~tomegol2.cre~ ~override~
             ~tomegol3.cre~ ~override~
             ~uddoor07.cre~ ~override~
             ~wolfdisu.cre~ ~override~
             ~wolfsu.cre~   ~override~
             ~wolfwisu.cre~ ~override~
             ~wolfwwsu.cre~ ~override~
             ~worgsu.cre~   ~override~
             ~wraithsu.cre~ ~override~
             ~wyvernsu.cre~ ~override~
             ~xvartsu.cre~  ~override~
 READ_LONG  0x2b8 "slot_off" ELSE 0
 READ_LONG  0x2bc "itm_off" ELSE 0
 READ_SHORT ("%slot_off%" + 0x4c) "equipped" ELSE 0xffff // equipped weapon slot
 PATCH_IF ("%equipped%" != 0xffff) BEGIN
   READ_SHORT ("%slot_off%" + (0x02 * ("%equipped%" + 9))) "weapon"
   FOR (index = 9; index < 14; index = index + 1) BEGIN // weapon slots
     READ_SHORT ("%slot_off%" + (0x02 * "%index%")) "ref" ELSE 0xffff
     PATCH_IF ("%ref%" = 0xffff) BEGIN
        WRITE_SHORT ("%slot_off%" + (0x02 * "%index%")) "%weapon%"
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

Share this post


Link to post

That should have read... if you change the class to a player spellcasting class (MAGE, CLERIC, etc.). If the class is not a player class, it just gets the generic toolbar (the single Attack sword button and no quick buttons).

Share this post


Link to post
- HARP_V6 has the wrong number of tracks listed (it's 5, but should be 6). I think the last track is just SPC1, so it won't make much difference. BioWare's dedication to the aural experience continues to amaze...

I know zip about mus files. Any one want to tackle this?

 

- For the Glaicas fix, make sure to ActionOverride("kpglai01",ApplySpell()), just to be safe. Directly casting a spell from an area object tends not to work (just about everything in that block needs to be ActionOverride()d, IIRC).

We were missing an AO on the ChangeEnemyAlly action. Added for good measure.

 

// fixes Glacias charm issue
COPY_EXISTING ~ar1303.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~ApplySpell("kpglai01",WIZARD_TRUE_DISPEL_MAGIC)~
                     ~ActionOverride("kpglai01",ApplySpell("kpglai01",FORCE_DISPEL_MAGIC))~
   REPLACE_TEXTUALLY ~ChangeEnemyAlly("kpglai01",NEUTRAL)~
                     ~ActionOverride("kpglai01",ChangeEnemyAlly("kpglai01",NEUTRAL))~
 COMPILE_BAF_TO_BCS

 

- One of the triggers in AR1301 checks for LOCALS, causing it to fail immediately (triggers don't get, and can't check LOCALS). IIRC, the last sentence in the DisplayString makes no sense at all. I'm sure SimDing0 can come up with something.

Fixed. The string is a bit, uh, grammatically free. Strref #46785 if someone has suggestions.

 

// trap triggers can't check LOCALS variables
COPY_EXISTING ~umbpoly.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"LOCALS"~ ~"AR1301"~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 

- The Wand of the Heavens tries to use both the old and new Flame Strike animations (the new is done with two Play3DEffect effects, whereas the old is hard-coded projectile 67); the projectile should be set to 1 (or 0 or some other invalid number). It may be worth changing this for Dace's Flame Strike (you only need to worry about level 1) and the trap Flame Strike (both of which use the old, crappy animation).

Went ahead and got rid of the old school one altogether.

 

// use new flame strike animation, not the old one
COPY_EXISTING ~spin799.spl~  ~override~ // dace's flame strike
             ~sppr985.spl~  ~override~ // trap flamestrike
             ~spwi979.spl~  ~override~ // sarevok_strike
             ~spwm186.spl~  ~override~ // wild surge charm--was using flame strike anim
 READ_LONG  0x34 "level"
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 SET "fx_delta" = 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // start iterating through abilities
   READ_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT  ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%")
   WRITE_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) ("%abil_fx_idx%")
   READ_SHORT  ("%abil_off%" + 0x26 + (0x28 * "%index%")) "proj" // check projectile
   PATCH_IF ("%proj%" = 67) BEGIN
     SET "new_fx" = 2
     WRITE_SHORT ("%abil_off%" + 0x26 + (0x28 * "%index%")) 1 // remove old flame strike projectile and use effects instead
     FOR (index3 = 0; index3 < new_fx; index3 = index3 + 1) BEGIN
       INSERT_BYTES  ("%fx_off%" +        (0x30 * "%abil_fx_idx%")) 0x30      // insert new effect
         WRITE_SHORT ("%fx_off%" +        (0x30 * "%abil_fx_idx%")) 215       // play 3d effect
         WRITE_BYTE  ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) 2         // target: preset target
         WRITE_BYTE  ("%fx_off%" + 0x03 + (0x30 * "%abil_fx_idx%")) "%level%" // power = level
         WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * "%abil_fx_idx%")) 1         // instant/permanent
         WRITE_LONG  ("%fx_off%" + 0x0d + (0x30 * "%abil_fx_idx%")) 1         // dispel/not bypass
         WRITE_BYTE  ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) 100       // probability
       PATCH_IF ("%index3%" = 0) BEGIN
         WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~spflast2~    // vvc file
       END ELSE BEGIN
         WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~spflsrin~    // vvc file
       END
     END
     SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%"
     SET "fx_delta" = ("%fx_delta%" + "%new_fx%")
   END
   WRITE_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) "%abil_fx_num%"
 END
 BUT_ONLY_IF_IT_CHANGES

 

For the wands, I just added it to the existing patch.

 

// Wand of heavens claims 8d6 damage; actually does 12d4; fix flame strike animation while we're here
COPY_EXISTING ~ttwand.itm~ ~override~
             ~wand11.itm~ ~override~
 READ_LONG  0x64 "abil_off"
 READ_SHORT 0x68 "abil_num"
 READ_LONG  0x6a "fx_off"
 SET "fx_delta" = 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN
   READ_BYTE ("%abil_off%" + (0x38 * "%index%")) "type"
   PATCH_IF ("%type%" = 3) BEGIN // magical
     READ_SHORT  ("%abil_off%" + 0x1e + (0x38 * "%index%")) "abil_fx_num"
     READ_SHORT  ("%abil_off%" + 0x20 + (0x38 * "%index%")) "abil_fx_idx"
     SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%")
     WRITE_SHORT ("%abil_off%" + 0x20 + (0x38 * "%index%")) ("%abil_fx_idx%")
     WRITE_SHORT ("%abil_off%" + 0x2a + (0x38 * "%index%")) 1 // remove old flame strike projectile while we're here
     FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
       READ_SHORT ("%fx_off%" +        (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
       PATCH_IF ("%opcode%" = 12) BEGIN // damage
         WRITE_LONG ("%fx_off%" + 0x1c + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 4 // number of dice; only half since damage is split for save
         WRITE_LONG ("%fx_off%" + 0x20 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 6 // dice size
       END
     END
     PATCH_IF ("%SOURCE_RES%" STRING_COMPARE_CASE "ttwand" = 0) BEGIN // wand11 already has play 3d effect opcodes
       SET "new_fx" = 2
       FOR (index3 = 0; index3 < new_fx; index3 = index3 + 1) BEGIN
         INSERT_BYTES  ("%fx_off%" +        (0x30 * "%abil_fx_idx%")) 0x30 // insert new effect
           WRITE_SHORT ("%fx_off%" +        (0x30 * "%abil_fx_idx%")) 215  // play 3d effect
           WRITE_BYTE  ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) 2    // target: preset target
           WRITE_BYTE  ("%fx_off%" + 0x03 + (0x30 * "%abil_fx_idx%")) 4    // power = level
           WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * "%abil_fx_idx%")) 1    // instant/permanent
           WRITE_LONG  ("%fx_off%" + 0x0d + (0x30 * "%abil_fx_idx%")) 1    // dispel/not bypass
           WRITE_BYTE  ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) 100  // probability
         PATCH_IF ("%index3%" = 0) BEGIN
           WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~spflast2~    // vvc file
         END ELSE BEGIN
           WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~spflsrin~    // vvc file
         END
       END
       SET "fx_delta" = "%fx_delta%" + "%new_fx%"
       SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%"
     END
     WRITE_SHORT  ("%abil_off%" + 0x1e + (0x38 * "%index%")) "%abil_fx_num%"
   END
 END
 BUT_ONLY_IF_IT_CHANGES

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...