Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 4a884b69b9
Fetching contributors…

Cannot retrieve contributors at this time

6503 lines (6052 sloc) 266.794 kB
/*
* "The BG1 NPC Project"
* Combined Tutu/BGT installer
* authored and coded by tons of dedicated people from all walks of life
* Version 20
*/
/* Backup folder */
BACKUP ~bg1npc/backup~
/* Author */
AUTHOR ~The BG1 NPC Project Team: forums.gibberlings3.net/index.php?showforum=45~
/* enable all error messages; nothing suppressed. comment this out for release version - cmorgan */
// MODDER
/* WeiDU v204 allows tp2 level version listing in the .log, so no more tra changes */
VERSION ~v20~
/* launch the readme file immediately. If you want to disable the ReadMe, place two slashes before it, like // README */
/* Isaya : display in native selected language if available, otherwise english */
README ~bg1npc/readme-bg1npc-%LANGUAGE%.html~ ~bg1npc/readme-bg1npc.html~
ALWAYS
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
PRINT @1000 /* Tell the player it is using Tutu stuff */
INCLUDE ~BG1NPC\lib\g3_tutu_cpmvars.tpa~
END ELSE BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.are~ THEN BEGIN
PRINT @1001 /* Tell the player it is using BGT stuff */
INCLUDE ~BG1NPC\lib\g3_bgt_cpmvars.tpa~
END ELSE BEGIN
FAIL @1002 /* Tell the player it is not Tutu or BGT */
END
END
/* alter fluid states */
INCLUDE ~BG1NPC\lib\g3_fluid_cpmvars.tpa~
/* prep tras for sound references */
COPY ~BG1NPC/TRA/%LANGUAGE%/BG1NPC_tmp.tra~ ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~
EVALUATE_BUFFER
LOAD_TRA ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~
END
/* Language Settings */
AUTO_TRA ~bg1npc/tra/%s~
LANGUAGE ~English~ ~english~ ~bg1npc/tra/english/setup.tra~
LANGUAGE ~Espanol (traducido por Clan DLAN)~ ~spanish~ ~bg1npc/tra/spanish/setup.tra~
LANGUAGE ~Francais (traduit par les d'Oghmatiques)~ ~french~ ~bg1npc/tra/french/setup.tra~
/* BEGIN The BG1 NPC Project: Required Modifications */
BEGIN @1005
/* Tells other mods BG1NPC Core is installed */
COPY ~BG1NPC/Core/X#component.xx~ ~override/X#BG1NPCCore.G3~
/* makes sure PIDs go last */
UNINSTALL ~bg1npc.tp2~ 200
/* allows us to regexp match tabs and newlines */
INCLUDE ~BG1NPC/LIB/extra_regexp_vars.tpa~
/* Defines regexp whitespaces */
OUTER_SPRINT "whitespace" "[%tab% %lnl%%mnl%%wnl%]+"
/* Ascension64's Bere"gost" Fix - very cool! AR3300, FW3300, AR6700 (BG1, BGTutu, BGT) */
ACTION_FOR_EACH ~filetofix~ IN ~fw3300.are~ ~ar6700.are~ BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%filetofix%~ THEN BEGIN
COPY_EXISTING ~%filetofix%~ ~override~
READ_LONG 0xA4 nDoors
READ_LONG 0xA8 offDoors
READ_LONG 0x7C offPoints
READ_LONG 0x80 nPoints
SET i = 0
FOR (i = 0; i < nDoors; i += 1) BEGIN
READ_ASCII ( %offDoors% + %i% * 0xC8 + 0x20 ) DoorId
PATCH_IF ( "%DoorId%" STRING_EQUAL "DOOR3304" ) BEGIN
READ_LONG ( %offDoors% + %i% * 0xC8 + 0x48 ) idxPointsImpededOpen
READ_SHORT ( %offDoors% + %i% * 0xC8 + 0x4C ) nPointsImpededOpen
SET j = 0
FOR (j = %idxPointsImpededOpen%; j < %idxPointsImpededOpen% + %nPointsImpededOpen%; j += 1) BEGIN
READ_SHORT ( %offPoints% + %j% * 0x4) x
READ_SHORT ( %offPoints% + %j% * 0x4 + 0x2) y
PATCH_IF ( x = 243 && y = 326 ) BEGIN
WRITE_SHORT ( %offPoints% + %j% * 0x4) 233
WRITE_SHORT ( %offPoints% + %j% * 0x4 + 0x2) 302
END
PATCH_IF ( x = 243 && y = 327 ) BEGIN
WRITE_SHORT ( %offPoints% + %j% * 0x4) 233
WRITE_SHORT ( %offPoints% + %j% * 0x4 + 0x2) 304
END
PATCH_IF ( x = 242 && y = 325 ) BEGIN
WRITE_SHORT ( %offPoints% + %j% * 0x4) 232
WRITE_SHORT ( %offPoints% + %j% * 0x4 + 0x2) 304
END
PATCH_IF ( x = 233 && y = 303 ) BEGIN
END
END
END
END
END
END
/* Nythrun's Broken CRE Order and Effects Macros are depreciated - her Fix is now part of WeiDU, with troubleshooting/extension by Miloch */
/* Miloch's and older fixes combined here using PATCH_IF - less touching of the file = good thing */
/* As far as I can tell the fixes are from Nythrun, Dudleyville, Miloch (especially Gnome fixes), and Tutu v4 conversion hiccups, and BGT vs Tutu script assignments - cmorgan, March 26, 2011 */
/* Apply Nythrun's Fixes to creatures we use */
ACTION_FOR_EACH ~crefile~ IN ~%tutu_scripta%varicem.cre~
~%tutu_scriptb%ullrush.cre~
~%tutu_scriptbg%neb.cre~
~%tutu_scriptd%ursword.cre~
~%tutu_scriptf%twbax_a.cre~
~%tutu_scripti%ronelit.cre~
~%tutu_scriptm%oorlock.cre~
~%tutu_scripto%grema03.cre~
~%tutu_scripts%handal2.cre~
~%tutu_var%alatos.cre~
~%tutu_var%albert.cre~
~%tutu_var%alvanh.cre~
~%tutu_var%alyth.cre~
~%tutu_var%amaran.cre~
~%tutu_var%angelo.cre~
~%tutu_var%ankheg.cre~
~%tutu_var%arkush.cre~
~%tutu_var%avarice.cre~
~%tutu_var%bandit.cre~
~%tutu_var%baresh.cre~
~%tutu_var%bassil.cre~
~%tutu_var%bayard.cre~
~%tutu_var%bearbl.cre~
~%tutu_var%bearbr.cre~
~%tutu_var%bearca.cre~
~%tutu_var%bearpo.cre~
~%tutu_var%belt.cre~
~%tutu_var%bently.cre~
~%tutu_var%bjorni.cre~
~%tutu_var%brage.cre~
~%tutu_var%brielb.cre~
~%tutu_var%brilla.cre~
~%tutu_var%cadder.cre~
~%tutu_var%calaha.cre~
~%tutu_var%chase.cre~
~%tutu_var%claird.cre~
~%tutu_var%coksmth.cre~
~%tutu_var%daitel.cre~
~%tutu_var%dalton.cre~
~%tutu_var%davaeo.cre~
~%tutu_var%deathk.cre~
~%tutu_var%delain.cre~
~%tutu_var%delsvir.cre~
~%tutu_var%deltan.cre~
~%tutu_var%dopdur1.cre~
~%tutu_var%drienn.cre~
~%tutu_var%drizzt.cre~
~%tutu_var%dryad.cre~
~%tutu_var%durlagt.cre~
~%tutu_var%durlyl.cre~
~%tutu_var%dushai.cre~
~%tutu_var%elmin2.cre~
~%tutu_var%elmin5.cre~
~%tutu_var%ender.cre~
~%tutu_var%entill.cre~
~%tutu_var%erdane.cre~
~%tutu_var%faldor.cre~
~%tutu_var%farmbr.cre~
~%tutu_var%fear.cre~
~%tutu_var%fearm.cre~
~%tutu_var%fenrus.cre~
~%tutu_var%fireb1.cre~
~%tutu_var%flame.cre~
~%tutu_var%galken.cre~
~%tutu_var%galtok.cre~
~%tutu_var%gatewa.cre~
~%tutu_var%gellan.cre~
~%tutu_var%gerde.cre~
~%tutu_var%girba2.cre~
~%tutu_var%gnoll.cre~
~%tutu_var%gorion.cre~
~%tutu_var%grael.cre~
~%tutu_var%greywo.cre~
~%tutu_var%hack.cre~
~%tutu_var%hafiz.cre~
~%tutu_var%halaca.cre~
~%tutu_var%halbaz.cre~
~%tutu_var%hurgan.cre~
~%tutu_var%ike.cre~
~%tutu_var%iron11.cre~
~%tutu_var%isla.cre~
~%tutu_var%jessup.cre~
~%tutu_var%joia.cre~
~%tutu_var%kaisha.cre~
~%tutu_var%karoug.cre~
~%tutu_var%keeper.cre~
~%tutu_var%keldda.cre~
~%tutu_var%kirinh.cre~
~%tutu_var%korax.cre~
~%tutu_var%krumm.cre~
~%tutu_var%landri.cre~
~%tutu_var%larze.cre~
~%tutu_var%liia.cre~
~%tutu_var%love.cre~
~%tutu_var%lovem.cre~
~%tutu_var%madarc.cre~
~%tutu_var%marl.cre~
~%tutu_var%meiala.cre~
~%tutu_var%mendas.cre~
~%tutu_var%mulahe.cre~
~%tutu_var%mutami.cre~
~%tutu_var%narlen.cre~
~%tutu_var%niemai.cre~
~%tutu_var%nobw2.cre~
~%tutu_var%perdue.cre~
~%tutu_var%petrin.cre~
~%tutu_var%pheirk.cre~
~%tutu_var%phlydi3.cre~
~%tutu_var%poe.cre~
~%tutu_var%pride.cre~
~%tutu_var%pridem.cre~
~%tutu_var%prost5.cre~
~%tutu_var%pumberl.cre~
~%tutu_var%rielta.cre~
~%tutu_var%riggilo.cre~
~%tutu_var%sarev1.cre~
~%tutu_var%sarevo.cre~
~%tutu_var%sarhed.cre~
~%tutu_var%scar.cre~
~%tutu_var%seniya.cre~
~%tutu_var%serva2.cre~
~%tutu_var%shoal.cre~
~%tutu_var%silke.cre~
~%tutu_var%skie.cre~
~%tutu_var%slave.cre~
~%tutu_var%taerom.cre~
~%tutu_var%takiyah.cre~
~%tutu_var%tamoko.cre~
~%tutu_var%tarnes.cre~
~%tutu_var%tarnor.cre~
~%tutu_scriptbg%tazok.cre~
~%tutu_var%tazok2.cre~
~%tutu_var%tellan.cre~
~%tutu_var%tenya.cre~
~%tutu_var%thalan.cre~
~%tutu_var%therel.cre~
~%tutu_var%ulraun.cre~
~%tutu_var%unshey.cre~
~%tutu_var%vai.cre~
~%tutu_var%vail.cre~
~%tutu_var%volo.cre~
~%tutu_var%winski.cre~
~%tutu_var%winski2.cre~
~%tutu_var%winthr2.cre~
~%tutu_var%yago.cre~
~%tutu_var%zombie.cre~
~%tutu_var%zombiew.cre~
~%tutu_var%ajanti.cre~
~%tutu_var%ajanti4.cre~
~%tutu_var%ajanti6.cre~
~%tutu_var%alora.cre~
~%tutu_var%alora6.cre~
~%tutu_var%branwe.cre~
~%tutu_var%branwe5.cre~
~%tutu_var%coran.cre~
~%tutu_var%coran5.cre~
~%tutu_var%dynahe.cre~
~%tutu_var%dynahe2.cre~
~%tutu_var%dynahe4.cre~
~%tutu_var%dynahe6.cre~
~%tutu_var%edwin.cre~
~%tutu_var%edwin2.cre~
~%tutu_var%edwin4.cre~
~%tutu_var%edwin6.cre~
~%tutu_var%faldor.cre~
~%tutu_var%faldor5.cre~
~%tutu_var%garric.cre~
~%tutu_var%garric2.cre~
~%tutu_var%garric4.cre~
~%tutu_var%garric6.cre~
~%tutu_var%imoen1.cre~
~%tutu_var%imoen2.cre~
~%tutu_var%imoen4.cre~
~%tutu_var%imoen6.cre~
~%tutu_var%jaheir.cre~
~%tutu_var%jaheir2.cre~
~%tutu_var%jaheir4.cre~
~%tutu_var%jaheir6.cre~
~%tutu_var%kagain.cre~
~%tutu_var%kagain2.cre~
~%tutu_var%kagain4.cre~
~%tutu_var%kagain6.cre~
~%tutu_var%khalid.cre~
~%tutu_var%khalid2.cre~
~%tutu_var%khalid4.cre~
~%tutu_var%khalid6.cre~
~%tutu_var%kivan.cre~
~%tutu_var%kivan4.cre~
~%tutu_var%kivan6.cre~
~%tutu_var%minsc.cre~
~%tutu_var%minsc2.cre~
~%tutu_var%minsc4.cre~
~%tutu_var%minsc6.cre~
~%tutu_var%montar.cre~
~%tutu_var%montar2.cre~
~%tutu_var%montar4.cre~
~%tutu_var%montar6.cre~
~%tutu_scriptbg%quayle.cre~
~%tutu_var%quayle4.cre~
~%tutu_var%quayle6.cre~
~%tutu_var%safana.cre~
~%tutu_var%safana4.cre~
~%tutu_var%safana6.cre~
~%tutu_var%sharte.cre~
~%tutu_var%sharte4.cre~
~%tutu_var%sharte6.cre~
~%tutu_var%skie.cre~
~%tutu_var%skie6.cre~
~%tutu_var%tiax.cre~
~%tutu_var%tiax4.cre~
~%tutu_var%tiax6.cre~
~%tutu_var%viconi.cre~
~%tutu_var%viconi4.cre~
~%tutu_var%viconi6.cre~
~%tutu_scriptbg%xan.cre~
~%tutu_var%xan4.cre~
~%tutu_var%xan6.cre~
~%tutu_var%xzar.cre~
~%tutu_var%xzar2.cre~
~%tutu_var%xzar4.cre~
~%tutu_var%xzar6.cre~
~%tutu_var%yeslic.cre~
~%tutu_var%yeslic5.cre~
~idemon02.cre~
~imp01.cre~
~mepsmo01.cre~
BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%crefile%~ THEN BEGIN
COPY_EXISTING ~%crefile%~ ~override~
LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY
INT_VAR do_message = 1
END
/* do all the stuff we do to .cres in one tower of P_I */
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%ajanti.cre~ = 0) BEGIN
WRITE_BYTE 0x54 12 // Save vs. Death
WRITE_BYTE 0x55 14 // Save vs. Wand
WRITE_BYTE 0x56 13 // Save vs. Polymorph
WRITE_BYTE 0x57 15 // Save vs. Breath
WRITE_BYTE 0x58 15 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%ajanti4.cre~ = 0) BEGIN
WRITE_BYTE 0x54 11 // Save vs. Death
WRITE_BYTE 0x55 13 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 14 // Save vs. Breath
WRITE_BYTE 0x58 14 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%ajanti6.cre~ = 0) BEGIN
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 11 // Save vs. Wand
WRITE_BYTE 0x56 10 // Save vs. Polymorph
WRITE_BYTE 0x57 11 // Save vs. Breath
WRITE_BYTE 0x58 12 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%alora.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_var%ALORA~ #8 // override script
WRITE_ASCIIE 0x2CC ~%tutu_var%ALORA~ #8 // dialog
WRITE_BYTE 0x54 10 // Save vs. Death
WRITE_BYTE 0x55 11 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 12 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%alora6.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_var%ALORA~ #8 // override script
WRITE_ASCIIE 0x2CC ~%tutu_var%ALORA~ #8 // dialog
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 9 // Save vs. Wand
WRITE_BYTE 0x56 11 // Save vs. Polymorph
WRITE_BYTE 0x57 15 // Save vs. Breath
WRITE_BYTE 0x58 10 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%bently.cre~ = 0) BEGIN /* Bentley Mirrorshade (in FAI L1) */
WRITE_SHORT 0x24 50 // Current HP (was 41)
WRITE_SHORT 0x26 50 // Max HP (was 41)
WRITE_SHORT 0x28 0x6204 // Animation (mage_male_gnome, was 0x6202 dwarf)
WRITE_BYTE 0x52 15 // THAC0 (was 16)
WRITE_BYTE 0x55 7 // Save vs. wands (was 9)
WRITE_BYTE 0x58 8 // Save vs. spells (was 10)
WRITE_BYTE 0x6f 1 // Small swords (was 3)
WRITE_BYTE 0x235 11 // Level 2 (was 10)
WRITE_BYTE 0x236 1 // Level 3 (was 6)
WRITE_BYTE 0x23a 17 // Intelligence (was 16)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_ASCII 0x250 ~mage10b~ #8 // Class script
REMOVE_MEMORIZED_SPELL ~spwi211~ ~spwi303~ ~spwi401~
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ (4) // Magic Missile
ADD_MEMORIZED_SPELL ~spwi118~ #0 ~wizard~ // Chromatic Orb
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (4) // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi212~ #1 ~wizard~ // Mirror Image
ADD_MEMORIZED_SPELL ~spwi302~ #2 ~wizard~ // Dispel Magic
ADD_MEMORIZED_SPELL ~spwi303~ #2 ~wizard~ // Flame Arrow
ADD_MEMORIZED_SPELL ~spwi306~ #2 ~wizard~ // Hold Person
ADD_MEMORIZED_SPELL ~spwi311~ #2 ~wizard~ // Protection From Normal Missiles
ADD_MEMORIZED_SPELL ~spwi401~ #3 ~wizard~ // Confusion
ADD_MEMORIZED_SPELL ~spwi407~ #3 ~wizard~ // Monster Summoning 2
ADD_MEMORIZED_SPELL ~spwi423~ #3 ~wizard~ // Spider Spawn
ADD_MEMORIZED_SPELL ~spwi506~ #4 ~wizard~ // Domination
ADD_MEMORIZED_SPELL ~spwi521~ #4 ~wizard~ // Conjure Lesser Earth Elemental
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_branwe.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_BRANWE~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_branwe5.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_BRANWE~ #8 // override script
WRITE_BYTE 0x66 5 // Lore
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~branwe.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGBRANW~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~branwe5.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGBRANW~ #8 // override script
WRITE_BYTE 0x66 5 // Lore
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%coran.cre~ = 0) BEGIN
WRITE_BYTE 0x24 24 // Current Hit Points
WRITE_BYTE 0x26 24 // Maximum Hit Points
WRITE_BYTE 0x66 9 // Lore
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%coran5.cre~ = 0) BEGIN
WRITE_BYTE 0x66 15 // Lore
WRITE_BYTE 0x52 16 // THAC0
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%delsvir.cre~ = 0) BEGIN /* Delsvirtanyon (in Ulgoth's Beard) */
WRITE_LONG 0x14 976 // XP Value (was 801)
WRITE_SHORT 0x28 0x6304 // Animation (thief_male_gnome, was 0x5302 dwarf_low)
WRITE_BYTE 0x52 17 // THAC0 (was 16)
WRITE_BYTE 0x54 12 // Save vs. death (was 11)
WRITE_BYTE 0x55 7 // Save vs. wands (was 9)
WRITE_BYTE 0x56 11 // Save vs. polymorph (was 10)
WRITE_BYTE 0x58 8 // Save vs. spells (was 10)
WRITE_BYTE 0x6f 1 // Small swords (was 3)
WRITE_BYTE 0x235 7 // Level 2 (was 1)
WRITE_BYTE 0x236 1 // Level 3 (was 6)
WRITE_BYTE 0x237 1 // Sex (male, was 158)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%mage6~ #8 // Race script
WRITE_BYTE 0x275 1 // Gender (male, was 158)
REMOVE_MEMORIZED_SPELL ~spwi211~ ~spwi303~ ~spwi401~ ~spwi505~
REMOVE_KNOWN_SPELL ~spwi505~ // Shadow Door
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ (4) // Magic Missile
ADD_MEMORIZED_SPELL ~spwi118~ #0 ~wizard~ // Chromatic Orb
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (3) // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi217~ #1 ~wizard~ // Agannazar's Scorcher
ADD_MEMORIZED_SPELL ~spwi303~ #2 ~wizard~ (2) // Flame Arrow
ADD_MEMORIZED_SPELL ~spwi304~ #2 ~wizard~ // Fireball
ADD_MEMORIZED_SPELL ~spwi401~ #2 ~wizard~ (2) // Confusion
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%dushai.cre~ = 0) BEGIN // Dushai (in Ulgoth's Beard)
WRITE_LONG 0x14 2001 // XP Value (was 11)
WRITE_SHORT 0x24 55 // Current HP (was 25)
WRITE_SHORT 0x26 55 // Max HP (was 25)
WRITE_SHORT 0x28 0x6014 // Animation (cleric_female_gnome, was 0x6013 halfling)
WRITE_BYTE 0x52 16 // THAC0 (was 5)
WRITE_BYTE 0x54 7 // Save vs. death (was 5)
WRITE_BYTE 0x55 6 // Save vs. wands (was 5)
WRITE_BYTE 0x56 10 // Save vs. polymorph (was 5)
WRITE_BYTE 0x57 13 // Save vs. breath (was 5)
WRITE_BYTE 0x58 7 // Save vs. spells (was 5)
WRITE_BYTE 0x59 100 // Resist fire
WRITE_BYTE 0x5e 80 // Resist magic fire
WRITE_BYTE 0x72 1 // Blunt weapons
WRITE_BYTE 0x75 1 // Missile weapons
WRITE_BYTE 0x234 9 // Level 1 (was 10)
WRITE_BYTE 0x23c 16 // Dexterity (was 12)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist, was 0x40000000 trueclass)
WRITE_ASCII 0x258 ~mage10c~ #8 // Race script
WRITE_ASCII 0x260 ~pries10b~ #8 // General script
WRITE_BYTE 0x273 0x9b // Class (innocent, was 0xe cleric_mage)
ADD_CRE_ITEM ~clck19~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~ // Robe of the Good Archmagi (Undroppable)
ADD_CRE_ITEM ~%tutu_var%blun04~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ // Mace
REMOVE_MEMORIZED_SPELL ~spwi215~ // Web
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (6) // Command
ADD_MEMORIZED_SPELL ~sppr208~ #1 ~priest~ (4) // Hold Person
ADD_MEMORIZED_SPELL ~sppr211~ #1 ~priest~ (2) // Silence 15' Radius
ADD_MEMORIZED_SPELL ~sppr306~ #2 ~priest~ // Protection From Fire
ADD_MEMORIZED_SPELL ~sppr312~ #2 ~priest~ // Strength of One
ADD_MEMORIZED_SPELL ~sppr313~ #2 ~priest~ // Holy Smite
ADD_MEMORIZED_SPELL ~sppr315~ #2 ~priest~ // Cure Medium Wounds
ADD_MEMORIZED_SPELL ~sppr401~ #3 ~priest~ (2) // Cure Serious Wounds
ADD_MEMORIZED_SPELL ~sppr406~ #3 ~priest~ // Defensive Harmony
ADD_MEMORIZED_SPELL ~sppr503~ #4 ~priest~ // Flame Strike
ADD_MEMORIZED_SPELL ~spwi118~ #0 ~wizard~ (6) // Chromatic Orb
ADD_MEMORIZED_SPELL ~spwi212~ #1 ~wizard~ // Mirror Image
ADD_MEMORIZED_SPELL ~spwi215~ #1 ~wizard~ (2) // Web
ADD_MEMORIZED_SPELL ~spwi219~ #1 ~wizard~ // Vocalize
ADD_MEMORIZED_SPELL ~spwi306~ #2 ~wizard~ (2) // Hold Person
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ (2) // Lightning Bolt
ADD_MEMORIZED_SPELL ~spwi408~ #3 ~wizard~ // Stoneskin
ADD_MEMORIZED_SPELL ~spwi418~ #3 ~wizard~ // Fire Shield (Red)
ADD_MEMORIZED_SPELL ~spwi421~ #3 ~wizard~ // Teleport Field
ADD_MEMORIZED_SPELL ~spwi508~ #4 ~wizard~ (3) // Chaos
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_faldor.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_FALDO~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_faldor5.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_FALDO~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~faldor.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGFALDRN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~faldor5.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGFALDRN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%galtok.cre~ = 0) BEGIN // Galtok (in Nashkel Mines)
WRITE_LONG 0x14 176 // XP Value (was 151)
WRITE_SHORT 0x24 25 // Current HP (was 2)
WRITE_BYTE 0x273 0x9b // Class (innocent, was fighter/mage)
REPLACE_TEXTUALLY CASE_INSENSITIVE ~scrl70~ ~scrl12~ // Scroll of Foolishness
REPLACE_TEXTUALLY CASE_INSENSITIVE ~scrl07~ ~scrl11~ // Scroll of Clumsiness
WRITE_SHORT 0x26 35 // Max HP
WRITE_SHORT 0x28 0x6204 // Animation (mage_male_gnome, was 0x6202 dwarf)
WRITE_BYTE 0x55 5 // Save vs. wands (was 13)
WRITE_BYTE 0x56 11 // Save vs. polymorph (was 12)
WRITE_BYTE 0x58 6 // Save vs. spells (was 14)
WRITE_BYTE 0x234 6 // Level 1 (was 4)
WRITE_BYTE 0x235 6 // Level 2 (was 4)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%mage3~ #8 // Race script
WRITE_EVALUATED_ASCII 0x260 ~%tutu_var%mage2~ #8 // General script (was %tutu_scriptw%tasight)
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
REPLACE_TEXTUALLY CASE_INSENSITIVE ~chan01~ ~dagg05~ // Throwing Dagger
REPLACE_TEXTUALLY CASE_INSENSITIVE ~chan04~ ~shld13~ // Medium Shield
REPLACE_TEXTUALLY CASE_INSENSITIVE ~scrl81~ ~scrl14~ // Cursed Scroll of Summon Monster
READ_LONG 0x2b8 ix // Item slots offset
READ_LONG 0x2bc iy // Item offset
READ_LONG 0x2c0 iz // Item count
FOR (i1 = 0; i1 < iz; i1 += 1) BEGIN
READ_ASCII (iy + (0x14 * i1)) ~itm~
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%helm01~ = 0) BEGIN
READ_SHORT ix hs // Helmet slot
PATCH_IF (hs = 0xffff) BEGIN // If slot open
WRITE_SHORT ix i1 // Assign helmet
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%shld13~ = 0) BEGIN
READ_SHORT (ix + 0x4) ss // Shield slot
PATCH_IF (ss = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x4) i1 // Assign shield
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%dagg05~ = 0) BEGIN
WRITE_SHORT (iy + (0x14 * i1) + 0xa) 20 // Charges 1
READ_SHORT (ix + 0x14) w2 // Weapon2 slot
PATCH_IF (w2 = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x14) i1 // Assign dagger to weapon2
END
END ELSE
PATCH_IF ((~%itm%~ STRING_COMPARE_CASE ~%tutu_var%scrl14~ = 0) OR (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%scrl12~ = 0) OR (~%itm%~ STRING_EQUAL_CASE ~%tutu_var%scrl11~ = 0)) BEGIN
FOR (i2 = 18; i2 < 36; i2 += 1) BEGIN // Find first open slot
READ_SHORT (ix + (i2 * 0x2)) sr
PATCH_IF (sr = 0xffff) BEGIN // If open
WRITE_SHORT (ix + (i2 * 0x2)) i1 // Assign scroll to slot
i2 = 36 // Kills loop
END
END
END
END
REMOVE_MEMORIZED_SPELL ~spwi205~ ~spwi212~ // Horror & Mirror Image
REMOVE_KNOWN_SPELL ~spwi205~ ~spwi212~
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ // Lightning Bolt
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_garric.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_GARRI~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_garric2.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_GARRI~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_garric4.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_GARRI~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_garric6.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_GARRI~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~garric.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGGARRIK~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~garric2.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGGARRIK~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~garric4.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGGARRIK~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~garric6.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGGARRIK~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%gellan.cre~ = 0) BEGIN // Gellana Mirrorshade (in FAI Temple of Wisdom)
WRITE_SHORT 0x24 65 // Current HP (was 55)
WRITE_SHORT 0x26 65 // Max HP (was 55)
WRITE_SHORT 0x28 0x6014 // Animation (cleric_female_gnome, was 0x6012 dwarf)
WRITE_BYTE 0x2c 115 // Metal color (sunkissed, was 27 gray)
WRITE_BYTE 0x2d 35 // Minor color (light:yellow/dark:purple, was 61 lavender)
WRITE_BYTE 0x2e 50 // Major color (dark yellow, was 46 red)
WRITE_BYTE 0x30 80 // Leather color (saturated bronze, was 21 dark iron gray)
WRITE_BYTE 0x31 67 // Armor color (shiny gold, was 24 dark gold)
WRITE_BYTE 0x54 6 // Save vs. death (was 7)
WRITE_BYTE 0x55 6 // Save vs. wands (was 11)
WRITE_BYTE 0x56 9 // Save vs. polymorph (was 10)
WRITE_BYTE 0x57 12 // Save vs. breath (was 13)
WRITE_BYTE 0x58 7 // Save vs. spells (was 12)
WRITE_BYTE 0x72 1 // Blunt weapons (was 3)
WRITE_BYTE 0x75 1 // Missile weapons
WRITE_BYTE 0x234 10 // Level 1 (was 9)
WRITE_BYTE 0x235 1 // Level 2 (was 3)
WRITE_BYTE 0x236 1 // Level 3 (was 6)
WRITE_BYTE 0x23b 18 // Wisdom (was 16)
REMOVE_MEMORIZED_SPELL ~sppr105~ ~sppr301~ ~sppr304~
REMOVE_KNOWN_SPELL ~sppr105~ ~sppr301~ // Entangle & Animate Dead
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (4) // Command
ADD_MEMORIZED_SPELL ~sppr103~ #0 ~priest~ (2) // Cure Light Wounds
ADD_MEMORIZED_SPELL ~sppr107~ #0 ~priest~ // Protection From Evil
ADD_MEMORIZED_SPELL ~sppr208~ #1 ~priest~ (2) // Hold Person
ADD_MEMORIZED_SPELL ~sppr211~ #1 ~priest~ // Silence 15' Radius
ADD_MEMORIZED_SPELL ~sppr303~ #2 ~priest~ // Dispel Magic
ADD_MEMORIZED_SPELL ~sppr304~ #2 ~priest~ // Glyph of Warding
ADD_MEMORIZED_SPELL ~sppr306~ #2 ~priest~ // Protection From Fire
ADD_MEMORIZED_SPELL ~sppr309~ #2 ~priest~ // Invisibility Purge
ADD_MEMORIZED_SPELL ~sppr401~ #3 ~priest~ (2) // Cure Serious Wounds
ADD_MEMORIZED_SPELL ~sppr502~ #4 ~priest~ // Cure Critical Wounds
ADD_MEMORIZED_SPELL ~sppr503~ #4 ~priest~ // Flame Strike
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%hafiz.cre~ = 0) BEGIN // Hafiz (in Gibberling Mountains)
WRITE_LONG 0x14 176 // XP Value (was 151)
WRITE_SHORT 0x24 35 // Current HP (was 29)
WRITE_SHORT 0x26 35 // Max HP
WRITE_SHORT 0x28 0x6204 // Animation (mage_male_gnome, was 0x6202 dwarf)
WRITE_BYTE 0x55 5 // Save vs. wands (was 13)
WRITE_BYTE 0x56 11 // Save vs. polymorph (was 12)
WRITE_BYTE 0x58 6 // Save vs. spells (was 14)
WRITE_BYTE 0x234 6 // Level 1 (was 4)
WRITE_BYTE 0x235 6 // Level 2 (was 4)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%mage3~ #8 // Race script
WRITE_EVALUATED_ASCII 0x260 ~%tutu_var%mage2~ #8 // General script (was %tutu_scriptw%tasight)
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
REPLACE_TEXTUALLY CASE_INSENSITIVE ~chan01~ ~dagg05~ // Throwing Dagger
REPLACE_TEXTUALLY CASE_INSENSITIVE ~chan04~ ~shld13~ // Medium Shield
REPLACE_TEXTUALLY CASE_INSENSITIVE ~scrl81~ ~scrl14~ // Cursed Scroll of Summon Monster
READ_LONG 0x2b8 ix // Item slots offset
READ_LONG 0x2bc iy // Item offset
READ_LONG 0x2c0 iz // Item count
FOR (i1 = 0; i1 < iz; i1 += 1) BEGIN
READ_ASCII (iy + (0x14 * i1)) ~itm~
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%helm01~) BEGIN
READ_SHORT ix hs // Helmet slot
PATCH_IF (hs = 0xffff) BEGIN // If slot open
WRITE_SHORT ix i1 // Assign helmet
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%shld13~) BEGIN
READ_SHORT (ix + 0x4) ss // Shield slot
PATCH_IF (ss = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x4) i1 // Assign shield
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%dagg05~) BEGIN
WRITE_SHORT (iy + (0x14 * i1) + 0xa) 20 // Charges 1
READ_SHORT (ix + 0x14) w2 // Weapon2 slot
PATCH_IF (w2 = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x14) i1 // Assign dagger to weapon2
END
END ELSE
PATCH_IF ((~%itm%~ STRING_COMPARE_CASE ~%tutu_var%scrl14~ = 0) OR (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%scrl12~ = 0) OR (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%scrl11~ = 0 )) BEGIN
FOR (i2 = 18; i2 < 36; i2 += 1) BEGIN // Find first open slot
READ_SHORT (ix + (i2 * 0x2)) sr
PATCH_IF (sr = 0xffff) BEGIN // If open
WRITE_SHORT (ix + (i2 * 0x2)) i1 // Assign scroll to slot
i2 = 36 // Kills loop
END
END
END
END
REMOVE_MEMORIZED_SPELL ~spwi205~ ~spwi212~ // Horror & Mirror Image
REMOVE_KNOWN_SPELL ~spwi205~ ~spwi212~
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ // Lightning Bolt
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%halaca.cre~ = 0) BEGIN // Halacan (in Gullykin)
WRITE_LONG 0x14 176 // XP Value (was 651)
WRITE_SHORT 0x28 0x6104 // Animation (fighter_male_gnome, was 0x5102 dwarf_low)
WRITE_BYTE 0x55 5 // Save vs. wands (was 13)
WRITE_BYTE 0x56 11 // Save vs. polymorph (was 12)
WRITE_BYTE 0x58 6 // Save vs. spells (was 14)
WRITE_BYTE 0x6f 1 // Small swords
WRITE_BYTE 0x234 6 // Level 1 (was 4)
WRITE_BYTE 0x235 6 // Level 2 (was 4)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_BYTE 0x23c 16 // Dexterity (was 13)
WRITE_EVALUATED_ASCII 0x250 ~%tutu_var%mage3~ #8 // Class script (was ~%tutu_var%mage2~)
REMOVE_MEMORIZED_SPELL ~spwi205~ ~spwi212~ // Horror & Mirror Image
REMOVE_KNOWN_SPELL ~spwi205~ ~spwi212~
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi213~ #1 ~wizard~ // Stinking Cloud
ADD_MEMORIZED_SPELL ~spwi217~ #1 ~wizard~ // Agannazar's Scorcher
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ (2) // Lightning Bolt
ADD_MEMORIZED_SPELL ~spwi317~ #2 ~wizard~ // Ghost Armor
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_imoen1.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_IMOEN2~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_imoen2.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_IMOEN2~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_imoen4.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_IMOEN2~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~_imoen6.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~_IMOEN2~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~imoen1.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGIMOEN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~imoen2.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGIMOEN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~imoen4.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGIMOEN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~imoen61.cre~ = 0) BEGIN
WRITE_ASCII 0x248 ~BGIMOEN~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%jaheir.cre~ = 0) BEGIN
WRITE_BYTE 0x66 1 // Lore
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%jaheir2.cre~ = 0) BEGIN
WRITE_BYTE 0x66 2 // Lore
WRITE_BYTE 0x24 11 // Current Hit Points
WRITE_BYTE 0x26 11 // Maximum Hit Points
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%jaheir4.cre~ = 0) BEGIN
WRITE_BYTE 0x66 4 // Lore
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%jaheir6.cre~ = 0) BEGIN
WRITE_BYTE 0x66 6 // Lore
WRITE_BYTE 0x52 16 // THAC0
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%kagain.cre~ = 0) BEGIN
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 11 // Save vs. Wand
WRITE_BYTE 0x56 15 // Save vs. Polymorph
WRITE_BYTE 0x57 17 // Save vs. Breath
WRITE_BYTE 0x58 12 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%kagain2.cre~ = 0) BEGIN
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 11 // Save vs. Wand
WRITE_BYTE 0x56 15 // Save vs. Polymorph
WRITE_BYTE 0x57 17 // Save vs. Breath
WRITE_BYTE 0x58 12 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%kagain4.cre~ = 0) BEGIN
WRITE_BYTE 0x54 8 // Save vs. Death
WRITE_BYTE 0x55 10 // Save vs. Wand
WRITE_BYTE 0x56 14 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 11 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%kagain6.cre~ = 0) BEGIN
WRITE_BYTE 0x54 6 // Save vs. Death
WRITE_BYTE 0x55 8 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 13 // Save vs. Breath
WRITE_BYTE 0x58 9 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%khalid.cre~ = 0) BEGIN
WRITE_BYTE 0x23a 15 // intelligence
WRITE_BYTE 0x66 1 // Lore
WRITE_BYTE 0x54 14 // Save vs. Death
WRITE_BYTE 0x55 16 // Save vs. Wand
WRITE_BYTE 0x56 15 // Save vs. Polymorph
WRITE_BYTE 0x57 17 // Save vs. Breath
WRITE_BYTE 0x58 17 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%khalid2.cre~ = 0) BEGIN
WRITE_BYTE 0x23a 15 // intelligence
WRITE_BYTE 0x66 2 // Lore
WRITE_BYTE 0x54 14 // Save vs. Death
WRITE_BYTE 0x55 16 // Save vs. Wand
WRITE_BYTE 0x56 15 // Save vs. Polymorph
WRITE_BYTE 0x57 17 // Save vs. Breath
WRITE_BYTE 0x58 17 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%khalid4.cre~ = 0) BEGIN
WRITE_BYTE 0x23a 15 // intelligence
WRITE_BYTE 0x66 4 // Lore
WRITE_BYTE 0x54 13 // Save vs. Death
WRITE_BYTE 0x55 15 // Save vs. Wand
WRITE_BYTE 0x56 14 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 16 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%khalid6.cre~ = 0) BEGIN
WRITE_BYTE 0x23a 15 // intelligence
WRITE_BYTE 0x66 6 // Lore
WRITE_BYTE 0x54 11 // Save vs. Death
WRITE_BYTE 0x55 13 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 13 // Save vs. Breath
WRITE_BYTE 0x58 14 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%landri.cre~ = 0) BEGIN // Landrin (in FAI L3)
WRITE_SHORT 0x28 0x6314 // Animation (thief_female_gnome, was 0x6212 mage_female_dwarf)
WRITE_BYTE 0x55 9 // Save vs. wands (was 11)
WRITE_BYTE 0x58 10 // Save vs. spells (was 12)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_BYTE 0x23c 16 // Dexterity (was 11)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%mage3~ #8 // Race script (was ~%tutu_var%mage1~)
REMOVE_MEMORIZED_SPELL ~spwi102~ ~spwi105~ // Armor & Color Spray
REMOVE_KNOWN_SPELL ~spwi102~ ~spwi105~
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi213~ #1 ~wizard~ // Stinking Cloud
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%madarc.cre~ = 0) BEGIN // Mad Arcand (in Shipwreck's Coast)
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x55 4 // Save vs. wands (was 7)
WRITE_BYTE 0x58 5 // Save vs. spells (was 8)
WRITE_BYTE 0x72 1 // Blunt weapons (was 3)
WRITE_BYTE 0x75 1 // Missile weapons
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_BYTE 0x23c 16 // Dexterity (was 11)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x250 ~%tutu_var%mage7~ #8 // Class script (was ~%tutu_var%priest5~)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%priest4~ #8 // Race script
ADD_CRE_ITEM ~%tutu_var%mage05~ #0 #0 #0 ~NONE~ ~LRING RRING~ // Free Action
REMOVE_MEMORIZED_SPELL ~sppr214~ ~sppr301~ // Draw Upon Holy Might & Animate Dead
REMOVE_KNOWN_SPELL ~sppr214~
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (3) // Command
ADD_MEMORIZED_SPELL ~sppr103~ #0 ~priest~ (3) // Cure Light Wounds
ADD_MEMORIZED_SPELL ~sppr107~ #0 ~priest~ // Protection From Evil
ADD_MEMORIZED_SPELL ~sppr208~ #1 ~priest~ // Hold Person
ADD_MEMORIZED_SPELL ~sppr211~ #1 ~priest~ // Silence 15' Radius
ADD_MEMORIZED_SPELL ~sppr301~ #2 ~priest~ // Animate Dead
ADD_MEMORIZED_SPELL ~sppr303~ #2 ~priest~ // Dispel Magic
ADD_MEMORIZED_SPELL ~sppr304~ #2 ~priest~ // Glyph of Warding
ADD_MEMORIZED_SPELL ~sppr306~ #2 ~priest~ // Protection From Fire
ADD_MEMORIZED_SPELL ~sppr309~ #2 ~priest~ // Invisibility Purge
ADD_MEMORIZED_SPELL ~sppr401~ #3 ~priest~ (2) // Cure Serious Wounds
ADD_MEMORIZED_SPELL ~sppr402~ #3 ~priest~ (2) // Animal Summoning 1
ADD_MEMORIZED_SPELL ~sppr502~ #4 ~priest~ // Cure Critical Wounds
ADD_MEMORIZED_SPELL ~sppr503~ #4 ~priest~ // Flame Strike
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ (5) // Magic Missile
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (4) // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi212~ #1 ~wizard~ // Mirror Image
ADD_MEMORIZED_SPELL ~spwi302~ #2 ~wizard~ (2) // Dispel Magic
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ (3) // Lightning Bolt
ADD_MEMORIZED_SPELL ~spwi401~ #3 ~wizard~ (3) // Confusion
ADD_MEMORIZED_SPELL ~spwi406~ #3 ~wizard~ // Minor Globe of Invulnerability
ADD_MEMORIZED_SPELL ~spwi502~ #4 ~wizard~ (4) // Cloudkill
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%minsc.cre~ = 0) BEGIN
WRITE_LONG 0x18 36293 // Current XP
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%montar.cre~ = 0) BEGIN
WRITE_BYTE 0x66 3 // Lore
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 10 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 11 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%montar2.cre~ = 0) BEGIN
WRITE_BYTE 0x24 11 // Current Hit Points
WRITE_BYTE 0x26 11 // Maximum Hit Points
WRITE_BYTE 0x66 6 // Lore
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 10 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 11 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%montar4.cre~ = 0) BEGIN
WRITE_BYTE 0x24 27 // Current Hit Points
WRITE_BYTE 0x26 27 // Maximum Hit Points
WRITE_BYTE 0x66 12 // Lore
WRITE_BYTE 0x54 9 // Save vs. Death
WRITE_BYTE 0x55 10 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 11 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%montar6.cre~ = 0) BEGIN
WRITE_BYTE 0x24 43 // Current Hit Points
WRITE_BYTE 0x26 43 // Maximum Hit Points
WRITE_BYTE 0x66 18 // Lore
WRITE_BYTE 0x54 7 // Save vs. Death
WRITE_BYTE 0x55 8 // Save vs. Wand
WRITE_BYTE 0x56 11 // Save vs. Polymorph
WRITE_BYTE 0x57 13 // Save vs. Breath
WRITE_BYTE 0x58 9 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%mutami.cre~ = 0) BEGIN // Mutamin (in Mutamin's Garden)
WRITE_LONG 0x14 976 // XP Value (was 1201)
WRITE_SHORT 0x24 24 // Current HP (was 19)
WRITE_SHORT 0x26 24 // Max HP (was 19)
WRITE_SHORT 0x28 0x6204 // Animation (mage_male_gnome, was 0x6202 dwarf)
WRITE_SHORT 0x46 10 // Base AC (was 6)
WRITE_SHORT 0x48 10 // Effective AC (was 6)
WRITE_BYTE 0x55 5 // Save vs. wands (was 9)
WRITE_BYTE 0x58 6 // Save vs. spells (was 3)
WRITE_BYTE 0x23c 18 // Dexterity (was 16)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%mage7~ #8 // Race script (was %tutu_var%mage5)
WRITE_BYTE 0x272 6 // Race (gnome, was human)
READ_LONG 0x2b8 ix // Item slots offset
READ_LONG 0x2bc iy // Item offset
READ_LONG 0x2c0 iz // Item count
FOR (i1 = 0; i1 < iz; i1 += 1) BEGIN
READ_ASCII (iy + (0x14 * i1)) ~itm~
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%dart01~ = 0) BEGIN
READ_SHORT (ix + 0x14) w2 // Weapon2 slot
PATCH_IF (w2 = 0xffff) BEGIN // If open
WRITE_SHORT (ix + 0x14) i1 // Assign darts to weapon2
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%potn08~ = 0) BEGIN
READ_SHORT (ix + 0x24) q1 // Qitem1 slot
READ_SHORT (ix + 0x26) q2 // Qitem1 slot
PATCH_IF (q1 = q2) BEGIN // If duplicate
WRITE_SHORT (ix + 0x24) i1 // Assign potn08 to qitem1
END
END
END
ADD_CRE_ITEM ~%tutu_var%brac01~ #0 #0 #0 ~NONE~ ~GLOVES~ // Bracers AC8
ADD_CRE_ITEM ~%tutu_var%mage06~ #0 #0 #0 ~NONE~ ~LRING RRING~ // Haste
REMOVE_MEMORIZED_SPELL ~spwi119~ ~spwi205~ ~spwi211~ ~spwi305~
REMOVE_KNOWN_SPELL ~spwi119~ ~spwi205~ // Larloch's Minor Drain & Horror
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ (5) // Magic Missile
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (2) // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~ (2) // Lightning Bolt
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_scriptbg%neb.cre~ = 0) BEGIN // Neb (in SW Baldur's Gate FF HQ L1)
WRITE_SHORT 0x24 70 // Current HP (was 85)
WRITE_SHORT 0x26 70 // Max HP (was 85)
WRITE_SHORT 0x46 10 // Base AC (was 0)
WRITE_SHORT 0x48 10 // Effective AC (was 0)
WRITE_BYTE 0x52 13 // THAC0 (was 19)
WRITE_BYTE 0x54 6 // Save vs. death (was 13)
WRITE_BYTE 0x55 4 // Save vs. wands (was 14)
WRITE_BYTE 0x56 9 // Save vs. polymorph (was 12)
WRITE_BYTE 0x57 13 // Save vs. breath (was 16)
WRITE_BYTE 0x58 5 // Save vs. spells (was 15)
WRITE_BYTE 0x75 1 // Missile weapons
WRITE_BYTE 0x234 15 // Level 1 (was 3)
WRITE_BYTE 0x235 1 // Level 2 (was 4)
WRITE_BYTE 0x23c 17 // Dexterity (was 14)
WRITE_BYTE 0x23d 15 // Constitution (was 6)
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%trunsgt~ #8 // Default script
WRITE_BYTE 0x272 4 // Race (dwarf, was gnome)
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%pheirk.cre~ = 0) BEGIN // Pheirkas (in NW Baldur's Gate)
WRITE_SHORT 0x24 54 // Current HP (was 32)
WRITE_SHORT 0x26 54 // Max HP (was 32)
WRITE_SHORT 0x28 0x6114 // Animation (fighter_female_gnome, was 0x6112 dwarf)
WRITE_BYTE 0x54 7 // Save vs. death (was 11)
WRITE_BYTE 0x55 9 // Save vs. wands (was 13)
WRITE_BYTE 0x58 10 // Save vs. spells (was 14)
WRITE_BYTE 0x73 0 // Spiked weapons (was 2)
WRITE_BYTE 0x74 5 // Axes (was 3)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_BYTE 0x27b 0x22 // Alignment (neutral)
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_scriptbg%quayle.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x55 8 // Save vs. wands (was 11)
WRITE_BYTE 0x58 9 // Save vs. spells (was 12)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
WRITE_BYTE 0x23c 16 // Dexterity (was 15)
WRITE_LONG 0x18 5001 // XP (was 4001)
WRITE_SHORT 0x24 12 // Current HP (was 11)
WRITE_SHORT 0x26 12 // Max HP (was 11)
WRITE_BYTE 0x66 13 // Lore (was 8)
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ // Command
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ // Magic Missile
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_script%quayle4.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x55 8 // Save vs. wands (was 11)
WRITE_BYTE 0x58 9 // Save vs. spells (was 12)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
WRITE_BYTE 0x23c 16 // Dexterity (was 15)
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
REMOVE_MEMORIZED_SPELL ~spwi205~ // Horror
REMOVE_KNOWN_SPELL ~spwi205~
WRITE_SHORT 0x24 22 // Current HP (was 18)
WRITE_SHORT 0x26 22 // Max HP (was 18)
WRITE_BYTE 0x66 19 // Lore (was 13)
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (2) // Command
ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ // Magic Missile
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (2) // Melf's Acid Arrow
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_script%quayle6.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x55 8 // Save vs. wands (was 11)
WRITE_BYTE 0x58 9 // Save vs. spells (was 12)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
WRITE_BYTE 0x23c 16 // Dexterity (was 15)
WRITE_SHORT 0x24 34 // Current HP (was 24)
WRITE_SHORT 0x26 34 // Max HP (was 24)
WRITE_BYTE 0x66 25 // Lore (was 21)
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (2) // Command
ADD_MEMORIZED_SPELL ~spwi118~ #0 ~wizard~ // Chromatic Orb
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi309~ #2 ~wizard~ // Monster Summoning 1
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%sarhed.cre~ = 0) BEGIN // Sarhedra (in Lonely Peaks)
WRITE_SHORT 0x24 45 // Current HP (was 28)
WRITE_SHORT 0x26 45 // Max HP (was 28)
WRITE_SHORT 0x28 0x6114 // Animation (fighter_female_gnome, was 0x6112 dwarf)
WRITE_BYTE 0x54 7 // Save vs. death (was 11)
WRITE_BYTE 0x55 9 // Save vs. wands (was 13)
WRITE_BYTE 0x58 10 // Save vs. spells (was 14)
WRITE_BYTE 0x73 0 // Spiked weapons (was 2)
WRITE_BYTE 0x74 5 // Axes (was 3)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%skie.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_scriptbg%skie~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%skie6.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_scriptbg%skie~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%tellan.cre~ = 0) BEGIN // Tellan (in Ice Island L1)
WRITE_LONG 0x14 2001 // XP Value (was 11)
WRITE_SHORT 0x24 64 // Current HP (was 54)
WRITE_SHORT 0x26 64 // Max HP (was 54)
WRITE_SHORT 0x28 0x6204 // Animation (mage_male_gnome, was 0x6202 dwarf)
WRITE_SHORT 0x46 10 // Base AC (was 0)
WRITE_SHORT 0x48 10 // Effective AC (was 0)
WRITE_BYTE 0x54 10 // Save vs. death (was 6)
WRITE_BYTE 0x55 3 // Save vs. wands (was 6)
WRITE_BYTE 0x56 9 // Save vs. polymorph (was 6)
WRITE_BYTE 0x57 11 // Save vs. breath (was 10)
WRITE_BYTE 0x58 4 // Save vs. spells (was 7)
WRITE_BYTE 0x6f 1 // Small swords (was 3)
WRITE_BYTE 0x236 1 // Level 3 (was 13)
WRITE_LONG 0x244 0x04000000 // Kit (illusionist)
WRITE_ASCIIE 0x250 ~%tutu_var%follow~ #8
WRITE_ASCII 0x258 ~mage14d~ #8 // Race script (was ~%tutu_var%mage7~)
WRITE_ASCII 0x260 ~~ #8
WRITE_BYTE 0x270 0x80 // Reaction (neutral, was enemy)
WRITE_BYTE 0x272 6 // Race (gnome, was human)
WRITE_BYTE 0x273 0xd // Class (mage/thief, was thief)
SAY INITIAL_MEETING #4931
SAY SELECT_COMMON1 #4930
SAY DAMAGE #12582
SAY DYING #12583
SAY DIALOGUE_DEFAULT #4929
REPLACE_TEXTUALLY CASE_INSENSITIVE ~dagg04~ ~dagg02~ // Dagger +1
REPLACE_TEXTUALLY CASE_INSENSITIVE ~leat02~ ~clck17~ // Robe of the Evil Archmagi
REPLACE_TEXTUALLY CASE_INSENSITIVE ~slng02~ ~mage02~ // Protection from Normal Missiles
REPLACE_TEXTUALLY CASE_INSENSITIVE ~_bull02~ ~_ageamul~ (8) // Minor Globe of Invulnerability
REPLACE_TEXTUALLY CASE_INSENSITIVE ~bull02~ ~mageamul~ (8)
REPLACE_TEXTUALLY CASE_INSENSITIVE ~bull03~ ~potn08~ // Potion of Healing
READ_LONG 0x2b8 ix // Item slots offset
READ_LONG 0x2bc iy // Item offset
READ_LONG 0x2c0 iz // Item count
FOR (i1 = 0; i1 < iz; i1 += 1) BEGIN
READ_ASCII (iy + (0x14 * i1)) ~itm~
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%clck17~ = 0) BEGIN
READ_SHORT (ix + 0x2) rs // Armor slot
PATCH_IF (rs = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x2) i1 // Assign robe to armor
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%mage02~ = 0) BEGIN
READ_SHORT (ix + 0x8) lr // Lring slot
READ_SHORT (ix + 0xa) rr // Rring slot
PATCH_IF (lr = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0x8) i1 // Assign mage02 to lring
END ELSE
PATCH_IF (rr = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0xa) i1 // Assign mage02 to rring
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_scriptm%ageamul~ = 0) BEGIN
READ_SHORT (ix + 0xc) rs // Amulet slot
PATCH_IF (rs = 0xffff) BEGIN // If slot open
WRITE_SHORT (ix + 0xc) i1 // Assign mageamul to amulet
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%dagg02~ = 0) BEGIN
READ_SHORT (ix + 0x12) w1 // Weapon1 slot
READ_SHORT (ix + 0x14) w2 // Weapon2 slot
PATCH_IF (w1 = w2) BEGIN // If duplicate weapon reference
WRITE_SHORT (ix + 0x14) i1 // Assign dagger to weapon2
END
END ELSE
PATCH_IF (~%itm%~ STRING_COMPARE_CASE ~%tutu_var%potn08~ = 0) BEGIN
FOR (i2 = 18; i2 < 36; i2 += 1) BEGIN // Find first open slot
READ_SHORT (ix + (i2 * 0x2)) sr
PATCH_IF (sr = 0xffff) BEGIN // If open
WRITE_SHORT (ix + (i2 * 0x2)) i1 // Assign potn08 to slot
i2 = 36 // Kills loop
END
END
END
END
REMOVE_MEMORIZED_SPELL ~spwi205~ ~spwi308~ ~spwi313~ ~spwi401~
REMOVE_KNOWN_SPELL ~spwi205~ ~spwi313~ // Horror, Skull Trap
ADD_MEMORIZED_SPELL ~spwi203~ #1 ~wizard~ // Detect Invisibility
ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~ (2) // Melf's Acid Arrow
ADD_MEMORIZED_SPELL ~spwi219~ #1 ~wizard~ // Vocalize
ADD_MEMORIZED_SPELL ~spwi305~ #2 ~wizard~ // Haste
ADD_MEMORIZED_SPELL ~spwi311~ #2 ~wizard~ // Protection From Normal Missiles
ADD_MEMORIZED_SPELL ~spwi312~ #2 ~wizard~ // Slow
ADD_MEMORIZED_SPELL ~spwi318~ #2 ~wizard~ // Minor Spell Deflection
ADD_MEMORIZED_SPELL ~spwi325~ #2 ~wizard~ // Melf's Minute Meteors
ADD_MEMORIZED_SPELL ~spwi405~ #3 ~wizard~ // Improved Invisibility
ADD_MEMORIZED_SPELL ~spwi408~ #3 ~wizard~ // Stoneskin
ADD_MEMORIZED_SPELL ~spwi418~ #3 ~wizard~ // Fire Shield (Red)
ADD_MEMORIZED_SPELL ~spwi419~ #3 ~wizard~ // Secret Word
ADD_MEMORIZED_SPELL ~spwi408~ #3 ~wizard~ // Stoneskin
ADD_MEMORIZED_SPELL ~spwi503~ #4 ~wizard~ // Cone of Cold
ADD_MEMORIZED_SPELL ~spwi504~ #4 ~wizard~ // Monster Summoning 3
ADD_MEMORIZED_SPELL ~spwi505~ #4 ~wizard~ // Shadow Door
ADD_MEMORIZED_SPELL ~spwi513~ #4 ~wizard~ // Breach
ADD_MEMORIZED_SPELL ~spwi522~ #4 ~wizard~ // Minor Spell Turning
ADD_MEMORIZED_SPELL ~spwi605~ #5 ~wizard~ // Death Spell
ADD_MEMORIZED_SPELL ~spwi609~ #5 ~wizard~ // True Sight
ADD_MEMORIZED_SPELL ~spwi624~ #5 ~wizard~ // Summon Nishruu
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%tiax.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
READ_LONG 0x244 tkt
PATCH_IF (tkt = 0x40000000) BEGIN
WRITE_LONG 0x244 0x00000000 // Kit (none, was 0x40000000 trueclass)
END
READ_LONG 0x2b8 st // Item slots offset
READ_SHORT (st + 0x2a) sx
READ_SHORT (st + 0x2c) sz
PATCH_IF ((sx = 1) AND (sz = 2)) BEGIN // Equip sling and bullets
WRITE_SHORT (st + 0x2a) `0x0
WRITE_SHORT (st + 0x2c) `0x0
WRITE_SHORT (st + 0x14) 1
WRITE_SHORT (st + 0x1a) 2
WRITE_SHORT (st + 0x4c) 1
END
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
WRITE_SHORT 0x24 14 // Current HP (was 17)
WRITE_SHORT 0x26 14 // Max HP (was 17)
WRITE_BYTE 0x55 10 // Save vs. wands (was 14)
WRITE_BYTE 0x58 11 // Save vs. spells (was 15)
WRITE_BYTE 0x45 25 // Hide in shadows
WRITE_BYTE 0x64 10 // Detect illusions
WRITE_BYTE 0x65 5 // Set traps
WRITE_BYTE 0x66 6 // Lore (was 8)
WRITE_BYTE 0x67 25 // Open locks (was 15)
WRITE_BYTE 0x68 25 // Move silently (was 10)
WRITE_BYTE 0x69 30 // Find traps (was 15)
WRITE_BYTE 0x6a 35 // Pick pockets (was 10)
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ // Command
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%tiax4.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
READ_LONG 0x244 tkt
PATCH_IF (tkt = 0x40000000) BEGIN
WRITE_LONG 0x244 0x00000000 // Kit (none, was 0x40000000 trueclass)
END
READ_LONG 0x2b8 st // Item slots offset
READ_SHORT (st + 0x2a) sx
READ_SHORT (st + 0x2c) sz
PATCH_IF ((sx = 1) AND (sz = 2)) BEGIN // Equip sling and bullets
WRITE_SHORT (st + 0x2a) `0x0
WRITE_SHORT (st + 0x2c) `0x0
WRITE_SHORT (st + 0x14) 1
WRITE_SHORT (st + 0x1a) 2
WRITE_SHORT (st + 0x4c) 1
END
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
WRITE_SHORT 0x24 26 // Current HP (was 28)
WRITE_SHORT 0x26 26 // Max HP (was 28)
WRITE_BYTE 0x55 9 // Save vs. wands (was 13)
WRITE_BYTE 0x58 10 // Save vs. spells (was 14)
WRITE_BYTE 0x45 35 // Hide in shadows
WRITE_BYTE 0x64 10 // Detect illusions
WRITE_BYTE 0x65 5 // Set traps
WRITE_BYTE 0x66 12 // Lore (was 16)
WRITE_BYTE 0x67 35 // Open locks (was 25)
WRITE_BYTE 0x68 35 // Move silently (was 20)
WRITE_BYTE 0x69 40 // Find traps (was 25)
WRITE_BYTE 0x6a 45 // Pick pockets (was 20)
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (2) // Command
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%tiax6.cre~ = 0) BEGIN
WRITE_SHORT 0x28 0x6004 // Animation (cleric_male_gnome, was 0x6002 dwarf)
WRITE_BYTE 0x236 1 // Level 3 (was 0)
READ_LONG 0x244 tkt
PATCH_IF (tkt = 0x40000000) BEGIN
WRITE_LONG 0x244 0x00000000 // Kit (none, was 0x40000000 trueclass)
END
READ_LONG 0x2b8 st // Item slots offset
READ_SHORT (st + 0x2a) sx
READ_SHORT (st + 0x2c) sz
PATCH_IF ((sx = 1) AND (sz = 2)) BEGIN // Equip sling and bullets
WRITE_SHORT (st + 0x2a) `0x0
WRITE_SHORT (st + 0x2c) `0x0
WRITE_SHORT (st + 0x14) 1
WRITE_SHORT (st + 0x1a) 2
WRITE_SHORT (st + 0x4c) 1
END
REMOVE_MEMORIZED_SPELL ~sppr105~ // Entangle
REMOVE_KNOWN_SPELL ~sppr105~
WRITE_SHORT 0x24 36 // Current HP (was 38)
WRITE_SHORT 0x26 36 // Max HP (was 38)
WRITE_BYTE 0x55 8 // Save vs. wands (was 12)
WRITE_BYTE 0x58 9 // Save vs. spells (was 13)
WRITE_BYTE 0x45 45 // Hide in shadows
WRITE_BYTE 0x64 10 // Detect illusions
WRITE_BYTE 0x65 5 // Set traps
WRITE_BYTE 0x66 18 // Lore (was 23)
WRITE_BYTE 0x67 45 // Open locks (was 35)
WRITE_BYTE 0x68 45 // Move silently (was 30)
WRITE_BYTE 0x69 50 // Find traps (was 35)
WRITE_BYTE 0x6a 55 // Pick pockets (was 30)
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ // Command
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%unshey.cre~ = 0) BEGIN // Unshey (in Friendly Arm Inn L2)
WRITE_SHORT 0x24 42 // Current HP (was 23)
WRITE_SHORT 0x26 42 // Max HP (was 23)
WRITE_SHORT 0x28 0x6014 // Animation (cleric_female_gnome, was 0x6012 dwarf)
WRITE_BYTE 0x54 5 // Save vs. death (was 9)
WRITE_BYTE 0x55 9 // Save vs. wands (was 13)
WRITE_BYTE 0x58 10 // Save vs. spells (was 14)
WRITE_BYTE 0x236 1 // Level 3 (was 5)
WRITE_EVALUATED_ASCII 0x250 ~%tutu_var%priest4~ #8 // Class script (was %tutu_var%priest3)
REMOVE_MEMORIZED_SPELL ~sppr105~ ~sppr213~ // Entangle & Spiritual Hammer
REMOVE_KNOWN_SPELL ~sppr105~
ADD_MEMORIZED_SPELL ~sppr102~ #0 ~priest~ (2) // Command
ADD_MEMORIZED_SPELL ~sppr103~ #0 ~priest~ (2) // Cure Light Wounds
ADD_MEMORIZED_SPELL ~sppr107~ #0 ~priest~ // Protection From Evil
ADD_MEMORIZED_SPELL ~sppr208~ #1 ~priest~ // Hold Person
ADD_MEMORIZED_SPELL ~sppr211~ #1 ~priest~ // Silence 15' Radius
ADD_MEMORIZED_SPELL ~sppr303~ #2 ~priest~ // Dispel Magic
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_scriptbg%xan.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_var%xan~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%xan4.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_var%xan~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%xan6.cre~ = 0) BEGIN
WRITE_ASCIIE 0x248 ~%tutu_var%xan~ #8 // override script
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%yeslic.cre~ = 0) BEGIN
WRITE_BYTE 0x24 23 // Current Hit Points
WRITE_BYTE 0x26 23 // Maximum Hit Points
WRITE_BYTE 0x54 5 // Save vs. Death
WRITE_BYTE 0x55 9 // Save vs. Wand
WRITE_BYTE 0x56 13 // Save vs. Polymorph
WRITE_BYTE 0x57 16 // Save vs. Breath
WRITE_BYTE 0x58 10 // Save vs. Spells
END
PATCH_IF (~%crefile%~ STRING_COMPARE_CASE ~%tutu_var%yeslic5.cre~ = 0) BEGIN
WRITE_BYTE 0x24 42 // Current Hit Points
WRITE_BYTE 0x26 42 // Maximum Hit Points
WRITE_BYTE 0x54 4 // Save vs. Death
WRITE_BYTE 0x55 8 // Save vs. Wand
WRITE_BYTE 0x56 12 // Save vs. Polymorph
WRITE_BYTE 0x57 15 // Save vs. Breath
WRITE_BYTE 0x58 9 // Save vs. Spells
END
BUT_ONLY_IF_IT_CHANGES /*indent of C_E */
END /* of A_I */
END /*of F_E IN */
/* pdialog.2da preparation */
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
COPY_EXISTING ~pdialog.2da~ ~override~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^JOIN_DIALOG_FILE\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~JOIN_DIALOG_FILE\1DREAM_SCRIPT_FILE~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_MINSCJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_MINSCJ\1_MINSCD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_FALDOJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_FALDOJ\1_FALDOD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_JAHEIJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_JAHEIJ\1_JAHEID~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_CORANJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_CORANJ\1_CORAND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_DYNAHJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_DYNAHJ\1_DYNAHD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_XANJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_XANJ\1_XAND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_YESLIJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_YESLIJ\1_YESLID~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_ELDOTJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_ELDOTJ\1_ELDOTD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_VICONJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_VICONJ\1_VICOND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_SHARTJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_SHARTJ\1_SHARTD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_SKIEJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_SKIEJ\1_SKIED~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_KIVANJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_KIVANJ\1_KIVAND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_XZARJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_XZARJ\1_XZARD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_SAFANJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_SAFANJ\1_SAFAND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_QUAYLJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_QUAYLJ\1_QUAYLD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_KHALIJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_KHALIJ\1_KHALID~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_TIAXJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_TIAXJ\1_TIAXD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_EDWINJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_EDWINJ\1_EDWIND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_AJANTJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_AJANTJ\1_AJANTD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_KAGAIJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_KAGAIJ\1_KAGAID~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_MONTAJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_MONTAJ\1_MONTAD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_IMOEN2\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_IMOEN2\1_IMOEND~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_GARRIJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_GARRIJ\1_GARRID~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_BRANWJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_BRANWJ\1_BRANWD~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~^_ALORAJ\( +[^ ]+ +[^ ]+ +\)[^ ]+~ ~_ALORAJ\1_ALORAD~
BUT_ONLY_IF_IT_CHANGES
END ELSE BEGIN /* BGT Versions */
COPY_EXISTING ~pdialog.2da~ ~override~
COUNT_2DA_ROWS 8 "cnt_row"
FOR ( cnt=0; cnt<"%cnt_row%"; cnt=cnt+1 ) BEGIN
READ_2DA_ENTRY "%cnt%" 0 8 "pd_name"
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "MONTARON")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "MONTAD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "KAGAIN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "KAGAID"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "KIVAN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "KIVAND"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "SHARTEEL")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "SHARTD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "YESLICK")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "YESLID"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "XZAR")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "XZARD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "ALORA")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "ALORAD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "AJANTIS")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "AJANTD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "KHALID")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "KHALID"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "GARRICK")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "GARRID"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "SAFANA")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "SAFAND"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "FALDORN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "FALDOD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "BRANWEN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "BRANWD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "QUAYLE")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "QUAYLD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "XAN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "XAND"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "SKIE")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "SKIED"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "ELDOTH")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "ELDOTD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "TIAX")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "TIAXD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "DYNAHEIR")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "DYNAHD"
END
PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "CORAN")=0) BEGIN
SET_2DA_ENTRY "%cnt%" 3 8 "CORAND"
END
END
BUT_ONLY_IF_IT_CHANGES
END
/* .2da patching */
/* Tutu: Giving Imoen a banter file entry in the interdi.2da */
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
APPEND ~interdia.2da~ ~IMOEN _BIMOEN~ UNLESS ~_\(BIMOEN\|bimoen\)~
END
/* BGT: Giving Imoen a banter file if the Fixpack isn't installed */
ACTION_IF NOT (FILE_EXISTS_IN_GAME ~cdbehbla.pro~) AND (FILE_EXISTS_IN_GAME ~AR7200.are~) THEN BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~saradush.mve~ THEN BEGIN
COPY_EXISTING ~interdia.2da~ ~override~
SET_2DA_ENTRY 17 1 2 ~BIMOEN2~ // fixes ToB version
BUT_ONLY_IF_IT_CHANGES
END ELSE BEGIN
APPEND ~interdia.2da~ ~IMOEN BIMOEN2~ // fixes SoA version
UNLESS ~BIMOEN2~
END
END
/* Imoen BIMOEN.DLG rebuild */
ACTION_IF NOT (FILE_EXISTS_IN_GAME ~_bimoen.dlg~) AND (FILE_EXISTS_IN_GAME ~FW0100.are~) THEN BEGIN
COMPILE ~BG1NPC/Core/dlg/X#BIMOEN_TUTU.D~
END ELSE BEGIN
ACTION_IF NOT (FILE_EXISTS_IN_GAME ~bimoen2.dlg~) AND (FILE_EXISTS_IN_GAME ~AR7200.are~) THEN BEGIN
COMPILE ~BG1NPC/Core/dlg/X#BIMOEN_BGT.D~
END
END
/* Cam's 2DA Neutral/Happy interjection restoration */
COPY_EXISTING ~happy.2da~ ~override~
FOR (row = 8; row < 14; row = row + 1) BEGIN
SET_2DA_ENTRY "%row%" 2 4 ~80~
END
BUT_ONLY_IF_IT_CHANGES
/* CamDawg's Temple Healing Fix */
/* give all stores the normal suite of cures available */
COPY_EXISTING_REGEXP GLOB ~^.+\.sto$~ ~override~
READ_BYTE 0x10 "flags" ELSE 0
PATCH_IF (("%flags%" BAND 0b00010000) = 0b00010000) BEGIN // if sures available; also filters out invalid files
READ_LONG 0x2c "buy_off" ELSE 0
READ_LONG 0x34 "sale_off" ELSE 0
READ_LONG 0x4c "drink_off" ELSE 0
READ_LONG 0x70 "cure_off" ELSE 0
READ_LONG 0x74 "cure_num" ELSE 0
SET "new_cure" = 0
SET "sppr103" = 0 // cure light wounds
SET "sppr212" = 0 // slow poison
SET "sppr303" = 0 // dispel magic
SET "sppr307" = 0 // remove curse
SET "sppr401" = 0 // cure serious wounds
SET "sppr502" = 0 // cure light wounds
SET "sppr504" = 0 // raise dead
SET "sppr607" = 0 // cure critical wounds
SET "sppr712" = 0 // resurrection
SET "sppr713" = 0 // greater restoration
// check if cures already available
FOR (index = 0; index < cure_num; index = index + 1) BEGIN
READ_ASCII ("%cure_off%" + ("%index%" * 0x0c)) "resref"
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr103" = 0) BEGIN
SET "sppr103" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr212" = 0) BEGIN
SET "sppr212" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr303" = 0) BEGIN
SET "sppr303" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr307" = 0) BEGIN
SET "sppr307" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr401" = 0) BEGIN
SET "sppr401" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr502" = 0) BEGIN
SET "sppr502" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr504" = 0) BEGIN
SET "sppr504" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr607" = 0) BEGIN
SET "sppr607" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr712" = 0) BEGIN
SET "sppr712" = 1
END ELSE
PATCH_IF ("%resref%" STRING_COMPARE_CASE "sppr713" = 0) BEGIN
SET "sppr713" = 1
END
END
// add cures if not already present
PATCH_IF ("%sppr103%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr103~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 50 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr212%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr212~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 150 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr303%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr303~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 200 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr307%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr307~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 500 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr401%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr401~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 100 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr502%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr502~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 200 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr504%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr504~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 750 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr607%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr607~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 750 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr712%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr712~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 1000 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
PATCH_IF ("%sppr713%" = 0) BEGIN // if cure not already available
INSERT_BYTES ("%cure_off%" + ("%cure_num%" * 0x0c)) 0x0c
WRITE_ASCII ("%cure_off%" + ("%cure_num%" * 0x0c)) ~sppr713~ // resref
WRITE_LONG ("%cure_off%" + 0x08 + ("%cure_num%" * 0x0c)) 750 // price
SET "cure_num" = "%cure_num%" + 1
SET "new_cure" = "%new_cure%" + 1
END
// adjust offsets and counts if cures inserted
PATCH_IF ("%new_cure%" > 0) BEGIN
WRITE_LONG 0x74 "%cure_num%"
PATCH_IF ("%buy_off%" > "%cure_off%") BEGIN
WRITE_LONG 0x2c ("%buy_off%" + ("%new_cure%" * 0x0c))
END
PATCH_IF ("%sale_off%" > "%cure_off%") BEGIN
WRITE_LONG 0x34 ("%sale_off%" + ("%new_cure%" * 0x0c))
END
PATCH_IF ("%drink_off%" > "%cure_off%") BEGIN
WRITE_LONG 0x4c ("%drink_off%" + ("%new_cure%" * 0x0c))
END
END
END
BUT_ONLY_IF_IT_CHANGES
ACTION_IF FILE_EXISTS_IN_GAME ~fw0100.are~ THEN BEGIN
/* Music File .2da patching, Tutu only */
COPY ~BG1NPC/Core/MUS/x#blank.mus~ ~music~
COPY_EXISTING ~songlist.2da~ ~override~
SET_2DA_ENTRY 0 2 3 ~X#BLANK.MUS~
BUT_ONLY_IF_IT_CHANGES
END
ACTION_IF (FILE_EXISTS_IN_GAME ~fw0100.are~) THEN BEGIN
/* Stop Bioware dialogues repeating, fixes DLG matching BreakingPoint DPLAYER2.bcs changes */
COMPILE EVALUATE_BUFFER ~BG1NPC/Core/dlg/X#BGREPLACE_TUTU.D~
END ELSE BEGIN /* BGT Versions */
/* Stop Bioware dialogues repeating, fixes DLG */
COMPILE EVALUATE_BUFFER ~BG1NPC/Core/dlg/X#BGREPLACE_BGT.D~
END
/* custom cutspy.cre for BG1NPC code */
COPY ~BG1NPC/Core/CRE/x#cutspy.cre~ ~override/x#cutspy.cre~
PATCH_IF (SOURCE_SIZE > 0x2d4) BEGIN
WRITE_ASCIIE 0x280 ~%DEST_RES%~ #32 // death variable
END
/* X#GorionTalkingLetter Variable: Gorion's Letter creature */
COPY ~BG1NPC/Core/cre/x#gorlet.cre~ ~override/x#gorlet.cre~
SAY NAME1 @5
SAY NAME2 @5
WRITE_ASCIIE 0x248 ~%DEST_RES%~ #8 // override script
WRITE_ASCIIE 0x2cc ~%DEST_RES%~ #8 // dialog
WRITE_ASCIIE 0x280 ~%DEST_RES%~ #32 // death variable
/* add Gorion's Talking Letter Area Script */
EXTEND_BOTTOM ~%CK_LibL5_BCS%.bcs~ ~BG1NPC/CORE/baf/X#FW2612.baf~
EVALUATE_BUFFER
/* add Gorion's Talking Letter dialog, no need for EVAL */
COMPILE ~BG1NPC/Core/dlg/X#GORLET.D~
COMPILE ~BG1NPC/Core/baf/X#GORLET.BAF~
/* berelinde's Statue Naming Fixes */
COPY_EXISTING ~%tutu_var%achen.cre~ ~override~
SAY NAME2 @1118 // ~Achen Dell~
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%cailan.cre~ ~override~
SAY NAME2 @1119 // ~Cailan~
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%faizah.cre~ ~override~
SAY NAME2 @1120 // ~Faizah Tin~
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%rance.cre~ ~override~
SAY NAME2 @1121 // ~Rance~
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%vail.cre~ ~override~
SAY NAME2 @1122 // ~Vail~
BUT_ONLY_IF_IT_CHANGES
/* Kivan and Tazok Dialogue File Assignment */
COPY_EXISTING ~%tutu_var%tazok2.cre~ ~override~
WRITE_EVALUATED_ASCII 0x2CC ~%tutu_var%tazok2~ #8 // dialog
BUT_ONLY_IF_IT_CHANGES
/* STATE.IDS patching to ToB - thanks, Cam, if you read it */
/* adds custom IsValidForPartyDialogue state */
APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~ UNLESS ~CD_STATE_NOTVALID~
/* ACTION.IDS and TRIGGER.IDS patching to ToB - thanks, Cam, if you read it */
/* and GTIMES.IDS, ANIMATE.IDS patching to ToB, courtesy of the BG2 Fix Pack */
INCLUDE ~BG1NPC/LIB/ids_entries_cleanup.tph~
ACTION_IF (FILE_EXISTS_IN_GAME ~FW0100.are~) THEN BEGIN
/* Cleaning J files from junk states */
COMPILE EVALUATE_BUFFER ~BG1NPC/Core/dlg/X#JFIX_TUTU.D~
/* Changing DPLAYER2.bcs to stop BreakingPoint SDNS from hanging Tutu Only */
COPY_EXISTING ~DPLAYER2.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~!InParty(Myself)~ ~False()~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~ChangeAIScript("",DEFAULT)~ ~~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~SetGlobal("IHATEYOUALL","LOCALS",0)~ ~~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
EXTEND_TOP ~DPLAYER2.bcs~ ~BG1NPC/Core/baf/X#DPLYR2.BAF~
END ELSE BEGIN /* BGT Versions */
/* Cleaning J files from junk states */
COMPILE EVALUATE_BUFFER ~BG1NPC/Core/dlg/X#JFIX_BGT.D~
/* Changing DPLAYER2.bcs to stop BreakingPoint SDNS from hanging */
/* unnessesary in BGT */
END
/* Dialogue Correction in X#JFIX.D */
COPY_EXISTING ~%UC_TofB_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE
~Global("DeathOfSarevok","GLOBAL",0)~
~Global("DeathOfSarevok","GLOBAL",0) OR(4) Global("X#DynaheirRomanceInactive","GLOBAL",1) Global("X#DynaheirRomanceActive","GLOBAL",0) Dead("dynaheir") !InParty("dynaheir")~
REPLACE_TEXTUALLY CASE_INSENSITIVE
~GlobalTimerExpired("DeathOfSarevok","GLOBAL")~
~GlobalTimerExpired("DeathOfSarevok","GLOBAL") OR(4) Global("X#DynaheirRomanceInactive","GLOBAL",1) Global("X#DynaheirRomanceActive","GLOBAL",0) Dead("dynaheir") !InParty("dynaheir")~
REPLACE_TEXTUALLY CASE_INSENSITIVE
~Global("D0FinalSave","GLOBAL",0)~
~Global("D0FinalSave","GLOBAL",0) OR(4) Global("X#DynaheirRomanceInactive","GLOBAL",1) Global("X#DynaheirRomanceActive","GLOBAL",0) Dead("dynaheir") !InParty("dynaheir")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Trying to prevent Alora from Stuttering. */
COPY_EXISTING ~%tutu_var%ALORA.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE
~TimeOfDay(DAY)~ ~AreaCheck("%WBaldursGate_HallofWonders%") NumberOfTimesTalkedTo(0) TimeOfDay(DAY) !InParty(Myself)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* WizWom's Prevent Alora Area Script from Crashing. */
COPY_EXISTING ~%HallofWonders_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~Exists("Alora")~ ~Exists("Alora") InMyArea("Alora")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Stop Viconia's Potential Script Stutter on Tutu */
/* scripts */
COPY_EXISTING ~%tutu_var%VICONIA.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~See("flamingfist2")~ ~See("flamingfist2") !Dead("flamingfist2")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Make Tazok Killable */
/* scripts */
COPY_EXISTING ~%tutu_var%TAZOK.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~HPPercentLT(Myself,50)~ ~HPPercentLT(Myself,50) !InParty("kivan")~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~Global("MACTazokBelt","LOCALS",0)~ ~Global("X#MACDisableTazokInv","GLOBAL",1)~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~SetGlobal("MACTazokBelt","LOCALS",1)~ ~SetGlobal("X#MACDisableTazokInv","GLOBAL",2)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* scripts extension */
EXTEND_TOP ~%tutu_var%TAZOK.bcs~ ~BG1NPC/Core/baf/X#TAKILL.BAF~
EVALUATE_BUFFER
/* Set Tazok sprite back to living before last chapter, and move triggers to another variable other than Dead() */
EXTEND_BOTTOM ~%Undercity_BCS%.bcs~ ~bg1npc/core/baf/x#tazokarea.baf~
EVALUATE_BUFFER
/* Create Coran's Wyverns */
COPY_EXISTING ~%tutu_var%WYVERN.CRE~ ~override/X#CORWYV.CRE~
WRITE_ASCII 0x280 ~X#CoranWyvern~ #32
BUT_ONLY_IF_IT_CHANGES
/* put them in the Cave */
COPY_EXISTING ~%CloakwoodWyverns_WyvernCave%.ARE~ ~override~
READ_LONG 0x54 actors_off
READ_SHORT 0x58 actors_num
FOR (i = 0; i < %actors_num%; i += 1) BEGIN
READ_ASCII (%actors_off% + %i% * 0x110 + 0x80) actor_resref
PATCH_IF !("%actor_resref%" STRING_COMPARE_CASE "%tutu_var%WYVERN") BEGIN
WRITE_ASCII (%actors_off% + %i% * 0x110 + 0x80) X#CORWYV #8
END
END
BUT_ONLY_IF_IT_CHANGES
/* Changing Coran's old leaving timer */
COPY_EXISTING ~%CORAN_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE
~GlobalTimerExpired("Coran","GLOBAL")~ ~False()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Fixing Coran's Wyvern script */
EXTEND_TOP ~%CORAN_BCS%.bcs~ ~BG1NPC/Core/baf/X#CORWYV.BAF~
EVALUATE_BUFFER
/* the remainder of Coran's fixes are in core/dlg under Tutu and BGT .d files */
/* removing Kivan's timer to leave party */
COPY_EXISTING ~%KIVAN_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~GlobalTimerExpired("Kivan","GLOBAL")~ ~False()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* removing Minsc's timer to leave party */
COPY_EXISTING ~%MINSC_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~GlobalTimerExpired("Minsc","GLOBAL")~ ~False()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Tutu Area Script Assignment Patching: All Areas Script ID'd */
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
INCLUDE ~BG1NPC\LIB\tutu_area_script_assign.tph~
END
/* Area Type Flagging */
/* ToSC only: Tutu and BGT */
ACTION_IF (FILE_EXISTS_IN_GAME ~FW1500.are~) OR (FILE_EXISTS_IN_GAME ~ARW500.are~) THEN BEGIN // if TotSC is installed
COPY_EXISTING ~%IsleofBalduranN%.are~ ~override~
~%IsleofBalduranS%.are~ ~override~
~%DurlagsTower%.are~ ~override~
~%Farmlands%.are~ ~override~ // is this correct? area reference is... FW0400
READ_BYTE "0x48" "flags"
WRITE_BYTE "0x48" ("%flags%" BOR "0b00010001")
BUT_ONLY_IF_IT_CHANGES
END
/* FOREST and OUTDOOR: Tutu and BGT */
COPY_EXISTING ~%FishingVillage%.are~ ~override~
~%Peldvale%.are~ ~override~
~%LionsWay%.are~ ~override~
~%CoastWay%.are~ ~override~
~%Larswood%.are~ ~override~
~%ShipwrecksCoast%.are~ ~override~
~%HighHedge%.are~ ~override~
~%MutaminsGarden%.are~ ~override~
~%Lighthouse%.are~ ~override~
~%RedCanyons%.are~ ~override~
~%SouthBeregostRoad%.are~ ~override~
~%Ulcaster%.are~ ~override~
~%ArchaeologicalSite%.are~ ~override~
~%FishermansLake%.are~ ~override~
~%NorthNashkelRoad%.are~ ~override~
~%LonelyPeaks%.are~ ~override~
~%FirewineBridge%.are~ ~override~
~%BearRiver%.are~ ~override~
~%ValleyoftheTombs%.are~ ~override~
~%DryadFalls%.are~ ~override~
~%FireLeafForest%.are~ ~override~
~%GibberlingMountains%.are~ ~override~
READ_BYTE "0x48" "flags"
WRITE_BYTE "0x48" ("%flags%" BOR "0b00010001")
BUT_ONLY_IF_IT_CHANGES
/* OUTDOOR ONLY: Tutu and BGT */
COPY_EXISTING ~%GnollStronghold%.are~ ~override~
~%NashkelMines%.are~ ~override~
~%FriendlyArmInn%.are~ ~override~
~%Temple%.are~ ~override~
~%NashkelCarnival%.are~ ~override~
READ_BYTE "0x48" "flags"
WRITE_BYTE "0x48" ("%flags%" BOR "0b00000001")
BUT_ONLY_IF_IT_CHANGES
/* CITY and OUTDOOR */
COPY_EXISTING ~%WyrmsCrossing%.are~ ~override~
~%Candlekeep_Ch6%.are~ ~override~
~%Gullykin%.are~ ~override~
READ_BYTE "0x48" "flags"
WRITE_BYTE "0x48" ("%flags%" BOR "0b00001001")
BUT_ONLY_IF_IT_CHANGES
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
/* WizWom's Tutu NPC Battle fix: TUTU only, not compatible with BGT scripts */
COPY_EXISTING ~%EDWIN_BCS%.bcs~ ~override~
~%ELDOTH_BCS%.bcs~ ~override~
~%SHARTEEL_BCS%.bcs~ ~override~
~%JAHEIRA_BCS%.bcs~ ~override~
~%KAGAIN_BCS%.bcs~ ~override~
~%KHALID_BCS%.bcs~ ~override~
~%KIVAN_BCS%.bcs~ ~override~
~%MINSC_BCS%.bcs~ ~override~
~%MONTARON_BCS%.bcs~ ~override~
~%QUAYLE_BCS%.bcs~ ~override~
~%TIAX_BCS%.bcs~ ~override~
~%VICONIA_BCS%.bcs~ ~override~
~%DYNAHEIR_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE ~MakeUnselectable(5000)~ ~MakeUnselectable(6) Continue()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
END
/* Miloch's bugged spell/script fixes (required for Gnomes) */
COPY_EXISTING ~mage14d.bcs~ ~override~ // Fix script syntax error
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY EXACT_MATCH ~!Dead("yself)")~ ~!StateCheck(Myself,4032)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
ACTION_IF NOT(MOD_IS_INSTALLED setup-scs.tp2 32) THEN BEGIN // Non-SCS Smarter Priests
EXTEND_TOP ~%tutu_var%priest4.bcs~ ~BG1NPC/phase2/baf/x#pries4.baf~ // Add a few spells
END
COPY_EXISTING ~%tutu_var%ghoult.itm~ ~override~ // Fix droppable Ghoul Touch
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
READ_BYTE 0x18 fl // Flags
PATCH_IF ((fl BAND 0b00000100) = 0b00000100) BEGIN // If movable
WRITE_BYTE 0x18 (fl BAND 0b11110011) // Make unmovable
END
END
BUT_ONLY_IF_IT_CHANGES
/* BEGIN PHASE I BG1NPC PROJECT */
BEGIN @1007
GROUP @1006
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
COPY ~BG1NPC/Core/X#component.xx~ ~override/X#BG1NPCPhase1.G3~
COPY ~BG1NPC/Core/X#component.xx~ ~override/X#BG1NPCPhase2.G3~
/* makes sure PIDs go last */
UNINSTALL ~bg1npc.tp2~ 200
/* allows us to regexp match tabs and newlines */
INCLUDE ~BG1NPC/LIB/extra_regexp_vars.tpa~
/* Macro for blanking sounds and setting SOURCE_RES as DV, script, and dialog */
DEFINE_PATCH_MACRO ~source_cre_sound_cleanup~ BEGIN
WRITE_LONG INITIAL_MEETING (BNOT 0x0)
WRITE_LONG DIALOGUE_HOSTILE (BNOT 0x0)
WRITE_LONG MORALE (BNOT 0x0)
WRITE_LONG HAPPY (BNOT 0x0)
WRITE_LONG UNHAPPY_ANNOYED (BNOT 0x0)
WRITE_LONG UNHAPPY_SERIOUS (BNOT 0x0)
WRITE_LONG UNHAPPY_BREAKING (BNOT 0x0)
WRITE_LONG LEADER (BNOT 0x0)
WRITE_LONG TIRED (BNOT 0x0)
WRITE_LONG BORED (BNOT 0x0)
WRITE_LONG BATTLE_CRY1 (BNOT 0x0)
WRITE_LONG BATTLE_CRY2 (BNOT 0x0)
WRITE_LONG BATTLE_CRY3 (BNOT 0x0)
WRITE_LONG BATTLE_CRY4 (BNOT 0x0)
WRITE_LONG BATTLE_CRY5 (BNOT 0x0)
WRITE_LONG HURT (BNOT 0x0)
WRITE_LONG AREA_FOREST (BNOT 0x0)
WRITE_LONG AREA_CITY (BNOT 0x0)
WRITE_LONG AREA_DUNGEON (BNOT 0x0)
WRITE_LONG AREA_DAY (BNOT 0x0)
WRITE_LONG AREA_NIGHT (BNOT 0x0)
WRITE_LONG SELECT_COMMON1 (BNOT 0x0)
WRITE_LONG SELECT_COMMON2 (BNOT 0x0)
WRITE_LONG SELECT_COMMON3 (BNOT 0x0)
WRITE_LONG SELECT_COMMON4 (BNOT 0x0)
WRITE_LONG SELECT_COMMON5 (BNOT 0x0)
WRITE_LONG SELECT_COMMON6 (BNOT 0x0)
WRITE_LONG SELECT_ACTION1 (BNOT 0x0)
WRITE_LONG SELECT_ACTION2 (BNOT 0x0)
WRITE_LONG SELECT_ACTION3 (BNOT 0x0)
WRITE_LONG SELECT_ACTION4 (BNOT 0x0)
WRITE_LONG SELECT_ACTION5 (BNOT 0x0)
WRITE_LONG SELECT_ACTION6 (BNOT 0x0)
WRITE_LONG SELECT_ACTION7 (BNOT 0x0)
WRITE_LONG SELECT_RARE1 (BNOT 0x0)
WRITE_LONG SELECT_RARE2 (BNOT 0x0)
WRITE_LONG CRITICAL_HIT (BNOT 0x0)
WRITE_LONG CRITICAL_MISS (BNOT 0x0)
WRITE_LONG TARGET_IMMUNE (BNOT 0x0)
WRITE_LONG INVENTORY_FULL (BNOT 0x0)
WRITE_LONG PICKED_POCKET (BNOT 0x0)
WRITE_LONG HIDDEN_IN_SHADOWS (BNOT 0x0)
WRITE_LONG SPELL_DISRUPTED (BNOT 0x0)
WRITE_LONG SET_A_TRAP (BNOT 0x0)
WRITE_LONG BIO (BNOT 0x0)
WRITE_ASCIIE 0x248 ~%SOURCE_RES%~ #8 // script
WRITE_ASCIIE 0x2cc ~%SOURCE_RES%~ #8 // dialogue
WRITE_ASCIIE 0x280 ~%SOURCE_RES%~ #32 // death variable
END
/* Macro adding proximity trigger into FW /ARD013.ARE (for Coran dragon talk) by pro-5 */
DEFINE_PATCH_MACRO ~DRAGON_TRIGGER~ BEGIN
READ_LONG 0x54 "actor_off"
READ_LONG 0x5c "info_off"
READ_SHORT 0x5a "info_num"
READ_LONG 0x60 "spawn_off"
READ_LONG 0x68 "ent_off"
READ_LONG 0x70 "cont_off"
READ_LONG 0x78 "item_off"
READ_LONG 0x7c "vert_off"
READ_SHORT 0x80 "vert_num"
READ_LONG 0x84 "amb_off"
READ_LONG 0x88 "var_off"
READ_LONG 0xa0 "bmp_off"
READ_LONG 0xa8 "door_off"
READ_LONG 0xb0 "anim_off"
READ_LONG 0xb8 "tiled_off"
READ_LONG 0xbc "song_off"
READ_LONG 0xc0 "rest_off"
READ_LONG 0xc4 "note_off"
SET "Left" = 1
SET "Top" = 1
SET "Right" = 2800
SET "Bottom" = 1600
WRITE_SHORT 0x5a ("%info_num%" + 1)
INSERT_BYTES "%info_off%" 0xC4 // insert new blank info point
WRITE_ASCII "%info_off%" ~P5#DragonTrigger~ // name
WRITE_SHORT ("%info_off%" + 0x22) "%Left%"
WRITE_SHORT ("%info_off%" + 0x24) "%Top%"
WRITE_SHORT ("%info_off%" + 0x26) "%Right%"
WRITE_SHORT ("%info_off%" + 0x28) "%Bottom%"
WRITE_SHORT ("%info_off%" + 0x2A) 4 // # vertices
WRITE_LONG ("%info_off%" + 0x2C) "%vert_num%" // first vertex index
WRITE_BYTE ("%info_off%" + 0x60) 2 // Flags: Trap Resets=true
// WRITE_BYTE ("%info_off%" + 0x60) 10 // Flags: Trap Resets=true, Trap Detectable=true - for testing
// WRITE_SHORT ("%info_off%" + 0x68) 1 // Trap det.difficulty - for testing
WRITE_SHORT ("%info_off%" + 0x6C) 1 // Trap flag - needed
WRITE_ASCII ("%info_off%" + 0x7C) ~P5ARD013~ #8 // Script name
PATCH_IF NOT ("%actor_off%" < "%info_off%") BEGIN
WRITE_LONG 0x54 ("%actor_off%" + 0xC4)
END
PATCH_IF NOT ("%spawn_off%" < "%info_off%") BEGIN
WRITE_LONG 0x60 ("spawn_off" + 0xC4)
END
PATCH_IF NOT ("%ent_off%" < "%info_off%") BEGIN
WRITE_LONG 0x68 ("ent_off" + 0xC4)
END
PATCH_IF NOT ("%cont_off%" < "%info_off%") BEGIN
WRITE_LONG 0x70 ("cont_off" + 0xC4)
END
PATCH_IF NOT ("%item_off%" < "%info_off%") BEGIN
WRITE_LONG 0x78 ("item_off" + 0xC4)
END
PATCH_IF NOT ("%vert_off%" < "%info_off%") BEGIN
WRITE_LONG 0x7c ("vert_off" + 0xC4)
END
PATCH_IF NOT ("%amb_off%" < "%info_off%") BEGIN
WRITE_LONG 0x84 ("amb_off" + 0xC4)
END
PATCH_IF NOT ("%var_off%" < "%info_off%") BEGIN
WRITE_LONG 0x88 ("var_off" + 0xC4)
END
PATCH_IF NOT ("%bmp_off%" < "%info_off%") BEGIN
WRITE_LONG 0xa0 ("bmp_off" + 0xC4)
END
PATCH_IF NOT ("%door_off%" < "%info_off%") BEGIN
WRITE_LONG 0xa8 ("door_off" + 0xC4)
END
PATCH_IF NOT ("%anim_off%" < "%info_off%") BEGIN
WRITE_LONG 0xb0 ("anim_off" + 0xC4)
END
PATCH_IF NOT ("%tiled_off%" < "%info_off%") BEGIN
WRITE_LONG 0xb8 ("tiled_off" + 0xC4)
END
PATCH_IF NOT ("%song_off%" < "%info_off%") BEGIN
WRITE_LONG 0xbc ("song_off" + 0xC4)
END
PATCH_IF NOT ("%rest_off%" < "%info_off%") BEGIN
WRITE_LONG 0xc0 ("rest_off" + 0xC4)
END
PATCH_IF NOT ("%note_off%" < "%info_off%") BEGIN
WRITE_LONG 0xc4 ("note_off" + 0xC4)
END
// Add 4 new vertices
READ_LONG 0x54 "actor_off"
READ_LONG 0x5c "info_off"
READ_SHORT 0x5a "info_num"
READ_LONG 0x60 "spawn_off"
READ_LONG 0x68 "ent_off"
READ_LONG 0x70 "cont_off"
READ_LONG 0x78 "item_off"
READ_LONG 0x7c "vert_off"
READ_SHORT 0x80 "vert_num"
READ_LONG 0x84 "amb_off"
READ_LONG 0x88 "var_off"
READ_LONG 0xa0 "bmp_off"
READ_LONG 0xa8 "door_off"
READ_LONG 0xb0 "anim_off"
READ_LONG 0xb8 "tiled_off"
READ_LONG 0xbc "song_off"
READ_LONG 0xc0 "rest_off"
READ_LONG 0xc4 "note_off"
WRITE_SHORT 0x80 ("%vert_num%" + 4)
INSERT_BYTES ("%vert_off%" + (0x04 * "%vert_num%")) 0x10
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%") 948 // Vertex1.X
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" + 2) 1588 // Vertex1.Y
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" + 4) 651 // Vertex2.X
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" + 6) 1125 // Vertex2.Y
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" + 8) 2366 // Vertex3.X
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" +10) 351 // Vertex3.Y
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" +12) 2743 // Vertex4.X
WRITE_SHORT ("%vert_off%" + 0x04 * "%vert_num%" +14) 618 // Vertex4.Y
PATCH_IF NOT ("%actor_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x54 ("%actor_off%" + 0x10)
END
PATCH_IF NOT ("%info_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x5c ("info_off" + 0x10)
END
PATCH_IF NOT ("%spawn_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x60 ("spawn_off" + 0x10)
END
PATCH_IF NOT ("%ent_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x68 ("ent_off" + 0x10)
END
PATCH_IF NOT ("%cont_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x70 ("cont_off" + 0x10)
END
PATCH_IF NOT ("%item_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x78 ("item_off" + 0x10)
END
PATCH_IF NOT ("%amb_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x84 ("amb_off" + 0x10)
END
PATCH_IF NOT ("%var_off%" < "%vert_off%") BEGIN
WRITE_LONG 0x88 ("var_off" + 0x10)
END
PATCH_IF NOT ("%bmp_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xa0 ("bmp_off" + 0x10)
END
PATCH_IF NOT ("%door_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xa8 ("door_off" + 0x10)
END
PATCH_IF NOT ("%anim_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xb0 ("anim_off" + 0x10)
END
PATCH_IF NOT ("%tiled_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xb8 ("tiled_off" + 0x10)
END
PATCH_IF NOT ("%song_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xbc ("song_off" + 0x10)
END
PATCH_IF NOT ("%rest_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xc0 ("rest_off" + 0x10)
END
PATCH_IF NOT ("%note_off%" < "%vert_off%") BEGIN
WRITE_LONG 0xc4 ("note_off" + 0x10)
END
END
/* set up .tra files for Tutu vs BGT sound resources, create platform files */
COPY ~BG1NPC/TRA/%LANGUAGE%/X#ADDIAL_tmp.tra~ ~BG1NPC/TRA/%LANGUAGE%/X#ADDIAL.tra~
EVALUATE_BUFFER
/* BGT compatability macro */
INCLUDE ~BG1NPC/LIB/macro_tutu_items_to_bgt.tph~
/* Patching _ELDOTH.bcs */
COPY_EXISTING ~%ELDOTH_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE
~GlobalTimerExpired("RescueSkie","GLOBAL")~
~!Global("X#SkieLeftEldoth","GLOBAL",1) GlobalTimerExpired("RescueSkie","GLOBAL")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
/* Death variable assignments for Yeslick dialogue X#YESLI1.BAF */
COPY_EXISTING ~%tutu_var%iron11.cre~ ~override~
WRITE_ASCII 0x280 ~iron11~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%poe.cre~ ~override~
WRITE_ASCII 0x280 ~poe~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
/* items */
/* Ring of Human Influence */
COPY_EXISTING ~BG1NPC/Phase1/ITM/X#RINGRO.itm~ ~override/X#RINGRO.itm~
SAY NAME1 @10
SAY NAME2 @11
SAY UNIDENTIFIED_DESC @12
SAY DESC @13
BUT_ONLY_IF_IT_CHANGES
/* Ajantis shield */
COPY ~BG1NPC/Phase1/ITM/X#ISHAJ.BAM~ ~override~
COPY ~BG1NPC/Phase1/ITM/X#CSHAJ.BAM~ ~override~
COPY ~BG1NPC/Phase1/ITM/X#AJSHLD.itm~ ~override~
SAY NAME1 @6
SAY NAME2 @7
SAY UNIDENTIFIED_DESC @8
SAY DESC @9
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~GSHLD03~ #8 // ground icon8
END
/* Give Ajantis his shield and a bastard sword (no proficiency) */
COPY_EXISTING ~%tutu_var%ajanti.cre~ ~override~
~%tutu_var%ajanti4.cre~ ~override~
~%tutu_var%ajanti6.cre~ ~override~
ADD_CRE_ITEM ~%tutu_var%SW1H01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~X#AJSHLD~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
/* Imoen - Pink Xan */
COPY ~BG1NPC/Phase1/cre/ANPS.BMP~ ~override~
COPY ~BG1NPC/Phase1/cre/ANPL.BMP~ ~override~
COPY ~BG1NPC/Phase1/cre/ANBS.BMP~ ~override~
COPY ~BG1NPC/Phase1/cre/ANBL.BMP~ ~override~
COPY ~BG1NPC/Phase1/ITM/PINKXAN.SPL~ ~override~
SAY 8 @14
WRITE_ASCII 0xde ~ANPS~
WRITE_ASCII 0xae ~ANPL~
COPY ~BG1NPC/Phase1/ITM/PINKXAN.SPL~ ~override/pinkback.spl~
SAY 8 @14
WRITE_ASCII 0xde ~ANBS~
WRITE_ASCII 0xae ~ANBL~
/* Imoen - Lockpick */
COPY ~BG1NPC/Phase1/ITM/X#IMSAF.SPL~ ~override/x#imsaf.spl~
SAY 8 @15
COPY ~BG1NPC/Phase1/ITM/NUTKIN.EFF~ ~override~
COPY ~BG1NPC/Phase1/ITM/X#DEX.SPL~ ~override~
WRITE_ASCII 0x10 ~CAS_M08~ #8 // casting sound
WRITE_ASCII 0x3a ~SPWI415C~ #8 // spell icon
WRITE_ASCII 0x76 ~SPWI415B~ #8 // ability #0 icon
WRITE_ASCII 0xDE ~EFF_P07~ #8 // resource
COPY ~BG1NPC/Phase1/ITM/X#POLY.SPL~ ~override~
WRITE_ASCII 0x10 ~CAS_M08~ #8 // casting sound
WRITE_ASCII 0x3a ~SPWI415C~ #8 // spell icon
WRITE_ASCII 0x76 ~SPWI415B~ #8 // ability #0 icon
WRITE_ASCII 0xDE ~EFF_P07~ #8 // resource
COPY ~BG1NPC/Phase1/ITM/X#TOME.itm~ ~override~
SAY NAME1 @16
SAY NAME2 @16
SAY UNIDENTIFIED_DESC @17
SAY DESC @18
COPY ~BG1NPC/Phase1/ITM/X#IAMUL.itm~ ~override/x#iamul.itm~
SAY NAME1 @19
SAY NAME2 @19
SAY UNIDENTIFIED_DESC @20
SAY DESC @20
/* Safana's Item: */
COPY ~BG1NPC/Phase1/ITM/X#SABOX.itm~ ~override/x#sabox.itm~
SAY NAME1 @21
SAY NAME2 @21
SAY UNIDENTIFIED_DESC @22
SAY DESC @22
/* Imoen - Tarnesh Spell scene */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/baf/X#CANTRP.BAF~
/* Phase 1 - Dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#AJANTIS.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#ALORA.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#ALOREPL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#BRANW.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#CORAN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#DYNAH.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#EDWIN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#ELDOTH.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#FALDORN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#GARRI.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#IMOEN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#JAHEIRA.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#KAGAIN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#KHALID.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#KIVAN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#MINSC.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#MONTARON.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#QUAYL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#SAFANA.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#SHARTEEL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#SKIE.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#TIAX.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#VICONIA.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#XAN.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#XZAR.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#YESLICK.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#ADDIAL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#RUMOR.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase1/dlg/X#PCBURY.D~
/* Dream script compilation */
EXTEND_TOP ~%tutu_var%EDWIND.bcs~ ~BG1NPC/Phase1/baf/P#EDWIND.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%ELDOTD.bcs~ ~BG1NPC/Phase1/baf/P#ELDOTD.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%IMOEND.bcs~ ~BG1NPC/Phase1/baf/P#IMOEND.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%KAGAID.bcs~ ~BG1NPC/Phase1/baf/P#KAGAID.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%KIVAND.bcs~ ~BG1NPC/Phase1/baf/P#KIVAND.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%MINSCD.bcs~ ~BG1NPC/Phase1/baf/P#MINSCD.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%MONTAD.bcs~ ~BG1NPC/Phase1/baf/P#MONTAD.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%SHARTD.bcs~ ~BG1NPC/Phase1/baf/P#SHARTD.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%SKIED.bcs~ ~BG1NPC/Phase1/baf/P#SKIED.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%VICOND.bcs~ ~BG1NPC/Phase1/baf/P#VICOND.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%XZARD.bcs~ ~BG1NPC/Phase1/baf/P#XZARD.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%YESLID.bcs~ ~BG1NPC/Phase1/baf/P#YESLID.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%GARRID.bcs~ ~BG1NPC/Phase1/baf/P#GARRID.BAF~
EVALUATE_BUFFER
/* NPC override script compilation */
EXTEND_TOP ~%ALORA_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#ALORA1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%AJANTIS_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#AJANTIS1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%BRANWEN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#BRANWEN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%CORAN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#CORAN1.BAF~
EVALUATE_BUFFER
USING ~BG1NPC/TRA/%LANGUAGE%/X#CORAN1.TRA~
EXTEND_TOP ~%DYNAHEIR_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#DYNAHEIR1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%EDWIN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#EDWIN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%ELDOTH_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#ELDOT1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%FALDORN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#FALDO1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%GARRICK_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#GARRI1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%IMOEN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#IMOEN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%JAHEIRA_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#JAHEIRA1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KAGAIN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#KAGAIN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KHALID_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#KHALID1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KIVAN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#KIVAN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%MINSC_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#MINSC1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%MONTARON_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#MONTA1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%QUAYLE_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#QUAYLE1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SAFANA_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#SAFANA1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SHARTEEL_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#SHAR1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SKIE_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#SKIE1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%TIAX_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#TIAX1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%VICONIA_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#VICON1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%XAN_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#XAN1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%XZAR_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#XZAR1.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%YESLICK_BCS%.bcs~ ~BG1NPC/Phase1/baf/X#YESLI1.BAF~
EVALUATE_BUFFER
/* Firewine */
EXTEND_BOTTOM ~%FirewineBridge_BCS%.bcs~ ~BG1NPC/Phase1/baf/P#FW4500.baf~
EVALUATE_BUFFER
COPY_EXISTING ~%tutu_scriptf%twbax_a.cre~ ~override~
~%tutu_scriptf%twbax_b.cre~ ~override~
~%tutu_scriptf%twbax_c.cre~ ~override~
~%tutu_scriptf%twbax_d.cre~ ~override~
~%tutu_scriptf%twbax_e.cre~ ~override~
WRITE_EVALUATED_ASCII 0x2CC ~X#RUMOR~ #8 // dialog
BUT_ONLY_IF_IT_CHANGES
/* BEGIN PHASE II BG1NPC PROJECT */
/* DV assignments */
COPY_EXISTING ~%tutu_var%alvanh.cre~ ~override~
WRITE_ASCII 0x280 ~alvahe~ #32 // death variable X#MOINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%slave.cre~ ~override~
WRITE_ASCII 0x280 ~cmslave~ #32 // death variable unused
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%korax.cre~ ~override~
WRITE_ASCII 0x280 ~korax~ #32 // death variable X#JAINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%coksmth.cre~ ~override~
WRITE_ASCII 0x280 ~peter~ #32 // death variable X#FAINT.D
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%entill.cre~ ~override~
WRITE_ASCII 0x280 ~entill~ #32 // death variable X#JAINT.D
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%phlydi3.cre~ ~override~
WRITE_ASCII 0x280 ~phlydia~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bearbl.cre~ ~override~
WRITE_ASCII 0x280 ~bearbl~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bearbr.cre~ ~override~
WRITE_ASCII 0x280 ~bearbr~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bearca.cre~ ~override~
WRITE_ASCII 0x280 ~bearca~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bearpo.cre~ ~override~
WRITE_ASCII 0x280 ~bearpo~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%elmin5.cre~ ~override~
WRITE_ASCII 0x280 ~elminster5~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
/* ToSC death Variables */
ACTION_IF (FILE_EXISTS_IN_GAME ~FW1500.are~) OR (FILE_EXISTS_IN_GAME ~ARW500.are~) THEN BEGIN
COPY_EXISTING ~%tutu_var%pridem.cre~ ~override~
WRITE_ASCII 0x280 ~pridem~ #32 // death variable X#BRINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_scripta%varicem.cre~ ~override~
WRITE_ASCII 0x280 ~avaricem~ #32 // death variable X#BRINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%fearm.cre~ ~override~
WRITE_ASCII 0x280 ~fearm~ #32 // death variable X#BRINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%lovem.cre~ ~override~
WRITE_ASCII 0x280 ~lovem~ #32 // death variable X#BRINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_scripto%grema03.cre~ ~override~
WRITE_ASCII 0x280 ~cmogremage~ #32 // death variable X#XZINT2.BAF
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%zombiew.cre~ ~override~
WRITE_BYTE 0x272 0x94 // Race (zombie, was skeleton)
WRITE_ASCII 0x280 ~zombiew~ #32 // death variable X#XZINT2.BAF
BUT_ONLY_IF_IT_CHANGES
END
/* ToSC Interjections, ToSC only: */
ACTION_IF FILE_EXISTS_IN_GAME ~FW1500.are~ OR FILE_EXISTS_IN_GAME ~ARW500.are~ THEN BEGIN // if TotSC is installed
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#TOTSC.d~
END
/* Interjections */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#BRINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#JAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#FAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#SKINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#KIINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#XZINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#MOINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#ELINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#SAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#TIINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#YEINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#KAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#KHINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#AJINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#DYINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#XAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#SHINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#MIINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#EDINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#GAINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#ALINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#IMINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#COINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#VIINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#QUINT.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/x#kiint_new.d~
/* Area Script additions */
EXTEND_BOTTOM ~%SilvershieldEstate_L2_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW0102.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%FishingVillage_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW1400.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%Undercellars_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW0112.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%SorcerousSundries_L2_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW0704.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%LionsWay_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW2700.BAF~
EVALUATE_BUFFER
USING ~BG1NPC/TRA/%LANGUAGE%/P#FW2700.tra~
/* -JW-'s Edwin vs Denak fix */
/* http:// forums.gibberlings3.net/index.php?s=&showtopic=15516&view=findpost&p=133308 */
EXTEND_BOTTOM ~%SpiderWood_BCS%.bcs~ ~BG1NPC/Phase2/baf/JW#FW3000.BAF~
/* Interjection scripting changes, added creatures */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#KRUMM.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#JESSUP.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#DORAA.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#MOMUR1.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ZIZI1.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ZIZI2.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ZIZI3.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ZIZI4.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XZSLIM.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XZJELL.BAF~
/* Interjection scripting changes, BG1 NPCs */
EXTEND_TOP ~%BRANWEN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#BRINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_scriptr%EDDEATH.bcs~ ~BG1NPC/Phase2/baf/X#BRDWI.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%JAHEIRA_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#JAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%FALDORN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#FAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SKIE_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#SKINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KIVAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#KIINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%MONTARON_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#MOINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%XZAR_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#XZINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%NIEMAIN.bcs~ ~BG1NPC/Phase2/baf/X#NIEMAIN.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%ELDOTH_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#ELINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SAFANA_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#SAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%TIAX_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#TIINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%RIELTAR.bcs~ ~BG1NPC/Phase2/baf/X#RIYE.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%YESLICK_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#YEINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KAGAIN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#KAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KHALID_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#KHINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%AJANTIS_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#AJINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%DYNAHEIR_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#DYINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%EDWIN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#EDINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%MINSC_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#MIINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%CORAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#COINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%IMOEN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#IMINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%GARRICK_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#GAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%SHARTEEL_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#SHINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%XAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#XAINT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%DRIZZT.bcs~ ~BG1NPC/Phase2/baf/X#DRIZZT2.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%KIVAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/x#kiint_new.baf~
EVALUATE_BUFFER
/* Added Quests */
/* Edwin */
/* Tiax Quest */
/* creatures */
/* Belgin */
COPY ~BG1NPC/Phase2/cre/x#belgin.cre~ ~override~
SAY NAME1 ~Belgin~
SAY NAME2 ~Belgin~
SAY INITIAL_MEETING @557
SAY BATTLE_CRY1 @558
SAY BATTLE_CRY2 @558
SAY BATTLE_CRY3 @558
SAY BATTLE_CRY4 @558
SAY BATTLE_CRY5 @558
SAY DAMAGE @559
SAY DYING @560
SAY SELECT_COMMON1 @561
SAY DIALOGUE_DEFAULT @561
WRITE_ASCII 0x248 ~x#belgin~ #8 // override
WRITE_ASCII 0x2cc ~x#belgin~ #8 // dialogue
WRITE_ASCII 0x280 ~x#belgin~ #32 // DV
ADD_CRE_ITEM ~hamm01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~shld04~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~chan02~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
ADD_CRE_ITEM ~helm06~ #0 #0 #0 ~IDENTIFIED~ ~HELMET~
/* Karris */
COPY ~BG1NPC/Phase2/cre/x#karris.cre~ ~override~
SAY NAME1 ~Karris~
SAY NAME2 ~Karris~
SAY INITIAL_MEETING @476
SAY BATTLE_CRY1 @488
SAY BATTLE_CRY2 @488
SAY BATTLE_CRY3 @488
SAY BATTLE_CRY4 @488
SAY BATTLE_CRY5 @488
SAY DAMAGE @555
SAY DYING @556
SAY SELECT_COMMON1 @476
SAY DIALOGUE_DEFAULT @476
WRITE_ASCII 0x248 ~x#karris~ #8 // override
WRITE_ASCII 0x2cc ~x#karris~ #8 // dialogue
WRITE_ASCII 0x280 ~x#karris~ #32 // DV
ADD_CRE_ITEM ~sw1h05~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~leat11~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
/* Assorted bounty hunters */
COPY ~BG1NPC/Phase2/cre/x#tqbh1.cre~ ~override~
SAY NAME1 ~Alvo~
SAY NAME2 ~Alvo~
SAY INITIAL_MEETING @474
SAY BATTLE_CRY1 @354
SAY BATTLE_CRY2 @354
SAY BATTLE_CRY3 @354
SAY BATTLE_CRY4 @354
SAY BATTLE_CRY5 @354
SAY DAMAGE @473
SAY DYING @472
SAY SELECT_COMMON1 @474
SAY DIALOGUE_DEFAULT @474
WRITE_ASCII 0x2cc ~x#tqbh~ #8 // dialogue
WRITE_ASCII 0x280 ~x#tqbh1~ #32 // DV
WRITE_ASCIIE 0x248 ~x#tqbh~ #8 // override script
ADD_CRE_ITEM ~ax1h01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~ax1h01~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~chan01~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
COPY ~BG1NPC/Phase2/cre/x#tqbh2.cre~ ~override~
SAY NAME1 ~Leti~
SAY NAME2 ~Leti~
SAY INITIAL_MEETING @25
SAY BATTLE_CRY1 @25
SAY BATTLE_CRY2 @25
SAY BATTLE_CRY3 @25
SAY BATTLE_CRY4 @25
SAY BATTLE_CRY5 @25
SAY DAMAGE @3
SAY DYING @4
SAY SELECT_COMMON1 @25
SAY DIALOGUE_DEFAULT @25
WRITE_ASCII 0x2cc ~x#tqbh~ #8 // dialogue
WRITE_ASCII 0x280 ~x#tqbh2~ #32 // DV
WRITE_ASCIIE 0x248 ~x#tqbh~ #8 // override script
ADD_CRE_ITEM ~sw1h43~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~sw1h43~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~leat01~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
COPY ~BG1NPC/Phase2/cre/x#tqbh3.cre~ ~override~
SAY NAME1 ~Zed~
SAY NAME2 ~Zed~
SAY INITIAL_MEETING @255
SAY BATTLE_CRY1 @255
SAY BATTLE_CRY2 @255
SAY BATTLE_CRY3 @255
SAY BATTLE_CRY4 @255
SAY BATTLE_CRY5 @255
SAY DAMAGE @23
SAY DYING @387
SAY SELECT_COMMON1 @255
SAY DIALOGUE_DEFAULT @255
WRITE_ASCII 0x2cc ~x#tqbh~ #8 // dialogue
WRITE_ASCII 0x280 ~x#tqbh3~ #32 // DV
WRITE_ASCIIE 0x248 ~x#tqbh~ #8 // override script
ADD_CRE_ITEM ~sw1h01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~sw1h01~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~leat01~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
COPY ~BG1NPC/Phase2/cre/x#tqbh4.cre~ ~override~
SAY NAME1 ~Mati~
SAY NAME2 ~Mati~
SAY INITIAL_MEETING @455
SAY BATTLE_CRY1 @455
SAY BATTLE_CRY2 @455
SAY BATTLE_CRY3 @455
SAY BATTLE_CRY4 @455
SAY BATTLE_CRY5 @455
SAY DAMAGE @388
SAY DYING @399
SAY SELECT_COMMON1 @455
SAY DIALOGUE_DEFAULT @455
WRITE_ASCII 0x2cc ~x#tqbh~ #8 // dialogue
WRITE_ASCII 0x280 ~x#tqbh4~ #32 // DV
WRITE_ASCIIE 0x248 ~x#tqbh~ #8 // override script
ADD_CRE_ITEM ~ax1h01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~ax1h01~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~chan01~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
/* scripts */
EXTEND_BOTTOM ~%TIAX_BCS%.bcs~ ~BG1NPC/Phase2/baf/x#tqtiax.baf~
EVALUATE_BUFFER
EXTEND_BOTTOM ~X#BELGIN.bcs~ ~BG1NPC/Phase2/baf/x#tqbelgin.baf~
EVALUATE_BUFFER
EXTEND_BOTTOM ~X#KARRIS.bcs~ ~BG1NPC/Phase2/baf/x#tqkarris.baf~
EVALUATE_BUFFER
COMPILE ~BG1NPC/Phase2/baf/x#tqbh.baf~
/* area scripts */
EXTEND_BOTTOM ~%SEBGBStarsL2_BCS%.bcs~ ~BG1NPC/Phase2/baf/x#tqfw0106.baf~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%BGDocks_BCS%.bcs~ ~BG1NPC/Phase2/baf/x#tqfw1200.baf~
EVALUATE_BUFFER
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/x#tiaxquest.d~
/* Kagain's Caravan */
/* Kagain Caravan quest rebuild */
/* area patching */
COPY_EXISTING ~%CoastWay_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~GlobalLT("KagainCaravan","GLOBAL",2)~ ~False()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
EXTEND_BOTTOM ~%CoastWay_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW2800.baf~
EVALUATE_BUFFER
/* Overriding old Kagain Quest interaction triggers */
COPY_EXISTING ~%KAGAIN_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~GlobalTimerExpired("Kagain","GLOBAL")~ ~False()~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
EXTEND_BOTTOM ~%KAGAIN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#KGQUST.BAF~
EVALUATE_BUFFER
/* items */
COPY ~BG1NPC/phase2/itm/x#silsh.itm~ ~override~
SAY NAME1 @34
SAY NAME2 @34
SAY UNIDENTIFIED_DESC @35
SAY DESC @35
/* creatures */
COPY_EXISTING ~%tutu_scripti%ronelit.cre~ ~override/x#kaband.cre~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @24
SAY NAME2 @24
SAY INITIAL_MEETING @25
SAY BATTLE_CRY1 @26
SAY BATTLE_CRY2 @27
SAY BATTLE_CRY3 @25
SAY BATTLE_CRY4 @26
SAY BATTLE_CRY5 @27
SAY ATTACK1 @25
SAY ATTACK2 @26
SAY DAMAGE @28
SAY DYING @29
SAY SELECT_COMMON1 @27
SAY SELECT_COMMON2 @27
SAY SELECT_COMMON3 @27
SAY SELECT_COMMON4 @27
SAY SELECT_COMMON5 @27
SAY SELECT_COMMON6 @27
WRITE_SHORT 0x0028 0x6110 // animation ID fighter_female_human
WRITE_BYTE 0x0237 0x02// gender: female
WRITE_ASCII 0x0248 ~X#KABND2~ #8 // Creature script - Override
WRITE_ASCII 0x0250 ~~ #8 // Creature script - Class
WRITE_ASCII 0x0258 ~~ #8 // Creature script - Race
WRITE_ASCII 0x0260 ~~ #8 // Creature script - General
WRITE_BYTE 0x270 ~128~ // Allegiance = Neutral
WRITE_EVALUATED_ASCII 0x0268 ~%tutu_scriptw%TASIGHT~ #8 // Creature script - Default
WRITE_BYTE 0x0275 0x02// gender: female
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
WRITE_EVALUATED_ASCII 0x2CC ~%DEST_RES%~ #8// dialog
ADD_CRE_ITEM ~X#SILSH~ #0 #0 #0 ~IDENTIFIED~ ~INV5~
ADD_CRE_ITEM ~%tutu_var%misc86~ #0 #0 #0 ~IDENTIFIED~ ~GLOVES~
COPY_EXISTING ~%tutu_var%bandit.cre~ ~override/x#bandk1.cre~
~%tutu_var%bandit.cre~ ~override/x#bandk2.cre~
~%tutu_var%bandit.cre~ ~override/x#bandk3.cre~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @30
SAY NAME2 @30
SAY INITIAL_MEETING @31
SAY BATTLE_CRY1 @31
SAY BATTLE_CRY2 @31
SAY BATTLE_CRY3 @31
SAY BATTLE_CRY4 @31
SAY BATTLE_CRY5 @31
SAY DAMAGE @32
SAY DYING @33
SAY SELECT_COMMON1 @31
SAY SELECT_COMMON2 @31
SAY SELECT_COMMON3 @31
SAY SELECT_COMMON4 @31
SAY SELECT_COMMON5 @31
SAY SELECT_COMMON6 @31
WRITE_ASCII 0x2CC ~~ #8 // dialog
WRITE_ASCII 0x0258 ~~ #8 // Creature script - Race
WRITE_ASCII 0x0260 ~~ #8 // Creature script - General
WRITE_EVALUATED_ASCII 0x0268 ~%tutu_scriptw%TARSGT~ #8 // Creature script - Default
WRITE_BYTE 0x270 ~128~ // Allegiance = Neutral
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
/* Adding Brilla's DV */
COPY_EXISTING ~%tutu_var%brilla.cre~ ~override~
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~brilla~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#KABND2.BAF~
/* dialogue */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#KAQST.D~
/* Eldoth's Bently Quarrel */
COPY ~BG1NPC/phase2/itm/x#fai1.itm~ ~override~
SAY NAME1 @56
SAY NAME2 @57
SAY UNIDENTIFIED_DESC @58
SAY DESC @59
COPY ~BG1NPC/phase2/itm/x#fai2.itm~ ~override~
SAY NAME1 @60
SAY NAME2 @61
SAY UNIDENTIFIED_DESC @62
SAY DESC @63
COPY ~BG1NPC/phase2/itm/x#fai3.itm~ ~override~
SAY NAME1 @64
SAY NAME2 @64
SAY UNIDENTIFIED_DESC @65
SAY DESC @66
COPY ~BG1NPC/phase2/itm/x#fai4.itm~ ~override~
SAY NAME1 @67
SAY NAME2 @67
SAY UNIDENTIFIED_DESC @68
SAY DESC @69
COPY ~BG1NPC/phase2/itm/X#FAI5.itm~ ~override~
SAY NAME1 @70
SAY NAME2 @71
SAY UNIDENTIFIED_DESC @72
SAY DESC @73
/* Eldoth FAI */
COPY ~BG1NPC/phase2/itm/X#FRIED2.STO~ ~override~
SAY STORE_NAME @624
SAY 0xA4 @52
SAY 0xb8 @53
SAY 0xcc @54
SAY 0xe0 @55
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~RFRIED2~ #8 // rumors dialog
END
/* Xzar's Quest */
/* items */
COPY ~BG1NPC/phase2/itm/X#XZSLIM.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#XZSLIM.itm~ ~override~
SAY NAME1 @48
SAY NAME2 @49
SAY UNIDENTIFIED_DESC @50
SAY DESC @51
/* creatures */
COPY ~BG1NPC/Phase2/cre/x#harl1.cre~ ~override/x#zizi1.cre~
~BG1NPC/Phase2/cre/x#harl1.cre~ ~override/x#zizi2.cre~
~BG1NPC/Phase2/cre/x#harl1.cre~ ~override/x#zizi3.cre~
~BG1NPC/Phase2/cre/x#harl1.cre~ ~override/x#zizi4.cre~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @36
SAY NAME2 @36
SAY DAMAGE @37
SAY DYING @38
SAY SELECT_COMMON1 @37
SAY SELECT_COMMON2 @37
SAY SELECT_COMMON3 @37
SAY SELECT_COMMON3 @37
SAY SELECT_COMMON4 @37
SAY SELECT_COMMON5 @37
SAY SELECT_COMMON6 @37
WRITE_EVALUATED_ASCII 0x248 ~%DEST_RES%~ #8 // Creature script - Override
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#zizi1~) THEN BEGIN
WRITE_ASCII 0x2CC ~ZIZIZI1~ #8 // dialog
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#zizi2~) THEN BEGIN
WRITE_ASCII 0x2CC ~ZIZIZI2~ #8 // dialog
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#zizi3~) THEN BEGIN
WRITE_ASCII 0x2CC ~ZIZIZI3~ #8 // dialog
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#zizi4~) THEN BEGIN
WRITE_ASCII 0x2CC ~ZIZIZI4~ #8 // dialog
END
COPY_EXISTING ~%tutu_var%prost5.cre~ ~override~
~%tutu_var%prost6.cre~ ~override~
~%tutu_var%prost7.cre~ ~override~
~%tutu_var%prost4.cre~ ~override~
~%tutu_var%prost8.cre~ ~override~
~%tutu_var%prost2.cre~ ~override~
~%tutu_var%prost3.cre~ ~override~
WRITE_ASCII 0x280 ~harlot~ #32 // death variable
COPY ~BG1NPC/Phase2/cre/x#jelly.cre~ ~override/x#jelly.cre~
SAY NAME1 @39
SAY NAME2 @39
SAY BATTLE_CRY1 @40
SAY BATTLE_CRY2 @41
SAY BATTLE_CRY3 @40
SAY BATTLE_CRY4 @41
SAY BATTLE_CRY5 @40
SAY ATTACK1 @42
SAY ATTACK2 @43
SAY DAMAGE @44
SAY DYING @45
SAY SELECT_COMMON1 @46
SAY SELECT_COMMON2 @47
WRITE_ASCII 0x248 ~X#XZJELL~ #8// override script
WRITE_ASCII 0x280 ~xzjelly~ #32// death variable
WRITE_EVALUATED_ASCII 0x0268 ~%tutu_scriptw%TASIGHT~ #8 // Creature script - Default
COPY ~BG1NPC/Phase2/cre/x#slime.cre~ ~override/x#slime.cre~
SAY NAME1 @39
SAY NAME2 @39
SAY BATTLE_CRY1 @40
SAY BATTLE_CRY2 @41
SAY BATTLE_CRY3 @40
SAY BATTLE_CRY4 @41
SAY BATTLE_CRY5 @40
SAY ATTACK1 @42
SAY ATTACK2 @43
SAY DAMAGE @44
SAY DYING @45
SAY SELECT_COMMON1 @46
SAY SELECT_COMMON2 @47
WRITE_ASCII 0x248 ~X#XZSLIM~ #8// override script
WRITE_ASCII 0x280 ~xzslime~ #32// death variable
WRITE_EVALUATED_ASCII 0x0268 ~%tutu_scriptw%TASIGHT~ #8 // Creature script - Default
/* Kivan's spear */
COPY ~BG1NPC/phase2/itm/X#KISPEA.itm~ ~override~
SAY NAME1 @74
SAY NAME2 @75
SAY UNIDENTIFIED_DESC @76
SAY DESC @77
WRITE_LONG 0x34 0
/* Great Shield - White Oak */
COPY ~BG1NPC/phase2/itm/X#FASH01.itm~ ~override~
SAY NAME1 @78
SAY NAME2 @78
SAY UNIDENTIFIED_DESC @79
SAY DESC @80
/* DVs */
COPY_EXISTING ~%tutu_var%krumm.cre~ ~override~
WRITE_ASCII 0x248 ~X#KRUMM~ #8 // override script
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%ankheg.cre~ ~override~
~%tutu_var%ankhegg.cre~ ~override~
~%tutu_var%ankhegq.cre~ ~override~
WRITE_ASCII 0x280 ~ankheg~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%ender.cre~ ~override~
WRITE_ASCII 0x280 ~ender~ #8 // death variable
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%serva2.cre~ ~override/x#jessup.cre~
SAY NAME1 @81
SAY NAME2 @81
WRITE_EVALUATED_ASCII 0x248 ~%DEST_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%DEST_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~jessup~ #32 // death variable
COPY_EXISTING ~%tutu_var%nobw2.cre~ ~override/x#dora.cre~
SAY NAME1 @82
SAY NAME2 @82
WRITE_ASCII 0x248 ~X#DORAA~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%tutu_var%DORAA~ #8 // dialog
WRITE_ASCII 0x280 ~doraa~ #32 // death variable
/* Xan's Encounter 1 */
/* items */
COPY ~BG1NPC/phase2/itm/X#CTURN.BAM~ ~override~
~BG1NPC/phase2/itm/X#ITURN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/P#BAG01.itm~ ~override~
SAY NAME1 @163
SAY NAME2 @163
WRITE_ASCII 0x3a ~X#ITURN~ #8
WRITE_ASCII 0x58 ~X#CTURN~ #8
SAY UNIDENTIFIED_DESC @164
SAY DESC @165
COPY ~BG1NPC/phase2/itm/P#BAG02.itm~ ~override~
SAY NAME1 @166
SAY NAME2 @166
SAY UNIDENTIFIED_DESC @167
SAY DESC @168
COPY_EXISTING ~%tutu_var%STO4901.sto~ ~override~
READ_LONG 0x34 "sale_offset"
READ_LONG 0x38 "sale_number"
READ_LONG 0x2C "purchase_offset"
READ_LONG 0x4C "drink_offset"
READ_LONG 0x70 "cure_offset"
WRITE_LONG 0x38 ("%sale_number%" + 2)
INSERT_BYTES ("%sale_offset%" + ("%sale_number%" * 0x1C)) 0x1C
WRITE_ASCII ("%sale_offset%" + ("%sale_number%" * 0x1C)) ~P#BAG02~
WRITE_LONG ("%sale_offset%" + 0x14 + ("%sale_number%" * 0x1C)) 5
INSERT_BYTES ("%sale_offset%" + ("%sale_number%" * 0x1C)) 0x1C
WRITE_ASCII ("%sale_offset%" + ("%sale_number%" * 0x1C)) ~P#BAG01~
WRITE_LONG ("%sale_offset%" + 0x14 + ("%sale_number%" * 0x1C)) 5
PATCH_IF NOT ("%purchase_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x2c ("%purchase_offset%" + 0x38)
END
PATCH_IF NOT ("%drink_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x4c ("%drink_offset%" + 0x38)
END
PATCH_IF NOT ("%cure_offset%" < "%sale_offset%") BEGIN
WRITE_LONG 0x70 ("%cure_offset%" + 0x38)
END
/* creatures */
COPY ~BG1NPC/Phase2/cre/x#david.cre~ ~override~
SAY NAME1 @83
SAY NAME2 @83
SAY MORALE @84
SAY HAPPY @85
SAY UNHAPPY_ANNOYED @86
SAY UNHAPPY_SERIOUS @87
SAY UNHAPPY_BREAKING @88
SAY LEADER @89
SAY TIRED @90
SAY BORED @91
SAY BATTLE_CRY1 @92
SAY BATTLE_CRY2 @93
SAY BATTLE_CRY3 @94
SAY DAMAGE @95
SAY DYING @96
SAY HURT @97
SAY AREA_FOREST @98
SAY AREA_CITY @99
SAY AREA_DUNGEON @100
SAY AREA_DAY @101
SAY AREA_NIGHT @102
SAY SELECT_COMMON1 @103
SAY SELECT_COMMON3 @104
SAY SELECT_COMMON4 @105
SAY SELECT_COMMON5 @106
SAY SELECT_COMMON6 @107
SAY SELECT_ACTION1 @108
SAY SELECT_ACTION2 @109
SAY SELECT_ACTION3 @110
SAY SELECT_ACTION4 @111
SAY SELECT_ACTION5 @112
SAY SELECT_ACTION6 @113
SAY SELECT_ACTION7 @114
SAY SELECT_RARE1 @115
SAY SELECT_RARE2 @116
SAY CRITICAL_HIT @117
SAY CRITICAL_MISS @118
SAY TARGET_IMMUNE @119
SAY INVENTORY_FULL @120
SAY PICKED_POCKET @121
SAY HIDDEN_IN_SHADOWS @122
SAY SPELL_DISRUPTED @123
SAY SET_A_TRAP @124
WRITE_LONG BIO (BNOT 0x0)
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_ASCII 0x34 ~~ #8 // small portrait
WRITE_ASCII 0x2CC ~X#DAVI~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
COPY ~BG1NPC/Phase2/cre/x#cru11.cre~ ~override~
SAY NAME1 @125
SAY NAME2 @125
SAY INITIAL_MEETING @126
SAY UNHAPPY_BREAKING @127
SAY BATTLE_CRY1 @128
SAY BATTLE_CRY2 @129
SAY DAMAGE @130
SAY DYING @131
SAY SELECT_COMMON1 @126
SAY SELECT_COMMON2 @132
SAY SELECT_COMMON3 @133
SAY SELECT_COMMON4 @134
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
COPY ~BG1NPC/Phase2/cre/x#chop.cre~ ~override~
SAY NAME1 @135
SAY NAME2 @135
SAY INITIAL_MEETING @126
SAY UNHAPPY_BREAKING @127
SAY BATTLE_CRY1 @128
SAY BATTLE_CRY2 @129
SAY DAMAGE @130
SAY DYING @131
SAY SELECT_COMMON1 @126
SAY SELECT_COMMON2 @132
SAY SELECT_COMMON3 @133
SAY SELECT_COMMON4 @134
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
COPY ~BG1NPC/Phase2/cre/x#assi01.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi02.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi03.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi04.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi05.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi06.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi07.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi08.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi09.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi10.cre~ ~override~
~BG1NPC/Phase2/cre/x#assi11.cre~ ~override~
SAY NAME1 @136
SAY NAME2 @136
SAY LEADER @137
SAY TIRED @138
SAY BORED @139
SAY BATTLE_CRY1 @140
SAY BATTLE_CRY2 @141
SAY BATTLE_CRY3 @142
SAY DAMAGE @143
SAY DYING @144
SAY HURT @145
SAY SELECT_COMMON1 @146
SAY SELECT_COMMON2 @147
SAY SELECT_COMMON3 @148
SAY SELECT_ACTION1 @149
SAY SELECT_ACTION2 @150
SAY SELECT_ACTION3 @151
SAY SELECT_RARE1 @152
SAY SELECT_RARE2 @153
SAY CRITICAL_HIT @154
SAY CRITICAL_MISS @155
SAY TARGET_IMMUNE @156
SAY INVENTORY_FULL @157
SAY PICKED_POCKET @158
SAY HIDDEN_IN_SHADOWS @159
SAY SPELL_DISRUPTED @160
SAY SET_A_TRAP @161
SAY BIO @162
WRITE_ASCII 0x2CC ~X#ASSIST~ #8 // dialog
WRITE_ASCII 0x3c ~~ #8 // large portrait
WRITE_ASCII 0x34 ~~ #8 // small portrait
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#DAVI.D~
~BG1NPC/Phase2/dlg/X#CRU11.D~
~BG1NPC/Phase2/dlg/X#CHOP.D~
~BG1NPC/Phase2/dlg/X#XANQ.D~
~BG1NPC/Phase2/dlg/X#ASSIST.D~
~BG1NPC/Phase2/dlg/X#NEWMERCH2.D~
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#DAV01.BAF~
USING ~BG1NPC/TRA/%LANGUAGE%/X#DAV01.TRA~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#DAVID.BAF~
USING ~BG1NPC/TRA/%LANGUAGE%/X#DAVID.TRA~
/* patching Xan's script */
EXTEND_TOP ~%XAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#XACUT.BAF~
EVALUATE_BUFFER
/* Xan's Encounter 1 */
EXTEND_BOTTOM ~%NNashkelRoad_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#FW4300.BAF~
EVALUATE_BUFFER
/* Xan Centeol */
COPY_EXISTING ~%CloakwoodNest%.are~ ~override~
WRITE_LONG 0x4a 100
/* D/BAF Centeol */
EXTEND_BOTTOM ~%CloakwoodNest_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW2100.BAF~
EVALUATE_BUFFER
/* D/BAF Centeol */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/P#CENTEO.d~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/P#CECUT.BAF~
EXTEND_TOP ~%tutu_var%CENTEOL.bcs~ ~BG1NPC/Phase2/baf/P#CENTEO.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%tutu_var%XAN.bcs~ ~BG1NPC/Phase2/baf/P#XANCE.BAF~
EVALUATE_BUFFER
/* Xan's Quest */
/* creatures */
COPY ~BG1NPC/Phase2/cre/x#skodd.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @633
SAY NAME2 @633
COPY ~BG1NPC/Phase2/cre/x#mazuri.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @634
SAY NAME2 @634
COPY ~BG1NPC/Phase2/cre/x#gael.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @635
SAY NAME2 @635
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#siene.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @636
SAY NAME2 @636
COPY ~BG1NPC/Phase2/cre/x#minuw.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @637
SAY NAME2 @637
COPY ~BG1NPC/Phase2/cre/x#diala.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @638
SAY NAME2 @638
COPY ~BG1NPC/Phase2/cre/x#wdoe.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @639
SAY NAME2 @639
COPY ~BG1NPC/Phase2/cre/x#xqmer1.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#xqmer2.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#xqmer3.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#xqmer4.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#xqmer5.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
COPY ~BG1NPC/Phase2/cre/x#xqmer6.cre~ ~override~
LAUNCH_PATCH_MACRO ~source_cre_sound_cleanup~
SAY NAME1 @640
SAY NAME2 @640
SAY DAMAGE @562
SAY DYING @563
/* scripts */
EXTEND_BOTTOM ~%SpiderWood_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#FW3000XQ.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%MutaminsGarden_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#FW3500XQ.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%XAN_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#XQXAN.BAF~
EVALUATE_BUFFER
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XQCUT.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#SKODD.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#XQXAN.D~
/* Garrick's Quest */
/* items */
COPY ~BG1NPC/phase2/itm/X#CGBK.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#CGCN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#ICBABN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#ICRFN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#IGBK.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#IGCN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#XAQUGN.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#CGBK.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#BLITM.itm~ ~override~
SAY NAME1 @169
COPY ~BG1NPC/phase2/itm/X#GARBK.itm~ ~override~
SAY NAME1 @170
SAY NAME2 @170
SAY DESC @171
COPY ~BG1NPC/phase2/itm/X#GARCH.itm~ ~override~
SAY NAME1 @172
SAY NAME2 @172
SAY UNIDENTIFIED_DESC @173
SAY DESC @174
COPY ~BG1NPC/phase2/itm/X#GARCH2.itm~ ~override~
SAY NAME1 @172
SAY NAME2 @172
SAY UNIDENTIFIED_DESC @173
SAY DESC @175
/* creatures */
COPY ~BG1NPC/phase2/cre/x#garar.cre~ ~override~
SAY NAME1 @176
SAY NAME2 @176
SAY INITIAL_MEETING @177
SAY DAMAGE @178
SAY DYING @179
SAY SELECT_COMMON1 @177
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_ASCII 0x280 ~archibald~ #32 // death variable
COPY ~BG1NPC/phase2/cre/x#garwyl.cre~ ~override~
SAY NAME1 @180
SAY NAME2 @180
SAY BATTLE_CRY1 @181
SAY BATTLE_CRY2 @182
SAY BATTLE_CRY3 @183
SAY DAMAGE @184
SAY DYING @185
SAY HURT @186
SAY SELECT_COMMON1 @187
SAY SELECT_COMMON2 @188
SAY SELECT_COMMON3 @189
SAY SELECT_ACTION1 @190
SAY SELECT_ACTION2 @191
SAY SELECT_ACTION3 @192
SAY SELECT_RARE1 @193
SAY SELECT_RARE2 @194
SAY CRITICAL_HIT @195
SAY CRITICAL_MISS @196
SAY TARGET_IMMUNE @197
SAY INVENTORY_FULL @198
SAY PICKED_POCKET @199
SAY HIDDEN_IN_SHADOWS @200
SAY SPELL_DISRUPTED @201
SAY SET_A_TRAP @202
COPY_EXISTING ~%tutu_var%zombie.cre~ ~override~
~%tutu_var%zombieb.cre~ ~override~
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
WRITE_BYTE 0x272 0x94 // Race (zombie, was skeleton)
END
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%zombie.cre~ ~override/x#garz01.cre~
~%tutu_var%zombie.cre~ ~override/x#garz02.cre~
~%tutu_var%zombie.cre~ ~override/x#garz03.cre~
~%tutu_var%zombie.cre~ ~override/x#garz04.cre~
SAY NAME1 @203
SAY NAME2 @203
SAY BATTLE_CRY1 @204
SAY BATTLE_CRY2 @204
SAY BATTLE_CRY3 @204
SAY BATTLE_CRY4 @204
SAY BATTLE_CRY5 @204
SAY ATTACK1 @205
SAY ATTACK2 @206
SAY DAMAGE @207
SAY DYING @208
SAY SELECT_COMMON1 @209
SAY SELECT_COMMON2 @210
WRITE_BYTE 0x270 0x80 // Reaction (neutral, was enemy)
WRITE_EVALUATED_ASCII 0x2cc ~%DEST_RES%~ #8 // Dialog
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // Death variable
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#GARAR.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#GARWYL.BAF~
/* dialog */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#GARAR.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#GARWYL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#HALBAZ.D~
/* Coran's Quest */
/* items */
COPY ~BG1NPC/phase2/itm/X#CBOOK.itm~ ~override~
SAY NAME1 @211
SAY NAME2 @211
SAY UNIDENTIFIED_DESC @212
SAY DESC @212
COPY ~BG1NPC/phase2/itm/X#CMILK.itm~ ~override~
SAY NAME1 @213
SAY NAME2 @213
SAY UNIDENTIFIED_DESC @214
SAY DESC @214
COPY ~BG1NPC/phase2/itm/X#CBABY.itm~ ~override~
SAY NAME1 @215
SAY NAME2 @216
SAY UNIDENTIFIED_DESC @217
SAY DESC @217
COPY ~BG1NPC/phase2/itm/X#COBAG.itm~ ~override~
SAY NAME1 @218
SAY NAME2 @219
SAY UNIDENTIFIED_DESC @220
SAY DESC @220
COPY ~BG1NPC/phase2/itm/X#COBAG.STO~ ~override~
/* pro5's Coran Dragon Skeleton Fix */
ACTION_IF (FILE_EXISTS_IN_GAME ~FW0513.are~) OR (FILE_EXISTS_IN_GAME ~ARD013.are~) THEN BEGIN
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/P5ARD013.BAF~
COPY_EXISTING ~%DurlagsTower_D3%.ARE~ ~override~
LAUNCH_PATCH_MACRO ~DRAGON_TRIGGER~
END
/* dialogue */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#BRI.D~
/*scipts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#GOBRI.BAF~
/* appended scripts */
EXTEND_BOTTOM ~%tutu_var%CORAN.bcs~ ~BG1NPC/Phase2/baf/X#RUNCOR.BAF~
EVALUATE_BUFFER
/* appended scripts */
EXTEND_BOTTOM ~%NEBG_SSL1_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW0103.baf~
EVALUATE_BUFFER
/* Coran Succubus Quest */
/* items */
COPY ~BG1NPC/phase2/itm/X#CDYEI.BAM~ ~override~
~BG1NPC/phase2/itm/X#COAMUL.BAM~ ~override~
~BG1NPC/phase2/itm/X#CORINC.BAM~ ~override~
~BG1NPC/phase2/itm/X#CORINI.BAM~ ~override~
~BG1NPC/phase2/itm/X#COFRRO.BAM~ ~override~
~BG1NPC/phase2/itm/X#COWIRO.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#COAMUL.itm~ ~override~
SAY NAME1 @221
SAY NAME2 @222
SAY UNIDENTIFIED_DESC @223
SAY IDENTIFIED_DESC @224
WRITE_ASCII 0x3a ~X#COAMUL~ #8 // BAM
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~GAMUL02~ #8
WRITE_ASCII 0x58 ~CAMUL01~ #8
END
COPY ~BG1NPC/phase2/itm/X#SUCRIN.itm~ ~override~
SAY NAME1 @225
SAY NAME2 @226
SAY UNIDENTIFIED_DESC @12
SAY IDENTIFIED_DESC @227
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x3a ~IRING17~ #8
WRITE_ASCII 0x58 ~CRING11~ #8
END
COPY ~BG1NPC/phase2/itm/X#COWIRO.itm~ ~override~
SAY NAME1 @228
SAY NAME2 @228
WRITE_LONG 0x34 1
SAY UNIDENTIFIED_DESC @229
SAY DESC @229
WRITE_ASCII 0x76 ~X#COWIRO~ #8 // icon
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~GSACK01~ #8
WRITE_ASCII 0x58 ~CMISC1I~ #8
END
COPY ~BG1NPC/phase2/itm/X#COFRRO.itm~ ~override~
SAY NAME1 @230
SAY NAME2 @230
WRITE_LONG 0x34 5
SAY UNIDENTIFIED_DESC @231
SAY DESC @232
WRITE_ASCII 0x76 ~X#COFRRO~ #8 // icon
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~GSACK01~ #8
WRITE_ASCII 0x58 ~CMISC1I~ #8
END
COPY ~BG1NPC/phase2/itm/X#CODYE1.itm~ ~override~
SAY NAME1 @233
SAY NAME2 @233
SAY UNIDENTIFIED_DESC @234
SAY DESC @234
COPY ~BG1NPC/phase2/itm/X#CODYE2.itm~ ~override~
SAY NAME1 @235
SAY NAME2 @235
SAY UNIDENTIFIED_DESC @236
SAY DESC @236
/* override script to Brielbara */
COPY_EXISTING ~%tutu_var%brielb.cre~ ~override~
WRITE_ASCII 0x248 ~X#GOBRI~ #8 // override script
BUT_ONLY_IF_IT_CHANGES
/* creatures */
/* Amelia */
COPY ~BG1NPC/Phase2/cre/CAMW3G1.BAM~ ~override~
COPY ~BG1NPC/Phase2/cre/x#amelia.cre~ ~override~
SAY NAME1 @237
SAY NAME2 @237
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
ADD_CRE_ITEM ~X#SUCRIN~ #0 #0 #0 ~IDENTIFIED&UNSTEALABLE~ ~LRING~
ADD_CRE_ITEM ~%tutu_var%CLCK12~ #0 #0 #0 ~IDENTIFIED~ ~CLOAK~
/* Natan */
COPY ~BG1NPC/Phase2/cre/x#natan.cre~ ~override~
SAY NAME1 @238
SAY NAME2 @238
WRITE_LONG INITIAL_MEETING (BNOT 0x0) // BLANKING NATAN'S SOUNDS
WRITE_LONG DIALOGUE_HOSTILE (BNOT 0x0)
WRITE_LONG MORALE (BNOT 0x0)
WRITE_LONG HAPPY (BNOT 0x0)
WRITE_LONG UNHAPPY_ANNOYED (BNOT 0x0)
WRITE_LONG UNHAPPY_SERIOUS (BNOT 0x0)
WRITE_LONG UNHAPPY_BREAKING (BNOT 0x0)
WRITE_LONG LEADER (BNOT 0x0)
WRITE_LONG TIRED (BNOT 0x0)
WRITE_LONG BORED (BNOT 0x0)
WRITE_LONG BATTLE_CRY1 (BNOT 0x0)
WRITE_LONG BATTLE_CRY2 (BNOT 0x0)
WRITE_LONG BATTLE_CRY3 (BNOT 0x0)
WRITE_LONG BATTLE_CRY4 (BNOT 0x0)
WRITE_LONG BATTLE_CRY5 (BNOT 0x0)
WRITE_LONG DAMAGE (BNOT 0x0)
WRITE_LONG DYING (BNOT 0x0)
WRITE_LONG HURT (BNOT 0x0)
WRITE_LONG AREA_FOREST (BNOT 0x0)
WRITE_LONG AREA_CITY (BNOT 0x0)
WRITE_LONG AREA_DUNGEON (BNOT 0x0)
WRITE_LONG AREA_DAY (BNOT 0x0)
WRITE_LONG AREA_NIGHT (BNOT 0x0)
WRITE_LONG SELECT_COMMON1 (BNOT 0x0)
WRITE_LONG SELECT_COMMON2 (BNOT 0x0)
WRITE_LONG SELECT_COMMON3 (BNOT 0x0)
WRITE_LONG SELECT_COMMON4 (BNOT 0x0)
WRITE_LONG SELECT_COMMON5 (BNOT 0x0)
WRITE_LONG SELECT_COMMON6 (BNOT 0x0)
WRITE_LONG SELECT_ACTION1 (BNOT 0x0)
WRITE_LONG SELECT_ACTION2 (BNOT 0x0)
WRITE_LONG SELECT_ACTION3 (BNOT 0x0)
WRITE_LONG SELECT_ACTION4 (BNOT 0x0)
WRITE_LONG SELECT_ACTION5 (BNOT 0x0)
WRITE_LONG SELECT_ACTION6 (BNOT 0x0)
WRITE_LONG SELECT_ACTION7 (BNOT 0x0)
WRITE_LONG SELECT_RARE1 (BNOT 0x0)
WRITE_LONG SELECT_RARE2 (BNOT 0x0)
WRITE_LONG CRITICAL_HIT (BNOT 0x0)
WRITE_LONG CRITICAL_MISS (BNOT 0x0)
WRITE_LONG TARGET_IMMUNE (BNOT 0x0)
WRITE_LONG INVENTORY_FULL (BNOT 0x0)
WRITE_LONG PICKED_POCKET (BNOT 0x0)
WRITE_LONG HIDDEN_IN_SHADOWS (BNOT 0x0)
WRITE_LONG SPELL_DISRUPTED (BNOT 0x0)
WRITE_LONG SET_A_TRAP (BNOT 0x0)
WRITE_LONG BIO (BNOT 0x0)
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~natan~ #32 // death variable
ADD_CRE_ITEM ~%tutu_var%POTN42~ #0 #0 #0 ~IDENTIFIED~ ~INV7~
ADD_CRE_ITEM ~%tutu_var%POTN36~ #0 #0 #0 ~IDENTIFIED~ ~INV8~
ADD_CRE_ITEM ~%tutu_var%POTN37~ #0 #0 #0 ~IDENTIFIED~ ~INV9~
ADD_CRE_ITEM ~%tutu_var%POTN07~ #0 #0 #0 ~IDENTIFIED~ ~INV6~
ADD_CRE_ITEM ~X#CODYE1~ #0 #0 #0 ~IDENTIFIED&UNSTEALABLE~ ~INV1~
WRITE_EVALUATED_ASCII 0x258 ~%tutu_var%THIEF4~ #8 // Race script
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x268 ~WTARSGT~ #8
WRITE_ASCII 0x250 ~INITDLG~ #8
END
/* Rashel */
COPY ~BG1NPC/Phase2/cre/x#rashel.cre~ ~override~
SAY NAME1 @239
SAY NAME2 @239
SAY INITIAL_MEETING @240
SAY UNHAPPY_BREAKING @241
SAY BATTLE_CRY1 @242
SAY DAMAGE @243
SAY DYING @244
SAY SELECT_COMMON1 @245
SAY SELECT_COMMON2 @240
SAY SELECT_COMMON3 @246
SAY SELECT_COMMON4 @247
SAY INTERACTION1 @248
SAY INTERACTION2 @248
SAY INTERACTION3 @248
SAY INTERACTION4 @248
SAY INTERACTION5 @248
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
/*area scripts */
EXTEND_BOTTOM ~%FirewineBridge_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#CQ4500.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%Temple_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW3400.BAF~
EVALUATE_BUFFER
EXTEND_TOP ~%FirewineRuins_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW5201.BAF~
EVALUATE_BUFFER
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#AMELIA.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#RASHEL.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#NATAN.BAF~
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#COSQU.D~
/* scripts */
EXTEND_TOP ~%tutu_var%CORAN.bcs~ ~BG1NPC/Phase2/baf/X#COSQU.BAF~
EVALUATE_BUFFER
/* Kivan's Quest */
/* items */
COPY ~BG1NPC/phase2/itm/P#BOW.itm~ ~override~
SAY NAME1 @249
SAY NAME2 @249
SAY DESC @250
/* creatures */
COPY ~BG1NPC/Phase2/cre/p#imanel.cre~ ~override~
SAY NAME1 @251
SAY NAME2 @251
SAY INITIAL_MEETING @141
SAY LEADER @137
SAY TIRED @138
SAY BORED @139
SAY BATTLE_CRY1 @142
SAY BATTLE_CRY2 @141
SAY BATTLE_CRY3 @142
SAY ATTACK1 @142
SAY DAMAGE @143
SAY DYING @144
SAY HURT @145
SAY SELECT_COMMON1 @146
SAY SELECT_COMMON2 @147
SAY SELECT_COMMON3 @148
SAY SELECT_ACTION1 @149
SAY SELECT_ACTION2 @150
SAY SELECT_ACTION3 @151
SAY SELECT_RARE1 @152
SAY SELECT_RARE2 @153
SAY CRITICAL_HIT @154
SAY CRITICAL_MISS @155
SAY TARGET_IMMUNE @156
SAY INVENTORY_FULL @157
SAY PICKED_POCKET @158
SAY HIDDEN_IN_SHADOWS @159
SAY SPELL_DISRUPTED @160
SAY SET_A_TRAP @161
SAY BIO @162
WRITE_ASCII 0x248 ~P#IMANL2~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
COPY ~BG1NPC/Phase2/cre/p#wolf01.cre~ ~override~
~BG1NPC/Phase2/cre/p#wolf02.cre~ ~override~
~BG1NPC/Phase2/cre/p#wolf03.cre~ ~override~
~BG1NPC/Phase2/cre/p#wolf04.cre~ ~override~
~BG1NPC/Phase2/cre/p#wolf05.cre~ ~override~
SAY BATTLE_CRY1 @253
SAY BATTLE_CRY2 @253
SAY BATTLE_CRY3 @253
SAY BATTLE_CRY4 @253
SAY BATTLE_CRY5 @253
SAY ATTACK1 @254
SAY ATTACK2 @255
SAY DAMAGE @256
SAY DYING @257
SAY SELECT_COMMON1 @258
SAY SELECT_COMMON2 @259
WRITE_ASCII 0x248 ~P#WOLFA~ #8 // override script
WRITE_ASCII 0x2CC ~P#WOLF~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL ~P#WOLF01~) THEN BEGIN
SAY NAME1 @252
SAY NAME2 @252
END ELSE PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL ~P#WOLF02~) THEN BEGIN
SAY NAME1 @260
SAY NAME2 @260
END ELSE PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL ~P#WOLF03~) THEN BEGIN
SAY NAME1 @261
SAY NAME2 @261
END ELSE PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL ~P#WOLF04~) THEN BEGIN
SAY NAME1 @262
SAY NAME2 @262
END ELSE PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL ~P#WOLF05~) THEN BEGIN
SAY NAME1 @263
SAY NAME2 @263
END
/* dialogue */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/P#IMANEL.D~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/P#WOLF.D~
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/P#IMANL2.BAF~// Compile script
USING ~BG1NPC/TRA/%LANGUAGE%/P#IMANL2.TRA~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/P#WOLFA.BAF~// Compile script
/* area script extension */
EXTEND_BOTTOM ~%WyrmsCross_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW0900.BAF~
EVALUATE_BUFFER
/* Kivan and Sea Elf interlude */
/* creatures */
/* Jozzi Seasnake */
COPY ~BG1NPC/Phase2/cre/x#seasn.cre~ ~override~
SAY NAME1 @264
SAY NAME2 @265
SAY INITIAL_MEETING @266
SAY BATTLE_CRY1 @267
SAY DAMAGE @268
SAY DYING @269
SAY SELECT_COMMON1 @266
SAY SELECT_COMMON2 @266
SAY SELECT_COMMON3 @270
SAY SELECT_COMMON4 @271
WRITE_ASCII 0x248 ~X#IHTIA~ #8 // override script
WRITE_ASCII 0x2CC ~X#IHTIA~ #8 // dialog
WRITE_ASCII 0x280 ~seasnake~ #32 // death variable
ADD_CRE_ITEM ~SW2H01~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
/* Keth'sim Dwin'anea */
COPY ~BG1NPC/Phase2/cre/x#keth.cre~ ~override~
SAY NAME1 @272
SAY NAME2 @273
SAY INITIAL_MEETING @266
SAY BATTLE_CRY1 @267
SAY DAMAGE @268
SAY DYING @269
SAY SELECT_COMMON1 @266
SAY SELECT_COMMON2 @266
SAY SELECT_COMMON3 @270
SAY SELECT_COMMON4 @271
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%SOURCE_RES%~ #32 // death variable
/* Shahguin */
COPY ~BG1NPC/Phase2/cre/x#saha01.cre~ ~override~
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
COPY ~BG1NPC/Phase2/cre/x#saha02.cre~ ~override~
/* area patching */
EXTEND_BOTTOM ~%ShipwrecksCoast_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW3100.BAF~
EVALUATE_BUFFER
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#IHTIA.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#KETH.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#KISE1.BAF~
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#KISEQU.D~
/* Dynaheir's Quest */
/* items */
COPY_EXISTING ~%tutu_var%SCRL2J.itm~ ~override/X#DYJOR1.itm~ // page
SAY NAME1 @274
SAY NAME2 @274
SAY UNIDENTIFIED_DESC @275
SAY DESC @275
COPY_EXISTING ~%tutu_var%BOOK40.itm~ ~override/X#DYJOR2.itm~ // journal
SAY NAME1 @276
SAY NAME2 @276
SAY UNIDENTIFIED_DESC @277
SAY DESC @277
COPY ~BG1NPC/phase2/itm/X#WINAMU.itm~ ~override~
SAY NAME1 @629
SAY NAME2 @629
SAY UNIDENTIFIED_DESC @630
SAY DESC @630
/* working spell for Prot Evil 10' radius that protects vs Demons */
COPY ~BG1NPC/phase2/itm/SPPR408.SPL~ ~override~
/* Compile spell for Imp */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#IMPSPL.BAF~
USING ~BG1NPC/TRA/%LANGUAGE%/X#IMPSPL.TRA~
/* creatures */
/* new Drizzt for cutscenes */
COPY_EXISTING ~%tutu_var%drizzt.cre~ ~override/x#drizzt.cre~
SAY NAME1 @564
SAY NAME2 @564
SAY 0xA4 @565
SAY 0xB8 @566
SAY 0xC8 @567
SAY 0xCC @567
SAY 0xD0 @567
SAY 0xD4 @567
SAY 0xD8 @567
SAY 0xEC @568
SAY 0xF0 @569
SAY 0x10C @570
SAY 0x110 @571
SAY 0x114 @572
SAY 0x118 @573
SAY 0x198 @574
SAY 0x19C @570
WRITE_EVALUATED_ASCII 0x2cc ~%DEST_RES%~ #8 // Dialogue file
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
WRITE_ASCIIE 0x268 ~%DEST_RES%~ #8 // default script
WRITE_ASCIIE 0x248 ~%DEST_RES%~ #8 // override script
COPY_EXISTING ~%tutu_var%winski2.cre~ ~override~
WRITE_EVALUATED_ASCII 0x2cc ~%tutu_var%WINSKI~ #8
WRITE_ASCII 0x280 ~winski2~ #32
COPY_EXISTING ~%tutu_var%winski.cre~ ~override/x#winski.cre~
SAY NAME1 @284
SAY NAME2 @284
SAY BATTLE_CRY1 @285
SAY BATTLE_CRY2 @285
SAY BATTLE_CRY3 @285
SAY BATTLE_CRY4 @285
SAY BATTLE_CRY5 @285
SAY ATTACK1 @285
SAY ATTACK2 @285
SAY DAMAGE @286
SAY DYING @287
SAY SELECT_COMMON1 @285
SAY SELECT_COMMON2 @285
WRITE_ASCII 0x2cc ~X#WINSKI~ #8// Dialogue file
WRITE_BYTE 0x270 ~128~ // Allegiance = Neutral no combat scripts assigned to cre, so should remain neutral
WRITE_ASCII 0x268 ~X#DYQWIN~ #8 // Default Script
WRITE_ASCII 0x248 ~X#DYQWIN~ #8 // override script no combat scripting assigned in bcs, so should not respond
WRITE_ASCII 0x280 ~X#WINSKI~ #32 // death variable, unused by current scripting; "winski" used on copied uncalled _WINSKI.cre
COPY_EXISTING ~%tutu_var%GNOLL.cre~ ~override/x#dgnle1.cre~ // Evil Gnoll #1
~%tutu_var%GNOLL.cre~ ~override/x#dgnle2.cre~ // Evil Gnoll #2
~%tutu_var%GNOLL.cre~ ~override/x#dgnle3.cre~ // Evil Gnoll #3
~%tutu_var%GNOLL.cre~ ~override/x#dgnle4.cre~ // Evil Gnoll #4
~%tutu_var%GNOLL.cre~ ~override/x#dgnlg1.cre~ // Good Gnoll #1
~%tutu_var%GNOLL.cre~ ~override/x#dgnlg2.cre~ // Good Gnoll #2
~%tutu_var%GNOLL.cre~ ~override/x#dgnlg3.cre~ // Good Gnoll #3
~%tutu_var%GNOLL.cre~ ~override/x#dgnlg4.cre~ // Good Gnoll #4
SAY NAME1 @278
SAY NAME2 @278
SAY BATTLE_CRY1 @279
SAY BATTLE_CRY2 @279
SAY BATTLE_CRY3 @279
SAY BATTLE_CRY4 @279
SAY BATTLE_CRY5 @279
SAY ATTACK1 @279
SAY ATTACK2 @279
SAY DAMAGE @280
SAY DYING @281
SAY SELECT_COMMON1 @282
SAY SELECT_COMMON2 @283
WRITE_LONG 0x14 ~100~ // XP Value
WRITE_BYTE 0x270 ~128~ // Allegiance = Neutral
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
PATCH_IF (~%DEST_RES%~ STRING_COMPARE_CASE ~x#dgnle1~ = 0) THEN BEGIN
WRITE_ASCII 0x2cc ~X#DGNLE~ #8 // Dialogue file: Evil Gnoll #1
ADD_CRE_ITEM ~X#DYJOR2~ #0 #0 #0 ~IDENTIFIED~ ~INV5~
END ELSE PATCH_IF (~%DEST_RES%~ STRING_COMPARE_CASE ~x#dgnlg1~ = 0) THEN BEGIN
WRITE_ASCII 0x2cc ~X#DGNLG~ #8// Dialogue file: Good Gnoll #1
ADD_CRE_ITEM ~X#DYJOR1~ #0 #0 #0 ~IDENTIFIED~ ~INV5~
END
COPY_EXISTING ~IMP01.cre~ ~override/x#dyqimp.cre~
SAY NAME1 @288
SAY NAME2 @288
SAY DAMAGE @289
SAY DYING @290
WRITE_LONG 0x14 ~2000~ // XP Value
WRITE_SHORT 0x24 ~25~ // Current HP (usually 18)
WRITE_SHORT 0x26 ~25~ // Maximum HP (usually 18)
WRITE_ASCII 0x268 ~X#IMPSPL~ #8 // Default Script
WRITE_ASCII 0x248 ~none~ #8 // override script no combat scripting assigned in bcs, so should not respond
WRITE_ASCII 0x280 ~ichthraa~ #32 // death variable
COPY_EXISTING ~MEPSMO01.cre~ ~override/x#mepht1.cre~
~MEPSMO01.cre~ ~override/x#mepht2.cre~
~MEPSMO01.cre~ ~override/x#mepht3.cre~
~MEPSMO01.cre~ ~override/x#mepht4.cre~
~MEPSMO01.cre~ ~override/x#mepht5.cre~
COPY_EXISTING ~IDEMON02.cre~ ~override/x#tanari.cre~
SAY NAME1 @291
SAY NAME2 @291
WRITE_BYTE 0x5b 50 // replace # with percentage electrical resistance you want
WRITE_ASCII 0x248 ~X#DYTANR~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%DEST_RES%~ #8 // dialog
WRITE_BYTE 0x270 ~128~ // Allegiance = Neutral
WRITE_ASCII 0x280 ~aravaata~ #32 // death variable
/* Compile .bcs for X#WINSKI and X#TANARI */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#DYQWIN.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#DYTANR.BAF~
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/x#dynaquest.d~
/* Extend Dynaheir's override scripts */
EXTEND_TOP ~%DYNAHEIR_BCS%.bcs~ ~BG1NPC/Phase2/baf/x#dynaquest.baf~
EVALUATE_BUFFER
/* Lake Poets "Quest"; Bard in party encounter */
/* creatures */
COPY_EXISTING ~%tutu_var%VOLO.cre~ ~override/x#lakep1.cre~
~%tutu_var%VOLO.cre~ ~override/x#lakep2.cre~
~%tutu_var%VOLO.cre~ ~override/x#lakep3.cre~
SAY INITIAL_MEETING @294
SAY UNHAPPY_BREAKING @295
SAY BATTLE_CRY1 @296
SAY BATTLE_CRY2 @296
SAY BATTLE_CRY3 @296
SAY BATTLE_CRY4 @296
SAY BATTLE_CRY5 @296
SAY DAMAGE @297
SAY DYING @298
SAY SELECT_COMMON1 @299
SAY SELECT_COMMON2 @300
SAY SELECT_COMMON3 @301
SAY SELECT_COMMON4 @302
SAY DIALOGUE_DEFAULT @299
WRITE_EVALUATED_ASCII 0x2CC ~%DEST_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#lakep1~) THEN BEGIN
SAY NAME1 @292
SAY NAME2 @293
WRITE_ASCII 0x248 ~X#LP1R~ #8 // override script
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#lakep2~) THEN BEGIN
SAY NAME1 @303
SAY NAME2 @304
WRITE_ASCII 0x248 ~X#LP2R~ #8 // override script
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#lakep3~) THEN BEGIN
SAY NAME1 @305
SAY NAME2 @306
WRITE_ASCII 0x248 ~X#LP3R~ #8 // override script
END
/* area script changes */
EXTEND_BOTTOM ~%Peldvale_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#LAKEP.BAF~
EVALUATE_BUFFER
/* dialogue */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#LAKE.D~
/* Xzar's Dryad Quest */
/* items */
COPY ~BG1NPC/phase2/itm/X#XZSPL.SPL~ ~override~
SAY NAME1 @307
SAY NAME2 @307
WRITE_ASCII 0x10 ~CAS_M05~ #8 // casting sound
WRITE_ASCII 0x3a ~SPWI509C~ #8 // spell icon
WRITE_ASCII 0x76 ~SPWI509B~ #8 // ability #0 icon
COPY ~BG1NPC/phase2/itm/X#XZDRIA.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#XZDRIA.itm~ ~override~
SAY NAME1 @308
SAY NAME2 @309
SAY UNIDENTIFIED_DESC @310
SAY DESC @311
/* The Dryad Ring */
COPY ~BG1NPC/phase2/itm/X#XZRINC.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#XZRINI.BAM~ ~override~
COPY ~BG1NPC/phase2/itm/X#XZRING.itm~ ~override~
SAY NAME1 @10
SAY NAME2 @314
SAY UNIDENTIFIED_DESC @12
SAY DESC @315
/* inventory icon bam for mithril ring */
COPY ~BG1NPC/phase2/itm/X#XZMIRI.bam~ ~override~
/* Mithril Ring adding to Containers in FW5001,4701, 1401, 1603, 3601 */
COPY_EXISTING ~%tutu_var%RING11.itm~ ~override/X#XZMIRI.itm~
SAY NAME1 @312
SAY NAME2 @312
SAY UNIDENTIFIED_DESC @313
SAY DESC @313
WRITE_LONG 0x34 750
WRITE_ASCII 0x58 ~cring05~ #8
WRITE_ASCII 0x3a ~x#xzmiri~
/* creatures */
/* Forest Spirit 1 */
COPY ~BG1NPC/Phase2/cre/x#xzfsp1.cre~ ~override~
SAY NAME1 @316
SAY NAME2 @316
SAY INITIAL_MEETING @317
SAY DAMAGE @318
SAY DYING @319
SAY SELECT_COMMON1 @320
SAY SELECT_COMMON2 @317
WRITE_ASCII 0x2CC ~X#XZFSP1~ #8 // dialog
WRITE_ASCII 0x280 ~xzfspirit1~ #32 // death variable
/* Forest Spirit 2,3 */
COPY ~BG1NPC/Phase2/cre/x#xzfsp2.cre~ ~override/x#xzfsp2.cre~
~BG1NPC/Phase2/cre/x#xzfsp2.cre~ ~override/x#xzfsp3.cre~
SAY NAME1 @316
SAY NAME2 @316
SAY BATTLE_CRY1 @321
SAY BATTLE_CRY2 @322
SAY DAMAGE @323
SAY DYING @324
SAY SELECT_COMMON1 @325
WRITE_ASCII 0x248 ~X#XZFSP2~ #8 // override script
WRITE_EVALUATED_ASCII 0x2CC ~%DEST_RES%~ #8 // dialog
WRITE_EVALUATED_ASCII 0x282 ~%DEST_RES%~ #30 // death variable
WRITE_ASCII 0x280 ~xzfspirit~ #9 // death variable
/* Blackberry */
COPY ~BG1NPC/Phase2/cre/x#black.cre~ ~override~
SAY NAME1 @326
SAY NAME2 @326
SAY INITIAL_MEETING @327
SAY UNHAPPY_BREAKING @328
SAY BATTLE_CRY1 @329
SAY DAMAGE @330
SAY DYING @331
SAY SELECT_COMMON1 @327
SAY SELECT_COMMON2 @332
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~blackberry~ #32 // death variable
/* Storm */
COPY ~BG1NPC/Phase2/cre/x#storm.cre~ ~override~
SAY NAME1 @333
SAY NAME2 @333
SAY INITIAL_MEETING @334
SAY UNHAPPY_BREAKING @335
SAY BATTLE_CRY1 @336
SAY DAMAGE @337
SAY DYING @338
SAY SELECT_COMMON1 @339
SAY SELECT_COMMON2 @334
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~storm~ #32 // death variable
/* Zosya */
COPY ~BG1NPC/Phase2/cre/x#zosya.cre~ ~override~
SAY NAME1 @340
SAY NAME2 @340
SAY INITIAL_MEETING @341
SAY BATTLE_CRY1 @341
SAY DAMAGE @342
SAY DYING @343
SAY SELECT_COMMON1 @344
SAY SELECT_COMMON2 @345
WRITE_EVALUATED_ASCII 0x248 ~%SOURCE_RES%~ #8 // override script
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
WRITE_EVALUATED_ASCII 0x2CC ~%SOURCE_RES%~ #8 // dialog
WRITE_ASCII 0x280 ~zosya~ #32 // death variable
/* Flaming Fist Officer */
COPY ~BG1NPC/Phase2/cre/x#xzgu01.cre~ ~override~
SAY NAME1 @346
SAY NAME2 @346
SAY INITIAL_MEETING @347
SAY BATTLE_CRY1 @348
SAY BATTLE_CRY2 @349
SAY BATTLE_CRY3 @350
SAY BATTLE_CRY4 @349
SAY BATTLE_CRY5 @348
SAY ATTACK1 @349
SAY ATTACK2 @348
SAY DAMAGE @351
SAY DYING @352
SAY SELECT_COMMON1 @353
SAY SELECT_COMMON2 @349
SAY DIALOGUE_HOSTILE @354
WRITE_ASCII 0x248 ~X#XZGU01~ #8 // override script
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%dasight~ #8 // Default script
WRITE_ASCII 0x2CC ~X#XZGU01~ #8 // dialog
WRITE_ASCII 0x280 ~X#XZGU01~ #32 // death variable
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x258 ~SEEENEMY~ #8
WRITE_ASCII 0x250 ~INITMAIN~ #8
END
/* Flaming Fist Mercenary 1 */
COPY_EXISTING ~%tutu_var%FLAME.cre~ ~override/x#xzgu02.cre~
SAY NAME1 @355
SAY NAME2 @355
SAY INITIAL_MEETING @350
SAY BATTLE_CRY1 @348
SAY BATTLE_CRY2 @349
SAY BATTLE_CRY3 @350
SAY BATTLE_CRY4 @349
SAY BATTLE_CRY5 @348
SAY ATTACK1 @348
SAY ATTACK2 @349
SAY DAMAGE @351
SAY DYING @352
SAY SELECT_COMMON1 @350
SAY SELECT_COMMON2 @353
SAY DIALOGUE_HOSTILE @356
SAY DIALOGUE_DEFAULT @350
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
/* Flaming Fist Mercenary 2 */
COPY ~BG1NPC/Phase2/cre/x#xzgu03.cre~ ~override~
SAY NAME1 @357
SAY NAME2 @357
SAY INITIAL_MEETING @350
SAY BATTLE_CRY1 @353
SAY BATTLE_CRY2 @349
SAY BATTLE_CRY3 @350
SAY BATTLE_CRY4 @349
SAY BATTLE_CRY5 @348
SAY ATTACK1 @348
SAY ATTACK2 @349
SAY DAMAGE @351
SAY DYING @352
SAY SELECT_COMMON1 @350
SAY SELECT_COMMON2 @349
SAY DIALOGUE_HOSTILE @353
SAY SELECT_RARE1 @349
WRITE_EVALUATED_ASCII 0x268 ~%tutu_scriptw%tasight~ #8 // Default script
WRITE_ASCII 0x280 ~X#XZGU03~ #32 // death variable
WRITE_ASCII 0x3C ~~ #8 // large portrait
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x260 ~FLAMSPEL~ #8
WRITE_ASCII 0x258 ~FLAMPUN~ #8
WRITE_ASCII 0x250 ~SHOUT~ #8
WRITE_ASCII 0x248 ~GUARDS~ #8
END
/* extending area scripts */
EXTEND_BOTTOM ~%FV_AnkhegPit_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW1401.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%CloakwoodDr_PetersCave_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW1603.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%Lighthouse_BAsCave_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW3601.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%XvartVillageCave_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW4701.BAF~
EVALUATE_BUFFER
EXTEND_BOTTOM ~%ValleyoftheTombsTomb_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW5001.BAF~
EVALUATE_BUFFER
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#XZQU.D~
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#BLACK.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#STORM.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ZOSYA.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XZDR1.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XZDR2.BAF~
USING ~BG1NPC/TRA/%LANGUAGE%/X#XZDR2.TRA~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#XZDR3.BAF~
USING ~BG1NPC/TRA/%LANGUAGE%/X#XZDR3.TRA~
EXTEND_TOP ~%XZAR_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#XZDQU.BAF~
EVALUATE_BUFFER
USING ~BG1NPC/TRA/%LANGUAGE%/X#XZDQU.TRA~
/* Jaheira Shadow Druids Quest */
/* Club */
COPY ~BG1NPC/phase2/itm/X#JACLUB.itm~ ~override~
SAY NAME1 @359
SAY NAME2 @360
SAY UNIDENTIFIED_DESC @361
SAY DESC @362
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x3a ~IBLUN01~ #8 // main item bam
WRITE_ASCII 0x44 ~GBLUN01~ #8
WRITE_ASCII 0x58 ~CBLUN01~ #8
END
/* Andarthe's Spear */
COPY ~BG1NPC/phase2/itm/x#anspri.bam~ ~override~
COPY ~BG1NPC/phase2/itm/x#ansprd.bam~ ~override~
COPY ~BG1NPC/phase2/itm/x#ansper.itm~ ~override~
SAY NAME2 @378
SAY DESC @379
WRITE_ASCII 0x10 ~MISC56~ #8 // used-up item
PATCH_IF (~%tutuorbgt%~ STRING_COMPARE_CASE ~BGT~ = 0) THEN BEGIN
WRITE_ASCII 0x44 ~gsper01~ #8
END
/* creatures */
COPY_EXISTING ~%tutu_var%takiyah.cre~ ~override~
WRITE_ASCII 0x280 ~takiyah~ #32 // death variable
BUT_ONLY_IF_IT_CHANGES
/* Andarthe */
COPY ~BG1NPC/Phase2/cre/x#andart.cre~ ~override~
SAY NAME1 @363
SAY NAME2 @363
SAY INITIAL_MEETING @341
SAY BATTLE_CRY1 @341
SAY DAMAGE @342
SAY DYING @343
SAY SELECT_COMMON1 @345
WRITE_ASCII 0x280 ~andarthe~ #32 // death variable
/* Beador */
COPY ~BG1NPC/phase2/cre/x#beador.cre~ ~override~
SAY NAME1 @364
SAY NAME2 @364
SAY INITIAL_MEETING @341
SAY BATTLE_CRY1 @341
SAY ATTACK1 @341
SAY ATTACK2 @341
SAY DAMAGE @342
SAY DYING @343
SAY SELECT_COMMON1 @344
SAY SELECT_COMMON2 @345
COPY ~BG1NPC/phase2/cre/x#beado1.cre~ ~override~
SAY NAME1 @364
SAY NAME2 @364
SAY INITIAL_MEETING @341
SAY BATTLE_CRY1 @341
SAY ATTACK1 @341
SAY ATTACK2 @341
SAY DAMAGE @342
SAY DYING @343
SAY SELECT_COMMON1 @344
SAY SELECT_COMMON2 @345
/* Maretha */
COPY ~BG1NPC/Phase2/cre/x#mareth.cre~ ~override~
SAY NAME1 @365
SAY NAME2 @365
SAY INITIAL_MEETING @366
SAY BATTLE_CRY1 @367
SAY BATTLE_CRY2 @367
SAY BATTLE_CRY3 @367
SAY BATTLE_CRY4 @367
SAY BATTLE_CRY5 @367
SAY ATTACK1 @368
SAY ATTACK2 @369
SAY ATTACK3 @370
SAY DAMAGE @371
SAY DYING @372
SAY SELECT_COMMON1 @373
SAY SELECT_COMMON2 @366
/* Stock Druids */
COPY_EXISTING ~gpshout.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY EXACT_MATCH ~!Dead("yself)")~ ~!StateCheck(Myself,4032)~
REPLACE_TEXTUALLY EXACT_MATCH ~!Dead("astSeenBy(Myself))")~ ~!StateCheck(LastSeenBy(),4032)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
COPY ~BG1NPC/phase2/cre/x#shdr6.cre~ ~override/x#shdr6.cre~
~BG1NPC/phase2/cre/x#shdr6.cre~ ~override/x#shdr6a.cre~
~BG1NPC/phase2/cre/x#shdr6.cre~ ~override/x#shdr6b.cre~
SAY NAME1 @374
SAY NAME2 @375
SAY INITIAL_MEETING @327
SAY UNHAPPY_BREAKING @328
SAY BATTLE_CRY1 @329
SAY DAMAGE @330
SAY DYING @331
SAY SELECT_COMMON1 @327
SAY SELECT_COMMON2 @332
PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#shdr6~) THEN BEGIN
WRITE_ASCII 0x280 ~jadruid6~ #32 // death variable
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#shdr6a~) THEN BEGIN
WRITE_ASCII 0x280 ~jadruid6a~ #32 // death variable
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#shdr6b~) THEN BEGIN
WRITE_ASCII 0x280 ~jadruid6b~ #32 // death variable
END
COPY ~BG1NPC/phase2/cre/x#shdr8a.cre~ ~override/x#shdr8a.cre~
~BG1NPC/phase2/cre/x#shdr8b.cre~ ~override/x#shdr8b.cre~
SAY NAME1 @374
SAY NAME2 @375
SAY INITIAL_MEETING @334
SAY UNHAPPY_BREAKING @335
SAY BATTLE_CRY1 @336
SAY DAMAGE @337
SAY DYING @338
SAY SELECT_COMMON1 @339
SAY SELECT_COMMON2 @334
SAY SELECT_COMMON3 @376
SAY SELECT_COMMON4 @377
PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#shdr8a~) THEN BEGIN
WRITE_ASCII 0x280 ~jadruid8a~ #32 // death variable
END ELSE PATCH_IF (~%DEST_RES%~ STRING_EQUAL_CASE ~x#shdr8b~) THEN BEGIN
WRITE_ASCII 0x280 ~jadruid8b~ #32 // death variable
END
/* dialogues */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#JAQU.D~
/* scripts */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#BEADOR.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#JABE1.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#ANDART.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#MARETH.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#SHDR6.BAF~
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/baf/X#SHDR8.BAF~
EXTEND_TOP ~%JAHEIRA_BCS%.bcs~ ~BG1NPC/Phase2/baf/X#JAQU.BAF~
EVALUATE_BUFFER
/* Patching Area Scripts */
EXTEND_BOTTOM ~%CloakwoodWyverns_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW1700JQ.BAF~
EVALUATE_BUFFER
/* Patching all creatures in component for leftover/missed Tutu > BGT items */
/* BGT compatability macro */
INCLUDE ~BG1NPC/LIB/macro_tutu_items_to_bgt.tph~
/* Patching all creatures in component for Tutu > BGT items */
ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.are~ THEN BEGIN
COPY_EXISTING_REGEXP GLOB ~^[XP]#.+\.cre$~ ~override~
PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
LAUNCH_PATCH_MACRO ~tutu_items_to_bgt~
END
BUT_ONLY_IF_IT_CHANGES
END
/* Make sure this is last in Quest additions for Phase 2 */
COMPILE EVALUATE_BUFFER ~BG1NPC/Phase2/dlg/X#ICT3.D~
/* END OF BANTERS, QUESTS, INTERJECTIONS */
/* Portrait Changes */
/* Edwin */
BEGIN @1022 /* The BG1 NPC Project: Give Edwin his BG2 portrait. */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
ACTION_FOR_EACH edwin IN edwin edwin2 edwin4 edwin6 _edwin _edwin2 _edwin4 _edwin6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%edwin%.cre" BEGIN
COPY_EXISTING "%edwin%.cre" ~override~ // Edwin
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 ~NEDWINS~ #8 // small portrait
WRITE_ASCII 0x3c ~NEDWINM~ #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Imoen */
BEGIN @1023 /* The BG1 NPC Project: Give Imoen her BG2 portrait. */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
ACTION_FOR_EACH imoen IN imoen imoen1 imoen2 imoen4 imoen61 _imoen _imoen1 _imoen2 _imoen4 _imoen6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%imoen%.cre" BEGIN
COPY_EXISTING "%imoen%.cre" ~override~
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 ~NIMOENS~ #8 // small portrait
WRITE_ASCII 0x3c ~NIMOENM~ #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Jaheira */
BEGIN @1024 /* The BG1 NPC Project: Give Jaheira her BG2 portrait. */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
ACTION_FOR_EACH jaheira IN jaheir jaheir2 jaheir4 jaheir6 _jaheir _jaheir2 _jaheir4 _jaheir6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%jaheira%.cre" BEGIN
COPY_EXISTING "%jaheira%.cre" ~override~ // Jaheira
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 ~NJAHEIRS~ #8 // small portrait
WRITE_ASCII 0x3c ~NJAHEIRM~ #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Minsc */
BEGIN @1025 /* The BG1 NPC Project: Give Minsc his BG2 portrait. */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
ACTION_FOR_EACH minsc IN minsc minsc2 minsc4 minsc6 _minsc _minsc2 _minsc4 _minsc6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%minsc%.cre" BEGIN
COPY_EXISTING "%minsc%.cre" ~override~ // Minsc
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 ~NMINSCS~ #8 // small portrait
WRITE_ASCII 0x3c ~NMINSCM~ #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Viconia */
BEGIN @1026 /* The BG1 NPC Project: Give Viconia her BG2 portrait. */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
ACTION_FOR_EACH viconia IN viconi viconi4 viconi61 _viconi _viconi4 _viconi6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%viconia%.cre" BEGIN
COPY_EXISTING "%viconia%.cre" ~override~ // Viconia
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 "NVICONS" #8 // small portrait
WRITE_ASCII 0x3c "NVICONM" #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Kivan */
BEGIN @1027 /* The BG1 NPC Project: Kivan's "Kivan and Deheriana Companions" portrait */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
COPY ~BG1NPC/Phase2/Portraits/P#KI2L.bmp~ ~override~
COPY ~BG1NPC/Phase2/Portraits/P#KI2M.bmp~ ~override~
COPY ~BG1NPC/Phase2/Portraits/P#KI2S.bmp~ ~override~
ACTION_FOR_EACH kivan IN kivan kivan4 kivan6 _kivan _kivan4 _kivan6 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME "%kivan%.cre" BEGIN
COPY_EXISTING "%kivan%.cre" ~override~ // Kivan
PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files
WRITE_ASCII 0x34 ~P#KI2S~ #8 // small portrait
WRITE_ASCII 0x3c ~P#KI2M~ #8 // medium portrait
END
BUT_ONLY_IF_IT_CHANGES
END
END
/* Non-Joinable Characters */
BEGIN @1009 /* The BG1 NPC Project: Add Non-Joinable NPC portraits to quests and dialogues */
GROUP @1008 /* The BG1 NPC Project: Portrait Changes and Additions */
REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
COPY ~BG1NPC/Core/X#component.xx~ ~override/X#NJNPCPortrait.G3~
COPY ~BG1NPC/Phase2/Portraits~ ~override~
/* Standard Non-Joinable Actors */
COPY_EXISTING ~%tutu_var%alatos.cre~ ~override~
WRITE_ASCII 0x34 ~alatos~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%albert.cre~ ~override~
WRITE_ASCII 0x34 ~albers~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%alyth.cre~ ~override~
WRITE_ASCII 0x34 ~alyths~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%amaran.cre~ ~override~
WRITE_ASCII 0x34 ~amarans~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%sarev1.cre~ ~override~
WRITE_ASCII 0x34 ~armoreds~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bjorni.cre~ ~override~
WRITE_ASCII 0x34 ~bjorns~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%bassil.cre~ ~override~
WRITE_ASCII 0x34 ~bass~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%belt.cre~ ~override~
WRITE_ASCII 0x34 ~belts~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%brage.cre~ ~override~
~%tutu_var%brage2.cre~ ~override~
WRITE_ASCII 0x34 ~brages~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%brilla.cre~ ~override~
WRITE_ASCII 0x34 ~brilles~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%farmbr.cre~ ~override~
WRITE_ASCII 0x34 ~bruns~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%cadder.cre~ ~override~
WRITE_ASCII 0x34 ~cadds~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%coksmth.cre~ ~override~
WRITE_ASCII 0x34 ~peters~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%davaeo.cre~ ~override~
WRITE_ASCII 0x34 ~daverons~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%drizzt.cre~ ~override~
WRITE_ASCII 0x34 ~drizzts~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%drienn.cre~ ~override~
WRITE_ASCII 0x34 ~driens~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%elmin2.cre~ ~override~
~%tutu_var%elmin3.cre~ ~override~
~%tutu_var%elmin5.cre~ ~override~
~%tutu_var%elmins4.cre~ ~override~
WRITE_ASCII 0x34 ~elmins~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%gerde.cre~ ~override~
WRITE_ASCII 0x34 ~gerdes~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%greywo.cre~ ~override~
WRITE_ASCII 0x34 ~greyws~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%jessup.cre~ ~override~
WRITE_ASCII 0x34 ~jessups~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%halbaz.cre~ ~override~
WRITE_ASCII 0x34 ~halbazs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%liia.cre~ ~override~
WRITE_ASCII 0x34 ~liias~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%larze.cre~ ~override~
WRITE_ASCII 0x34 ~larzes~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%keldda.cre~ ~override~
WRITE_ASCII 0x34 ~keldaths~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%korax.cre~ ~override~
WRITE_ASCII 0x34 ~koraxs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%mulahe.cre~ ~override~
WRITE_ASCII 0x34 ~mulahs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%narlen.cre~ ~override~
WRITE_ASCII 0x34 ~narlens~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%niemai.cre~ ~override~
WRITE_ASCII 0x34 ~niemais~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%petrin.cre~ ~override~
WRITE_ASCII 0x34 ~petrins~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%rielta.cre~ ~override~
WRITE_ASCII 0x34 ~rieltars~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%seniya.cre~ ~override~
WRITE_ASCII 0x34 ~seniyas~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%thalan.cre~ ~override~
WRITE_ASCII 0x34 ~thalas~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%vai.cre~ ~override~
WRITE_ASCII 0x34 ~ofvais~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%shoal.cre~ ~override~
WRITE_ASCII 0x34 ~shoals~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%tamoko.cre~ ~override~
WRITE_ASCII 0x34 ~tamokos~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%tenya.cre~ ~override~
~%tutu_var%tenya2.cre~ ~override~
WRITE_ASCII 0x34 ~tenyas~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%pumberl.cre~ ~override~
~%tutu_var%pumber2.cre~ ~override~
WRITE_ASCII 0x34 ~umbprs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%winthr2.cre~ ~override~
~%tutu_var%winthr3.cre~ ~override~
~%tutu_var%innke2.cre~ ~override~
WRITE_ASCII 0x34 ~winthrs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%yago.cre~ ~override~
WRITE_ASCII 0x34 ~yagos~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%angelo.cre~ ~override~
WRITE_ASCII 0x34 ~angelos~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%arkush.cre~ ~override~
SAY NAME1 @385
SAY NAME2 @385
WRITE_ASCII 0x34 ~arkushs~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%brielb.cre~ ~override~
SAY NAME1 @386
SAY NAME2 @386
WRITE_ASCII 0x34 ~briels~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%deltan.cre~ ~override~
~%tutu_var%deltan2.cre~ ~override~
WRITE_ASCII 0x34 ~eltans~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%gorion.cre~ ~override~
~%tutu_var%gorion3.cre~ ~override~
WRITE_ASCII 0x34 ~gorions~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%sarevo.cre~ ~override~
~%tutu_var%sarevo2.cre~ ~override~
WRITE_ASCII 0x34 ~sarevoks~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%scar.cre~ ~override~
WRITE_ASCII 0x34 ~scars~ #8 // small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%vail.cre~ ~override~
WRITE_ASCII 0x34 ~vails~// small portrait
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING ~%tutu_var%volo.cre~ ~override~