
DEFINE_ACTION_FUNCTION generic_creatures_init BEGIN

//////////////////CREATURES/////////////////////////////////

COPY ~bp/cre/arvor.cre~ ~override~
  SAY NAME1 @156 //Celestial Fire
  SAY NAME2 @156 //Celestial Fire

COPY ~bp/cre/athach.cre~ ~override~
  SAY NAME1 @157 //Athach
  SAY NAME2 @157 //Athach

COPY ~bp/cre/bodakmd.cre~ ~override~
     ~bp/cre/bodxx.cre~ ~override~
     ~bp/cre/bpbounty.cre~ ~override~
     ~bp/cre/bpraksha.cre~ ~override~
     ~bp/cre/bpkobwit.cre~ ~override~
     ~bp/cre/bpsdwfgt.cre~ ~override~
     ~bp/cre/bpsdwfth.cre~ ~override~
     ~bp/cre/bpsfgtmg.cre~ ~override~
     ~bp/cre/bpsfight.cre~ ~override~
     ~bp/cre/bpsold01.cre~ ~override~
     ~bp/cre/bpsthef1.cre~ ~override~
     ~bp/cre/bpsthef2.cre~ ~override~
     ~bp/cre/bpsthef3.cre~ ~override~
     ~bp/cre/bpsthmg1.cre~ ~override~
     ~bp/cre/bpswspid.cre~ ~override~
     ~bp/cre/bpthief2.cre~ ~override~
     ~bp/cre/bpthief3.cre~ ~override~
     ~bp/cre/bpthmag2.cre~ ~override~
     ~bp/cre/bplizgrd.cre~ ~override~
     ~bp/cre/bpumber.cre~ ~override~


ACTION_IF NOT FILE_EXISTS_IN_GAME ~deadkef.cre~ BEGIN
  COPY ~bp/cre/deadkef.cre~ ~override~
END

ACTION_IF NOT FILE_EXISTS_IN_GAME ~deadkem.cre~ BEGIN
  COPY ~bp/cre/deadkem.cre~ ~override~
END

//In Bridge District, a demon fighter
COPY_EXISTING ~demfig02.cre~ ~override~ //Valeria
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~~ #8 // Race (was GPARCHER)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~demoarch.cre~ ~override~ //Fighter
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpcfig2a~ #8 //General script
    REMOVE_MEMORIZED_SPELL ~spcl121~
    ADD_MEMORIZED_SPELL ~spcl121~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl904~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl905~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl907~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl908~ #0 ~innate~
  END
BUT_ONLY

ACTION_IF FILE_EXISTS_IN_GAME ~democler.cre~ BEGIN
  COPY_EXISTING ~democler.cre~ ~override~ //Cleric
    WRITE_BYTE 0x234 20 //Level 1
    WRITE_BYTE 0x235 1 //Level 2
    WRITE_BYTE 0x236 1 //Level 3
    WRITE_ASCII 0x250 ~ccler20b~ #8 //Class script
  BUT_ONLY
END

ACTION_IF FILE_EXISTS_IN_GAME ~dockmeet.cre~ BEGIN
  COPY_EXISTING ~dockmeet.cre~ ~override~ //Rylock
    WRITE_LONG 0x14 1865 //XP value (was 4300)
    WRITE_ASCII 0x250 ~mage10a~ #8 //Class script
    WRITE_ASCII 0x258 ~bp!bard~ #8 //Race script
    WRITE_ASCII 0x268 ~wdasight~ #8 //Default script (was wtasight)
    ADD_CRE_ITEM ~bow05~ #0 #0 #0 ~NONE~ ~WEAPON2~ EQUIP TWOHANDED
    ADD_CRE_ITEM ~arow02~ #40 #0 #0 ~NONE~ ~QUIVER1~
  BUT_ONLY
END

ACTION_IF FILE_EXISTS_IN_GAME ~elmin01.cre~ BEGIN
  COPY_EXISTING ~elmin01.cre~ ~override~ //Elminster
                ~elmin02.cre~ ~override~
    REMOVE_CRE_ITEM ~staf01~
    ADD_CRE_ITEM ~staf01~ #0 #0 #0 ~NONE~ ~WEAPON2~
  BUT_ONLY
END

COPY ~bp/cre/garg.cre~ ~override~
  SAY NAME1 @211 //Gargoyle
  SAY NAME2 @211 //Gargoyle

COPY ~bp/cre/horsesal.cre~ ~override~
  SAY NAME1 @172 //Trader
  SAY NAME2 @172 //Trader

COPY ~bp/cre/icliz03.cre~ ~override~

COPY ~bp/cre/imp01md.cre~ ~override~
  SAY NAME1 @230 //Imp
  SAY NAME2 @230 //Imp

COPY ~bp/cre/spspider.cre~ ~override~

COPY ~bp/cre/swarden.cre~ ~override~

COPY ~bp/cre/tantugn1.cre~ ~override~

COPY ~bp/cre/test.cre~ ~override~

ACTION_IF NOT FILE_EXISTS_IN_GAME ~theshal.cre~ BEGIN  // Numerous mods, they prob do more w/ it
  COPY ~bp/cre/theshal.cre~ ~override~
END

COPY ~bp/cre/udspid01.cre~ ~override~

COPY ~bp/cre/udspid02.cre~ ~override~

COPY ~bp/cre/walkarm1.cre~ ~override~
  SAY NAME1 @343 //Animated Plate
  SAY NAME2 @343 //Animated Plate

COPY ~bp/cre/walkarm2.cre~ ~override~
  SAY NAME1 @343 //Animated Plate
  SAY NAME2 @343 //Animated Plate

COPY ~bp/cre/walkarm3.cre~ ~override~
  SAY NAME1 @343 //Animated Plate
  SAY NAME2 @343 //Animated Plate

ACTION_IF NOT FILE_EXISTS_IN_GAME ~wyvernsu.cre~ BEGIN  // Spell Revisions
  COPY ~bp/cre/wyvernsu.cre~ ~override~
END


END

/////////////////////////////////////////////////////////////////////////////////////

DEFINE_ACTION_FUNCTION generic_creatures_round2 BEGIN

