Skip to content

Commit

Permalink
v1.0RC7c
Browse files Browse the repository at this point in the history
- fixed bug in SAVENAME.2DA
- BG1 Dreams no longer triggers if game is started in SoD, SoA, ToB
- EET_end now supports filemerging using "!" character (LEXAR weidu
ERROR)
- expanded EET_NPC_TRANSITION function to support NPCs joinable only in
ToB (related to compatibility with Saradas_Magic_2)
  • Loading branch information
K4thos committed Nov 7, 2016
1 parent d05a140 commit 65c9d87
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 225 deletions.
28 changes: 28 additions & 0 deletions EET/docs/Modder's Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ <h3>Adding support for NPC transition system</h3>
//1 - BG1/SoD NPC without BG2 content (NPC is disabled from game after BG1, mentioned but not summonable in ToB)
//2 - BG2 NPC without BG1 content (transition to ToB if joined the party at least once during SoA)
//3 - NPC with BG1 and BG2 content (full transition to SoA/ToB)
//4 - NPC joinable only in ToB (creates new creature)
default_ToB = 0 //controls if NPC should be spawnable in ToB when the game has been started in ToB (no by default - 0)
clean_ToB = 0 //cleans out existing EET code in FATESP.DLG, AR4000.BCS, AR4500.BCS for DV specified in clean_ToB_DV
STR_VAR
Expand Down Expand Up @@ -590,6 +591,7 @@ <h3>Adding support for NPC transition system</h3>
override_SoD = "BDIMOEN"
traFile = "ModFolder/language/%LNGUAGE%/dialog.tra"
string = "@1"
stringPosDV = "Jaheira"
END

//example for BG2 NPC without BG1 content
Expand All @@ -603,6 +605,7 @@ <h3>Adding support for NPC transition system</h3>
dialog_ToB = "IMOEN25A"
traFile = "ModFolder/language/%LNGUAGE%/dialog.tra"
string = "@1"
stringPosDV = "Jaheira"
END

//example for NPC with BG1 and BG2 content (type = 3 can be also used to add transition into vanilla BG1 NPC without it)
Expand All @@ -618,6 +621,18 @@ <h3>Adding support for NPC transition system</h3>
dialog_ToB = "IMOEN25A"
traFile = "ModFolder/language/%LNGUAGE%/dialog.tra"
string = "@1"
stringPosDV = "Jaheira"
END

//example for NPC joinable only in ToB
LAF ~EET_NPC_TRANSITION~
INT_VAR
type = 4
STR_VAR
dv = "IMOEN2"
traFile = "ModFolder/language/%LNGUAGE%/dialog.tra"
string = "@1"
stringPosDV = "Jaheira"
END

//example of implementing type of transition depending on detection if separate mod with type = 1 transition has been installed
Expand All @@ -639,6 +654,7 @@ <h3>Adding support for NPC transition system</h3>
dialog_ToB = "IMOEN25A"
traFile = "ModFolder/language/%LNGUAGE%/dialog.tra"
string = "@1"
stringPosDV = "Jaheira"
END
</pre>
</div>
Expand Down Expand Up @@ -756,6 +772,18 @@ <h3>Adding support for NPC transition system</h3>
ActionOverride("%dv%",SetNumTimesTalkedTo(0))
SetGlobal("%SpawnPlaneVar%","GLOBAL",1)
END

IF
Global("NEWGAME_TOB","GLOBAL",1)
Global("%SummonedVar%","GLOBAL",1)
Global("%SpawnPlaneVar%","GLOBAL",0)
THEN
RESPONSE #100
CreateVisualEffect("SPPORTAL",[1999.1218])
Wait(2)
CreateCreature("%dv%",[1999.1218],S)
SetGlobal("%SpawnPlaneVar%","GLOBAL",1)
END
</pre>
</div>
</ul>
Expand Down
36 changes: 23 additions & 13 deletions EET/lib/EET_core.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -2303,17 +2303,27 @@ INCLUDE ~EET/lib/bgee_fixpack.tph~
///// Exe patching \\\\\
///// \\\\\

