Skip to content

Commit

Permalink
More fixes, mainly bg2ee.tph
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDawg committed Apr 14, 2022
1 parent b667cfe commit 2b591e1
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 7 deletions.
6 changes: 5 additions & 1 deletion eefixpack/files/d/bg2ee_core_fixes.d
@@ -1,3 +1,7 @@
// tbd, cam (two issues here, see yoshimo.bcs)
// Yoshimo Should Have Follow-Up Banters with the PC
ADD_TRANS_ACTION byoshim BEGIN 11 END BEGIN END ~SetGlobalTimer("YoshimoTalksPC2","GLOBAL",FIVE_DAYS)~ // add timer to prompt second banter
ADD_TRANS_ACTION byoshim BEGIN 11 END BEGIN END ~SetGlobalTimer("YoshimoTalksPC2","GLOBAL",FIVE_DAYS)~ // add timer to prompt second banter

// tbd, cam
// ranger stronghold fails if you're in Umar Hills when Delon spawn timer expires; see also ar1100.bcs
ADD_TRANS_ACTION delon BEGIN 21 END BEGIN END ~SetGlobal("CDDelonSpoke","GLOBAL",1)~
Binary file added eefixpack/files/eff/spin117a.eff
Binary file not shown.
86 changes: 86 additions & 0 deletions eefixpack/files/tph/bg2ee.tph
Expand Up @@ -48,6 +48,31 @@ COMPILE ~eefixpack/files/d/%game%_core_fixes.d~ // misc dialogue fixes
///// script fixes \\\\\
///// \\\\\

// tbd, cam
// ranger stronghold fails if you're in Umar Hills when Delon spawn timer expires; see also delon.dlg
COPY_EXISTING ~ar1100.bcs~ ~override~
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY ~\(NumDeadLT("rogron",6)\)~ ~\1 Global("CDDelonSpoke","GLOBAL",1)~
END
BUT_ONLY

