-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-customs.tp2
134 lines (115 loc) · 3.43 KB
/
setup-customs.tp2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
BACKUP ~customs/backup~
AUTHOR ~Charles and Henry~
VERSION ~v0.1b~
LANGUAGE
~English~
~english~
~customs/tra/english/items.tra~
~customs/tra/english/setup.tra~
~customs/tra/english/taerom.tra~
~customs/tra/english/thalan.tra~
~customs/tra/english/halbaz.tra~
LANGUAGE
~Français~
~french~
~customs/tra/english/items.tra~
~customs/tra/english/setup.tra~
~customs/tra/english/taerom.tra~
~customs/tra/english/thalan.tra~
~customs/tra/english/halbaz.tra~
~customs/tra/french/items.tra~
~customs/tra/french/setup.tra~
~customs/tra/french/taerom.tra~
~customs/tra/french/thalan.tra~
~customs/tra/french/halbaz.tra~
/*
* Core component: install weapons and dialog with Taerom, Thalantyr and Halbazzer
*/
BEGIN @9001
INCLUDE ~customs/lib/items.tpa~
ACTION_IF GAME_IS ~bgee eet~ THEN BEGIN
COMPILE ~customs/dlg/taerom.d~
COMPILE ~customs/dlg/thalan.d~
COMPILE ~customs/dlg/halbaz.d~
END
ACTION_IF GAME_IS ~bg2ee~ THEN BEGIN
INCLUDE ~customs/lib/imports.tpa~
END
/*
* Remove or relocate Ashideena: remove it from the game.
*/
BEGIN @9003
SUBCOMPONENT @9002
REQUIRE_PREDICATE GAME_IS ~bgee eet~ @9008
COPY_EXISTING ~BASSIL.CRE~ ~override~
READ_LONG 0x2BC itemsoffset
READ_LONG 0x2B8 slotsoffset
READ_SSHORT (slotsoffset + 0x12) weapon1slot
PATCH_IF (weapon1slot >= "0") BEGIN
READ_ASCII (itemsoffset + weapon1slot * 0x14) weapon1res
PATCH_IF (~%weapon1res%~ STR_EQ ~HAMM03~) BEGIN
REPLACE_CRE_ITEM ~HAMM02.ITM~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
END
END
BUT_ONLY
/*
* Remove or relocate Ashideena: relocate it to Diyab in the Iron Throne.
*/
BEGIN @9004
SUBCOMPONENT @9002
REQUIRE_PREDICATE GAME_IS ~bgee eet~ @9008
COPY_EXISTING ~BASSIL.CRE~ ~override~
READ_LONG 0x2BC itemsoffset
READ_LONG 0x2B8 slotsoffset
READ_SSHORT (slotsoffset + 0x12) weapon1slot
PATCH_IF (weapon1slot >= "0") BEGIN
READ_ASCII (itemsoffset + weapon1slot * 0x14) weapon1res
PATCH_IF (~%weapon1res%~ STR_EQ ~HAMM03~) BEGIN
REPLACE_CRE_ITEM ~HAMM02~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
INNER_ACTION BEGIN
COPY_EXISTING ~DIYAB.CRE~ ~override~
REPLACE_CRE_ITEM ~HAMM03~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
BUT_ONLY
END
END
END
BUT_ONLY
/*
* Remove or relocate Varscona: remove it from the game.
*/
BEGIN @9006
SUBCOMPONENT @9005
REQUIRE_PREDICATE GAME_IS ~bgee eet~ @9008
COPY_EXISTING ~GREYWO.CRE~ ~override~
READ_LONG 0x2BC itemsoffset
READ_LONG 0x2B8 slotsoffset
READ_SSHORT (slotsoffset + 0x12) weapon1slot
PATCH_IF (weapon1slot >= "0") BEGIN
READ_ASCII (itemsoffset + weapon1slot * 0x14) weapon1res
PATCH_IF (~%weapon1res%~ STR_EQ ~SW1H06~) BEGIN
REPLACE_CRE_ITEM ~SW1H05~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
END
END
BUT_ONLY
/*
* Remove or relocate Varscona: relocate it to Gardush in the Iron Throne.
*/
BEGIN @9007
SUBCOMPONENT @9005
REQUIRE_PREDICATE GAME_IS ~bgee eet~ @9008
COPY_EXISTING ~GREYWO.CRE~ ~override~
READ_LONG 0x2BC itemsoffset
READ_LONG 0x2B8 slotsoffset
READ_SSHORT (slotsoffset + 0x12) weapon1slot
PATCH_IF (weapon1slot >= "0") BEGIN
READ_ASCII (itemsoffset + weapon1slot * 0x14) weapon1res
PATCH_IF (~%weapon1res%~ STR_EQ ~SW1H06~) BEGIN
REPLACE_CRE_ITEM ~SW1H05~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
INNER_ACTION BEGIN
COPY_EXISTING ~GARDUS.CRE~ ~override~
REPLACE_CRE_ITEM ~SW1H06~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
BUT_ONLY
END
END
END
BUT_ONLY