COPY_EXISTING 
              ~aeextort.cre~ ~override~ //Hanj
              ~amsi.cre~ ~override~ //Am-Si
              ~amwyvern.cre~ ~override~ //Lucy
              ~anothug.cre~ ~override~ //Guard
              ~ar18arch.cre~ ~override~ //Archer
              ~ar18fam.cre~ ~override~ //Mist Mephit
              ~ar18fig.cre~ ~override~ //Mercenary
              ~basgrt01.cre~ ~override~ //Greater Basilisk
              ~bazdra02.cre~ ~override~ //Draconis
              ~bazeye01.cre~ ~override~ //Iycanth the Mad
              ~bazpat02.cre~ ~override~ //Nanoc the Barbarian
              ~bdbart01.cre~ ~override~ //Samuel Thunderburp
              ~bdcoun03.cre~ ~override~ //Bodyguard
              ~bdock1.cre~ ~override~ //Dockhand Ogre
              ~bdock2.cre~ ~override~ //Dockhand Ogre
              ~bdprst01.cre~ ~override~ //Shvanana
              ~bdturm01.cre~ ~override~ //Turmish Leader
              ~benjy.cre~ ~override~ //Benjy
              ~berkref.cre~ ~override~ //Zorl
              ~bodyg1.cre~ ~override~ //Amnish Bodyguard
              ~booter.cre~ ~override~ //Booter
              ~booter02.cre~ ~override~ //Booter
              ~breg03.cre~ ~override~ //D'aerthe Guard
              ~bregg.cre~ ~override~ //Bregg
              ~brelm.cre~ ~override~ //Brelm
              ~bunkin.cre~ ~override~ //Bunkin
              ~c6god.cre~ ~override~ //Elven God
              ~c6guen.cre~ ~override~ //Guenhwyvar
              ~c6guen2.cre~ ~override~ //Guenhwyvar
              ~c6kngt3.cre~ ~override~ //Storm Knight
              ~caehan.cre~ ~override~ //Caehan
              ~cechal02.cre~ ~override~ //Master Verthan
              ~cechalle.cre~ ~override~ //Master Verthan
              ~cedelich.cre~ ~override~ //Deril Lich
              ~cefgt03.cre~ ~override~ //Adherent
              ~ceglut.cre~ ~override~ //Glut
              ~celich.cre~ ~override~ //Lagole Gon
              ~ch3grd01.cre~ ~override~ //Shadow Thief
              ~clelun01.cre~ ~override~ //Eluno
              ~clmalg01.cre~ ~override~ //Malario Soldier
              ~clrani01.cre~ ~override~ //Rania
              ~clstkn01.cre~ ~override~ //Storm Knight
              ~cltalp01.cre~ ~override~ //Weather Master
              ~cltiva01.cre~ ~override~ //Ti'Vael
              ~cohrvale.cre~ ~override~ //Cohrvale
              ~copamb01.cre~ ~override~ //Gladiator
              ~coplion.cre~ ~override~ //Tabitha
              ~cor.cre~ ~override~ //Cor Delryn
              ~cyrando.cre~ ~override~ //Cyrando
              ~daslave1.cre~ ~override~ //Slave Leader
              ~daslave2.cre~ ~override~ //Slave
              ~daslave3.cre~ ~override~ //Slave Boy
              ~daslave4.cre~ ~override~ //Slave Girl
              ~daslave5.cre~ ~override~ //Slave
              ~daslave6.cre~ ~override~ //Slave
              ~daslave7.cre~ ~override~ //Slave
              ~cldad.cre~ ~override~ //Talon Nirkhas
              ~dcleric.cre~ ~override~ //Mad Cleric
              ~demfig01.cre~ ~override~ //Falahar
              ~demmag.cre~ ~override~ //Dracandros
              ~dempri.cre~ ~override~ //Pitre
              ~disrup01.cre~ ~override~ //Wizard Slayer
              ~docsol02.cre~ ~override~ //Barracks Guard
              ~dopgre01.cre~ ~override~ //Greater Doppleganger
              ~dopple01.cre~ ~override~ //Doppleganger
              ~draug.cre~ ~override~ //Draug Fea
              ~dreampc.cre~ ~override~ //Dream Vision
              ~drslayer.cre~ ~override~ //Slayer
              ~druff1.cre~ ~override~ //Ruffian
              ~dsailor1.cre~ ~override~ //Sailor
              ~dsailor2.cre~ ~override~ //Sailor
              ~dshop02.cre~ ~override~ //Jahaboam
              ~elekuo01.cre~ ~override~ //Kuo-Toa Warrior
              ~elemep06.cre~ ~override~ //Earth Mephit
              ~eleoty01.cre~ ~override~ //Greater Otyugh
              ~elotte.cre~ ~override~ //Squire Elotte
              ~excult1.cre~ ~override~ //Garuk
              ~excult2.cre~ ~override~ //Zaelas
              ~ffcust07.cre~ ~override~ //H'rothgar Firehammer
              ~ffusher2.cre~ ~override~ //Usher
              ~flyfgt03.cre~ ~override~ //Shadow Thief
              ~fsridd.cre~ ~override~ //Imp
              ~fuagnon.cre~ ~override~ //Hurgan Stoneblade
              ~gfigh05.cre~ ~override~ //Calahan
              ~gibmut01.cre~ ~override~ //Mutated Gibberling
              ~glad2.cre~ ~override~ //Gladiator
              ~gnlvet01.cre~ ~override~ //Gnoll Veteran
              ~govwau01.cre~ ~override~ //Priest of Waukeen
              ~gpfam1.cre~ ~override~ //Pitch
              ~gpfight1.cre~ ~override~ //Boz
              ~gphil03.cre~ ~override~ //Huntley
              ~gppri1.cre~ ~override~ //Chandrilla
              ~gpsimb.cre~ ~override~ //Simbja
              ~habib2.cre~ ~override~ //Habib
              ~hawker01.cre~ ~override~ //Hawker
              ~hgmnd2.cre~ ~override~ //Shambling Mound
              ~hgmound.cre~ ~override~ //Shambling Mound
              ~hgnymph.cre~ ~override~ //Nymph
              ~hidden.cre~ ~override~ //Hidden
              ~hlcleric.cre~ ~override~ //Cleric
              ~hlfight.cre~ ~override~ //Fighter
              ~hlrevan.cre~ ~override~ //Revanek
              ~hlstal.cre~ ~override~ //Stalman
              ~hlvaxal.cre~ ~override~ //Vaxall
              ~hmelvin.cre~ ~override~ //Squire Melvin
              ~hspectr1.cre~ ~override~ //Spectral Harpist
              ~hspectr2.cre~ ~override~ //Spectral Harpist
              ~hspectr3.cre~ ~override~ //Spectral Harpist
              ~illuwere.cre~ ~override~ //Werewolf
              ~imnbook1.cre~ ~override~ //Book Merchant
              ~imp01.cre~ ~override~ //Imp
              ~impqua01.cre~ ~override~ //Quasit
              ~isaea.cre~ ~override~ //Isaea Roenal
              ~jade4.cre~ ~override~ //Chrost
              ~jarev4.cre~ ~override~ //Harper
              ~jclone01.cre~ ~override~ //Calahan
              ~jon1.cre~ ~override~ //Jon Irenicus
              ~jugdar01.cre~ ~override~ //Daar
              ~kalwrk01.cre~ ~override~ //Circus Performer
              ~korgoo01.cre~ ~override~ //Goon
              ~korgoo02.cre~ ~override~ //Goon
              ~korpimg1.cre~ ~override~ //Household Guardsman
              ~korshag.cre~ ~override~ //Shagbag
              ~kwerewl.cre~ ~override~ //Werewolf
              ~latlara.cre~ ~override~ //Acolyte Lara
              ~loutm01.cre~ ~override~ //Mercenary of Riatvin
              ~loutm03.cre~ ~override~ //Mercenary of Riatvin
              ~mekimp01.cre~ ~override~ //Imp
              ~mepear01.cre~ ~override~ //Earth Mephit
              ~mgass01.cre~ ~override~ //Sergeant Natula
              ~mgass02.cre~ ~override~ //Tyrian
              ~mgket01.cre~ ~override~ //Lord Ketlaar Argrim
              ~mgketg01.cre~ ~override~ //Man-at-Arms
              ~mgketg02.cre~ ~override~ //Archer
              ~nwyvbab.cre~ ~override~ //Baby Wyvern
              ~obsdem03.cre~ ~override~ //Elder Orb
              ~obssol02.cre~ ~override~ //Onvo
              ~obssol03.cre~ ~override~ //Ancan
              ~otyugh.cre~ ~override~ //Otyugh
              ~otyugh01.cre~ ~override~ //Otyugh
              ~parfig16.cre~ ~override~ //Jalin Tix
              ~pelanna.cre~ ~override~ //Pelanna
              ~plass01.cre~ ~override~ //Assassin
              ~plass03.cre~ ~override~ //Assassin
              ~plysala.cre~ ~override~ //Fire Salamander
              ~plywyvrn.cre~ ~override~ //Baby Wyvern
              ~qcirc03.cre~ ~override~ //Circus Performer
              ~rakraj01.cre~ ~override~ //Rajah
              ~raksha01.cre~ ~override~ //Rakshasa
              ~reti.cre~ ~override~ //Reti
              ~riftcr04.cre~ ~override~ //Empathic Manifestation
              ~rigen01.cre~ ~override~ //Lord Igen Tombelthen
              ~rigen03.cre~ ~override~ //Tombelthen Soldiers
              ~scdur.cre~ ~override~ //Unger Hilldark
              ~scjerlia.cre~ ~override~ //Jerlia the Ore Merchant
              ~shape.cre~ ~override~ //Frennedan
              ~slifis02.cre~ ~override~ //Fission Slime
              ~slilmat.cre~ ~override~ //Priest of Ilmater
              ~slshop02.cre~ ~override~ //Storekeep
              ~spjeag.cre~ ~override~ //Jeagger
              ~stolegrd.cre~ ~override~ //Amnish Soldier
              ~stolethf.cre~ ~override~ //Shadow Thief
              ~super1.cre~ ~override~ //Calahan
              ~surly.cre~ ~override~ //Surly
              ~tanadv01.cre~ ~override~ //Strachan Fireblade
              ~tanadv02.cre~ ~override~ //Adventurer
              ~tanadv03.cre~ ~override~ //Adventurer
              ~tanadv04.cre~ ~override~ //Adventurer
              ~tantug02.cre~ ~override~ //Thug
              ~tasloisu.cre~ ~override~ //Tasloi Elite Trooper
              ~teldog.cre~ ~override~ //Aranthis
              ~terrece.cre~ ~override~ //Terrece
              ~tethto3.cre~ ~override~ //Tethtoril
              ~tirthold.cre~ ~override~ //Tirthold
              ~tour1.cre~ ~override~ //Harrold
              ~tour2.cre~ ~override~ //Mrs. Harrold
              ~ttgibb.cre~ ~override~ //Gibberling
              ~udill02.cre~ ~override~ //Umber Hulk
              ~udumb02.cre~ ~override~ //Umber Hulk
              ~udumber.cre~ ~override~ //Umber Hulk
              ~udvith.cre~ ~override~ //Vithal
              ~udtrap06.cre~ ~override~ //Bedlen Daglefodd
              ~uhcreat2.cre~ ~override~ //Diseased Gibberling
              ~uhgibb01.cre~ ~override~ //Diseased Gibberling
              ~uhgirl01.cre~ ~override~ //Kaatje
              ~uhkid01.cre~ ~override~ //Dirbert
              ~uhkid02.cre~ ~override~ //Valsben
              ~uhkid03.cre~ ~override~ //Neler
              ~umbhul01.cre~ ~override~ //Umber Hulk
              ~umbhul02.cre~ ~override~ //Umber Hulk Elder
              ~vakfgt01.cre~ ~override~ //Thug
              ~valran02.cre~ ~override~ //Ranger
              ~vulfgt01.cre~ ~override~ //Laen Torg
              ~wilmat.cre~ ~override~ //Priestess of Ilmatar
              ~worker01.cre~ ~override~ //Laborer
              ~worker02.cre~ ~override~ //Laborer
              ~wsmith01.cre~ ~override~ //Cromwell
              ~wyvbab01.cre~ ~override~ //Baby Wyvern
              ~wyvern01.cre~ ~override~ //Wyvern
              ~wyvfight.cre~ ~override~ //Wyvern Cultist
              ~wyvgre01.cre~ ~override~ //Greater Wyvern
              ~xvartsu.cre~ ~override~ //Xvart Protector
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
  END
BUT_ONLY

COPY_EXISTING ~alar.cre~ ~override~ //Alar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x6e 2
    WRITE_BYTE 0x74 2
    WRITE_BYTE 0x75 2
    WRITE_ASCII 0x268 ~bpcpal2a~ #8
    REPLACE_CRE_ITEM ~HELM01~  #0 #0 #0 ~IDENTIFIED~ ~HELMET~
    REPLACE_CRE_ITEM ~PLAT01~  #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
    REPLACE_CRE_ITEM ~SW2H01~  #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~
    REPLACE_CRE_ITEM ~AX1H04~ #10 #0 #0 ~IDENTIFIED~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~alex.cre~ ~override~ //Sir Beverus
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpcpal2a~ #8 //General script
    ADD_MEMORIZED_SPELL ~spcl211~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl213~ #0 ~innate~ (8)
    ADD_MEMORIZED_SPELL ~spcl907~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~alhel.cre~ ~override~ //Alhelor
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~IDENTIFIED~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~alufie02.cre~ ~override~ //Alu-Fiend
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x260 ~bpally~ #8 //General script
    ADD_MEMORIZED_SPELL ~spwi605~ #5 ~wizard~
    ADD_MEMORIZED_SPELL ~spcl900~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl904~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl905~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl907~ #0 ~innate~
    SET_BG2_PROFICIENCY ~PROFICIENCYLONGBOW~ 3
  END
BUT_ONLY