COPY ~Baldur%exe%~ ~Baldur%exe%~
REPLACE_TEXTUALLY ~NITEDAY~ ~~ (7)
REPLACE_TEXTUALLY ~DAYNITE~ ~~ (7)
REPLACE_TEXTUALLY ~SPIN649~ ~~ (7)
REPLACE_TEXTUALLY ~SPIN822~ ~~ (7)
//change default campaign
REPLACE_TEXTUALLY ~SOD~ ~BG1~
REPLACE_TEXTUALLY ~Never Show Nuisance BG1~ ~Never Show Nuisance SOD~
REPLACE_TEXTUALLY ~Edition/BG1save~ ~Edition/sodsave~
REPLACE_TEXTUALLY ~usingBG1StartMenu~ ~usingSODStartMenu~
BUT_ONLY
ACTION_IF ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
OUTER_SPRINT exec ~Baldur.exe~
END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN
OUTER_SPRINT exec ~../MacOS/BaldursGateIIEnhancedEdition~
END

ACTION_IF FILE_EXISTS ~%exec%~ BEGIN
COPY ~%exec%~ ~%exec%~
REPLACE_TEXTUALLY ~NITEDAY~ ~~ (7)
REPLACE_TEXTUALLY ~DAYNITE~ ~~ (7)
REPLACE_TEXTUALLY ~SPIN649~ ~~ (7)
REPLACE_TEXTUALLY ~SPIN822~ ~~ (7)
//change default campaign
REPLACE_TEXTUALLY ~SOD~ ~BG1~
REPLACE_TEXTUALLY ~Never Show Nuisance BG1~ ~Never Show Nuisance SOD~
REPLACE_TEXTUALLY ~Edition/BG1save~ ~Edition/sodsave~
REPLACE_TEXTUALLY ~usingBG1StartMenu~ ~usingSODStartMenu~
BUT_ONLY
END ELSE BEGIN
WARN ~WARNING: %exec% doesn't exist~
END

///// \\\\\
///// Biffing \\\\\
Expand Down Expand Up @@ -2437,7 +2447,7 @@ COPY ~%WEIDU_EXECUTABLE%~ ~setup-EET_end%exe%~