// tbd, cam
// siege camp reinforcements checking wrong blocks
COPY_EXISTING ~ar5203.bcs~ ~override~
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY ~GlobalLT("EXTRACOUNT2","MYAREA",1)[ %TAB%%LNL%%MNL%%WNL%]+\(ActionListEmpty()[ %TAB%%LNL%%MNL%%WNL%]+InActiveArea(Myself)[ %TAB%%LNL%%MNL%%WNL%]+THEN[ %TAB%%LNL%%MNL%%WNL%]+RESPONSE #30[ %TAB%%LNL%%MNL%%WNL%]+IncrementGlobal("MaxSpawn","AR5203",1)[ %TAB%%LNL%%MNL%%WNL%]+CreateCreatureObjectOffScreen("YSSOLD04",Player1,0,0,0)[ %TAB%%LNL%%MNL%%WNL%]+IncrementGlobal("EXTRACOUNT3","MYAREA",1)\)~
~GlobalLT("EXTRACOUNT3","MYAREA",1) \1~
END
BUT_ONLY

// tbd, cam
// love talk sets trigger for jaheira's bandits to spawn, but shouldn't occur if romance ends before timer is up
COPY_EXISTING ~jaheira.bcs~ ~override~
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY ~\(Global("JaheiraBanditPlot","GLOBAL",1)\)~ ~\1 OR(2) Global("JaheiraRomanceActive","GLOBAL",1) Global("JaheiraRomanceActive","GLOBAL",2)~
END
BUT_ONLY

// ie-5948, cam
// Generic cleric AI script can hang
COPY_EXISTING ~pries14a.bcs~ ~override~
Expand Down Expand Up @@ -108,6 +133,46 @@ END

INCLUDE ~eefixpack/files/tph/tbd_bg2ee_146.tph~ // tbd, cam: fixes items that cast spells

// tbd, cam
// aegis fang has wrong enchantment level
COPY_EXISTING ~aegis.itm~ ~override~ // Aegis-fang +3
~aegis2.itm~ ~override~ // Aegis-fang +3
WRITE_LONG 0x60 3 // enchantment
BUT_ONLY

// basilisk petrification should force, you know, a save against petrification
COPY_EXISTING ~basigaze.itm~ ~override~
~basilg1.itm~ ~override~
~basill1.itm~ ~override~
LPF ALTER_EFFECT INT_VAR savingthrow = BIT4 END // save vs. spell > petrification

// tbd, cam
// set to 400% speed, not set a fixed value of 30
COPY_EXISTING ~boot10.itm~ ~override~ // Boots of Lightning Speed
LPF ALTER_EFFECT INT_VAR match_opcode = 126 parameter1 = 400 parameter2 = 2 END

// tbd, cam
// protection from magic scrolls not dispelling all buffs
COPY_EXISTING ~scrl07.itm~ ~override~ // protection from magic
FOR (index = 0 ; index < 11 ; ++index) BEGIN
LPF ADD_ITEM_EFFECT INT_VAR insert_point = 0 opcode = 220 parameter1 = 99 parameter2 = index target = 2 timing = 1 END // remove school protections: index
END
FOR (index = 0 ; index < 14 ; ++index) BEGIN // only 10 spell schools, but 13 secondary types
LPF ADD_ITEM_EFFECT INT_VAR insert_point = 0 opcode = 221 parameter1 = 99 parameter2 = index target = 2 timing = 1 END // remove school protections: index
END
BUT_ONLY

// tbd, cam
// elemental staves' sound effect should only target the specified creature
OUTER_SET elemental_destroyed = RESOLVE_STR_REF (@100)
COPY_EXISTING ~staf15.itm~ ~override~ // staff of air +2
~staf16.itm~ ~override~ // staff of earth +2
~staf17.itm~ ~override~ // staff of fire +2
LPF CLONE_EFFECT INT_VAR match_opcode = 55 opcode = 318 power = 0 parameter2 = 115 timing = 0 savingthrow = 0 STR_VAR insert = first resource = EVAL ~%SOURCE_RES%~ END
LPF CLONE_EFFECT INT_VAR match_opcode = 55 opcode = 139 parameter1 = elemental_destroyed parameter2 = 0 END // add 'elemental destroyed' message
LPF ALTER_EFFECT INT_VAR match_opcode = 55 parameter1 = 0 parameter2 = 2 END // now gated by a 318, make 55 universal
BUT_ONLY

// luke
// Mis-indexed effects
WITH_SCOPE BEGIN
Expand Down Expand Up @@ -203,6 +268,23 @@ END
COPY_EXISTING ~melstone.spl~ ~override~
WRITE_BYTE 0x27 7 // change secondary to Combat Protections
BUT_ONLY



// tbd, cam
// shield spell shouldn't stack
COPY_EXISTING ~spwi114.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode = 142 opcode = 321 power = 0 parameter2 = 0 timing = 1 duration = 0 STR_VAR insert = first resource = EVAL ~%SOURCE_RES%~ END
BUT_ONLY



// tbd, cam
// know alignment's save should match description
COPY_EXISTING ~spwi208.spl~ ~override~ // know alignment, arcane - lacks saving throw
~sppr209.spl~ ~override~ // know alignment, divine - has -2 penalty
LPF ALTER_EFFECT INT_VAR savingthrow = BIT0 savebonus = 0 END
BUT_ONLY



Expand Down Expand Up @@ -763,6 +845,10 @@ WITH_SCOPE BEGIN
BUT_ONLY_IF_IT_CHANGES
END

// tbd, cam
// don't play berserk damage warnings on non-party memebers; see also spin117[ab].eff
INCLUDE ~eefixpack/files/tph/tbd_angry_noises.tph~

///// \\\\\
///// projectile fixes \\\\\
///// \\\\\
Expand Down
17 changes: 17 additions & 0 deletions eefixpack/files/tph/bgee.tph
Expand Up @@ -556,6 +556,19 @@ END
///// spell fixes \\\\\
///// \\\\\

// tbd, cam
// shield spell shouldn't stack
COPY_EXISTING ~spwi114.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode = 142 opcode = 321 power = 0 parameter2 = 0 timing = 1 duration = 0 STR_VAR insert = first resource = EVAL ~%SOURCE_RES%~ END
BUT_ONLY

// tbd, cam
// know alignment's save should match description
COPY_EXISTING ~spwi208.spl~ ~override~ // know alignment, arcane - lacks saving throw
~sppr209.spl~ ~override~ // know alignment, divine - has -2 penalty
LPF ALTER_EFFECT INT_VAR savingthrow = BIT0 savebonus = 0 END
BUT_ONLY

// luke
// Mis-indexed effects
WITH_SCOPE BEGIN
Expand Down Expand Up @@ -1209,6 +1222,10 @@ WITH_SCOPE BEGIN
BUT_ONLY_IF_IT_CHANGES
END

// tbd, cam
// don't play berserk damage warnings on non-party memebers; see also spin117[ab].eff
INCLUDE ~eefixpack/files/tph/tbd_angry_noises.tph~

///// \\\\\
///// projectile fixes \\\\\
///// \\\\\
Expand Down
4 changes: 4 additions & 0 deletions eefixpack/files/tph/iwdee.tph
Expand Up @@ -726,6 +726,10 @@ WITH_SCOPE BEGIN
BUT_ONLY_IF_IT_CHANGES
END

// tbd, cam
// don't play berserk damage warnings on non-party memebers; see also spin117[ab].eff
INCLUDE ~eefixpack/files/tph/tbd_angry_noises.tph~

///// \\\\\
///// store fixes \\\\\
///// \\\\\
Expand Down
40 changes: 40 additions & 0 deletions eefixpack/files/tph/tbd_angry_noises.tph
@@ -0,0 +1,40 @@
// default bg2 strings
OUTER_SET berserk_string1 = 20723 // When the berserk state ends, the character will take 15 points of damage.
OUTER_SET berserk_string2 = 20726 // The berserk state has ended...

ACTION_IF game_is_bgee BEGIN
OUTER_SET berserk_string1 = 25829
OUTER_SET berserk_string2 = 25830
END

ACTION_IF game_is_iwdee BEGIN
OUTER_SET berserk_string1 = 36021
OUTER_SET berserk_string2 = 36023
END

// since it's only one effect, just 177 it. No need for a 326; 318/324 won't work since there's a trailing 206
COPY_EXISTING ~spcl321.spl~ ~override~ // berserker enrage
~spcl321d.spl~ ~override~ // berserker enrage (cooldown)
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 139 match_parameter1 = berserk_string1 opcode = 177 parameter1 = 30 parameter2 = 2 STR_VAR resource = spin117a END // only for GOODCUTOFF
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 139 match_parameter1 = berserk_string2 opcode = 177 parameter1 = 30 parameter2 = 2 STR_VAR resource = spin117b END // only for GOODCUTOFF
BUT_ONLY

COPY ~eefixpack/files/eff/spin117a.eff~ ~override~
WRITE_LONG 0x1c berserk_string1 // When the berserk state ends, the character will take 15 damage.

COPY ~eefixpack/files/eff/spin117a.eff~ ~override/spin117b.eff~
WRITE_LONG 0x1c berserk_string2 // The berserk state has ended...

ACTION_IF !game_is_iwdee BEGIN

COPY_EXISTING ~spin117.spl~ ~override~ // minsc's berserk (also used by, randomly, Gorf)
WRITE_ASCII 0x10 ~~ #8 // blank casting sound since it's beng moved to an effect
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 139 match_parameter1 = berserk_string1 opcode = 177 parameter1 = 30 parameter2 = 2 STR_VAR resource = spin117a END // only for GOODCUTOFF
LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 139 match_parameter1 = berserk_string2 opcode = 177 parameter1 = 30 parameter2 = 2 STR_VAR resource = spin117b END // only for GOODCUTOFF
LPF CLONE_EFFECT STR_VAR match_resource = spin117a resource = spin117c END // clone into new effect for minsc's line
BUT_ONLY

COPY ~eefixpack/files/eff/spin117a.eff~ ~override/spin117c.eff~
WRITE_LONG 0x10 174 // play sound
WRITE_ASCII 0x30 ~minsc02~ #8
END
6 changes: 0 additions & 6 deletions eefixpack/languages/en_us/_fixes_bg2ee.tra

This file was deleted.

1 change: 1 addition & 0 deletions eefixpack/languages/en_us/bg2ee.tra
@@ -0,0 +1 @@
@100 = ~Elemental destroyed~
18 changes: 18 additions & 0 deletions eefixpack/languages/en_us/fixes_bg2ee.tra
@@ -0,0 +1,18 @@
// this will form the basis for the string fixes for this game. Simply add strings as needed and the installer will replace
// the corresponding string in the tlk. Remember to comment why a string is being updated. Once you have legitimate
// strings to replace, rename this file WITHOUT the underscore at the beginning.

// last line: the ruins are west of imnesvale, not north
@17169 = ~Wallag,
We travel this day to search out the wolf lair. My own scouting of the region has confirmed Merella's suspicions that there is a large pack of wolves acting in this area. On the map included, I have indicated where I believe the wolf den to be located. Follow us if you can, but be cautious. We can ill-afford another mysterious disappearance. Until we meet again.

Mazzy

(On the same sheet is drawn a crude but effective map which indicates the path to a forested area several hours west of the Imnesvale region.)~

// second line: the ruins are west of imnesvale, not east
@19723 = ~This is half of a page of parchment, yellowed with age, the ink faded but still legible, and reads:

"This land near the Umar Hills is rich with mithral deposits, but unfortunately too many scoundrels and bandits have noted this and are preying upon the prospectors in the area with a vengeance. I have found an excellent hiding place for my mithral cache, one that those thieves are sure not to find. It is far to the west of Imnesvale village, in a forest—"

Below this section, the page is torn and jagged, as if it has been ripped from its other half.~

0 comments on commit 2b591e1

Please sign in to comment.