COPY_EXISTING ~alynar.cre~ ~override~ //Sir Alynar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~AX1H04~ #10 #0 #0 ~IDENTIFIED~ ~WEAPON2~
    REMOVE_KNOWN_SPELL ~spin111~ ~spin113~
  END
BUT_ONLY

COPY_EXISTING ~amnleg1.cre~ ~override~ //Amnish Legionary
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 //Default script
    WRITE_ASCII 0x280 ~amnleg1~ #32 //Death variable
  END
BUT_ONLY


COPY_EXISTING ~ankheg01.cre~ ~override~ //Ankheg
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~ankheg~ #8
    WRITE_ASCII 0x260 ~~ #8
    WRITE_ASCII 0x268 ~~ #8
  END
BUT_ONLY

COPY_EXISTING ~antenos.cre~ ~override~ //Antenos
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 65
    WRITE_ASCII 0x248 ~bpthfsht~ #8
    WRITE_ASCII 0x268 ~bpthief~ #8
    REPLACE_CRE_ITEM ~LEAT04~ #0 #0 #0 ~NONE~ ~ARMOR~
  END
BUT_ONLY

COPY_EXISTING ~ar18mage.cre~ ~override~ //Mage
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x234 17
    WRITE_ASCII 0x250 ~~ #8
    WRITE_ASCII 0x260 ~~ #8
    WRITE_ASCII 0x268 ~wsarsgt~
    REPLACE_CRE_ITEM ~DAGG05~ #20 #0 #0 ~IDENTIFIED~ ~WEAPON2~ EQUIP
    SET_BG2_PROFICIENCY ~PROFICIENCYQUARTERSTAFF~ 1
    SET_BG2_PROFICIENCY ~PROFICIENCYDAGGER~ 1
  END
BUT_ONLY

COPY_EXISTING ~ar18prie.cre~ ~override~ //Priest of Cyric
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
    SET_BG2_PROFICIENCY ~EXTRAPROFICIENCY1~ 1
    SET_BG2_PROFICIENCY ~PROFICIENCYSLING~ 1
  END
BUT_ONLY

COPY_EXISTING ~ar18thif.cre~ ~override~ //Thief
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x64 50
    REPLACE_CRE_ITEM ~DAGG05~ #20 #0 #0 ~IDENTIFIED~ ~WEAPON2~ EQUIP
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (4)
    SET_BG2_PROFICIENCY ~PROFICIENCYDAGGER~ 1
  END
BUT_ONLY

COPY_EXISTING ~arkanisg.cre~ ~override~ //Arkanis Gath
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x268 ~wbasight~ #8
  END
BUT_ONLY

COPY_EXISTING ~army01.cre~ ~override~ //Orc
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x46 6
    WRITE_SHORT 0x48 6
    WRITE_SHORT 0x52 15
    WRITE_SHORT 0x6f 1
    WRITE_BYTE 0x71 1
    WRITE_BYTE 0x72 1
    WRITE_BYTE 0x73 1
    WRITE_BYTE 0x74 1
    WRITE_BYTE 0x75 1
    WRITE_ASCII 0x258 ~~ #8
    WRITE_BYTE 0x27b 0x13
  END
BUT_ONLY

COPY_EXISTING ~artemis.cre~ ~override~ //Artemis Entreri
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x268 ~wbasight~ #8
  END
BUT_ONLY

COPY_EXISTING ~arval.cre~ ~override~ //High Mornmaster Arval
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpleader~ #8
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
  END
BUT_ONLY

COPY_EXISTING ~barl.cre~ ~override~ //Barl
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~~ #8
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
  END
BUT_ONLY

COPY_EXISTING ~baronp.cre~ ~override~ //Baron Ployer
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bp!plot~ #8
    WRITE_ASCII 0x268 ~bpcber2b~ #8
  END
BUT_ONLY

COPY_EXISTING ~bazmonk.cre~ ~override~ //Monk
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x273 20 //Class (monk, was fighter)
    ADD_MEMORIZED_SPELL ~spcl811~ #0 ~innate~ (4)
    ADD_MEMORIZED_SPELL ~spcl815~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl820~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~berinvar.cre~ ~override~ //Berinvar
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x250 ~~ #8
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
    WRITE_BYTE 0x274 0
    SET_BG2_PROFICIENCY ~PROFICIENCYLONGSWORD~ 3
  END
BUT_ONLY

COPY_EXISTING ~berser02.cre~ ~override~ //Berserk Warrior
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x238 18
    WRITE_SHORT 0x239 50
    WRITE_BYTE 0x23a 10
    WRITE_BYTE 0x23b 10
    WRITE_BYTE 0x23c 17
    WRITE_BYTE 0x23d 17
    WRITE_BYTE 0x23e 10
    REPLACE_CRE_ITEM ~BAX1H02~  #0 #0 #0 ~UNDROPPABLE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~BAX1H02~  #0 #0 #0 ~UNDROPPABLE~ ~SHIELD~
    REPLACE_CRE_ITEM ~BLEAT02~  #0 #0 #0 ~UNDROPPABLE~ ~ARMOR~
    REPLACE_CRE_ITEM ~BERSERKR~ #0 #0 #0 ~UNDROPPABLE~ ~LRING~
  END
BUT_ONLY

COPY_EXISTING ~berser03.cre~ ~override~ //Berserk Warrior
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x238 18
    WRITE_SHORT 0x239 100
    WRITE_BYTE 0x23a 11
    WRITE_BYTE 0x23b 11
    WRITE_BYTE 0x23c 18
    WRITE_BYTE 0x23d 18
    WRITE_BYTE 0x23e 11
    REPLACE_CRE_ITEM ~BSW2H03~  #0 #0 #0 ~UNDROPPABLE~ ~WEAPON1~ EQUIP TWOHANDED
    REPLACE_CRE_ITEM ~BLEAT03~  #0 #0 #0 ~UNDROPPABLE~ ~ARMOR~
    REPLACE_CRE_ITEM ~BERSERKR~ #0 #0 #0 ~UNDROPPABLE~ ~LRING~
  END
BUT_ONLY

COPY_EXISTING ~bersersu.cre~ ~override~ //Berserk Warrior
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x238 18
    WRITE_SHORT 0x239 100
    WRITE_BYTE 0x23a 11
    WRITE_BYTE 0x23b 11
    WRITE_BYTE 0x23c 18
    WRITE_BYTE 0x23d 18
    WRITE_BYTE 0x23e 11
    REPLACE_CRE_ITEM ~BSW1H01~  #0 #0 #0 ~UNDROPPABLE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~BLEAT01~  #0 #0 #0 ~UNDROPPABLE~ ~ARMOR~
    REPLACE_CRE_ITEM ~BERSERKR~ #0 #0 #0 ~UNDROPPABLE~ ~LRING~
  END
BUT_ONLY

COPY_EXISTING ~senstalk.cre~ ~override~ //Invisible Stalker
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x268 ~wbasight~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~bodyg2.cre~ ~override~ //Amnish Bodyguard
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 38 // CurrHP (was 35)
    WRITE_SHORT 0x26 38 // MaxHP (was 35)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~bonebld.cre~ ~override~ //Bone Blade
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #72472 // LongName (was 72471)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~borinall.cre~ ~override~ //Borinall
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 48 // CurrHP (was 28)
    WRITE_SHORT 0x26 48 // MaxHP (was 28)
    WRITE_BYTE 0x64 25 // DtectIll (was 0)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~brage2.cre~ ~override~ //Brage
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    // SAY NAME2 #11922 // ShortName (was 6225)
    WRITE_BYTE 0x235 2 // HighestLevelSecond (was 1)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REMOVE_CRE_ITEM ~RNDTRE02~
  END
BUT_ONLY

COPY_EXISTING ~breg01.cre~ ~override~ //Visaj
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART02~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY




COPY_EXISTING ~calaha.cre~ ~override~ //Calahan
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    // SAY NAME1 #30409 // LongName (was 21997)
    // SAY NAME2 #30409 // ShortName (was 21998)
    WRITE_SHORT 0x24 37 // CurrHP (was 53)
    WRITE_SHORT 0x26 37 // MaxHP (was 53)
    WRITE_BYTE 0x52 14 // THAC0 (was 12)
    WRITE_BYTE 0x53 1 // NOAtt (was 7)
    WRITE_BYTE 0x54 12 // SaveVDth (was 8)
    WRITE_BYTE 0x55 12 // SaveVWnd (was 10)
    WRITE_BYTE 0x56 11 // SaveVPoly (was 9)
    WRITE_BYTE 0x57 15 // SaveVAtks (was 9)
    WRITE_BYTE 0x58 13 // SaveVspell (was 11)
    WRITE_BYTE 0x234 7 // HighestLevelPrimary (was 9)
    WRITE_ASCII 0x248 ~bp!plot~ #8 // Override (was SHOUT)
    WRITE_ASCII 0x250 ~initdlg~ #8 // Class (was )
    WRITE_ASCII 0x268 ~wtrunsgt~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x273 155 // IDSClass (was 9)
    REMOVE_CRE_ITEM ~LEAT05~ ~SHLD03~ ~SW1H09~ ~RNDTRE02~
    REPLACE_CRE_ITEM ~LEAT04~ #0 #0 #0 ~NONE~ ~ARMOR~
    REPLACE_CRE_ITEM ~SW1H08~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~RING10~ #0 #0 #0 ~NONE~ ~RRING~
    REPLACE_CRE_ITEM ~MISC38~ #0 #0 #0 ~NONE~ ~QITEM1~
    REPLACE_CRE_ITEM ~SHLD08~ #0 #0 #0 ~NONE~ ~SHIELD~
  END
BUT_ONLY

COPY_EXISTING ~camitis.cre~ ~override~ //Camitis
              ~celogan.cre~ ~override~ //High Merchant Logan Coprith
              ~druff2.cre~ ~override~ //Ruffian
              ~mane.cre~ ~override~ //Mane
              ~polyochr.cre~ ~override~ //Mustard Jelly
              ~sickrat.cre~ ~override~ //Diseased Rat
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpwdasgt~ #8 // Race (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~ccguard1.cre~ ~override~ //Copper Coronet Guard
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_SHORT 0x24 32 // CurrHP (was 20)
    WRITE_SHORT 0x26 32 // MaxHP (was 20)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY


