[VERSN2]

// unlocks memory files
unlock_memory all

// fix the tpk block corruption fuckery caused by the cancerous shit known as nfs texed (seriously what the fuck)
if collection_exists GLOBAL\DYNTEX.BIN TPKBlocks DEFAULT
do
update_collection GLOBAL\DYNTEX.BIN TPKBlocks DEFAULT CollectionName DYNAMICTEXTURES
update_collection GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES CompressionType CompressedByParts
else
end

if collection_exists GLOBAL\GLOBALA.BUN TPKBlocks DEFAULT
do
update_collection GLOBAL\GLOBALA.BUN TPKBlocks DEFAULT CollectionName GLOBALMESSAGETEXTURES
update_collection GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks DEFAULT
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks DEFAULT CollectionName GLOBALTEXTURES
update_collection GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks TPK1
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks TPK1 CollectionName FLARETEXTURES
update_collection GLOBAL\GLOBALB.LZC TPKBlocks FLARETEXTURES CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks TPK2
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks TPK2 CollectionName GLOBALTEXTURESPC
update_collection GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURESPC CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks TPK3
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks TPK3 CollectionName EMITTER_SYSTEM_TEXTURE_PAGE
update_collection GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_TEXTURE_PAGE CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks TPK4
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks TPK4 CollectionName EMITTER_SYSTEM_NORMALMAPS_PAGE
update_collection GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_PAGE CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_P
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_P CollectionName EMITTER_SYSTEM_NORMALMAPS_PAGE
update_collection GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_PAGE CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\GLOBALB.LZC TPKBlocks TPK5
do
update_collection GLOBAL\GLOBALB.LZC TPKBlocks TPK5 CollectionName FLARE_TEXTURE_PAGE
update_collection GLOBAL\GLOBALB.LZC TPKBlocks FLARE_TEXTURE_PAGE CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\INGAMEA.BUN TPKBlocks DEFAULT
do
update_collection GLOBAL\INGAMEA.BUN TPKBlocks DEFAULT CollectionName INGAMETEXTURES
update_collection GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\INGAMEA.BUN TPKBlocks TPK1
do
update_collection GLOBAL\INGAMEA.BUN TPKBlocks TPK1 CollectionName INGAMETEXTURESPC
update_collection GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURESPC CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\INGAMEA.BUN TPKBlocks TPK2
do
update_collection GLOBAL\INGAMEA.BUN TPKBlocks TPK2 CollectionName HUDTEXTURESGLOBAL
update_collection GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL CompressionType RawDecompressed
else
end

if collection_exists GLOBAL\WMDYNTEX.BIN TPKBlocks DEFAULT
do
update_collection GLOBAL\WMDYNTEX.BIN TPKBlocks DEFAULT CollectionName WORLDMAPDYNAMICTEXTURES
else
end

if collection_exists FRONTEND\FRONTB1.LZC TPKBlocks DEFAULT
do
update_collection FRONTEND\FRONTB1.LZC TPKBlocks DEFAULT CollectionName FRONTENDTEXTURES
update_collection FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES CompressionType RawDecompressed
else
end

if collection_exists FRONTEND\FRONTB1.LZC TPKBlocks TPK1
do
update_collection FRONTEND\FRONTB1.LZC TPKBlocks TPK1 CollectionName FRONTENDTEXTURESPC
update_collection FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURESPC CompressionType RawDecompressed
else
end

if collection_exists TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks DEFAULT
do
update_collection TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks DEFAULT CollectionName MINI_MAP_CASINOTOWN_LOCKED
update_collection TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED CompressionType CompressedByParts
else
end

if collection_exists TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks DEFAULT
do
update_collection TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks DEFAULT CollectionName MINI_MAP_CASINOTOWN_UNLOCKED
update_collection TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED CompressionType CompressedByParts
else
end