ACTION_IF (~%argv[0]%~ STRING_CONTAINS_REGEXP ~[Ss]~ = 0) BEGIN
PRINT ~Skipping shortcut creation~
END ELSE ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN
END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
<<<<<<<< .../userprofile.bat
@echo off
for /f "usebackq tokens=3*" %%D IN (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) do set DESKTOP=%%D
Expand Down Expand Up @@ -2473,7 +2483,7 @@ del %SCRIPT%
AT_NOW ~shortcut.bat~
DELETE + ~shortcut.bat~
COPY ~EET/temp/EET.lnk~ ~%dir%~
END ELSE ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ BEGIN
END ELSE ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN
//commented out until someone test it and confirm that it works
/*ACTION_FOR_EACH var IN PWD HOME BEGIN
<<<<<<<< .../path.command
Expand Down
7 changes: 3 additions & 4 deletions EET/lib/EET_end.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ CLEAR_ARRAYS
///// Save patcher \\\\\
///// \\\\\

ACTION_IF (~%argv[0]%~ STRING_CONTAINS_REGEXP ~[Yy]~ = 1)
AND FILE_EXISTS ~%USER_DIRECTORY%/save/saves.tra~
ACTION_IF FILE_EXISTS ~%USER_DIRECTORY%/save/saves.tra~
AND FILE_EXISTS ~%USER_DIRECTORY%/save/saves.txt~
AND !FILE_CONTAINS ~override/EET.flag~ ~SAVES_UPDATED~
AND !FILE_CONTAINS ~override/EET.flag~ ~TRA_EXPORTED~ BEGIN
Expand Down Expand Up @@ -218,8 +217,8 @@ ACTION_PHP_EACH table_append_dlg AS file => var BEGIN
SPRINT trigger ~ObjectActionListEmpty(Myself)%LNL%%trigger%%LNL%~
END
END ~%MATCH1%%trigger%%MATCH2%~
REPLACE_TEXTUALLY CASE_SENSITIVE ~THEN BEGIN \([0-9]+\)~ ~THEN BEGIN %file%\1~
REPLACE_TEXTUALLY CASE_SENSITIVE ~GOTO \([0-9]+\)~ ~GOTO %file%\1~
REPLACE_TEXTUALLY CASE_SENSITIVE "THEN BEGIN \([0-9]+\)" "THEN BEGIN ~%file%\1~"
REPLACE_TEXTUALLY CASE_SENSITIVE "GOTO \([0-9]+\)" "GOTO ~%file%\1~"
REPLACE_TEXTUALLY ~~~~~^BEGIN \(~\)%SOURCE_RES%\(~\)$~~~~~ ~APPEND \1%file_1%\2~
APPEND_FILE ~.../end.txt~
COMPILE ~EET/temp/append/dlg/%file%.d~
Expand Down
2 changes: 1 addition & 1 deletion EET/lib/bg1_BCS.tph
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ IF
THEN
RESPONSE #100
SetGlobal("K#NewGame","BD0120",1)
SetGlobal("DREAM","GLOBAL",-1)
SetGlobal("DREAM","GLOBAL",7)
SetGlobal("ENDOFBG1","GLOBAL",1)
SetGlobal("NEWGAME_SOD","GLOBAL",1)
//SetGlobal("K#temp","GLOBAL",364)
Expand Down
1 change: 1 addition & 0 deletions EET/lib/bg2_2DA.tph
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,7 @@ BUT_ONLY
///// \\\\\

<<<<<<<< .../SAVENAME.2da

25 232737 25 1
26 232728 26 1
27 232731 27 1
Expand Down
4 changes: 2 additions & 2 deletions EET/lib/bg2_BCS.tph
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ IF
THEN
RESPONSE #100
SetGlobal("K#NewGame","AR0602",1)
SetGlobal("DREAM","GLOBAL",-1)
SetGlobal("DREAM","GLOBAL",7)
SetGlobal("ENDOFBG1","GLOBAL",2)
SetGlobal("NEWGAME_SOA","GLOBAL",1)
//SetGlobal("K#temp","GLOBAL",364)
Expand Down Expand Up @@ -3003,7 +3003,7 @@ IF
THEN
RESPONSE #100
SetGlobal("K#NewGame","AR4000",1)
SetGlobal("DREAM","GLOBAL",-1)
SetGlobal("DREAM","GLOBAL",7)
SetGlobal("XPGiven","GLOBAL",0)
SetGlobal("INTOB","GLOBAL",1)
SetGlobal("StartMP","GLOBAL",1)
Expand Down
202 changes: 0 additions & 202 deletions EET/lib/pcu_dict.tph
Original file line number Diff line number Diff line change
Expand Up @@ -2624,205 +2624,3 @@ END
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_sum BEGIN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_kit BEGIN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_race BEGIN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_class BEGIN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_spec BEGIN
10 => 2 //ALLIES
CULTIST => ALLIES //10
12 => 3 //ALLIES3
SHARRAN => ALLIES3 //12
20 => 4 //CRUSADERS
HOSTILES => CRUSADERS //20
64 => 6 //SORCERER
SHOU_MONK => SORCERER //64
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_ipro BEGIN
6 => 2 //ARROW
10 => 7 //AXE
11 => 7 //AXE
15 => 12 //BOLT
16 => 12 //BOLT
20 => 17 //BULLET
21 => 17 //BULLET
30 => 27 //DAGGER
31 => 27 //DAGGER
35 => 32 //DART
36 => 32 //DART
59 => 56 //SPEAR
60 => 56 //SPEAR
325 => 332 //WRITHING
327 => 337 //BDSTINK
328 => 338 //BDBAREA
329 => 339 //BDDRAGGH
330 => 340 //bdarowfl
331 => 341 //PSHAMMA
332 => 342 //PSHAMMB
333 => 343 //PSHAMMG
334 => 344 //PSHAMMN
335 => 345 //PSHAMMO
336 => 346 //BDMIST
337 => 347 //IDPRO282
338 => 348 //bdimodag
339 => 349 //BDVRPO
340 => 350 //BDVRNP
341 => 351 //BDNEARE
342 => 352 //BDDRGGRY
343 => 353 //BDDARK15
344 => 354 //WHIRLW
345 => 355 //BDSHADOW
346 => 356 //BDARRFLM
347 => 357 //BDARRREG
348 => 358 //BDARREXP
349 => 359 //FSTRIKH
350 => 360 //BDBELINF
351 => 361 //BDBELBLZ
352 => 333 //BDSPFIRE
353 => 362 //BDNEOBRE
354 => 334 //BDETHRET
355 => 363 //BDMUCOUS
356 => 364 //BDNEOAWE
356 => 364 //BDNEOAWE
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_mus BEGIN
1 => 107 //CDay1
2 => 108 //CDay2
3 => 109 //CNite
4 => 110 //Chants
5 => 111 //Dream
6 => 0 //Unused01
7 => 112 //FDay
8 => 113 //FNite
9 => 114 //PDay
10 => 115 //PNite
11 => 116 //Temple
12 => 0 //Unused02
13 => 117 //TDay1
14 => 118 //TDay2
15 => 119 //TNite
16 => 120 //Dung1
17 => 121 //Dung2
18 => 122 //Dung3
19 => 123 //BC3
20 => 124 //BC4
21 => 125 //BD4
22 => 126 //BD5
23 => 127 //BL1
24 => 128 //BL2
25 => 129 //BF3
26 => 130 //BF4
27 => 131 //BP3
28 => 132 //BP4
29 => 133 //BW1
30 => 0 //Unused03
31 => 134 //Fort
32 => 135 //Chapter
33 => 136 //BGTHEME
34 => 66 //TAV5
35 => 66 //Tav1_d
36 => 67 //TAV6
37 => 137 //TAV7
38 => 138 //TAV8
39 => 0 //Unused05
40 => 0 //Unused06
41 => 0 //Unused07
42 => 0 //Unused08
43 => 0 //Unused09
44 => 0 //Unused10
45 => 0 //Unused11
46 => 0 //Unused12
47 => 0 //Unused13
48 => 0 //Unused14
49 => 0 //Unused15
50 => 0 //Unused16
51 => 0 //Unused17
52 => 0 //Unused18
53 => 0 //Unused19
54 => 0 //Unused20
55 => 0 //Unused21
56 => 0 //Unused22
57 => 0 //Unused23
58 => 0 //Unused24
59 => 0 //Unused25
60 => 139 //BD7100
61 => 140 //BD7200
62 => 141 //BDBGMX
63 => 142 //BDBGNX
64 => 143 //Fort2
65 => 144 //INite
66 => 145 //BDDRM1
67 => 146 //BD100X
68 => 0 //Unused25
69 => 147 //BD200X
70 => 148 //BD300X
71 => 149 //BD410X
72 => 150 //BD440X
73 => 151 //BD510X
74 => 152 //SoDTheme
75 => 153 //BDCW
76 => 154 //BDCU
77 => 155 //BDBFB
78 => 156 //BDDSB
79 => 157 //BDBEC
80 => 158 //BDLBB
81 => 136 //NewTheme
82 => 159 //OldTheme
83 => 160 //BDMANX
84 => 102 //BPC1
85 => 103 //BPC2
86 => 104 //BPC3
87 => 105 //BPStg
88 => 106 //BPTheme
89 => 161 //NAdoys
90 => 162 //NGoblin
91 => 163 //RPeaks
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_bam BEGIN
SPIN205A => SPIN204A //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
SPIN205B => SPIN204B //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
SPIN205C => SPIN204C //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_eff BEGIN
SPIN205A => SPIN204A //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
SPIN205B => SPIN204B //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_itm BEGIN
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_spl BEGIN
SPWI228 => SPWI225 //WIZARD_DARKNESS_15_FOOT
SPWI975 => SPWI901 //WHITE_HOLY_MIGHT
SPIN191 => SPIN128 //BOMBARDIER_BEETLE_CLOUD
SPIN205 => SPIN204 //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
SPIN412 => SPIN401 //SET_SNARE_ENEMY
SPIN413 => SPIN402 //THIEF_STEALTH
SPIN500 => SPIN501 //PSIONIC_DIMENSION_WALK
SPIN501 => SPIN502 //PSIONIC_TELEKINESIS
SPIN502 => SPIN503 //PSIONIC_ID_INSINUATION
SPIN503 => SPIN504 //PSIONIC_CONTROL_BODY
SPIN504 => SPIN505 //PSIONIC_TASTE_LINK
SPIN520 => SPIN506 //NEOTHELID_BREATH
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY remapped_splName BEGIN
3191 => BOMBARDIER_BEETLE_CLOUD //BOMBARDIER_BEETLE_CLOUD
3205 => MKHIIN_SUMMON_ANCESTRAL_GUARDIAN //MKHIIN_SUMMON_ANCESTRAL_GUARDIAN
3412 => SET_SNARE_ENEMY //SET_SNARE_ENEMY
3413 => THIEF_STEALTH //THIEF_STEALTH
2228 => WIZARD_DARKNESS_15_FOOT //WIZARD_DARKNESS_15_FOOT
END

Loading

0 comments on commit 65c9d87

Please sign in to comment.