COPY_EXISTING ~cederil.cre~ ~override~ //Deril
              ~termer05.cre~ ~override~ //Mercenary
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~hllayen.cre~ ~override~ //Layene
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DART04~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~centeo01.cre~ ~override~ //Centeol
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~wbasight~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~ch3mag01.cre~ ~override~ //Shadow Thief
              ~hlmage.cre~ ~override~ //Mage
              ~stmage.cre~ ~override~ //Shadow Thief
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~chang01.cre~ ~override~ //Angelo
              ~chang02.cre~ ~override~ //Angelo
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_LONG 0x244 1074200576 // KitInfo (was 2147483648)
    WRITE_ASCII 0x2cc ~~ #8 // Dlg (was CHANG01)
    SET_BG2_PROFICIENCY ~PROFICIENCYSHORTBOW~ 5
    SET_BG2_PROFICIENCY ~PROFICIENCYSHORTSWORD~ 2
  END
BUT_ONLY

COPY_EXISTING ~cllatp01.cre~ ~override~ //Dawnmistress
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~clcoti01.cre~ ~override~ //Cotirso
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpmag12c~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTARSGT)
    ADD_MEMORIZED_SPELL ~spwi112~ #0 ~wizard~ (5)
    ADD_MEMORIZED_SPELL ~spwi211~ #1 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi212~ #1 ~wizard~ (2)
    ADD_MEMORIZED_SPELL ~spwi217~ #1 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi219~ #1 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi311~ #2 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi306~ #2 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi313~ #2 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi308~ #2 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi408~ #3 ~wizard~ (2)
    ADD_MEMORIZED_SPELL ~spwi401~ #3 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi411~ #3 ~wizard~
    ADD_MEMORIZED_SPELL ~spwi505~ #4 ~wizard~ (2)
    ADD_MEMORIZED_SPELL ~spwi605~ #5 ~wizard~
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (3)
  END
BUT_ONLY

COPY_EXISTING ~corgeig.cre~ ~override~ //Corgeig Axehand
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpcber2b~ #8 // General (was WTASIGHT)
    REMOVE_KNOWN_SPELL ~spin117~
    REMOVE_MEMORIZED_SPELL ~spin117~
    ADD_MEMORIZED_SPELL ~spcl321~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~cowled.cre~ ~override~ //Cowled Wizard
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~wbarsgt~ #8 // General (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~cutammag.cre~ ~override~ //Mage
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~STAF01~ #0 #0 #0 ~NONE~ ~WEAPON1~
    REPLACE_CRE_ITEM ~DART01~ #40 #0 #0 ~NONE~ ~WEAPON2~ EQUIP
  END
BUT_ONLY

COPY_EXISTING ~dadwarf.cre~ ~override~ //Dwarf
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 42 // CurrHP (was 35)
    WRITE_SHORT 0x26 42 // MaxHP (was 35)
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 0)
  END
BUT_ONLY

COPY_EXISTING ~daghaun1.cre~ ~override~ //Ghaundaur Priest Leader
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bppri14t~ #8 // Race (was PRIET14T)
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 0)
    REMOVE_MEMORIZED_SPELL ~sppr511~
    REMOVE_MEMORIZED_SPELL ~sppr608~
    REMOVE_MEMORIZED_SPELL ~sppr603~
    ADD_MEMORIZED_SPELL ~sppr599~ #4 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~sppr699~ #5 ~priest~
    ADD_MEMORIZED_SPELL ~sppr698~ #5 ~priest~
  END
BUT_ONLY

COPY_EXISTING ~daghaun2.cre~ ~override~ //Ghaundaur Priest
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 0)
    REMOVE_MEMORIZED_SPELL ~sppr511~
    REMOVE_MEMORIZED_SPELL ~sppr608~
    REMOVE_MEMORIZED_SPELL ~sppr603~
    ADD_MEMORIZED_SPELL ~sppr599~ #4 ~priest~
    ADD_MEMORIZED_SPELL ~sppr511~ #4 ~priest~
    ADD_MEMORIZED_SPELL ~sppr699~ #5 ~priest~
    ADD_MEMORIZED_SPELL ~sppr698~ #5 ~priest~
  END
BUT_ONLY

COPY_EXISTING ~dagmag01.cre~ ~override~ //Relonar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 0)
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~dagnoll.cre~ ~override~ //Gnoll
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 23 // CurrHP (was 15)
    WRITE_SHORT 0x26 23 // MaxHP (was 15)
    WRITE_ASCII 0x258 ~bpwdasgt~ #8 // Race (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~dakobold.cre~ ~override~ //Kobold
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 7 // CurrHP (was 4)
    WRITE_SHORT 0x26 7 // MaxHP (was 4)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~danno.cre~ ~override~ //Danno Fairfoot
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpcber2b~ #8 // General (was WTASIGHT)
    REMOVE_KNOWN_SPELL ~spin117~
    REMOVE_MEMORIZED_SPELL ~spin117~
    ADD_MEMORIZED_SPELL ~spcl321~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~dario.cre~ ~override~ //Dario Thet
              ~elders.cre~ ~override~ //Elder Sorn
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~bpmage6~ #8 // Override (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~dawnmas.cre~ ~override~ //Dawnmaster Kreel
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_LONG 0x10 0 // CreatureFlags (was 83886081)
    WRITE_ASCII 0x250 ~bp!plot~ #8 // Class (was NONE)
    WRITE_ASCII 0x258 ~bpleader~ #8 // Race (was PRIEST6)
    WRITE_ASCII 0x260 ~bpprie6~ #8 // General (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~deckass1.cre~ ~override~ //Thief
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x64 60 // DtectIll (was 0)
    WRITE_BYTE 0x68 80 // Stealth (was 0)
  END
BUT_ONLY

COPY_EXISTING ~delcia.cre~ ~override~ //Lady Delcia Caan
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~bp!plot~ #8 // Override (was SHOUT)
    WRITE_ASCII 0x250 ~shout~ #8 // Class (was KPLEAVE)
    WRITE_ASCII 0x258 ~kpleave~ #8 // Race (was RUNENEMY)
    WRITE_ASCII 0x260 ~runenemy~ #8 // General (was INITDLG)
  END
BUT_ONLY

COPY_EXISTING ~devaevil.cre~ ~override~ //Fallen Deva
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x275 4 // IDSGender (was 5)
  END
BUT_ONLY

COPY_EXISTING ~devagood.cre~ ~override~ //Deva
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x275 2 // IDSGender (was 5)
  END
BUT_ONLY

COPY_EXISTING ~devast01.cre~ ~override~ //Astral Deva
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #68214 // LongName (was 68213)
    WRITE_ASCII 0x248 ~bpmag14d~ #8 // Override (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~devmon01.cre~ ~override~ //Monadic Deva
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #68225 // LongName (was 68224)
    WRITE_ASCII 0x250 ~bpmag14d~ #8 // Class (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~dmark1.cre~ ~override~ //Fovem
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 30 // DtectIll (was 0)
    WRITE_BYTE 0x68 45 // Stealth (was 0)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~dmask1.cre~ ~override~ //Commoner
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~priet12b~ #8 // Class (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~docsol03.cre~ ~override~ //Guard Captain
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~dopcle01.cre~ ~override~ //Kiel the Legion Killer
              ~dopmag01.cre~ ~override~ //Islanne
              ~dopmgr01.cre~ ~override~ //Islanne
              ~dopwar01.cre~ ~override~ //Durlag Trollkiller
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpwdasgt~ #8 // Class (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~dopthi01.cre~ ~override~ //Fuernebol
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bp!bard~ #8 // Race (was WTARSGT)
    WRITE_ASCII 0x268 ~bpwtrsgt~ #8 // Default (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~drshch01.cre~ ~override~ //Chaos
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 166 // CurrHP (was 110)
    WRITE_SHORT 0x26 166 // MaxHP (was 110)
    WRITE_BYTE 0x52 10 // THAC0 (was 12)
    WRITE_ASCII 0x248 ~shoutdlg~ #8 // Override (was DRSHCH01)
    WRITE_ASCII 0x250 ~drshch01~ #8 // Class (was SHOUTDLG)
    WRITE_ASCII 0x258 ~bpmag14m~ #8 // Race (was FIGMAG10)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~drush.cre~ ~override~ //Drush
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 73 // CurrHP (was 41)
    WRITE_SHORT 0x26 73 // MaxHP (was 41)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~elehob01.cre~ ~override~ //Goblin Commando
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_SHORT 0x24 15 // CurrHP (was 8)
    WRITE_SHORT 0x26 15 // MaxHP (was 8)
    WRITE_BYTE 0x52 18 // THAC0 (was 19)
  END
BUT_ONLY

COPY_EXISTING ~ffactor1.cre~ ~override~ //Kirinaldo
              ~fireb1.cre~ ~override~ //Firebead Elvenhair
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DAGG05~ #20 #0 #0 ~NONE~ ~WEAPON2~ EQUIP
  END
BUT_ONLY

COPY_EXISTING ~ffactor2.cre~ ~override~ //Lunisia
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DAGG05~ #20 #0 #0 ~NONE~ ~WEAPON2~ EQUIP
  END
BUT_ONLY