if collection_exists TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks DEFAULT
do
update_collection TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks DEFAULT CollectionName TRACKMAPS
update_collection TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS CompressionType CompressedByParts
else
end

    combobox "English" "Russian" "Others (Polish, Spanish, etc...)" "Select your game's language"
    {
        "English"
        {
// install English fonts
move_file override relative absolute textures\LANGUAGE\ENG\BUNS\FRONTB2.BUN FRONTEND\FRONTB2.BUN
move_file override relative absolute textures\LANGUAGE\ENG\BUNS\GLOBALA.BUN GLOBAL\GLOBALA.BUN
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\LANGUAGE\ENG"
        }
        "Russian"
        {
// install Russian fonts
move_file override relative absolute textures\LANGUAGE\RUS\BUNS\FRONTB2.BUN FRONTEND\FRONTB2.BUN
move_file override relative absolute textures\LANGUAGE\RUS\BUNS\GLOBALA.BUN GLOBAL\GLOBALA.BUN
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\LANGUAGE\RUS"
        }
        "Others (Polish, Spanish, etc...)"
        {
// install English fonts cuz they work for other languages too
move_file override relative absolute textures\LANGUAGE\ENG\BUNS\FRONTB2.BUN FRONTEND\FRONTB2.BUN
move_file override relative absolute textures\LANGUAGE\ENG\BUNS\GLOBALA.BUN GLOBAL\GLOBALA.BUN
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\LANGUAGE\ENG"
        }
    }
    end

    combobox "Vanilla Carbon (Unmodded)" "Carbon Battle Royale (CBR)" "World To Carbon (W2C)" "Carbon Porsche Unleashed (CPU)" "Select your base game"
    {
        "Vanilla Carbon (Unmodded)"
        {

// replace DYNTEX.BIN textures
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES"
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES_AFTERMARKET"

// replace GLOBALA.BUN textures
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\GLOBALA\GLOBALMESSAGETEXTURES"

// replace GLOBALB.LZC textures
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "textures\GLOBALB\GLOBALTEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURESPC "textures\GLOBALB\GLOBALTEXTURESPC"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_TEXTURE_PAGE "textures\GLOBALB\EMITTER_SYSTEM_TEXTURE_PAGE"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_PAGE "textures\GLOBALB\EMITTER_SYSTEM_NORMALMAPS_PAGE"

// replace INGAMEA.BUN textures
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "textures\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURESPC "textures\INGAMEA\INGAMETEXTURESPC"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "textures\INGAMEA\HUDTEXTURESGLOBAL"

// replace WMDYNTEX.BIN textures
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x1F554350 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x26207F72 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3B9D221E "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3C4A32A7 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x548295C4 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x67CF5ACC "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6B60C4C9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6D45AB77 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x82B3EA1F "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x9FFFC8F0 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_BUSHIDO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA2A46542 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA99699B3 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xAE17AFD9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC3964BB5 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC5DE7881 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xCFCFDF34 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xDBAB8D16 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"

// replace FRONTB1.LZC textures
bind_textures synchronize FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "textures\FRONTB1\FRONTENDTEXTURES"

// replace MINI_MAP_CASINOTOWN_LOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_LOCKED"

// replace MINI_MAP_CASINOTOWN_UNLOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED"

// replace TRACKMAPS.BIN textures
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS"

// Modern Palmont license plate
checkbox "Do you want to install modern Palmont license plate?"
enabled
bind_textures override GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\licenseplate"
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 BiasLevel 1
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ClassKey 2310797402
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 RenderingOrder 4
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 TileableUV NONE
bind_textures override FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "bonus\licenseplate"
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_SRCCOPY
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_PUNCHTHRU
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 BiasLevel 1
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ClassKey 1741775
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 RenderingOrder 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 TileableUV NONE
disabled
end

// NFS 2015 minimap
checkbox "Do you want to install NFS 2015 Style Minimap?"
enabled
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "bonus\2015minimap\L5RA\MINI_MAP_CASINOTOWN_LOCKED"
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "bonus\2015minimap\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "bonus\2015minimap\INGAMEA\HUDTEXTURESGLOBAL"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\2015minimap\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "bonus\2015minimap\GLOBALB\GLOBALTEXTURES"
disabled
end

// map calibration (Vanilla)
import override GLOBAL\GLOBALB.LZC FNGroups fng\vanilla\WORLDMAPMAIN.bin
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetX 105
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetY -4150
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationWidth 6300

// replace stream textures
unpack_stream TRACKS\L5RA.BUN TRACKS\STREAML5RA.BUN TRACKS\_TEMP350
new negate TRACKS\_TEMP350\Y0\DATA.BIN
replace_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK6 0x55F0FE03 "textures\STREAML5RA\SFX_TRACKBARRIERNEONARROW_SOLID_01_D.dds"
replace_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 "textures\STREAML5RA\SFX_TRACKBARRIERNEONARROW_01_D.dds"
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollTimestep -1024
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollSpeedT 1024
delete TRACKS\_TEMP350\Y0\DATA.BIN

// 60FPS Barriers
checkbox "Use 60FPS Barrier Animation?"
enabled
new negate TRACKS\_TEMP350\Y0\DATA.BIN
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollType TEXSCROLL_SMOOTH
delete TRACKS\_TEMP350\Y0\DATA.BIN
disabled
new negate TRACKS\_TEMP350\Y0\DATA.BIN
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollType TEXSCROLL_SNAP
delete TRACKS\_TEMP350\Y0\DATA.BIN
end

// pack the stream file and delete the temp folder
pack_stream TRACKS\L5RA.BUN TRACKS\STREAML5RA.BUN TRACKS\_TEMP350
erase_folder absolute TRACKS\_TEMP350

        }
        "Carbon Battle Royale (CBR)"
        {

// replace DYNTEX.BIN textures
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES"
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES_AFTERMARKET"

// replace GLOBALA.BUN textures
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\GLOBALA\GLOBALMESSAGETEXTURES"

// replace GLOBALB.LZC textures
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "textures\GLOBALB\GLOBALTEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURESPC "textures\GLOBALB\GLOBALTEXTURESPC"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_TEXTURE_PAGE "textures\GLOBALB\EMITTER_SYSTEM_TEXTURE_PAGE"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks EMITTER_SYSTEM_NORMALMAPS_PAGE "textures\GLOBALB\EMITTER_SYSTEM_NORMALMAPS_PAGE"

// replace INGAMEA.BUN textures
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "textures\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURESPC "textures\INGAMEA\INGAMETEXTURESPC"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "textures\INGAMEA\HUDTEXTURESGLOBAL"

// replace WMDYNTEX.BIN textures
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x1F554350 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x26207F72 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3B9D221E "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3C4A32A7 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x548295C4 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x67CF5ACC "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6B60C4C9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6D45AB77 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x82B3EA1F "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x9FFFC8F0 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_BUSHIDO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA2A46542 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA99699B3 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xAE17AFD9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC3964BB5 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC5DE7881 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xCFCFDF34 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xDBAB8D16 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"

// replace FRONTB1.LZC textures
bind_textures synchronize FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "textures\FRONTB1\FRONTENDTEXTURES"

// replace MINI_MAP_CASINOTOWN_LOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_LOCKED"

// replace MINI_MAP_CASINOTOWN_UNLOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED"

// replace TRACKMAPS.BIN textures
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS"
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS_CBR"

// Modern Palmont license plate
checkbox "Do you want to install modern Palmont license plate?"
enabled
bind_textures override GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\licenseplate"
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 BiasLevel 1
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ClassKey 2310797402
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 RenderingOrder 4
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 TileableUV NONE
bind_textures override FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "bonus\licenseplate"
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_SRCCOPY
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_PUNCHTHRU
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 BiasLevel 1
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ClassKey 1741775
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 RenderingOrder 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 TileableUV NONE
disabled
end

// NFS 2015 minimap
checkbox "Do you want to install NFS 2015 Style Minimap?"
enabled
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "bonus\2015minimap\L5RA\MINI_MAP_CASINOTOWN_LOCKED"
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "bonus\2015minimap\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "bonus\2015minimap\INGAMEA\HUDTEXTURESGLOBAL"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\2015minimap\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "bonus\2015minimap\GLOBALB\GLOBALTEXTURES"
disabled
end

// map calibration (Vanilla)
import override GLOBAL\GLOBALB.LZC FNGroups fng\vanilla\WORLDMAPMAIN.bin
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetX 105
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetY -4150
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationWidth 6300

// replace stream textures
unpack_stream TRACKS\L5RA.BUN TRACKS\STREAML5RA.BUN TRACKS\_TEMP350
new negate TRACKS\_TEMP350\Y0\DATA.BIN
replace_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK6 0x55F0FE03 "textures\STREAML5RA\SFX_TRACKBARRIERNEONARROW_SOLID_01_D.dds"
replace_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 "textures\STREAML5RA\SFX_TRACKBARRIERNEONARROW_01_D.dds"
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollTimestep -1024
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollSpeedT 1024
delete TRACKS\_TEMP350\Y0\DATA.BIN

// 60FPS Barriers
checkbox "Use 60FPS Barrier Animation?"
enabled
new negate TRACKS\_TEMP350\Y0\DATA.BIN
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollType TEXSCROLL_SMOOTH
delete TRACKS\_TEMP350\Y0\DATA.BIN
disabled
new negate TRACKS\_TEMP350\Y0\DATA.BIN
update_texture TRACKS\_TEMP350\Y0\DATA.BIN TPKBlocks TPK1 0xABEEC0C9 ScrollType TEXSCROLL_SNAP
delete TRACKS\_TEMP350\Y0\DATA.BIN
end

// pack the stream file and delete the temp folder
pack_stream TRACKS\L5RA.BUN TRACKS\STREAML5RA.BUN TRACKS\_TEMP350
erase_folder absolute TRACKS\_TEMP350

        }
        "World To Carbon (W2C)"
        {

// replace DYNTEX.BIN textures
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES"
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES_AFTERMARKET"

// replace GLOBALA.BUN textures
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\GLOBALA\GLOBALMESSAGETEXTURES"

// replace GLOBALB.LZC textures
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "textures\GLOBALB\GLOBALTEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURESPC "textures\GLOBALB\GLOBALTEXTURESPC"

// replace INGAMEA.BUN textures
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "textures\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURESPC "textures\INGAMEA\INGAMETEXTURESPC"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "textures\INGAMEA\HUDTEXTURESGLOBAL"

// replace WMDYNTEX.BIN textures
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x1F554350 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x26207F72 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3B9D221E "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3C4A32A7 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x548295C4 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x67CF5ACC "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6B60C4C9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6D45AB77 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x82B3EA1F "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x9FFFC8F0 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_BUSHIDO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA2A46542 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA99699B3 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xAE17AFD9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC3964BB5 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC5DE7881 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xCFCFDF34 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xDBAB8D16 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"

// replace FRONTB1.LZC textures
bind_textures synchronize FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "textures\FRONTB1\FRONTENDTEXTURES"

// replace MINI_MAP_CASINOTOWN_LOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_LOCKED_W2C"

// replace MINI_MAP_CASINOTOWN_UNLOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED_W2C"

// replace TRACKMAPS.BIN textures
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS"
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS_W2C"

// Modern Palmont license plate
checkbox "Do you want to install modern Palmont license plate?"
enabled
bind_textures override GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\licenseplate"
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 BiasLevel 1
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ClassKey 2310797402
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 RenderingOrder 4
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 TileableUV NONE
bind_textures override FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "bonus\licenseplate"
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_SRCCOPY
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_PUNCHTHRU
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 BiasLevel 1
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ClassKey 1741775
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 RenderingOrder 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 TileableUV NONE
disabled
end

// map calibration (W2C)
import override GLOBAL\GLOBALB.LZC FNGroups fng\w2c\WORLDMAPMAIN.bin
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetX -690
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetY -7400
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationWidth 12000

        }
        "Carbon Porsche Unleashed (CPU)"
        {

// replace DYNTEX.BIN textures
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES_CPU"
bind_textures synchronize GLOBAL\DYNTEX.BIN TPKBlocks DYNAMICTEXTURES "textures\DYNTEX\DYNAMICTEXTURES_AFTERMARKET"

// replace GLOBALA.BUN textures
bind_textures synchronize GLOBAL\GLOBALA.BUN TPKBlocks GLOBALMESSAGETEXTURES "textures\GLOBALA\GLOBALMESSAGETEXTURES"

// replace GLOBALB.LZC textures
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "textures\GLOBALB\GLOBALTEXTURES"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES "textures\GLOBALB\GLOBALTEXTURES_CPU"
bind_textures synchronize GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURESPC "textures\GLOBALB\GLOBALTEXTURESPC"

// replace INGAMEA.BUN textures
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "textures\INGAMEA\INGAMETEXTURES"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURESPC "textures\INGAMEA\INGAMETEXTURESPC"
bind_textures synchronize GLOBAL\INGAMEA.BUN TPKBlocks HUDTEXTURESGLOBAL "textures\INGAMEA\HUDTEXTURESGLOBAL"

// replace WMDYNTEX.BIN textures
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x1F554350 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3B9D221E "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x82B3EA1F "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA2A46542 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_SCORPIONS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xA99699B3 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_INFERNO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xAE17AFD9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC5DE7881 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_FORTUNA.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xDBAB8D16 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES\WM_CREW_LOGO_COLIBRIS.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x67CF5ACC "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6B60C4C9 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_ROTOR4.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x15BE728D "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_BUSHIDO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x26207F72 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x3C4A32A7 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x548295C4 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_TFK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x6D45AB77 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_STACKED_DECK.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0x9FFFC8F0 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_BUSHIDO.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xC3964BB5 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_21ST_CENTURY.dds"
replace_texture GLOBAL\WMDYNTEX.BIN TPKBlocks WORLDMAPDYNAMICTEXTURES 0xCFCFDF34 "textures\WMDYNTEX\WORLDMAPDYNAMICTEXTURES_CPU\CREW_LOGO_STACKED_DECK.dds"

// replace FRONTB1.LZC textures
bind_textures synchronize FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "textures\FRONTB1\FRONTENDTEXTURES"
bind_textures synchronize FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "textures\FRONTB1\FRONTENDTEXTURES_CPU"

// replace MINI_MAP_CASINOTOWN_LOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_LOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_LOCKED_W2C"

// replace MINI_MAP_CASINOTOWN_UNLOCKED.BIN textures
bind_textures synchronize TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN TPKBlocks MINI_MAP_CASINOTOWN_UNLOCKED "textures\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED_W2C"

// replace TRACKMAPS.BIN textures
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS"
bind_textures synchronize TRACKS\L5RA\TRACKMAPS.BIN TPKBlocks TRACKMAPS "textures\L5RA\TRACKMAPS_W2C"

// Modern Palmont license plate
checkbox "Do you want to install modern Palmont license plate?"
enabled
bind_textures override GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES "bonus\licenseplate"
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 BiasLevel 1
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ClassKey 2310797402
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 RenderingOrder 4
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture GLOBAL\INGAMEA.BUN TPKBlocks INGAMETEXTURES 0x4C95C6F8 TileableUV NONE
bind_textures override FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES "bonus\licenseplate"
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaBlendType TEXBLEND_SRCCOPY
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 AlphaUsageType TEXUSAGE_PUNCHTHRU
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ApplyAlphaSort 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 BiasLevel 1
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ClassKey 1741775
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 MipmapBiasType TEXBIAS_DEFAULT
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 RenderingOrder 0
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 ScrollType TEXSCROLL_NONE
update_texture FRONTEND\FRONTB1.LZC TPKBlocks FRONTENDTEXTURES 0x4C95C6F8 TileableUV NONE
disabled
end

// map calibration (W2C)
import override GLOBAL\GLOBALB.LZC FNGroups fng\w2c\WORLDMAPMAIN.bin
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetX -690
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationOffsetY -7400
update_collection GLOBAL\GLOBALB.LZC Tracks 5000 TrackMapCalibrationWidth 12000

        }
    }
    end