COPY_EXISTING ~ffbart.cre~ ~override~ //Samuel Thunderburp
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~wbasight~ #8 // General (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~ffcust01.cre~ ~override~ //Ercias
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 24 // CurrHP (was 20)
    WRITE_SHORT 0x26 24 // MaxHP (was 20)
    WRITE_BYTE 0x68 30 // Stealth (was 0)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was BPWDASGT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~ffcust06.cre~ ~override~ //Belle
              ~gpdog1.cre~ ~override~ //War Dog
              ~khellor.cre~ ~override~ //Khellor Ahmson
              ~mgappr02.cre~ ~override~ //Morul
              ~mgappr03.cre~ ~override~ //Nara
              ~pirmur03.cre~ ~override~ //Front
              ~ruffian.cre~ ~override~ //Amalas
              ~tiana.cre~ ~override~ //Tiana
              ~ttser2.cre~ ~override~ //Servant
              ~vaelg01.cre~ ~override~ //Vaelag's Guard
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x260 ~bpwdasgt~ #8 // General (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~ffusher1.cre~ ~override~ //Usher
              ~pirpir03.cre~ ~override~ //Olben the Pirate
              ~talvilon.cre~ ~override~ //Acolyte Vilon
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~firebe.cre~ ~override~ //Firebead Elvenhair
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DAGG05~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~flam13.cre~ ~override~ //Dilos
              ~plfarm05.cre~ ~override~ //Pardo
              ~plfarm06.cre~ ~override~ //Moreno
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~gaius.cre~ ~override~ //Gaius
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpwdasgt~ #8 // General (was WTASIGHT)
    REPLACE_CRE_ITEM ~DAGG02~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~DART02~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~garock.cre~ ~override~ //Garock
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #68599 // LongName (was 68598)
    WRITE_ASCII 0x268 ~bpcfig2a~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

ACTION_IF FILE_EXISTS_IN_GAME ~gatewa.cre~ BEGIN
  COPY_EXISTING ~gatewa.cre~ ~override~ //Gatewarden
    PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
      // SAY NAME1 #12721 // LongName (was 12335)
      // SAY NAME2 #12721 // ShortName (was 12689)
      WRITE_BYTE 0x2c 27 // MetalColour (was 31)
      WRITE_BYTE 0x2d 66 // MinorColour (was 46)
      WRITE_BYTE 0x2e 24 // MajorColour (was 47)
      WRITE_BYTE 0x2f 12 // SkinColour (was 9)
      WRITE_BYTE 0x30 26 // LeatherColour (was 58)
      WRITE_BYTE 0x31 29 // ArmorColour (was 25)
      WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    END
  BUT_ONLY
END

COPY_EXISTING ~gereth.cre~ ~override~ //Gereth
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~STAF01~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP TWOHANDED
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~gerhardt.cre~ ~override~ //Uncle Gerhardt
              ~kindai.cre~ ~override~ //Kindail
              ~thraxi.cre~ ~override~ //Thraxis Gall
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~priest4~ #8 // Race (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~gibber01.cre~ ~override~ //Gibberling
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 14 // CurrHP (was 8)
    WRITE_SHORT 0x26 14 // MaxHP (was 8)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~gmage14.cre~ ~override~ //Mekrath
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DART02~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~icliz02.cre~ ~override~ //Gorkale
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpwdasgt~ #8 // Race (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~gorje.cre~ ~override~ //Gorje Hilldark
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~rorcl01.cre~ ~override~ //Orog Leader
              ~salgrfir.cre~ ~override~ //Salamander Noble
              ~sengua02.cre~ ~override~ //Guard Captain
              ~slcent.cre~ ~override~ //Amnish Centurion
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
  END
BUT_ONLY


COPY_EXISTING ~habib.cre~ ~override~ //Habib
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpcber2b~ #8 // Default (was WTASIGHT)
    REMOVE_KNOWN_SPELL ~spin117~
    REMOVE_MEMORIZED_SPELL ~spin117~
    ADD_MEMORIZED_SPELL ~spcl321~ #0 ~innate~
  END
BUT_ONLY

COPY_EXISTING ~habrega.cre~ ~override~ //Chief Inspector Brega
              ~naldirt.cre~ ~override~ //Officer Dirth
              ~wcust01.cre~ ~override~ //Count Claylan
              ~wmart1.cre~ ~override~ //Joluv
              ~wmart2.cre~ ~override~ //Deidre
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bp!plot~ #8 // General (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~hajanos.cre~ ~override~ //Janos
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bp!bard~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~haksu.cre~ ~override~ //Hakeashar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #46138 // LongName (was 46137)
    WRITE_BYTE 0x271 255 // IDSGeneral (was 5)
    WRITE_BYTE 0x273 174 // IDSClass (was 126)
  END
BUT_ONLY

COPY_EXISTING ~hamek.cre~ ~override~ //Mekrath
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpprst12~ #8 // Class (was NONE)
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~harpass1.cre~ ~override~ //Lucette
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 65 // DtectIll (was 0)
    WRITE_BYTE 0x68 80 // Stealth (was 100)
    WRITE_ASCII 0x250 ~bpmag12a~ #8 // Class (was NONE)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (3)
  END
BUT_ONLY

COPY_EXISTING ~hgfel01.cre~ ~override~ //Fell Cat
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #70744 // LongName (was 70743)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~hgsal01.cre~ ~override~ //Fire Salamander
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #73255 // LongName (was 73254)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
     ADD_MEMORIZED_SPELL ~spcl916~ #0 ~innate~
     ADD_MEMORIZED_SPELL ~spcl917~ #0 ~innate~
  END
BUT_ONLY


COPY_EXISTING ~icmin01.cre~ ~override~ //Minotaur
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 65 // CurrHP (was 50)
    WRITE_SHORT 0x26 65 // MaxHP (was 50)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~icmyc01.cre~ ~override~ //Myconid
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    SAY NAME1 #2412 // LongName (~Myconid~)
    SAY NAME2 #2412 // ShortName (~Myconid~)
    WRITE_BYTE 0x242 0 // MrlReco (was 1)
    WRITE_LONG 0x244 1073741824 // KitInfo (was 0)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~icmyc02.cre~ ~override~ //Myconid King
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 75 // CurrHP (was 50)
    WRITE_SHORT 0x26 75 // MaxHP (was 50)
    WRITE_ASCII 0x258 ~bpleader~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~icyuan05.cre~ ~override~ //Yuan-Ti  Prince
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 186 // CurrHP (was 83)
    WRITE_SHORT 0x26 186 // MaxHP (was 83)
    WRITE_SHORT 0x46 ~-6~ // ACNatul (was -2)
    WRITE_SHORT 0x48 ~-6~ // ACEffec (was -2)
    WRITE_BYTE 0x52 5 // THAC0 (was 11)
    WRITE_BYTE 0x53 8 // NOAtt (was 7)
    WRITE_BYTE 0x59 35 // RstFire (was 30)
    WRITE_BYTE 0x5a 35 // RstCold (was 30)
    WRITE_BYTE 0x5b 35 // RstElec (was 30)
    WRITE_BYTE 0x5c 35 // RstAcid (was 30)
    WRITE_BYTE 0x5d 25 // RstMagc (was 20)
    WRITE_BYTE 0x5e 35 // RstMFre (was 30)
    WRITE_BYTE 0x5f 35 // RstMCld (was 30)
    WRITE_BYTE 0x60 5 // RstSlash (was 0)
    WRITE_BYTE 0x61 5 // RstCrush (was 0)
    WRITE_BYTE 0x62 5 // RstPierc (was 0)
    WRITE_BYTE 0x63 5 // RstMissl (was 0)
    WRITE_BYTE 0x234 20 // HighestLevelPrimary (was 14)
    WRITE_BYTE 0x238 21 // Str (was 18)
    WRITE_BYTE 0x23a 19 // Int (was 15)
    WRITE_BYTE 0x23b 12 // Wis (was 14)
    WRITE_BYTE 0x23c 19 // Dex (was 17)
    WRITE_BYTE 0x23d 16 // Con (was 13)
    WRITE_BYTE 0x23e 14 // Cha (was 9)
    WRITE_ASCII 0x248 ~gensht01~ #8 // Override (was MAGE14D)
    WRITE_ASCII 0x250 ~bpmag14d~ #8 // Class (was NONE)
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x274 101 // IDSSpecifc (was 102)
    REPLACE_CRE_ITEM ~SW1H52~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
  END
BUT_ONLY

COPY_EXISTING ~idiot01.cre~ ~override~ //Jaheira
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpprie6a~ #8 // Class (was )
  END
BUT_ONLY

COPY_EXISTING ~irlana.cre~ ~override~ //Lady Irlana
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x53 7 // NOAtt (was 1)
    REMOVE_KNOWN_SPELL ~spin113~
    REMOVE_KNOWN_SPELL ~spin111~
    REMOVE_KNOWN_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin111~
    REMOVE_MEMORIZED_SPELL ~spin113~
    REMOVE_MEMORIZED_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin121~
    ADD_MEMORIZED_SPELL ~sppr101~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr109~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr212~ #1 ~priest~
    ADD_MEMORIZED_SPELL ~spin121~ #0 ~innate~ (5)
    REMOVE_CRE_ITEM ~SHLD03~
    REPLACE_CRE_ITEM ~HELMNOAN~ #0 #0 #0 ~NONE~ ~HELMET~
    REPLACE_CRE_ITEM ~BOW03~ #0 #0 #0 ~NONE~ ~WEAPON2~
    REPLACE_CRE_ITEM ~AROW02~ #40 #0 #0 ~NONE~ ~QUIVER1~
  END
BUT_ONLY

COPY_EXISTING ~jade2.cre~ ~override~ //Thenry
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~~ #8 // Race (was GPUSE)
  END
BUT_ONLY

COPY_EXISTING ~jadermin.cre~ ~override~ //Dermin Courtierdale
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~gpshout~ #8 // Class (was MAGE6C)
    WRITE_ASCII 0x258 ~bpmage6c~ #8 // Race (was GPSHOUT)
    WRITE_ASCII 0x260 ~bp!bard~ #8 // General (was GPUSE)
  END
BUT_ONLY

COPY_EXISTING ~jael01.cre~ ~override~ //Hindra Jae'llat
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
    REMOVE_MEMORIZED_SPELL ~sppr511~
    ADD_MEMORIZED_SPELL ~sppr599~ #4 ~priest~
  END
BUT_ONLY

COPY_EXISTING ~jael02.cre~ ~override~ //Rilloa Jae'llat
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
    REMOVE_MEMORIZED_SPELL ~sppr511~
    REMOVE_MEMORIZED_SPELL ~sppr608~
    REMOVE_MEMORIZED_SPELL ~sppr603~
    REMOVE_MEMORIZED_SPELL ~sppr698~
    ADD_MEMORIZED_SPELL ~sppr599~ #4 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~sppr699~ #5 ~priest~
    ADD_MEMORIZED_SPELL ~sppr698~ #5 ~priest~ (2)
  END
BUT_ONLY

COPY_EXISTING ~jael03.cre~ ~override~ //Ist'tar Jae'llat
              ~jarlaxle.cre~ ~override~ //Jarlaxle
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 1)
  END
BUT_ONLY

COPY_EXISTING ~jael04.cre~ ~override~ //Jae'llat Guard
              ~udsvir04.cre~ ~override~ //Innkeeper
              ~udsvir05.cre~ ~override~ //Therndle Daglefodd
              ~udsvir06.cre~ ~override~ //Svirfneblin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
  END
BUT_ONLY

COPY_EXISTING ~jaerto1.cre~ ~override~ //Jarden
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x238 15 // Str (was 13)
    WRITE_ASCII 0x268 ~palad10~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x273 6 // IDSClass (was 2)
    REMOVE_KNOWN_SPELL ~spin111~
    REMOVE_KNOWN_SPELL ~spin113~
    REMOVE_KNOWN_SPELL ~spin109~
    REMOVE_KNOWN_SPELL ~spin120~
    REMOVE_KNOWN_SPELL ~spin121~
    REMOVE_MEMORIZED_SPELL ~spin111~
    REMOVE_MEMORIZED_SPELL ~spin113~
    REMOVE_MEMORIZED_SPELL ~spin109~
    REMOVE_MEMORIZED_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin121~
    ADD_MEMORIZED_SPELL ~sppr101~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr109~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~spcl211~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl213~ #0 ~innate~ (6)
    REPLACE_CRE_ITEM ~HELM09~ #0 #0 #0 ~NONE~ ~HELMET~
    REPLACE_CRE_ITEM ~SW2H01~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP TWOHANDED
    REPLACE_CRE_ITEM ~AX1H04~ #6 #0 #0 ~NONE~ ~WEAPON2~
    ADD_CRE_ITEM ~POTN52~ #2 #0 #0 ~NONE~ ~QITEM3~
  END
BUT_ONLY

COPY_EXISTING ~jaerto2.cre~ ~override~ //Turg
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_BYTE 0x74 2 // Unu6(Axe prof) (was 0)
    WRITE_BYTE 0x238 15 // Str (was 13)
    WRITE_ASCII 0x268 ~palad10~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x273 6 // IDSClass (was 2)
    REMOVE_KNOWN_SPELL ~spin111~
    REMOVE_KNOWN_SPELL ~spin113~
    REMOVE_KNOWN_SPELL ~spin109~
    REMOVE_KNOWN_SPELL ~spin120~
    REMOVE_KNOWN_SPELL ~spin121~
    REMOVE_MEMORIZED_SPELL ~spin111~
    REMOVE_MEMORIZED_SPELL ~spin113~
    REMOVE_MEMORIZED_SPELL ~spin109~
    REMOVE_MEMORIZED_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin121~
    ADD_MEMORIZED_SPELL ~sppr101~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr109~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~spcl211~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl213~ #0 ~innate~ (6)
    ADD_CRE_ITEM ~POTN52~ #2 #0 #0 ~NONE~ ~QITEM3~
    REPLACE_CRE_ITEM ~HELM11~ #0 #0 #0 ~NONE~ ~HELMET~
    REPLACE_CRE_ITEM ~SW2H01~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP TWOHANDED
    REPLACE_CRE_ITEM ~AX1H04~ #6 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~jaerto3.cre~ ~override~ //Tamile
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 30 // DtectIll (was 0)
    WRITE_BYTE 0x68 40 // Stealth (was 20)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~jaerto4.cre~ ~override~ //Wurn
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REMOVE_KNOWN_SPELL ~spin111~
    REMOVE_KNOWN_SPELL ~spin113~
    REMOVE_KNOWN_SPELL ~spin109~
    REMOVE_KNOWN_SPELL ~spin120~
    REMOVE_KNOWN_SPELL ~spin121~
    REMOVE_MEMORIZED_SPELL ~spin111~
    REMOVE_MEMORIZED_SPELL ~spin113~
    REMOVE_MEMORIZED_SPELL ~sppr211~
    REMOVE_MEMORIZED_SPELL ~sppr302~
    REMOVE_MEMORIZED_SPELL ~sppr402~
    REMOVE_MEMORIZED_SPELL ~spin109~
    REMOVE_MEMORIZED_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin121~
    ADD_MEMORIZED_SPELL ~sppr211~ #1 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~sppr213~ #1 ~priest~
    ADD_MEMORIZED_SPELL ~sppr302~ #2 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~sppr310~ #2 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~sppr410~ #3 ~priest~
    ADD_MEMORIZED_SPELL ~sppr402~ #3 ~priest~ (2)
    ADD_MEMORIZED_SPELL ~spcl311~ #0 ~innate~ (4)
  END
BUT_ONLY

COPY_EXISTING ~jaertof.cre~ ~override~ //Ertof Dand
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpcpal2a~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x273 6 // IDSClass (was 2)
    REMOVE_KNOWN_SPELL ~spin111~
    REMOVE_KNOWN_SPELL ~spin113~
    REMOVE_KNOWN_SPELL ~spin109~
    REMOVE_KNOWN_SPELL ~spin120~
    REMOVE_KNOWN_SPELL ~spin121~
    REMOVE_MEMORIZED_SPELL ~spin111~
    REMOVE_MEMORIZED_SPELL ~spin113~
    REMOVE_MEMORIZED_SPELL ~spin109~
    REMOVE_MEMORIZED_SPELL ~spin120~
    REMOVE_MEMORIZED_SPELL ~spin121~
    ADD_MEMORIZED_SPELL ~sppr101~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr108~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr109~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~spcl211~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl213~ #0 ~innate~ (6)
  END
BUT_ONLY

COPY_EXISTING ~jaga1.cre~ ~override~ //Bessen
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DAGG02~ #0 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~jaga2.cre~ ~override~ //Kail
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x258 ~~ #8 // Race (was GPUSE)
    WRITE_ASCII 0x268 ~wsasight~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jaga3.cre~ ~override~ //Nadinal
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_LONG 0x18 1665 // PowerLevel (was 10000)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART02~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~jaga4.cre~ ~override~ //Iko
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x64 35 // DtectIll (was 0)
    WRITE_BYTE 0x68 50 // Stealth (was 0)
    WRITE_ASCII 0x258 ~bpmag10a~ #8 // Race (was GPUSE)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    REMOVE_KNOWN_SPELL ~spwi102~
    REMOVE_KNOWN_SPELL ~spwi105~
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~jarev1.cre~ ~override~ //Harper
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpmag14m~ #8 // Class (was GPSHOUT)
    WRITE_ASCII 0x258 ~gpshout~ #8 // Race (was GPUSE)
    WRITE_ASCII 0x260 ~gpuse~ #8 // General (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~jarev2.cre~ ~override~ //Harper
              ~jarevia.cre~ ~override~ //Reviane
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~wsasight~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jatermin.cre~ ~override~ //Terminsel
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~initdlg~ #8 // Override (was NONE)
    WRITE_ASCII 0x258 ~bpgpmag1~ #8 // Race (was WTASIGHT)
    WRITE_ASCII 0x260 ~bppri18a~ #8 // General (was INITDLG)
    REPLACE_CRE_ITEM ~SLNG04~ #0 #0 #0 ~NONE~ ~WEAPON2~
    REPLACE_CRE_ITEM ~BULL02~ #40 #0 #0 ~NONE~ ~QUIVER1~
  END
BUT_ONLY

COPY_EXISTING ~jelgra01.cre~ ~override~ //Gray Ooze
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jelgre01.cre~ ~override~ //Green Slime
              ~jellygr.cre~ ~override~ //Green Slime
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 22 // CurrHP (was 16)
    WRITE_SHORT 0x26 22 // MaxHP (was 16)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jellgr.cre~ ~override~ //Gray Ooze
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_LONG 0x10 1 // CreatureFlags (was 0)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    // WRITE_BYTE 0x272 255 // IDSRace (was 119)
  END
BUT_ONLY

COPY_EXISTING ~jellmu.cre~ ~override~ //Mustard Jelly
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_LONG 0x10 1 // CreatureFlags (was 0)
    WRITE_BYTE 0x5d 125 // RstMagc (was 100)
    WRITE_BYTE 0x61 30 // RstCrush (was 60)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    // WRITE_BYTE 0x272 255 // IDSRace (was 119)
  END
BUT_ONLY

COPY_EXISTING ~jelloc.cre~ ~override~ //Ochre Jelly
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_LONG 0x10 1 // CreatureFlags (was 0)
    WRITE_ASCII 0x258 ~bpwdasgt~ #8 // Race (was WTASIGHT)
    // WRITE_BYTE 0x272 255 // IDSRace (was 119)
  END
BUT_ONLY

COPY_EXISTING ~jelmus01.cre~ ~override~ //Mustard Jelly
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jeloch01.cre~ ~override~ //Ochre Jelly
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpwdasgt~ #8 // Race (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~jugjer01.cre~ ~override~ //Jermien
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART01~ #20 #0 #0 ~NONE~ ~WEAPON2~ EQUIP
  END
BUT_ONLY

COPY_EXISTING ~kamir.cre~ ~override~ //Kamir
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 73 // CurrHP (was 63)
    WRITE_SHORT 0x26 73 // MaxHP (was 63)
    // WRITE_BYTE 0x6e 2 // Unu0(Large swords prof) (was 1)
    // WRITE_BYTE 0x6f 2 // Unu1(Small swords prof) (was 1)
    // WRITE_BYTE 0x74 2 // Unu6(Axe prof) (was 0)
    WRITE_ASCII 0x268 ~palad10~ #8 // Default (was NONE)
    ADD_MEMORIZED_SPELL ~sppr101~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr108~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~sppr109~ #0 ~priest~
    ADD_MEMORIZED_SPELL ~spcl211~ #0 ~innate~ (2)
    ADD_MEMORIZED_SPELL ~spcl213~ #0 ~innate~ (6)
    REPLACE_CRE_ITEM ~AX1H04~ #6 #0 #0 ~NONE~ ~WEAPON2~
    REPLACE_CRE_ITEM ~HELM12~ #0 #0 #0 ~NONE~ ~HELMET~
  END