// stop the added textures from going haywire (Support for CBR, etc...)
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A66 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A66 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A66 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A67 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A67 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A67 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A80 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A80 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A80 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A81 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A81 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A81 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A82 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A82 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A82 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A83 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A83 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A83 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A84 AlphaBlendType TEXBLEND_BLEND
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A84 AlphaUsageType TEXUSAGE_MODULATED
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x4A651A84 TileableUV ALL_SIDES
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x7811C14C AlphaBlendType TEXBLEND_SRCCOPY
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x7811C14C AlphaUsageType TEXUSAGE_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x7811C14C TileableUV NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0x7811C14C ScrollType TEXSCROLL_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA026 AlphaBlendType TEXBLEND_SRCCOPY
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA026 AlphaUsageType TEXUSAGE_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA026 TileableUV NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA027 AlphaBlendType TEXBLEND_SRCCOPY
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA027 AlphaUsageType TEXUSAGE_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA027 TileableUV NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA028 AlphaBlendType TEXBLEND_SRCCOPY
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA028 AlphaUsageType TEXUSAGE_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA028 TileableUV NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA029 AlphaBlendType TEXBLEND_SRCCOPY
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA029 AlphaUsageType TEXUSAGE_NONE
update_texture GLOBAL\GLOBALB.LZC TPKBlocks GLOBALTEXTURES 0xE4CEA029 TileableUV NONE

// create scripts folder if it doesn't exist
if directory_exists absolute scripts
do
else
create_folder absolute scripts
end
// copy Aero_'s .asi in that folder
move_file override relative absolute scripts\NFSCHDContentSupport.asi scripts\NFSCHDContentSupport.asi

// unload files to save ram usage
delete GLOBAL\DYNTEX.BIN
delete GLOBAL\GLOBALA.BUN
delete GLOBAL\GLOBALB.LZC
delete GLOBAL\INGAMEA.BUN
delete GLOBAL\WMDYNTEX.BIN
delete FRONTEND\FRONTB1.LZC
delete TRACKS\L5RA\MINI_MAP_CASINOTOWN_LOCKED.BIN
delete TRACKS\L5RA\MINI_MAP_CASINOTOWN_UNLOCKED.BIN
delete TRACKS\L5RA\TRACKMAPS.BIN

// congratulations, you've scrolled all the way down to the bottom, here's a cookie