BUT_ONLY

COPY_EXISTING ~korscroo.cre~ ~override~ //Scrooloose
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 25 // DtectIll (was 0)
    WRITE_BYTE 0x68 40 // Stealth (was 0)
    WRITE_BYTE 0x235 8 // HighestLevelSecond (was 1)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~kruin.cre~ ~override~ //Kruin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpmage8~ #8 // Class (was GPUSE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY


COPY_EXISTING ~liia.cre~ ~override~ //Liia Jannath
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~lissa.cre~ ~override~ //Lissa
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpprie6c~ #8 // Race (was NONE)
    WRITE_ASCII 0x260 ~bpmage6~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~loutm02.cre~ ~override~ //Mercenary of Riatvin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 48 // CurrHP (was 28)
    WRITE_SHORT 0x26 48 // MaxHP (was 28)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART01~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~lyros.cre~ ~override~ //Xzar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x34 ~xzars~ #8 // SmallPortrait (was NONE)
    WRITE_ASCII 0x258 ~bpmag12e~ #8 // Race (was NONE)
    WRITE_ASCII 0x260 ~bp!plot~ #8 // General (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~majan.cre~ ~override~ //Ma Jansen
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpprie6c~ #8 // Class (was NONE)
    WRITE_ASCII 0x258 ~bpmag10a~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~mdk2doc.cre~ ~override~ //Doc 'cheezy' Hawkins
              ~mdk2max.cre~ ~override~ //Arny Max
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpmag14m~ #8 // Race (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~mdk2kurt.cre~ ~override~ //The Infamous Kurt
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpmag14m~ #8 // Default (was )
  END
BUT_ONLY

COPY_EXISTING ~mdrak.cre~ ~override~ //Maharajah
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpmag14m~ #8 // Class (was )
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~mekrat.cre~ ~override~ //Mekrath
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DART02~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~merinia.cre~ ~override~ //Meronia
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bp!bard~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~meronia.cre~ ~override~ //Meronia
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bp!bard~ #8 // Race (was USEITEM)
  END
BUT_ONLY

COPY_EXISTING ~mgappr01.cre~ ~override~ //Larz
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bpwdasgt~ #8 // General (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~mgass03.cre~ ~override~ //Vilhelm
              ~obssol01.cre~ ~override~ //Reyna
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~mgbill01.cre~ ~override~ //William 'Bill' Williamson
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    REPLACE_CRE_ITEM ~DAGG02~ #0 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~DAGG25~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~mgkhol01.cre~ ~override~ //Khollynnus Paac
              ~mgteos01.cre~ ~override~ //Teos
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    REPLACE_CRE_ITEM ~DAGG16~ #20 #0 #0 ~NONE~ ~WEAPON1~ EQUIP
    REPLACE_CRE_ITEM ~DAGG03~ #0 #0 #0 ~NONE~ ~WEAPON2~
    SET_BG2_PROFICIENCY ~PROFICIENCYDAGGER~ 1
  END
BUT_ONLY

COPY_EXISTING ~nalbarg.cre~ ~override~ //Barg
              ~plmetr01.cre~ ~override~ //Baron Metrich
              ~pwauk1.cre~ ~override~ //Counter Carravis
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~nalin.cre~ ~override~ //Nalin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~neb.cre~ ~override~ //Neb
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 75 // DtectIll (was 0)
    WRITE_BYTE 0x68 80 // Stealth (was 30)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was NONE)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (4)
  END
BUT_ONLY


COPY_EXISTING ~pace.cre~ ~override~ //Pace
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~~ #8 // Class (was THIEFRG)
    WRITE_ASCII 0x258 ~~ #8 // Race (was USEITEM)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin486~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~palern.cre~ ~override~ //Palern Flynn
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 56 // CurrHP (was 10)
    WRITE_SHORT 0x26 56 // MaxHP (was 10)
    WRITE_BYTE 0x64 45 // DtectIll (was 0)
    WRITE_BYTE 0x68 65 // Stealth (was 0)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was NONE)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (3)
  END
BUT_ONLY

COPY_EXISTING ~pardru.cre~ ~override~ //Sorsha
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~~ #8 // Override (was GPUSE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~parmonk.cre~ ~override~ //Mahar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x46 ~-2~ // ACNatul (was 4)
    WRITE_SHORT 0x48 ~-2~ // ACEffec (was 10)
    WRITE_BYTE 0x5d 51 // RstMagc (was 3)
    WRITE_BYTE 0x234 17 // HighestLevelPrimary (was 12)
    WRITE_ASCII 0x250 ~~ #8 // Class (was GPUSE)
    WRITE_ASCII 0x268 ~bpcmnk2b~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spcl811~ #0 ~innate~ (5)
    ADD_MEMORIZED_SPELL ~spcl815~ #0 ~innate~ (4)
    ADD_MEMORIZED_SPELL ~spcl820~ #0 ~innate~
    ADD_MEMORIZED_SPELL ~spcl907~ #0 ~innate~
    REPLACE_CRE_ITEM ~DAGG26~ #20 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~parthf.cre~ ~override~ //Alnarow
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x64 50 // DtectIll (was 0)
    WRITE_ASCII 0x250 ~~ #8 // Class (was GPUSE)
    WRITE_ASCII 0x258 ~~ #8 // Race (was THIEF14T)
    WRITE_ASCII 0x260 ~~ #8 // General (was WTASIGHT)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was NONE)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (4)
  END
BUT_ONLY

COPY_EXISTING ~pettin.cre~ ~override~ //Ettin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x272 142 // IDSRace (was 1)
    REPLACE_CRE_ITEM ~BOULDER~ #8 #0 #0 ~NONE~ ~WEAPON2~
    SET_BG2_PROFICIENCY ~PROFICIENCYSPEAR~ 2
  END
BUT_ONLY

COPY_EXISTING ~plfarm04.cre~ ~override~ //Brunson
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~planevil.cre~ ~override~ //Fallen Planetar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #63513 // LongName (was 63511)
    WRITE_ASCII 0x248 ~planevil~ #8 // Override (was PLANGOOD)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REMOVE_MEMORIZED_SPELL ~sppr710~
    ADD_MEMORIZED_SPELL ~sppr715~ #6 ~priest~ (3)
  END
BUT_ONLY

COPY_EXISTING ~plangood.cre~ ~override~ //Planetar
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #63490 // LongName (was 63489)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x271 5 // IDSGeneral (was 255)
    WRITE_BYTE 0x273 3 // IDSClass (was 255)
    READ_LONG 0x2c4 effects_offset
    READ_LONG 0x2c8 effects_num
    FOR( cnt=0; cnt<effects_num; cnt=cnt+1) BEGIN
      READ_LONG (effects_offset+cnt*0x108+8) type
      PATCH_IF type=98 BEGIN
        WRITE_LONG (effects_offset+cnt*0x108+20) 2
      END
    END
  END
BUT_ONLY

COPY_EXISTING ~pudden01.cre~ ~override~ //Dense Pudding
              ~pudden02.cre~ ~override~ //Dense Pudding
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #68586 // LongName (was 68585)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~pwyvv01.cre~ ~override~ //Wyvern
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_ASCII 0x248 ~~ #8 //no shouts for thralls
    WRITE_ASCII 0x268 ~bpwdasgt~ #8
  END
BUT_ONLY

COPY_EXISTING ~quatar.cre~ ~override~ //Quataris
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpwdasgt~ #8 // Class (was WTASIGHT)
  END
BUT_ONLY

ACTION_IF FILE_EXISTS_IN_GAME ~ragefa.cre~ BEGIN // Doesn't exist in BG2EE
  COPY_EXISTING ~ragefa.cre~ ~override~ //Ragefast
    PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
      WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    END
  BUT_ONLY
END


COPY_EXISTING ~rakmah01.cre~ ~override~ //Maharajah
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_BYTE 0x6f 2 // Unu1(Small swords prof) (was 0)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~rakruh01.cre~ ~override~ //Ruhk
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    WRITE_BYTE 0x272 128 // IDSRace (was 255)
  END
BUT_ONLY

COPY_EXISTING ~rigen02.cre~ ~override~ //Tamorlin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~rock.cre~ ~override~ //Rock
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #68588 // LongName (was 68587)
    WRITE_ASCII 0x268 ~bpcfig2a~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~rylock.cre~ ~override~ //Rylock
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~bp!bard~ #8 // General (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~BOW03~ #0 #0 #0 ~NONE~ ~WEAPON2~
    REPLACE_CRE_ITEM ~AROW01~ #40 #0 #0 ~NONE~ ~QUIVER1~
  END
BUT_ONLY

COPY_EXISTING ~saerk.cre~ ~override~ //Saerk Farrahd
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpleader~ #8 // Class (was USEITEM)
    WRITE_ASCII 0x260 ~bpmag12e~ #8 // General (was NONE)
    REMOVE_MEMORIZED_SPELL ~sppr511~
    REMOVE_MEMORIZED_SPELL ~sppr603~
    ADD_MEMORIZED_SPELL ~sppr599~ #4 ~priest~
    ADD_MEMORIZED_SPELL ~sppr698~ #5 ~priest~
  END
BUT_ONLY

COPY_EXISTING ~schlum.cre~ ~override~ //Schlumpsha the Sewer King
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~sensmsp2.cre~ ~override~ //Orog
              ~wish01.cre~ ~override~ //Dao
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_BYTE 0x6e 2 // Unu0(Large swords prof) (was 0)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    SET_BG2_PROFICIENCY ~PROFICIENCYTWOHANDEDSWORD~ 2
  END
BUT_ONLY

COPY_EXISTING ~sevdru01.cre~ ~override~ //Alatelo De Bonito
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~bpwdasgt~ #8 // Class (was WTASIGHT)
    WRITE_ASCII 0x268 ~~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~slandor.cre~ ~override~ //Andorian
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 100 // CurrHP (was 10)
    // WRITE_BYTE 0x74 3 // Unu6(Axe prof) (was 0)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    SET_BG2_PROFICIENCY ~PROFICIENCYAXE~ 3
  END
BUT_ONLY

COPY_EXISTING ~slayer.cre~ ~override~ //Slayer
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x268 ~cbwtasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~slifis01.cre~ ~override~ //Fission Slime
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // SAY NAME1 #2310 // LongName (was 71077)
    WRITE_ASCII 0x248 ~jellspa~ #8 // Override (was SLIFIS01)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
    WRITE_ASCII 0x280 ~jellspa~ #32 // DeathVariable (was SLIFIS01)
  END
BUT_ONLY

COPY_EXISTING ~smound01.cre~ ~override~ //Shambling Mound
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_LONG 0x18 820 // PowerLevel (was 250)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~spidwr01.cre~ ~override~ //Wraith Spider
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 37 // CurrHP (was 27)
    WRITE_SHORT 0x26 37 // MaxHP (was 27)
  END
BUT_ONLY

COPY_EXISTING ~sppain.cre~ ~override~ //Pai'Na
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bppri12c~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~stein.cre~ ~override~ //Stein
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x68 60 // Stealth (was 0)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTARSGT)
    ADD_MEMORIZED_SPELL ~spin483~ #0 ~innate~ (2)
  END
BUT_ONLY

COPY_EXISTING ~tarnor.cre~ ~override~ //Tarnor the Hatchetman
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x53 8 // NOAtt (was 1)
    WRITE_ASCII 0x250 ~enemy~ #8 // Class (was SHOUT)
    WRITE_ASCII 0x258 ~shout~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~tasloi01.cre~ ~override~ //Tasloi
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 12 // CurrHP (was 8)
    WRITE_SHORT 0x26 12 // MaxHP (was 8)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~temsup.cre~ ~override~ //Overgold Renwellyn
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    // WRITE_BYTE 0x2c 0 // MetalColour (was 226)
    // WRITE_BYTE 0x2f 0 // SkinColour (was 201)
    // WRITE_BYTE 0x30 0 // LeatherColour (was 228)
    // WRITE_BYTE 0x31 0 // ArmorColour (was 226)
    WRITE_ASCII 0x258 ~bp!plot~ #8 // Race (was NONE)
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~termer01.cre~ ~override~ //Mercenary
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~~ #8 // Race (was GPUSE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~termer04.cre~ ~override~ //Mercenary
  LAUNCH_PATCH_FUNCTION FJ_CRE_VALIDITY RET vl = valid END
  PATCH_IF vl BEGIN
    WRITE_BYTE 0x64 25 // DtectIll (was 0)
    WRITE_ASCII 0x258 ~~ #8 // Race (was GPUSE)
    WRITE_ASCII 0x268 ~bpthief~ #8 // Default (was WTASIGHT)
    ADD_MEMORIZED_SPELL ~spin486~ #0 ~innate~ (3)
    ADD_MEMORIZED_SPELL ~spcl423~ #0 ~innate~ (3)
  END
BUT_ONLY

COPY_EXISTING ~ttspid.cre~ ~override~ //Wraith Spider
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x24 47 // CurrHP (was 17)
    WRITE_SHORT 0x26 47 // MaxHP (was 17)
    WRITE_BYTE 0x53 3 // NOAtt (was 1)
    WRITE_BYTE 0x238 20 // Str (was 14)
    WRITE_BYTE 0x23c 22 // Dex (was 9)
    WRITE_BYTE 0x23d 19 // Con (was 9)
  END
BUT_ONLY

COPY_EXISTING ~udimp.cre~ ~override~ //Imp
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~mage2~ #8 // Class (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~udsimyaz.cre~ ~override~ //Simyaz
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x248 ~bp!plot~ #8 // Override (was GPDIE)
  END
BUT_ONLY

COPY_EXISTING ~udsvir01.cre~ ~override~ //Odendal Breachgnome
              ~udsvir02.cre~ ~override~ //Svirfneblin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x53 2 // NOAtt (was 1)
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
  END
BUT_ONLY

COPY_EXISTING ~udsvir03.cre~ ~override~ //Goldander Blackenrock
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
    REPLACE_CRE_ITEM ~DAGG04~ #0 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~udsvir07.cre~ ~override~ //Svirfneblin
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_BYTE 0x272 6 // IDSRace (was 4)
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
  END
BUT_ONLY

COPY_EXISTING ~udsvir08.cre~ ~override~ //Svirfneblin Leader
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~gpshout~ #8 // Class (was )
    WRITE_ASCII 0x258 ~udsvir08~ #8 // Race (was GPSHOUT)
    WRITE_ASCII 0x260 ~bpleader~ #8 // General (was UDSVIR08)
    WRITE_BYTE 0x272 6 // IDSRace (was 4)
    WRITE_BYTE 0x274 5 // IDSSpecifc (was 2)
  END
BUT_ONLY

COPY_EXISTING ~udtrap01.cre~ ~override~ //Madman Aganalo
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x46 0 // ACNatul (was 10)
    WRITE_SHORT 0x48 0 // ACEffec (was 10)
    WRITE_BYTE 0x53 2 // NOAtt (was 1)
    WRITE_BYTE 0x238 19 // Str (was 9)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~udtrap02.cre~ ~override~ //Raevilin Strathi
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_SHORT 0x48 4 // ACEffec (was 10)
    WRITE_ASCII 0x268 ~wgarsgt~ #8 // Default (was WTASIGHT)
    REPLACE_CRE_ITEM ~DART01~ #30 #0 #0 ~NONE~ ~WEAPON2~
  END
BUT_ONLY

COPY_EXISTING ~udtrap04.cre~ ~override~ //Alchra Diagott
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x260 ~wgarsgt~ #8 // General (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~uhmer01.cre~ ~override~ //Elence Fielding
              ~uhmer03.cre~ ~override~ //Beherant Diir
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bp!plot~ #8 // Race (was NONE)
  END
BUT_ONLY

COPY_EXISTING ~uhmer02.cre~ ~override~ //Min Minling
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bp!plot~ #8 // Race (was NONE)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY

COPY_EXISTING ~vaelag.cre~ ~override~ //Vaelag
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x258 ~bpprie6c~ #8 // Race (was NONE)
  END
BUT_ONLY

ACTION_IF FILE_EXISTS_IN_GAME ~voltin.cre~ BEGIN
  COPY_EXISTING ~voltin.cre~ ~override~ //Voltine
    PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
      WRITE_ASCII 0x268 ~wgarsgt~ #8 // Default (was WTASIGHT)
    END
  BUT_ONLY
END

COPY_EXISTING ~winthr3.cre~ ~override~ //Winthrop
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    SAY NAME1 #16888 // LongName (~Winthrop~)
    SAY NAME2 #16888 // ShortName (~Winthrop~)
    WRITE_ASCII 0x268 ~bpwdasgt~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY


COPY_EXISTING ~yusef.cre~ ~override~ //Yusef
  PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN
    WRITE_ASCII 0x250 ~~ #8 // Class (was GPUSE)
    WRITE_ASCII 0x268 ~wbasight~ #8 // Default (was WTASIGHT)
  END
BUT_ONLY


END



////////////////////////////////////////////////////////////////////////////////////////////////////
DEFINE_ACTION_FUNCTION bp_generic_encounters BEGIN



EXTEND_BOTTOM ~ar0204.bcs~ ~bp/snip/bar0204.baf~
EXTEND_BOTTOM ~ar0801.bcs~ ~bp/snip/bar0801.baf~
EXTEND_BOTTOM ~ar0803.bcs~ ~bp/snip/bar0803.baf~

///////////////////////////////////////////////////////////

COPY_EXISTING ~ar0809.bcs~ ~override~
  REPLACE_TEXTUALLY ~bp/SNIP/oAR0809.baf~  ~bp/SNIP/nAR0809.baf~
BUT_ONLY


ACTION_IF FILE_EXISTS_IN_GAME ~ar0309.bcs~ BEGIN
  EXTEND_TOP ~ar0309.bcs~ ~bp/snip/tar0309.baf~
END ELSE BEGIN
  COPY ~bp/snip/ar0309.bcs~ ~override~
END

ACTION_IF FILE_EXISTS_IN_GAME ~ar2101.bcs~ BEGIN
  EXTEND_BOTTOM ~ar2101.bcs~ ~bp/snip/bar2101.baf~
END ELSE BEGIN
  COPY ~bp/snip/ar2101.bcs~ ~override~
END
COPY_EXISTING ~sharkamb.bcs~ ~override~
  REPLACE_TEXTUALLY ~bp/SNIP/oSHARKAM.baf~  ~bp/SNIP/nSHARKAM.baf~
BUT_ONLY




COPY_EXISTING ~icfungus.bcs~ ~override~
  DECOMPILE_BCS_TO_BAF
    REPLACE_TEXTUALLY ~Delay(10)~  ~Delay(8)~
    REPLACE_TEXTUALLY ~Delay(20)~  ~Delay(16)~
  COMPILE_BAF_TO_BCS
BUT_ONLY

COPY_EXISTING ~kensai.bcs~ ~override~
  REPLACE_TEXTUALLY ~bp/SNIP/oKENSAI.baf~   ~bp/SNIP/nKENSAI.baf~
BUT_ONLY

ACTION_IF FILE_EXISTS_IN_GAME ~killgood.bcs~ BEGIN // Not present in BG2EE
  COPY_EXISTING ~killgood.bcs~ ~override~
    DECOMPILE_BCS_TO_BAF
      REPLACE_TEXTUALLY ~ChangeAIScript("DEATHKNI",OVERRIDE)~ ~ChangeAIScript("DEATHM",OVERRIDE)~
    COMPILE_BAF_TO_BCS
  BUT_ONLY
END

EXTEND_TOP ~mercwand.bcs~ ~bp/snip/tmercwan.baf~

EXTEND_BOTTOM ~rayic.bcs~ ~bp/snip/brayic.baf~

COPY_EXISTING ~shalt01.bcs~ ~override~
  DECOMPILE_BCS_TO_BAF
    REPLACE_TEXTUALLY ~Delay(18)~ ~Delay(9)~
  COMPILE_BAF_TO_BCS
BUT_ONLY


///////////////////END OF SCRIPTS///////////////////////////////////




END

