commit b677cec1af5d1209617e9a07563b514fd2b6e349 Author: squeek Date: Tue Nov 11 18:32:26 2014 -0800 Initial commit diff --git a/FortressForever.ico b/FortressForever.ico new file mode 100644 index 0000000..2060323 Binary files /dev/null and b/FortressForever.ico differ diff --git a/cfg/civilian.cfg b/cfg/civilian.cfg new file mode 100644 index 0000000..6f08222 --- /dev/null +++ b/cfg/civilian.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any civilian specific commands below this line. \ No newline at end of file diff --git a/cfg/config_default.cfg b/cfg/config_default.cfg new file mode 100644 index 0000000..42d2a90 --- /dev/null +++ b/cfg/config_default.cfg @@ -0,0 +1,70 @@ +// YWB (mailto:yahn@valvesoftware.com) 10/10/03: +// If the user doesn't have a config.cfg when they run, +// this gets executed the first time they run the engine +// It doesn't execute if they have their own config.cfg saved out. +unbindall + +bind "ESCAPE" "cancelselect" +bind "`" "toggleconsole" +bind "~" "toggleconsole" +bind "w" "+forward" +bind "s" "+back" +bind "a" "+moveleft" +bind "d" "+moveright" +bind "SPACE" "+jump" +bind "CTRL" "+duck" +bind "TAB" "+showscores" +bind "e" "+use" +bind "c" "dropitems" +bind "z" "+medengymenu" +bind "r" "+reload" +bind "x" "discard" +bind "h" "+hintcenter" +bind "m" "+mapshot" +bind "k" "+voicerecord" +bind "ALT" "+speed" +bind "y" "say" +bind "u" "say_team" +bind "t" "impulse 201" +bind "SHIFT" "+speed" +bind "MOUSE1" "+attack" +bind "MOUSE2" "+attack2" +bind "ENTER" "+attack" +bind "f" "+gren1" +bind "g" "+gren2" +bind "l" "impulse 100" +bind "0" "slot10" +bind "1" "slot1" +bind "2" "slot2" +bind "3" "slot3" +bind "4" "slot4" +bind "5" "slot5" +bind "6" "slot6" +bind "7" "slot7" +bind "8" "slot8" +bind "9" "slot9" +bind "MWHEELUP" "invprev" +bind "MWHEELDOWN" "invnext" +bind "[" "invprev" +bind "]" "invnext" +bind "q" "lastinv" +bind "F5" "jpeg" +bind "F6" "save quick" +bind "F9" "load quick" +bind "PAUSE" "pause" +bind "b" "changeclass" +bind "n" "changeteam" +bind "." "changeteam" +bind "," "changeclass" +cl_autoreload "1" +cl_classautokill "1" +cl_dynamicblur "0" +cl_dynamicfov "0" +cl_teamcolourhud "1" +cl_cmdrate "66" +cl_updaterate "66" +con_enable 1 +//cl_interp "0.03" + +name "WhenFFwillOut" + diff --git a/cfg/demoman.cfg b/cfg/demoman.cfg new file mode 100644 index 0000000..b106b59 --- /dev/null +++ b/cfg/demoman.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any demoman specific commands below this line. \ No newline at end of file diff --git a/cfg/detail_settings_default.cfg b/cfg/detail_settings_default.cfg new file mode 100644 index 0000000..00c6329 --- /dev/null +++ b/cfg/detail_settings_default.cfg @@ -0,0 +1,6 @@ +cl_detaildist "1200" +cl_detailfade "400" +cl_effectsdetail "1" +lod_Enable "1" +lod_TransitionDist "800" +r_lod "-1" diff --git a/cfg/detail_settings_max.cfg b/cfg/detail_settings_max.cfg new file mode 100644 index 0000000..d4ccf2c --- /dev/null +++ b/cfg/detail_settings_max.cfg @@ -0,0 +1,6 @@ +cl_detaildist "65536" +cl_detailfade "-1" +cl_effectsdetail "2" +lod_Enable "0" +lod_TransitionDist "65536" +r_lod "0" diff --git a/cfg/engineer.cfg b/cfg/engineer.cfg new file mode 100644 index 0000000..c0a136a --- /dev/null +++ b/cfg/engineer.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any engineer specific commands below this line. \ No newline at end of file diff --git a/cfg/ff_dustbowl.cfg b/cfg/ff_dustbowl.cfg new file mode 100644 index 0000000..11f758d --- /dev/null +++ b/cfg/ff_dustbowl.cfg @@ -0,0 +1,4 @@ +echo FF_DUSTBOWL CFG LOADED +mat_autoexposure_max 2.5 +mat_autoexposure_min .25 +mat_bloomscale .5 \ No newline at end of file diff --git a/cfg/ff_hunted.cfg b/cfg/ff_hunted.cfg new file mode 100644 index 0000000..64af693 --- /dev/null +++ b/cfg/ff_hunted.cfg @@ -0,0 +1,2 @@ +echo FF_HUNTED CFG LOADED +sv_alltalk 0 diff --git a/cfg/ff_training.cfg b/cfg/ff_training.cfg new file mode 100644 index 0000000..21ed980 --- /dev/null +++ b/cfg/ff_training.cfg @@ -0,0 +1,3 @@ +echo FF_TRAINING CFG LOADED +mp_timelimit 0 +sv_cheats 0 diff --git a/cfg/hwguy.cfg b/cfg/hwguy.cfg new file mode 100644 index 0000000..a1251b4 --- /dev/null +++ b/cfg/hwguy.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any hwguy specific commands below this line. \ No newline at end of file diff --git a/cfg/medic.cfg b/cfg/medic.cfg new file mode 100644 index 0000000..5f69c55 --- /dev/null +++ b/cfg/medic.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any medic specific commands below this line. \ No newline at end of file diff --git a/cfg/pyro.cfg b/cfg/pyro.cfg new file mode 100644 index 0000000..28d4df6 --- /dev/null +++ b/cfg/pyro.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any pryo specific commands below this line. \ No newline at end of file diff --git a/cfg/scout.cfg b/cfg/scout.cfg new file mode 100644 index 0000000..344b8aa --- /dev/null +++ b/cfg/scout.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any scout specific commands below this line. \ No newline at end of file diff --git a/cfg/settings_default.scr b/cfg/settings_default.scr new file mode 100644 index 0000000..0cd5931 --- /dev/null +++ b/cfg/settings_default.scr @@ -0,0 +1,169 @@ +// NOTE: THIS FILE IS AUTOMATICALLY REGENERATED, +//DO NOT EDIT THIS HEADER, YOUR COMMENTS WILL BE LOST IF YOU DO +// Multiplayer options script +// +// Format: +// Version [float] +// Options description followed by +// Options defaults +// +// Option description syntax: +// +// "cvar" { "Prompt" { type [ type info ] } { default } } +// +// type = +// BOOL (a yes/no toggle) +// STRING +// NUMBER +// LIST +// +// type info: +// BOOL no type info +// NUMBER min max range, use -1 -1 for no limits +// STRING no type info +// LIST delimited list of options value pairs +// +// +// default depends on type +// BOOL is "0" or "1" +// NUMBER is "value" +// STRING is "value" +// LIST is "index", where index "0" is the first element of the list + + +// Half-Life Server Configuration Layout Script (stores last settings chosen, too) +// File generated: Mon Jul 12 05:28:33 PM +// +// +// Cvar - Setting + +VERSION 1.0 + +DESCRIPTION SERVER_OPTIONS +{ + "hostname" + { + "#Valve_Hostname" + { STRING } + { "Fortress Forever" } + } + + "maxplayers" + { + "#Valve_Max_Players" + { NUMBER 1 22 } + { "16" } + } + + "sv_password" + { + "#Valve_Server_Password" + { STRING } + { "" } + } + + "mp_timelimit" + { + "#FF_Timelimit" + { NUMBER 0 -1 } + { "20" } + } + + "mp_friendlyfire" + { + "#Valve_Friendly_Fire" + { BOOL } + { "0" } + } + + "sv_lan" + { + "sv_lan" + { BOOL } + { "0" } + } + + "sv_alltalk" + { + "sv_alltalk" + { BOOL } + { "0" } + } + + "sv_cheats" + { + "sv_cheats" + { BOOL } + { "0" } + } + + "cr_scout" + { + "cr_scout" + { NUMBER -1 -1 } + { "0" } + } + + "cr_sniper" + { + "cr_sniper" + { NUMBER -1 -1 } + { "0" } + } + + "cr_soldier" + { + "cr_soldier" + { NUMBER -1 -1 } + { "0" } + } + + "cr_demoman" + { + "cr_demoman" + { NUMBER -1 -1 } + { "0" } + } + + "cr_medic" + { + "cr_medic" + { NUMBER -1 -1 } + { "0" } + } + + "cr_hwguy" + { + "cr_hwguy" + { NUMBER -1 -1 } + { "0" } + } + + "cr_pyro" + { + "cr_pyro" + { NUMBER -1 -1 } + { "0" } + } + + "cr_spy" + { + "cr_spy" + { NUMBER -1 -1 } + { "0" } + } + + "cr_engineer" + { + "cr_engineer" + { NUMBER -1 -1 } + { "0" } + } + + "cr_civilian" + { + "cr_civilian" + { NUMBER -1 -1 } + { "0" } + } +} diff --git a/cfg/sniper.cfg b/cfg/sniper.cfg new file mode 100644 index 0000000..b99fa81 --- /dev/null +++ b/cfg/sniper.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any sniper specific commands below this line. \ No newline at end of file diff --git a/cfg/soldier.cfg b/cfg/soldier.cfg new file mode 100644 index 0000000..3db328b --- /dev/null +++ b/cfg/soldier.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any soldier specific commands below this line. \ No newline at end of file diff --git a/cfg/spy.cfg b/cfg/spy.cfg new file mode 100644 index 0000000..af68a5e --- /dev/null +++ b/cfg/spy.cfg @@ -0,0 +1,7 @@ +exec userconfig.cfg + // Place any global binds/aliases/scripts into the userconfig.cfg file and specifics into each .cfg +// IMPORTANT: The userconfig.cfg file DOES NOT auto-execute. +// It can only be executed in console with "exec userconfig.cfg" or by the .cfg files using that command as above. +// If you are reading this line, then just leave this file in the cfg folder and the userconfig.cfg file will work fine. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + // Place any spy specific commands below this line. \ No newline at end of file diff --git a/cfg/userconfig.cfg b/cfg/userconfig.cfg new file mode 100644 index 0000000..8326762 --- /dev/null +++ b/cfg/userconfig.cfg @@ -0,0 +1,21 @@ +// userconfig.cfg + +// Place all general binds/aliases/scripts into this file. +// Create the following files and put class specific binds/aliases/scripts into them. +// "demoman.cfg" +// "engineer.cfg" +// "hwguy.cfg" +// "medic.cfg" +// "pyro.cfg" +// "scout.cfg" +// "sniper.cfg" +// "soldier.cfg" +// "spy.cfg" + +// IMPORTANT: This file DOES NOT auto-execute. +// It must be executed in the developer console with "exec userconfig.cfg" OR in the .cfg files. +// The first line of each .cfg should be "exec userconfig.cfg". +// Remove any "echo" commands you may have at the start of that file. +// For more information, see our tutorials on the Fortress-Forever Wiki. http://www.fortress-forever.com/wiki/Main_Page + +// Place all global commands below this line. \ No newline at end of file diff --git a/cfg/valve.rc b/cfg/valve.rc new file mode 100644 index 0000000..49107cd --- /dev/null +++ b/cfg/valve.rc @@ -0,0 +1,23 @@ +// load the base configuration +//exec default.cfg + +// Setup custom controller +exec joystick.cfg + +// run a user script file if present +exec autoexec.cfg + +// +// stuff command line statements +// +stuffcmds + +//disable this for now. +//startupmenu + +hostname "Insert witty phrase here!" +sv_password "gazellenegation" + +mp_prematch 0 +mp_forcerespawn 0 + diff --git a/cfg/waypoint.cfg b/cfg/waypoint.cfg new file mode 100644 index 0000000..417b141 --- /dev/null +++ b/cfg/waypoint.cfg @@ -0,0 +1,79 @@ +//This config is used for keybindings when waypointing +//It is best used with conjuction with the default.cfg +//which will reset your keybindings back to your standard binds + +//Author: GoaT_RopeR +//Version: 0.1 +//Date: 20070916 + + +//Enable Waypoint and Developer Modes +sv_cheats 1 +developer 1 +mp_timelimit 999 +bot waypoint_view 1 +bot waypoint_viewfacing 1 + + +//Waypoint Color Options +bot waypoint_color team1 0 0 255 //Set team1 waypoints Blue +bot waypoint_color team2 255 0 0 //Set team2 waypoints Red +bot waypoin`t_color waypoint_selected 226 132 20 //Set selected waypoints Orange +bot waypoint_color link_2way 0 0 0 //Set 2way connections Black +bot waypoint_color link_1way 255 255 0 //Set 1way connections Yellow +bot waypoint_color radius 0 255 25 //Set radii Green + + +//File Load Binds +bind "F1" "exec addbot_team1.cfg" +bind "F2" "exec addbot_team2.cfg" +bind "F3" "exec addbot_engi.cfg" +bind "F4" "exec addbot_scout1.cfg" +bind "F5" "exec addbot_scout2.cfg" +bind "F6" "exec addbot_sniper.cfg" +bind "F12" "exec default.cfg" + + +//Keyboard Binds +bind "=" "bot waypoint_changeradius +10" +bind "-" "bot waypoint_changeradius -10" +bind "kp_plus" "bot waypoint_changeradius +10" +bind "kp_minus" "bot waypoint_changeradius -10" +bind "del" "bot kickall" +bind "c" "bot waypoint_addflag cappoint" +bind "j" "bot waypoint_addflag jump" +bind "r" "bot waypoint_addflag rocketjump" +bind "t" "bot waypoint_addflag teleport" +bind "p" "bot waypoint_addflag pipetrap" +bind "l" "bot waypoint_load" +bind "v" "bot waypoint_save" +bind "shift" "bot waypoint_move" +bind "f" "bot waypoint_setfacing" + + +//Mouse Binds +bind "mouse1" "bot waypoint_add" +bind "mouse2" "bot waypoint_connect" +bind "mouse3" "middleclick" +bind "mouse4" "bot waypoint_del" +bind "mouse5" "bot waypoint_clearcon" + +bind "mwheelup" "mup" +bind "mwheeldown" "mdown" + +alias "middleclick" "" +alias "mup" "echo Mouse 3: Set Waypoint Red Team;alias middleclick bot waypoint_addflag team2;alias mup snipe;alias mdown blue" +alias "mdown" "echo Mouse 3: Set Waypoint Blue Team;alias middleclick bot waypoint_addflag team1;alias mup red;alias mdown ammo" + +alias "red" "echo Mouse 3: Set Waypoint Red Team;alias middleclick bot waypoint_addflag team2;alias mup snipe;alias mdown blue" +alias "blue" "echo Mouse 3: Set Waypoint Blue Team;alias middleclick bot waypoint_addflag team1;alias mup red;alias mdown ammo" +alias "ammo" "echo Mouse 3: Set Waypoint Ammo;alias middleclick bot waypoint_addflag ammo;alias mup blue;alias mdown armor" +alias "armor" "echo Mouse 3: Set Waypoint Armor;alias middleclick bot waypoint_addflag armor;alias mup ammo;alias mdown climb" +alias "climb" "echo Mouse 3: Set Waypoint Climb, Note:Set both begining and ending CLIMB tags!;alias middleclick bot waypoint_addflag climb;alias mup armor;alias mdown crouch" +alias "crouch" "echo Mouse 3: Set Waypoint Crouch;alias middleclick bot waypoint_addflag crouch;alias mup climb;alias mdown detpack" +alias "detpack" "echo Mouse 3: Set Waypoint Detpack;alias middleclick bot waypoint_addflag detpack;alias mup crouch;alias mdown dispenser" +alias "dispenser" "echo Mouse 3: Set Waypoint Dispenser;alias middleclick bot waypoint_addflag dispenser;alias mup detpack;alias mdown grenades" +alias "grenades" "echo Mouse 3: Set Waypoint Grenades;alias middleclick bot waypoint_addflag grenades;alias mup crouch;alias mdown health" +alias "health" "echo Mouse 3: Set Waypoint Health;alias middleclick bot waypoint_addflag health;alias mup grenades;alias mdown sentry" +alias "sentry" "echo Mouse 3: Set Waypoint Sentry, Note:Set facing also!;alias middleclick bot waypoint_addflag sentry;alias mup health;alias mdown snipe" +alias "snipe" "echo Mouse 3: Set Waypoint Snipe, Note:Set facing also!;alias middleclick bot waypoint_addflag snipe;alias mup sentry;alias mdown red" diff --git a/credits.wri b/credits.wri new file mode 100644 index 0000000..8647134 Binary files /dev/null and b/credits.wri differ diff --git a/detail.vbsp b/detail.vbsp new file mode 100644 index 0000000..0531701 --- /dev/null +++ b/detail.vbsp @@ -0,0 +1,1500 @@ +detail +{ + swamp_land_001 + { + "density" "800.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_foliage/grass_swamp_001a.mdl" + "amount" "0.3" + } + + Model2 + { + "model" "models/props_foliage/grass_swamp_001b.mdl" + "amount" "0.3" + } + + } + + Group2 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_003a.mdl" + "amount" "0.05" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_004b.mdl" + "amount" "0.05" + } + } + } + + swamp_land_002 + { + "density" "800.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_foliage/grass_swamp_001a.mdl" + "amount" "0.3" + } + + Model2 + { + "model" "models/props_foliage/grass_swamp_001b.mdl" + "amount" "0.3" + } + + } + + Group2 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_001a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_001b.mdl" + "amount" "0.1" + } + } + } + + swamp_water_001 + { + "density" "200.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_001a.mdl" + "amount" "0.3" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_001b.mdl" + "amount" "0.3" + } + } + + Group2 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_003a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_004b.mdl" + "amount" "0.3" + } + } + } + + grassland1 + { + "density" "500.0" + + + Group1 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_004a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_004b.mdl" + "amount" "0.1" + } + Model3 + { + "model" "models/props_foliage/Grass_tuft_004c.mdl" + "amount" "0.1" + } + Model4 + { + "model" "models/props_foliage/Grass_tuft_004d.mdl" + "amount" "0.1" + } + } + Group2 + { + "alpha" "0.3" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_001a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_001b.mdl" + "amount" "0.1" + } + + } + Group3 + { + "alpha" "0.7" + + } + Group4 + { + "alpha" "1.0" + + } + + + } + + grassland2 + { + "density" "1000.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/junk/w_traffcone.mdl" + "amount" "0.4" + } + } + } + + rocks1 + { + "density" "500.0" + + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_wasteland/rocksground01a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_wasteland/rocksground01b.mdl" + "amount" "0.1" + } + Model3 + { + "model" "models/props_wasteland/rocksground01c.mdl" + "amount" "0.1" + } + Model4 + { + "model" "models/props_wasteland/rocksground01d.mdl" + "amount" "0.1" + } + Model5 + { + "model" "models/props_wasteland/rocksground01e.mdl" + "amount" "0.1" + } + Model6 + { + "model" "models/props_wasteland/rocksground02a.mdl" + "amount" "0.1" + } + Model7 + { + "model" "models/props_wasteland/rocksground02b.mdl" + "amount" "0.1" + } + Model8 + { + "model" "models/props_wasteland/rocksground02c.mdl" + "amount" "0.1" + } + + } + Group2 + { + "alpha" "0.8" + + Model1 + { + "model" "models/props_wasteland/rocksground01a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_wasteland/rocksground01b.mdl" + "amount" "0.1" + } + Model3 + { + "model" "models/props_wasteland/rocksground01c.mdl" + "amount" "0.1" + } + Model4 + { + "model" "models/props_wasteland/rocksground01d.mdl" + "amount" "0.1" + } + Model5 + { + "model" "models/props_wasteland/rocksground01e.mdl" + "amount" "0.1" + } + Model6 + { + "model" "models/props_wasteland/rocksground02a.mdl" + "amount" "0.1" + } + Model7 + { + "model" "models/props_wasteland/rocksground02b.mdl" + "amount" "0.1" + } + Model8 + { + "model" "models/props_wasteland/rocksground02c.mdl" + "amount" "0.1" + } + + } + Group3 + { + "alpha" "0.3" + + } + Group4 + { + "alpha" "0.0" + + } + + + } + + grassland3 + { + "density" "1500.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_foliage/shrub_01a.mdl" + "amount" "0.2" + } + + Model2 + { + "model" "models/props_foliage/shrub_03a.mdl" + "amount" "0.1" + } + Model4 + { + "model" "models/props_foliage/shrub_03c.mdl" + "amount" "0.1" + } + } + + + Group2 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/grass_tuft_001.mdl" + "amount" "0.2" + } + } + } + + test + { + "density" "600.0" + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_001a.mdl" + "amount" "0.3" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_001b.mdl" + "amount" "0.3" + } + } + + Group2 + { + "alpha" "0.0" + + Model1 + { + "model" "models/props_foliage/Grass_tuft_003a.mdl" + "amount" "0.1" + } + + Model2 + { + "model" "models/props_foliage/Grass_tuft_004b.mdl" + "amount" "0.3" + } + Model3 + { + "model" "models/props_foliage/Grass_tuft_004a.mdl" + "amount" "0.05" + } + Model4 + { + "model" "models/props_foliage/Grass_tuft_004c.mdl" + "amount" "0.05" + } + } + } + + grass01 + { + "density" "600.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 40 50" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 23 28" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model4 + { + "sprite" "288 144 128 128 512" + "spritesize" "0.5 0.0 50 50" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + "alpha" "0.5" + Model1 + { + "sprite" "0 144 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "1" + "detailOrientation" "2" + } + } + + Group4 + { + "alpha" "0.3" + + } + + Group5 + { + "alpha" "0.0" + + } + } + + grass02 + { + "density" "600.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.6" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 30 40" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + } + + Group3 + { + "alpha" "0.5" + } + + Group4 + { + "alpha" "0.3" + + } + + Group5 + { + "alpha" "0.0" + + } + } + + grass03 + { + "density" "600.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 40 50" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + "alpha" "0.5" + Model1 + { + "sprite" "0 144 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "1" + "detailOrientation" "2" + } + } + + Group4 + { + "alpha" "0.3" + + } + + Group5 + { + "alpha" "0.0" + + } + } + + coastline_grass01 + //reduced size to 0.75 + // density was 600 until 7/7/04. Reduced for global coast perf reasons - Sawyer + { + "density" "300.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 30 38" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 18" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model4 + { + "sprite" "288 144 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + + coastline_grass02 + // Should be the same as coastline_grass01, but with less density for large areas. + //reduced size by 0.75 + { + "density" "50.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 30 37.5" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model4 + { + "sprite" "288 144 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + coastline_redgrass01 + //reduced size by 0.75 + { + "density" "600.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 42 42" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + + coastline_redgrass02 + //reduced size by 0.75 + { + "density" "600.0" + + Group1 + { + "alpha" "0" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 42 42" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "1" + } + } + + coastline_redgrass03 + //reduced size by 0.75 + { + "density" "300.0" + + Group1 + { + "alpha" "0" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 42 42" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "1" + } + } + + + + citygrass01 + { + "density" "3000.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.6" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 30 40" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.3" + "detailOrientation" "2" + } + } + + Group3 + { + "alpha" "0.5" + } + + Group4 + { + "alpha" "0.3" + + } + + Group5 + { + "alpha" "0.0" + + } + } + redgrass + //reduced size by 0.75 + { + "density" "2000.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 29 29" + "spriterandomscale" "0.3" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + + + redgrass_light + //reduced size by 0.75 + { + "density" "700.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 29 29" + "spriterandomscale" "0.3" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + + + short_redgrass + + { + "density" "2000.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 10 13" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 12 15" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 8 8" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 9 11" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 19 19" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 12 12" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.3" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + + "alpha" "0.0" + } + } + + PerfTest1 + { + "density" "9000.0" + + + Group1 + { + "alpha" "1.0" + + Model1 + { + "model" "models/PerfTest/Grass_tuft_004a.mdl" + "amount" "0.25" + } + + Model2 + { + "model" "models/PerfTest/Grass_tuft_004b.mdl" + "amount" "0.25" + } + Model3 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model4 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 40 50" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model5 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model6 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 23 28" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + + } + Group2 + { + "alpha" "1.0" + + } + Group3 + { + "alpha" "1.0" + + } + Group4 + { + "alpha" "0.5" + } + + } +canal_reeds + { + "density" "750.0" + + + Group1 + { + + "alpha" "0.0" + } + Group2 + { + + "alpha" "0.2" + } + Group2a + { + + "alpha" "0.35" + Model1 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 15 25" + "spriterandomscale" "0.2" + "amount" "0.8" + "detailOrientation" "2" + } + } + Group3 + { + + "alpha" "0.75" + Model1 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 20 35" + "spriterandomscale" "0.2" + "amount" "0.8" + "detailOrientation" "2" + } + } + Group4 + { + "alpha" "1.0" + Model1 + { + "upright" "1.0" + "model" "models/props_foliage/cattails.mdl" + "amount" "0.2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 40 65" + "spriterandomscale" "0.1" + "amount" "0.8" + "detailOrientation" "2" + } + } + } +rocks_redgrass +//rocks in red grass + { + "density" "2000.0" + + Group1 + { + "alpha" "1" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 19 25" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 23 30" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 15 15" + "spriterandomscale" "0.2" + "amount" "0.15" + "detailOrientation" "2" + } + Model4 + { + "sprite" "144 144 128 128 512" + "spritesize" "0.5 0.0 18 21" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + //shrub + Model5 + { + "sprite" "144 288 128 128 512" + "spritesize" "0.5 0.0 38 38" + "spriterandomscale" "0.2" + "amount" "0.2" + "detailOrientation" "2" + } + Model6 + { + "sprite" "0 288 128 128 512" + "spritesize" "0.5 0.0 23 23" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model7 + { + "sprite" "288 288 128 128 512" + "spritesize" "0.5 0.0 29 29" + "spriterandomscale" "0.3" + "amount" "0.1" + "detailOrientation" "2" + } + Model8 + { + "model" "models/props_foliage/detail_rocks01a.mdl" + "amount" "0.05" + } + } + + Group2 + { + + "alpha" "0.0" + } + } +street_junk +//trash on streets + { + "density" "60.0" + + + Group1 + { + + "alpha" "0.0" + } + Group2 + { + "alpha" "1.0" + + Model1 + { + "model" "models/props_junk/detail_junk01.mdl" + "amount" "0.33" + } + Model2 + { + "model" "models/props_junk/detail_junk02.mdl" + "amount" "0.33" + } + Model3 + { + "model" "models/props_junk/detail_junk03.mdl" + "amount" "0.33" + } + } + } + +// new stuff for FF +// we usually have our grass first in the blend, so change the 0 alpha part if you want to change the grass detail prop + +FFgrass01 + { + "density" "600.0" + + Group1 + { + "alpha" "0.0" + Model1 + { + "sprite" "288 0 128 128 512" + "spritesize" "0.5 0.0 25 33" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model2 + { + "sprite" "0 0 128 128 512" + "spritesize" "0.5 0.0 40 50" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + Model3 + { + "sprite" "144 0 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.1" + "detailOrientation" "2" + } + } + + Group2 + { + "alpha" "0.5" + Model1 + { + "sprite" "0 144 128 128 512" + "spritesize" "0.5 0.0 20 20" + "spriterandomscale" "0.2" + "amount" "0.05" + "detailOrientation" "2" + } + } + + + Group3 + { + "alpha" "1.0" + } + } +} + + diff --git a/ff_base.fgd b/ff_base.fgd new file mode 100644 index 0000000..4440225 --- /dev/null +++ b/ff_base.fgd @@ -0,0 +1,5787 @@ +//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======= +// +// Purpose: General game definition file (.fgd) +// +//============================================================================= + +@mapsize(-16384, 16384) + + +//------------------------------------------------------------------------- +// +// Base Classes +// +//------------------------------------------------------------------------- + +@BaseClass = Angles +[ + angles(angle) : "Pitch Yaw Roll (Y Z X)" : "0 0 0" : "This entity's orientation in the world. Pitch is rotation around the Y axis, " + + "yaw is the rotation around the Z axis, roll is the rotation around the X axis." +] + +@BaseClass = Origin +[ + origin(origin) : "Origin (X Y Z)" : : "The position of this entity's center in the world. Rotating entities typically rotate around their origin." +] + +@BaseClass = Studiomodel +[ + model(studio) : "World Model" + skin(integer) : "Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default." + + disableshadows(choices) : "Disable Shadows" : 0 : "Used to disable dynamic shadows on this entity." = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Skin(integer) : "Changes the model skin to the specified number." + input DisableShadow(void) : "Turn shadow off." + input EnableShadow(void) : "Turn shadow on." + input AlternativeSorting(bool) : "Used to attempt to fix sorting problems when rendering. True activates, false deactivates" + + // Outputs + output OnIgnite(void) : "Fired when this object catches fire." +] + +@BaseClass = BasePlat +[ + input Toggle(void) : "Toggles the platform's state." + input GoUp(void) : "Tells the platform to go up." + input GoDown(void) : "Tells the platform to go down." +] + +@BaseClass = Targetname +[ + targetname(target_source) : "Name" : : "The name that other entities refer to this entity by." + + // Inputs + input Kill(void) : "Removes this entity from the world." + input KillHierarchy(void) : "Removes this entity and all its children from the world." + input AddOutput(string) : "Adds an entity I/O connection to this entity. Format: ::::. Very dangerous, use with care." + input FireUser1(void) : "Causes this entity's OnUser1 output to be fired." + input FireUser2(void) : "Causes this entity's OnUser2 output to be fired." + input FireUser3(void) : "Causes this entity's OnUser3 output to be fired." + input FireUser4(void) : "Causes this entity's OnUser4 output to be fired." + + // Outputs + output OnUser1(void) : "Fired in response to FireUser1 input." + output OnUser2(void) : "Fired in response to FireUser2 input." + output OnUser3(void) : "Fired in response to FireUser3 input." + output OnUser4(void) : "Fired in response to FireUser4 input." +] + +@BaseClass = Parentname +[ + parentname(target_destination) : "Parent" : : "The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent." + + // Inputs + input SetParent(string) : "Changes the entity's parent in the movement hierarchy." + input SetParentAttachment(string) : "Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment." + input SetParentAttachmentMaintainOffset(string) : "Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached." + input ClearParent(void) : "Removes this entity from the the movement hierarchy, leaving it free to move independently." +] + +@BaseClass = BaseBrush +[ + // Inputs + input SetTextureIndex(integer) : "Used by HL1Port. Sets the brush texture index. Use a material_modify_control entity instead." + input IncrementTextureIndex(void) : "Used by HL1Port. Increments the brush texture index. Use a material_modify_control entity instead." +] + +@BaseClass = EnableDisable +[ + StartDisabled(choices) : "Start Disabled" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Enable(void) : "Enable this entity." + input Disable(void) : "Disable this entity." +] + +@BaseClass = RenderFxChoices +[ + renderfx(choices) :"Render FX" : 0 = + [ + 0: "Normal" + 1: "Slow Pulse" + 2: "Fast Pulse" + 3: "Slow Wide Pulse" + 4: "Fast Wide Pulse" + 9: "Slow Strobe" + 10: "Fast Strobe" + 11: "Faster Strobe" + 12: "Slow Flicker" + 13: "Fast Flicker" + 5: "Slow Fade Away" + 6: "Fast Fade Away" + 7: "Slow Become Solid" + 8: "Fast Become Solid" + 14: "Constant Glow" + 15: "Distort" + 16: "Hologram (Distort + fade)" + 23: "Cull By Distance (TEST)" + 24: "Spotlight FX" + 26: "Fade Near" + ] +] + +@BaseClass = Shadow +[ + disableshadows(choices) : "Disable shadows" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + input DisableShadow(void) : "Turn shadow off." + input EnableShadow(void) : "Turn shadow on." +] + +@BaseClass base(RenderFxChoices) = RenderFields +[ + rendermode(choices) : "Render Mode" : 0 : "Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'." = + [ + 0: "Normal" + 1: "Color" + 2: "Texture" + 3: "Glow" + 4: "Solid" + 5: "Additive" + 7: "Additive Fractional Frame" + 9: "World Space Glow" + 10: "Dont Render" + ] + renderamt(integer) : "FX Amount (0 - 255)" : 255 : "The FX amount is used by the selected Render Mode." + rendercolor(color255) : "FX Color (R G B)" : "255 255 255" : "The FX color is used by the selected Render Mode." + + disablereceiveshadows(choices) : "Disable Receiving Shadows" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + input Alpha(integer) : "Set the sprite's alpha (0 - 255)." + input Color(color255) : "Set the sprite's color (R G B)." +] + + +// Inherit from this to get the ability to only include an object in a range of dx levels. +// NOTE!!: MAKE SURE THAT YOU DON'T USE THIS WITH ANYTHING THAT WILL BREAK SAVE-GAMES SWITCHING +// BETWEEN DXLEVELS!!!! +@BaseClass = DXLevelChoice +[ + mindxlevel(choices) : "Minimum DX Level" : 0 = + [ + 0 : "default (lowest)" + 70 : "dx7" + ] + maxdxlevel(choices) : "Maximum DX Level" : 0 = + [ + 0 : "default (highest)" + 60 : "dx6" + ] +] + +@BaseClass = Inputfilter +[ + InputFilter(choices) : "Input Filter" : 0 : "Used to specify which inputs this entity will accept." = + [ + 0 : "Allow all inputs" + 8 : "Ignore Touch/Untouch" + 16 : "Ignore Use" + 32 : "Ignore All" + ] +] + +@BaseClass = Global +[ + globalname(string) : "Global Entity Name" : "" : "Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state." +] + +@BaseClass base(Targetname) = EnvGlobal : + "An entity to control a global game state." +[ + initialstate(choices) : "Initial State" : 0 = + [ + 0 : "Off" + 1 : "On" + 2 : "Dead" + ] + spawnflags(flags) = + [ + 1 : "Set Initial State" : 0 + ] + + // Inputs + input TurnOn(void) : "Set state of global to ON." + input TurnOff(void) : "Set state of global to OFF." + input Toggle(void) : "Toggles state of global between ON and OFF." + input Remove(void) : "Set state of global to DEAD." +] + +@BaseClass = DamageFilter +[ + damagefilter(target_destination) : "Damage Filter" : "" : "Name of the filter entity that controls which entities can damage us." + input SetDamageFilter(string) : "Sets the entity to use as damage filter. Pass in an empty string to clear the damage filter." +] + +@BaseClass = ResponseContext +[ + // Inputs + input AddContext(string) : "Adds a context to this entity's list of response contexts. The format should be 'key:value'." + input RemoveContext(string) : "Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context." + input ClearContext(void) : "Removes all contexts in this entity's list of response contexts." + + // Pre-defined contexts at server startup time (set by mapper) + ResponseContext(string) : "Response Contexts" : "" : "Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys & values will be passed to the response rules system." +] + +@BaseClass base(Targetname, DamageFilter, Shadow) = Breakable +[ + ExplodeDamage(float) : "Explosion Damage" : 0 : "If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'." + ExplodeRadius(float) : "Explosion Radius" : 0 : "If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'." + PerformanceMode(choices) : "Performance Mode" : 0 : "Used to limit the amount of gibs produced when this entity breaks, for performance reasons." = + [ + 0 : "Normal" + 1 : "No Gibs" + 2 : "Full Gibs on All Platforms" + ] + + // Inputs + input Break(void) : "Breaks the breakable." + input SetHealth(integer) : "Sets a new value for the breakable's health. If the breakable's health reaches zero it will break." + input AddHealth(integer) : "Adds health to the breakable. If the breakable's health reaches zero it will break." + input RemoveHealth(integer) : "Removes health from the breakable. If the breakable's health reaches zero it will break." + input EnablePhyscannonPickup(void) : "Makes the breakable able to picked up by the physcannon." + input DisablePhyscannonPickup(void) : "Makes the breakable not able to picked up by the physcannon." + + // Outputs + output OnBreak(void) : "Fired when this breakable breaks." + output OnHealthChanged(float) : "Fired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1]." + output OnPhysCannonDetach(void) : "Fired when the physcannon has ripped this breakable off of the wall. Only fired if ACT_PHYSCANNON_DETACH is defined in the model this breakable is using." + output OnPhysCannonAnimatePreStarted(void) : "Fired when this prop starts playing the Pre physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE_PRE activity is defined in the model this breakable is using." + output OnPhysCannonAnimatePullStarted(void) : "Fired when this prop starts playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre pull anim, this will be fired after the Pre anim has finished playing." + output OnPhysCannonPullAnimFinished(void) : "Fired when this prop has finished playing the physcannon-pull activity, caused by the player trying to grab this prop with the physcannon. Only fired if the ACT_PHYSCANNON_ANIMATE activity is defined in the model this breakable is using. If the prop has Pre & Post pull anims, this will be fired after the Post anim has finished playing." + output OnPhysCannonAnimatePostStarted(void) : "Fired when this prop starts playing the Post physcannon-pull activity. Only fired if the ACT_PHYSCANNON_ANIMATE_POST activity is defined in the model this breakable is using." +] + +@BaseClass base(Breakable, Parentname, Global) = BreakableBrush +[ + spawnflags(flags) = + [ + 1 : "Only Break on Trigger" : 0 + 2 : "Break on Touch" : 0 + 4 : "Break on Pressure" : 0 + 512: "Break immediately on Physics" : 0 + 1024: "Don't take physics damage" : 0 + ] + + propdata(choices) : "Prop Data" : 0 : "Set to the best approximation of the size and material of this entity's brushes. If set, it will override this entity's health and damage taken from various weapons. See the propdata.txt file in the scripts directory of your MOD to get a detailed list of what each entry specifies." = + [ + 0 : "None" + 1 : "Wooden.Tiny" + 2 : "Wooden.Small" + 3 : "Wooden.Medium" + 4 : "Wooden.Large" + 5 : "Wooden.Huge" + 6 : "Metal.Small" + 7 : "Metal.Medium" + 8 : "Metal.Large" + 9 : "Cardboard.Small" + 10 : "Cardboard.Medium" + 11 : "Cardboard.Large" + 12 : "Stone.Small" + 13 : "Stone.Medium" + 14 : "Stone.Large" + 15 : "Stone.Huge" + 16 : "Glass.Small" + 17 : "Plastic.Small" + 18 : "Plastic.Medium" + 19 : "Plastic.Large" + 20 : "Pottery.Small" + 21 : "Pottery.Medium" + 22 : "Pottery.Large" + 23 : "Pottery.Huge" + 24 : "Glass.Window" + ] + + health(integer) : "Strength" : 1 : "Number of points of damage to take before breaking. 0 means don't break." + material(choices) :"Material Type" : 0 : "Set to the material type of the brush. Used to decide what sounds to make when damaged, and what gibs to produce when broken." = + [ + 0: "Glass" + 1: "Wood" + 2: "Metal" + 3: "Flesh" + 4: "CinderBlock" + 5: "Ceiling Tile" + 6: "Computer" + 7: "Unbreakable Glass" + 8: "Rocks" + ] + explosion(choices) : "Gibs Direction" : 0 : "Used to decide which direction to throw gibs when broken." = + [ + 0: "Random" + 1: "Relative to Attack" + 2: "Use Precise Gib Dir" + ] + + gibdir(angle) : "Precise Gib Direction" : "0 0 0" : "Specifies the direction to throw gibs when this breakable breaks. Be sure to select Use Precise Gib Dir in the Gibs Direction field!" + + nodamageforces(choices) : "Damaging it Doesn't Push It" : 0 : "Used to determine whether or not damage should cause the brush to move." = + [ + 0: "No" + 1: "Yes" + ] + + // Inputs + input EnableDamageForces(void) : "Damaging the entity applies physics forces to it." + input DisableDamageForces(void) : "Damaging the entity does *not* apply physics forces to it." + + gibmodel(string) : "Gib Model" : "" : "Used by HL1Port to specify a custom gib model to break into, overriding the 'Material Type'." + spawnobject(choices) : "Spawn On Break" : 0 : "When broken, an entity of the selected type will be created." = + [ + 1: "item_battery" + 2: "item_healthkit" + 3: "item_ammo_pistol" + 4: "item_ammo_pistol_large" + 5: "item_ammo_smg1" + 6: "item_ammo_smg1_large" + 7: "item_ammo_ar2" + 8: "item_ammo_ar2_large" + 9: "item_box_buckshot" + 10: "item_flare_round" + 11: "item_box_flare_rounds" + 12: "item_ml_grenade" + 13: "item_smg1_grenade" + 14: "item_box_sniper_rounds" + 15: "unused1" + 16: "weapon_stunstick" + 17: "weapon_ar1" + 18: "weapon_ar2" + 19: "unused2" + 20: "weapon_ml" + 21: "weapon_smg1" + 22: "weapon_smg2" + 23: "weapon_slam" + 24: "weapon_shotgun" + 25: "weapon_molotov" + 26: "item_dynamic_resupply" + ] + explodemagnitude(integer) : "Explode Magnitude" : 0 : "If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage." + pressuredelay(float) : "Pressure Delay" : 0 : "Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart)." +] + +@BaseClass base(Breakable) = BreakableProp +[ + spawnflags(flags) = + [ + 16 : "Break on Touch" : 0 + 32 : "Break on Pressure" : 0 + ] + pressuredelay(float) : "Pressure Delay" : 0 : "Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart)." +] + +@BaseClass base(Targetname, Angles, RenderFields, DamageFilter, ResponseContext, Shadow) color(0 200 200) = BaseNPC +[ + target(target_destination) : "Target Path Corner" : : "If set, the name of a path corner entity that this NPC will walk to, after spawning." + squadname(String) : "Squad Name" : : "NPCs that are in the same squad (i.e. have matching squad names) will share information about enemies, and will take turns attacking and covering each other." + hintgroup(String) : "Hint Group" : "" : "Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC." + hintlimiting(choices) : "Hint Limit Nav" : 0 : "Limits NPC to using specified hint group for navigation requests, but does not limit local navigation." = + [ + 0 : "No" + 1 : "Yes" + ] + + spawnflags(Flags) = + [ + 1 : "Wait Till Seen" : 0 + 2 : "Gag (No IDLE sounds until angry)" : 0 + 4 : "Fall to ground (unchecked means *teleport* to ground)" : 1 + 8 : "Drop Healthkit" : 0 + 16 : "Efficient - Don't acquire enemies or avoid obstacles" : 0 + 128: "Wait For Script" : 0 + 256: "Long Visibility/Shoot" : 0 + 512: "Fade Corpse" : 0 + 1024: "Think outside PVS" : 0 + 2048: "Template NPC (used by npc_maker, will not spawn)" : 0 + 4096: "Do Alternate collision for this NPC (player avoidance)" : 0 + 8192: "Don't drop weapons" : 0 + 16384 : "Ignore player push (dont give way to player)" : 0 + ] + + //initialidle(string) : "Initial Idle Activity" :: "Activity the NPC should use to idle until becomes alert" + sleepstate(choices) : "Sleep State" : 0 : "Holds the NPC in stasis until specified condition. See also 'Wake Radius' and 'Wake Squad'." = + [ + 0 : "None" + 1 : "Waiting for threat" + 2 : "Waiting for PVS" + 3 : "Waiting for input, ignore PVS" + 4 : "Auto PVS" + 5 : "Auto PVS after PVS" + ] + + wakeradius(float) : "Wake Radius" : 0 : "Auto-wake if player within this distance" + wakesquad(choices) : "Wake Squad" : 0 : "Wake all of the NPCs squadmates if the NPC is woken" = + [ + 0 : "No" + 1 : "Yes" + ] + + physdamagescale(float) : "Physics Impact Damage Scale" : "1.0" : "Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics." + + // Outputs + output OnDamaged(void) : "Fired when this NPC takes damage." + output OnDeath(void) : "Fired when this NPC is killed." + output OnHalfHealth(void) : "Fired when this NPC reaches half of its maximum health." + output OnHearWorld(void) : "Fired when this NPC hears a sound (other than combat or the player)." + output OnHearPlayer(void) : "Fired when this NPC hears the player." + output OnHearCombat(void) : "Fired when this NPC hears combat sounds." + output OnFoundEnemy(string) : "Fired when this NPC establishes line of sight to its enemy (outputs entity)." + output OnLostEnemyLOS(void) : "Fired when this NPC loses line of sight to its enemy." + output OnLostEnemy(void) : "Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy." + output OnFoundPlayer(string) : "Fired when this NPC establishes line of sight to its enemy, and that enemy is a player (outputs player entity)." + output OnLostPlayerLOS(void) : "Fired when this NPC loses line of sight to its enemy, and that enemy is a player." + output OnLostPlayer(void) : "Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy." + output OnDamagedByPlayer(void) : "Fired when this NPC is hurt by a player." + output OnDamagedByPlayerSquad(void) : "Fired when this NPC is hurt by a player OR by one of the player's squadmates." + output OnDenyCommanderUse(void) : "Fired when this NPC has refused to join the player's squad." + output OnSleep(void) : "Fired when this NPC enters a sleep state." + output OnWake(void) : "Fired when this NPC comes out of a sleep state." + output OnForcedInteractionAborted(void) : "Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc)" + output OnForcedInteractionFinished(void) : "NPCs in actbusies can no longer perform dynamic interactions." + + // Inputs + input SetRelationship(string) : "Changes this entity's relationship with another entity or class. Format: " + input SetHealth(integer) : "Set this NPC's health." + input SetBodyGroup(integer) : "HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing!" + input physdamagescale(float) : "Sets the value that scales damage energy when this character is hit by a physics object. NOTE: 0 means this feature is disabled for backwards compatibility." + input Ignite(void) : "Ignite, burst into flames" + input Break(void) : "Break, smash into pieces" + input StartScripting(void) : "Enter scripting state. In this state, NPCs ignore a variety of stimulus that would make them break out of their scripts: They ignore danger sounds, ignore +USE, don't idle speak or respond to other NPC's idle speech, and so on." + input StopScripting(void) : "Exit scripting state." + input Assault(string) : "Start an assault. Parameter passed in should be the name of the rally point." + input SetSquad(string) : "Set the name of this NPC's squad. It will be removed from any existing squad automatically. Leaving the parameter blank will remove the NPC from any existing squad." + input Wake(void) : "Wakes up the NPC if it is sleeping." + input ForgetEntity(string) : "Clears out the NPC's knowledge of a named entity." + input GagEnable(void) : "Turn on the NPC Gag flag. NPC won't speak outside of choreographed scenes." + input GagDisable(void) : "Turn off the NPC Gag flag." + input IgnoreDangerSounds(float) : "Ignore danger sounds for the specified number of seconds." + input HolsterWeapon(void) : "Force the NPC to holster their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already holstered, or if the NPC doesn't use weapons." + input HolsterAndDestroyWeapon(void) : "Identical to HolsterWeapon, except the weapon is destroyed once it has been holstered and concealed." + input UnholsterWeapon(void) : "Force the NPC to draw their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already drawn, or if the NPC doesn't use weapons." + input ForceInteractionWithNPC(string) : "Force the NPC to use a dynamic interaction with another NPC. Parameter format: " + input UpdateEnemyMemory(string) : "Update (or Create) this NPC's memory of an enemy and its location" +] + +@PointClass base(Targetname, Parentname, Angles) iconsprite("editor/info_target.vmt") = info_npc_spawn_destination : + "NPC Spawn Destination. (Consult npc_template_maker help for more info)" +[ + ReuseDelay(float) : "Reuse Delay" : 1 : "After an NPC is spawned at this destination, the delay before this destination is eligible for selection again." + RenameNPC(string) : "New NPC Name" : "" : "If an NPC spawns at this destination, change that NPC's targetname to this." + + // Outputs + output OnSpawnNPC(void) : "Fired when an NPC spawns at this destination." +] + +@BaseClass base(Targetname, Angles, EnableDisable) iconsprite("editor/npc_maker.vmt") color(0 0 255) = BaseNPCMaker +[ + StartDisabled(choices) : "Start Disabled" : 1 = + [ + 0 : "No" + 1 : "Yes" + ] + + spawnflags(Flags) = + [ + // Only in npc__maker, npc_template_maker uses flag from template NPC + 16 : "Fade Corpse" : 0 + 32 : "Infinite Children" : 0 + 64 : "Do Not Drop" : 0 + 128 : "Don't Spawn While Visible" : 0 + ] + + MaxNPCCount(integer) : "Num. of NPCs" : 1 : "Number of NPCs that will spawn before this spawner is exhausted." + SpawnFrequency(string) : "Frequency" : "5" : "How often (in seconds) a new NPC will be spawned. If set to -1, a new NPC will be made when the last NPC dies." + MaxLiveChildren(integer) : "Max Live NPCs" : 5 : "Maximum number of live children allowed at any one time (new ones will not be made until one dies). If set to -1, no limit is applied." + + // Outputs + output OnSpawnNPC(string) : "Fired when an NPC is spawned. The activator is the NPC, and the string is the name of the NPC." + output OnAllSpawned(void) : "Fired when the spawned is exhausted (all children have been spawned)." + output OnAllSpawnedDead(void) : "Fired when the spawner is exhausted (all children have been spawned) and all spawned children have died." + output OnAllLiveChildrenDead(void) : "Fired when all spawned children have died. This does not mean the spawned is exhausted, so a new child may be spawned any time after this (unless the maker is disabled)." + + // Inputs + input Spawn(void) : "Spawns an NPC." + input Toggle(void) : "Toggles the spawner enabled/disabled state." + input Enable(void) : "Enables the spawner." + input Disable(void) : "Disables the spawner." + input AddMaxChildren(integer) : "Adds to the number of NPCs that can spawn before the spawner is exhausted. If an exhausted spawner is given some children to spawn, it still wont begin spawning until it is re-enabled with the Enable input." + input SetMaxChildren(integer) : "Sets the number of NPCs that can spawn before the spawner is exhausted. If an exhausted spawner is given some children to spawn, it still won't begin spawning until it is re-enabled with the Enable input." + input SetMaxLiveChildren(integer) : "Sets the maximum number of NPCs that can be alive at any one time from this spawner." + input SetSpawnFrequency(float) : "Sets how often (in seconds) a new NPC will be spawned." +] + +@PointClass base(BaseNPCMaker) iconsprite("editor/npc_maker.vmt") = npc_template_maker : + "An entity that creates NPCs. The NPCs it creates are clones of a template NPC. NPCs are spawned around this maker's origin, or at specified destination points." +[ + spawnflags(Flags) = + [ + 256 : "Always use radius spawn" : 0 + 512 : "Don't preload template models" : 0 + ] + + TemplateName(target_destination) : "Name of template NPC" : "" : "Template NPC that this maker should be creating clones of." + + Radius(float) : "Radius" : 256 : "Radius around this maker within which NPCs are to be placed. Spawned NPCs will try and find empty space within this radius to spawn." + + DestinationGroup(target_destination) : "Name of Destination Group" : : "If you'd like spawned NPCs to be created at an info_npc_spawn_destination entity, enter the name of that entity here. If you have more than one destination entity by that name, the Destination Criteria will be used to select one from the group." + CriterionVisibility(Choices) : "Dest. Criterion: Visible to player?" : 2 : "Should the NPC try to spawn at a destination that the player can see? Only applicable if a Destination Group is being used." = + [ + 0 : "Yes" + 1 : "No" + 2 : "Don't Care" + ] + CriterionDistance(Choices) : "Dest. Criterion: Distance to player?" : 2 : "Should the NPC try to spawn nearest to or farthest from the player's current location? Only applicable if a Destination Group is being used." = + [ + 0 : "Nearest" + 1 : "Farthest" + 2 : "Don't Care" + ] + + MinSpawnDistance(integer) : "Minimum spawn distance from player" : 0 : "The spawn destination node distance to the player will have to be further or equal than this value." + + //Inputs + input SpawnNPCInRadius(void) : "Spawn an NPC somewhere within the maker's radius." + input SpawnNPCInLine(void) : "Spawn an NPC somewhere within a line behind the maker." + input ChangeDestinationGroup(string) : "Switch to a different set of Destination entities." + input SetMinimumSpawnDistance(integer) : "Set the minimum spawn distance from player to destination node." +] + +@BaseClass base( BaseNPC ) = BaseHelicopter +[ + InitialSpeed(string) : "Initial Speed" : "0" : "Sets the helicopter's desired speed that it should try to reach as soon as it's spawned." + target(target_destination) : "Target path_track" : : "(Optional) The name of a path_track entity that this NPC will fly to after spawning." + + // Inputs + input MoveTopSpeed(void) : "The helicopter will immediately move at top speed toward its current goal, or in its current orientation if it's on top of its goal." + input ChangePathCorner(target_destination) : "Tell the helicopter to move to a path corner on a new path." + input SelfDestruct(void) : "Self Destruct." + input Activate(void) : "Activate. Use to wake up a helicopter that spawned with the 'Await Input' spawnflag on." + input SetTrack(target_destination) : "Set a track for the helicopter to adhere to. The helicopter will do nothing if he's on the same path, and will move to the closest point on the specified track if he's on a different path." + input FlyToSpecificTrackViaPath(target_destination) : "The helicopter will first fly to the closest point on the path if he's on a different path. Then he'll fly along the path to the specified track point." + input StartPatrol(void) : "Start patrolling back and forth along the current track." + input StopPatrol(void) : "Stop patrolling back and forth along the track. This will cause the helicopter to come to rest at the track which he's currently flying toward." + input ChooseFarthestPathPoint(void) : "When tracking an enemy, choose the point on the path furthest from the enemy, but still in firing range." + input ChooseNearestPathPoint(void) : "When tracking an enemy, choose the point on the path nearest from the enemy." + input StartBreakableMovement(void) : "The helicopter is now allowed to disobey direct commands to go to particular points if he senses an enemy. He will move to the closest point (or farthest point, if ChooseFarthestPathPoint is used), on the path if he senses an enemy." + input StopBreakableMovement(void) : "The helicopter can not disobey direct commands. He will continue to fly along his patrol path or to his specified target even if he senses an enemy." + + spawnflags(Flags) = + [ + // AWAIT INPUT will make the helicopter spawn disabled, awaiting + // the "Activate" input to start acting. + 32 : "No Rotorwash" : 0 + 64 : "Await Input" : 0 + ] +] + +@BaseClass color(0 255 0) = PlayerClass [] + +@BaseClass color(180 10 180) = Light +[ + _light(color255) : "Brightness" : "255 255 255 200" + _lightHDR(color255) : "BrightnessHDR" : "-1 -1 -1 1" + style(Choices) : "Appearance" : 0 = + [ + 0 : "Normal" + 10: "Fluorescent flicker" + 2 : "Slow, strong pulse" + 11: "Slow pulse, noblack" + 5 : "Gentle pulse" + 1 : "Flicker A" + 6 : "Flicker B" + 3 : "Candle A" + 7 : "Candle B" + 8 : "Candle C" + 4 : "Fast strobe" + 9 : "Slow strobe" + ] + pattern(string) : "Custom Appearance" : "" : "Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light." + _constant_attn(string) : "Constant" : "0" + _linear_attn(string) : "Linear" : "0" + _quadratic_attn(string) : "Quadratic" : "1" + _fifty_percent_distance(string) : "50 percent falloff distance" : "0": "Distance at which brightness should fall off to 50%. If set, overrides linear constant and quadratic paramaters." + _zero_percent_distance(string) : "0 percent falloff distance" : "0": "Distance at which brightness should fall off to negligible (1/256)%. Must set _fifty_percent_distance to use." + + // Inputs + input TurnOn(void) : "Turn the light on." + input TurnOff(void) : "The the light off." + input Toggle(void) : "Toggle the light's current state." + input SetPattern(string) : "Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light." + input FadeToPattern(string) : "Fades from first value in old pattern, to first value in the new given pattern. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light." +] + +@BaseClass = Node +[ + nodeid(integer) readonly : "Node ID" +] + +@BaseClass base(Node) = HintNode +[ + hinttype(choices) : "Hint" : 0 = + [ + 0 : "None" + + 2: "World: Window" + 12: "World: Act Busy Hint" + 13: "World: Visually Interesting" + 14: "World: Visually Interesting (Don't aim at)" + 15: "World: Inhibit Combine Mines within 15 feet" + 16: "World: Visually Interesting (Stealth mode)" + + 100: "Crouch Cover Medium" + 101: "Crouch Cover Low" + 102: "Waste Scanner Spawn" + 103: "Entrance / Exit Pinch" +// 104: "Guard Point" + 105: "Enemy Disadvantage Point" + 106: "Health Kit" + + 400: "Antlion: Burrow Point" + 401: "Antlion: Thumper Flee Point" + + 450: "Headcrab: Burrow Point" + 451: "Headcrab: Exit Pod Point" + + 500: "Roller: Patrol Point" + 501: "Roller: Cleanup Spot" + + 700: "Crow: Fly to point" + 701: "Crow: Perch point" + + 900: "Follower: Wait point" + 901: "Override jump permission" + 902: "Player squad transition point" + 903: "NPC exit point" + 904: "Strider node" + + 950: "Player Ally: Push away destination" + + 1000: "HL1 World: Machinery" + 1001: "HL1 World: Blinking Light" + 1002: "HL1 World: Human Blood" + 1003: "HL1 World: Alien Blood" + +// 1100: "CS Hostage: Escape Point" + ] + + hintactivity(string) : "Hint Activity" : "" : "Activity associated with this hint node. Various parts of the NPC AI play this activity at times. i.e. Actbusy nodes will play this activity when an NPC acts busy on the node." + + nodeFOV(choices) : "Node FOV" : 180 : "Imagine this node requires that an NPC be in the node's field of view in order to use this hint." = + [ + 45 : "45 Degrees" + 90 : "90 Degrees" + 180 : "180 Degrees" + 360 : "360 Degrees" + ] + + // Does not inherit from EnableDisable, as node itself will + // use that. This is enabling/disabling of the hint only + StartHintDisabled(choices) : "Start Hint Disabled" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + Group(string) : "Hint Group" : "" : "If specified, gives the hint a specific group name. Useful for hint nodes that need to be logically grouped together. NPCs may also refuse to use hint nodes that don't match their hint group." + + TargetNode(node_dest) : "Target node" : -1 : "The node ID of an associated target node, if any." + + IgnoreFacing(choices) : "Ignore Facing" : 2 : "Don't pay attention to the facing of the node. May not apply to a given hint type." = + [ + 0 : "No" + 1 : "Yes" + 2 : "Default" + ] + + MinimumState(choices) : "Minimum State" : 1 : "Require an NPC have a minimum state to use the hint." = + [ + 1 : "Idle" + 2 : "Alert" + 3 : "Combat" + ] + + MaximumState(choices) : "Maximum State" : 3 : "Require an NPC have a maximum state to use the hint." = + [ + 1 : "Idle" + 2 : "Alert" + 3 : "Combat" + ] + + // Inputs + input EnableHint(void) : "Enable hint." + input DisableHint(void) : "Disable hint." +] + +@BaseClass base(Targetname, Parentname, Origin, EnableDisable, Global) = TriggerOnce +[ + spawnflags(flags) = + [ + 1: "Clients" : 1 + 2: "NPCs" : 0 + 4: "Pushables": 0 + 8: "Physics Objects" : 0 + 16: "Only player ally NPCs" : 0 + 32: "Only clients in vehicles" : 0 + 64: "Everything" : 0 + 512: "Only clients *not* in vehicles" : 0 + 1024: "Physics debris" : 0 + 8192: "FF Grenades" : 0 + 16384: "FF Buildables" : 0 + //32768: "FF info_ff_scripts" : 0 + ] + + filtername(filterclass) : "Filter Name" : : "Filter to use to see if activator triggers me. See filter_activator_name for more explanation." + + // Inputs + input Toggle(void) : "Toggles this trigger between enabled and disabled states." + + // Outputs + output OnStartTouch(void) : "Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire." +] + +@BaseClass base(Targetname, Parentname, Origin, EnableDisable, TriggerOnce) = Trigger +[ + output OnEndTouch(void) : "Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire." + output OnEndTouchAll(void) : "Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered." +] + +@BaseClass = worldbase +[ + message(string) : "Map Description / Title" + skyname(string) : "SkyBox Texture Name" : "sky_day01_01" + chaptertitle(string) : "Chapter Title Message" : "" : "Chapter Title that appears onscreen when this level starts." + startdark(choices) : "Level Fade In" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + gametitle(choices) : "Display Game Title" : 0 : "Game Title that appears onscreen when this level starts." = + [ + 0 : "No" + 1 : "Yes" + ] + newunit(choices) : "New Level Unit" : 0 : "Used to clear out savegame data of previous levels to keep the savegame size as small as possible. Only set it to Yes if the player cannot return to any previous levels." = + [ + 0 : "No, keep current" + 1 : "Yes, clear previous levels" + ] + maxoccludeearea(float) : "Max occludee area" : "0" : "Prevents occlusion testing for entities that take up more than X% of the screen." + minoccluderarea(float) : "Min occluder area" : "0" : "Prevents this occluder from being used if it takes up less than X% of the screen." + maxpropscreenwidth(float) : "Start Fade Pixels" : -1 : "Number of pixels wide at which all props in the level start to fade (<0 = use fademaxdist). This number is ignored if the prop has a specific fade distance specified." + minpropscreenwidth(float) : "End Fade Pixels" : 0 : "Minimum number of pixels wide at which the prop is visible (0 = don't fade out). This number is ignored if the prop has a specific fade distance specified." + detailvbsp(string) : "Detail.vbsp file" : "detail.vbsp" : "Detail.vbsp file to use for emitting detail props (found in directory /modname)" + detailmaterial(string) : "Detail material file" : "detail/detailsprites" : "Material for detail sprites to use for drawing detail props" + coldworld(choices) : "World is cold" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] +] + + +//------------------------------------------------------------------------- +// +// World +// +//------------------------------------------------------------------------- + +@SolidClass base(Targetname, worldbase, ResponseContext) = worldspawn : + "This is the world entity. Each map can only contain one, and it's automatically created for you." +[ +] + +@PointClass base(Targetname) iconsprite("editor/ambient_generic.vmt") sphere() = ambient_generic : "Universal ambient sound. Use it to play and control a single sound." +[ + message(sound) : "Sound Name" : "" : "Name of the GameSound entry for the sound to play. Also supports direct .wav filenames." + health(integer) : "Volume" : 10 : "Sound volume, expressed as a range from 0 to 10, where 10 is the loudest." + preset(choices) :"Dynamic Presets" : 0 = // NEEDHELP + [ + 0: "None" + 1: "Huge Machine" + 2: "Big Machine" + 3: "Machine" + 4: "Slow Fade in" + 5: "Fade in" + 6: "Quick Fade in" + 7: "Slow Pulse" + 8: "Pulse" + 9: "Quick pulse" + 10: "Slow Oscillator" + 11: "Oscillator" + 12: "Quick Oscillator" + 13: "Grunge pitch" + 14: "Very low pitch" + 15: "Low pitch" + 16: "High pitch" + 17: "Very high pitch" + 18: "Screaming pitch" + 19: "Oscillate spinup/down" + 20: "Pulse spinup/down" + 21: "Random pitch" + 22: "Random pitch fast" + 23: "Incremental Spinup" + 24: "Alien" + 25: "Bizzare" + 26: "Planet X" + 27: "Haunted" + ] + volstart(integer) : "Start Volume" : 0 // NEEDHELP + fadeinsecs(integer) : "Fade in time in seconds (0-100)" : 0 // NEEDHELP + fadeoutsecs(integer) : "Fade out time in seconds (0-100)" : 0 // NEEDHELP + pitch(integer) : "Pitch" : 100 : "Sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch." + pitchstart(integer) : "Start Pitch" : 100 // NEEDHELP + spinup(integer) : "Spin up time (0-100)" : 0 // NEEDHELP + spindown(integer) : "Spin down time (0-100)" : 0 // NEEDHELP + lfotype(integer) : "LFO type 0)off 1)sqr 2)tri 3)rnd" : 0 // NEEDHELP + lforate(integer) : "LFO rate (0-1000)" : 0 // NEEDHELP + lfomodpitch(integer) : "LFO mod pitch (0-100)" : 0 // NEEDHELP + lfomodvol(integer) : "LFO mod vol (0-100)" : 0 // NEEDHELP + cspinup(integer) : "Incremental Spinup Count" : 0 // NEEDHELP + radius(string) : "Max Audible Distance" : "1250" : "Maximum distance at which this sound is audible." + spawnflags(flags) = + [ + 1: "Play everywhere" : 0 + 16:"Start Silent": 1 + 32:"Is NOT Looped": 1 + ] + SourceEntityName(target_destination) : "SourceEntityName" : : "If an entity is specified, sound will come from this named entity instead of the location of ambient_generic." + + // Inputs + input Pitch(integer) : "Sets the sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch." + input PlaySound(void) : "Starts the sound." + input StopSound(void) : "Stops the sound if it is playing." + input ToggleSound(void) : "Toggles the sound between playing and stopping." + input Volume(integer) : "Sets the sound volume, expressed as a range from 0 to 10, where 10 is the loudest." + input FadeIn(integer) : "Fades the sound up to full volume over a specified number of seconds, with a range from 0 to 100 seconds." + input FadeOut(integer) : "Fades the sound to silence over a specified number of seconds, with a range from 0 to 100 seconds." +] + +@SolidClass base(Targetname) = func_lod : + "Brush-built model that fades out over a specified distance. Useful for creating world detail that doesn't need to be drawn far away, for performance reasons." +[ + DisappearDist(integer) : "Disappear Distance" : 2000 : "Distance at which these brushes should fade out." + Solid(choices) : "Solid" : 0 : "Set whether or not these brushes should collide with other entities." = + [ + 0: "Solid" + 1: "Nonsolid" + ] +] + +@PointClass base(Targetname) = env_zoom : + "An entity that can be used to control the player's FOV. Useful for scenes where the player's view is being controlled, or player-usable binoculars/telescopes, etc." +[ + Rate(float) : "Seconds to reach target" : "1.0" : "Amount of time it should take to reach the specified FOV." + FOV(integer) : "Target FOV" : 75 : "FOV that this entity should set the player's FOV to when active." + + // Inputs + input Zoom(void) : "Start controlling the player's FOV." + input UnZoom(void) : "Stop controlling the player's FOV." + + spawnflags(flags) = + [ + 1: "Allow Suit Zoom" : 0 + ] +] + +@PointClass base(Targetname) = env_screenoverlay: + "An entity that can display and control a set of screen overlays, to be displayed over the player's view. Useful for view effects like drunkenness, or teleporter afterimages, etc." +[ + OverlayName1(string) : "Overlay Name 1" : "" : "Name of the first overlay material to display." + OverlayTime1(float) : "Overlay Duration 1" : "1.0" : "Amount of time that the first overlay should be displayed for, after which it will begin showing the second overlay." + OverlayName2(string) : "Overlay Name 2" : "" : "Name of the second overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime2(float) : "Overlay Duration 2" : "1.0" : "Amount of time that the second overlay should be displayed for, after which it will begin showing the third overlay." + OverlayName3(string) : "Overlay Name 3" : "" : "Name of the third overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime3(float) : "Overlay Duration 3" : "1.0" : "Amount of time that the third overlay should be displayed for, after which it will begin showing the fourth overlay." + OverlayName4(string) : "Overlay Name 4" : "" : "Name of the fourth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime4(float) : "Overlay Duration 4" : "1.0" : "Amount of time that the fourth overlay should be displayed for, after which it will begin showing the fifth overlay." + OverlayName5(string) : "Overlay Name 5" : "" : "Name of the fifth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime5(float) : "Overlay Duration 5" : "1.0" : "Amount of time that the fifth overlay should be displayed for, after which it will begin showing the sixth overlay." + OverlayName6(string) : "Overlay Name 6" : "" : "Name of the sixth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime6(float) : "Overlay Duration 6" : "1.0" : "Amount of time that the sixth overlay should be displayed for, after which it will begin showing the seventh overlay." + OverlayName7(string) : "Overlay Name 7" : "" : "Name of the seventh overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime7(float) : "Overlay Duration 7" : "1.0" : "Amount of time that the seventh overlay should be displayed for, after which it will begin showing the eighth overlay." + OverlayName8(string) : "Overlay Name 8" : "" : "Name of the eighth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime8(float) : "Overlay Duration 8" : "1.0" : "Amount of time that the eighth overlay should be displayed for, after which it will begin showing the ninth overlay." + OverlayName9(string) : "Overlay Name 9" : "" : "Name of the ninth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime9(float) : "Overlay Duration 9" : "1.0" : "Amount of time that the ninth overlay should be displayed for, after which it will begin showing the tenth overlay." + OverlayName10(string) : "Overlay Name 10" : "" : "Name of the tenth overlay material to display. If left blank, overlay displaying will finish, and this entity will consider itself done." + OverlayTime10(float) : "Overlay Duration 10" : "1.0" : "Amount of time that the tenth overlay should be displayed for, after which this entity will stop displaying overlays." + + // Inputs + input StartOverlays(void) : "Start displaying the first overlay." + input StopOverlays(void) : "Stop displaying any overlays." + input SwitchOverlay(float) : "Switch to displaying a specific overlay. Pass in the desired overlay number in the parameter." +] + +@PointClass base(Targetname) = env_screeneffect : + "Allows screenspace effects to be played on the player's view." +[ + type(choices) : "Effect Type" : 0 : "Which effect to use." = + [ + 0 : "Advisor Stun" + 1 : "Intro Blur" + ] + + // Inputs + input StartEffect(float) : "Start the effect with the duration in seconds as the passed parameter." + input StopEffect(float) : "Stop the effect." +] + +@PointClass base(Targetname) = env_texturetoggle : + "An entity that allows you to change the textures on other brush-built entities." +[ + target(target_destination) : "Target Brush(es)." + + // Inputs + input IncrementTextureIndex(void) : "Increments target brush's current texture frame by one." + input SetTextureIndex(integer) : "Sets target brush's texture frame to the specified index." +] + +@PointClass base(Targetname, Angles) = env_splash : + "An entity that creates a splash effect at its origin. If the 'find water surface' spawnflag is set, it will instead trace down below itself to find the water surface on which to create splashes." +[ + scale(float) : "Scale of the splash" : "8.0" + + // Inputs + input Splash(void) : "Create a splash effect." + + spawnflags(flags) = + [ + 1: "Automatically find water surface (place entity above water)" : 0 + 2: "Diminish with depth (diminished completely in 10 feet of water)" : 1 + ] +] + +@PointClass base(Parentname) color(180 10 180) = env_particlelight : + "An entity that can be used to light the smoke particles emitted by env_smokestack entities. Does not light any other particle types." +[ + Color(color255) : "Color" : "255 0 0" : "Color emitted by this light." + Intensity(integer) : "Intensity" : 5000 + + directional(choices) : "Directional" : 0 : "If this is specified, then this light will use the bump map on the particles. Each particle system can have one ambient and one directional light." = + [ + 0 : "No" + 1 : "Yes" + ] + + PSName(string) : "Particle System Entity" : "" : "Set this to the name of the env_smokestack that you want this light to affect." +] + +@PointClass base(Angles) color(255 0 0) = env_sun : + "An entity to control & draw a sun effect in the sky." +[ + target(target_destination) : "Viewer entity" : : "Name of an entity used to determine where the sun is in the skybox. The sun should be lined up on a line from this entity to the env_sun entity." + + use_angles(choices) : "UseAngles" : 0 : "The old way to orient env_sun is to point it at a target. The new way is to specify the angles. If you use the new way, set this property to YES." = + [ + 0 : "No" + 1 : "Yes" + ] + + pitch(integer) : "Pitch" : 0 + + rendercolor(color255) : "Sun Color (R G B)" : "100 80 80" + overlaycolor(color255) : "Overlay Color (R G B)" : "0 0 0" : "A value of 0 0 0 will act the old way." + + size(integer) : "Size" : 16 + overlaysize(integer) : "Overlay Size" : -1 : "A value of -1 means the overlay will act the old way." + + material(sprite) : "Material Name" : "sprites/light_glow02_add_noz" : "Material of the inner glow." + overlaymaterial(sprite) : "Overlay Material Name" : "sprites/light_glow02_add_noz" : "Material of the overlay glow." + + HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode." + + // Inputs + input TurnOn(void) : "Enable sun rendering." + input TurnOff(void) : "Disable sun rendering." + input SetColor(color255) : "Change the sun's color. Format: " +] + +@PointClass base(Targetname) = game_ragdoll_manager : + "An entity to control the number of ragdolls in the world, for performance reasons." +[ + MaxRagdollCount(integer) : "Max Ragdoll Count" : -1 : "Sets the max number of ragdolls that can be in the world at a time (if they are flagged to fade). Set to -1 if you want to use the default value (g_ragdoll_maxcount)." + + SaveImportant(choices) : "Save Important Ragdolls" : 0 : "Should the ragdoll manager make sure ally ragdolls aren't deleted?" = + [ + 0 : "No" + 1 : "Yes" + ] + + + // Inputs + input SetMaxRagdollCount(integer) : "Set the Max Ragdoll Count." +] + +@PointClass base(Targetname) = game_gib_manager : "An entity to control the number of gibs in the world, for performance reasons." +[ + maxpieces(integer) : "Max Gib Count" : -1 : "Sets the max number of gib that can be spawned at a time. Set to -1 if you want to use the default value (func_break_max_pieces)." + input InputSetMaxPieces(integer) : "Set the Max gibs Count." +] + +@PointClass base(Parentname, Targetname, Angles) color(255 128 0) = env_lightglow : + "An entity that puts an additive glow in the world, mostly used over light sources." +[ + rendercolor(color255) : "Color (R G B)" : "255 255 255" + VerticalGlowSize(integer) : "Vertical Size" : 30 + HorizontalGlowSize(integer) : "Horizontal Size" : 30 + MinDist(integer) : "Minimum Distance" : 500 : "The distance at which this effect will be fully translucent." + MaxDist(integer) : "Maximum Distance" : 2000 : "The distance at which this effect will be at full intensity." + OuterMaxDist(integer) : "Outer Maximum Distance" : 0 : "If larger than the maximum distance, this is the length at which the glow will fade completely out, between the span of the maximum distance and this length." + GlowProxySize(float) : "Glow Proxy Geometry Size" : "2.0" : "Size of the glow to be rendered for visibility testing. Must be larger than the distance from the sprite center to empty space. So if this glow is inside geometry (like a light bulb), set this value to be bigger than the bulb's radius. Any time a sphere of this radius would be visible (poking through any nearby geometry), the glow will be rendered." + HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode." + + // Inputs + input Color(color255) : "Change the render color of the glow. Format: " + + spawnflags(flags) = + [ + 1: "Visible only from front" : 0 + ] +] + +@PointClass base(Parentname, Angles) color(255 255 255) = env_smokestack : + "An entity that spits out a constant stream of smoke. See particlezoo.vmf for sample usage. You can place up to two env_particlelight entities near the smoke stack to add ambient light to its particles." +[ + targetname(target_source) : "Name" : : "The name that other entities refer to this entity by." + + InitialState(choices) : "Initial State" : 0 = + [ + 0 : "Off" + 1 : "On" + ] + + BaseSpread(integer) : "Spread at the base" : 20 : "Amount of random spread in the origins of the smoke particles when they're spawned." + SpreadSpeed(integer) : "Spread Speed" : 15 : "Amount of random spread in the velocity of the smoke particles after they're spawned." + Speed(integer) : "Speed" : 30 : "The speed at which the smoke particles move after they're spawned." + StartSize(integer) : "Particle start size" : 20 : "Size of the smoke particles when they're first emitted." + EndSize(integer) : "Particle end size" : 30 : "Size of the smoke particles at the point they fade out completely." + Rate(integer) : "Emission rate" : 20 : "Rate at which to emit smoke particles (i.e. particles to emit per second)." + JetLength(integer) : "Length of smoke trail" : 180 : "Length of the smokestack. Lifetime of the smoke particles is derived from this & particle speed." + WindAngle(integer) : "Wind X/Y Angle" : 0 : "This specifies the wind direction. It is an angle in the XY plane. WindSpeed specifies the strength of the wind." + WindSpeed(integer) : "Wind Speed" : 0 : "The strength of the wind." + SmokeMaterial(string) : "Particle material" : "particle/SmokeStack.vmt" : "Material of the smoke particles emitted by this stack." + twist(integer) : "Twist" : 0 : "The amount, in degrees per second, that the smoke particles twist around the origin." + roll(float) : "Roll Speed": 0 : "Amount of roll in degrees per second." + + rendercolor(color255) : "Base Color (R G B)" : "255 255 255" + + renderamt(integer) : "Translucency" : 255 + + // Inputs + input TurnOn(void) : "Turn on the smokestack." + input TurnOff(void) : "Turn off the smokestack." + input Toggle(void) : "Toggles the smokestack between on and off state." + input JetLength(integer): "Set the length of the smoke trail." + input Rate(integer) : "Set the rate at which to emit smoke particles (particles per second)." + input Speed(integer) : "Set the speed at which the smoke particles move after they're spawned." + input SpreadSpeed(integer) : "Set the amount of random spread in the velocity of the smoke particles after they're spawned." +] + +@PointClass base(Targetname) iconsprite("editor/env_fade") = env_fade : + "An entity that controls screen fades." +[ + spawnflags(flags) = + [ + 1: "Fade From" : 0 + 2: "Modulate" : 0 + 8: "Stay Out" : 0 + ] + duration(string) : "Duration (seconds)" : "2" : "The time that it will take to fade the screen in or out." + holdtime(string) : "Hold Fade (seconds)" : "0" : "The time to hold the faded in/out state." + renderamt(integer) : "Fade Alpha" : 255 : "Alpha of the fade, where 0 = fully transparent and 255 = fully opaque." + rendercolor(color255) : "Fade Color (R G B)" : "0 0 0" + + // Inputs + input Fade(void) : "Start the screen fade." + + // Outputs + output OnBeginFade(void) : "Fired when the fade has begun." +] + +@PointClass base(Targetname) = env_player_surface_trigger : + "An entity that monitors the material of the surface the player is standing on, and fires outputs whenever it changes to/from a specific material." +[ + gamematerial(choices) : "Game Material to Watch" : "0" : "The material to watch. When the player stands on/off this material, this entity's outputs will be fired." = + [ + 0 : "None (player's in the air)" + 67 : "Concrete" + 77 : "Metal" + 68 : "Dirt" + 86 : "Vent" + 71 : "Grate" + 84 : "Tile" + 83 : "Slosh" + 87 : "Wood" + 80 : "Computer" + 89 : "Glass" + 70 : "Flesh" + 73 : "Clip" + 79 : "Foliage" + 78 : "Sand" + ] + + // Inputs + input Enable(void) : "Start watching the player's surface." + input Disable(void) : "Stop watching the player's surface." + + // Outputs + output OnSurfaceChangedToTarget(void) : "Fired when the player moves onto the specified game material." + output OnSurfaceChangedFromTarget(void) : "Fired when the player moves off the specified game material." +] + +@PointClass base(Targetname) iconsprite("editor/env_tonemap_controller.vmt") = env_tonemap_controller : + "An entity that controls the HDR tonemapping for the player. Think of it as a method of controlling the exposure of the player's eyes." +[ + // Inputs + input SetTonemapScale(void) : "Set the player's tonemap scale. It should be a value between 0 and 2, where 0 is the eyes fully closed, 1 is use the unchanged autoexposure (default), and 2 is the eye fully wide open." + input BlendTonemapScale(string) : "Blend from the player's current tonemap scale to a new one. The parameter syntax is as follows: . For example: '0.5 10' would blend from the current tonemap scale to 0.5 over a period of 10 seconds. Tonemap scale is a value between 0 and 2, where 0 is the eyes fully closed, 1 is use the unchanged autoexposure (default), and 2 is the eye fully wide open." + input UseDefaultAutoExposure(void) : "Revert to using the default tonemap auto exposure." + input SetAutoExposureMin(float) : "Set a custom tonemap auto exposure minimum." + input SetAutoExposureMax(float) : "Set a custom tonemap auto exposure maximum." + input SetBloomScale(float) : "Set a custom bloom scale." + input SetTonemapRate(float) : "Set the rate for autoexposure adjustment." +] + +@PointClass base(Targetname, Parentname) sweptplayerhull() = func_useableladder : + "A Half-Life 2 ladder. Handles player auto mount/unmount, as well as +use to get onto the ladder. \n\n" + + "See also 'info_ladder_dismount', used to specify ladder auto-dismount points.\n\n" + + "Note: This entity is non-functional in Counter-Strike: Source. Use func_ladder instead." +[ + spawnflags(flags) = + [ + 1: "Fake Ladder" : 0 + ] + + point0(vector) : "Start" : : "Ladder end point." + point1(vector) : "End" : : "Ladder end point." + + StartDisabled(choices) : "Start Disabled" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Enable(void) : "Enable this ladder." + input Disable(void) : "Disable this ladder." + + output OnPlayerGotOnLadder(void) : "Fired whenever a player gets on this ladder." + output OnPlayerGotOffLadder(void) : "Fired whenever a player gets off this ladder." +] + +@PointClass base(Targetname, Parentname, Angles) size( -16 -16 0, 16 16 72 ) color(127 127 127) = func_ladderendpoint : + "An entity used to specify the endpoints of a ladder. This entity is functional, but has been replaced by the " + + "easier-to-use func_useableladder entity. Left in only for backwards-compatibility!\n\n" + + "To be valid, a full sized player hull traced between the start and end points must not be obstructed at level " + + "activation time. The angle determines in which direction the player leaves the ladder if the player presses the " + + "+jump button.\n\n" + + "Note: This entity is non-functional in Counter-Strike: Source. In CS:S, use func_ladder instead." +[ + target(target_destination) : "Other" : : "A ladder goes between any two func_ladderendpoints pointing at each other." + // TODO: Allow individual ladder end points to be enabled, disabled + // TODO: Allow ladder to specify movement speed or a speed scale while on ladder + // TODO: Allow specifying radius within with you must be in order to +use to get on the ladder +] + +@PointClass base(Parentname) size( -16 -16 0, 16 16 4 ) color(255 128 255)= info_ladder_dismount : + "An entity to handle endpoints for multiple ladders that are too close to each other." +[ + target(target_destination) : "LadderName" : : "If multiple ladders are near multiple endpoints, use this to stop them from interfering with each other." +] + +@SolidClass base(Targetname) color(0 128 255) = func_areaportalwindow : + "An entity that can be used to optimize the visibility in a map. If you seal off an area with them, when the viewer moves the specified distance away from them, they will go opaque and the parts inside the area will not be drawn. The 'target' brush model should enclose the func_areaportal window so no parts of it are culled by the window. If you use the optional foreground brush model, then it should enclose the 'target' brush model." +[ + target(target_destination) : "Rendered Window" : : "The name of a brush model to render as the window." + FadeStartDist(integer) : "Fade Start Distance" : 128 : "When the viewer is closer than this distance, the alpha is set to 'TranslucencyLimit'." + FadeDist(integer) : "Fade End Distance" : 512 : "When the viewer is at this distance, the portal becomes solid and closes off." + TranslucencyLimit(string) : "Translucency limit" : "0.2" : "This value limits the translucency of the bmodel and prevents it from becoming invisible when the viewer is right on top of it." + BackgroundBModel(string) : "Foreground bmodel" : "" : "(Optional) brush model that is drawn after the fading brush model. This model should have alpha in its textures so you can see through it." + PortalVersion(integer) readonly : "Portal Version" : 1 : "(Don't change). Differentiates between shipping HL2 maps and maps using new engine features." +] + +@SolidClass base(Targetname, RenderFields, Global, Shadow) = func_wall : + "Legacy support. Use func_brush instead." +[ + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@SolidClass base(Targetname) = func_clip_vphysics : + "A brush entity that's considered solid to vphysics." +[ + filtername(filterclass) : "Filter Name" : : "Filter to use to see if activator collides with me. See filter_activator_name for more explanation. Allow means 'Allow to Block' for this entity." +] + +@SolidClass base(Targetname, Parentname, Origin, RenderFields, Global, Inputfilter, EnableDisable, Shadow) = func_brush : + "An brush built entity with various features." +[ + spawnflags(flags) = + [ + 2: "Ignore player +USE" : 0 + ] + + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + Solidity(choices) : "Solidity" : 0 : "Used to control the solidity/collision of these brushes." = + [ + 0 : "Toggle" + 1 : "Never Solid" + 2 : "Always Solid" + ] + excludednpc(string) : "NPC class excluded from collisions" : "" : "If an NPC classname is specified here, NPCs of that type won't collide with these brushes." + invert_exclusion(choices) : "Invert NPC class exclusion" : 0 : "If set, then the excluded NPC class will consider this brush solid, and all other NPC classes will consider it non-solid." = + [ + 0 : "No" + 1 : "Yes" + ] + + solidbsp(choices) : "Solid BSP" : 0 : "Set this if this brush is in heirarchy with a moving object of some kind, and the player can stand on this brush." = + [ + 0 : "No" + 1 : "Yes" + ] +] + +//------------------------------------------------------------------------- +// +// A Vgui screen in 3D +// +//------------------------------------------------------------------------- + +@BaseClass base(Targetname, Parentname, Angles) = vgui_screen_base +[ + panelname(string) : "Panel Name" + overlaymaterial(string) : "Overlay Material" : "" : "Name of a material to overlay over the top of the VGUI screen. NOTE: This material must write Z for the VGUI screen to work." + width(integer) : "Panel Width in World" : 32 : "Width of the panel in units." + height(integer) : "Panel Height in World" : 32 : "Height of the panel in units." + + // Inputs + input SetActive(void) : "Make the vgui screen visible." + input SetInactive(void) : "Make the vgui screen invisible." +] + +@PointClass base(vgui_screen_base) size(-4 -4 -4, 4 4 4) = vgui_screen : + "A VGUI screen. Useful for in-world monitors." +[ +] + +//------------------------------------------------------------------------- +// +// Cyclers +// +//------------------------------------------------------------------------- + +@PointClass base(Targetname, Parentname, Angles, RenderFxChoices, RenderFields) studio() = cycler : + "An entity used to display a model for testing purposes. Shooting it with cycle through the model's animations." +[ + spawnflags(flags) = + [ + 1: "Not Solid" : 0 + ] + model(studio) : "Model" + skin(integer) : "Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default." + + sequence(integer) : "Sequence" : 0 : "Default animation sequence for the model to be playing after spawning." + + // Inputs + input SetSequence(string) : "Sets the cycler's sequence." +] + +//------------------------------------------------------------------------- +// +// Environmental effects +// +//------------------------------------------------------------------------- + +@BaseClass base(Targetname, Parentname) = gibshooterbase +[ + angles(string) : "Gib Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction the gibs will fly." + m_iGibs(integer) : "Number of Gibs" : 3 : "Total number of gibs to shoot each time it's activated." + delay(string) : "Delay between shots" : "0" : "Delay (in seconds) between shooting each gib. If 0, all gibs shoot at once." + gibangles(string) : "Gib Angles (Pitch Yaw Roll)" : "0 0 0" : "The orientation of the spawned gibs." + gibanglevelocity(string) : "Max angular velocity" : "0" : "How fast (degrees/sec) the gib pieces should spin. They will spin on x and y axis at between 10% and 100% of this speed." + m_flVelocity(integer) : "Gib Velocity" : 200 : "Speed of the fired gibs" + m_flVariance(string) : "Course Variance" : "0.15" : "How much variance in the direction gibs are fired." + m_flGibLife(string) : "Gib Life" : "4" : "Time in seconds for gibs to live +/- 5%" + lightingorigin(target_destination) : "Lighting Origin" : "" : "Select an info_lighting to specify a location to sample lighting from for all gibs spawned by this shooter, instead of their own origins." + + spawnflags(Flags) = + [ + 1 : "Repeatable" : 0 + ] + + // Inputs + input Shoot(void) : "Force the gibshooter to create and shoot a gib." +] + +@PointClass base(Targetname, Parentname, RenderFxChoices) size(-4 -4 -4, 4 4 4) line(255 255 255, targetname, LightningStart, targetname, LightningEnd) = env_beam : + "An entity that creates a visible beam between two points. The points can be attached to entities to make the beam move around." +[ + renderamt(integer) : "Brightness (1 - 255)" : 100 + rendercolor(color255) : "Beam Color (R G B)" : "255 255 255" + Radius(integer) : "Radius" : 256 : "If the 'Random Strike' spawnflag is set, this radius determines the area within which the endpoints will randomly strike." + life(string) : "Life (seconds 0 = infinite)" : "1" : "Amount of time before the beam dies. Setting to zero will make the beam stay forever." + BoltWidth(float) : "Width of beam" : 2 : "Pixel width of the beam." + NoiseAmplitude(float) : "Amount of noise (0-255)" : 0 : "The amount of noise in the beam. 0 is a perfectly straight beam." + texture(sprite) : "Sprite Name" : "sprites/laserbeam.spr" : "The material used to draw the beam." + TextureScroll(integer) : "Texture Scroll Rate (0-100)" : 35 : "Rate at which the beam texture should scroll along the beam." + framerate(integer) : "Frames per 10 seconds" : 0 : "Framerate at which the beam texture should animate, if it has multiple frames." + framestart(integer) : "Starting Frame" : 0 : "The frame to start the beam texture on." + StrikeTime(string) : "Strike again time (secs)" : "1" : "Refire time between random strikes of the beam. Only used if the 'Random Strike' spawnflag is set." + damage(string) : "Damage / second" : "0" : "How much damage this beam does per second to things it hits when it is continually on, or instantaneously if it strikes. For continuous damage, the value should be greater than 10 or it may not work." + LightningStart(target_destination) : "Start Entity" : "" : "Entity that the beam starts at." + LightningEnd(target_destination) : "Ending Entity" : "" : "Entity that the beam ends at." + decalname(string) : "Decal Name" : "Bigshot" : "Decal to be applied at the end of the beam" + HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode." + + + spawnflags(flags) = + [ + 1 : "Start On" : 0 + 2 : "Toggle" : 0 + 4 : "Random Strike" : 0 + 8 : "Ring" : 0 + 16: "StartSparks" : 0 + 32: "EndSparks" : 0 + 64: "Decal End" : 0 + 128: "Shade Start" : 0 + 256: "Shade End" : 0 + 512: "Taper Out" : 0 + ] + + TouchType(choices) : "Touch Type (tripwire)" : 0 : "If you want the beam to fire an output when touched by entities, choose the entity type here." = + [ + 0 : "Not a tripwire" + 1 : "Player Only" + 2 : "NPC Only" + 3 : "Player or NPC" + 4 : "Player or NPC or Physprop" + ] + + filtername(filterclass) : "Filter Name" : : "Filter to use to see if activator triggers me. See filter_activator_name for more explanation." + + // Inputs + input TurnOn(void) : "Turns the beam on." + input TurnOff(void) : "Turns the beam off." + input Toggle(void) : "Toggles the beam between on and off." + input StrikeOnce(void) : "Causes the beam to strike once. It will stay on for its set Life and then turn off (it will never turn off if Life is set to zero)." + input Alpha(integer) : "Sets the beam's alpha (0 - 255)." + input Color(color255) : "Sets the beam's render color (R G B)." + input Amplitude(float) : "Set the amplitude of beam noise (0 - 255)." + input ScrollSpeed(float) : "Set the scroll speed in units per second (0 - 100)." + input Width(float) : "Set the width of the beam, in pixels." + + // Outputs + output OnTouchedByEntity(void) : "Fired when an entity touches the beam. Only fired if the entity passes the 'Touch Type' choice." +] + +@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) = env_beverage : + "HL1 Legacy: Beverage Dispenser." +[ + health(integer) : "Capacity" : 10 : "Number of cans in the dispenser." + beveragetype(choices) : "Beverage Type" : 0 = + [ + 0 : "Coca-Cola" + 1 : "Sprite" + 2 : "Diet Coke" + 3 : "Orange" + 4 : "Surge" + 5 : "Moxie" + 6 : "Random" + ] + + input Activate(void) : "Enable this dispenser." +] + +@SolidClass base(Targetname, Parentname, Angles) = env_embers : + "An entity used to create a volume in which to spawn fire embers." +[ + particletype(choices) : "Ember type" : 0 = + [ + 0 : "Normal" + 1 : "Smooth Fade" + 2 : "Pulled" + ] + + density(integer) : "Density (particles per second)" : 50 + lifetime(integer) : "Particle Lifetime (seconds)" : 4 + speed(integer) : "Particle Speed (units per second)" : 32 + rendercolor(color255) : "Ember Color (R G B)" : "255 255 255" + + spawnflags(Flags) = + [ + 1 : "Start On" : 0 + 2 : "Toggle" : 0 + ] +] + +@PointClass base(Targetname, Parentname) size(-16 -16 -16, 16 16 16) = env_funnel : + "HL1 Legacy: Large Portal Funnel" +[ + spawnflags(flags) = + [ + 1: "Reverse" : 0 + ] +] + +@PointClass base(Targetname, Parentname) size(-16 -16 -16, 16 16 16) color(255 0 0) = env_blood : + "An entity used to spawn blood effects." +[ + spraydir(angle) : "Spray Direction (Pitch Yaw Roll)" : "0 0 0" : "The general direction that the blood should spray and the direction to trace to apply the decal." + color(choices) : "Blood Color" : 0 = + [ + 0 : "Red (Human)" + 1 : "Yellow (Alien)" + ] + amount(string) : "Amount of blood (damage to simulate)" : "100" + spawnflags(flags) = + [ + 1: "Random Direction" : 0 + 2: "Blood Stream" : 0 + 4: "On Player" : 0 + 8: "Spray decals" : 0 + // dvs: support these flags + //16: "Cloud" : 0 + //32: "Drops" : 0 + //64: "Gore" : 0 + ] + + // Inputs + input EmitBlood(void) : "Triggers the blood effect." +] + +@SolidClass base(Targetname, Parentname) = env_bubbles : + "An entity used to create a volume in which to spawn bubbles." +[ + density(integer) : "Bubble density" : 2 + frequency(integer) : "Bubble frequency" : 2 + current(integer) : "Speed of Current" : 0 : "The speed of the water current in the volume, used to move the bubbles." + spawnflags(Flags) = + [ + 1 : "Start Off" : 0 + ] + + // Inputs + input Activate(void) : "Activates the bubbles." + input Deactivate(void) : "Deactivates the bubbles." + input Toggle(void) : "Toggles the bubbles on and off." + input SetDensity(integer) : "Sets the bubble density." + input SetFrequency(integer) : "Sets bubble emission rate in bubbles per second." + input SetCurrent(integer) : "Sets current speed in inches per second." +] + +@PointClass base(Targetname, Parentname) iconsprite("editor/env_explosion.vmt") = env_explosion : + "An entity that creates an explosion at its origin." +[ + iMagnitude(Integer) : "Magnitude" : 100 : "The amount of damage done by the explosion." + // If no radius override, magnitude will determine radius. + iRadiusOverride(Integer) : "Radius Override" : 0 : "If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude." + fireballsprite(sprite) : "Fireball Sprite" : "sprites/zerogxplode.spr" + rendermode(choices) : "Render Mode" : 5 = + [ + 0: "Normal" + 4: "Solid" + 5: "Additive" + ] + spawnflags(flags) = + [ + 1: "No Damage" : 0 + 2: "Repeatable" : 0 + 4: "No Fireball" : 0 + 8: "No Smoke" : 0 + 16: "No Decal" : 0 + 32: "No Sparks" : 0 + 64: "No Sound" : 0 + 128: "Random Orientation" : 0 + 256: "No Fireball Smoke" : 0 + 512: "No particles" : 0 + 1024: "No DLights" : 0 + 2048: "Don't clamp Min" : 0 + 4096: "Don't clamp Max" : 0 + ] + + // Inputs + input Explode(void) : "Triggers the explosion." +] + +@PointClass base(Targetname, Parentname) color(200 50 0) size(-8 -8 -8, 8 8 8) = env_smoketrail : + "An entity that creates a smoke trail." +[ + opacity(float) : "Sprite Opacity" : "0.75" : "Opacity of the sprites (range from 0 - 1)." + spawnrate(float) : "Spawn Rate" : "20" : "Number of particles to emit each second." + lifetime(float) : "Particle Life Time" : "5.0" : "Number of seconds until each particle dies." + startcolor(color255) : "Start Color" : "192 192 192" : "Starting color of the emitted particles." + endcolor(color255) : "End Color" : "160 160 160" : "Ending color of the emitted particles." + emittime(float) : "Emitter Life Time" : "0" : "Number of seconds until the env_smoketrail stops emitting particles. 0 means never stop emitting particles." + minspeed(float) : "Minimum Random Speed" : "10" : "Minimum randomly-directed speed to use for emitted particles." + maxspeed(float) : "Maximum Random Speed" : "20" : "Maximum randomly-directed speed to use for emitted particles." + mindirectedspeed(float) : "Minimum Directed Speed" : "0" : "Minimum speed along the env_smoketrail's forward direction (x axis) to use for emitted particles." + maxdirectedspeed(float) : "Maximum Directed Speed" : "0" : "Maximum speed along the env_smoketrail's forward direction (x axis) to use for emitted particles." + startsize(float) : "Starting particle size" : "15" : "Starting particle size." + endsize(float) : "Ending particle size" : "50" : "Ending particle size." + spawnradius(float) : "Spawn radius" : "15" : "Distance from env_smoketrail at which particles are emitted." + + firesprite(sprite) : "Fire Sprite" : "sprites/firetrail.spr" + smokesprite(sprite) : "Smoke Puff" : "sprites/whitepuff.spr" +] + +@PointClass base(Targetname, Parentname) sphere() sphere(inner_radius) iconsprite("editor/env_physexplosion.vmt") = env_physexplosion : + "An entity that creates an explosion at its origin. If the no-damage spawnflag is set, the explosion won't be visible, but will apply force to any physics objects within its radius." +[ + magnitude(string) : "Magnitude" : "100" : "Amount of physics force applied by the explosion." + radius(string) : "Clamp Radius (0 = auto)" : "0" : "If specified, the radius in which the explosion damages entities. If unspecified, the radius will be based on the magnitude." + targetentityname(target_destination) : "Limit to Entity" : "" : "If specified, the explosion will only affect the matching entity." + + spawnflags(flags) = + [ + 1 : "No Damage - Only Force" : 1 + 2 : "Push players" : 0 + 4 : "Push radially - not as a sphere" : 0 + 8 : "Test LOS before pushing" : 0 + 16 : "Disorient player if pushed" : 0 + ] + + inner_radius(float) : "Inner radius" : "0" : "If not zero, the LOS is calculated from a point intersecting this sphere." + + // Inputs + input Explode(void) : "Trigger the explosion." + + // Outputs + output OnPushedPlayer(void) : "Fires when the player is pushed by the explosion." +] + +@PointClass base(Targetname, Parentname) line(255 255 255, targetname, directionentityname) iconsprite("editor/env_physexplosion.vmt") = env_physimpact : + "An entity that will cause a physics impact on another entity." +[ + angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 0 0" : "Direction to project the impact." + magnitude(integer) : "Magnitude" : 100 : "Strength of the impact." + distance(integer) : "Distance" : 0 : "How far to project the impact (if 0 uses a default value)." + directionentityname(target_destination) : "Point to Entity" : "" : "If set, 'Distance' and Angle settings are ignored and the direction and distance to the target entity will be used." + + spawnflags(flags) = + [ + 1: "No fall-off" : 0 + 2: "Infinite Length" : 0 + 4: "Ignore Mass" : 0 + ] + + // Inputs + input Impact(void) : "Trigger the impact" +] + + +// This has been disabled until it can be reimplemented, destroyed, or renamed - jdw +//@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) = env_splash : +// "Can be used to create either a spash effect or a stream of falling or spurting liquid." + +// "Will create a splash decal on the collided surface the same color as the liquid" +//[ +// spawnrate(float) : "SpawnRate" : "10" : "How many particles some out" +// startcolor(color255) : "StartColor" : "100 100 100" : "Color of particles when the are emitted" +// endcolor(color255) : "EndColor" : "240 110 0" : "Color that particles approach" +// speed(float) : "Speed" : 3 : "Averate speed of an emitted particles" +// speedrange(float) : "SpeedRange" : 1 : "Speed range of an emitted particles" +// widthmin(float) : "WidthMin" : 2 : "Width of smallest particle emitted" +// widthmax(float) : "WidthMax" : 8 : "Width of largest particle emitted" +// noise(float) : "Noise" : "0.1" : "Amount of directional noise in stream" +// lifetime(float) : "Lifetime" : 5 : "Lifetime of particles (in secs)" +// numdecals(integer) : "Num Decals" : 1 : "Number of decals used (keep small)" +// startactive(choices) : "Start On" : 1 = +// [ +// 0 : "No" +// 1 : "Yes" +// ] +// +// // Inputs +// input SetSpawnRate(float) : "Sets how many particles come out" +// input SetSpeed(float) : "Sets speed of emitted particle" +// input SetNoise(float) : "Sets noise of emitted particle (0-1)" +// input SetLifetime(float) : "Sets lifetime of emitted particles (in seconds)" +// input TurnOn(void) : "Turns particles on" +// input TurnOff(void) : "Turns particles off" +//] + +@PointClass base(Targetname, Parentname, EnableDisable) iconsprite("editor/env_fire") color(0 180 0) = env_fire : + "An entity that handles a single flame at its origin. The flame causes heat 'damage' to other env_fire entities around it, and will eventually ignite non-flaming env_fire entities nearby, causing the fire to spread." +[ + health(integer) : "Duration" : 30 : "Amount of time the fire will burn." + firesize(integer) : "Size" : 64 : "Height (in world units) of the flame." + fireattack(integer) : "Attack" : 4 : "Amount of time the fire takes to grow to full strength." + firetype(choices) : "Type" : 0 = + [ + 0 : "Natural" + 1 : "Plasma" + ] + spawnflags(flags) = + [ + 1: "Infinite Duration" : 0 + 2: "Smokeless" : 0 + 4: "Start On" : 0 + 8: "Start Full" : 0 + 16: "Don't drop" : 0 + 32: "No glow" : 0 + 128: "Delete when out" : 0 + 256: "Visible from above" : 0 + ] + + ignitionpoint(float) : "Ignition Point" : 32 : "Amount of heat 'damage' to take before this flame should ignite." + damagescale(float) : "Damage Scale" : "1.0" : "Multiplier of the burn damage done by the flame." + + // Inputs + input StartFire(void) : "Start the fire." + input Extinguish(float) : "Puts out the fire permanently in the number of seconds specified." + input ExtinguishTemporary(float): "Puts out the fire temporarily in the number of seconds specified." + + // Outputs + output OnIgnited(void) : "Fires when the fire is first ignited." + output OnExtinguished(void) : "Fires when the fire is fully extinguished." +] + +@PointClass base(Targetname, Parentname) iconsprite("editor/env_firesource") color(255 255 0) sphere(fireradius) = env_firesource : + "An entity that provides heat to all nearby env_fire entities. Cannot be extinguished." +[ + spawnflags(flags) = + [ + 1: "Start On" : 0 + ] + + fireradius(float) : "Radius" : 128 : "The radius around this entity in which to provide heat." + firedamage(float) : "Intensity / Damage" : 10 : "Amount of heat 'damage' to apply to env_fire entities within the radius." + + // Inputs + input Enable(void) : "Enable fire source." + input Disable(void) : "Disable fire source." +] + +@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) color(255 255 0) sphere(fireradius) = env_firesensor : + "An entity that detects changes in heat nearby." +[ + spawnflags(flags) = + [ + 1: "Start On" : 1 + ] + + fireradius(float) : "Radius" : 128 : "The radius around this entity in which to detect heat changes." + heatlevel(float) : "Heat level" : 32 : "The target heat level to check for. Outputs are fired when the heat moves over this target level (increasing or decreasing)." + heattime(float) : "Time at level" : 0 : "The amount of time the heat level must spend over the target level before the 'OnHeatLevelStart' output is fired." + + // Inputs + input Enable(void) : "Enable fire sensor." + input Disable(void) : "Disable fire sensor." + output OnHeatLevelStart(void) : "Fires when the heat level has been sustained for the specified length of time." + output OnHeatLevelEnd(void) : "Fires when the heat level drops below the target level." +] + +@PointClass base(Targetname) size(-4 -4 -4, 4 4 4) color(0 180 0) = env_entity_igniter : + "An entity that catches a target entity on fire. If the entity is an animating model, it will have sprite flames attached to its skeleton. Otherwise the entity will emit particle flame puffs." +[ + target(target_destination) : "Entity to ignite" : : "Name of the entity to catch on fire." + lifetime(float) : "Lifetime in seconds" : 10 : "Duration of flames." + + // Inputs + input Ignite(void) : "Ignite the target entity." +] + +@PointClass base(Targetname, DXLevelChoice, Angles) iconsprite("editor/fog_controller.vmt") color(255 255 255) = env_fog_controller : + "An entity that controls the fog and view distance in the map." +[ + // Inputs + input SetStartDist(float) : "Set the fog start distance." + input SetEndDist(float) : "Set the fog end distance." + input TurnOn(void) : "Turn the fog on." + input TurnOff(void) : "Turn the fog off." + input SetColor(color255) : "Set the primary fog color." + input SetColorSecondary(color255) : "Set the secondary fog color." + input SetFarZ(integer): "Set the far clip plane distance." + input SetAngles(string) : "Set the angles to use for the secondary fog direction." + + input SetColorLerpTo(color255) : "Set the primary fog color." + input SetColorSecondaryLerpTo(color255) : "Set the secondary fog color." + input SetStartDistLerpTo(float) : "Set the fog start distance." + input SetEndDistLerpTo(float) : "Set the fog end distance." + input StartFogTransition(void) : "Start fog transition." + + // Starting fog parameters for the level. These are selectable per LOD. + fogenable(choices) : "Fog Enable" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogblend(choices) : "Fog Blend" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + use_angles(choices) : "Use Angles for Fog Dir" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogcolor(color255) : "Primary Fog Color" : "255 255 255" + fogcolor2(color255) : "Secondary Fog Color" : "255 255 255" + fogdir(string) : "Primary Fog Direction" : "1 0 0" + fogstart(string) : "Fog Start" : "500.0" + fogend(string) : "Fog End" : "2000.0" + + foglerptime(float) : "Interpolate time" : "0" + + farz(string) : "Far Z Clip Plane" : "-1" +] + +@PointClass base(Targetname, Parentname, Angles) studioprop("models/editor/spot_cone.mdl") color(255 255 255) = env_steam : + "An entity used to create a jet of steam." +[ + spawnflags(flags) = + [ + 1 : "Emissive" : 0 + ] + + InitialState(choices) : "Initial State" : 0 = + [ + 0 : "Off" + 1 : "On" + ] + + //Type of particle to spew out + type(choices) : "Particle Type" : 0 = + [ + 0 : "Normal" + 1 : "Heat Wave" + ] + + SpreadSpeed(integer) : "Spread Speed" : 15 : "The amount of random spread in the particle's velocity after they spawn." + Speed(integer) : "Speed" : 120 : "The default speed at which the particles move after they spawn." + StartSize(integer) : "Particle start size" : 10 : "The initial size of the particles after they spawn." + EndSize(integer) : "Particle end size" : 25 : "The size of the particles at the point at which they are removed." + Rate(integer) : "Emission rate" : 26 : "The rate of particle emission. i.e. particles per second." + rendercolor(color255) : "Color (R G B)" : "255 255 255" + JetLength(integer) : "Length of steam jet" : 80 : "The length of the jet determines the lifetime of each particle." + renderamt(integer) : "Translucency" : 255 + rollspeed(float) : "How fast does the particles spin" : 8 + + // Inputs + input TurnOn(void) : "Turns the steam jet on." + input TurnOff(void) : "Turns the steam jet off." + input Toggle(void) : "Toggles the steam jet between on and off." + input JetLength(integer) : "Sets the length of steam jet." + input Rate(integer) : "Sets the particle emission rate in particles per second." + input Speed(integer) : "Sets the default speed of the particles in units per second." + input SpreadSpeed(integer) : "Sets the spread speed in units per second." +] + +@PointClass base(Targetname, Parentname, RenderFxChoices) size(-4 -4 -4, 4 4 4) line(255 255 255, targetname, LaserTarget) = env_laser : + "An entity that creates a laser beam between itself and a given target." +[ + LaserTarget(target_destination) : "Target of Laser" : : "Name of entity, or entities, to strike at. The target is randomly chosen if there are multiple entities matching the given name." + renderamt(integer) : "Brightness (1 - 255)" : 100 + rendercolor(color255) : "Beam Color (R G B)" : "255 255 255" + width(float) : "Width of Beam" : 2 : "The width of the laser beam, in pixels." + NoiseAmplitude(integer) : "Amount of noise (0-255)" : 0 : "The amount of noise in the beam. 0 is a perfectly straight beam." + texture(sprite) : "Sprite Name" : "sprites/laserbeam.spr" : "The material used to draw the laser beam." + EndSprite(sprite) : "End Sprite" : "" : "If specified, this sprite will be drawn at the end of the laser beam." + TextureScroll(integer) : "Texture Scroll Rate (0-100)" : 35 : "Rate at which the beam texture should scroll along the beam." + framestart(integer) : "Starting Frame" : 0 : "The frame to start the beam texture on." + damage(string) : "Damage / second" : "100" : "How much damage this laser does. per second. to things it hits." + dissolvetype(choices) : "Dissolve Type" : "None" = + [ + -1 : "None" + 0 : "Energy" + 1 : "Heavy electrical" + 2 : "Light electrical" + ] + spawnflags(flags) = + [ + 1 : "Start On" : 0 + 16: "StartSparks" : 0 + 32: "EndSparks" : 0 + 64: "Decal End" : 0 + ] + + // Inputs + input TurnOn(void) : "Turns the laser on." + input TurnOff(void) : "Turns the laser off." + input Toggle(void) : "Toggles the laser between on and off." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = env_message : + "An entity that draws a text message on player's HUDs." +[ + message(string) : "Message Text" + spawnflags(flags) = + [ + 1: "Play Once" : 0 + 2: "All Clients" : 0 + ] + messagesound(sound) : "Sound Effect" : "" : "When the message is shown, this sound effect will be played, originating from this entity." + messagevolume(string) : "Volume 0-10" : "10" : "Volume of the sound effect." + messageattenuation(Choices) : "Sound Radius" : 0 = + [ + 0 : "Small Radius" + 1 : "Medium Radius" + 2 : "Large Radius" + 3 : "Play Everywhere" + ] + + // Inputs + input ShowMessage(void) : "Shows the message and plays the sound." + + // Outputs + output OnShowMessage(void) : "Fired when the message is activated." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = env_hudhint : + "An entity to control the display of HUD hints. HUD hints are used to show the player what key is bound to a particular command." +[ + message(string) : "Hint Text (localized)" : "" : "This should be set to match the desired HUD hint entry in the hl2\resource\valve_english.txt." + + // Inputs + input ShowHudHint(void) : "Shows the hint message." + input HideHudHint(void) : "Hides the hint message." +] + +@PointClass sphere() iconsprite("editor/env_shake.vmt") base(Targetname, Parentname) = env_shake : + "An entity to control screen shake on players." +[ + spawnflags(flags) = + [ + 1: "GlobalShake" : 0 + //2: "Disrupt player control" : 0 // doesn't work + 4: "In Air" : 0 // shakes objects even if they are not onground + 8: "Physics" : 0 // shakes physically as well as the camera + 16: "Ropes" : 0 // shakes ropes too. + 32: "DON'T shake view (for shaking ropes or physics only)" : 0 + ] + + amplitude(float) : "Amplitude (0-16)" : "4" : "The amount of noise in the screen shake. Should be a range between 0 and 16." + radius(float) : "Effect Radius" : "500" : "The radius around this entity in which to affect players." + duration(float) : "Duration (seconds)" : "1" : "The length of time in which to shake the player's screens." + frequency(float) : "Frequency" : "2.5" : "The frequency used to apply the screen shake. Should be a value between 0 and 255, where 0.1 = jerk, and 255.0 = rumble." + + // Inputs + input Amplitude(string) : "Set the amplitude (0-16)" + input Frequency(string) : "Set the frequence. Should be a value between 0 and 255, where 0.1 = jerk, and 255.0 = rumble." + input StartShake(void) : "Start the shake." + input StopShake(void) : "Stop the shake." +] + +@PointClass sphere() size(-4 -4 -4, 4 4 4) base(Targetname, Parentname) = env_viewpunch : + "Causes a view punch on players." +[ + spawnflags(flags) = + [ + 1: "Punch all players (ignore radius)" : 0 + 2: "Punch players in the air" : 0 + ] + + punchangle(angle) : "Punch angles" : "0 0 90" : "The punch angles to apply." + radius(float) : "Effect Radius" : "500" : "The radius around this entity in which to affect players." + + // Inputs + input ViewPunch(void) : "Performs the view punch." +] + +@PointClass base(Targetname, Parentname) = env_rotorwash_emitter : + "Creates rotorwash." +[ + altitude(float) : "Altitude" : "1024" : "Altitude the rotorwash will show up." +] + +@PointClass base(gibshooterbase) iconsprite("editor/gibshooter.vmt") = gibshooter : + "An entity that shoots out gibs. Style of body part depends on language type." +[ +] + +@PointClass base(gibshooterbase, RenderFields) iconsprite("editor/env_shooter.vmt") = env_shooter : + "An entity that shoots models, or sprites, out of its origin." +[ + shootmodel(studio) : "Model" : "" : "Thing to shoot out. Can be a .mdl or a .vmt." + shootsounds(choices) :"Material Sound" : -1 = + [ + -1: "None" + 0: "Glass" + 1: "Wood" + 2: "Metal" + 3: "Flesh" + 4: "Concrete" + ] + simulation(choices) :"Simulate" : 0 = + [ + 0: "Point" + 1: "Physics" + 2: "Ragdoll" + ] + + skin(integer) : "Gib Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin on all gibs produced by this shooter." + + spawnflags(flags) = + [ + 2 : "On fire" : 0 + 4 : "strict remove after lifetime" : 0 + ] + + nogibshadows(choices) :"Disable Shadows on Gibs" : 0 = + [ + 0: "No" + 1: "Yes" + ] + + gibgravityscale(float) : "Gib gravity scale" : "1" : "ONLY WORKS FOR POINT GIBS. This field allows you to scale gravity so that gibs fall faster, slower, or not at all." +] + +@PointClass base(gibshooterbase, RenderFields) iconsprite("editor/env_shooter.vmt") = env_rotorshooter : + "An entity that creates gibs when it's within the influence of a helicopter's rotor wash." +[ + shootmodel(studio) : "Model" : "" : "Thing to shoot out. Can be a .mdl or a .vmt." + shootsounds(choices) :"Material Sound" : -1 = + [ + -1: "None" + 0: "Glass" + 1: "Wood" + 2: "Metal" + 3: "Flesh" + 4: "Concrete" + ] + simulation(choices) :"Simulate" : 0 = + [ + 0: "Point" + 1: "Physics" + 2: "Ragdoll" + ] + + skin(integer) : "Gib Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin on all gibs produced by this shooter." + + spawnflags(flags) = + [ + 2 : "On fire" : 0 + ] + + rotortime(float) : "Time Under Rotor" : "1" : "The average time it has to be under the rotor before it shoots a gib." + rotortimevariance(float) : "Time variance" : "0.3" : "The random amount to vary the time it has to be under the rotor before it shoots a gib." +] + +@PointClass base(Targetname,Parentname) sphere() iconsprite("editor/env_soundscape.vmt") = env_soundscape_proxy : + "An entity that acts like a soundscape but gets all of its sound parameters from another env_soundscape entity." +[ + MainSoundscapeName(target_destination) : "Soundscape Entity" : "" : "The soundscape to get all sound parameters from." + + radius(integer) : "Radius" : 128 // NEEDHELP: The datadesc doesn't include this entry. Probably not used. +] + +@PointClass base(Targetname,Parentname,EnableDisable) sphere() iconsprite("editor/env_soundscape.vmt") line(255 255 255, targetname, position0) line(255 255 255, targetname, position1) line(255 255 255, targetname, position2) line(255 255 255, targetname, position3) line(255 255 255, targetname, position4) line(255 255 255, targetname, position5) line(255 255 255, targetname, position6) line(255 255 255, targetname, position7) = env_soundscape : + "An entity to control sound in an area. The active soundscape at any time is the last one that had line-of-sight to the player, and was within the radius." +[ + radius(integer) : "Radius" : 128 : "If set to -1, then the player can hear the soundscape as long as he can see it (regardless of distance to it)." + soundscape(choices) : "Soundscape" : "Nothing" : "The name of the soundscape to use. Corresponds to an entry in the soundscapes*.txt file in the hl2\scripts directory." = + [ + "Nothing" : "Nothing" + "Automatic" : "Automatic" + "Automatic_Dialog" : "Automatic (dialog)" + "GenericIndoor" : "Indoor" + "GenericOutdoor" : "Outdoor" + ] + position0(target_destination) : "Sound Position 0" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position1(target_destination) : "Sound Position 1" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position2(target_destination) : "Sound Position 2" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position3(target_destination) : "Sound Position 3" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position4(target_destination) : "Sound Position 4" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position5(target_destination) : "Sound Position 5" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position6(target_destination) : "Sound Position 6" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + position7(target_destination) : "Sound Position 7" : "" : "A sound position that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world." + + // Inputs + input Enable(void) : "Enable the soundscape." + input Disabled(void) : "Disable the soundscape." + input ToggleEnabled(void) : "Toggle the soundscape enabled state." + + // Outputs + output OnPlay(void) : "Fired when this soundscape becomes the active one." +] + +@PointClass base(env_soundscape) sphere() iconsprite("editor/env_soundscape.vmt") = env_soundscape_triggerable : + "An entity that works like env_soundscape except that it works in conjunction with trigger_soundscape to determine when a player hears it." +[ +] + +@PointClass base(Targetname, Parentname, Angles) iconsprite("editor/env_spark.vmt") = env_spark : + "An entity used to create sparks at its origin." +[ + MaxDelay(string) : "Max Delay" : "0" : "The longest delay between sparks (in seconds)." + Magnitude(choices) : "Magnitude" : 1 : "The size of the sparks." = + [ + 1 : "Small" + 2 : "Medium" + 5 : "Large" + 8 : "Huge" + ] + + TrailLength(choices) : "Spark Trail Length" : 1 = + [ + 1 : "Short" + 2 : "Medium" + 3 : "Long" + ] + + spawnflags(flags) = + [ + 64: "Start ON" : 0 + 128: "Glow" : 0 + 256: "Silent" : 0 + 512: "Directional" : 0 + ] + + // Inputs + input StartSpark(void) : "Start the spark effect." + input StopSpark(void) : "Stop the spark effect." + input ToggleSpark(void) : "Toggle the on/off state of the spark effect." + input SparkOnce(void) : "Spark once." +] + +@PointClass base(Targetname, Parentname, RenderFields,DXLevelChoice) size(-2 -2 -2, 2 2 2) sprite() color(20 140 20) = env_sprite : + "An entity that controls the drawing of a sprite in the world." +[ + framerate(string) : "Framerate" : "10.0" : "Rate at which the sprite should animate, if at all." + model(sprite) : "Sprite Name" : "sprites/glow01.spr" : "Material of the sprite to be drawn." + scale(string) : "Scale" : "" : "Scale multiplier of the sprite." + spawnflags(flags) = + [ + 1: "Start on" : 0 + 2: "Play Once" : 0 + ] + + GlowProxySize(float) : "Size of Glow Proxy Geometry." : "2.0" : "Size of the glow to be rendered for visibility testing. Must be larger than the distance from the sprite center to empty space. So if this glow is inside geometry (like a light bulb), set this value to be bigger than the bulb's radius. Any time a sphere of this radius would be visible (poking through any nearby geometry), the glow will be rendered." + + HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode." + + // Inputs + input SetScale(float) : "Set the sprite's scale (0 - 8.0)." + input HideSprite(void) : "Hide the sprite. Won't be drawn until the 'ShowSprite' input is received." + input ShowSprite(void) : "Show the sprite." + input ToggleSprite(void) : "Toggle the sprite between hidden and shown." +] + +@PointClass base(Targetname, Angles) iconsprite("editor/env_wind.vmt") = env_wind : + "An entity to control wind in the map. Partially functional." +[ + //gustsound(sound) : "Gust Sound Filename" : "" : "Sound to be played to simulate the gusting wind." + minwind(integer) : "Min normal speed" : 20 : "Minimum speed of the wind while idling." + maxwind(integer) : "Max normal speed" : 50 : "Maximum speed of the wind while idling." + + mingust(integer) : "Min gust speed" : 100 : "Minimum speed of wind gusts." + maxgust(integer) : "Max gust speed" : 250 : "Maximum speed of wind gusts." + + mingustdelay(integer) : "Min gust delay" : 10 : "Minimum time delay between random gusts." + maxgustdelay(integer) : "Max gust delay" : 20 : "Maximum time delay between random gusts." + + gustduration(integer) : "Gust Duration" : 5 : "How long will the wind gust for." + + gustdirchange(integer) : "Max gust dir change (degrees)" : 20 : "Maximum amount that the wind's direction changes due to a gust." + + output OnGustStart(void) : "Fired when a wind gust begins." + output OnGustEnd(void) : "Fired when a wind gust ends." +] + +@PointClass base(Angles) size(-16 -16 -16, 16 16 16) color(0 0 255) = sky_camera : + "An entity used to control the 3D Skybox. Its origin is used to determine the 3D Skybox's position relative to the map. Place this entity, in the 3D Skybox, at the point where the origin of the map should be." +[ + scale(integer) : "3D Skybox scale" : 16 : "Scale of the skybox." + fogenable(choices) : "Fog Enable" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogblend(choices) : "Fog Blend" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + use_angles(choices) : "Use Angles for Fog Dir" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogcolor(color255) : "Primary Fog Color" : "255 255 255" + fogcolor2(color255) : "Secondary Fog Color" : "255 255 255" + fogdir(string) : "Primary Fog Dir" : "1 0 0" + fogstart(string) : "Fog Start" : "500.0" : "Distance at which the skybox fog should start." + fogend(string) : "Fog End" : "2000.0" : "Distance at which the skybox fog should be fully opaque." +] + +@BaseClass base(Targetname, ResponseContext) = BaseSpeaker +[ + delaymin(string) : "Min Delay Between Announcements" : "15" + delaymax(string) : "Max Delay Between Announcements" : "135" + spawnflags(flags) = + [ + 1: "Start Silent" : 0 + 2: "Play Everywhere" : 0 + ] + rulescript(string) : "Context rule script" : "" : "Script file containing rules for playing appropriate sounds." + concept(string) : "Concept name" : "" : "High level concept name used as primary search key." + + // Inputs + input TurnOn(void) : "Turn on the random announcements." + input TurnOff(void) : "Turn off the random announcements." + input Toggle(void) : "Toggle the random announcements off and on." +] + +//------------------------------------------------------------------------- +// +// Game Entities +// +//------------------------------------------------------------------------- + +@PointClass base(Targetname) = game_weapon_manager : + "An entity used to limit the number of a particular weapon type in the world. Useful in places where NPCs are spawning rapidly, dying, and dropping weapons." +[ + weaponname(string) : "Weapon Classname" : "" : "Classname of the weapon type to limit." + maxpieces(integer) : "Max Allowed in Level" : 0 : "The maximum amount of the specified weapon type allowed in the world." + ammomod(float) : "Ammo modifier" : 1 : "Modifier for ammount of ammo dropped by a weapon." + + // Inputs + input SetAmmoModifier(float): "Adjust the ammo modifier." +] + +@PointClass base(Targetname) iconsprite("editor/game_end.vmt") = game_end : + "An entity that ends a multiplayer game." +[ + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." + input EndGame(void) : "End the multiplayer game." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = game_player_equip : + "An entity that gives equipment to the player who activates it. To use, add new keys to this entity, where each key is the classname of a weapon/item, and the corresponding value is the number of those weapons/items to give to the player who uses this entity. If the 'Use Only' spawnflag isn't set, then players can just touch this entity to get the equipment." +[ + spawnflags(flags) = + [ + 1: "Use Only" : 0 + ] + master(string) : "Team Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = game_player_team : + "An entity that changes the team of the player who activates it." +[ + spawnflags(flags) = + [ + 1 : "Remove On fire" : 0 + 2 : "Kill Player" : 0 + 4 : "Gib Player" : 0 + ] + target(string) : "game_team_master to use" + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = game_score : + "An entity that awards/deducts points from the player who activates it." +[ + spawnflags(flags) = + [ + 1: "Allow Negative" : 0 + 2: "Team Points" : 0 + ] + + points(integer) : "Points to add (+/-)" : 1 + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." + + // Inputs + input ApplyScore(void) : "Add score to player." +] + +@PointClass base(Targetname) iconsprite("editor/game_text.vmt") = game_text : + "An entity that displays text on player's screens." +[ + spawnflags(flags) = + [ + 1: "All Players" : 0 + ] + + message(string) : "Message Text" : "" : "Message to display onscreen." + x(string) : "X (0 - 1.0 = left to right) (-1 centers)" : "-1" : "Horizontal position on the player's screens to draw the text. The value should be between 0 and 1, where 0 is the far left of the screen and 1 is the far right. -1 centers the text." + y(string) : "Y (0 - 1.0 = top to bottom) (-1 centers)" : "-1" : "Vertical position on the player's screens to draw the text. The value should be between 0 and 1, where 0 is the top of the screen and 1 is the bottom. -1 centers the text." + effect(Choices) : "Text Effect" : 0 = + [ + 0 : "Fade In/Out" + 1 : "Credits" + 2 : "Scan Out" + ] + color(color255) : "Color1" : "100 100 100" + color2(color255) : "Color2" : "240 110 0" + fadein(string) : "Fade in Time (or character scan time)" : "1.5" : "The time it should take for the text to fully fade in." + fadeout(string) : "Fade Out Time" : "0.5" : "The time it should take for the text to fade out, after the hold time has expired." + holdtime(string) : "Hold Time" : "1.2" : "The time the text should stay onscreen, after fading in, before it begins to fade out." + fxtime(string) : "Scan time (scan effect only)" : "0.25" : "If the 'Text Effect' is set to Scan Out, this is the time it should take to scan out all the letters in the text." + channel(choices) : "Text Channel" : 1 : "You can have up to four individual game_text messages onscreen at once, stored in channels. Select which channel this text should be placed in, which will overwrite any active message already in that channel." = + [ + 1 : "Channel 1" + 2 : "Channel 2" + 3 : "Channel 3" + 4 : "Channel 4" + ] + master(string) : "Master" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." + + // Inputs + input Display(void) : "Display the message text." +] + +@PointClass base(Parentname, Angles) size(-2 -2 -2, 2 2 2) = point_enable_motion_fixup : + "An entity used to move a motion-disabled prop when it enables motion. Parent this entity to the prop, and when the prop has its motion enabled, it will immediately teleport to the origin of this entity." +[ +] + +@PointClass base(Targetname, Parentname) size(-8 -8 -8, 8 8 8) = point_message : + "An entity that displays a text message in the world, at its origin." +[ + spawnflags(flags) = + [ + 1: "Start Disabled" : 0 + ] + + message(string) : "Entity Message" + radius(integer) : "Show message radius" : 128 : "Distance the player must be within to see this message." + developeronly(choices) : "Developer Only?" : 0 : "If set, this message will only be visible when developer mode is on." = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Enable(void) : "Start displaying the message text, if the player is within the message radius." + input Disable(void) : "Stop displaying the message text." +] + +@PointClass base(Targetname, Parentname, RenderFields, Angles) studio("models/editor/axis_helper_thick.mdl") = point_spotlight : + "An entity to draw a spotlight. Will draw a beam when the player views it side on, and a halo when it's facing towards the player. "+ + "Unless the 'No Dynamic Light' spawnflag is checked, it will also create a dynamic light wherever the end of the spotlight rests." +[ + spawnflags(Flags) = + [ + 1 : "Start On" : 1 + 2 : "No Dynamic Light" : 0 + ] + + spotlightlength(integer) : "Spotlight Length" : 500 : "Length of the spotlight beam." + spotlightwidth(integer) : "Spotlight Width" : 50 : "Width of the spotlight beam." + rendercolor(color255) : "Color (R G B)" : "255 255 255" + HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode." + + // Inputs + input LightOn(void) : "Turn the spotlight on." + input LightOff(void) : "Turn the spotlight off" +] + +@PointClass base(Targetname, Parentname) size(-8 -8 -8, 8 8 8) = point_tesla : + "An entity that creates tesla lightning arcs around its origin." +[ + m_SourceEntityName(string) : "Source Entity" : "" : "If specified, tesla lightning will originate from the specified entity. Otherwise, they originate from this entity." + m_SoundName(string) : "Sound Name" : "DoSpark" : "Sound to be played whenever lightning is created." + + texture(sprite) : "Sprite Name" : "sprites/physbeam.vmt" : "Material to use for the tesla lightning beams." + + m_Color(color255) : "Color" : "255 255 255" + + m_flRadius(integer) : "Radius" : 200 : "Radius around the origin to find a point to strike with a tesla lightning beam." + + beamcount_min(integer) : "Min # of Beams" : 6 : "Minimum number of tesla lightning beams to create when creating an arc." + beamcount_max(integer) : "Max # of Beams" : 8 : "Maximum number of tesla lightning beams to create when creating an arc." + + thick_min(string) : "Min Beam Width" : "4" : "Minimum width of the tesla lightning beams." + thick_max(string) : "Max Beam Width" : "5" : "Maximum width of the tesla lightning beams." + + lifetime_min(string) : "Min Time Visible" : "0.3" : "Minimum lifetime of the tesla lightning beams." + lifetime_max(string) : "Max Time Visible" : "0.3" : "Maximum lifetime of the tesla lightning beams." + + interval_min(string) : "Min Time Between Arcs":"0.5" : "Minimum time delay between random arcing." + interval_max(string) : "Max Time Between Arcs":"2" : "Maximum time delay between random arcing." + + // Inputs + input TurnOn(void) : "Turn emitter on." + input TurnOff(void) : "Turn emitter off." + input DoSpark(void) : "Force a single arc." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = point_clientcommand : + "An entity that issues commands to the client console, as if it was typed in by the player (if activator is a player, or the local player in single player)." +[ + // Inputs + input Command(string) : "Command to execute." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = point_servercommand : + "An entity that issues commands to the server console." +[ + // Inputs + input Command(string) : "Command to execute." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = game_ui : + "An entity used to override player input when the player is looking at it." +[ + spawnflags(flags) = + [ + 32 : "Freeze Player" : 1 + 64 : "Hide Weapon" : 1 + 128 : "+Use Deactivates" : 1 + 256 : "Jump Deactivates" : 1 + ] + + FieldOfView(float) : "FieldOfView" : "-1.0" : "The amount of tolerance in the view checking when determining whether the player's input is still under control. 1.0 = straight ahead, 0.0 = +/- 90 degrees, -1.0 = all directions. If the player isn't within the tolerance, the player regains control." + + // Inputs + input Deactivate(void) : "Return Player Control." + input Activate(void) : "Take Player Control." + + // Outputs + output PlayerOn(void) : "Fired whenever this entity starts controlling the player's input." + output PlayerOff(void) : "Fired whenever this entity stops controlling the player's input." + output PressedMoveLeft(void) : "Fired whenever the player presses the moveleft key." + output PressedMoveRight(void) : "Fired whenever the player presses the moveright key." + output PressedForward(void) : "Fired whenever the player presses the forward key." + output PressedBack(void) : "Fired whenever the player presses the backward key." + output PressedAttack(void) : "Fired whenever the player presses the attack key." + output PressedAttack2(void) : "Fired whenever the player presses the secondary attack key." + + output XAxis(string) : "An output that fires whenever the X axis of the player's input changes. i.e. -1 when the player has moveleft key down, 1 when the player has moveright key down, and 0 if neither." + output YAxis(string) : "An output that fires whenever the Y axis of the player's input changes. i.e. -1 when the player has backward key down, 1 when the player has forward key down, and 0 if neither." + output AttackAxis(string) : "An output that fires whenever the state of the player's attack key changes. i.e. 1 when the player has the attack key down, 0 otherwise." + output Attack2Axis(string) : "An output that fires whenever the state of the player's secondary attack key changes. i.e. 1 when the player has the secondary attack key down, 0 otherwise." +] + +@SolidClass base(Targetname, Parentname) = game_zone_player : + "An entity used to count the number of players within a zone." +[ + // Inputs + input CountPlayersInZone(void) : "Count the number of players in the zone, and fire the corresponding outputs." + + // Outputs + output OnPlayerInZone(void) : "Fired whenever a count finds a player inside the zone, with the player as the activator." + output OnPlayerOutZone(void) : "Fired whenever a count finds a player outside the zone, with the player as the activator." + output PlayersInCount(integer) : "Fired after a count, and contains the number of players found inside the zone." + output PlayersOutCount(integer) : "Fired after a count, and contains the number of players found outside the zone." +] + +//------------------------------------------------------------------------- +// +// Info Entities +// +//------------------------------------------------------------------------- + +@PointClass base(Targetname) decal() studio("models/editor/axis_helper_thick.mdl") = infodecal : + "An entity that places a decal on the world. If the decal has no target name, it will immediately apply itself when the level is loaded. "+ + "If it has a name specified, it won't apply until it receives the 'Activate' input." +[ + texture(decal) + + LowPriority(choices) : "Low Priority (can be replaced)" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Activate(void) : "Force the decal to apply itself to the world." +] + +// A decal to be applied to a prop or the world using specified origin and orientation and radius, uses an orientation angle and a radius to determine +// ray to cast for projection +@PointClass base(Angles,Targetname) decal() studio("models/editor/axis_helper_thick.mdl") = info_projecteddecal : + "An entity that projects a decal onto the world (or props). If the decal has no target name, it will immediately apply itself when "+ + "the level is loaded. If it has a name specified, it won't apply until it receives the 'Activate' input." +[ + texture(decal) + Distance(float) : "Distance" : 64 : "Distance from the origin to project the decal." + + // Inputs + input Activate(void) : "Force the decal to apply itself to the world." +] + +@PointClass = info_no_dynamic_shadow : + "Use this entity to mark surfaces that shouldn't receive dynamic shadows. Useful to apply to walls and floors "+ + "where shadows are drawn improperly, giving away the location of enemies." +[ + sides(sidelist) : "Brush faces" +] + +@PointClass base(PlayerClass, Angles) studio("models/editor/playerstart.mdl") = info_player_start : + "This entity indicates the position and facing direction at which the player will spawn. Any number of "+ + "info_player_start entities may be placed in a map for when working in cordoned-off portions of the map. "+ + "When multiple info_player_start entities are present in a map, set the 'Master' spawnflag on one of them "+ + "to indicate which one should be used when running the entire map." +[ + spawnflags(flags) = + [ + 1: "Master (Has priority if multiple info_player_starts exist)" : 0 + ] +] + +@PointClass size(-1 -1 0, 1 1 1) color(80 150 225) studio("models/editor/overlay_helper.mdl") overlay() = info_overlay : + "An entity that places an overlay on the world." +[ + material(material) : "Material" + sides(sidelist) : "Brush faces" + RenderOrder(integer) : "Render Order" : 0 : "Higher values render after lower values. This value can be 0-3." + StartU(float) : "U Start" : "0.0" + EndU(float) : "U End" : "1.0" + StartV(float) : "V Start" : "0.0" + EndV(float) : "V End" : "1.0" + BasisOrigin(Vector) readonly : "Overlay Basis Origin(Read-Only)" + BasisU(Vector) readonly : "Overlay Basis U(Read-Only)" + BasisV(Vector) readonly : "Overlay Basis V(Read-Only)" + BasisNormal(Vector) readonly : "Overlay Basis Normal(Read-Only)" + uv0(vector) readonly : "Overlay Point 1(Read-Only)" + uv1(vector) readonly : "Overlay Point 2(Read-Only)" + uv2(vector) readonly : "Overlay Point 3(Read-Only)" + uv3(vector) readonly : "Overlay Point 4(Read-Only)" +] + +@PointClass size(-8 -8 -8, 8 8 8) sidelist(sides) sidelist(sides2) overlay_transition() = info_overlay_transition : "Overlay Transition" +[ + material(material) : "Material" + sides(sidelist) : "Brush faces" + sides2(sidelist) : "Water faces" + LengthTexcoordStart(float) : "Texcoord Length Start" : "0.0" + LengthTexcoordEnd(float) : "Texcoord Length End" : "1.0" + WidthTexcoordStart(float) : "Texcoord Width Start" : "0.0" + WidthTexcoordEnd(float) : "Texcoord Width End" : "1.0" + Width1(float) : "Width Land" : "25.0" + Width2(float) : "Width Water" : "25.0" + DebugDraw(integer) : "Show Debug" : 0 : "Boolean value (0 or 1)." +] + +@PointClass size(-4 -4 -4, 4 4 4) color(0 180 0) = info_intermission : + "An entity that defines an intermission spot where dead players will float until they respawn." +[ + target(target_destination) : "Entity to look at" : : "Name of entity that dead players will face while in intermission at this spot." +] + +@PointClass base(Targetname) iconsprite("editor/info_landmark") = info_landmark : + "An entity that acts as a landmark for transitions to another level. There should be a corresponding info_landmark entity in the next map. Entities will be transitioned to the next level relative to the info_landmark entities." +[ +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = info_null : + "An entity that's immediately removed on spawning. Useful as a spotlight target." +[ +] + +@PointClass base(Targetname, Parentname, Angles) iconsprite("editor/info_target.vmt") = info_target : + "An entity that does nothing. Very useful as a positioning entity for other entities to refer to (i.e. the endpoint of an env_beam)" +[ + input DispatchEffect(string) : "Dispatch an effect from this point. Unfinished." +] + +@PointClass base(Targetname, EnableDisable, Parentname, Angles) iconsprite("editor/info_target.vmt") sphere(radius) = phys_ragdollmagnet : + "An entity that acts like a magnet for ragdolls. Useful for crafting exaggerated ragdoll behavior (i.e. guys falling over rails on death). If the "+ + "Bar Magnet spawnflag is set, the magnet works like it was a cylindrical magnet i.e. it attracts ragdolls to the nearest point on a line." +[ + axis(vecline) : "Bar Magnet Axis" + radius(float) : "Effective Radius" : "512" : "Radius in which ragdolls are affected around this entity's origin." + force(float) : "Force" : "5000" : "Magnetic force to apply to ragdolls within the radius. Expressed as kilograms per inch per second. So a force of 1000 will add 10 inches/second to a 100kg man. It will add 100 inches per second to a 10kg headcrab." + + target(string) : "Entity to affect" : "" : "If specified, the phys_ragdollmagnet will only affect the target entity." + + spawnflags( Flags ) = + [ + 2 : "Bar Magnet (use axis helper)" : 0 + ] +] + +@PointClass base(Targetname) iconsprite("editor/info_lighting.vmt") = info_lighting : + "An entity that can be used to change the lighting origin of a prop_static. Set the prop_static's Lighting Origin to point at this entity to "+ + "make the prop_static light as if it was at the info_lighting's origin. Good for prop_static entities that are embedded in world geometry (like rocks/windows/etc)." +[ +] + +// This is obsolete, info_target is all you need now. +@PointClass base(Targetname, Parentname, Angles, PlayerClass) studio("models/editor/playerstart.mdl") = info_teleport_destination : + "An entity that does nothing itself, but can be used to specify the destination for a trigger_teleport entity. An info_target can be used instead." +[ +] + + +//------------------------------------------------------------------------- +// +// Nodes and Hints +// +//------------------------------------------------------------------------- + +@PointClass base(Node) studio("models/editor/ground_node.mdl") color(232 219 8) = info_node : + "A navigation node for ground moving NPCs. Navigation nodes are baked into the nodegraph so that NPCs can move " + + "to them. Ground nodes fall to the ground when they spawn." +[ + spawnflags(Flags) = + [ + 1 : "Force human permission" : 0 + 2 : "Force small_centered permission" : 0 + 4 : "Force wide_human permission" : 0 + 8 : "Force tiny permissiont" : 0 + 16 : "Force wide_short permission" : 0 + 32 : "Force medium permission" : 0 + 64 : "Force tiny_centered permission" : 0 + 128 : "Force large permission" : 0 + 256 : "Force large_centered permission" : 0 + 512 : "Keep editor position" : 0 + ] +] + +@PointClass base(Targetname, Angles, HintNode) studio("models/editor/ground_node_hint.mdl") color(232 219 8) = info_node_hint : + "A navigation node for ground moving NPCs that includes some context information for NPCs that are interested in it. The hint might " + + "indicate a window that could be looked out of, or an item of interest that could be commented on. Many hint nodes are NPC-specific, " + + "so it's helpful to use naming conventions like 'Crow: Fly to point' in the hint choices list. The angles of a hint node indicate what direction " + + "the NPC should face to perform the hint behavior.\n\n" + + "It's important to understand the distinction between scripts, such as scripted_sequence and scripted_schedule, and info_hint entities. Scripts summon " + + "NPCs to specific cue points to play their parts, while hints provide context information to the AI that they use to perform their " + + "behaviors. Hints require code support in the NPC, while scripts are generic and may require only animations to play. Use a hint if the behavior is driven " + + "by the AI, use a script if the behavior is driven by the map." + +[ + // Outputs + output OnNPCStartedUsing(string) : "Fired when an NPC has reached this node and started using it. Passes along the NPC." + output OnNPCStoppedUsing(string) : "Fired when an NPC has stopped using this node. Passes along the NPC." +] + +@PointClass base(Node) studio("models/editor/air_node.mdl") color(232 171 8) = info_node_air : + "A navigation node for flying NPCs. Air navigation nodes are baked into the nodegraph so that NPCs can move " + + "to them. Air nodes do not fall to the ground when they spawn." +[ + nodeheight(integer) : "NodeHeight" : 0 +] + +@PointClass base(Angles, Targetname, HintNode) studio("models/editor/air_node_hint.mdl") color(232 171 8) line(255 255 255, nodeid, TargetNode) = info_node_air_hint : + "A navigation node for flying NPCs that includes some context information for NPCs that are interested in it. The hint might " + + "indicate a window that could be looked into, or an item of interest that could be commented on. Many hint nodes are NPC-specific, " + + "so it's helpful to use naming conventions like 'Crow: Fly to point' in the hint choices list. The angles of a hint node indicate what direction " + + "the NPC should face to perform the hint behavior." + +[ + nodeheight(integer) : "NodeHeight" : 0 +] + +@PointClass base(Targetname, Angles, HintNode) studio("models/editor/node_hint.mdl") color(255 255 255) = info_hint : + "A hint that is not used for navigation. They don't go into the nodegraph, nor do they fall to the ground. Use these to provide " + + "some spatial context for NPCs, such as 'look here if you can't find the player' or 'throw rocks at this spot'." +[ +] + +@PointClass base(Targetname) color(220 180 0) size(-8 -8 -8, 8 8 8) line(255 255 255, nodeid, StartNode, nodeid, EndNode) = info_node_link : + "A dynamic connection between two navigation nodes. You specify the node IDs of the start and end nodes, and then you can use entity I/O " + + "to turn on and off the connection. This could be used to create or destroy a connection in the nodegraph because of some event in your map " + + "(a bridge being created/destroyed, etc)." +[ + StartNode(node_dest) : "Start node ID" : : "The node ID of one end of the node connection." + EndNode(node_dest) : "End node ID" : : "The node ID of one end of the node connection." + initialstate(choices) : "Initial State" : 1 = + [ + 0 : "Off" + 1 : "On" + ] + + linktype(choices) : "Type of Connection" : 1 = + [ + 1 : "Ground" + 2 : "Jump" + 4 : "Fly" + 8 : "Climb" + ] + AllowUse(string) : "Allow Pass When Off" : : "Entity or class to allow passage even when node is off" + + spawnflags( Flags ) = + [ + 1 : "Force human connect" : 0 + 2 : "Force small_centered connect" : 0 + 4 : "Force wide_human connect" : 0 + 8 : "Force tiny connect" : 0 + 16 : "Force wide_short connect" : 0 + 32 : "Force medium connect" : 0 + 64 : "Force tiny_centered connect" : 0 + 128 : "Force large connect" : 0 + 256 : "Force large_centered connect" : 0 + ] + + // Inputs + input TurnOn(void) : "Turn the link on." + input TurnOff(void) : "Turn the link off." +] + +@PointClass wirebox(mins, maxs) base(Targetname) = info_node_link_controller : + "An entity that controls all connections between nodes that intersect the controller's volume. "+ + "This allows for mass enabling/disabling of all node connections through a volume." +[ + mins(vector) : "Mins" : "-8 -32 -36" + maxs(vector) : "Maxs" : "8 32 36" + + initialstate(choices) : "Initial State" : 1 = + [ + 0 : "Off" + 1 : "On" + ] + AllowUse(string) : "Allow Pass When Off" : : "Entity or class to allow passage even when node is off" + + // Inputs + input TurnOn(void) : "Turn the link on." + input TurnOff(void) : "Turn the link off." +] + +@PointClass sphere(radius) base(Targetname, Parentname) = info_radial_link_controller : + "This entity automatically severs node connections that pass through its radius. If it moves, it will restore those connections." +[ + radius(float) : "Radius (Use Helper!)" : 120 +] + +@PointClass base(Targetname, Angles, HintNode) studio("models/editor/climb_node.mdl") color(153 215 103) = info_node_climb : + "A climb-node for AI navigation. Only usable by NPCs that can climb." +[ +] + + +//------------------------------------------------------------------------- +// +// Lights +// +//------------------------------------------------------------------------- +@PointClass light() iconsprite("editor/light.vmt") base(Targetname, Light) sphere(_fifty_percent_distance) sphere(_zero_percent_distance) = light : + "An invisible omnidirectional lightsource." +[ + target(target_destination) : "Entity To Point At" : : "The name of an entity in the map that the spotlight will point at. This will override the spotlight's angles." + spawnflags(Flags) = [ 1 : "Initially dark" : 0 ] + _distance(integer) : "Maximum Distance" : 0 : "This is the distance that light is allowed to cast, in inches." +] + +@PointClass base(Angles) iconsprite("editor/light_env.vmt") = light_environment : + "Sets the color and angle of the light from the sun and sky." +[ + pitch(integer) : "Pitch" : 0 : "The downward pitch of the light from the sun. 0 is horizontal, -90 is straight down." + _light(color255) : "Brightness" : "255 255 255 200" + _ambient(color255) : "Ambient" : "255 255 255 20" + _lightHDR(color255) : "BrightnessHDR" : "-1 -1 -1 1" + _ambientHDR(color255) : "AmbientHDR" : "-1 -1 -1 1" +] + +@PointClass base(Targetname, Angles, Light) lightprop("models/editor/spot.mdl") lightcone() sphere(_fifty_percent_distance) sphere(_zero_percent_distance) = light_spot : + "An invisible and directional spotlight." +[ + target(target_destination) : "Entity to point at" : : "The name of an entity in the map that the spotlight will point at. This will override the spotlight's angles." + _inner_cone(integer) : "Inner (bright) angle" : 30 + _cone(integer) : "Outer (fading) angle" : 45 + _exponent(integer) : "Focus" : 1 + _distance(integer) : "Maximum distance" : 0 : "This is the distance that light is allowed to cast, in inches." + pitch(integer) : "Pitch" : -90 + spawnflags(Flags) = [ 1 : "Initially dark" : 0 ] +] + +@PointClass base(Targetname, Parentname, Angles) iconsprite("editor/light.vmt") sphere(distance) lightcone() size(-4 -4 -4, 4 4 4) = light_dynamic : + "An invisible lightsource that changes in some way over time." +[ + target(target_destination) : "Entity to point at" : : "The name of an entity in the map that the dynamic light will point at." + _light(color255) : "Light color" : "255 255 255 200" + brightness(integer) : "Light brightness" : 0 + _inner_cone(integer) : "Inner (bright) angle" : 30 + _cone(integer) : "Outer (fading) angle" : 45 + pitch(integer) : "Pitch" : -90 + distance(float) : "Maximum distance" : 120 : "This is the distance that light is allowed to cast, in inches." + spotlight_radius(float) : "Spotlight end radius" : 80 : "This is the radius of the light, in inches, at the object that it is hitting." + style(Choices) : "Appearance" : 0 = + [ + 0 : "Normal" + 10: "Fluorescent flicker" + 2 : "Slow, strong pulse" + 11: "Slow pulse, noblack" + 5 : "Gentle pulse" + 1 : "Flicker A" + 6 : "Flicker B" + 3 : "Candle A" + 7 : "Candle B" + 8 : "Candle C" + 4 : "Fast strobe" + 9 : "Slow strobe" + ] + spawnflags(Flags) = + [ + 1 : "No world light" : 0 + 2 : "No model light" : 0 + 4 : "Add Displacement Alpha" : 0 + 8 : "Subtract Displacement Alpha" : 0 + ] + + // Inputs + input Color(color255) : "Set the light's render color (R G B)." + input brightness(integer) : "Set the light brightness." + input distance(float) : "Set the maximum light distance." + input _inner_cone(integer) : "Set the inner (bright) angle." + input _cone(integer) : "Set the outer (fading) angle." + input spotlight_radius(float) : "Set the radius of the spotlight at the end point." + input style(integer) : "Change the lightstyle (see Appearance field for possible values)." + + input TurnOn(void) : "Turn the light off." + input TurnOff(void) : "Turn the light on." + input Toggle(void) : "Toggle the light on/off." +] + + +//------------------------------------------------------------------------- +// Shadow control +//------------------------------------------------------------------------- + +@PointClass base(Targetname) iconsprite("editor/shadow_control.vmt") = shadow_control : + "An entity to control the shadows in the map." +[ + angles(string) : "Pitch Yaw Roll (Y Z X)" : "80 30 0" : "This is the shadow direction. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, and roll is the rotation around the X axis." + + color(color255) : "Shadow Color" : "128 128 128" : "This is the color of the shadows." + distance(float) : "Maximum Distance" : 75 : "This is the maximum distance the shadow is allowed to cast, in inches." + disableallshadows(Choices) : "All Shadows Disabled" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input color(color255) : "Set the shadow color." + input direction(vector) : "Set the shadow direction." + input SetDistance(float) : "Set the maximum shadow cast distance." + input SetAngles(string) : "Set the shadow direction." + input SetShadowsDisabled(integer) : "Set shadows disabled state." +] + + +//------------------------------------------------------------------------- +// Color correction control +//------------------------------------------------------------------------- + +@PointClass base(Targetname, EnableDisable) iconsprite("editor/shadow_control.vmt") = color_correction : + "An entity to control the color correction in the map." +[ + minfalloff(float) : "Lookup Falloff Start Distance" : "0.0" : "This is the distance to the start of the falloff region" + maxfalloff(float) : "Lookup Falloff End Distance" : "200.0" : "This is the distance to the end of the falloff region" + maxweight(float) : "Maximum Weight" : "1.0" : "This is the maximum weight for this lookup" + filename(string) : "Lookup Table Filename" : "" : "This is the lookup table filename" + + // Inputs + input filename(string) : "Set the lookup table filename." +] + + +//------------------------------------------------------------------------- +// Color correction volume control +//------------------------------------------------------------------------- + +@SolidClass base(Targetname, EnableDisable ) iconsprite("editor/shadow_control.vmt") = color_correction_volume : + "An entity to control the color correction in the map." +[ + fadeDuration(float) : "Lookup Fade Duration" : "10.0" : "This is the duration for the lookup to fade in/out on extry/exit" + maxweight(float) : "Maximum Weight" : "1.0" : "This is the maximum weight for this lookup" + filename(string) : "Lookup Table Filename" : "" : "This is the lookup table filename" + + // Inputs + input filename(string) : "Set the lookup table filename." +] + + +//------------------------------------------------------------------------- +// +// Movement and Keyframing Entities +// +//------------------------------------------------------------------------- + +@BaseClass = KeyFrame +[ + NextKey(target_destination) : "Next KeyFrame" : : "Name of the next keyframe along this keyframe path." + +// TimeModifier(choices) : "Time Modifier" : 0 = +// [ +// 0 : "Linear" +// 1 : "Accel" +// 2 : "Deaccel" +// 2 : "Accel/Deaccel (sine)" +// ] + + MoveSpeed(integer) : "Speed (units per second)" : 64 // NEEDHELP +// NextTime(string) : "Time to get to next keyframe" +] + +@BaseClass = Mover +[ + PositionInterpolator(choices) : "Position Interpolator" : 0 = + [ + 0 : "Linear" + 1 : "Catmull-Rom Spline" + ] +] + +@SolidClass base(Targetname, Parentname, Origin, RenderFields) = func_movelinear : + "A brush entity that moves linearly along a given distance, in a given direction." +[ + movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction the brushes will move, when told to." + spawnflags(flags) = + [ + 8 : "Not Solid" : 0 + ] + + startposition(float) : "Start Position" : 0 : "Position of brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance)." + speed(integer) : "Speed" : 100 : "The speed that the brush moves, in inches per second." + movedistance(float) : "Move Distance" : 100 : "The distance from the starting point that the brush should move, in inches." + blockdamage(float) : "Block Damage" : 0 : "The amount of damage to do to any entity that blocks the brushes, per frame." + startsound(sound) : "Sound played when the brush starts moving." + stopsound(sound) : "Sound played when the brush stops moving." + + // Inputs + input Open(void) : "Move the brush to the end position (starting position + (move direction * move distance))." + input Close(void) : "Move the brush to the starting position." + input SetPosition(string) : "Move the brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance)." + + // Outputs + output OnFullyOpen(void) : "Fired when the brush reaches the end position (starting position + (move direction * move distance))." + output OnFullyClosed(void) : "Fired when the brush reaches the starting position." +] + +@SolidClass base(Targetname, Parentname, Origin) = func_water_analog : + "A water brush entity that moves linearly along a given distance, in a given direction" +[ + movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction the water will move, when told to 'Open'." + startposition(float) : "Start Position" : 0 : "Position of the water brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance)." + speed(integer) : "Speed" : 100 : "The speed that the water brush moves, in inches per second." + movedistance(float) : "Move Distance" : 100 : "The distance from the starting point that the water brush should move, in inches." + startsound(sound) : "Sound played when the water brush starts moving." + stopsound(sound) : "Sound played when the water brush stops moving." + WaveHeight(string) : "Wave Height" : "3.0" + + // Inputs + input Open(void) : "Move the water brush to the end position (starting position + (move direction * move distance))." + input Close(void) : "Move the water brush to the starting position." + input SetPosition(string) : "Move the water brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance)." + + // Outputs + output OnFullyOpen(void) : "Fired when the water brush reaches the end position (starting position + (move direction * move distance))." + output OnFullyClosed(void) : "Fired when the water brush reaches the starting position." +] + +@SolidClass base(Targetname, Parentname, Origin, Angles, RenderFields, Shadow) = func_rotating : + "A rotating brush entity." +[ + maxspeed(integer) : "Max Rotation Speed" : 100 : "The maximum rotation speed of the brushes, in degrees per second." + fanfriction(integer) : "Friction (0 - 100%)" : 20 : "The amount of rotational friction. Value must be between 0 and 100 %." + message(sound) : "Rotating sound WAV" : : "Sound to play while rotating." + volume(integer) : "Volume (10 = loudest)" : 10 : "The volume of the rotation sound." + spawnflags(flags) = + [ + 1 : "Start ON" : 0 + 2 : "Reverse Direction" : 0 + 4 : "X Axis" : 0 + 8 : "Y Axis" : 0 + 16: "Acc/Dcc" : 0 + 32: "Fan Pain" : 0 + 64: "Not Solid" : 0 + 128: "Small Sound Radius" : 0 + 256: "Medium Sound Radius" : 0 + 512: "Large Sound Radius" : 1 + ] + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + dmg(integer) : "Blocking Damage" : 0 : "Damage done to any entity that blocks the rotation, per frame." + + solidbsp(choices) : "Solid Type" : 0 = + [ + 0 : "VPhysics" + 1 : "BSP" + ] + + // Inputs + input SetSpeed(integer) : "Set the speed as a ratio of the specified Max Rotation Speed, where 0 is stopped and 1 is the Max Rotation Speed.." + input Start(void) : "Start the rotator rotating." + input Stop(void) : "Stop the rotator from rotating." + input StopAtStartPos(void) : "Stop the rotator from rotating when it gets around to the start position again (on its rotation axis)." + input StartForward(void) : "Start the rotator rotating forward." + input StartBackward(void) : "Start the rotator rotating backward." + input Toggle(void) : "Toggle the rotator between rotating and not rotating." + input Reverse(void) : "Reverse the direction of rotation of the rotator." +] + +@SolidClass base(Targetname, Parentname, Origin, Angles, RenderFields, BasePlat, Shadow) = func_platrot : + "A brush entity that moves vertically, and can rotate while doing so." +[ + spawnflags(Flags) = + [ + 1: "Toggle" : 1 + 64: "X Axis" : 0 + 128: "Y Axis" : 0 + ] + noise1(sound) : "Movement Sound" : : "The sound to play when the brush moves." + noise2(sound) : "Stop Sound" : : "The sound to play when the brush stops moving." + speed(integer) : "Speed of Rotation" : 50 : "Speed at which the brush rotates, in degrees per second." + height(integer) : "Travel Altitude" : 0 : "The vertical distance from the starting position that this platform moves. If negative, the platform will lower." + rotation(integer) : "Spin amount" : 0 : "The amount this platform should rotate as it moves, in degrees." + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@KeyFrameClass base(Targetname, Parentname, Angles, KeyFrame) size(-6 -6 -6, 6 6 6) color(255 200 0) keyframe() = keyframe_track : + "Animation KeyFrame" +[ +] + +@MoveClass base(Targetname, Parentname, KeyFrame, Mover) size(-8 -8 -8, 8 8 8) color(255 170 0) animator() = move_keyframed : + "Keyframed Move Behavior" +[ +] + +@MoveClass base(Targetname, Parentname, Mover, KeyFrame) size(-8 -8 -8, 8 8 8) color(255 0 0) animator() = move_track : + "Track Move Behavior" +[ + WheelBaseLength(integer) : "Distance between the wheels" : 50 + Damage(integer) : "Damage done to blocking entities" : 0 + NoRotate(choices) : "Turn to face down path" : 0 = + [ + 0 : "Yes" + 1 : "No" + ] +] + +//------------------------------------------------------------------------- +// +// Ropes and Cables +// +//------------------------------------------------------------------------- +@BaseClass base(DXLevelChoice) = RopeKeyFrame +[ + spawnflags(Flags) = + [ + 1 : "Auto Resize" : 0 + ] + + Slack(integer) : "Slack" : 25 : "How much extra length the rope has (by default it has the length between its two endpoints in the editor)." + + Type(choices) : "Type" : 0 = + [ + 0 : "Rope" + 1 : "Semi-rigid" + 2 : "Rigid" + ] + + Subdiv(integer) : "Subdivision" : 2 : "Number of subdivisions between each rope segment. Maximum value is 8. Higher values make smoother ropes, but are slower to render." + + Barbed(choices) : "Barbed" : 0 : "Test effect that makes the rope look sharper and more barbed." = + [ + 0 : "No" + 1 : "Yes" + ] + + Width(string) : "Width (1-64)" : "2" : "Width of the rope." + + TextureScale(string) : "Texture Scale" : "1" : "This changes the texture resolution. The default resolution is 4 pixels per inch. Larger values stretch the texture and smaller values scrunch it up." + + Collide(choices) : "Collide with world" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + Dangling(choices) : "Start Dangling" : 0 : "When set to Yes, the rope starts out detached from its target endpoint." = + [ + 0 : "No" + 1 : "Yes" + ] + + Breakable(choices) : "Breakable" : 0 : "When set to yes, the rope can be detached from either endpoint when shot." = + [ + 0 : "No" + 1 : "Yes" + ] + + RopeMaterial(material) : "Rope Material" : "cable/cable.vmt" : "The material to use when rendering the rope." + + // Inputs + input SetScrollSpeed(float) : "Set the speed at which the texture scrolls." + input SetForce(string) : "Apply a force instantaneously to the rope. The parameter should be a vector containing the force to be applied (X Y Z)." + input Break(void) : "Break the rope, if it's marked to do so." +] + +@KeyFrameClass base(Targetname, Parentname, KeyFrame, RopeKeyFrame) studio("models/editor/axis_helper_thick.mdl") keyframe() = keyframe_rope : + "A node entity that marks a point in a rope. The first node in the rope should be a move_rope, followed by 1 or more keyframe_ropes." +[ +] + +@MoveClass base(Targetname, Parentname, KeyFrame, RopeKeyFrame) studio("models/editor/axis_helper.mdl") animator() = move_rope : + "The first node in set of nodes that are used to place ropes in the world. It should connect to 1 or more keyframe_rope entities." +[ + PositionInterpolator(choices) : "Position Interpolator" : 2 : "Curve Type. Currently only type 2 (Rope) is fully supported." = + [ + 0 : "Linear" + 1 : "Catmull-Rom Spline" + 2 : "Rope" + ] +] + + +//------------------------------------------------------------------------- +// +// Buttons +// +//------------------------------------------------------------------------- + +@BaseClass = Button +[ + // Inputs + input Lock(void) : "Lock the button, preventing it from functioning." + input Unlock(void) : "Unlock the button, allowing it to function." + input Press(void) : "Activate the button, as if it was pressed." + + // Outputs + output OnDamaged(void) : "Fired when the button is damaged." + output OnPressed(void) : "Fired when the button is pressed." + output OnUseLocked(void) : "Fired when the button is used while locked." + output OnIn(void) : "Fired when the button reaches the in/pressed position." + output OnOut(void) : "Fired when the button reaches the out/released position." +] + +@SolidClass base(Targetname, Parentname, Origin, RenderFields, Button) = func_button : + "A brush entity that's designed to be used for a player-useable button. When used by the player, it moves to a pressed position." +[ + movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "Specifies the direction of motion to move when the button is used." + speed(integer) : "Speed" : 5 : "The speed that the button moves, in inches per second." + health(integer) : "Health (Obsolete)" : 0 : "Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead." + lip(integer) : "Lip" : 0 : "The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall." + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be pressed." + sounds(choices) : "Sounds" : 0 = + [ + 0: "None (Silent)" + 1: "Big zap & Warmup" + 2: "Access Denied" + 3: "Access Granted" + 4: "Quick Combolock" + 5: "Power Deadbolt 1" + 6: "Power Deadbolt 2" + 7: "Plunger" + 8: "Small zap" + 9: "Keycard Sound" + 10: "Buzz" + 11: "Buzz Off" + 12: "latch locked" + 13: "Latch Unlocked" + 14: "Lightswitch" + 15: "small bleek" + 16: "small deny" + 17: "small doop" + 18: "small tech deny" + 19: "click and combine screen fuzz" + 20: "roomy beep" + 21: "lever or wheel: turn + move sqeek" + 22: "lever or wheel: latch + release gas" + 23: "lever or wheel: ratchet + sqeek" + 24: "lever or wheel: large ratchet" + 25: "lever or wheel: clanky + gas release" + 26: "lever or wheel: latch + large metal thud" + 27: "lever or wheel: smaller ratchet" + 28: "lever or wheel: smaller lever move" + 31: "shock buzz" + 32: "clickbeep" + 33: "tech blip" + 34: "clickbeepbeep open" + 35: "small high blip" + 36: "small tech fuzz blip" + 37: "small click bleep (change to lightswitch)" + 40: "combine door lock - locked" + 41: "combine blip growl" + 42: "combine squick growl" + 43: "combine whine purr" + 44: "combine click talk" + 45: "combine click growl fizz" + 46: "combine click fizz (deny)" + 47: "combine click talker" + ] + wait(integer) : "Delay Before Reset (-1 stay)" : 3 : "Amount of time, in seconds, after the button has been pressed before it returns to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns." + spawnflags(flags) = + [ + 1: "Don't move" : 0 + 32: "Toggle" : 0 + 256: "Touch Activates": 0 + 512: "Damage Activates": 0 + 1024: "Use Activates" : 1 + 2048: "Starts locked" : 0 + 4096: "Sparks" : 0 + ] + locked_sound(choices) : "Locked Sound" : 0 : "Sound played when the player tries to use the button, and fails because it's locked." = + [ + 0: "None" + 2: "Access Denied" + 8: "Small zap" + 10: "Buzz" + 11: "Buzz Off" + 12: "Latch Locked" + ] + unlocked_sound(choices) : "Unlocked Sound" : 0 : "Sound played when the button is unlocked." = + [ + 0: "None" + 1: "Big zap & Warmup" + 3: "Access Granted" + 4: "Quick Combolock" + 5: "Power Deadbolt 1" + 6: "Power Deadbolt 2" + 7: "Plunger" + 8: "Small zap" + 9: "Keycard Sound" + 10: "Buzz" + 13: "Latch Unlocked" + 14: "Lightswitch" + ] + locked_sentence(choices) : "Locked Sentence" : 0 : "A sentence played when the player tries to use the button, and fails because it's locked." = + [ + 0: "None" + 1: "Gen. Access Denied" + 2: "Security Lockout" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance Door" + 9: "Broken Shut Door" + ] + unlocked_sentence(choices) : "Unlocked Sentence" : 0 : "A sentence played when the button is unlocked." = + [ + 0: "None" + 1: "Gen. Access Granted" + 2: "Security Disengaged" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance area" + ] + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@SolidClass base(Targetname, Parentname, Origin, Angles, Global, Button, EnableDisable) = func_rot_button : + "A brush entity that's designed to be used for a rotating player-useable button. When used by the player, it rotates to a pressed position." +[ + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be used." + speed(integer) : "Speed" : 50 : "The speed that the button rotates, in degrees per second." + health(integer) : "Health (Obsolete)" : 0 : "Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead." + sounds(choices) : "Sounds" : 21 = + [ + 0: "None (Silent)" + 21: "Squeaky" + 22: "Squeaky Pneumatic" + 23: "Ratchet Groan" + 24: "Clean Ratchet" + 25: "Gas Clunk" + ] + wait(integer) : "Delay Before Reset (-1 stay)" : 3 : "Amount of time, in seconds, after the button has been pressed before it returns to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns." + distance(integer) : "Distance (deg)" : 90 : "The amount, in degrees, that the button should rotate when it's pressed." + // TODO: move spawnflags into Button base class? + spawnflags(flags) = + [ + 1 : "Not solid" : 0 + 2 : "Reverse Dir" : 0 + 32: "Toggle" : 0 + 64: "X Axis" : 0 + 128: "Y Axis" : 0 + 256: "Touch Activates": 0 + 512: "Damage Activates": 0 + 1024: "Use Activates": 0 + 2048: "Starts locked" : 0 + ] + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@SolidClass base(Targetname, Parentname, Origin, Angles, RenderFields) = momentary_rot_button : + "A brush entity that's designed to be used for rotating wheels, where the player can rotate them to arbitrary positions before stopping." +[ + speed(integer) : "Speed (deg/sec)" : 50 : "The amount, in degrees, that the wheel turns per second." + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be used." + sounds(choices) : "Sounds" : 0 = + [ + 0: "None" + 1: "Big zap & Warmup" + 2: "Access Denied" + 3: "Access Granted" + 4: "Quick Combolock" + 5: "Power Deadbolt 1" + 6: "Power Deadbolt 2" + 7: "Plunger" + 8: "Small zap" + 9: "Keycard Sound" + 21: "Squeaky" + 22: "Squeaky Pneumatic" + 23: "Ratchet Groan" + 24: "Clean Ratchet" + 25: "Gas Clunk" + ] + distance(integer) : "Distance" : 90 : "The maximum amount, in degrees, that the wheel is allowed to rotate." + returnspeed(integer) : "Auto-return speed" : 0 : "If the 'Toggle' spawnflag is not set, the speed at which the wheel auto-returns when left alone, in degrees per second." + spawnflags(flags) = + [ + 1: "Not Solid" : 1 + 32: "Toggle (Disable Auto Return)" : 1 + 64: "X Axis" : 0 + 128: "Y Axis" : 0 + 1024: "Use Activates" : 1 + 2048: "Starts locked" : 0 + 8192: "Jiggle when used while locked" : 0 + ] + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + startposition(float) : "Start Position" : 0 : "Postion when spawned. The value is a range between 0.0 and 1.0, where 0 is the unrotated position and 1 is the rotated position + 'Distance'." + startdirection(choices) : "Start Direction" : "Forward" = + [ + -1 : "Forward" // Reverses upon USE, so are + 1 : "Backward" // reversed here. + ] + solidbsp(choices) : "Solid BSP" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Lock(void) : "Lock the button, preventing it from functioning." + input Unlock(void) : "Unlock the button, allowing it to function." + input SetPosition(string) : "Move to a position. The parameter must be a value between 0 and 1, where 0 is the unrotated position and 1 is the rotated position + 'Distance'." + input SetPositionImmediately(string) : "Immediately teleport to a position. The parameter must be a value between 0 and 1, where 0 is the unrotated position and 1 is the rotated position + 'Distance'." + + // Outputs + output Position(integer) : "Fired whenever the button moves. The output is the position of button from 0 to 1, where 0 is the unrotated position and 1 is the rotated position + 'Distance'." + output OnPressed(integer) : "Fired when the button is first pressed." + output OnUnpressed(integer): "Fired when the button is first released from being pressed." + output OnFullyClosed(void) : "Fired when the button has reached position 1, the rotated position + 'Distance'." + output OnFullyOpen(void) : "Fired when the button has reached position 0, the unrotated starting position." + output OnReachedPosition(void) : "Fired whenever the button reaches a goal position: i.e. when it becomes open, becomes closed, or reaches the point specified by a 'SetPosition' input." +] + + +//------------------------------------------------------------------------- +// +// Doors +// +//------------------------------------------------------------------------- + +@BaseClass base(Targetname, Parentname, RenderFields, Global, Shadow) = Door +[ + speed(integer) : "Speed" : 100 : "The speed at which the door moves." + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be used." + noise1(sound) : "Start Sound" : : "Sound to play when the door starts moving." + noise2(sound) : "Stop Sound" : : "Sound to play when the door stops moving." + wait(integer) : "Delay Before Reset (-1 stay)" : 4 : "Amount of time, in seconds, after the door has opened before it closes. Once it has closed, it can be used again. If the value is set to -1, the door never closes itself." + lip(integer) : "Lip" : 0 : "The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall." + dmg(integer) : "Blocking Damage" : 0 : "Amount of damage done to entities that block the movement of this door, per frame." + forceclosed(choices) : "Force Closed" : 0 : "If set, this door will close no matter what. Useful for doors that have to close even if the player tries to block them with objects." = + [ + 0 : "No" + 1 : "Yes" + ] + ignoredebris(choices) : "Ignore Debris" : 0 : "If set this will change the door's collision group to one that ignore collisions with debris objects (note that this is not compatible with the non-solid-to-player spawnflag)." = + [ + 0 : "No" + 1 : "Yes" + ] + + message(string) : "Message If Triggered" // NEEDHELP: Looks like this was removed + health(integer) : "Health (shoot open)" : 0 // NEEDHELP: Looks like this was removed + + locked_sound(sound) : "Locked Sound" : : "Sound played when the player tries to use the door, and fails because it's locked." + unlocked_sound(sound) : "Unlocked Sound" : : "Sound played when the button is door." + + spawnflags(flags) = + [ + 1 : "Starts Open" : 0 + 4 : "Non-solid to Player" : 0 + 8: "Passable" : 0 + 32: "Toggle" : 0 + 256:"Use Opens" : 0 + 512: "NPCs Can't" : 0 + 1024: "Touch Opens" : 1 + 2048: "Starts locked" : 0 + 4096: "Door Silent" : 0 + ] + locked_sentence(choices) : "Locked Sentence" : 0 : "A sentence played when the player tries to use the door, and fails because it's locked." = + [ + 0: "None" + 1: "Gen. Access Denied" + 2: "Security Lockout" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance Door" + 9: "Broken Shut Door" + ] + unlocked_sentence(choices) : "Unlocked Sentence" : 0 : "A sentence played when the door is unlocked." = + [ + 0: "None" + 1: "Gen. Access Granted" + 2: "Security Disengaged" + 3: "Blast Door" + 4: "Fire Door" + 5: "Chemical Door" + 6: "Radiation Door" + 7: "Gen. Containment" + 8: "Maintenance area" + ] + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + loopmovesound(choices) : "Loop Moving Sound?" : 0 : "If set to true, the door's 'Start Sound' will be continually looped until the door finishes moving." = + [ + 0: "No" + 1: "Yes" + ] + + // Outputs + output OnClose(void) : "Fired when the door starts closing." + output OnOpen(void) : "Fired when the door starts opening." + output OnFullyOpen(void) : "Fired when the door reaches the fully open position." + output OnFullyClosed(void) : "Fired when the door reaches the fully closed position." + output OnBlockedClosing(void) : "Fired when the door is blocked while closing." + output OnBlockedOpening(void) : "Fired when the door is blocked while opening." + output OnUnblockedClosing(void) : "Fired when the door is unblocked while closing." + output OnUnblockedOpening(void) : "Fired when the door is unblocked while opening." + + // Inputs + input Open(void) : "Open the door, if it is not fully open." + input Close(void) : "Close the door, if it is not fully closed." + input Toggle(void) : "Toggle the door between open and closed." + input Lock(void) : "Lock the door." + input Unlock(void) : "Unlock the door." + input SetSpeed(float) : "Set the door speed." +] + +@SolidClass base(Door, Origin) = func_door : + "A brush entity for use as a player-useable door." +[ + movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction the door will move, when it opens." + + filtername(filterclass) : "Block Filter Name" : : "Filter to use to determine entities that block the door. ( Half-Life: Source port only )" +] + +@SolidClass base(Door, Origin, Angles) = func_door_rotating : + "A brush entity for use as a rotating player-useable door." +[ + spawnflags(flags) = + [ + 2 : "Reverse Dir" : 0 + 16: "One-way" : 0 + 64: "X Axis" : 0 + 128: "Y Axis" : 0 + ] + distance(integer) : "Distance" : 90 : "The amount, in degrees, that the button should rotate when it's pressed." + + solidbsp(choices) : "Solid Type" : 0 = + [ + 0 : "VPhysics" + 1 : "BSP" + ] +] + +@PointClass base(Targetname, Parentname, Angles, Global, Studiomodel) studioprop() = prop_door_rotating : + "An entity used to place a door in the world." +[ + slavename(target_destination) : "Slave Name" : : "The name of any doors that should be slaved to this door (i.e. should open when this one opens, and close when this one closes)." + hardware(choices) : "Hardware Type" : 1 = + [ + 0 : "" + 1 : "Lever" + 2 : "Push bar" + 3 : "Keypad" + ] + + ajarangles(angle) : "Ajar Angles (Pitch Yaw Roll)" : "0 0 0" : "If the door 'Spawn Position' is set to Ajar, these are the angles to spawn at, instead of being open or closed." + spawnpos(choices) : "Spawn Position" : 0 = + [ + 0 : "Closed" + 1 : "Open forward" + 2 : "Open back" + 3 : "Ajar (use Ajar Angles)" + ] + + axis(axis) : "Hinge Axis" + distance(float) : "Rotation Distance (deg)" : 90 : "The amount, in degrees, that the door should rotate when opened." + speed(integer) : "Speed" : 100 : "The speed at which the door moves." + soundopenoverride(sound) : "Fully Open Sound" : : "Sound played when the door has finished opening." + soundcloseoverride(sound) : "Fully Closed Sound" : : "Sound played when the door has finished closing." + soundmoveoverride(sound) : "Moving Sound" : : "Sound played when the door starts to move." + returndelay(integer) : "Delay Before close (-1 stay open)" : -1 : "Amount of time, in seconds, after the door has opened before it closes. If the value is set to -1, the door never closes itself." + dmg(integer) : "Damage Inflicted When Blocked" : 0 : "Amount of damage done to entities that block the movement of this door, per frame." + health(integer) : "Health (0 = Unbreakable)" : 0 // NEEDHELP: Doesn't look like this is hooked up anymore? + soundlockedoverride(sound) : "Locked Sound" : : "Sound played when the player tries to open the door, and fails because it's locked." + soundunlockedoverride(sound) : "Unlocked Sound" : : "Sound played when the door is unlocked." + + forceclosed(choices) : "Force Closed" : 0 : "If set, this door will close no matter what. Useful for doors that have to close even if the player tries to block them with objects." = + [ + 0 : "No" + 1 : "Yes" + ] + + spawnflags(flags) = + [ + 1 : "Starts Open" : 0 + //512: "NPCs Can't" : 0 + 2048: "Starts locked" : 0 + 4096: "Door silent (No sound, and does not alert NPCs)" : 0 + 8192: "Use closes" : 1 + 16384 : "Door silent to NPCS (Does not alert NPCs)" : 0 + 32768 : "Ignore player +USE" : 0 + ] + + opendir(choices) : "Open Direction" : 0 : "Force the door to open only forwards or only backwards. Both directions is the standard door behavior." = + [ + 0 : "Open Both Directions" + 1 : "Open Forward Only" + 2 : "Open Backward Only" + ] + + // Outputs + output OnClose(void) : "Fired when the door is told to close." + output OnOpen(void) : "Fired when the door is told to open." + output OnFullyOpen(void) : "Fired when the door reaches the fully open position." + output OnFullyClosed(void) : "Fired when the door reaches the fully closed position." + output OnBlockedClosing(void) : "Fired when the door is blocked while closing." + output OnBlockedOpening(void) : "Fired when the door is blocked while opening." + output OnUnblockedClosing(void) : "Fired when the door is unblocked while closing." + output OnUnblockedOpening(void) : "Fired when the door is unblocked while opening." + + // Inputs + input Open(void) : "Open the door, if it is not fully open." + input OpenAwayFrom(string) : "Open the door away from the specified entity." + input Close(void) : "Close the door, if it is not fully closed." + input Toggle(void) : "Toggle the door between open and closed." + input Lock(void) : "Lock the door." + input Unlock(void) : "Unlock the door." + input SetRotationDistance(float) : "Set the distance (in degrees) between Open and Closed." +] + + +//------------------------------------------------------------------------- +// +// Cube map sample +// +//------------------------------------------------------------------------- + +@PointClass color(0 0 255) sidelist(sides) iconsprite("editor/env_cubemap.vmt") = env_cubemap : + "An entity that creates a sample point for the Cubic Environment Map." +[ + cubemapsize(choices) : "Cubemap Size" : 0 = + [ + 0 : "Default" + 1 : "1x1" + 2 : "2x2" + 3 : "4x4" + 4 : "8x8" + 5 : "16x16" + 6 : "32x32" + 7 : "64x64" + 8 : "128x128" + 9 : "256x256" + ] + sides(sidelist) : "Brush faces": : "(Optional) Brushes faces to directly attach to the env_cubemap. Press Pick then click on faces in the 3D View to select them. Use CTRL while clicking to add or remove from the selection." +] + +@BaseClass = BModelParticleSpawner +[ + StartDisabled(choices) : "Start Disabled" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + Color(color255) : "Particle Color (R G B)" : "255 255 255" + SpawnRate(integer) : "Particle Per Second" : 40 : "Number of particles to spawn, per second." + SpeedMax(string) : "Maximum Particle Speed" : 13 : "Maximum speed that the particles can move after spawning." + LifetimeMin(string) : "Minimum Particle Lifetime" : 3 : "Minimum number of seconds until each particle dies. Particles live for a random duration between this and 'Maximum Particle Lifetime'." + LifetimeMax(string) : "Maximum Particle Lifetime" : 5 : "Maximum number of seconds until each particle dies. Particles live for a random duration between 'Minimum Particle Lifetime' and this." + DistMax(integer) : "Maximum Visible Distance" : 1024 : "Maximum distance at which particles are visible. They fade to translucent at this distance." + + Frozen(choices) : "Frozen" : 0 : "When set, this entity spawns the number of particles in SpawnRate immediately, and then goes inactive." = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input TurnOn(void) : "Turn on." + input TurnOff(void) : "Turn off." +] + +@SolidClass base(Targetname, BModelParticleSpawner) = func_dustmotes : + "A brush entity that spawns sparkling dust motes within its volume." +[ + SizeMin(string) : "Minimum Particle Size" : 10 + SizeMax(string) : "Maximum Particle Size" : 20 + + Alpha(integer) : "Alpha" : 255 +] + +@SolidClass base( Targetname ) = func_smokevolume : + "A brush entity that spawns smoke particles within its volume." +[ + spawnflags(flags) = + [ + 1 : "Emissive" : 0 + ] + + Color1(color255) : "Particle Color1 (R G B)" : "255 255 255" + Color2(color255) : "Particle Color2 (R G B)" : "255 255 255" + material(material) : "Material" : "particle/particle_smokegrenade" : "The material to use for the particles" + ParticleDrawWidth(float) : "Particle Draw Width (units)" : 120 : "The size of the particles, in units/inches." + ParticleSpacingDistance(float) : "Particle Spacing Distance (units)" : 80 : "The distance between the particles inside the volume. The lower the number, the denser the particles, and the more overdraw there will be. It is best to keep it as high as you can without it looking bad." + DensityRampSpeed(float) : "Density Ramp Speed (seconds)" : 1 : "Time to go from density 0 to density 1, in seconds." + + RotationSpeed(float) : "Rotation Speed (degrees/sec)" : 10 : "The speed that the particles should rotate, in degrees per second." + MovementSpeed(float) : "Movement Speed (units/sec)" : 10 : "The speed that the particles should move around, in units/inches per second." + Density(float) : "Density [0..1]" : 1 + + // Inputs + input SetRotationSpeed(float) : "Set the particle rotation speed (in degrees per second)." + input SetMovementSpeed(float) : "Set the particle movement speed (in inches per second)." + input SetDensity(float) : "Set the particle density. It should be a range from 0 to 1." +] + +@SolidClass base( Targetname, BModelParticleSpawner ) = func_dustcloud : + "A brush entity that spawns a translucent dust cloud within its volume." +[ + Alpha(integer) : "Alpha" : 30 + + SizeMin(string) : "Minimum Particle Size" : 100 + SizeMax(string) : "Maximum Particle Size" : 200 +] + +@PointClass base( Targetname, Parentname, Angles ) size( -8 -8 -8, 8 8 8 ) = env_dustpuff : + "An entity that can emit dust puffs." +[ + scale(float) : "Scale" : 8 : "Size of the dust puff." + speed(float) : "Speed" : 16 : "Speed at which the dust particles should move." + + color(color255) : "Dust color" : "128 128 128" + + // Inputs + input SpawnDust(void) : "Spawn a dust puff." +] + +@PointClass base( Targetname, Parentname, Angles ) size( -8 -8 -8, 8 8 8 ) = env_particlescript : + "An entity that has special animation events that can be fired by a model with an animation inside its .qc designed for"+ + "use by this entity." +[ + model(studio) : "Script Model" : "models/Ambient_citadel_paths.mdl" : "Model to use for animation sequences." + + // Inputs + input SetSequence(string) : "Sets the script model's sequence." +] + + +// NEEDHELP +@PointClass base( Targetname, Parentname, Angles ) size( -8 -8 -8, 8 8 8 ) = env_effectscript : + "An entity that allows you to script special visual effects via a script file." +[ + model(studio) : "Script Model" : "models/Effects/teleporttrail.mdl" : "Model to use for animation sequences." + scriptfile(string) : "Script File" : "scripts/effects/testeffect.txt" : "Name of the script to use for this model." + + // Inputs + input SetSequence(string) : "Sets the script model's sequence." +] + + +//------------------------------------------------------------------------- +// +// Logic Entities +// +//------------------------------------------------------------------------- + +@PointClass iconsprite("editor/logic_auto.vmt") = logic_auto : + "Fires outputs when a map spawns. " + + "If 'Remove on fire' flag is set the logic_auto is deleted after firing. " + + "It can be set to check a global state before firing. This allows you to only fire events based on "+ + "what took place in a previous map." +[ + spawnflags(Flags) = + [ + 1 : "Remove on fire" : 1 + ] + + globalstate(choices) : "Global State to Read" : : "If set, this specifies a global state to check before firing. The OnMapSpawn output will only fire if the global state is set." = + [ + "" : "--- None ---" + "gordon_precriminal" : "Gordon pre-criminal" + "antlion_allied" : "Antlions are player allies" +// "player_stealth" : "Player in APC is disguised as combine" + "suit_no_sprint" : "Suit sprint function not yet enabled" + "super_phys_gun" : "Super phys gun is enabled" + "friendly_encounter" : "Friendly encounter sequence (lower weapons, etc.)" +// "citizens_passive" : "Citizens are *not* player allies (cannot be commanded)" + "gordon_invulnerable" : "Gordon is invulnerable" + "no_seagulls_on_jeep" : "Don't spawn seagulls on the jeep" + ] + + // Outputs + output OnMapSpawn(void) : "Fired when the map is loaded for any reason." + output OnNewGame(void) : "Fired when the map is loaded to start a new game." + output OnLoadGame(void) : "Fired when the map is loaded from a saved game." + output OnMapTransition(void) : "Fired when the map is loaded due to a level transition." + output OnBackgroundMap(void) : "Fired when the map is loaded as a background to the main menu." +] + +@PointClass base(Targetname,Angles,Parentname) studioprop("models/editor/camera.mdl") = point_viewcontrol : + "A camera entity that controls the player's view. While it's active, the player will see out of the camera." +[ + target(target_destination) : "Entity to Look At" : : "Name of the entity that the camera should point at and track while active." + targetattachment(string) : "Target Attachment Name" : : "If set, the camera will focus on the specified attachment on the 'Entity to Look At'." + wait(integer) : "Hold Time" : 10 : "The amount of time the camera should control the player's view for, after which it deactivates itself. If the camera should stay active until told to deactive, set the 'Infinite Hold Time' spawnflag." + moveto(target_destination) : "Path Corner" : : "The first path corner in a track that the camera should move along once it's activated. If not specified, the camera won't move." + spawnflags(flags) = + [ + 1: "Start At Player" : 1 + 2: "Follow Player" : 1 + 4: "Freeze Player" : 0 + 8: "Infinite Hold Time" : 0 + 16:"Snap to goal angles" : 0 + 32:"Make Player non-solid" : 0 + 64:"Interruptable by Player" : 0 + ] + speed(string) : "Initial Speed" : "0" : "The starting speed that the camera moves at, if it's on a path track." + acceleration(string) : "Acceleration units/sec^2" : "500" : "The speed at which the camera accelerates to path corner's desired speeds." + deceleration(string) : "Stop Deceleration units/sec^2" : "500" : "The speed at which the camera decelerates to path corner's desired speeds." + + // Inputs + input Enable(void) : "Enable the point_viewcontrol, and start controlling the player's view." + input Disable(void) : "Disable the point_viewcontrol, and stop controlling the player's view." + + // Outputs + output OnEndFollow(void) : "Fired when the point_viewcontrol deactivates, due to the Disable input being received, the Entity to Look At being destroyed, or the Hold Time expiring." +] + +@PointClass base(Targetname) iconsprite("editor/logic_compare.vmt") = logic_compare : + "Compares an input value to another value. " + + "If the input value is less than the compare value, the OnLessThan output is fired with the input value. " + + "If the input value is equal to the compare value, the OnEqualTo output is fired with the input value. " + + "If the input value is greater than the compare value, the OnGreaterThan output is fired with the input value." +[ + // Keys + InitialValue(integer) : "Initial value" : : "Initial value for the input value." + CompareValue(integer) : "Compare value" : : "The value to compare against." + + // Inputs + input SetValue(float) : "Set the value that will be compared against the compare value." + input SetValueCompare(float) : "Set the value that will be compared against the compare value and performs the comparison." + input SetCompareValue(float) : "Set the compare value." + input Compare(void) : "Force a compare of the input value with the compare value." + + // Outputs + output OnLessThan(float) : "Fired when the input value is less than the compare value. Sends the input value as data." + output OnEqualTo(float) : "Fired when the input value is equal to the compare value. Sends the input value as data." + output OnNotEqualTo(float) : "Fired when the input value is different from the compare value. Sends the input value as data." + output OnGreaterThan(float) : "Fired when the input value is greater than the compare value. Sends the input value as data." +] + +@PointClass base(Targetname) iconsprite("editor/logic_branch.vmt") = logic_branch : + "Tests a boolean value and fires an output based on whether the value is true or false. " + + "Use this entity to branch between two potential sets of events." +[ + // Keys + InitialValue(integer) : "Initial value" : : "Initial value for the boolean value (0 or 1)." + + // Inputs + input SetValue(bool) : "Set the boolean value without performing the comparison. Use this to hold a value for a future test." + input SetValueTest(bool) : "Set the boolean value and test it, firing OnTrue or OnFalse based on the new value." + input Toggle(void) : "Toggle the boolean value between true and false." + input ToggleTest(void) : "Toggle the boolean value and tests it, firing OnTrue or OnFalse based on the new value." + input Test(void) : "Test the input value and fire OnTrue or OnFalse based on the value." + + // Outputs + output OnTrue(bool) : "Fired when the input value is true (nonzero)." + output OnFalse(bool) : "Fired when the input value is false (zero)." +] + + +@PointClass base(Targetname) = logic_branch_listener : + "Contains a list of logic_branch entities and fires outputs when the state of any of the logic_branches changes.\n\n"+ + "This entity is used to fire an event when a set of conditions are all satisfied." +[ + Branch01(target_destination) : "Logic Branch 01" : : "The name of one or more logic_branches (wildcards allowed)." + Branch02(target_destination) : "Logic Branch 02" : : "The name of one or more logic_branches (wildcards allowed)." + Branch03(target_destination) : "Logic Branch 03" : : "The name of one or more logic_branches (wildcards allowed)." + Branch04(target_destination) : "Logic Branch 04" : : "The name of one or more logic_branches (wildcards allowed)." + Branch05(target_destination) : "Logic Branch 05" : : "The name of one or more logic_branches (wildcards allowed)." + Branch06(target_destination) : "Logic Branch 06" : : "The name of one or more logic_branches (wildcards allowed)." + Branch07(target_destination) : "Logic Branch 07" : : "The name of one or more logic_branches (wildcards allowed)." + Branch08(target_destination) : "Logic Branch 08" : : "The name of one or more logic_branches (wildcards allowed)." + Branch09(target_destination) : "Logic Branch 09" : : "The name of one or more logic_branches (wildcards allowed)." + Branch10(target_destination) : "Logic Branch 10" : : "The name of one or more logic_branches (wildcards allowed)." + Branch11(target_destination) : "Logic Branch 11" : : "The name of one or more logic_branches (wildcards allowed)." + Branch12(target_destination) : "Logic Branch 12" : : "The name of one or more logic_branches (wildcards allowed)." + Branch13(target_destination) : "Logic Branch 13" : : "The name of one or more logic_branches (wildcards allowed)." + Branch14(target_destination) : "Logic Branch 14" : : "The name of one or more logic_branches (wildcards allowed)." + Branch15(target_destination) : "Logic Branch 15" : : "The name of one or more logic_branches (wildcards allowed)." + Branch16(target_destination) : "Logic Branch 16" : : "The name of one or more logic_branches (wildcards allowed)." + + input Test(void) : "Tests the state of all the logic_branches in the list and fires the appropriate output." + + output OnAllTrue(void) : "Fired when all the logic_branches in the list become true." + output OnAllFalse(void) : "Fired when all the logic_branches in the list become false." + output OnMixed(void) : "Fired when one of the logic branches in the list changes, but some are true and some are false." +] + + +@PointClass base(Targetname) iconsprite("editor/logic_case.vmt") = logic_case : + "Compares an input to up to 16 preset values. If the input value is the same as " + + "any of the preset values, an output corresponding to that value is fired.\n\n" + + "For example: if Case01 is set to 2 and Case02 is set to 5, and the input value is 5, " + + "the OnCase02 output will be fired.\n\n" + + "This entity can also be used to select from a number of random targets via the " + + "PickRandom input. One of the OnCase outputs that is connected to another entity will " + + "be picked at random and fired." +[ + Case01(string) : "Case 01" + Case02(string) : "Case 02" + Case03(string) : "Case 03" + Case04(string) : "Case 04" + Case05(string) : "Case 05" + Case06(string) : "Case 06" + Case07(string) : "Case 07" + Case08(string) : "Case 08" + Case09(string) : "Case 09" + Case10(string) : "Case 10" + Case11(string) : "Case 11" + Case12(string) : "Case 12" + Case13(string) : "Case 13" + Case14(string) : "Case 14" + Case15(string) : "Case 15" + Case16(string) : "Case 16" + + // Inputs + input InValue(string) : "Compares the Input value to the case values, and fires the appropriate output, if any." + input PickRandom(void) : "Fires a random OnCase output with at least one connection." + input PickRandomShuffle(void) : "Fires a random OnCase output with at least one connection, with no repeats until all cases have been picked, at which point the shuffle starts over." + + // Outputs + output OnCase01(void) : "Fired when the input value equals the Case01 value." + output OnCase02(void) : "Fired when the input value equals the Case02 value." + output OnCase03(void) : "Fired when the input value equals the Case03 value." + output OnCase04(void) : "Fired when the input value equals the Case04 value." + output OnCase05(void) : "Fired when the input value equals the Case05 value." + output OnCase06(void) : "Fired when the input value equals the Case06 value." + output OnCase07(void) : "Fired when the input value equals the Case07 value." + output OnCase08(void) : "Fired when the input value equals the Case08 value." + output OnCase09(void) : "Fired when the input value equals the Case09 value." + output OnCase10(void) : "Fired when the input value equals the Case10 value." + output OnCase11(void) : "Fired when the input value equals the Case11 value." + output OnCase12(void) : "Fired when the input value equals the Case12 value." + output OnCase13(void) : "Fired when the input value equals the Case13 value." + output OnCase14(void) : "Fired when the input value equals the Case14 value." + output OnCase15(void) : "Fired when the input value equals the Case15 value." + output OnCase16(void) : "Fired when the input value equals the Case16 value." + output OnDefault(void) : "Fired when the input value does not equal any of the Case values." +] + +// NEEDHELP: Unused in HL2, not clear what it's useful for. +@PointClass base(Targetname) iconsprite("editor/logic_multicompare.vmt") = logic_multicompare : + "Compares a set of inputs to each other. If they are all the same, fires an OnEqual output. " + + "If any are different, fires the OnNotEqual output." +[ + // keys + IntegerValue(integer) : "Integer Value (optional)" + ShouldComparetoValue(choices) : "Should use Integer Value" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input InputValue(integer) : "Input value" + input CompareValues(void) : "Compares the values and fires appropriate outputs" + + // Outputs + output OnEqual(void) : "Fires if the values are equal" + output OnNotEqual(void) : "Fires if the values are not equal" +] + +@PointClass base(Targetname, EnableDisable) iconsprite("editor/logic_relay.vmt") = logic_relay : + "A message forwarder. Fires an OnTrigger output when triggered, and " + + "can be disabled to prevent forwarding outputs.\n\n" + + "Useful as an intermediary between one entity and another for turning " + + "on or off an I/O connection, or as a container for holding a set of " + + "outputs that can be triggered from multiple places." +[ + spawnflags(flags) = + [ + 1: "Only trigger once" : 0 + 2: "Allow fast retrigger" : 0 + ] + + // Inputs + input Trigger(void) : "Trigger the relay, causing its OnTrigger output to fire if it is enabled." + input Toggle(void) : "Toggle the relay between enabled and disabled." + input CancelPending(void) : "Cancel any events fired by this relay that are currently pending in the I/O event queue." + + // Outputs + output OnSpawn(void) : "Fired when the relay is spawned. If the relay is set to only trigger once, it will "+ + "delete itself after firing this output." + output OnTrigger(void) : "Fired when the relay is triggered. If the relay is set to only trigger once, it will "+ + "delete itself after firing this output." +] + +@PointClass base(Targetname, EnableDisable) iconsprite("editor/logic_timer.vmt") = logic_timer : + "An entity that fires a timer event at regular, or random, intervals. It can also be set to oscillate between" + + "a high and low end, in which case it will fire alternating high/low outputs each time it fires." +[ + // Keys + spawnflags(flags) = + [ + 1 : "Oscillator (alternates between OnTimerHigh and OnTimerLow outputs)" : 0 + ] + + UseRandomTime(choices) : "Use Random Time" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + + LowerRandomBound(string) : "Minimum Random Interval" : : "If 'Use Random Time' is set, this is the minimum time between timer fires. The time will be a random number between this and the 'Maximum Random Interval'." + UpperRandomBound(string) : "Maximum Random Interval" : : "If 'Use Random Time' is set, this is the maximum time between timer fires. The time will be a random number between the 'Minimum Random Interval' and this." + RefireTime(string) : "Refire Interval" : : "If 'Use Random Time' isn't set, this is the time between timer fires, in seconds." + + // Inputs + input RefireTime(integer) : "Set a new Refire Interval." + input FireTimer(void) : "Force the timer to fire immediately." + input Enable(void) : "Enable the timer." + input Disable(void) : "Disable the timer." + input Toggle(void) : "Toggle the timer on/off." + input LowerRandomBound(float) : "Set a new Minimum Random Interval." + input UpperRandomBound(float) : "Set a new Maximum Random Interval." + + // Outputs + output OnTimer(void) : "Fired when the timer expires." + output OnTimerHigh(void) : "Fired every other time for an oscillating timer." + output OnTimerLow(void) : "Fired every other time for an oscillating timer." +] + +@PointClass base(Targetname) size(-4 -4 -4, 4 4 4) color(0 255 0) = logic_collision_pair : + "An entity that can be used to enables/disable vphysics collisions between two target entities." +[ + attach1(target_destination) : "Attachment 1" : "" : "The first entity." + attach2(target_destination) : "Attachment 2" : "" : "The second entity." + + startdisabled(choices) : "Start with collisions disabled" : 1 = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input EnableCollisions(void) : "Enable collisions between the first and second entity." + input DisableCollisions(void) : "Disable collisions between the first and second entity." +] + + +@PointClass base(Targetname, Parentname, EnableDisable) iconsprite("editor/env_microphone.vmt") sphere(MaxRange) color(0 0 255) = env_microphone : + "An entity that acts as a microphone. It works in one of two modes. If it has a 'Speaker' set, it picks up all sounds within the specified sound range, " + + "and rebroadcasts them through the Speaker entity. In this Speaker mode, it ignores the Hears X spawnflags and does not fire the SoundLevel output. " + + "If it has no Speaker set, it measures the sound level at a point, and outputs the sound level as a value between 0 and 1. In Measuring mode, it only hears sounds that match the Hear X spawnflags." +[ + target(target_destination) : "Measure target" : : "If the speaker is in Measuring mode, this is the name of the entity where the sound level is to be measured." + SpeakerName(target_destination) : "Speaker" : "" : "The name of a speaker entity through which to play any sounds heard by this microphone. If specified, the microphone will consider itself in Speaker mode." + ListenFilter(filterclass) : "Listen Filter" : "" : "The name of an filter entity which specifies the only entities the microphone can hear. Sounds emitted by other entities will not be heard." + speaker_dsp_preset(choices) : "Speaker DSP Preset" : 0 : "Only useful in Speaker mode. If specified, when the microphone is enabled, it'll set the global dsp_speaker preset to this value. Sounds played back through speakers will then be affected by the selected DSP." = + [ + 0 : "Use Default" + 50 : "1 NO EFFECT" + 51 : "2 (DUPLICATE OF 1)" + 52 : "3 (DUPLICATE OF 1)" + 53 : "4 (DUPLICATE OF 1)" + 54 : "5 (DUPLICATE OF 1)" + 55 : "6 SPEAKER, LOUDER" + 56 : "7 SPEAKER VERY SMALL" + 57 : "8 LOUDSPEAKER, ECHO" + 58 : "9 SPEAKER SMALL" + 59 : "10 SPEAKER TINY" + ] + + spawnflags(flags) = + [ + 1 : "Hears combat sounds" : 1 + 2 : "Hears world sounds" : 1 + 4 : "Hears player sounds" : 1 + 8 : "Hears bullet impacts" : 1 + 16: "Swallows sounds routed through speakers" : 0 + 32: "Hears explosions" : 0 + ] + + Sensitivity(float) : "Sensitivity (0 - 10)" : 1 : "Microphone sensitivity, 0=deaf, 1=default, 10=extremely sensitive). Only applicable in Measuring mode." + SmoothFactor(float) : "Smoothing (0 - 1)" : 0 : "Smoothing factor, 0=no smoothing, 1=maximum smoothing). Only applicable in Measuring mode." + MaxRange(float) : "Maximum hearing range (0=infinite)" : 240 : "Sounds beyond this range won't be heard, irrelevant of attenuation. "+ + "WARNING: setting this to zero (or a value > 1024) when the microphone is in Speaker mode can be very bad for performance!!" + + // Inputs + input SetSpeakerName(string) : "Set the microphone to output through a different speaker entity." + + // Outputs + output SoundLevel(float) : "Fired in Measuring mode whenever the sound level changes." + output OnRoutedSound(void) : "Fired whenever a sound is routed out through the specified speaker (if any)." + output OnHeardSound(void) : "Fired whenever this microphone hears any sound it cares about." +] + +@PointClass base(Targetname, EnableDisable ) = math_remap : + "An entity that remaps a range of input values to a given range of output values." +[ + spawnflags(flags) = + [ + 1 : "Ignore out of range input values" : 1 + ] + + in1(integer) : "Minimum Valid Input Value" : 0 : "Input values below this value will be ignored." + in2(integer) : "Maximum Valid Input Value" : 1 : "Input values above this value will be ignored." + out1(integer) : "Output Value When Input Is Min." : : "When the input value is equal to 'Minimum Valid Input Value', this is the output value." + out2(integer) : "Output Value When Input Is Max." : : "When the input value is equal to 'Maximum Valid Input Value', this is the output value." + + // Inputs + input InValue(float) : "Input value and fire the output with the remapped value." + + // Outputs + output OutValue(float) : "Fired when the InValue input is received, with the remapped input value as the parameter." +] + +@PointClass base(Targetname) = math_colorblend : + "Used to create a blend between two colors for controlling the color of another entity." +[ + spawnflags(flags) = + [ + 1 : "Ignore out of range input values" : 1 + ] + + inmin(integer) : "Minimum Valid Input Value" : 0 : "Input values below this value will be ignored." + inmax(integer) : "Maximum Valid Input Value" : 1 : "Input values above this value will be ignored." + colormin(color255) : "Output RGB color when input is min." : "0 0 0" : "When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color." + colormax(color255) : "Output RGB color when input is max." : "255 255 255" : "When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color." + + // Inputs + input InValue(float) : "Input value and fire the output with the remapped value." + + // Outputs + output OutColor(color255) : "Fired when the InValue input is received, with the remapped RGB color as the parameter." +] + +@PointClass base(Targetname) iconsprite("editor/math_counter.vmt") = math_counter : + "Holds a numeric value and performs arithmetic operations upon it. If either the minimum or maximum " + + "legal value is nonzero, OutValue will be clamped to the legal range, and the OnHitMin/OnHitMax " + + "outputs will be fired at the appropriate times. If both min and max are set to zero, no clamping is " + + "performed and only the OutValue output will be fired." +[ + // Keys + startvalue(integer) : "Initial Value" : 0 : "Starting value for the counter." + min(integer) : "Minimum Legal Value" : 0 : "Minimum legal value for the counter. If min=0 and max=0, no clamping is performed." + max(integer) : "Maximum Legal Value" : 0 : "Maximum legal value for the counter. If min=0 and max=0, no clamping is performed." + + // Inputs + input Add(integer) : "Add an amount to the counter and fire the OutValue output with the result." + input Divide(integer): "Divide the counter by an amount and fire the OutValue output with the result." + input Multiply(integer): "Multiply the counter by an amount and fire the OutValue output with the result." + input SetValue(integer): "Set the counter to a new value and fire the OutValue output with the result." + input SetValueNoFire(integer): "Set the counter to a new value without firing any outputs." + input Subtract(integer): "Subtract an amount from the counter and fire the OutValue output with the result." + input SetHitMax(integer): "Set the upper bound of the counter and fire the OutValue output with the current value." + input SetHitMin(integer): "Set the lower bound of the counter and fire the OutValue output with the current value." + + // Outputs + output OutValue(integer) : "Fired when the counter value changes." + output OnHitMin(void) : "Fired when the counter value meets or goes below the min value. The counter must go back above the min value before the output will fire again." + output OnHitMax(void) : "Fired when the counter value meets or exceeds the max value. The counter must go below the max value before the output will fire again." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = logic_lineto : + "An entity that calculates and outputs a vector from one entity to another." +[ + source(target_destination) : "Start entity" : : "Name of the entity the line should start from." + target(target_destination) : "End entity" : : "Name of the entity that line should end at." + + // Outputs + output Line(vector) : "Fired when the vector, from the start entity to the end entity, changes. Passes along the vector as a parameter." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = logic_navigation : + "An entity that is used to set navigation properties on other entities. Useful to make NPCs ignore physics props in their way that they can easily push." +[ + target(target_destination) : "Navigation Entity" : "Name of the entity to set navigation properties on." + spawnflags(flags) = + [ + 1 : "Start On" : 1 + ] + navprop(choices) : "Nav Property" : "Ignore" = + [ + "Ignore" : "NPCs Ignore this when navigating (they'll bump into it)" + ] + + // Inputs + input TurnOn(void) : "Turn on. The Navigation Entity will have its navigation properties set." + input TurnOff(void) : "Turn off. The Navigation Entity will have its navigation properties returned to the default settings." + input Toggle(void) : "Toggle on/off." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = logic_autosave : + "An entity that is used to force an autosave." +[ + NewLevelUnit(choices) : "Force New Level Unit" : 0 : "If set, the save will discard any savedata from previous levels, for the purpose of keeping savegame filesizes down. Can only be safely used if there is no way for the player to return to previous levels." = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Save(void) : "Force an autosave." + input SaveDangerous(float) : "Force an autosave as autosavedangerous.sav. If the player is alive after the passed number of seconds it replaces the standard auto save." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = point_template : + "Turns an entity, or set of entities, into a single template that can be instanced anywhere, and multiple times. "+ + "If there are interdependencies (entity I/O, hierarchy, or other name references) between the entities "+ + "in the template, the entities in the template will have their names changed and the interdependencies will "+ + "be reconnected to the changes names. The name change format is as follows: '&0000', where the 0000 "+ + "will be replaced with the current global template instance, so wildcard searches for '*' will still find them.\n"+ + "If you don't want the name fixup to happen, because you're only spawning the template once, or you want inputs to "+ + "trigger all instances of the template, check the 'Preserve entity names' spawnflag. \n"+ + "To spawn the template in other places, use an env_entity_maker." +[ + spawnflags(flags) = + [ + 1 : "Don't remove template entities" : 0 + 2 : "Preserve entity names (Don't do name fixup)" : 1 + ] + + Template01(target_destination) : "Template 1" + Template02(target_destination) : "Template 2" + Template03(target_destination) : "Template 3" + Template04(target_destination) : "Template 4" + Template05(target_destination) : "Template 5" + Template06(target_destination) : "Template 6" + Template07(target_destination) : "Template 7" + Template08(target_destination) : "Template 8" + Template09(target_destination) : "Template 9" + Template10(target_destination) : "Template 10" + Template11(target_destination) : "Template 11" + Template12(target_destination) : "Template 12" + Template13(target_destination) : "Template 13" + Template14(target_destination) : "Template 14" + Template15(target_destination) : "Template 15" + Template16(target_destination) : "Template 16" + + // Inputs + input ForceSpawn(void) : "Spawn an instance of the template at the original position." + + // Outputs + output OnEntitySpawned(void) : "Fired after spawning an instance of this template." +] + +@PointClass base(Targetname,Parentname,Angles) = env_entity_maker : + "Spawns the specified entity template at its origin. If set to auto-spawn, it will spawn the template whenever there's room and the player "+ + "is looking elsewhere." +[ + spawnflags(Flags) = + [ + 1 : "Enable AutoSpawn (will spawn whenever there's room)" : 0 + 2 : "AutoSpawn: Wait for entity destruction" : 0 + 4 : "AutoSpawn: Even if the player is looking" : 0 + 8 : "ForceSpawn: Only if there's room" : 0 + 16 : "ForceSpawn: Only if the player isn't looking" : 0 + ] + + EntityTemplate(target_destination) : "Point_template To Spawn" : "" : "Name of the point_template to spawn here." + + PostSpawnSpeed(float) : "PostSpawn Movement Speed" : "0" : "If specified, all the entities created in the template will move this fast in the specified PostSpawn Movement Direction." + PostSpawnDirection(angle) : "PostSpawn Movement Direction" : "0 0 0" : "If a PostSpawn Movement Speed is specified, all the entities created in the template will move in this direction." + PostSpawnDirectionVariance(float) : "PostSpawn Direction Variance" : "0.15" : "This variance is applied to the PostSpawn Movement Direction for each spawned entity in the template. Use it to apply some randomness to the directions." + + // Inputs + input ForceSpawn(void) : "Spawn an instance of the template at this origin and angle." + + // Outputs + output OnEntitySpawned(void) : "Fired when an instance of the entity template has been spawned." + output OnEntityFailedSpawn(void) : "Fired when a ForceSpawn input failed to spawn the template, either due to lack of space or being in player's view, depending on the spawnflags." +] + + +//------------------------------------------------------------------------- +// +// Activator Filters +// +//------------------------------------------------------------------------- + +@BaseClass base(Targetname) = BaseFilter +[ + Negated(choices) : "Filter mode" : "Allow entities that match criteria" : "If set to Allow, only entities who match the criteria will pass the filter. "+ + "If set to Disallow, only entities who do NOT match the criteria will pass the filter." = + [ + 0 : "Allow entities that match criteria" + 1 : "Disallow entities that match criteria" + ] + + // Inputs + input TestActivator(void) : "Test the activator against the filter and fires OnPass or OnFail output." + + // Outputs + output OnPass(void) : "Fired in response to TestActivator input if the activator passes the filter." + output OnFail(void) : "Fired in response to TestActivator input if the activator fails to pass the filter." +] + +@FilterClass base(BaseFilter) iconsprite("editor/filter_multiple.vmt") = filter_multi : + "A filter that tests the activator against multiple filters. This allows you to build more complex filters, such as"+ + "'Allow anyone on Team 1 who is also class engineer', or 'Allow everyone except classes npc_zombie and npc_headcrab'." +[ + filtertype(choices) : "Logic Type" : 0 = + [ + 0 : "AND (all filters must pass)" + 1 : "OR (any filter must pass)" + ] + + Negated(choices) : "Negate Outcome" : 0 : "Whether to negate the result of the subfilters, after combining them using the Logic Type chosen.\n"+ + "Negating the outcome using the AND logic type means that any subfilter must fail for this filter to pass.\n"+ + "Negating the outcome using the OR logic type means that all subfilters must fail for this filter to pass." = + [ + 0 : "No" + 1 : "Yes" + ] + + Filter01(filterclass) : "Filter 1" : : "Activator filter to test." + Filter02(filterclass) : "Filter 2" : : "Activator filter to test." + Filter03(filterclass) : "Filter 3" : : "Activator filter to test." + Filter04(filterclass) : "Filter 4" : : "Activator filter to test." + Filter05(filterclass) : "Filter 5" : : "Activator filter to test." +] + +@FilterClass base(BaseFilter) iconsprite("editor/filter_name.vmt") = filter_activator_name : + "A filter that filters by the name of the activator." +[ + filtername(target_destination) : "Filter Name" : : "The name to filter by. If the filter mode is Allow, only entities whose "+ + "name matches the given string will pass the filter. If the filter mode is Disallow, "+ + "all entities EXCEPT those whose name matches the string will pass the filter." +] + +@FilterClass base(BaseFilter) iconsprite("editor/filter_class.vmt") = filter_activator_class : + "A filter that filters by the class name of the activator." +[ + filterclass(string) : "Filter Classname" : : "The class name to filter by. If the filter mode is Allow, only entities whose "+ + "class name matches the given string will pass the filter. If the filter mode is Disallow, "+ + "all entities EXCEPT those whose class name matches the given string will pass the filter." +] + +@FilterClass base(BaseFilter) = filter_damage_type : + "A damage filter that filters by the type of damage inflicted. This can only be used as a damage filter, not as an activator filter." +[ + damagetype(choices) : "Damage type" : 64 : "The damage type to filter by. If the filter mode is Allow, only damage types that "+ + "match will pass the filter. If the filter mode is Disallow, all damage types EXCEPT those who match will pass the filter." = + [ + 0 : "GENERIC" + 1 : "CRUSH" + 2 : "BULLET" + 4 : "SLASH" + 8 : "BURN" + 16 : "FREEZE" + 32 : "FALL" + 64 : "BLAST" + 128 : "CLUB" + 256 : "SHOCK" + 512 : "SONIC" + 1024 : "ENERGYBEAM" + 16384: "DROWN" + 32768 : "PARALYSE" + 65536 : "NERVEGAS" + 131072 : "POISON" + 262144 : "RADIATION" + 524288 : "DROWNRECOVER" + 1048576 : "CHEMICAL" + 2097152 : "SLOWBURN" + 4194304 : "SLOWFREEZE" + ] +] + + +//------------------------------------------------------------------------- +// +// Point Entities +// +//------------------------------------------------------------------------- + +@PointClass base(Targetname, Parentname, EnableDisable) = point_anglesensor : + "An entity that detects if another entity points in a given direction for a period of time." +[ + target(target_destination) : "Target Entity Name" : : "Name of the entity whose angles will be sensed." + lookatname(target_destination) : "Look At Entity" : : "The entity we want to check to see if the Target Entity is looking at." + duration(float) : "Duration" : : "The amount of time the Target Entity must look at the 'Look at Entity' to trigger this entity, in seconds." + tolerance(integer) : "Tolerance" : : "The tolerance, in degrees, in the checking to determine when the Target Entity is looking at the Look At Entity." + + // Inputs + input Toggle(void) : "Toggle the sensor between enabled and disabled." + input Test(void) : "Check to see if the Target Entity is facing the Look At Entity within the specified tolerance, firing either the OnFacingLookat or OnNotFacingLookat output based on the result." + + // Outputs + output TargetDir(vector) : "Fired when the forward direction of the Target Entity changes. Passes the new forward direction as a parameter." + output OnFacingLookat(void) : "Fired when the Target Entity points at the Look At Entity for more than the specified Duration, or in response to a Test input." + output OnNotFacingLookat(void) : "Fires in response to a Test input when the Target Entity is not pointing at the Look At Entity." +] + +@PointClass base(Targetname) = point_angularvelocitysensor : + "An entity that detects if another entity's angular velocity meets or exceeds a threshold value." +[ + target(target_destination) : "Target Entity Name" : : "Name of the entity whose angular velocity will be sensed." + threshold(float) : "Threshold Velocity" : 0 : "The threshold angular velocity to compare against, in degrees per second." + + axis(vecline) : "Axis" + + usehelper(choices) : "Use Axis Helper" : 0 : "Use axis helper to determine rotation values (clockwise/counter-clockwise)." = + [ + 0 : "No" + 1 : "Yes" + ] + + // Inputs + input Test(void) : "Checks to see if the Target Entity's angular velocity meets or exceeds the Threshold Velocity, " + + "firing either the OnGreaterThanOrEqualTo or OnLessThan output based on the result." + + // Outputs + output AngularVelocity(float) : "Fired when the Target's Angular Velocity changes, passing the new magnitude of the angular velocity." + output OnGreaterThan(void) : "Fired when the Target Entity goes from slower than the threshold angular velocity to faster than the threshold angular velocity." + output OnGreaterThanOrEqualTo(void) : "Fired when the Target Entity goes from slower than the threshold angular velocity to faster than the threshold angular velocity." + output OnLessThan(void) : "Fired when the Target Entity goes from faster than the threshold angular velocity to slower than the threshold angular velocity." + output OnLessThanOrEqualTo(void) : "Fired when the Target Entity goes from faster than the threshold angular velocity to slower than the threshold angular velocity." + output OnEqualTo(void) : "Fired when the Target Entity reaches the threshold angular velocity from a different velocity." +] + +@PointClass base(Targetname, Angles) = point_teleport : + "An entity that teleports a target entity to this position and angles. "+ + "If 'Teleport Home' spawn flag is set, teleports the target entity to its spawn position instead." + + "If object is physically simulated, simulation is turned off when teleported." +[ + target(target_destination) : "Entity To Teleport" : : "Name of the entity that will be teleported." + spawnflags(flags) = + [ + 1 : "Teleport Home" : 0 + ] + + // Inputs + input Teleport(void) : "Teleport the target entity." +] + +@PointClass base(Targetname) sphere(DamageRadius) = point_hurt : + "An entity that does damage to all entities in a radius around itself, with a specified delay." + + "If 'Target Entity' is specified, the damage is only done to that entity." +[ + DamageTarget(string) : "Target Entity" : "" : "If specified, only this entity will take damage. Otherwise, all entities within the Radius will take damage." + + DamageRadius(float) : "Radius" : 256 : "All entities within this radius of this entity will take damage. If a 'Target Entity' is specified, only that entity will take damage." + Damage(integer) : "Damage" : 5 : "Damage done to all affected entities each time this entity fires." + DamageDelay(float) : "Delay" : 1 : "Delay between refires, in seconds." + + DamageType(choices) : "Damage Type" : 0 : "Type of damage to inflict on entities damaged." = + [ + 0 : "GENERIC" + 1 : "CRUSH" + 2 : "BULLET" + 4 : "SLASH" + 8 : "BURN" + 16 : "FREEZE" + 32 : "FALL" + 64 : "BLAST" + 128 : "CLUB" + 256 : "SHOCK" + 512 : "SONIC" + 1024 : "ENERGYBEAM" + 16384: "DROWN" + 32768 : "PARALYSE" + 65536 : "NERVEGAS" + 131072 : "POISON" + 262144 : "RADIATION" + 524288 : "DROWNRECOVER" + 1048576 : "CHEMICAL" + 2097152 : "SLOWBURN" + 4194304 : "SLOWFREEZE" + ] + + // Inputs + input Hurt(void) : "Force a single fire, damaging either the Target Entity or all entities within the radius." + input TurnOn(void) : "Enable this entity. It will start damaging entities everytime it fires, and refire based upon the specified Delay." + input TurnOff(void) : "Disable this entity. It will stop damaging entities." + input Toggle(void) : "Toggle this entity between On/Off state." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = point_playermoveconstraint : + "An entity that constrains players to a radius around itself, slowing them down the closer they get to the edge of the radius." +[ + radius(float) : "Radius" : 256 : "Radius to constrain players to." + width(float) : "Constraint Width" : "75.0" : "Width of the constraint edge. This is the distance in which to start slowing players down as they approach the edge of the radius." + speedfactor(float) : "Speed Factor" : "0.15" : "Factor applied to the player's max speed as they approach the radius edge." + + // Inputs + input TurnOn(void) : "Start constraining any players within the radius." + input TurnOff(void) : "Stop constraining any players previously constrained." + + // Outputs + output OnConstraintBroken(void) : "Fired when a player breaks through the constraint." +] + +//------------------------------------------------------------------------- +// +// Physics entities +// +//------------------------------------------------------------------------- + +@SolidClass base(BreakableBrush,Targetname, Origin, RenderFields, Shadow) = func_physbox : + "A brush entity that's physically simulated." +[ + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + spawnflags(flags) = + [ + 4096 : "Start Asleep" : 0 + 8192 : "Ignore +USE for Pickup" : 0 + 16384 : "Debris - Don't collide with the player or other debris" : 0 + 32768 : "Motion Disabled" : 0 + 65536 : "Use Preferred Carry Angles" : 0 + 131072: "Enable motion on Physcannon grab" : 0 + 262144: "Not affected by rotor wash" : 0 + 524288: "Generate output on +USE " : 1 + 1048576 : "Physgun can ALWAYS pick up. No matter what." : 0 + 2097152 : "Physgun is NOT allowed to pick this up." : 0 + 4194304 : "Physgun is NOT allowed to punt this object." : 0 + ] + + Damagetype(choices) : "Impact Damage Type" : 0 = + [ + 0: "Blunt" + 1: "Sharp" + ] + + massScale(float) : "Mass Scale" : "0" : "A scale multiplier for the object's mass." + overridescript(string) : "Override Parameters" : "" : "A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'." + damagetoenablemotion(integer) : "Health Level to Override Motion" : 0 : "If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion." + forcetoenablemotion(float) : "Physics Impact Force to Override Motion" : 0 : "If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion." + health(integer) : "Strength" : 0 : "Number of points of damage to take before breaking. 0 means don't break." + preferredcarryangles(vector) : "Preferred Player-carry Angles" : "0 0 0" : "If the 'Use Preferred Carry Angles' spawnflag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE." + notsolid(choices) : "Not solid to world" : 0 = + [ + 0: "Solid to World" + 1: "Passes through World" + ] + + // Inputs + input Wake(void) : "Wake up this physics object, if it is sleeping." + input Sleep(void) : "Put this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this." + input EnableMotion(void) : "Enable physics motion/collision response." + input DisableMotion(void) : "Disable physics motion/collision response." + input ForceDrop(void) : "If this object is being carried by a player, with the physgun or +USE, force it to be dropped." + + // Outputs + output OnDamaged(void) : "Fired when this entity is damaged." + output OnAwakened(void) : "Fired when this entity becomes awake (collision/force is applied)." + output OnMotionEnabled(void) : "Fired when motion is enabled due to damage/physcannon/force." + output OnPhysGunPickup(void) : "Fired when a player picks this object up, either with the physgun or +USE." + output OnPhysGunOnlyPickup(void) : "Fired when a player picks this object up WITH THE PHYSGUN. +USE pickups do not fire this output." + output OnPhysGunDrop(void) : "Fired when a player drops this object." + output OnPlayerUse(void) : "Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set." +] + +@BaseClass base(Targetname) = TwoObjectPhysics +[ + spawnflags(flags) = + [ + 1: "No Collision until break" : 0 + // 2 is defined independently by subclasses, do not reuse + 4: "Start inactive" : 0 + 8: "Change mass to keep stable attachment to world" : 0 + ] + attach1(target_destination) : "Entity 1" : "" + attach2(target_destination) : "Entity 2" : "" + constraintsystem(target_destination) : "Constraint System Manager" : "" : "The name of a phys_constraintsystem that this constraint should be a part of. All constraints on a set of entities should be placed in the same system, or they will fight each other during simulation." + + forcelimit(float) : "Force Limit to Break (lbs)" : "0" : "The amount of force an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects." + torquelimit(float) : "Torque Limit to Break (lbs * distance)" : "0" : "The amount of torque required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint." + breaksound(sound) : "Play Sound on Break" : "" : "A sound played when the constraint is broken." + + // Inputs + input Break(void) : "Force the constraint to break." + input TurnOn(void) : "Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted." + input TurnOff(void) : "Disable this constraint." + + // Outputs + output OnBreak(void) : "Fired when the constraint breaks." +] + +@PointClass base(Targetname) = phys_constraintsystem : + "An entity used to manage a group of interacting constraints and keep them stable. " + + "All constraints on a set of entities should be placed in the same system, or they will fight each other during simulation." +[ + additionaliterations(integer) : "Additional System Iterations" : 0 : "Adding iterations makes the interactions among constraints in a system tighter. It will not compensate for errors due to collision, but will help in cases where objects of disparate mass are constrained to each other." +] + +@PointClass base(Targetname,Angles) = phys_keepupright : "A controller that tries to keep an entity facing a particular direction." +[ + spawnflags(flags) = + [ + 1: "Start inactive" : 0 + ] + + attach1(target_destination) : "Target Entity" : "" : "The entity to align to the desired angles." + angularlimit(float) : "Angular Limit" : "15" : "The maximum angular velocity that this controller can compensate for, in degrees per second." + + // Inputs + input TurnOn(void) : "Enable the controller." + input TurnOff(void) : "Disable the controller." +] + +@PointClass base(Targetname, Angles) sphere(expradius) studioprop() = physics_cannister : + "A physically simulated gas cannister that can have its cap shot off, at which point gas will start escaping and cause the cannister to fly around. If it takes enough damage, it will explode." +[ + model(studio) : "World model" : "models/fire_equipment/w_weldtank.mdl" + spawnflags(flags) = + [ + 1 : "Start Asleep" : 0 + 2 : "Explodes" : 1 + ] + + expdamage(string) : "Explosion Damage" : "200.0" : "The amount of damage done by the explosion created when the cannister blows up." + expradius(string) : "Explosion Radius" : "250.0" : "The radius of the explosion to create when the cannister blows up." + health(integer) : "Health" : 25 : "The amount of damage the cannister takes before exploding." + + thrust(string) : "Thrust" : "3000.0" : "When the cap has been blown off, and the escaping gas is thrusting the cannister about, this is the amount of thrust generated." + fuel(string) : "Fuel Seconds" : "12.0" : "The amount of time that gas leaks from the cannister before being considered empty." + rendercolor(color255) : "Smoke Color (R G B)" : "255 255 255" + renderamt(integer) : "Smoke Alpha (0 - 255)" : 128 + gassound(sound) : "Thruster Sound" : "ambient/objects/cannister_loop.wav" : "The sound played when the gas is escaping from the cannister." + + // Inputs + input Activate(string) : "Start gas escaping from the cannister." + input Deactivate(string) : "Stop gas escaping from the cannister." + input Explode(string) : "Force the cannister to explode." + input Wake(void) : "Wakes up the cannister, if it is sleeping." + + // Outputs + output OnActivate(void) : "Fired when gas starts to escape from the cannister." +] + +@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) = info_constraint_anchor : + "An entity used to attach constraints to a local position on an entity. Usually constraints will attach to the center of mass of an object. "+ + "Attach the desired constraint to this entity, and then parent this entity to the entity you want the constraint to apply to." +[ + massScale(float) : "Amount to scale the mass of this body in the constraint solver" : "1" +] + +@PointClass size(-4 -4 -4, 4 4 4) = info_mass_center : + "An entity that overrides the mass center of the target physics prop, or func_physbox, by moving it to the info_mass_center's location." +[ + target(target_destination) : "Target object" : "" : "The entity whose mass center will be overridden." +] + +@PointClass halfgridsnap base(Targetname) = phys_spring : + "A physically simulated spring. "+ + "'Length' is what's known as the 'natural spring length'. This is how long the spring would "+ + "be if it was at rest (nothing hanging on it or attached). When you attach something to the "+ + "spring, it will stretch longer than its 'natural length'. The amount of stretch is "+ + "determined by the 'Sprint Constant'. The larger the spring constant the less stretch the spring." +[ + spawnflags(flags) = + [ + 1 : "Force only on stretch" : 0 + ] + + attach1(target_destination) : "Entity 1" : "" + attach2(target_destination) : "Entity 2" : "" + + springaxis(vecline) : "Spring Axis" : "" : "Use the helper. Drag it out to match the virtual spring." + length(string) : "Spring Length" : "0" : "How long the spring would be if it was at rest (nothing hanging on it or attached). 0 means the length of the brush." + constant(string) : "Spring Constant" : "50" : "Stiffness of the spring. The larger the number the less the spring will stretch." + damping(string) : "Damping Constant" : "2.0" : "How much energy the spring loses. The larger the number, the less bouncy the spring." + relativedamping(string) : "Relative Damping Constant" : "0.1" : "The amount of energy the spring loses proportional to the relative velocity of the two objects the spring is attached to." + // UNDONE: add max tension and what event to fire when it breaks + breaklength(string) : "Break on Length" : "0" : "If the spring's length ever exceeds this length, the spring breaks." + + // Inputs + input SetSpringConstant(float) : "Set the Spring Constant." + input SetSpringLength(float) : "Set the Spring Length." + input SetSpringDamping(float) : "Set the Spring Damping." +] + +@PointClass halfgridsnap size(-8 -8 -8, 8 8 8) base(TwoObjectPhysics) = phys_hinge : + "A physically simulated hinge. Use the helper to define the axis of rotation." +[ + hingefriction(float) : "Friction" : "0" : "Resistance/friction in the hinge" + hingeaxis(vecline) : "Hinge Axis" + SystemLoadScale(float) : "Load Scale" : "1" : "Scale of the load connected to this hinge (1=just the objects directly connected)" + + // Inputs + input SetAngularVelocity(float) : "Set angular velocity around the hinge (motor)" +] + +@PointClass base(TwoObjectPhysics) iconsprite("editor/phys_ballsocket.vmt") = phys_ballsocket : + "A constraint that keeps the position of two objects fixed, relative to the constraint's origin. It does not affect rotation." +[ + spawnflags(flags) = + [ + ] +] + +@PointClass base(TwoObjectPhysics) studio("models/editor/axis_helper.mdl") = phys_constraint : + "A constraint that keeps the relative position and orientation of two objects fixed." +[ + spawnflags(flags) = + [ + 1: "No Collision until break" : 1 + ] +] + +@PointClass base(TwoObjectPhysics) studio("models/editor/axis_helper.mdl") = phys_pulleyconstraint : + "A constraint that is essentially two length constraints and two points. Imagine it as a virtual rope connected to two objects, each suspended from a pulley above them."+ + "The constraint keeps the sum of the distances between the pulley points and their suspended objects constant." +[ + addlength(float) : "Additional Length" : "0" : "Add (or subtract) this amount to the rest length of the pulley rope." + gearratio(float) : "Pulley Gear Ratio" : "1" : "Add (or subtract) this amount to the rest length of the pulley rope." + position2(vecline) : "Pulley Position 2" : : "The position of the pulley for Entity 2. The pulley for Entity 1 is the origin of this constraint entity. Entity 1 is always suspended from pulley point 1, and Entity 2 is always suspended from pulley point 2." + spawnflags(flags) = + [ + 1: "No Collision until break" : 1 + 2: "Keep Rigid" : 0 + ] +] + +@PointClass halfgridsnap base(TwoObjectPhysics) studio("models/editor/axis_helper.mdl") = phys_slideconstraint : + "A constraint that constrains an entity along a line segment." +[ + spawnflags(flags) = + [ + 1: "No Collision until break" : 1 + 2: "Limit Endpoints" : 0 + ] + slideaxis(vecline) : "Sliding Axis" + slidefriction(float) : "Friction" : "0" : "Resistance/friction in the constraint" + SystemLoadScale(float) : "Load Scale" : "1" : "Scale of the mass load connected to this constraint (1=just the objects directly connected)" + + // Inputs + input SetVelocity(float) : "Set linear velocity along the constraint" +] + +@PointClass base(TwoObjectPhysics) studio("models/editor/axis_helper.mdl") = phys_lengthconstraint : + "A constraint that preserves the distance between two entities. If the 'Keep Rigid' flag is set, think of it as a rod. If not, think off it as a virtual rope." +[ + addlength(float) : "Additional Length" : "0" : "Add (or subtract) this amount to the rest length of the rope." + minlength(float) : "Minimum Length" : "0" : "If the constraint is not rigid, this is the minimum length it can be." + attachpoint(vecline) : "Attached object 2 point" : "The position the rope attaches to object 2" + spawnflags(flags) = + [ + 1: "No Collision until break" : 1 + 2: "Keep Rigid" : 0 + ] +] + +@PointClass base(TwoObjectPhysics) studio("models/editor/axis_helper.mdl") = phys_ragdollconstraint : + "A constraint that fixes the position of two entities, relative to this constraint's origin. Also allows for limits on the rotation around each axis, in the space of this constraint." +[ + spawnflags(flags) = + [ + 1: "No Collision until break" : 1 + 2: "Only limit rotation (free movement)" : 0 + ] + + xmin(float) : "X axis min limit" : "-90" : "-180 min and 180 max = no constraint on this axis." + xmax(float) : "X axis max limit" : "90" : "-180 min and 180 max = no constraint on this axis." + ymin(float) : "Y axis min limit" : "0" : "-180 min and 180 max = no constraint on this axis." + ymax(float) : "Y axis max limit" : "0" : "-180 min and 180 max = no constraint on this axis." + zmin(float) : "Z axis min limit" : "0" : "-180 min and 180 max = no constraint on this axis." + zmax(float) : "Z axis max limit" : "0" : "-180 min and 180 max = no constraint on this axis." + xfriction(float) : "X axis friction" : "0" + yfriction(float) : "Y axis friction" : "0" + zfriction(float) : "Z axis friction" : "0" +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) color(0 0 255) = phys_convert : + "Turns an arbitrary entity into a physically simulated entity. i.e. brush entities will behave like func_physbox, model entities behave like prop_physics." +[ + spawnflags(flags) = + [ + 1: "Convert Asleep" : 0 + ] + target(target_destination) : "Entity to convert" : : "Name of the entity that will be converted to a physics object when the ConvertTarget input is fired." + swapmodel(string) : "Model Swap Entity" + + // Outputs + output OnConvert(void) : "Fires after the conversion has taken place." + + // Inputs + input ConvertTarget(void) : "Converts this entity's target to a physically simulated object." +] + +@BaseClass base(Targetname) = ForceController +[ + spawnflags(flags) = + [ + // Thrust is on by default (will turn off in forcetime) + 1: "Start On" : 0 + // Apply linear force (if off, torque only) + 2: "Apply Force" : 1 + // Apply rotational force (torque - if off, linear only) + 4: "Apply Torque" : 1 + // Maintain local relationship with the attached object + 8: "Orient Locally" : 1 + // Impulse is independent of object's mass (impulse is acceleration NOT force) + 16: "Ignore Mass" : 0 + ] + attach1(target_destination) : "Attached Object" : "" : "Object to apply the force to." + + forcetime(string) : "Time of Force (0=inf)" : "0" : "Automatic shut-off after this time has passed (0 = stay on forever or until deactivated)" + + input Activate(void) : "Turn the force on" + input Deactivate(void) : "Turn the force off" + input Scale(string) : "Set Force Scale" +] + +@PointClass base(Angles, ForceController) = phys_thruster : + "An entity used to apply constant acceleration to a physics object. "+ + "The force and torque is calculated using the position and direction of the thruster as an impulse. So moving those off the object's center "+ + "will cause torque as well. Torque can be removed by unchecking the 'apply torque' flag. The position of the thruster can be forced to be "+ + "at the object's center by checking to 'ignore pos' flag." +[ + spawnflags(flags) = + [ + // Put the thrust at the object center + 32: "Ignore Pos" : 0 + ] + + force(string) : "Force" : "0" : "Force (will be integrated, units are force kg*in/s^2)" +] + +@PointClass halfgridsnap base(ForceController) = phys_torque : + "An angular thruster. Use it to apply angular force to an entity." +[ + // Angular acceleration (units are degress/s^2) + force(string) : "Angular Acceleration" : "0" + axis(vecline) : "Rotation Axis" : "" +] + +@PointClass base(Targetname) halfgridsnap size(-8 -8 -8, 8 8 8) = phys_motor : + "An entity that tries to spin a target entity at a particular speed." +[ + speed(string) : "Rotation Speed" : "0" : "Angular speed (units are degress/second)" + spinup(string) : "Spin up time" : "1" : "spin up time in seconds (also affects the rate at which speed changes happen)" + inertiafactor(float) : "System Interia Scale" : "1.0" : "Make this larger if the object being driven is constrained to a set of heavier objects." + axis(vecline) : "Rotation Axis" : "" + + spawnflags(flags) = + [ + // starts on by default + 1: "Start On" : 1 + // Disable world collisions on hinges + 2: "No world collision" : 0 + // motor also acts as a hinge constraining the object to this axis + 4: "Hinge Object" : 1 + // Maintain local relationship with the attached object (NOT WORKING YET) +// 8: "Orient Locally" : 1 + ] + attach1(target_destination) : "Attached Object" : "" : "Object to apply the force to" + + // Inputs + input SetSpeed(float) : "Sets target speed" + input TurnOn(void) : "Turns motor on" + input TurnOff(void) : "Turns motor off" +] + +@PointClass base(Targetname, Parentname, Angles, Studiomodel) studio() = phys_magnet : + "An entity that acts like a magnet, attaching metallic physics objects to itself when they touch it." +[ + spawnflags(flags) = + [ + 1 : "Start Asleep" : 0 + 2 : "Motion Disabled" : 0 + 4 : "Suck On Touch" : 0 + 8 : "Allow Attached Rotation" : 0 + 16: "Coast jeep pickup hack" : 0 + ] + + forcelimit(float) : "Force Limit to Break (lbs)" : "0" : "The amount of force necessary to break a stuck object off the magnet. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the magnet." + torquelimit(float) : "Torque Limit to Break (lbs * distance)" : "0" : "The amount of torque necessary to break a stuck object off the magnet. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint." + + massScale(float) : "Mass Scale" : "0" : "A scale multiplier for the object's mass." + overridescript(string) : "Override parameters" : "" : "A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'." + maxobjects(integer) : "Maximum Attached Objects" : 0 : "The maximum number of physics objects that can be stuck to the magnet at once. 0 = no limit." + + // Inputs + input TurnOn(void) : "Turn the magnet on." + input TurnOff(void) : "The the magnet off. This will detach anything current stuck to the magnet." + + // Outputs + output OnAttach(void) : "Fired when an entity is grabbed by the magnet." + output OnDetach(void) : "Fired when an entity is released by the magnet." +] + + +//------------------------------------------------------------------------- +// +// Props +// +//------------------------------------------------------------------------- + +@BaseClass = prop_detail_base +[ + model(studio) : "World model" +] + +@BaseClass base(Angles, DXLevelChoice) = prop_static_base +[ + model(studio) : "World Model" + skin(integer) : "Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default." + solid(choices) : "Collisions" : 6 = + [ + 0: "Not Solid" + 2: "Use Bounding Box" + 6: "Use VPhysics" + ] + disableshadows(choices) : "Disable Shadows" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + screenspacefade(choices) : "Screen Space Fade" : 0 : "The method by which the fading distance should be determined. If 'No', the fade distances is the distance from the player's view to the object, in inches. If 'Yes', the fade distance is the size of the object onscreen, in pixels." = + [ + 0 : "No" + 1 : "Yes" + ] + fademindist(float) : "Start Fade Dist/Pixels" : -1 : "Distance at which the prop starts to fade (<0 = use fademaxdist). If 'Screen Space Fade' is selected, this represents the number of pixels wide covered by the prop when it starts to fade." + fademaxdist(float) : "End Fade Dist/Pixels" : 0 : "Maximum distance at which the prop is visible (0 = don't fade out). If 'Screen Space Fade' is selected, this represents the *minimum* number of pixels wide covered by the prop when it fades." + fadescale(float) : "Fade Scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." + + " This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades." + + " Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances." + lightingorigin(target_destination) : "Lighting Origin" : "" : "Select an info_lighting to specify a location to sample lighting from, instead of using this entity's origin." + disablevertexlighting(choices) : "Disable Vertex lighting" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + disableselfshadowing(choices) : "Disable Self-Shadowing with vertex lighting" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] +] + +@BaseClass base(Parentname, Global, Angles, Studiomodel, BreakableProp, DXLevelChoice) = prop_dynamic_base +[ + solid(choices) : "Collisions" : 6 = + [ + 0: "Not Solid" + 2: "Use Bounding Box" + 6: "Use VPhysics" + ] + + spawnflags(flags) = + [ + 64 : "Use Hitboxes for Renderbox" : 0 + ] + + DefaultAnim(string) : "Default Animation" : "" : "The name of the idle animation that this prop will revert to whenever it finishes a random or forced animation." + + RandomAnimation(choices) : "Randomly Animate" : 0 : "If set, this prop will randomly choose and play animations, based upon the times specified in 'Min/Max Random Anim Time'. Inbetween the random animations, it will revert to playing the 'Default Animation'." = + [ + 0: "No" + 1: "Yes" + ] + MinAnimTime(float) : "Min Random Anim Time" : "5" : "Minimum time between random animations." + MaxAnimTime(float) : "Max Random Anim Time" : "10" : "Maximum time between random animations." + SetBodyGroup(integer) : "Body Group" : 0 // NEEDHELP + + fademindist(float) : "Start Fade Dist" : -1 : "Distance at which the prop starts to fade (<0 = use fademaxdist)." + fademaxdist(float) : "End Fade Dist" : 0 : "Max fade distance at which the prop is visible (0 = don't fade out)" + fadescale(float) : "Fade Scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." + + " This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades." + + " Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances." + + // Inputs + input SetAnimation(string) : "Force the prop to play an animation. The parameter should be the name of the animation." + input SetDefaultAnimation(string) : "Set the Default Animation to the one specified in the parameter." + input SetBodyGroup(integer) : "Set the visible bodygroup, by index." + input TurnOn(void) : "Make the prop visible." + input TurnOff(void) : "Make the prop invisible." + + // Outputs + output OnAnimationBegun(void) : "Fired whenever a new animation has begun playing." + output OnAnimationDone(void) : "Fired whenever an animation is complete." +] + +@PointClass base(prop_detail_base) studioprop() = prop_detail : + "Detail Prop" +[ + model(studio) : "World model" +] + +@PointClass base(prop_static_base) color(255 255 0) sphere(fademindist) sphere(fademaxdist) studioprop() = prop_static : + "A prop that doesn't move and doesn't animate." +[ +] + +@PointClass base(prop_dynamic_base,EnableDisable) studioprop() = prop_dynamic : + "A prop that can be placed in hierarchy and can play animations. It can also be configured to break when it takes enough damage. "+ + "Note that the health of the object will be overridden by the health inside the model, to ensure consistent health game-wide. "+ + "If the model used by the prop is configured to be used as a prop_physics (i.e. it should be physically simulated) then it CANNOT be "+ + "used as a prop_dynamic. Upon level load it will display a warning in the console and remove itself. Use a prop_physics instead." +[ +] + +@PointClass base(prop_dynamic_base) studioprop() = prop_dynamic_override : + "A prop that can be placed in hierarchy and can play animations. It can also be configured to break when it takes enough damage.\n"+ + "prop_dynamic_override is a prototyping entity only. It will allow the use of models designed to be used as prop_physics." +[ + health(integer) : "Health" : 0 : "Number of points of damage to take before breaking. 0 means don't break." +] + +@BaseClass base(Targetname, Global, Angles, Studiomodel, BreakableProp, DXLevelChoice) = BasePropPhysics +[ + spawnflags(flags) = + [ + 1 : "Start Asleep" : 0 + 2 : "Don't take physics damage" : 0 + 4 : "Debris - Don't collide with the player or other debris" : 0 + 8 : "Motion Disabled" : 0 + 64 : "Enable motion on Physcannon grab" : 0 + 128 : "Not affected by rotor wash" : 0 + 256 : "Generate output on +USE " : 1 + 512 : "Prevent pickup" : 0 + 1024: "Prevent motion enable on player bump" : 0 + 4096: "Debris with trigger interaction" : 0 + 8192: "Force server-side (Multiplayer only)" : 0 + 1048576: "Physgun can ALWAYS pick up. No matter what." : 0 + ] + + minhealthdmg(integer) : "Min Damage to Hurt" : 0 : "The prop will ignore any damage events if the damage is less than this amount." + shadowcastdist(integer) : "Shadow Cast Distance" : 0 : "Use this to override how far this object casts shadows. 0 = default distance." + physdamagescale(float) : "Physics Impact Damage Scale" : "0.1" : "Scales damage energy when this object is hit by a physics object. NOTE: 0 means this feature is disabled for backwards compatibility.\nSet to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials." + Damagetype(choices) : "Impact damage type" : 0 = + [ + 0: "Blunt" + 1: "Sharp" + ] + + nodamageforces(choices) : "Damaging it Doesn't Push It" : 0 : "Used to determine whether or not damage should cause the brush to move." = + [ + 0: "No" + 1: "Yes" + ] + + inertiaScale(float) : "Scale Factor For Inertia" : "1.0" : "Scales the angular mass of an object. Used to hack angular damage and collision response." + massScale(float) : "Mass Scale" : "0" : "A scale multiplier for the object's mass." + overridescript(string) : "Override Parameters" : "" : "A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'." + damagetoenablemotion(integer) : "Health Level to Override Motion" : 0 : "If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion." + forcetoenablemotion(float) : "Physics Impact Force to Override Motion" : 0 : "If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion." + + fademindist(float) : "Start Fade Dist" : -1 : "Distance at which the prop starts to fade (<0 = use fademaxdist)" + fademaxdist(float) : "End Fade Dist" : 0 : "Max fade distance at which the prop is visible (0 = don't fade out)" + fadescale(float) : "fade scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running under dx7, or the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." + + " This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades." + + " Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances." + puntsound(sound) : "Sound to make when punted" + + // Inputs + input Wake(void) : "Wake up this physics object, if it is sleeping." + input Sleep(void) : "Put this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this." + input EnableMotion(void) : "Enable physics motion/collision response." + input DisableMotion(void) : "Disable physics motion/collision response." + input DisableFloating(void) : "Disable fluid/floating simulation to reduce cost." + input SetBodyGroup(integer) : "Set this prop's body group (from 0 - n)." + input physdamagescale(float) : "Set the Physics Impact Damage Scale for this character. NOTE: 0 means this feature is disabled for backwards compatibility." + input EnableDamageForces(void) : "Damaging the entity applies physics forces to it." + input DisableDamageForces(void) : "Damaging the entity does *not* apply physics forces to it." + input EnablePuntSound(void) : "Allow this prop to play its own sound when punted" + input DisablePuntSound(void) : "Prevent this prop from playing its own sound when punted" + + // Outputs + output OnMotionEnabled(void) : "Fired when motion is enabled on this prop, either via 'Health Level to Override Motion' or from the EnableMotion input." + output OnAwakened(void) : "Fired when this entity becomes awake (collision/force is applied to it while it's asleep)." + output OnPhysGunPickup(void) : "Fired when the player picks up the prop with the physcannon or +USE." + output OnPhysGunOnlyPickup(void) : "Fired when a player picks this object up WITH THE PHYSGUN. +USE pickups do not fire this output." + output OnPhysGunDrop(void) : "Fired when the player drops the prop with the physcannon or USE." + output OnPlayerUse(void) : "Fired when the player tries to +USE the prop. This output will fire only if the Generate output on +USE spawnflag is set." + output OnPlayerPickup(void) : "Fired whenever the player picks up this prop (with the physcannon or with +USE)." +] + +@PointClass base(BasePropPhysics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_override : + "A prop that physically simulates as a single rigid body. It can be constrained to other physics objects using hinges "+ + "or other constraints. It can also be configured to break when it takes enough damage. Health can be overridden on this version." +[ + health(integer) : "Health" : 0 : "Number of points of damage to take before breaking. 0 means don't break." + + // Inputs + input Ignite(void) : "Ignite, burst into flames." +] + +@PointClass base(BasePropPhysics, RenderFields) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics : + "A prop that physically simulates as a single rigid body. It can be constrained to other physics objects using hinges "+ + "or other constraints. It can also be configured to break when it takes enough damage. "+ + "Note that the health of the object will be overridden by the health inside the model, to ensure consistent health game-wide. "+ + "If the model used by the prop is configured to be used as a prop_dynamic (i.e. it should not be physically simulated) then it CANNOT be "+ + "used as a prop_physics. Upon level load it will display a warning in the console and remove itself. Use a prop_dynamic instead." +[ + // Inputs + input Ignite(void) : "Ignite, burst into flames." +] + +@PointClass base(prop_physics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_multiplayer : + "This class is the same as prop_physics, except the runtime collisions use a more bouncy method that avoids " + + "the prediction errors normal physics objects get." +[ +] + +@PointClass base(Angles, Targetname, Studiomodel, DXLevelChoice) studioprop() = prop_ragdoll : + "A prop that physically simulates and can be articulated with internal joints. The joint constraints are part of the physics model." +[ + spawnflags(flags) = + [ + 4 : "Debris - Don't collide with the player or other debris" : 1 + 8192 : "Allow Dissolve" : 0 + ] + angleOverride(string) : "Override Animation" : "" : "Filled in by the engine via wc_update_entity, do not edit by hand except to clear." + fademindist(float) : "Start Fade Dist" : -1 : "Distance at which the prop starts to fade (<0 = use fademaxdist)" + fademaxdist(float) : "End Fade Dist" : 0 : "Max fade distance at which the prop is visible (0 = don't fade out)" + fadescale(float) : "fade scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running under dx7, or the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." + + " This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades." + + " Numbers smaller than 1 cause the prop to fade out at further distances, and greater than 1 cause it to fade out at closer distances." + + input StartRagdollBoogie(void) : "Begins ragdoll boogie effect. Parameter override = number of seconds to boogie." +] + +@PointClass base(prop_dynamic_base) studioprop() = prop_dynamic_ornament : + "A way to attach one studio model to another as an ornament. It will render in the way that player/NPC weapons render." +[ + solid(choices) : "Collisions" : 0 = + [ + 0: "Not Solid" + ] + + InitialOwner(string) : "Target Entity" : : "Name of the entity that this ornament should attach to, at startup." + + // Inputs + input SetAttached(string) : "Attach the ornament to a different entity. Parameter should be the name of entity to attach to." + input Detach(string) : "Detach from the Target Entity and become invisible. The ornament can be re-attached with the SetAttached input." +] + + +//------------------------------------------------------------------------- +// +// Solid Entities +// +//------------------------------------------------------------------------- + +@SolidClass base(Targetname) color(0 255 255) = func_areaportal : + "A portal brush used to manage visibility in maps. Portals define areas, which are spaces " + + "that are connected in the map. Both sides of a portal cannot touch the same area, for example, a " + + "doughnut shaped map would require at least two portals to divide the map into two areas. A linear map " + + "could be divided into two areas with a single area portal." +[ + target(target_destination) : "Name of Linked Door" : : "(Optional) The name of a door whose open/closed state controls the on/off state of this area portal." + StartOpen(choices) : "Initial State" : 1 = + [ + 0 : "Closed" + 1 : "Open" + ] + + PortalVersion(integer) readonly : "Portal Version" : 1 : "(Don't change). Differentiates between shipping HL2 maps and maps using new engine features." + + // Inputs + input Open(void) : "Open the portal. When the portal is open is can be seen through." + input Close(void) : "Close the portal. When the portal is closed it cannot be seen through." + input Toggle(void) : "Toggle the open/closed state of the portal." +] + +@SolidClass base(Targetname) color(0 255 255) = func_occluder : + "A occluder brush used to manage dynamic visibility in maps. Occluders are used to dynamically " + + "determine what things are behind them, to prevent trying to draw them at all." +[ + StartActive(choices) : "Initial State" : 1 = + [ + 0 : "Inactive" + 1 : "Active" + ] + + // Inputs + input Deactivate(void) : "Deactivate the occluder, When inactive, it can be seen through." + input Activate(void) : "Activate the occluder. When active, it cannot be seen through." + input Toggle(void) : "Toggle the active/inactive state of the occluder." +] + +@SolidClass base(BreakableBrush, Origin, RenderFields, Shadow) = func_breakable : + "A brush entity that can be broken from damage, or an input." +[ + minhealthdmg(integer) : "Min Damage to Hurt" : 0 : "The prop will ignore any damage events if the damage is less than this amount." + + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + physdamagescale(float) : "Physics Impact Damage Scale" : "1.0" : "Scales damage energy when this object is hit by a physics object. NOTE: 0 means this feature is disabled for backwards compatibility.\nSet to 1.0 for materials as strong as flesh, smaller numbers indicate stronger materials." +] + +@SolidClass quadbounds() base(BreakableBrush, RenderFields, Shadow) = func_breakable_surf : + "A breakable surface, for partially breakable glass / tile / etc. All faces but the desired visible one must be marked as NODRAW and that" + + "face must be 4 sided. The material applied to the visible face must be set up to be breakable." +[ + health(integer) : "Health" : 5 : "The amount of damage the surface takes before breaking." + fragility(integer) : "Fragility" : 100 : "If the 'Surface Type' is set to Glass, this value sets how fragile the glass pieces are after the surface has been broken." + surfacetype(choices) : "Surface Type" : 0 = + [ + 0 : "Glass" + 1 : "Tile" + ] + + // Inputs + input Shatter(vector) : "Shatter the window. Input a vector. First two coordinates are the X,Y center of the shattering (as values from from 0-1). The third coordinate is the radius of the shatter, in inches." +] + +@SolidClass base(Targetname, Parentname, RenderFields, Shadow) = func_conveyor : + "Conveyor Belt" // NEEDHELP +[ + movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction conveyor moves." + spawnflags(flags) = + [ + 1 : "No Push" : 0 + 2 : "Not Solid" : 0 + ] + speed(string) : "Conveyor Speed" : "100" + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + + // Inputs + input ToggleDirection(void) : "ToggleDirection" + input SetSpeed(integer) : "SetSpeed" +] + +@SolidClass base(DXLevelChoice) color(0 180 0) = func_detail : + "An entity that turns its brushes into detail brushes. Detail brushes do NOT contribute to visibility in the PVS. World geometry "+ + "is not clipped to detail brushes, so if you have a small detail clump attached to a wall, the wall won't be cut up by the detail brush."+ + "func_detail is great for high-frequency brush geometry that's visual detail only. It is also ideal for reducing map VIS time." +[ +] + +@SolidClass base(Targetname, Parentname, Origin, RenderFields, Shadow) = func_illusionary : + "Legacy support. Use func_brush instead." +[ + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@SolidClass base(Targetname, Parentname) = func_precipitation : + "A brush entity that creates rain and snow inside its volume." +[ + renderamt(integer) : "Density (0-100%)" : 5 + rendercolor(color255) : "Color (R G B)" : "100 100 100" + preciptype(choices) : "Precipitation Type" : 0 = + [ + 0 : "Rain" + 1 : "Snow" + 2 : "Ash" + 3 : "Snowfall" + ] +] + +@SolidClass base(func_wall) = func_wall_toggle : + "A brush entity that can be toggled on/off. When off, the brush will be non-solid and invisible. Does not cast lightmap shadows." +[ + spawnflags(flags) = + [ + 1 : "Starts Invisible" : 0 + ] + + // Inputs + input Toggle(void) : "Toggle the brush on/off. When off, the brush will be non-solid and invisible." +] + + +//@SolidClass base(Door) = func_water : +// "Liquid" // NEEDHELP +//[ +// spawnflags(flags) = +// [ +// 1 : "Starts Open" : 0 +// 256:"Use Only" : 0 +// ] +// movedir(angle) : "Move Direction (Pitch Yaw Roll)" : "0 0 0" : "The direction the water will move when it is told to 'Open'." +// WaveHeight(string) : "Wave Height" : "3.0" +//] + +@SolidClass base(Targetname, Parentname, RenderFields, Global) = func_guntarget : + "This is a moving target that moves along a path of path_tracks. It can be shot and killed." +[ + speed(integer) : "Speed (units per second)" : 100 : "The speed at which the target moves along its path." + target(target_destination) : "First stop target" : : "The name of the first path_track entity in the path that this target should follow." + health(integer) : "Damage to Take" : 0 : "The amount of damage taken before this target is killed." + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + + // Inputs + input Start(void) : "Start the target moving." + input Stop(void) : "Stop the target from moving." + input Toggle(void) : "Toggle the target between moving and stopped." + + // Outputs + output OnDeath(void) : "Fires when the target is killed." +] + +@PointClass = func_fish_pool : "Creates a school of interactive fish that swim near this entity." +[ + model(studio) : "World model" : "models/Junkola.mdl" + fish_count(integer) : "Fish Count" : 10 : "Number of Fish in this Pool" + max_range(float) : "Max Range" : 150 : "How far away a Fish can wander (max 255)" +] + + +//------------------------------------------------------------------------- +// +// Trains and Tracks +// +//------------------------------------------------------------------------- + +@BaseClass = PlatSounds +[ + movesnd(choices) : "Move Sound" : 0 : "The sound played whenever the platform starts moving." = + [ + 0: "No Sound" + 1: "big elev 1" + 2: "big elev 2" + 3: "tech elev 1" + 4: "tech elev 2" + 5: "tech elev 3" + 6: "freight elev 1" + 7: "freight elev 2" + 8: "heavy elev" + 9: "rack elev" + 10: "rail elev" + 11: "squeek elev" + 12: "odd elev 1" + 13: "odd elev 2" + ] + stopsnd(choices) : "Stop Sound" : 0 : "The sound played when the platform stops moving." = + [ + 0: "No Sound" + 1: "big elev stop1" + 2: "big elev stop2" + 3: "freight elev stop" + 4: "heavy elev stop" + 5: "rack stop" + 6: "rail stop" + 7: "squeek stop" + 8: "quick stop" + ] + volume(string) : "Sound Volume 0.0 - 1.0" : "0.85" +] + +@BaseClass base(Targetname, Parentname, RenderFields, Global, PlatSounds) = Trackchange +[ + height(integer) : "Travel Altitude" : 0 : "The vertical height above the track that the train moves. Negative values moves the train below." + spawnflags(flags) = + [ + 1: "Auto Activate train" : 0 + 2: "Relink track" : 0 + 8: "Start at Bottom" : 0 + 16: "Rotate Only" : 0 + 64: "X Axis" : 0 + 128: "Y Axis" : 0 + ] + rotation(integer) : "Spin amount" : 0 : "The amount this platform should rotate as it moves, in degrees." + train(target_destination) : "Train to Switch" // NEEDHELP + toptrack(target_destination) : "Top Track" // NEEDHELP + bottomtrack(target_destination) : "Bottom Track" // NEEDHELP + speed(integer) : "Move/Rotate Speed" : 0 // NEEDHELP +] + +@BaseClass base(Targetname, Parentname, Origin, RenderFields, Global, Shadow) = BaseTrain +[ + spawnflags(flags) = + [ + 1 : "No Pitch (X-rot)" : 0 + 2 : "No User Control" : 0 + 8 : "Passable" : 0 + 16 : "Fixed Orientation" : 0 + 128 : "HL1 Train" : 0 + 256 : "Use max peed for pitch shifting move sound" : 0 + 512 : "Is unblockable by player" : 0 + ] + + target(target_destination) : "First Stop Target" : "" : "The name of the first path_track in the train's path. The train " + + "will spawn at this path_track. It will also turn to face direction indicated by the 'Orientation Type' setting." + + startspeed(integer) : "Max Speed (units / second)" : 100 : "The maximum speed that this train can move. "+ + "Any speeds applied to this train, such as by path_tracks or SetSpeed inputs, will be clipped to this maximum value." + + speed(integer) : "Initial Speed (units / second)" : 0 : "The speed that the train will move at after it spawns, 0 = stopped." + + velocitytype(choices) : "Change Velocity" : 0 : "The method through which this train changes its velocity as it moves along the path." = + [ + 0 : "Instantaneously" + 1 : "Linear blend" + 2 : "Ease in/ease out" + ] + + orientationtype(choices) : "Change angles" : 1 : "The method through which this train changes its orientation as it moves along the path." = + [ + 0 : "Never (fixed orientation)" + 1 : "Near path_tracks" + 2 : "Linear blend" + 3 : "Ease in/ease out" + ] + + wheels(integer) : "Distance Between the Wheels" : 50 : "Used for turning and stopping." + height(integer) : "Height above track" : 4 : "The height above the track that this train moves." + bank(string) : "Bank Angle on Turns" : "0" // NEEDHELP + + dmg(integer) : "Damage on Crush" : 0 : "The amount of damage this train does to entities that block it." + + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + + MoveSound(sound) : "Move Sound" : "" : "A sound that is played (and looped) while the train is moving." + MovePingSound(sound) : "Move Ping Sound" : "" : "A sound that is played more frequently as the train speeds up." + StartSound(sound) : "Start Sound" : "" : "A sound played when the train starts moving." + StopSound(sound) : "Stop Sound" : "" : "A sound played when the train stops moving." + volume(integer) : "Volume (10 = loudest)" : 10 + MoveSoundMinPitch(integer) : "Min pitch (1-255, > 100 = higher)" : 60 : "The sound pitch value that the train will approach as it comes to a stop." + MoveSoundMaxPitch(integer) : "Max pitch (1-255, > 100 = higher)" : 200 : "The sound pitch value that the train will approach as it approaches its "+ + "max speed (or 1000 inches/second if the 'Use max speed for pitch shifting move sound' flag is not set)." + MoveSoundMinTime(float) : "Min move sound interval" : 0 : "Minimum interval at which to play the move ping sound." + MoveSoundMaxTime(float) : "Max move sound interval" : 0 : "Maximum interval at which to play the move ping sound." + + // Inputs + input SetSpeed(float) : "Set the speed of the train, as a ratio of max speed [0, 1]" + input SetSpeedDir(float) : "Set the speed of the train, as a ratio of max speed. Negative values reverse the direction [-1, 1]" + input SetSpeedReal(float) : "Set the speed of the train. Must be a positive value from 0 to max speed." + input Stop(void) : "Stop the train." + input StartForward(void) : "Start the train moving forward." + input StartBackward(void) : "Start the train moving backward." + input Resume(void) : "Resume the train moving in the current direction after it was stopped via the 'Stop' or 'Toggle' input." + input Reverse(void) : "Reverse the direction of the train." + input Toggle(void) : "Toggle the train between start and stop." +] + +@SolidClass base(Trackchange) = func_trackautochange : + "An entity that works as a rotating/moving platform that will carry a train to a new track. "+ + "It must be larger in X-Y planar area than the train, since it must contain the train within "+ + "these dimensions in order to operate when the train is near it." +[ + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." + + // Inputs + input Trigger(void) : "Trigger the track change." +] + +@SolidClass base(Trackchange) = func_trackchange : + "An entity that works as a rotating/moving platform that will carry a train to a new track. "+ + "It must be larger in X-Y planar area than the train, since it must contain the train within "+ + "these dimensions in order to operate when the train is near it." +[ + _minlight(string) : "Minimum Light Level" : : "The minimum level of ambient light that hits this brush." +] + +@SolidClass base(BaseTrain) = func_tracktrain : + "A moving platform that the player can ride. It follows a path of path_track entities.\n" + + "NOTE: Build your train so that the front of the train is facing down the X axis. " + + "When it spawns it will automatically rotate to face the next path_track on the path." +[ +] + +@SolidClass base(BaseTrain) = func_tanktrain : + "A moving train that follows a path of path_track entities, shoots at the player, and can be killed.\n" + + "NOTE: Build your train so that the front of the train is facing down the X axis. " + + "When it spawns it will automatically rotate to face the next path_track on the path." +[ + health(integer) : "Health" : 100 + + // Outputs + output OnDeath(void) : "Fired when the tank is killed." +] + +@SolidClass base(Parentname,Global) = func_traincontrols : + "When used by the player, this entity overrides the player's controls to let them drive a train." +[ + target(target_destination) : "Train Name" : : "The target train to control when the player uses these controls." +] + +@PointClass base(Targetname) iconsprite("editor/tanktrain_aitarget.vmt") = tanktrain_aitarget : + "An entity that changes the target of a tanktrain_ai entity." +[ + target(target_destination) : "Tank AI Entity" : : "The tanktrain_ai entity to change the target of." + newtarget(target_destination) : "New Target Entity" : : "The entity to tell the tanktrain_ai to target." +] + +@PointClass base(Targetname) iconsprite("editor/tanktrain_ai.vmt") = tanktrain_ai : + "Train chase AI" // NEEDHELP +[ + target(target_destination) : "Train Name" + startsound(sound) : "Start Moving Sound" : "vehicles/diesel_start1.wav" + enginesound(sound) : "Engine Loop Sound" : "vehicles/diesel_turbo_loop1.wav" + movementsound(sound) : "Vehicle Movement Sound" : "vehicles/tank_treads_loop1.wav" +] + +@PointClass base(Targetname, Parentname, Angles) cylinder(255 255 255, targetname, target, radius, targetname, targetname, radius) color(255 192 0) size(16 16 16) = path_track : + "An entity used to build paths for other entities to follow. Each path_track is a node on the path, each holding the name of the next path_track in the path." +[ + spawnflags(Flags) = + [ + 1: "Disabled" : 0 + 2: "Fire once" : 0 + 4: "Branch Reverse" : 0 + 8: "Disable train" : 0 + 16: "Teleport to THIS path track" : 0 + ] + + target(target_destination) : "Next Stop Target" : : "The next path_track in the path." + altpath(target_destination) : "Branch Path" : : "An alternative path_track to be the next node in the path. Useful for making branching paths. Use the ToggleAlternatePath / EnableAlternatePath inputs to make the alternative path active." + speed(float) : "New Train Speed" : 0 : "When the train reaches this path_track, it will set its speed to this speed. "+ + "This speed must be a positive value that is less than the train's max speed. A value of 0 will cause no change in the train's speed." + radius(float) : "Path radius" : 0 : "Used by NPCs who follow track paths (attack chopper/gunship). This tells them the maximum distance they're allowed to be from the path at this node." + + orientationtype(choices) : "Orientation Type" : 1 : "The way that the path follower faces as it moves through this path track." = + [ + 0 : "No change" + 1 : "Face direction of motion" + 2 : "Face this path_track's angles" + ] + + // Inputs + input ToggleAlternatePath(void) : "Cause the track to toggle to/from its alternate path." + input EnableAlternatePath(void) : "Enable the alternate path of the track." + input DisableAlternatePath(void) : "Disable the alternate path of the track." + + input TogglePath(void) : "Cause the track to toggle on/off/" + input EnablePath(void) : "Enable the track." + input DisablePath(void) : "Disable the track." + + // Outputs + output OnPass(void) : "Fired when any entity following this path passes this path_track node." +] + + +//------------------------------------------------------------------------- +// +// Test Entities +// +//------------------------------------------------------------------------- +@PointClass base(Angles) size(-16 -16 -16, 16 16 16) color(255 255 255) = test_traceline : + "A debugging tool for testing tracelines." +[ +] + + +//------------------------------------------------------------------------- +// +// Triggers +// +//------------------------------------------------------------------------- + +@SolidClass base(Targetname) = trigger_autosave : + "A trigger volume that autosaves when the player touches it." +[ + master(string) : "Master" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." + NewLevelUnit(choices) : "Force New Level Unit" : 0 : "If set, the save will discard any savedata from previous levels, for the purpose of keeping savegame filesizes down. Can only be safely used if there is no way for the player to return to previous levels." = + [ + 0 : "No" + 1 : "Yes" + ] + DangerousTimer(float) : "Dangerous Timer" : 0 : "The number of seconds the player must survive before this autosave takes effect." +] + +@SolidClass = trigger_changelevel : + "An entity that triggers a level change.\n" + + "Place an info_landmark in both maps that marks the 'same' location in each map.\n"+ + "TIPS & TRICKS: To fire events in the next level, use the OnLevelChange output to turn on "+ + "an env_global in the current level. Create a logic_auto in the next level that checks "+ + "for the state set by the env_global.\n\n"+ + "To control which entities go through the level transition, create one or more trigger_transitions and "+ + "give them the same name as the landmark. Any entities within the trigger_transition(s) will go to the next map." +[ + targetname(target_source) : "Name" + map(string) : "New Map Name" + landmark(target_destination) : "Landmark Name" + spawnflags(flags) = + [ + 2: "Disable Touch" : 0 + 4: "To Previous Chapter" : 0 + ] + + // Inputs + input ChangeLevel(void) : "Cause the level change. Use this when triggering the level change with a button, etc." + + // Outputs + output OnChangeLevel(void) : "Fired when the level changes." +] + +@SolidClass base(Trigger) = trigger_gravity : + "A trigger volume that changes the gravity on any entity that touches it." +[ + gravity(integer) : "Gravity (0-1)" : 1 +] + +@SolidClass base(Trigger) = trigger_playermovement : + "An entity that can be used to disable player's automatic ducking/unducking when jumping." +[ + spawnflags(flags) = + [ + // Remove this after maps fixed up: + 16: "(OBSOLETE, Uncheck me)" : 0 + 128: "Disable auto player movement" : 1 + ] +] + + +// NEEDHELP +@SolidClass base(Trigger) = trigger_soundscape : + "Soundscape trigger. " + + "It is not necessary to create outputs for this trigger. It automatically will trigger the " + + "soundscape referred to by its 'Soundscape' property." +[ + soundscape(target_source) : "Soundscape" +] + +@SolidClass base(Trigger, Targetname) = trigger_hurt : + "A trigger volume that damages entities that touch it." +[ + master(string) : "Master (Obsolete)" : : "Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate." + damage(integer) : "Damage" : 10 : "The amount of damage done to entities that touch this trigger. The damage is done every half-second. See also 'Damage Model' for extra details on how damage can be dealt." + damagecap(integer) : "Damage Cap" : 20 : "Maximum damage dealt per second. This field is only used if you select the Doubling w/Forgiveness damage model, via the spawnflag." + damagetype(choices) : "Damage Type" : 0 = + [ + 0 : "GENERIC" + 1 : "CRUSH" + 2 : "BULLET" + 4 : "SLASH" + 8 : "BURN" + 16 : "FREEZE" + 32 : "FALL" + 64 : "BLAST" + 128 : "CLUB" + 256 : "SHOCK" + 512 : "SONIC" + 1024 : "ENERGYBEAM" + 16384: "DROWN" + 32768 : "PARALYSE" + 65536 : "NERVEGAS" + 131072 : "POISON" + 262144 : "RADIATION" + 524288 : "DROWNRECOVER" + 1048576 : "CHEMICAL" + 2097152 : "SLOWBURN" + 4194304 : "SLOWFREEZE" + ] + + damagemodel(choices) : "Damage Model" : 0 : "How damage is dealt. Normal always does the specified amount of damage each half second. Doubling starts with the specified amount and doubles it each time it hurts the toucher. Forgiveness means that if the toucher gets out of the trigger the damage will reset to the specified value. Good for making triggers that are deadly over time without having to cause massive damage on each touch." = + [ + 0 : "Normal" + 1 : "Doubling w/forgiveness" + ] + + // Inputs + input SetDamage(float) : "Set a new amount of damage for this trigger." + + // Outputs + output OnHurt(void) : "Fired whenever this trigger hurts something other than a player." + output OnHurtPlayer(void) : "Fired whenever this trigger hurts a player." +] + +@SolidClass base(Trigger, Targetname) = trigger_remove : + "A trigger volume that removes any entities that touch it. Be careful, removing some entities can cause instability. "+ + "This is not the same as killing entities. i.e. NPCs removed in this manner will not fire their OnKilled outputs." +[ + // Outputs + output OnRemove(void) : "Fired whenever an entity is removed." +] + +@SolidClass base(Trigger) = trigger_multiple : + "A trigger volume that can be triggered multiple times." +[ + wait(integer) : "Delay Before Reset" : 1 : "Amount of time, in seconds, after the trigger_multiple has triggered before it can be triggered again. If set to -1, it will never trigger again (in which case you should just use a trigger_once)." + + // Outputs + output OnTrigger(void) : "Fired whenever the trigger is activated." +] + +@SolidClass base(TriggerOnce) = trigger_once : + "A trigger volume that removes itself after it is triggered once." +[ + // Outputs + output OnTrigger(void) : "Fired whenever the trigger is activated." +] + +@SolidClass base(Trigger) = trigger_look : + "An entity used to trigger something when the player looks at something. It fires 'OnTrigger' when the player "+ + "looks at a target entity for the given amount of time, while within the trigger volume. If the player leaves "+ + "the trigger or looks away from the target entity the clock resets. If the 'Use Velocity instead of facing' spawnflag " + + "is checked, the trigger uses the player's velocity instead of the player's view, so it determines whenever the player "+ + "is moving toward the target entity. Useful for triggering when players are driving a vehicle at something."+ + "NOTE: Only designed for single-player game. " +[ + spawnflags(flags) = + [ + 128: "Fire Once" : 1 + 256: "Use Velocity instead of facing" : 0 + ] + + target(target_destination) : "Look Target" : : "The name of the entity to be looked at." + LookTime(string) : "LookTime" : "0.5" : "The time, in seconds, that the player must look the target before firing the output. Resets if player leaves trigger, or looks outside the Field of View threshold." + FieldOfView(string) : "FieldOfView" : "0.9" : "How close the player has to be looking at the target. 1.0 = straight ahead\n 0.0 = +/- 90 degrees\n -1.0 = all directions)." + Timeout(float) : "Timeout" : "0" : "The time, in seconds, to wait after player enters the trigger before firing the OnTimeout output, 0 = never." + + // Output + output OnTrigger(void) : "Fired when the trigger is activated." + output OnTimeout(void) : "Fired after the timeout interval expires if the player never looked at the target." +] + +@SolidClass base(Trigger) = trigger_push : + "A trigger volume that pushes entities that touch it." +[ + pushdir(angle) : "Push Direction (Pitch Yaw Roll)" : "0 0 0" : "Angles indicating the direction to push touched entities." + + spawnflags(flags) = + [ + 128: "Once Only" : 0 + 256: "Affects Ladders (Half-Life 2)" : 0 + ] + + speed(integer) : "Speed of Push" : 40 : "The speed at which to push entities away, in inches / second." +] + +@SolidClass base(Trigger, Angles) = trigger_wind : + "A trigger volume that pushes physics objects that touch it." +[ + Speed(integer) : "Speed" : 200 : "The baseline for how hard the wind blows." + SpeedNoise(integer) : "Speed Noise" : 0 : "Noise added to wind speed +/-" + DirectionNoise(integer) : "Direction Noise" : 10 : "Noise added to wind direction." + HoldTime(integer) : "Hold Time" : 0 : "Baseline for how long to wait before changing wind." + HoldNoise(integer) : "Hold Noise" : 0 : "Noise added to how long to wait before changing wind." + + // Inputs + input SetSpeed(integer) : "Set the baseline for how hard the wind blows." +] + +@SolidClass base(Targetname, Origin, Angles) = trigger_impact : + "A trigger volume that can be told to push all physics objects that are inside of it in the direction specified by this trigger's angles.\n"+ + "Also outputs the force at the time of impact for anyone else that wants to use it." +[ + Magnitude(float) : "Magnitude" : 200 : "The strength of the impact. Negative values reverse the direction." + noise(float) : "Noise" : "0.1" : "The amount of directional noise (0-1). 0 = no noise, 1 = random direction." + viewkick(float) : "Viewkick" : "0.05" : "The amount to kick player's view if the player is in the trigger. Proportional to magnitude (0-1)." + + // Inputs + input Impact(float) : "Fire the impact, pushing all entities within the volume." + input SetMagnitude(float) : "Set the magnitude of the impact." + + // Outputs + output ImpactForce(string) : "Fired after an impact. The parameter passed along is the force of the impact that was generated." +] + +@SolidClass base(Trigger) = trigger_proximity : + "Measures the distance of the player within the trigger volume from a given point (and within " + + "a given radius). The NearestPlayerDistance output will be 0 when the player is at the center point, " + + "and 1 when the player is at the radius." +[ + measuretarget(target_destination) : "Point to Measure From" : : "The name of a target entity who's origin is the point to measure the player's distance from." + radius(string) : "Radius to measure within" : 256 : "The radius to which the distance should be mapped. If the player is outside the radius he will be ignored." + + // Outputs + output NearestEntityDistance(integer) : "Fired continuously when entities are touching the trigger volume. The output parameter is the distance from the "+ + "Point to Measure From to the nearest entity that passed the trigger filters. The distance is mapped to the radius distance, "+ + "so it will be 0 when the entity is on the point, and 1 when the entity is at the edge of the radius." +] + +@SolidClass base(Trigger) = trigger_teleport : + "A trigger volume that teleports entities that touch it. Entities are teleported to the Remote Destination, and have their angles "+ + "set to that of the Remote Destination's. If a Local Destination Landmark is specified, teleported entities are offset from the target "+ + "by their initial offset from the landmark, and their angles are left alone." +[ + target(target_destination) : "Remote Destination" : : "The entity specifying the point to which entities should be teleported." + landmark(target_destination) : "Local Destination Landmark" : : "If specified, then teleported entities are offset from the target by their initial offset from the landmark." + spawnflags(flags) = + [ + 32: "Preserve angles even when a local landmark is not specified" : 0 + ] +] + +@SolidClass base(Targetname) = trigger_transition : + "A volume that's used to control which entities go through the level transition. Create one or more trigger_transitions and "+ + "give them the same name as the changelevel landmark. Any entities within the trigger_transition(s) will go to the next map."+ + "See trigger_changelevel for more info." +[ +] + +@SolidClass base(Targetname) = trigger_serverragdoll : + "A volume that forces any NPC inside it to create a server side ragdoll instead of a client one." +[ +] + + + + + +//------------------------------------------------------------------------- +// +// AI +// +//------------------------------------------------------------------------- + +@PointClass base(Targetname,ResponseContext,EnableDisable) = ai_speechfilter : + "An entity that can be used to control the idle speech patterns of a set of NPCs." +[ + subject(target_destination) : "Subject(s)" : "" : "This is the NPC(s) whose speech we're filtering. May be a targetname or a classname." + + IdleModifier(float) : "Idle modifier." : "1.0" : "Multiplier to the percentage chance that our NPC(s) will idle speak. Set to 0 to prevent all idle speech." + NeverSayHello(choices) : "Greet Player?" : 0 : "If set to Yes, our NPC(s) won't greet the player when they first meet him." = + [ + 0 : "Yes" + 1 : "No" + ] + + input SetIdleModifier(float) : "Allows designers to change the idle modifier at runtime" +] + +//------------------------------------------------------------------------- +// Water LOD control +//------------------------------------------------------------------------- + +@PointClass base(Targetname) iconsprite("editor/waterlodcontrol.vmt") = water_lod_control : + "An entity used to control the LOD behavior of any water in the map. If your map has water, this entity is required." +[ + cheapwaterstartdistance(float) : "Start Transition to Cheap Water" : 1000 : "This is the distance from the camera that water will start transitioning to cheap water, in inches." + cheapwaterenddistance(float) : "End Transition to Cheap Water" : 2000 : "This is the distance from the camera that water will finish transitioning to cheap water, in inches." + + // Inputs + input SetCheapWaterStartDistance(float) : "Set the distance that water starts transitioning to cheap water." + input SetCheapWaterEndDistance(float) : "Set the distance that water finishes transitioning to cheap water." +] + + +//------------------------------------------------------------------------- +// Used to allow entities to use point_cameras for their materials +//------------------------------------------------------------------------- + +@PointClass base(Targetname) = info_camera_link : + "An entity that can use point_cameras to render images for materials used by entities. "+ + "To author the material, use the special identifier _rt_Camera " + + "for the $baseTexture (or whatever texture you want, like envmap, etc.) in the .vmt " + + "then connect the 'target' field to the entity which uses that material, and the 'PointCamera' " + + "field to the point_camera you want to have appear on that entity's material" +[ + target(target_destination) : "Entity Whose Material Uses _rt_camera" + PointCamera(target_destination) : "Camera Name" : : "The name of a point_camera entity in the map that the material should be rendered from." + + // Inputs + input SetCamera(string) : "Set the camera to use. The parameter should be the name of a point_camera entity in the map." +] + + +//------------------------------------------------------------------------- +// Used to allow entities to mimic the motions of other entities +//------------------------------------------------------------------------- + +@PointClass base(Targetname) = logic_measure_movement : + "An entity that can measure the movement of an entity relative to another entity " + + "and apply that movement to a third entity." +[ + MeasureTarget(target_destination) : "Entity to Measure" : "" : "Entity whose movement you want to measure." + MeasureReference(target_destination) : "Measure Reference" : "" : "The movement of Entity to Measure will be measured relative to this entity." + Target(target_destination) : "Entity to Move" : "" : "This entity will be moved to mimic the motions of Entity to Measure." + TargetReference(target_destination) : "Movement Reference" : "" : "The Entity to Move will move relative to this entity." + TargetScale(float) : "Movement scale" : "1" : "A scale to divide the measured movements by, before applying those movements to the Entity to Move. 1 = target entity moves as much as the measured entity, 2 = target entity moves half as far as the measured entity, and 0.5 = target entity moves twice as far as the measured entity." + MeasureType(choices) : "Measurement Type" : 0 = + [ + 0 : "Position" + 1 : "Eye position" + ] + + // Inputs + input SetMeasureTarget(string) : "Set the Entity to Measure, whose movement should be measured." + input SetMeasureReference(string) : "Set the Measure Reference entity." + input Target(string) : "Set the Entity to Move, which will be moved to mimic the measured entity." + input SetTargetReference(string) : "Set the Movement Reference entity." + input SetTargetScale(float) : "Set the scale to divide the measured movements by." + input Enable(void) : "Enable the logic_measure_movement." + input Disable(void) : "Disable the logic_measure_movement." +] + + +//------------------------------------------------------------------------- +// Misc +//------------------------------------------------------------------------- + +@PointClass base(BaseNPC, Parentname) studio() = npc_furniture : + "An entity used for non-NPCs that need to synchronise their animation with an NPC in a scripted_sequence. Usually a piece"+ + "of furniture or door that an NPC needs to manipulate within a scripted_sequence." +[ + model(studio) : "Model" + input DisablePlayerCollision(void) : "Disable collisions against the player." + input EnablePlayerCollision(void) : "Enable collisions against the player." +] + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = env_credits : + "An entity to control the rolling credits." +[ + // Inputs + input RollCredits(void) : "Start the intro credits rolling." + input RollOutroCredits(void) : "Start the outro credits rolling." + input ShowLogo(void) : "Show the HL2 logo." + + // Outputs + output OnCreditsDone(void) : "Fired when the credits having finished rolling." +] + +@PointClass base(Parentname, Targetname) size(-8 -8 -8, 8 8 8 ) = material_modify_control : + "An entity that can be used to directly control material vars. To use it, you need to read the .vmt of the material you "+ + "intend to change. Parent this entity to a brush model entity who's material you want to control." +[ + materialName(string) : "Material to modify." + materialVar(string) : "Material variable to modify." + + // Inputs + input SetMaterialVar(string) : "Fire to modify a material variable. The argument is the value to set the variable to." + input SetMaterialVarToCurrentTime(void) : "This sets the material variable to the current time on the server." + input StartAnimSequence(string) : "Force an animated material with the MaterialModifyAnimated proxy to play a set of animation frames. Format is: \nSetting to -1 uses the last frame of the texture. should be 1 or 0." + input StartFloatLerp(string) : "Force a material with the MaterialModifyAnimated proxy to lerp a material var between two floating point values. Format is: \n should be 1 or 0." +] + +//------------------------------------------------------------------------- +// Devshot camera +// - Used by the -makedevshots system, which automatically takes screenshots +// at the position of every devshot camera in the level. +//------------------------------------------------------------------------- + +@PointClass base(Angles) studioprop("models/editor/camera.mdl") = point_devshot_camera : + "An entity used by the -makedevshots system, which automatically takes screenshots at the position of every devshot camera in the level." +[ + cameraname(string) : "Camera Name" : "" : "Used as the name of the directory to store screenshots from this camera. Must be unique within the level." + FOV(integer) : "Camera FOV" : 75 : "FOV of this camera." +] + + +@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = logic_playerproxy : + "An entity that is used to relay inputs/ouputs to the player and back to the world." +[ + // Outputs + output OnFlashlightOn(float) : "Fired when the player turns on his flashlight. This output has the value of how much energy the player had when this happened [0..1]." + output OnFlashlightOff(float) : "Fired when the player turns off his flashlight. This output has the value of how much energy the player had when this happened [0..1]." + input RequestPlayerHealth(void) : "Requests the current player's health from the proxy. This will fire the PlayerHealth output with the value." + output PlayerHealth(integer) : "The player's current health value." + + input SetFlashlightSlowDrain(void) : "Puts the player's flashlight in slow-power-drain mode (for Episodic darkness)" + input SetFlashlightNormalDrain(void) : "Puts the player's flashlight to default power drain" + + input SetPlayerHealth(integer) : "Sets the player's health to this value." + + input RequestAmmoState(void) : "Request the ammo state of the player. It will fire PlayerHasAmmo or PlayerHasNoAmmo outputs." + output PlayerHasAmmo(void) : "Fired by request if the player has any ammo." + output PlayerHasNoAmmo(void) : "Fired by request if the player doesn't have any ammo." + +] + +@PointClass base(Parentname, Targetname) size(-8 -8 -8, 8 8 8 ) = env_spritetrail : + "A magical trail you can parent to anything you heart desires." +[ + lifetime(float) : "Lifetime" : "0.5" + startwidth(float) : "Start Width" : "8.0" + endwidth(float) : "End Width" : "1.0" + spritename(string) : "Sprite Name" : "sprites/bluelaser1.vmt" + + renderamt(integer) : "FX Amount (0 - 255)" : 255 : "The FX amount is used by the selected Render Mode." + rendercolor(color255) : "FX Color (R G B)" : "255 255 255" : "The FX color is used by the selected Render Mode." + + rendermode(choices) : "Render Mode" : 5 = + [ + 0: "Normal" + 4: "Solid" + 5: "Additive" + ] +] diff --git a/fortressforever.fgd b/fortressforever.fgd new file mode 100644 index 0000000..8fe33e1 --- /dev/null +++ b/fortressforever.fgd @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------- +// +// Game data file for Fortress Forever. +// +//------------------------------------------------------------------------- + +@include "ff_base.fgd" + +@SolidClass = func_ladder : + "Ladder. Players will be able to move freely along this brush, as if it was a ladder." + + "Apply the toolsinvisibleladder material to a func_ladder brush." +[ +] + +//------------------------------------------------------------------------- +// +// Camera/monitor entities +// +//------------------------------------------------------------------------- +@PointClass base(Parentname, Angles) studioprop("models/editor/camera.mdl") = point_camera : "Camera" +[ + spawnflags(Flags) = + [ + 1 : "Start Off" : 0 + ] + + targetname(target_source) : "Name" : : "The name that other entities refer to this entity by." + FOV(float) : "FOV" : 90 : "Field of view in degrees" +// resolution(float) : "resolution" : 256 : "width/height of the render target for the camera" + UseScreenAspectRatio(choices) : "Screen Aspect Ratio" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogEnable(choices) : "Fog Enable" : 0 = + [ + 0 : "No" + 1 : "Yes" + ] + fogColor(color255) : "Fog Color" : "0 0 0" + fogStart(float) : "Fog Start" : 2048 : "The near fog plane." + fogEnd(float) : "Fog End" : 4096 : "The far fog/clipping plane." + renderTarget(string) : "Render Target" : "_rt_Camera" : "The render target of the camera." + + // Inputs + input ChangeFOV(string) : "Changes camera's FOV over time" + input SetOnAndTurnOthersOff(void) : "Turn the camera on, and turn all other cameras off." + input SetOn(void) : "Turn the camera on." + input SetOff(void) : "Turn the camera off." +] + +@SolidClass base(func_brush) = func_monitor : + "A monitor that renders the view from a given point_camera entity." +[ + target(target_destination) : "Camera name" + + // Inputs + input Toggle(void) : "Toggle - If on, turn off, if off, turn on." + input Enable(void) : "Enable." + input Disable(void) : "Disable." + input SetCamera(string) : "Sets the camera to use for this monitor. Takes the name of a point_camera entity in the map." +] + +// Do this w/ LUA exclusively +//@SolidClass base(Trigger) = trigger_ff_location : +// "Brush-based location displaying." +//[ +// areaname(string) : "Area Name" : : "The name of the area this brush is describing e.g. flag room." +// team(choices) : "Team" : "The team this area belongs to." = +// [ +// 1 : "No Team" +// 2 : "Blue Team" +// 3 : "Red Team" +// 4 : "Yellow Team" +// 5 : "Green Team" +// ] +//] + +@SolidClass base(Trigger) = trigger_ff_script : + "Brush-based Fortress Forever goal. Interfaced from the lua scripting environment." +[ + output OnOutput(void) : "Output to be fired when activated from the lua scripting environment." +] + +@SolidClass base(Targetname, RenderFields, Global) = trigger_ff_clip : + "Lua clip brush." +[ +] + +@PointClass base(Targetname, Parentname, Angles) studio("models/editor/ff_script_helper.mdl") = info_ff_script : + "Point-based Fortress Forever goal. Interfaced from the lua scripting environment." +[ + output OnOutput(void) : "Output to be fired when activated from the lua scripting environment." +] + +@PointClass base(Targetname, Angles) studio("models/editor/playerstart.mdl") = info_ff_teamspawn : + "Team Spawn. This entity is placed where players will be spawned. The scripting environment in Fortress Forever " + + "controls which players will be able to spawn here. See the documentation for more details." +[ +] + +@PointClass base(Targetname, Angles) studio("models/buildable/respawn_turret/respawn_turret.mdl") = ff_miniturret : + "Respawn turret!" +[ +] + +@PointClass base(Targetname, Angles) studio("models/props/ff_dustbowl/minecart.mdl") = ff_minecart : + "VPhysics Mine Cart" +[ + start_disabled(choices) : "Start Disabled" : "Start the object disabled (unable to move)." = + [ + 0 : "No" + 1 : "Yes" + ] +] + +@PointClass base(Targetname, Parentname, Angles) cylinder(255 255 255, targetname, target, radius, targetname, targetname, radius) color(255 192 0) size(16 16 16) = path_mapguide : + "An entity used to build paths for map guides to follow. Each path_mapguide is a node on the path, each holding the name of the next path_mapguide in the path." +[ + target(target_destination) : "Next MapGuide Target" : : "The next path_mapguide in the path." + wait(float) : "Wait" : 10 : "Seconds spent waiting at this point." + time(float) : "Time" : 10 : "Seconds spent travelling from this point to the next." + curvetowards(target_destination) : "Curve towards target" : : "Curve towards this point." + narration(string) : "Narration" : : "Narration file to play." +] \ No newline at end of file diff --git a/gameinfo.txt b/gameinfo.txt new file mode 100644 index 0000000..0213e31 --- /dev/null +++ b/gameinfo.txt @@ -0,0 +1,49 @@ +"GameInfo" +{ + game "Fortress Forever" + title "Fortress Forever" + name "Fortress Forever" + type multiplayer_only + + developer "Fortress Forever Team" + developer_url "http://www.fortress-forever.com/" + icon "resource/icon_ff" + manual "http://www.fortress-forever.com/wiki/Main_Page" + + hidden_maps + { + "test_speakers" 1 + "test_hardware" 1 + } + + FileSystem + { + SteamAppId 253530 // This will mount all the GCFs we need (240=CS:S, 220=HL2). + ToolsAppId 211 // Tools will load this (ie: source SDK caches) to get things like materials\debug, materials\editor, etc. + + // + // The code that loads this file automatically does a few things here: + // + // 1. For each "Game" search path, it adds a "GameBin" path, in \bin + // 2. For each "Game" search path, it adds another "Game" path in front of it with _ at the end. + // For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it. + // 3. For the first "Game" search path, it adds a search path called "MOD". + // 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH". + // + + // + // Search paths are relative to the base directory, which is where hl2.exe is found. + // + // |gameinfo_path| points at the directory where gameinfo.txt is. + // We always want to mount that directory relative to gameinfo.txt, so + // people can mount stuff in c:\mymod, and the main game resources are in + // someplace like c:\program files\valve\steam\steamapps\\half-life 2. + // + SearchPaths + { + Game |gameinfo_path|. + Game hl2 + Game FortressForever + } + } +} diff --git a/maplist.txt b/maplist.txt new file mode 100644 index 0000000..12e47ec --- /dev/null +++ b/maplist.txt @@ -0,0 +1,11 @@ +ff_destroy +ff_openfire +ff_napoli +ff_ksour +ff_palermo +ff_monkey +ff_schtop +ff_shutdown2 +ff_aardvark +ff_warpath +ff_dustbowl \ No newline at end of file diff --git a/maps/default.lua b/maps/default.lua new file mode 100644 index 0000000..44a12bd --- /dev/null +++ b/maps/default.lua @@ -0,0 +1,18 @@ +-- if no lua scripts are found for the map (ff_xxx.bsp) then this file will be loaded +IncludeScript("base_ctf"); + +function startup() + enabled_teams = { Team.kBlue, Team.kRed } + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, -1) + SetPlayerLimit(Team.kGreen, -1) + + -- disable civilians + for index, iteam in ipairs( enabled_teams ) do + local team = GetTeam(iteam) + team:SetClassLimit(Player.kCivilian, -1) + end + + ConsoleToAll("No map lua found! Loaded default") +end \ No newline at end of file diff --git a/maps/ff_2fort.lua b/maps/ff_2fort.lua new file mode 100644 index 0000000..021a941 --- /dev/null +++ b/maps/ff_2fort.lua @@ -0,0 +1,181 @@ +IncludeScript("base_ctf"); +IncludeScript("base_location"); +IncludeScript("base_respawnturret"); + +----------------------------------------------------------------------------------------------------------------------------- +-- LOCATIONS +-- Q: wow clover, there sure are alot of them! +-- A: hell yes there are. +----------------------------------------------------------------------------------------------------------------------------- +blue_location_ulobby = location_info:new({ text = "Upper Lobby", team = Team.kBlue }) +blue_location_llobby = location_info:new({ text = "Lower Lobby", team = Team.kBlue }) +blue_location_ch = location_info:new({ text = "Covered Hallway", team = Team.kBlue }) +blue_location_bspawn = location_info:new({ text = "Battlements Spawn", team = Team.kBlue }) +blue_location_lspawn = location_info:new({ text = "Lobby Spawn", team = Team.kBlue }) +blue_location_rr = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kBlue }) +blue_location_crates = location_info:new({ text = "Crate Tunnel", team = Team.kBlue }) +blue_location_ulift = location_info:new({ text = "Upper Elevator Room", team = Team.kBlue }) +blue_location_llift = location_info:new({ text = "Lower Elevator Room", team = Team.kBlue }) +blue_location_cod = location_info:new({ text = "Corner of Eternal Despair", team = Team.kBlue }) +blue_location_fd = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kBlue }) +blue_location_grate = location_info:new({ text = "Grate Room", team = Team.kBlue }) +blue_location_uspiral = location_info:new({ text = "Upper Spiral", team = Team.kBlue }) +blue_location_mspiral = location_info:new({ text = "Mid Spiral", team = Team.kBlue }) +blue_location_lspiral = location_info:new({ text = "Lower Spiral", team = Team.kBlue }) +blue_location_waccess = location_info:new({ text = "Water Access", team = Team.kBlue }) +blue_location_wtunnel = location_info:new({ text = "Water Tunnel", team = Team.kBlue }) +blue_location_bfr = location_info:new({ text = "Basement - Flagroom", team = Team.kBlue }) +blue_location_bsteam = location_info:new({ text = "Basement - Steam Corridor", team = Team.kBlue }) +blue_location_bmf = location_info:new({ text = "Basement - Mainframe", team = Team.kBlue }) +blue_location_blobby = location_info:new({ text = "Basement - Lobby", team = Team.kBlue }) +blue_location_blift = location_info:new({ text = "Basement - Elevator Side", team = Team.kBlue }) +blue_location_bresup = location_info:new({ text = "Basement - Resupply", team = Team.kBlue }) +blue_location_batts = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kBlue }) + +neutral_location_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kUnassigned }) +neutral_location_ywater = location_info:new({ text = "Yard - Water", team = Team.kUnassigned }) + +red_location_ulobby = location_info:new({ text = "Upper Lobby", team = Team.kRed }) +red_location_llobby = location_info:new({ text = "Lower Lobby", team = Team.kRed }) +red_location_ch = location_info:new({ text = "Covered Hallway", team = Team.kRed }) +red_location_bspawn = location_info:new({ text = "Battlements Spawn", team = Team.kRed }) +red_location_lspawn = location_info:new({ text = "Lobby Spawn", team = Team.kRed }) +red_location_rr = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kRed }) +red_location_crates = location_info:new({ text = "Crate Tunnel", team = Team.kRed }) +red_location_ulift = location_info:new({ text = "Upper Elevator Room", team = Team.kRed }) +red_location_llift = location_info:new({ text = "Lower Elevator Room", team = Team.kRed }) +red_location_cod = location_info:new({ text = "Corner of Eternal Despair", team = Team.kRed }) +red_location_fd = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kRed }) +red_location_grate = location_info:new({ text = "Grate Room", team = Team.kRed }) +red_location_uspiral = location_info:new({ text = "Upper Spiral", team = Team.kRed }) +red_location_mspiral = location_info:new({ text = "Mid Spiral", team = Team.kRed }) +red_location_lspiral = location_info:new({ text = "Lower Spiral", team = Team.kRed }) +red_location_waccess = location_info:new({ text = "Water Access", team = Team.kRed }) +red_location_wtunnel = location_info:new({ text = "Water Tunnel", team = Team.kRed }) +red_location_bfr = location_info:new({ text = "Basement - Flagroom", team = Team.kRed }) +red_location_bsteam = location_info:new({ text = "Basement - Steam Corridor", team = Team.kRed }) +red_location_bmf = location_info:new({ text = "Basement - Mainframe", team = Team.kRed }) +red_location_blobby = location_info:new({ text = "Basement - Lobby", team = Team.kRed }) +red_location_blift = location_info:new({ text = "Basement - Elevator Side", team = Team.kRed }) +red_location_bresup = location_info:new({ text = "Basement - Resupply", team = Team.kRed }) +red_location_batts = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kRed }) + +----------------------------------------------------------------------------------------------------------------------------- +-- bag for respawns +----------------------------------------------------------------------------------------------------------------------------- +ff_2fort_genericpack = genericbackpack:new({ + health = 400, + armor = 400, + + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 400, + + gren1 = 0, + gren2 = 0, + + respawntime = 2, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) +function ff_2fort_genericpack:dropatspawn() return false end +blue_2fort_genericpack = ff_2fort_genericpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue } }) +red_2fort_genericpack = ff_2fort_genericpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed } }) + +----------------------------------------------------------------------------------------------------------------------------- +-- grenpack +----------------------------------------------------------------------------------------------------------------------------- +ff_2fort_grenpack = genericbackpack:new({ + health = 0, + armor = 0, + + grenades = 0, + nails = 0, + shells = 0, + rockets = 0, + cells = 0, + + gren1 = 2, + gren2 = 2, + + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) +function ff_2fort_grenpack:dropatspawn() return false end +blue_2fort_grenpack = ff_2fort_grenpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue } }) +red_2fort_grenpack = ff_2fort_grenpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed } }) + +----------------------------------------------------------------------------------------------------------------------------- +-- bag by water exit that anyone can use +----------------------------------------------------------------------------------------------------------------------------- +ff_2fort_waterpack = genericbackpack:new({ + health = 50, + armor = 50, + + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 80, + + gren1 = 0, + gren2 = 0, + + respawntime = 30, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) +function ff_2fort_waterpack:dropatspawn() return false end +blue_2fort_waterpack = ff_2fort_waterpack:new({}) +red_2fort_waterpack = ff_2fort_waterpack:new({}) + +----------------------------------------------------------------------------------------------------------------------------- +-- bag used in mid spiral and bottom lift resupply to stagger resources +-- tweak the respawntime of this bag to control offence/defence balance +----------------------------------------------------------------------------------------------------------------------------- +ff_2fort_spiralpack = genericbackpack:new({ + health = 50, + armor = 50, + + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 130, + + gren1 = 0, + gren2 = 0, + + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) +function ff_2fort_spiralpack:dropatspawn() return false end +blue_2fort_spiralpack = ff_2fort_spiralpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue } }) +red_2fort_spiralpack = ff_2fort_spiralpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed } }) + +----------------------------------------------------------------------------- +-- SPAWNS +----------------------------------------------------------------------------- +red_spiral = function(self,player) return ((player:GetTeamId() == Team.kRed) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSniper) or (player:GetClass() == Player.kSpy))) end +red_balc = function(self,player) return ((player:GetTeamId() == Team.kRed) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSniper) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kSoldier) or (player:GetClass() == Player.kHwguy) or (player:GetClass() == Player.kDemoman) or (player:GetClass() == Player.kPyro) or (player:GetClass() == Player.kEngineer))) end + +red_spiralspawn = { validspawn = red_spiral } +red_balcspawn = { validspawn = red_balc } + +blue_spiral = function(self,player) return ((player:GetTeamId() == Team.kBlue) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSniper) or (player:GetClass() == Player.kSpy))) end +blue_balc = function(self,player) return ((player:GetTeamId() == Team.kBlue) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSniper) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kSoldier) or (player:GetClass() == Player.kHwguy) or (player:GetClass() == Player.kDemoman) or (player:GetClass() == Player.kPyro) or (player:GetClass() == Player.kEngineer))) end + +blue_spiralspawn = { validspawn = blue_spiral } +blue_balcspawn = { validspawn = blue_balc } diff --git a/maps/ff_2fort.txt b/maps/ff_2fort.txt new file mode 100644 index 0000000..3328ddc --- /dev/null +++ b/maps/ff_2fort.txt @@ -0,0 +1,9 @@ +ff_2fort +Industrial sector CTF (capture the flag). + +Use stealth or sheer force to reach basement of the enemy base. +Once inside, steal their precious flag and capture it at your battlements. +Make them pay for their insolence! + +Each capture nets your team 10 points. +The team with the most points at the end of the round wins. \ No newline at end of file diff --git a/maps/ff_2fort_soundscapes.txt b/maps/ff_2fort_soundscapes.txt new file mode 100644 index 0000000..8b74fe2 --- /dev/null +++ b/maps/ff_2fort_soundscapes.txt @@ -0,0 +1,267 @@ +//////////////////////////////////////////////// +// FF_2FORT SOUNDSCAPES +// +// INDOORS +// OUTDOORS +// INDOORS_OUTDOORSAUDIBLE +// BASEMENT +// WATER +// +//////////////////////////////////////////////// + + +//////////////////////////////////////////////// +// INDOORS +// Basic ambience with metal scratching sounds. +//////////////////////////////////////////////// + +"ff_2fort.indoors" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience5.wav" + "volume" "1.0" + "pitch" "100" + } + + "playrandom" + { + "time" "3, 10" + "volume" "0.05,0.15" + "pitch" "95,105" + "position" "random" + "rndwave" + { + "wave" "ambient/materials/metal_rattle1.wav" + "wave" "ambient/materials/metal_rattle2.wav" + "wave" "ambient/materials/metal_rattle3.wav" + } + } +} + + +//////////////////////////////////////////////// +// OUTDOORS +// Outdoor wind ambience with random gusts. +// Also has random low-volume train sounds and +// some slightly louder wildlife sound effects. +//////////////////////////////////////////////// + + +"ff_2fort.outdoors" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.8" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "1.0" + } + + "playrandom" + { + "time" "45, 90" + "volume" "0.1, 0.3" + "pitch" "50, 120" + "position" "random" + "rndwave" + { + "wave" "ambient/machines/train_rumble.wav" + "wave" "ambient/alarms/train_horn_distant1.wav" + } + } + + "playrandom" + { + "time" "10, 30" + "volume" "0.3, 0.6" + "pitch" "80, 120" + "position" "random" + "rndwave" + { + "wave" "ambient/levels/coast/coastbird1.wav" + "wave" "ambient/levels/coast/coastbird2.wav" + "wave" "ambient/levels/coast/coastbird3.wav" + "wave" "ambient/levels/coast/coastbird4.wav" + "wave" "ambient/levels/coast/coastbird5.wav" + "wave" "ambient/levels/coast/coastbird6.wav" + "wave" "ambient/levels/canals/critter2.wav" + "wave" "ambient/levels/canals/critter6.wav" + "wave" "ambient/levels/canals/critter7.wav" + } + } +} + +//////////////////////////////////////////////// +// INDOORS OUTDOORSAUDIBLE +// Indoor soundscape with a quieter outdoor +// soundscape playing in the background. +//////////////////////////////////////////////// + +"ff_2fort.indoors_outdoorsaudible" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience5.wav" + "volume" "0.9" + "pitch" "100" + } + + "playrandom" + { + "time" "3, 10" + "volume" "0.05,0.15" + "pitch" "95,105" + "position" "random" + "rndwave" + { + "wave" "ambient/materials/metal_rattle1.wav" + "wave" "ambient/materials/metal_rattle2.wav" + "wave" "ambient/materials/metal_rattle3.wav" + } + } + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.5" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "0.4" + } + + "playrandom" + { + "time" "45, 90" + "volume" "0.1, 0.3" + "pitch" "50, 120" + "position" "random" + "rndwave" + { + "wave" "ambient/machines/train_rumble.wav" + "wave" "ambient/alarms/train_horn_distant1.wav" + } + } + + "playrandom" + { + "time" "10, 30" + "volume" "0.1, 0.4" + "pitch" "80, 120" + "position" "random" + "rndwave" + { + "wave" "ambient/levels/coast/coastbird1.wav" + "wave" "ambient/levels/coast/coastbird2.wav" + "wave" "ambient/levels/coast/coastbird3.wav" + "wave" "ambient/levels/coast/coastbird4.wav" + "wave" "ambient/levels/coast/coastbird5.wav" + "wave" "ambient/levels/coast/coastbird6.wav" + "wave" "ambient/levels/canals/critter2.wav" + "wave" "ambient/levels/canals/critter6.wav" + "wave" "ambient/levels/canals/critter7.wav" + } + } +} + +//////////////////////////////////////////////// +// BASEMENT +// Underground background sounds and metal stresses. +//////////////////////////////////////////////// + +"ff_2fort.basement" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.6" + "pitch" "100" + "wave" "ambient/atmosphere/corridor.wav" + } + + "playlooping" + { + "volume" "0.4" + "pitch" "100" + "wave" "ambient/atmosphere/drone2lp.wav" + "position" "0" + } + + "playsoundscape" + { + "name" "coast.util_metalstress" + "volume" "0.4" + } + + "playsoundscape" + { + "name" "coast.util_shackmetal" + "volume" "0.3" + } + + "playrandom" + { + "time" "30, 60" + "volume" "0.25, 0.50" + "pitch" "50, 120" + "position" "random" + "rndwave" + { + "wave" "ambient/materials/rustypipes1.wav" + "wave" "ambient/materials/rustypipes2.wav" + "wave" "ambient/materials/rustypipes3.wav" + "wave" "ambient/materials/shuffle1.wav" + } + } +} + +//////////////////////////////////////////////// +// WATER +// Some runnign water sounds and random dripping. +//////////////////////////////////////////////// + +"ff_2fort.water" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/water/corridor_water.wav" + "volume" "0.8" + "pitch" "100" + } + + "playlooping" + { + "wave" "ambient/levels/canals/waterleak_loop1.wav" + "volume" "0.3" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_drip" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "d1_canals.util_fardrips" + "volume" "1.0" + } +} \ No newline at end of file diff --git a/maps/ff_aardvark.lua b/maps/ff_aardvark.lua new file mode 100644 index 0000000..4ab9420 --- /dev/null +++ b/maps/ff_aardvark.lua @@ -0,0 +1,301 @@ +-- ff_aardvark.lua + +----------------------------------------------------------------------------- +-- number of snipers allowed per team +----------------------------------------------------------------------------- +SNIPER_LIMIT = 1; + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base"); +IncludeScript("base_ctf"); +IncludeScript("base_location"); +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- +POINTS_PER_CAPTURE = 10; +FLAG_RETURN_TIME = 60; + +----------------------------------------------------------------------------- +-- unique aardvark locations +----------------------------------------------------------------------------- +location_redspawn = location_info:new({ text = "Respawn", team = Team.kRed }) +location_redsec = location_info:new({ text = "Laser Control", team = Team.kRed }) +location_redfr = location_info:new({ text = "Flag Room", team = Team.kRed }) +location_redgen = location_info:new({ text = "Generator Room", team = Team.kRed }) +location_redbasement = location_info:new({ text = "Basement", team = Team.kRed }) +location_redwater = location_info:new({ text = "Perilous Passage", team = Team.kRed }) +location_redcor = location_info:new({ text = "Utility Corridors", team = Team.kRed }) +location_redlift = location_info:new({ text = "Lift", team = Team.kRed }) +location_redfd = location_info:new({ text = "Front Door", team = Team.kRed }) +location_redramp = location_info:new({ text = "Top Main Ramp", team = Team.kRed }) +location_redrampon = location_info:new({ text = "Main Ramp", team = Team.kRed }) +location_redhallspawn = location_info:new({ text = "Respawn-Side Hallway", team = Team.kRed }) +location_redhallwater = location_info:new({ text = "Lift-Side Hallway", team = Team.kRed }) +location_redtoilet = location_info:new({ text = "Toilet", team = Team.kRed }) +location_redshame = location_info:new({ text = "Tunnel of Shame", team = Team.kRed }) +location_redoven = location_info:new({ text = "OVEN", team = Team.kRed }) + +location_bluespawn = location_info:new({ text = "Respawn", team = Team.kBlue }) +location_bluesec = location_info:new({ text = "Laser Control", team = Team.kBlue }) +location_bluefr = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_bluegen = location_info:new({ text = "Generator Room", team = Team.kBlue }) +location_bluebasement = location_info:new({ text = "Basement", team = Team.kBlue }) +location_bluewater = location_info:new({ text = "Perilous Passage", team = Team.kBlue }) +location_bluecor = location_info:new({ text = "Utility Corridors", team = Team.kBlue }) +location_bluelift = location_info:new({ text = "Lift", team = Team.kBlue }) +location_bluefd = location_info:new({ text = "Front Door", team = Team.kBlue }) +location_blueramp = location_info:new({ text = "Top Main Ramp", team = Team.kBlue }) +location_bluerampon = location_info:new({ text = "Main Ramp", team = Team.kBlue }) +location_bluehallspawn = location_info:new({ text = "Respawn-Side Hallway", team = Team.kBlue }) +location_bluehallwater = location_info:new({ text = "Lift-Side Hallway", team = Team.kBlue }) +location_bluetoilet = location_info:new({ text = "Toilet", team = Team.kBlue }) +location_blueshame = location_info:new({ text = "Tunnel of Shame", team = Team.kBlue }) +location_blueoven = location_info:new({ text = "OVEN", team = Team.kBlue }) + +location_midmap = location_info:new({ text = "Outside", team = NO_TEAM }) + +----------------------------------------------------------------------------- +-- set class limits +----------------------------------------------------------------------------- +function startup() + SetGameDescription("Capture the Flag") + + -- set up team limits on each team + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, -1) + SetPlayerLimit(Team.kGreen, -1) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kSniper, SNIPER_LIMIT) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kSniper, SNIPER_LIMIT) +end + +----------------------------------------------------------------------------- +-- custom aardvark packs +----------------------------------------------------------------------------- +aardvarkpack = genericbackpack:new({ + health = 60, + armor = 60, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 0, + gren1 = 1, + gren2 = 1, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +aardvarkpack_metal = genericbackpack:new({ + health = 0, + armor = 0, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 130, + respawntime = 6, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function aardvarkpack:dropatspawn() return false end +function aardvarkpack_metal:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- backpack entity setup (modified for aardvarkpack) +----------------------------------------------------------------------------- +function build_backpacks(tf) + return healthkit:new({touchflags = tf}), + armorkit:new({touchflags = tf}), + ammobackpack:new({touchflags = tf}), + bigpack:new({touchflags = tf}), + grenadebackpack:new({touchflags = tf}), + aardvarkpack:new({touchflags = tf}), + aardvarkpack_metal:new({touchflags = tf}) +end + +blue_healthkit, blue_armorkit, blue_ammobackpack, blue_bigpack, blue_grenadebackpack, blue_aardvarkpack, blue_aardvarkpack_metal = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kBlue}) +red_healthkit, red_armorkit, red_ammobackpack, red_bigpack ,red_grenadebackpack, red_aardvarkpack, red_aardvarkpack_metal = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kRed}) +yellow_healthkit, yellow_armorkit, yellow_ammobackpack, yellow_bigpack, yellow_grenadebackpack, yellow_aardvarkpack, yellow_aardvarkpack_metal = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kYellow}) +green_healthkit, green_armorkit, green_ammobackpack, green_bigpack, green_grenadebackpack, green_aardvarkpack, green_aardvarkpack_metal = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kGreen}) + +----------------------------------------------------------------------------- +-- aardvark resupply (bagless) +----------------------------------------------------------------------------- +aardvarkresup = trigger_ff_script:new({ team = Team.kUnassigned }) + +function aardvarkresup:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == self.team then + player:AddHealth( 400 ) + player:AddArmor( 400 ) + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + end + end +end + +blue_aardvarkresup = aardvarkresup:new({ team = Team.kBlue }) +red_aardvarkresup = aardvarkresup:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- aardvark security +----------------------------------------------------------------------------- +red_aardvarksec = trigger_ff_script:new() +blue_aardvarksec = trigger_ff_script:new() +bluesecstatus = 1 +redsecstatus = 1 + +sec_iconx = 60 +sec_icony = 30 +sec_iconw = 16 +sec_iconh = 16 + +function red_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + if redsecstatus == 1 then + redsecstatus = 0 + AddSchedule("aardvarksecup10red",20,aardvarksecup10red) + AddSchedule("aardvarksecupred",30,aardvarksecupred) + OpenDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_REDDOWN" ) + RemoveHudItemFromAll( "red-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end + end + end +end + +function blue_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kRed then + if bluesecstatus == 1 then + bluesecstatus = 0 + AddSchedule("aardvarksecup10blue",20,aardvarksecup10blue) + AddSchedule("aardvarksecupblue",30,aardvarksecupblue) + OpenDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_BLUEDOWN" ) + RemoveHudItemFromAll( "blue-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + end + end +end + +function aardvarksecupred() + redsecstatus = 1 + CloseDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_ON") + SpeakAll( "SD_REDUP" ) + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) +end + +function aardvarksecupblue() + bluesecstatus = 1 + CloseDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_ON") + SpeakAll( "SD_BLUEUP" ) + RemoveHudItemFromAll( "blue-sec-down" ) + AddHudIconToAll( "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) +end + +function aardvarksecup10red() + BroadCastMessage("#FF_RED_SEC_10") +end + +function aardvarksecup10blue() + BroadCastMessage("#FF_BLUE_SEC_10") +end + +----------------------------------------------------------------------------- +-- aardvark lasers and respawn shields +----------------------------------------------------------------------------- +KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) +lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) + +function KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function lasers_KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + if self.team == Team.kBlue then + if redsecstatus == 1 then + return EVENT_ALLOWED + end + end + if self.team == Team.kRed then + if bluesecstatus == 1 then + return EVENT_ALLOWED + end + end + end + end + return EVENT_DISALLOWED +end + +blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) +red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) +sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue }) +sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed }) + +------------------------- +-- flaginfo +------------------------- +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + flaginfo_base(player_entity) --basic CTF HUD items + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if bluesecstatus == 1 then + AddHudIcon( player, "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + else + AddHudIcon( player, "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + + if redsecstatus == 1 then + AddHudIcon( player, "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + else + AddHudIcon( player, "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end +end diff --git a/maps/ff_aardvark.txt b/maps/ff_aardvark.txt new file mode 100644 index 0000000..287dac1 --- /dev/null +++ b/maps/ff_aardvark.txt @@ -0,0 +1,6 @@ +Steal the enemy flag while protecting your own +[1] Take enemy flag +[2] Bring to capture point in your base +Deactivate enemy security to open up additional routes to the enemy flag +SCORING: 10 points per flag capture +Team with most points at end of round wins \ No newline at end of file diff --git a/maps/ff_aardvark_soundscapes.txt b/maps/ff_aardvark_soundscapes.txt new file mode 100644 index 0000000..cafff23 --- /dev/null +++ b/maps/ff_aardvark_soundscapes.txt @@ -0,0 +1,38 @@ +"aardvark_inside" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "volume" "1" + "pitch" "100" + "wave" "ambient/push/inside_amb1.wav" + } +} + +"aardvark_basement" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "volume" "1" + "pitch" "100" + "wave" "ambient/water/drip_loop1.wav" + } +} + +"aardvark_outside" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playlooping" + { + "volume" "1" + "pitch" "100" + "wave" "ff_aardvark/exo_birds.wav" + } +} diff --git a/maps/ff_bases.lua b/maps/ff_bases.lua new file mode 100644 index 0000000..a994f70 --- /dev/null +++ b/maps/ff_bases.lua @@ -0,0 +1,276 @@ +-- ff_bases.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base") +IncludeScript("base_ctf") +IncludeScript("base_location") +IncludeScript("base_respawnturret") +----------------------------------------------------------------------------- + +function precache() + PrecacheSound( "Backpack.Touch" ) + PrecacheSound( "misc.thunder" ) +end + +----------------------------------------------------------------------------- +-- Doors +----------------------------------------------------------------------------- +blue_only = bluerespawndoor +red_only = redrespawndoor + + +----------------------------------------------------------------------------- +-- Computer Explodeded +----------------------------------------------------------------------------- +fr_computer = trigger_ff_script:new({ team = Team.kUnassigned }) +function fr_computer:onexplode( explosion_entity ) + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack(explosion_entity) + if detpack:GetTeamId() ~= self.team then + local points = 5 + local team = detpack:GetTeam() + team:AddScore(points) + + local player = detpack:GetOwner() + player:AddFortPoints(points * 100, "Destroyed Computer" ) + + SmartSound(player, "misc.thunder", "misc.thunder", "misc.thunder") + SmartMessage(player, "You Destroyed the Enemy Command Centre!", "Your Team Destroyed the Enemy Command Centre!", "Your Command Centre has been Destroyed!") + + if team:GetTeamId() == Team.kBlue then + SpeakAll( "CZ_RCC_DET" ) + elseif team:GetTeamId() == Team.kRed then + SpeakAll( "CZ_BCC_DET" ) + end + end + end + + return EVENT_ALLOWED +end + +blue_computer = fr_computer:new({ team = Team.kBlue }) +red_computer = fr_computer:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- Backpacks +----------------------------------------------------------------------------- +blue_gen_pack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 1, + gren2 = 0, + cells = 130, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue}}) + +blue_fr_gen_pack = genericbackpack:new({ + health = 30, + armor = 30, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 0, + gren2 = 0, + cells = 130, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue}}) + +red_gen_pack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 1, + gren2 = 0, + cells = 130, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kRed}}) + +red_fr_gen_pack = genericbackpack:new({ + health = 30, + armor = 30, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 0, + gren2 = 0, + cells = 130, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kRed}}) + +----------------------------------------------------------------------------- +-- Locations +-- Switched all "Left"/"Right" so that it's from defenders pov so it makes sense to say "INCOMING RIGHT RAMP"/etc (caesium) +----------------------------------------------------------------------------- + +location_midmap = location_info:new({ text = "Midmap", team = Team.kUnassigned }) +location_water = location_info:new({ text = "Water", team = Team.kUnassigned }) + +location_blue_bments = location_info:new({ text = "Battlements", team = Team.kBlue }) +location_red_bments = location_info:new({ text = "Battlements", team = Team.kRed }) + +location_blue_balcony = location_info:new({ text = "Balcony", team = Team.kBlue }) +location_red_balcony = location_info:new({ text = "Balcony", team = Team.kRed }) + +location_blue_frontdoor = location_info:new({ text = "Front Door", team = Team.kBlue }) +location_red_frontdoor = location_info:new({ text = "Front Door", team = Team.kRed }) + +location_blue_frontdoor_ramp = location_info:new({ text = "Front Door Ramp", team = Team.kBlue }) +location_red_frontdoor_ramp = location_info:new({ text = "Front Door Ramp", team = Team.kRed }) + +location_blue_midramps = location_info:new({ text = "Mid Ramps", team = Team.kBlue }) +location_red_midramps = location_info:new({ text = "Mid Ramps", team = Team.kRed }) + +location_blue_midramps_left = location_info:new({ text = "Right Ramp", team = Team.kBlue }) +location_red_midramps_left = location_info:new({ text = "Right Ramp", team = Team.kRed }) + +location_blue_midramps_right = location_info:new({ text = "Left Ramp", team = Team.kBlue }) +location_red_midramps_right = location_info:new({ text = "Left Ramp", team = Team.kRed }) + +location_blue_flagroom = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_red_flagroom = location_info:new({ text = "Flag Room", team = Team.kRed }) + +location_blue_sniperdeck = location_info:new({ text = "Sniper Deck", team = Team.kBlue }) +location_red_sniperdeck = location_info:new({ text = "Sniper Deck", team = Team.kRed }) + +location_blue_ramproom = location_info:new({ text = "Main Room", team = Team.kBlue }) +location_red_ramproom = location_info:new({ text = "Main Room", team = Team.kRed }) + +location_blue_lower = location_info:new({ text = "Lower Level", team = Team.kBlue }) +location_red_lower = location_info:new({ text = "Lower Level", team = Team.kRed }) + +location_blue_upper = location_info:new({ text = "Upper Level", team = Team.kBlue }) +location_red_upper = location_info:new({ text = "Upper Level", team = Team.kRed }) + +location_blue_airlift = location_info:new({ text = "Air Lift", team = Team.kBlue }) +location_red_airlift = location_info:new({ text = "Air Lift", team = Team.kRed }) + +location_blue_lowerladder = location_info:new({ text = "Lower Ladder to Ramp Room", team = Team.kBlue }) +location_red_lowerladder = location_info:new({ text = "Lower Ladder to Ramp Room", team = Team.kRed }) + +location_blue_rightcorridoor = location_info:new({ text = "Left Corridor", team = Team.kBlue }) +location_red_rightcorridoor = location_info:new({ text = "Left Corridor", team = Team.kRed }) + +location_blue_leftcorridoor = location_info:new({ text = "Right Corridor", team = Team.kBlue }) +location_red_leftcorridoor = location_info:new({ text = "Right Corridor", team = Team.kRed }) + +location_blue_rightresupply = location_info:new({ text = "Left Respawn", team = Team.kBlue }) +location_red_rightresupply = location_info:new({ text = "Left Respawn", team = Team.kRed }) + +location_blue_leftresupply = location_info:new({ text = "Right Respawn", team = Team.kBlue }) +location_red_leftresupply = location_info:new({ text = "Right Respawn", team = Team.kRed }) + +location_blue_leftspawn = location_info:new({ text = "Left Respawn", team = Team.kBlue }) +location_red_leftspawn = location_info:new({ text = "Left Respawn", team = Team.kRed }) + +location_blue_secret = location_info:new({ text = "Secret Passage", team = Team.kBlue }) +location_red_secret = location_info:new({ text = "Secret Passage", team = Team.kRed }) + +location_blue_flagroom_passage = location_info:new({ text = "Flagroom Hole Access Passage", team = Team.kBlue }) +location_red_flagroom_passage = location_info:new({ text = "Flagroom Hole Access Passage", team = Team.kRed }) + +location_blue_flagroom_ramp = location_info:new({ text = "Flag Room Ramp", team = Team.kBlue }) +location_red_flagroom_ramp = location_info:new({ text = "Flag Room Ramp", team = Team.kRed }) + +location_blue_water_entry = location_info:new({ text = "Water Entrance", team = Team.kBlue }) +location_red_water_entry = location_info:new({ text = "Water Entrance", team = Team.kRed }) + +location_blue_water_exit = location_info:new({ text = "Water Exit", team = Team.kBlue }) +location_red_water_exit = location_info:new({ text = "Water Exit", team = Team.kRed }) + +location_blue_water_access = location_info:new({ text = "Water Access", team = Team.kBlue }) +location_red_water_access = location_info:new({ text = "Water Access", team = Team.kRed }) + +----------------------------------------------------------------------------- +-- spawn +----------------------------------------------------------------------------- + +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + + -- end of default player_spawn + player:RemoveAmmo( Ammo.kManCannon, 1 ) +end + +----------------------------------------------------------------------------- +-- Respawns +----------------------------------------------------------------------------- + +spawn_red_offence = function(self,player) + return ((player:GetTeamId() == Team.kRed) + and ((player:GetClass() == Player.kScout) + or (player:GetClass() == Player.kMedic) + or (player:GetClass() == Player.kSpy))) +end + +spawn_red_defence = function(self,player) + return ((player:GetTeamId() == Team.kRed) + and (((player:GetClass() == Player.kScout) == false) + and ((player:GetClass() == Player.kMedic) == false) + and ((player:GetClass() == Player.kSpy) == false))) +end + + +spawn_blue_offence = function(self,player) + return ((player:GetTeamId() == Team.kBlue) + and ((player:GetClass() == Player.kScout) + or (player:GetClass() == Player.kMedic) + or (player:GetClass() == Player.kSpy))) +end + +spawn_blue_defence = function(self,player) + return ((player:GetTeamId() == Team.kBlue) + and (((player:GetClass() == Player.kScout) == false) + and ((player:GetClass() == Player.kMedic) == false) + and ((player:GetClass() == Player.kSpy) == false))) +end + +bluespawn_offence = { validspawn = spawn_blue_offence } +bluespawn_defence = { validspawn = spawn_blue_defence } +redspawn_offence = { validspawn = spawn_red_offence } +redspawn_defence = { validspawn = spawn_red_defence } + +----------------------------------------------------------------------------- +-- Basecap (no mancannon) +----------------------------------------------------------------------------- +bases_cap = basecap:new({ + mancannons = 0, +}) + +-- red cap point +red_cap = bases_cap:new({team = Team.kRed, + item = {"blue_flag","yellow_flag","green_flag"}}) + +-- blue cap point +blue_cap = bases_cap:new({team = Team.kBlue, + item = {"red_flag","yellow_flag","green_flag"}}) diff --git a/maps/ff_bases.txt b/maps/ff_bases.txt new file mode 100644 index 0000000..9ab6e0d --- /dev/null +++ b/maps/ff_bases.txt @@ -0,0 +1,7 @@ +CAPTURE THE FLAG + +Get the enemy flag and take it back to your capture point to score. + +Alternately: Detpack the enemy computer to score. + +Visit http://www.fortress-forever.com for more information. diff --git a/maps/ff_bases_soundscapes.txt b/maps/ff_bases_soundscapes.txt new file mode 100644 index 0000000..129d387 --- /dev/null +++ b/maps/ff_bases_soundscapes.txt @@ -0,0 +1,229 @@ +-------------------------------------------------------------- +FF_BASES SOUNDSCAPES +-------------------------------------------------------------- + +"ff_bases.midmap" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.5" + "pitch" "100" + } + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "1.0" + } +} + + +"ff_bases.water" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience5.wav" + "volume" "0.1" + "pitch" "100" + } + + "playlooping" + { + "wave" "ambient/water/drip_loop1.wav" + "volume" "0.3" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_drip" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "d1_canals.util_fardrips" + "volume" "1.0" + } +} + +"ff_bases.ramproom" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "name" "ambient/atmosphere/ambience_base.wav" + "volume" "0.3" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.5" + "pitch" "100" + } +} + +"ff_bases.corridor1" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "name" "ambient/atmosphere/ambience_base.wav" + "volume" "0.5" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.5" + "pitch" "100" + } +} + +"ff_bases.bments" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "name" "ambient/levels/canals/tunnel_wind_loop1.wav" + "volume" "0.7" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.4" + "pitch" "100" + } +} + +"ff_bases.out" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "name" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.7" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "1.0" + } +} + +"ff_bases.secret" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "name" "ambient/atmosphere/ambience_base.wav" + "volume" "0.6" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.3" + "pitch" "100" + } +} + +"ff_bases.computer" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.3" + "pitch" "100" + } + "playlooping" + { + "wave" "ambient/machines/lab_loop1.wav" + "volume" "0.4" + "pitch" "100" + } + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "0.3" + } +} + +"ff_bases.flagroom" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.4" + "pitch" "100" + } + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "0.3" + } +} + +"ff_bases.lower" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience_base.wav" + "volume" "0.3" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.6" + "pitch" "100" + } +} + +"ff_bases.water2" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience_base.wav" + "volume" "0.1" + "pitch" "100" + } + "playlooping" + { + "name" "ambient/push/inside_amb1.wav" + "volume" "0.6" + "pitch" "100" + } +} \ No newline at end of file diff --git a/maps/ff_cz2.lua b/maps/ff_cz2.lua new file mode 100644 index 0000000..47c8d5e --- /dev/null +++ b/maps/ff_cz2.lua @@ -0,0 +1,21 @@ +-- ff_cz2.lua + + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_cp_default") +IncludeScript("base_cp") + + +----------------------------------------------------------------------------- +-- overrides +----------------------------------------------------------------------------- +function healthkit:dropatspawn() return false end + + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- + + diff --git a/maps/ff_cz2.txt b/maps/ff_cz2.txt new file mode 100644 index 0000000..c8b9bd4 --- /dev/null +++ b/maps/ff_cz2.txt @@ -0,0 +1,22 @@ +ff_cz2 + + +GAME MODE: Command Point (CP) +Capture and control each command point. + +TEAMS: Red vs Blue + +OBJECTIVES: +- Capture command points by standing on them. +- Defend points from enemy captures. + +SCORING: +- Command points farthest from your + base are worth more points, which + are rewarded every 15-30 seconds. +- All Cap: 100 points are given for + capturing all command points, which + also resets players, flags, and CPs. + +Visit www.fortress-forever.com for +additional information. \ No newline at end of file diff --git a/maps/ff_destroy.lua b/maps/ff_destroy.lua new file mode 100644 index 0000000..a68c35e --- /dev/null +++ b/maps/ff_destroy.lua @@ -0,0 +1,316 @@ +-- ff_destroy.lua +-- caesium 01/2009 + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base"); +IncludeScript("base_ctf"); +IncludeScript("base_location"); + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- +POINTS_PER_CAPTURE = 10; +FLAG_RETURN_TIME = 60; + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- +location_redfd = location_info:new({ text = "Foyer", team = Team.kRed }) +location_redramp = location_info:new({ text = "Main Ramps", team = Team.kRed }) +location_redspawn = location_info:new({ text = "Respawn", team = Team.kRed }) +location_redtopramp = location_info:new({ text = "Top Main Ramps", team = Team.kRed }) +location_redbalc = location_info:new({ text = "Balcony", team = Team.kRed }) +location_redsec = location_info:new({ text = "Security Control", team = Team.kRed }) +location_redfr = location_info:new({ text = "Flag Room", team = Team.kRed }) +location_redresup = location_info:new({ text = "Resupply", team = Team.kRed }) + +location_bluefd = location_info:new({ text = "Foyer", team = Team.kBlue }) +location_blueramp = location_info:new({ text = "Main Ramps", team = Team.kBlue }) +location_bluespawn = location_info:new({ text = "Respawn", team = Team.kBlue }) +location_bluetopramp = location_info:new({ text = "Top Main Ramps", team = Team.kBlue }) +location_bluebalc = location_info:new({ text = "Balcony", team = Team.kBlue }) +location_bluesec = location_info:new({ text = "Security Control", team = Team.kBlue }) +location_bluefr = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_blueresup = location_info:new({ text = "Resupply", team = Team.kBlue }) + +location_midmap = location_info:new({ text = "Outside", team = NO_TEAM }) + +----------------------------------------------------------------------------- +-- remove mirvs (?) and give full resup on spawn +----------------------------------------------------------------------------- +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) +-- if player:GetClass() == Player.kHwguy then +-- player:RemoveAmmo(Ammo.kGren2, 4) +-- end +-- if player:GetClass() == Player.kDemoman then +-- player:RemoveAmmo(Ammo.kGren2, 4) +-- end + player:AddHealth( 400 ) + player:AddArmor( 400 ) + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) +end + +----------------------------------------------------------------------------- +-- bagless resupply +----------------------------------------------------------------------------- +aardvarkresup = trigger_ff_script:new({ team = Team.kUnassigned }) + +function aardvarkresup:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == self.team then + player:AddHealth( 400 ) + player:AddArmor( 400 ) + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + end + end +end + +blue_aardvarkresup = aardvarkresup:new({ team = Team.kBlue }) +red_aardvarkresup = aardvarkresup:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- aardvark security +----------------------------------------------------------------------------- +red_aardvarksec = trigger_ff_script:new() +blue_aardvarksec = trigger_ff_script:new() +bluesecstatus = 1 +redsecstatus = 1 + +sec_iconx = 60 +sec_icony = 30 +sec_iconw = 16 +sec_iconh = 16 + +function red_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + if redsecstatus == 1 then + redsecstatus = 0 + AddSchedule("aardvarksecup10red",20,aardvarksecup10red) + AddSchedule("aardvarksecupred",30,aardvarksecupred) + OpenDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_REDDOWN" ) + RemoveHudItemFromAll( "red-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end + end + end +end + +function blue_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kRed then + if bluesecstatus == 1 then + bluesecstatus = 0 + AddSchedule("aardvarksecup10blue",20,aardvarksecup10blue) + AddSchedule("aardvarksecupblue",30,aardvarksecupblue) + OpenDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_BLUEDOWN" ) + RemoveHudItemFromAll( "blue-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + end + end +end + +function aardvarksecupred() + redsecstatus = 1 + CloseDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_ON") + SpeakAll( "SD_REDUP" ) + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) +end + +function aardvarksecupblue() + bluesecstatus = 1 + CloseDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_ON") + SpeakAll( "SD_BLUEUP" ) + RemoveHudItemFromAll( "blue-sec-down" ) + AddHudIconToAll( "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) +end + +function aardvarksecup10red() + BroadCastMessage("#FF_RED_SEC_10") +end + +function aardvarksecup10blue() + BroadCastMessage("#FF_BLUE_SEC_10") +end + +----------------------------------------------------------------------------- +-- aardvark lasers and respawn shields +----------------------------------------------------------------------------- +KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) +lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) + +function KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function lasers_KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + if self.team == Team.kBlue then + if redsecstatus == 1 then + return EVENT_ALLOWED + end + end + if self.team == Team.kRed then + if bluesecstatus == 1 then + return EVENT_ALLOWED + end + end + end + end + return EVENT_DISALLOWED +end + +blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) +red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) +sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue }) +sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed }) + +------------------------- +-- flaginfo +------------------------- +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + flaginfo_base(player_entity) --basic CTF HUD items + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if bluesecstatus == 1 then + AddHudIcon( player, "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + else + AddHudIcon( player, "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + + if redsecstatus == 1 then + AddHudIcon( player, "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + else + AddHudIcon( player, "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end +end + +----------------------------------------------------------------------------- +-- custom packs +----------------------------------------------------------------------------- +aardvarkpack_fr = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 130, + gren1 = 0, + gren2 = 0, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +aardvarkpack_ramp = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 0, + gren1 = 0, + gren2 = 0, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +aardvarkpack_sec = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 0, + gren1 = 1, + gren2 = 1, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function aardvarkpack_fr:dropatspawn() return false end +function aardvarkpack_ramp:dropatspawn() return false end +function aardvarkpack_sec:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- backpack entity setup (modified for aardvarkpacks) +----------------------------------------------------------------------------- +function build_backpacks(tf) + return healthkit:new({touchflags = tf}), + armorkit:new({touchflags = tf}), + ammobackpack:new({touchflags = tf}), + bigpack:new({touchflags = tf}), + grenadebackpack:new({touchflags = tf}), + aardvarkpack_fr:new({touchflags = tf}), + aardvarkpack_ramp:new({touchflags = tf}), + aardvarkpack_sec:new({touchflags = tf}) +end + +blue_healthkit, blue_armorkit, blue_ammobackpack, blue_bigpack, blue_grenadebackpack, blue_aardvarkpack_fr, blue_aardvarkpack_ramp, blue_aardvarkpack_sec = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kBlue}) +red_healthkit, red_armorkit, red_ammobackpack, red_bigpack, red_grenadebackpack, red_aardvarkpack_fr, red_aardvarkpack_ramp, red_aardvarkpack_sec = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kRed}) +yellow_healthkit, yellow_armorkit, yellow_ammobackpack, yellow_bigpack, yellow_grenadebackpack, yellow_aardvarkpack_fr, yellow_aardvarkpack_ramp, yellow_aardvarkpack_sec = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kYellow}) +green_healthkit, green_armorkit, green_ammobackpack, green_bigpack, green_grenadebackpack, green_aardvarkpack_fr, green_aardvarkpack_ramp, green_aardvarkpack_sec = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kGreen}) + +----------------------------------------------------------------------------- +-- bouncepads for lifts +----------------------------------------------------------------------------- +base_jump = trigger_ff_script:new({ pushz = 0 }) + +function base_jump:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local playerVel = player:GetVelocity() + playerVel.z = self.pushz + player:SetVelocity( playerVel ) + end +end + +lift_red = base_jump:new({ pushz = 600 }) +lift_blue = base_jump:new({ pushz = 600 }) diff --git a/maps/ff_destroy.txt b/maps/ff_destroy.txt new file mode 100644 index 0000000..002570b --- /dev/null +++ b/maps/ff_destroy.txt @@ -0,0 +1,6 @@ +Steal the enemy flag while protecting your own: +[1] Deactivate enemy security system +[2] Take enemy flag +[3] Bring to capture point in your base +SCORING: 10 points per flag capture +Based on original TFC map by Koochy ;D \ No newline at end of file diff --git a/maps/ff_dm.lua b/maps/ff_dm.lua new file mode 100644 index 0000000..e83b30f --- /dev/null +++ b/maps/ff_dm.lua @@ -0,0 +1,172 @@ + +-- ff_dm.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +-- IncludeScript("base_soldierarena"); +IncludeScript("base_teamplay"); + +function startup() + -- set up team limits (only red & blue) + SetPlayerLimit( Team.kBlue, 0 ) + SetPlayerLimit( Team.kRed, 0 ) + SetPlayerLimit( Team.kYellow, -1 ) + SetPlayerLimit( Team.kGreen, -1 ) + + SetTeamName( Team.kRed, "Destroyers" ) +end + +function precache() + PrecacheSound( "Backpack.Touch" ) +end + +--function player_onconc( player_entity, concer_entity ) +-- -- player_entity is always a player +-- local player = CastToPlayer( player_entity ) +-- local concer = CastToPlayer( concer_entity ) +-- +-- ConsoleToAll( "Running player_onconc! Player: " .. player:GetName() .. " Concer: " .. concer:GetName() ) +-- ConsoleToAll( "conc_duration = " .. conc_duration .. " conc_iconduration = " .. conc_iconduration ) +-- +-- if player:GetTeamId() == Team.kRed then +-- return EVENT_DISALLOWED +-- end +-- +-- conc_duration = -1 +-- conc_iconduration = -1 +-- +-- ConsoleToAll( "conc_duration = " .. conc_duration .. " conc_iconduration = " .. conc_iconduration ) +-- +-- return EVENT_ALLOWED +--end + +--function player_ontranq( player_entity, tranqer_entity ) +-- local player = CastToPlayer( player_entity ) +-- local tranqer = CastToPlayer( tranqer_entity ) +-- +-- ConsoleToAll( "Running player_ontranq! Player: " .. player:GetName() .. " Tranqer: " .. tranqer:GetName() ) +-- ConsoleToAll( "tranq_duration = " .. tranq_duration .. " tranq_iconduration = " .. tranq_iconduration .. " tranq_speed = " .. tranq_speed ) +-- +-- if player:GetTeamId() == Team.kRed then +-- return EVENT_DISALLOWED +-- end +-- +-- tranq_duration = -1 +-- tranq_iconduration = -1 +-- tranq_speed = 0.2 +-- +-- return EVENT_ALLOWED +--end + +-- Everyone to spawns with everything +function player_spawn( player_entity ) + -- 400 for overkill. of course the values + -- get clamped in game code + --local player = GetPlayer(player_id) + local player = CastToPlayer( player_entity ) + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + player:AddAmmo( Ammo.kGren1, 4 ) + player:AddAmmo( Ammo.kGren2, 4 ) +end + +function player_onkill( player ) + -- Test, Don't let blue team suicide. +-- if player:GetTeamId() == Team.kBlue then +-- return false +-- end + return true +end + +-- Get team points for killing a player +function player_killed( player_entity, damageinfo ) + -- suicides have no damageinfo + if damageinfo ~= nil then + local killer = damageinfo:GetAttacker() + + local player = CastToPlayer( player_entity ) + if IsPlayer(killer) then + killer = CastToPlayer(killer) + --local victim = GetPlayer(player_id) + + if not (player:GetTeamId() == killer:GetTeamId()) then + local killersTeam = killer:GetTeam() + killersTeam:AddScore(1) + end + end + end +end + +-- Just here because +function player_ondamage( player_entity, damageinfo ) +end + +-- Infinite bag +infini_bag = trigger_ff_script:new({ touchsound = "Backpack.Touch" }) + +-- Infinite bag :: ontouch +function infini_bag:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + -- 400 for overkill. of course the values + -- get clamped in game code + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + player:AddAmmo( Ammo.kGren1, 4 ) + player:AddAmmo( Ammo.kGren2, 4 ) + + -- Play the touch sound + player:EmitSound( self.touchsound ) + end +end + +function infini_bag:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + return true + end + end + + return false +end + +-- Red infinite bag +red_infini_bag = infini_bag:new({ team = Team.kRed }) + +-- Blue infinite bag +blue_infini_bag = infini_bag:new({ team = Team.kBlue }) + +-- Spawn doors +spawn_door_trigger = trigger_ff_script:new({ team = Team.kUnassigned, doorname = "" }) + +function spawn_door_trigger:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == self.team then + if self.doorname then + OpenDoor( self.doorname ) + end + end + end +end + +red_spawn_door1_trigger = spawn_door_trigger:new({ team = Team.kRed, doorname = "red_spawn_door1" }) +red_spawn_door2_trigger = spawn_door_trigger:new({ team = Team.kRed, doorname = "red_spawn_door2" }) +blue_spawn_door1_trigger = spawn_door_trigger:new({ team = Team.kBlue, doorname = "blue_spawn_door1" }) +blue_spawn_door2_trigger = spawn_door_trigger:new({ team = Team.kBlue, doorname = "blue_spawn_door2" }) diff --git a/maps/ff_dustbowl.lua b/maps/ff_dustbowl.lua new file mode 100644 index 0000000..6183207 --- /dev/null +++ b/maps/ff_dustbowl.lua @@ -0,0 +1,295 @@ + +-- ff_dustbowl.lua + +-- includes +IncludeScript("base_ad"); +IncludeScript("base_location"); + +-- set teams +ATTACKERS = Team.kBlue +DEFENDERS = Team.kRed + +dbhealthkit = genericbackpack:new({ + health = 50, + model = "models/items/healthkit.mdl", + materializesound = "Item.Materialize", + touchsound = "HealthKit.Touch" +}) +dbarmorkit = genericbackpack:new({ + armor = 200, + model = "models/items/armour/armour.mdl", + materializesound = "Item.Materialize", + touchsound = "ArmorKit.Touch" +}) +dbammopack = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 100, + rockets = 15, + cells = 130, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammopack:dropatspawn() return false end + +dbgrenadepackone = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + mancannons = 1, + gren1 = 2, + gren2 = 2, + armor = 100, + health = 300, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbgrenadepackone:dropatspawn() return false end + +dbgrenadepacktwo = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + mancannons = 1, + gren1 = 2, + gren2 = 2, + armor = 100, + health = 100, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbgrenadepacktwo:dropatspawn() return false end + +dbammotypeone = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 130, + armor = 50, + health = 40, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypeone:dropatspawn() return false end + +dbammotypetwo = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 25, + health = 50, + respawntime = 6, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypetwo:dropatspawn() return false end + +dbammotypethree = genericbackpack:new({ + grenades = 30, + nails = 150, + shells = 50, + rockets = 30, + cells = 200, + armor = 100, + health = 75, + respawntime = 3, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypethree:dropatspawn() return false end + +dbammotypefour = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 100, + health = 100, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypefour:dropatspawn() return false end + +dbammotypefive = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 100, + health = 100, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypefive:dropatspawn() return false end + +dbammotypesix = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 130, + armor = 50, + health = 50, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypesix:dropatspawn() return false end + +dbammotypeseven = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 75, + health = 75, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypeseven:dropatspawn() return false end + +dbammotypeeight = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 300, + health = 100, + respawntime = 3, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypeeight:dropatspawn() return false end + +dbammotypenine = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 30, + health = 30, + respawntime = 6, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypenine:dropatspawn() return false end + +dbammotypeten = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 150, + armor = 10, + health = 20, + respawntime = 3, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypeten:dropatspawn() return false end + +dbammotypeeleven = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 0, + health = 20, + respawntime = 4, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypeeleven:dropatspawn() return false end + +dbammotypetwelve = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 100, + rockets = 20, + cells = 130, + armor = 100, + health = 0, + respawntime = 3, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypetwelve:dropatspawn() return false end + +dbammotypethirteen = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 100, + armor = 25, + health = 25, + respawntime = 5, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypethirteen:dropatspawn() return false end + +dbammotypefourteen = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 200, + armor = 0, + health = 0, + respawntime = 4, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function dbammotypefourteen:dropatspawn() return false end diff --git a/maps/ff_dustbowl.txt b/maps/ff_dustbowl.txt new file mode 100644 index 0000000..91f8313 --- /dev/null +++ b/maps/ff_dustbowl.txt @@ -0,0 +1,10 @@ +ATTACK OR DEFEND + +Objective: Blue team must take their flag to +Red team's Headquarters to win the game. +There are two command points on the way +which must be secured in order. + +Other Notes: When a capture point is secured, +spawn points are revised and a new flag +appears. Rounds last 25 minutes. \ No newline at end of file diff --git a/maps/ff_fusion.lua b/maps/ff_fusion.lua new file mode 100644 index 0000000..1268e4c --- /dev/null +++ b/maps/ff_fusion.lua @@ -0,0 +1,377 @@ +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- + +IncludeScript("base_idzone") +IncludeScript("base_location") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- global overrides that you can do what you want with +----------------------------------------------------------------------------- + +FORT_POINTS_PER_INITIAL_TOUCH = 200 +FORT_POINTS_PER_PERIOD = 50 +FORT_POINTS_PER_DEFEND = 100 + +POINTS_PER_INITIAL_TOUCH = 1 +POINTS_PER_PERIOD = 1 + +DELAY_BEFORE_PERIOD_POINTS = 2 +PERIOD_TIME = 1 +INITIAL_ROUND_PERIOD = 60 +ROUND_SETUP_PERIOD = 17 + +DEFENSE_PERIOD_TIME = 60 +POINTS_PER_DEFENSE_PERIOD = 1 + +DEFAULT_POINTS_TO_CAP = 10 +NUMBER_OF_CAP_POINTS = 3 +DELAY_BEFORE_TEAMSWITCH = 3 +DELAY_AFTER_CAP = 3 + +ZONE_COLOR = "purple" + +----------------------------------------------------------------------------- +-- Zone-controlling outputs +----------------------------------------------------------------------------- + +function oncap_outputs() + + OutputEvent( "shake"..phase, "StartShake" ) + OutputEvent( "shakebreak"..phase, "Playsound" ) + AddSchedule( "Partition_On", 4, OutputEvent,"cp"..phase.."_partition", "TurnOn") + AddSchedule( "Partition_Enabled", 4, OutputEvent,"cp"..phase.."_partition", "Enable") + AddSchedule( "Partition_Door_On", 4, OutputEvent, "cp"..phase.."_partition_door", "TurnOff") + AddSchedule( "Partition_Door_Enable", 4, OutputEvent, "cp"..phase.."_partition_door", "Disable") + AddSchedule( "Areaportal_On", 4, OutputEvent, "cp"..phase.."_areaportal_door", "Open") + AddSchedule( "Areaportal_Partition_On", 4, OutputEvent, "cp"..phase.."_areaportal", "Close") + AddSchedule( "alarm_voice", 2, OutputEvent, "voice1", "PlaySound") + AddSchedule( "alarm_text", 2, schedulemessagetoall, "Zone Captured!") + AddSchedule( "stop_voice", 2.5, OutputEvent, "voice1", "StopSound") + AddSchedule( "alarm_voices", 2.5, OutputEvent, "voice2", "PlaySound") + AddSchedule( "stop_voices", 2.975, OutputEvent, "voice2", "StopSound") + AddSchedule( "35 second warning", 7, schedulemessagetoall, "Gate Opens in 35 seconds!") + AddSchedule( "35 second warning_sound" , 7 , schedulesound, "misc.bloop" ) + AddSchedule( "dooropen5sec_sound", 37, schedulecountdown, "5") + AddSchedule( "dooropen4sec_sound", 38, schedulecountdown, "4") + AddSchedule( "dooropen3sec_sound", 39, schedulecountdown, "3") + AddSchedule( "dooropen2sec_sound", 40, schedulecountdown, "2") + AddSchedule( "dooropen1sec_sound", 41, schedulecountdown, "1") + AddSchedule("alarm_events", 42, OutputEvent, "breakglass"..phase, "Break") + AddSchedule("alarm_sounds", 42, OutputEvent, "breakalarm"..phase, "PlaySound") + + + if phase == 1 then + defender_door_trigger1 = id_door:new({ team = attackers, door = "defender_door1" }) + defender_door_trigger2 = id_door:new({ team = attackers, door = "defender_door2" }) + end + if phase == 2 then + defender_door_trigger3 = id_door:new({ team = attackers, door = "defender_door3" }) + defender_door_trigger4 = id_door:new({ team = attackers, door = "defender_door4" }) + end +end +function oncap_outputs_nextphase() + RespawnAllPlayers() + +end +function onreset_outputs() + OutputEvent( "breakalarm"..phase, "Playsound" ) + OutputEvent( "shake"..phase, "StartShake" ) + OutputEvent( "shakebreak"..phase, "Playsound" ) + AddSchedule( "alarm_voice", 2, OutputEvent, "voice1", "PlaySound") + AddSchedule( "alarm_text", 2, schedulemessagetoall, "Zone Captured!") + AddSchedule( "stop_voice", 2.5, OutputEvent, "voice1", "StopSound") + AddSchedule( "alarm_voices", 2.5, OutputEvent, "voice2", "PlaySound") + AddSchedule( "stop_voices", 2.97, OutputEvent, "voice2", "StopSound") +end + +function zone_on_outputs() + + -- use for entities that have two copies per zone (e.g. rotate1 and rotate2) + two1 = phase * 2 - 1 + two2 = phase * 2 + -- use for entities that have three copies per zone (e.g. rotate1, rotate2, and rotate3) + three1 = phase * 3 - 2 + three2 = phase * 3 - 1 + three3 = phase * 3 + -- use for entities that have three copies per zone (e.g. rotate1, rotate2, rotate3 and rotate4) + four1 = phase * 4 - 3 + four2 = phase * 4 - 2 + four3 = phase * 4 - 1 + four4 = phase * 4 + + -- outputs + OutputEvent( "alarm"..phase, "PlaySound" ) + OutputEvent( "light"..phase, "TurnOn" ) + OutputEvent( "spot"..phase, "LightOn" ) + OutputEvent( "rotate"..two1, "Start" ) + OutputEvent( "rotate"..two2, "Start" ) + OutputEvent( "Tesla"..phase, "DoSpark" ) +end + +function zone_off_outputs() + + -- use for entities that have two copies per zone (e.g. rotate1 and rotate2) + two1 = phase * 2 - 1 + two2 = phase * 2 + -- use for entities that have three copies per zone (e.g. rotate1, rotate2, and rotate3) + three1 = phase * 3 - 2 + three2 = phase * 3 - 1 + three3 = phase * 3 + -- use for entities that have three copies per zone (e.g. rotate1, rotate2, rotate3 and rotate4) + four1 = phase * 4 - 3 + four2 = phase * 4 - 2 + four3 = phase * 4 - 1 + four4 = phase * 4 + + -- outputs + OutputEvent( "alarm"..phase, "StopSound" ) + OutputEvent( "light"..phase, "TurnOff" ) + OutputEvent( "spot"..phase, "LightOff" ) + OutputEvent( "rotate"..two1, "Stop" ) + OutputEvent( "rotate"..two2, "Stop" ) +end + +function openstartdoor() + -- unlock them doors + attacker_door_trigger1 = id_door:new({ team = attackers, door = "attacker_door1" }) + attacker_door_trigger2 = id_door:new({ team = attackers, door = "attacker_door2" }) + + -- open the first door + OutputEvent( "attacker_door1", "Open" ) + OutputEvent( "attacker_door2", "Open" ) +end + +function onswitch() + -- reset doors to open for the right team + defender_door_trigger1 = id_door:new({ team = defenders, door = "defender_door1" }) + defender_door_trigger2 = id_door:new({ team = defenders, door = "defender_door2" }) + defender_door_trigger3 = id_door:new({ team = defenders, door = "defender_door3" }) + defender_door_trigger4 = id_door:new({ team = defenders, door = "defender_door4" }) + defender_door_trigger5 = id_door:new({ team = defenders, door = "defender_door5" }) + defender_door_trigger6 = id_door:new({ team = defenders, door = "defender_door6" }) + defender_door_trigger7 = id_door:new({ team = defenders, door = "defender_door7" }) + defender_door_trigger8 = id_door:new({ team = defenders, door = "defender_door8" }) + + -- lock them doors + attacker_door_trigger1 = id_door:new({ team = Team.kUnassigned, door = "attacker_door1" }) + attacker_door_trigger2 = id_door:new({ team = Team.kUnassigned, door = "attacker_door2" }) + + OutputEvent( "point_template", "ForceSpawn" ) +end + +function onswitch_bluetodef() + -- switch the lights + OutputEvent( "defender_light1", "TurnOff" ) + OutputEvent( "defender_spotlight1", "LightOff" ) + + OutputEvent( "defender_light2", "TurnOn" ) + OutputEvent( "defender_spotlight2", "LightOn" ) + + OutputEvent( "cp1_partition", "TurnOff" ) + OutputEvent( "cp1_partition", "Disable" ) + OutputEvent( "cp2_partition", "TurnOff" ) + OutputEvent( "cp2_partition", "Disable" ) + + OutputEvent( "cp1_areaportal", "Open" ) + OutputEvent( "cp1_areaportal_door", "Close" ) + OutputEvent( "cp2_areaportal", "Open" ) + OutputEvent( "cp2_areaportal_door", "Close" ) + + OutputEvent( "cp1_partition_door", "TurnOn") + OutputEvent( "cp1_partition_door", "Enable") + OutputEvent( "cp2_partition_door", "TurnOn") + OutputEvent( "cp2_partition_door", "Enable") + + -- switch them packs, for real this time; this is a workaround due to how the touchflags are set in base.lua + local num_packs = 9 + for i=1,num_packs do + entity = GetEntityByName( "gen_pack_defender"..i ) + local info = CastToInfoScript( entity ) + info:SetTouchFlags({ AllowFlags.kBlue}) + end +end + +function onswitch_redtodef() + -- switch the lights + OutputEvent( "defender_light1", "TurnOn" ) + OutputEvent( "defender_spotlight1", "LightOn" ) + + OutputEvent( "defender_light2", "TurnOff" ) + OutputEvent( "defender_spotlight2", "LightOff" ) + + OutputEvent( "cp1_partition", "TurnOff" ) + OutputEvent( "cp1_partition", "Disable" ) + OutputEvent( "cp2_partition", "TurnOff" ) + OutputEvent( "cp2_partition", "Disable" ) + + OutputEvent( "cp1_areaportal", "Open" ) + OutputEvent( "cp1_areaportal_door", "Close" ) + OutputEvent( "cp2_areaportal", "Open" ) + OutputEvent( "cp2_areaportal_door", "Close" ) + + OutputEvent( "cp1_partition_door", "TurnOn") + OutputEvent( "cp1_partition_door", "Enable") + OutputEvent( "cp2_partition_door", "TurnOn") + OutputEvent( "cp2_partition_door", "Enable") + + + -- switch them packs, for real this time; this is a workaround due to how the touchflags are set in base.lua + local num_packs = 9 + for i=1,num_packs do + entity = GetEntityByName( "gen_pack_defender"..i ) + local info = CastToInfoScript( entity ) + info:SetTouchFlags({ AllowFlags.kRed}) + end +end + +----------------------------------------------------------------------------- +-- backpacks, doors, etc. etc. +----------------------------------------------------------------------------- + +gen_pack = genericbackpack:new({ + health = 30, + armor = 25, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + gren1 = 1, + gren2 = 0, + cells = 120, + respawntime = 10, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function gen_pack:dropatspawn() return false +end + +gen_pack_defender1 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender2 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender3 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender4 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender5 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender6 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender7 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender8 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) +gen_pack_defender9 = gen_pack:new({ touchflags = {AllowFlags.kRed} }) + +----------------------------------------------------------------------------- +-- No Fucking Annoyances +----------------------------------------------------------------------------- +noannoyances = trigger_ff_script:new({}) + +function noannoyances:onbuild( build_entity ) + return EVENT_DISALLOWED +end + +function noannoyances:onexplode( explode_entity ) + if IsGrenade( explode_entity ) then + return EVENT_DISALLOWED + end + return EVENT_ALLOWED +end + +function noannoyances:oninfect( infect_entity ) + return EVENT_DISALLOWED +end + +no_annoyances = noannoyances +spawn_protection = noannoyances + +------------------------------------------------------------------ +--Resup Doors +------------------------------------------------------------------ +neutral_door_trigger1 = trigger_ff_script:new({}) + +function neutral_door_trigger1:ontouch( trigger_entity ) + OutputEvent( "neutral_door1", "Open" ) +end + +id_door = trigger_ff_script:new({ team = Team.kUnassigned, door = nil }) + +function id_door:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function id_door:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent(self.door, "Open") + end +end + +attacker_door_trigger1 = id_door:new({ team = Team.kUnassigned, door = "attacker_door1" }) +attacker_door_trigger2 = id_door:new({ team = Team.kUnassigned, door = "attacker_door2" }) +defender_door_trigger1 = id_door:new({ team = defenders, door = "defender_door1" }) +defender_door_trigger2 = id_door:new({ team = defenders, door = "defender_door2" }) +defender_door_trigger3 = id_door:new({ team = defenders, door = "defender_door3" }) +defender_door_trigger4 = id_door:new({ team = defenders, door = "defender_door4" }) +defender_door_trigger5 = id_door:new({ team = defenders, door = "defender_door5" }) +defender_door_trigger6 = id_door:new({ team = defenders, door = "defender_door6" }) + +defender_spawn = base_defender_spawn:new({phase=1}) +defender_spawn2 = base_defender_spawn:new({phase=2}) +defender_spawn3 = base_defender_spawn:new({phase=3}) +attacker_spawn = base_attacker_spawn:new({phase=1}) +attacker_spawn2 = base_attacker_spawn:new({phase=2}) +attacker_spawn3 = base_attacker_spawn:new({phase=3}) + +------------------------------------------------------------------ +--Elevator +------------------------------------------------------------------ + +-- keeps track of elevator goings on +local elev_collection = Collection() + +elev_trigger_add = trigger_ff_script:new({ }) + +-- registers attackers as they hit the top +function elev_trigger_add:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + elev_collection:AddItem( player ) + end +end + +elev_trigger_remove = trigger_ff_script:new({ }) + +function elev_trigger_remove:onendtouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + elev_collection:RemoveItem( player ) + end +end + +function elev_trigger_remove:oninactive( trigger_entity ) + elev_collection:RemoveAllItems() +end + +elev_trigger = trigger_ff_script:new({ }) + +function elev_trigger:allowed( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + for playerx in elev_collection.items do + playerx = CastToPlayer(playerx) + if playerx:GetId() == player:GetId() then + return EVENT_DISALLOWED + end + end + end + return EVENT_ALLOWED +end + +function elev_trigger:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + --local player = CastToPlayer( trigger_entity ) + OutputEvent( "elev2", "Open" ) + end +end diff --git a/maps/ff_genesis.lua b/maps/ff_genesis.lua new file mode 100644 index 0000000..281493d --- /dev/null +++ b/maps/ff_genesis.lua @@ -0,0 +1,141 @@ +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- + +IncludeScript("base_adzone") +IncludeScript("base_location") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- global overrides that you can do what you want with +----------------------------------------------------------------------------- + +ZONE_COLOR = "green" +USE_ZONE_AREA = true +NUM_DEFENDER_ONLY_PACKS = 3 + +----------------------------------------------------------------------------- +-- Zone-controlling outputs +----------------------------------------------------------------------------- + +function zone_on_outputs() + -- outputs + OutputEvent( "alarm1", "PlaySound" ) + OutputEvent( "light1", "TurnOn" ) + OutputEvent( "spot1", "LightOn" ) + OutputEvent( "rotate1", "Start" ) + OutputEvent( "rotate2", "Start" ) + OutputEvent( "Tesla1", "DoSpark" ) +end + +function zone_off_outputs() + OutputEvent( "alarm1", "StopSound" ) + OutputEvent( "light1", "TurnOff" ) + OutputEvent( "spot1", "LightOff" ) + OutputEvent( "rotate1", "Stop" ) + OutputEvent( "rotate2", "Stop" ) +end + +function openstartdoor() + -- unlock them doors + attacker_door_trigger2 = id_door:new({ team = attackers, door = "attacker_door2" }) + attacker_door_trigger3 = id_door:new({ team = attackers, door = "attacker_door3" }) + + -- open the first door + OutputEvent( "attacker_door2", "Open" ) + OutputEvent( "attacker_door3", "Open" ) +end + +function onswitch() + -- reset doors to open for the right team + attacker_door_trigger1 = id_door:new({ team = attackers, door = "attacker_door1" }) + attacker_door_trigger4 = id_door:new({ team = attackers, door = "attacker_door4" }) + attacker_door_trigger5 = id_door:new({ team = attackers, door = "attacker_door5" }) + attacker_door_trigger6 = id_door:new({ team = attackers, door = "attacker_door6" }) + defender_door_trigger1 = id_door:new({ team = defenders, door = "defender_door1" }) + defender_door_trigger2 = id_door:new({ team = defenders, door = "defender_door2" }) + + -- lock them doors + attacker_door_trigger2 = id_door:new({ team = Team.kUnassigned, door = "attacker_door2" }) + attacker_door_trigger3 = id_door:new({ team = Team.kUnassigned, door = "attacker_door3" }) +end + +function onswitch_bluetodef() + -- switch the lights + OutputEvent( "defender_light1", "TurnOff" ) + OutputEvent( "defender_spotlight1", "LightOff" ) + + OutputEvent( "defender_light2", "TurnOn" ) + OutputEvent( "defender_spotlight2", "LightOn" ) +end + +function onswitch_redtodef() + -- switch the lights + OutputEvent( "defender_light1", "TurnOn" ) + OutputEvent( "defender_spotlight1", "LightOn" ) + + OutputEvent( "defender_light2", "TurnOff" ) + OutputEvent( "defender_spotlight2", "LightOff" ) +end + +------------------------------------------------------------------ +--Resup Doors +------------------------------------------------------------------ +neutral_door_trigger1 = trigger_ff_script:new({}) + +function neutral_door_trigger1:ontouch( trigger_entity ) + OutputEvent( "neutral_door1", "Open" ) +end + +id_door = trigger_ff_script:new({ team = Team.kUnassigned, door = nil }) + +function id_door:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function id_door:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent(self.door, "Open") + end +end + +attacker_door_trigger1 = id_door:new({ team = attackers, door = "attacker_door1" }) +attacker_door_trigger2 = id_door:new({ team = Team.kUnassigned, door = "attacker_door2" }) +attacker_door_trigger3 = id_door:new({ team = Team.kUnassigned, door = "attacker_door3" }) +attacker_door_trigger4 = id_door:new({ team = attackers, door = "attacker_door4" }) +attacker_door_trigger5 = id_door:new({ team = attackers, door = "attacker_door5" }) +attacker_door_trigger6 = id_door:new({ team = attackers, door = "attacker_door6" }) +defender_door_trigger1 = id_door:new({ team = defenders, door = "defender_door1" }) +defender_door_trigger2 = id_door:new({ team = defenders, door = "defender_door2" }) + +----------------------------------------------------------------------------- +-- Locations +----------------------------------------------------------------------------- + +location_a_spawn = location_info:new({ text = "Attacker's Spawn"}) +location_a_spawn2 = location_info:new({ text = "Attacker's Spawn"}) +location_a_spawn3 = location_info:new({ text = "Attacker's Gate Room"}) + +location_a_bottom = location_info:new({ text = "Secondary Attacker Route"}) +location_a_bottom2 = location_info:new({ text = "Secondary Attacker Route"}) + +location_gate = location_info:new({ text = "Attacker's Gate"}) +location_lower = location_info:new({ text = "Lower Hallway"}) +location_gate_balcony = location_info:new({ text = "Overhanging Defensive Balcony"}) +location_side_balcony = location_info:new({ text = "Side Defensive Balcony"}) + +location_elevator = location_info:new({ text = "Elevator Shaft"}) + +location_lab = location_info:new({ text = "Center Laboratory"}) + +location_building = location_info:new({ text = "Defense Building"}) +location_main = location_info:new({ text = "Main Area"}) +location_main_top = location_info:new({ text = "Top Balcony"}) + +location_cap = location_info:new({ text = "Capture Area"}) +location_d_spawn = location_info:new({ text = "Defense Spawn"}) \ No newline at end of file diff --git a/maps/ff_hunted.lua b/maps/ff_hunted.lua new file mode 100644 index 0000000..0d86038 --- /dev/null +++ b/maps/ff_hunted.lua @@ -0,0 +1,145 @@ + +-- ff_hunted.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_hunted") + +----------------------------------------------------------------------------- +-- entities +----------------------------------------------------------------------------- + +escape_door_top = base_escape_door + +yellow_door = yellowrespawndoor +yellow_door_Sewers_1 = yellowrespawndoor +yellow_door_BuildingOneNook_2 = yellowrespawndoor +yellow_door_BuildingOneBreakRoom = yellowrespawndoor +yellow_door_Sewers_2 = yellowrespawndoor +yellow_door_BuildingOneNook_1 = yellowrespawndoor +yellow_door_Warehouse_1 = yellowrespawndoor +yellow_door_RuinsAttic = yellowrespawndoor +yellow_door_ShaftRoom = yellowrespawndoor +yellow_door_RuinsBathroom_1 = yellowrespawndoor +yellow_door_RuinsBathroom_2 = yellowrespawndoor +yellow_door_OrgyTower = yellowrespawndoor +yellow_door_MainRoadBuilding_1 = yellowrespawndoor + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- + +location_green_hallway = location_info:new({ text = "Green Hallway", team = Team.kGreen }) +location_main_tunnel_elevator = location_info:new({ text = "Main Tunnel Elevator", team = Team.kBlue }) +location_main_tunnel_section1 = location_info:new({ text = "Main Tunnel Section 1", team = Team.kRed }) +location_main_tunnel_section2 = location_info:new({ text = "Main Tunnel Section 2", team = Team.kRed }) +location_main_tunnel_section3 = location_info:new({ text = "Main Tunnel Section 3", team = Team.kRed }) +location_main_tunnel_sewer_ladder = location_info:new({ text = "Main Tunnel Sewer Ladder", team = Team.kRed }) +location_main_tunnel_t = location_info:new({ text = "Main Tunnel T", team = Team.kRed }) +location_main_tunnel_turn1 = location_info:new({ text = "Main Tunnel Turn 1", team = Team.kRed }) +location_main_tunnel_turn2 = location_info:new({ text = "Main Tunnel Turn 2", team = Team.kRed }) + +location_beside_robotery = location_info:new({ text = "Beside Robotery", team = NO_TEAM }) +location_behind_robotery = location_info:new({ text = "Behind Robotery", team = NO_TEAM }) +location_main_ramp = location_info:new({ text = "Main Ramp", team = NO_TEAM }) +location_main_ramp_opening = location_info:new({ text = "Main Ramp Opening", team = NO_TEAM }) +location_main_ramp_overhang = location_info:new({ text = "Main Ramp Overhang", team = NO_TEAM }) +location_main_road = location_info:new({ text = "Main Road", team = NO_TEAM }) +location_main_road_hill = location_info:new({ text = "Main Road Hill", team = NO_TEAM }) +location_main_road_lookout = location_info:new({ text = "Main Road Lookout", team = NO_TEAM }) +location_main_road_stairs = location_info:new({ text = "Main Road Stairs", team = NO_TEAM }) +location_mountain_tunnel = location_info:new({ text = "Mountain Tunnel", team = NO_TEAM }) +location_robotery = location_info:new({ text = "Robotery", team = NO_TEAM }) +location_robotery_crevice = location_info:new({ text = "Robotery Crevice", team = NO_TEAM }) +location_robotery_front_roof = location_info:new({ text = "Robotery Front Roof", team = NO_TEAM }) +location_robotery_loading_bay = location_info:new({ text = "Robotery Loading Bay", team = NO_TEAM }) +location_robotery_side_doors = location_info:new({ text = "Robotery Side Doors", team = NO_TEAM }) + +location_lower_vent_room = location_info:new({ text = "Lower Vent Room", team = NO_TEAM }) +location_upper_vent_room = location_info:new({ text = "Upper Vent Room", team = NO_TEAM }) +location_vent = location_info:new({ text = "Vent", team = NO_TEAM }) +location_vent_stairwell_room = location_info:new({ text = "Vent-Stairwell Room", team = NO_TEAM }) + +location_break_room = location_info:new({ text = "Break Room", team = Team.kYellow }) +location_break_room_nook = location_info:new({ text = "Break Room Nook", team = Team.kYellow }) +location_building_1_alley_lookout = location_info:new({ text = "Building 1 Alley Lookout", team = Team.kYellow }) +location_building_1_entrance = location_info:new({ text = "Building 1 Entrance", team = NO_TEAM }) +location_building_1_exit = location_info:new({ text = "Building 1 Exit", team = NO_TEAM }) +location_building_1_lockers = location_info:new({ text = "Building 1 Lockers", team = NO_TEAM }) +location_building_1_lockers_nook = location_info:new({ text = "Building 1 Lockers Nook", team = NO_TEAM }) +location_building_1_lookout = location_info:new({ text = "Building 1 Lookout", team = Team.kYellow }) +location_building_1_lookout_room = location_info:new({ text = "Building 1 Lookout Room", team = Team.kYellow }) +location_building_1_lookout_room_exit = location_info:new({ text = "Building 1 Lookout Room Exit", team = Team.kYellow }) +location_building_1_rooftop = location_info:new({ text = "Building 1 Rooftop", team = NO_TEAM }) +location_utility_room = location_info:new({ text = "Utility Room", team = Team.kYellow }) +location_utility_room_boxes = location_info:new({ text = "Utility Room Boxes", team = NO_TEAM }) +location_utility_room_lower_stairs = location_info:new({ text = "Utility Room Lower Stairs", team = Team.kYellow }) +location_utility_room_other_boxes = location_info:new({ text = "Utility Room Other Boxes", team = NO_TEAM }) +location_utility_room_upper_nook = location_info:new({ text = "Utility Room Upper Nook", team = NO_TEAM }) +location_utility_room_upper_stairs = location_info:new({ text = "Utility Room Upper Stairs", team = Team.kYellow }) + +location_sewers_alley = location_info:new({ text = "Sewer Alley Ladder", team = NO_TEAM }) +location_sewers_dead_end = location_info:new({ text = "Sewer Dead End", team = NO_TEAM }) +location_sewers_main_road = location_info:new({ text = "Sewer Main Road Ladder", team = NO_TEAM }) +location_sewers_main_tunnel = location_info:new({ text = "Sewer Main Tunnel Ladder", team = NO_TEAM }) +location_sewers_mountain_tunnel = location_info:new({ text = "Sewer Mountain Tunnel Ladder", team = NO_TEAM }) +location_sewers_section1 = location_info:new({ text = "Sewer Section 1", team = NO_TEAM }) +location_sewers_section2 = location_info:new({ text = "Sewer Section 2", team = NO_TEAM }) +location_sewers_section3 = location_info:new({ text = "Sewer Section 3", team = NO_TEAM }) +location_sewers_section4 = location_info:new({ text = "Sewer Section 4", team = NO_TEAM }) +location_sewers_turn1 = location_info:new({ text = "Sewer Turn 1", team = NO_TEAM }) +location_sewers_turn2 = location_info:new({ text = "Sewer Turn 2", team = NO_TEAM }) +location_sewers_turn3 = location_info:new({ text = "Sewer Turn 3", team = NO_TEAM }) +location_sewers_turn4 = location_info:new({ text = "Sewer Turn 4", team = NO_TEAM }) +location_sewers_turn5 = location_info:new({ text = "Sewer Turn 5", team = NO_TEAM }) + +location_alley = location_info:new({ text = "Alley", team = NO_TEAM }) +location_alley_entrance = location_info:new({ text = "Alley Entrance", team = NO_TEAM }) +location_alley_lookouts = location_info:new({ text = "Alley Lookouts", team = Team.kYellow }) + +location_above_t_hallway = location_info:new({ text = "Above T Hallway", team = NO_TEAM }) +location_t_hallway = location_info:new({ text = "T Hallway", team = NO_TEAM }) +location_t_hallway_exit = location_info:new({ text = "T Hallway Exit", team = NO_TEAM }) + +location_stairwell_building_floor2 = location_info:new({ text = "Stairwell Building Floor 2", team = NO_TEAM }) +location_stairwell_building_floor3 = location_info:new({ text = "Stairwell Building Floor 3", team = NO_TEAM }) +location_stairwell_building_floor4 = location_info:new({ text = "Stairwell Building Floor 4", team = Team.kYellow }) +location_stairwell_floor1 = location_info:new({ text = "Stairwell Floor 1", team = NO_TEAM }) +location_stairwell_floor2 = location_info:new({ text = "Stairwell Floor 2", team = NO_TEAM }) +location_stairwell_floor3 = location_info:new({ text = "Stairwell Floor 3", team = Team.kYellow }) +location_stairwell_floor4 = location_info:new({ text = "Stairwell Floor 4", team = Team.kYellow }) + +location_ruins = location_info:new({ text = "Ruins", team = Team.kYellow }) +location_ruins_attic = location_info:new({ text = "Ruins Attic", team = Team.kYellow }) +location_ruins_attic_door = location_info:new({ text = "Ruins Attic Door", team = Team.kYellow }) +location_ruins_bathroom = location_info:new({ text = "Ruins Bathroom", team = Team.kYellow }) +location_ruins_crate_room = location_info:new({ text = "Ruins Crate Room", team = NO_TEAM }) +location_ruins_crate_room_exit = location_info:new({ text = "Ruins Crate Room Exit", team = NO_TEAM }) +location_ruins_dark_side = location_info:new({ text = "Ruins Dark Side", team = NO_TEAM }) +location_ruins_exit = location_info:new({ text = "Ruins Exit", team = NO_TEAM }) +location_ruins_field_holes = location_info:new({ text = "Ruins Field Holes", team = Team.kYellow }) +location_ruins_lower_ladder_room = location_info:new({ text = "Ruins Lower Ladder Room", team = Team.kYellow }) +location_ruins_middle_floor = location_info:new({ text = "Ruins Middle Floor", team = Team.kYellow }) +location_ruins_storage = location_info:new({ text = "Ruins Storage", team = NO_TEAM }) +location_ruins_tower_base = location_info:new({ text = "Ruins Tower Base", team = NO_TEAM }) +location_ruins_tower_rooftop = location_info:new({ text = "Ruins Tower Rooftop", team = NO_TEAM }) +location_ruins_tower_window = location_info:new({ text = "Ruins Tower Window", team = NO_TEAM }) +location_ruins_upper_ladder_room = location_info:new({ text = "Ruins Upper Ladder Room", team = Team.kYellow }) + +location_warehouse = location_info:new({ text = "Warehouse", team = Team.kYellow }) +location_warehouse_alley = location_info:new({ text = "Warehouse Alley", team = NO_TEAM }) +location_warehouse_entrance = location_info:new({ text = "Warehouse Entrance", team = NO_TEAM }) +location_warehouse_ramp = location_info:new({ text = "Warehouse Ramp", team = NO_TEAM }) +location_warehouse_ramp_nook = location_info:new({ text = "Warehouse Ramp Nook", team = NO_TEAM }) + +location_between_towers = location_info:new({ text = "Between Towers", team = NO_TEAM }) +location_billy_dons_property = location_info:new({ text = "Billy Don's Property", team = Team.kYellow }) +location_escape_tunnel = location_info:new({ text = "Escape Tunnel", team = Team.kBlue }) +location_field = location_info:new({ text = "Field", team = NO_TEAM }) +location_field_bridge = location_info:new({ text = "Field Bridge", team = NO_TEAM }) +location_fuel_room = location_info:new({ text = "Fuel Room", team = NO_TEAM }) +location_fuel_room_rooftop = location_info:new({ text = "Fuel Room Rooftop", team = NO_TEAM }) +location_tower1 = location_info:new({ text = "Tower 1", team = Team.kRed }) +location_tower2 = location_info:new({ text = "Tower 2", team = Team.kRed }) +location_under_the_bridge = location_info:new({ text = "Under Field Bridge", team = NO_TEAM }) diff --git a/maps/ff_hunted.txt b/maps/ff_hunted.txt new file mode 100644 index 0000000..82d0a15 --- /dev/null +++ b/maps/ff_hunted.txt @@ -0,0 +1,17 @@ +GAME MODE: Hunted + +Teams: +Blue Civilian escorted by Red Bodyguards vs Yellow Assassins + +Objectives: +Bodyguards open garage from the towers and escort civilian to the escape area + +Scoring: +Bodyguard: 10 points per escape +Assassin: 5 points per assassination + +Notes: + - The Hunted only takes damage +from sniper rifle, crowbar, knife, +tranq, and sabotaged SGs and +dispensers \ No newline at end of file diff --git a/maps/ff_hunted__classic__.lua b/maps/ff_hunted__classic__.lua new file mode 100644 index 0000000..6a876ad --- /dev/null +++ b/maps/ff_hunted__classic__.lua @@ -0,0 +1,71 @@ + +-- ff_hunted__classic__.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("ff_hunted") + +----------------------------------------------------------------------------- +-- Basic hunted-style gameplay. Respawns all players when the VIP is killed +----------------------------------------------------------------------------- +POINTS_PER_HUNTED_DEATH = 25 +POINTS_PER_HUNTED_ESCAPE = 50 + +function startup() + SetGameDescription("Hunted Classic") + + -- set up team names + SetTeamName( Team.kBlue, "The Hunted" ) + SetTeamName( Team.kRed, "Bodyguards" ) + SetTeamName( Team.kYellow, "Assassins" ) + SetTeamName( Team.kGreen, "Green Kid Touchers" ) + + -- set up team limits + SetPlayerLimit( Team.kBlue, 1 ) -- There can be only one Highlander! + SetPlayerLimit( Team.kRed, 0 ) -- Unlimited bodyguards. + SetPlayerLimit( Team.kYellow, 5 ) -- Only 5 assassins, but can we dynamically change this based on maxplayers and/or the current playercount? + SetPlayerLimit( Team.kGreen, -1 ) -- Fuck green. + + local team = GetTeam( Team.kBlue ) + team:SetAllies( Team.kRed ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, -1 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, 0 ) + + team = GetTeam( Team.kRed ) + team:SetAllies( Team.kBlue ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, 0 ) + team:SetClassLimit( Player.kHwguy, 0 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + team = GetTeam( Team.kYellow ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, 0 ) + team:SetClassLimit( Player.kSoldier, -1 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + RemoveSchedule( "hunted_location_timer" ) + AddScheduleRepeating( "hunted_location_timer" , 1.0, hunted_location_timer ) + +end diff --git a/maps/ff_hunted_level_sounds.txt b/maps/ff_hunted_level_sounds.txt new file mode 100644 index 0000000..5340596 --- /dev/null +++ b/maps/ff_hunted_level_sounds.txt @@ -0,0 +1,106 @@ +//-------------------------------- +// begin game sounds for ff_hunted +//-------------------------------- + +"ff_hunted.thunder" +{ + "channel" "CHAN_STATIC" + "volume" "0.3" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ambient/levels/labs/teleport_postblast_thunder1.wav" +} + +"ff_hunted.cheer" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted/CrowdCheer.wav" +} + +"ff_hunted.dying_bird" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "rndwave" + { + "wave" "@ff_hunted\dying_bird_1.wav" + "wave" "@ff_hunted\dying_bird_2.wav" + "wave" "@ff_hunted\dying_bird_3.wav" + } +} + +"ff_hunted.dying_bird_full" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\dying_bird_full.wav" +} + +"ff_hunted.i_am_the_werewolf" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\i_am_the_werewolf.wav" +} + +"ff_hunted.i_fight_vampires" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\i_fight_vampires.wav" +} + +"ff_hunted.werewolf_howling" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolf_howling.wav" +} + +"ff_hunted.werewolf_movies" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolf_movies.wav" +} + +"ff_hunted.werewolves_howling" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolves_howling.wav" +} + +//-------------------- +// UNAGI POWER, UNAGI! +//-------------------- + +"ff_hunted.unagi" +{ + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@misc/unagi.wav" +} + +//------------------------------ +// end game sounds for ff_hunted +//------------------------------ \ No newline at end of file diff --git a/maps/ff_hunted_soundscapes.txt b/maps/ff_hunted_soundscapes.txt new file mode 100644 index 0000000..b99e9db --- /dev/null +++ b/maps/ff_hunted_soundscapes.txt @@ -0,0 +1,64 @@ +"ff_hunted.FrontRoad" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.75" + "pitch" "100" + "wave" "ambient/atmosphere/town_ambience.wav" + } + "playrandom" + { + "time" "0.0,15.0" + "volume" "0.1" + "pitch" "50,100" + "rndwave" + { + "wave" "ambient/materials/metal4.wav" + "wave" "ambient/atmosphere/metallic1.wav" + } + } +} + +"ff_hunted.BodyguardTunnelTop" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.05" + "pitch" "100" + "wave" "ambient/atmosphere/indoor2.wav" + } + "playlooping" + { + "volume" "0.1" + "pitch" "50" + "wave" "ambient/atmosphere/undercity_loop1.wav" + } + + "playsoundscape" + { + "name" "ff_hunted.FrontRoad" + "volume" ".5" + } +} + +"ff_hunted.BodyguardTunnel" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/atmosphere/indoor2.wav" + } + "playlooping" + { + "volume" "0.2" + "pitch" "50" + "wave" "ambient/atmosphere/undercity_loop1.wav" + } +} \ No newline at end of file diff --git a/maps/ff_ksour.lua b/maps/ff_ksour.lua new file mode 100644 index 0000000..65ad1db --- /dev/null +++ b/maps/ff_ksour.lua @@ -0,0 +1,404 @@ +IncludeScript("base_id"); +IncludeScript("base_respawnturret"); +----------------------------------------------------------------------------- +-- globals +FLAG_RETURN_TIME = 60; +INITIAL_ROUND_DELAY = 45; +TEAM_SWITCH_DELAY = 4 +NUM_PHASES = 4 +----------------------------------------------------------------------------- + +-- sounds, right? +function precache() + PrecacheSound("otherteam.flagstolen") + PrecacheSound("misc.bloop") +end + +-- startup +function startup() + SetGameDescription("Invade Defend") + + -- set up team limits + local team = GetTeam( Team.kBlue ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kRed ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kYellow ) + team:SetPlayerLimit( -1 ) + + team = GetTeam( Team.kGreen ) + team:SetPlayerLimit( -1 ) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + -- set team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- start the timer for the points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_DELAY - 30 , schedulemessagetoall, "Gates open in 30 seconds!" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_DELAY - 10 , schedulemessagetoall, "Gates open in 10 seconds!" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_DELAY - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_DELAY - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_DELAY - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_DELAY - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_DELAY - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_DELAY - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_DELAY - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_DELAY - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_DELAY - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_DELAY - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_DELAY - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_DELAY - 1 , schedulecountdown, 1 ) end + + cp1_flag.enabled = true + for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do + local flag = GetInfoScriptByName(v) + if flag then + flag:SetModel(_G[v].model) + flag:SetSkin(teamskins[attackers]) + if i == 1 then + flag:Restore() + else + flag:Remove() + end + end + end + + flags_set_team( attackers ) + + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) +end + +-- overwriting these functions so that there aren't repeat messages +function round_30secwarn() end +function round_10secwarn() end + +function base_id_cap:oncapture(player, item) + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") +--SmartSound(player, "vox.yourcap", "vox.yourcap", "vox.enemycap") + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) + + local flag_item = GetInfoScriptByName( item ) + RemoveHudItem( player, flag_item:GetName() ) + + -- turn off this flag + for i,v in ipairs(self.item) do + _G[v].enabled = nil + local flag = GetInfoScriptByName(v) + if flag then + flag:Remove() + end + end + + if phase == NUM_PHASES then + -- it's the last round. end and stuff + phase = 1 + + AddSchedule("switch_teams", TEAM_SWITCH_DELAY, switch_teams) + else + phase = phase + 1 + + -- enable the next flag after a time + AddSchedule("flag_start", ROUND_DELAY, flag_start, self.next) + if ROUND_DELAY > 30 then AddSchedule("flag_30secwarn", ROUND_DELAY-30, flag_30secwarn) end + if ROUND_DELAY > 10 then AddSchedule("flag_10secwarn", ROUND_DELAY-10, flag_10secwarn) end + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = nil + if DEFENDERS_OBJECTIVE_ONFLAG or DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = nil + else DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_tobase_timer() + update_hud() + end + +end + +function switch_teams() + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + else + attackers = Team.kBlue + defenders = Team.kRed + end + + local team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kDemoman, 0) + team:SetClassLimit(Player.kEngineer, 0) + team:SetClassLimit(Player.kScout, 0) + team:SetClassLimit(Player.kMedic, 0) + + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + + -- set all flag teams to new attackers + flags_set_team( attackers ) + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- enable the first flag + cp1_flag.enabled = true + cp1_flag.status = 0 + local flag = GetInfoScriptByName("cp1_flag") + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + -- reset the timer on points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + -- respawn the players + RespawnAllPlayers() + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + -- run custom round reset stuff + onroundreset() + update_hud() +end + +-- Give everyone a full resupply, but strip secondary grenades and defender detpacks +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + + player:RemoveAmmo( Ammo.kGren2, 4 ) + + -- wtf, scout or med on d? are you mental? + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + local classt = "Scout" + if player:GetClass() == Player.kMedic then classt = "Medic" end + local id = player:GetId() + AddSchedule("force_changemessage"..id, 2, schedulechangemessage, player, "No "..classt.."s on defense. Autoswitching to Soldier." ) + AddSchedule("force_change"..id, 2.5, forcechange, player) + end + + if player:GetTeamId() == attackers then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) + elseif player:GetTeamId() == defenders then + UpdateObjectiveIcon( player, DEFENDERS_OBJECTIVE_ENTITY ) + player:RemoveAmmo( Ammo.kDetpack, 1 ) + end +end + +----------------------------------------------------------------------------- +-- Scheduled functions that do stuff +----------------------------------------------------------------------------- + +-- Sends a message to all after the determined time +function schedulechangemessage( player, message ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + BroadCastMessageToPlayer( player, message ) + end +end + +-- force a scout/med to switch to soli if they haven't +function forcechange( player ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + ApplyToPlayer( player, { AT.kChangeClassSoldier, AT.kRespawnPlayers } ) + end +end + +--------------------------------------------------------------------------- +--Turrets +------------------------------------------------------------ + +respawnturret_attackers = base_respawnturret:new({ team = attackers }) +respawnturret_defenders = base_respawnturret:new({ team = defenders }) + +--------------------- +--Backpacks +--------------------- +genpack = genericbackpack:new({ + health = 35, + armor = 50, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + cells = 120, + mancannons = 1, + gren1 = 1, + gren2 = 0, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function genpack:dropatspawn() return false +end + +genpack_grenpack = genericbackpack:new({ + health = 35, + armor = 50, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + cells = 120, + mancannons = 1, + gren1 = 2, + gren2 = 1, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function genpack_grenpack:dropatspawn() return false +end + +---------------------------------------------------- +--Toggle Cap points +--------------------------------------------------- +function cp1_cap:ontouch( trigger_entity ) + OutputEvent( "cp1_door", "Toggle" ) + +end +function cp2_cap:ontouch( trigger_entity ) + OutputEvent( "cp2_door", "Toggle" ) + +end +function cp3_cap:ontouch( trigger_entity ) + OutputEvent( "cp3_door", "Toggle" ) + +end +function cp4_cap:ontouch( trigger_entity ) + OutputEvent( "cp4_door", "Toggle" ) + +end + +---------------------------------------------------- +--Random schedule functions +--------------------------------------------------- +-- Sends a message to all after the determined time +function schedulemessagetoall( message ) + BroadCastMessage( message ) +end + +-- Plays a sound to all after the determined time +function schedulesound( sound ) + BroadCastSound( sound ) +end + + +function schedulecountdown( time ) + BroadCastMessage( ""..time.."" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +function round_start(doorname) + BroadCastMessage("Gates are now open!") + OpenDoor(doorname) + + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) +end + +--------------------------------------- +--Resetting round +------------------------------------ +detpack_wall_open = nil + +function onroundreset() + -- close the door + if detpack_wall_open then + -- there's no "close".. wtf + OutputEvent("detpack_hole", "Toggle") + detpack_wall_open = nil + end + -- Reset The Turrets + respawnturret_attackers = base_respawnturret:new({ team = attackers }) + respawnturret_defenders = base_respawnturret:new({ team = defenders }) + + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_DELAY - 30 , schedulemessagetoall, "Gates open in 30 seconds!" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_DELAY - 10 , schedulemessagetoall, "Gates open in 10 seconds!" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_DELAY - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_DELAY - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_DELAY - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_DELAY - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_DELAY - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_DELAY - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_DELAY - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_DELAY - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_DELAY - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_DELAY - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_DELAY - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_DELAY - 1 , schedulecountdown, 1 ) end +end + +detpack_trigger = trigger_ff_script:new({}) +function detpack_trigger:onexplode( trigger_entity ) + if IsDetpack( trigger_entity ) then + BroadCastMessage("The detpack wall has been blown open!") + BroadCastSound( "otherteam.flagstolen" ) + OutputEvent("detpack_hole", "Toggle") + OutputEvent("break1", "PlaySound") + detpack_wall_open = true + end + return EVENT_ALLOWED +end + +-- Don't want any body touching/triggering it except the detpack +function trigger_detpackable_door:allowed( trigger_entity ) return EVENT_DISALLOWED +end + + diff --git a/maps/ff_monkey.lua b/maps/ff_monkey.lua new file mode 100644 index 0000000..4a03389 --- /dev/null +++ b/maps/ff_monkey.lua @@ -0,0 +1,233 @@ +-- ff_monkey.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- + +IncludeScript("base_ctf") +IncludeScript("base_location") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- + +POINTS_PER_CAPTURE = 10 +FLAG_RETURN_TIME = 60 + +function startup() + SetGameDescription("Capture the Flag") + + -- set up team limits on each team + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, -1) + SetPlayerLimit(Team.kGreen, -1) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) +end + +----------------------------------------------------------------------------- +-- Pickups +----------------------------------------------------------------------------- + +monkeypackgeneric = genericbackpack:new({ + health = 20, + armor = 15, + grenades = 60, + nails = 60, + shells = 60, + rockets = 60, + cells = 60, + mancannons = 1, + gren1 = 1, + gren2 = 1, + respawntime = 35, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function monkeypackgeneric:dropatspawn() return false end + +redmonkeypack = genericbackpack:new({ + health = 200, + armor = 200, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + respawntime = 2, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kRed}, + botgoaltype = Bot.kBackPack_Ammo +}) + +function redmonkeypack:dropatspawn() return false end + +redmonkeypacktoo = genericbackpack:new({ + health = 20, + armor = 15, + grenades = 10, + nails = 30, + shells = 30, + rockets = 10, + cells = 30, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kRed}, + botgoaltype = Bot.kBackPack_Ammo +}) + +function redmonkeypacktoo:dropatspawn() return false end + +bluemonkeypack = genericbackpack:new({ + health = 200, + armor = 200, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + respawntime = 2, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kBlue}, + botgoaltype = Bot.kBackPack_Ammo +}) + +function bluemonkeypack:dropatspawn() return false end + +bluemonkeypacktoo = genericbackpack:new({ + health = 20, + armor = 15, + grenades = 10, + nails = 30, + shells = 30, + rockets = 10, + cells = 30, + respawntime = 20, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kBlue}, + botgoaltype = Bot.kBackPack_Ammo +}) + +function bluemonkeypacktoo:dropatspawn() return false end + +redmonkeygrenades = genericbackpack:new({ + detpacks = 1, + mancannons = 1, + gren1 = 4, + gren2 = 4, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kRed}, + respawntime = 15, + botgoaltype = Bot.kBackPack_Ammo +}) + +function redmonkeygrenades:dropatspawn() return false end + +bluemonkeygrenades = genericbackpack:new({ + detpacks = 1, + mancannons = 1, + gren1 = 4, + gren2 = 4, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kBlue}, + respawntime = 15, + botgoaltype = Bot.kBackPack_Ammo +}) + +function bluemonkeygrenades:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- Locations +----------------------------------------------------------------------------- + +location_blue_front_door = location_info:new({ text = "Front Door", team = Team.kBlue }) +location_blue_right_front_door = location_info:new({ text = "Right Front Door", team = Team.kBlue }) +location_blue_left_front_door = location_info:new({ text = "Left Front Door", team = Team.kBlue }) +location_blue_ramp_room = location_info:new({ text = "Great Hall", team = Team.kBlue }) +location_blue_T_route = location_info:new({ text = "'T' Route", team = Team.kBlue }) +location_blue_upper_spawn = location_info:new({ text = "Upper Spawn", team = Team.kBlue }) +location_blue_lower_spawn = location_info:new({ text = "Lower Spawn", team = Team.kBlue }) +location_blue_lower_route = location_info:new({ text = "Lower Route", team = Team.kBlue }) +location_blue_water_route = location_info:new({ text = "Water Route", team = Team.kBlue }) +location_blue_flag_room = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_blue_pit = location_info:new({ text = "Flag Room Pit", team = Team.kBlue }) +location_blue_flag_room_catwalk = location_info:new({ text = "Flag Room Catwalks", team = Team.kBlue }) +location_blue_water_tunnel = location_info:new({ text = "Water Tunnel", team = Team.kBlue }) +location_blue_yard = location_info:new({ text = "Yard", team = Team.kBlue }) + +location_red_front_door = location_info:new({ text = "Front Door", team = Team.kRed }) +location_red_right_front_door = location_info:new({ text = "Right Front Door", team = Team.kRed }) +location_red_left_front_door = location_info:new({ text = "Left Front Door", team = Team.kRed }) +location_red_ramp_room = location_info:new({ text = "Great Hall", team = Team.kRed }) +location_red_T_route = location_info:new({ text = "'T' Route", team = Team.kRed }) +location_red_upper_spawn = location_info:new({ text = "Upper Spawn", team = Team.kRed }) +location_red_lower_spawn = location_info:new({ text = "Lower Spawn", team = Team.kRed }) +location_red_lower_route = location_info:new({ text = "Lower Route", team = Team.kRed }) +location_red_water_route = location_info:new({ text = "Water Route", team = Team.kRed }) +location_red_flag_room = location_info:new({ text = "Flag Room", team = Team.kRed }) +location_red_pit = location_info:new({ text = "Flag Room Pit", team = Team.kRed }) +location_red_flag_room_catwalk = location_info:new({ text = "Flag Room Catwalks", team = Team.kRed }) +location_red_water_tunnel = location_info:new({ text = "Water Tunnel", team = Team.kRed }) +location_red_yard = location_info:new({ text = "Yard", team = Team.kRed }) + +location_river = location_info:new({ text = "River", team = Team.kUnassigned }) +location_midmap = location_info:new({ text = "Midmap", team = Team.kUnassigned }) +location_bridge = location_info:new({ text = "Bridge", team = Team.kUnassigned }) + +----------------------------------------------------------------------------- +-- OFFENSIVE AND DEFENSIVE SPAWNS +----------------------------------------------------------------------------- + +red_o_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kDemoman))) end +red_d_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false))) end + +red_ospawn = { validspawn = red_o_only } +red_dspawn = { validspawn = red_d_only } + +blue_o_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kDemoman))) end +blue_d_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false))) end + +blue_ospawn = { validspawn = blue_o_only } +blue_dspawn = { validspawn = blue_d_only } + +----------------------------------------------------------------------------- +-- respawn shields +----------------------------------------------------------------------------- + +KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) + +function KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) +red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) diff --git a/maps/ff_monkey.txt b/maps/ff_monkey.txt new file mode 100644 index 0000000..48abf2f --- /dev/null +++ b/maps/ff_monkey.txt @@ -0,0 +1,7 @@ +CAPTURE THE FLAG + +Grab the enemy flag and take it to your capture point to score. + +Original map designed by The Cheese + +Note: Not all Monkeys eat Bananas \ No newline at end of file diff --git a/maps/ff_napoli.lua b/maps/ff_napoli.lua new file mode 100644 index 0000000..f3b31c4 --- /dev/null +++ b/maps/ff_napoli.lua @@ -0,0 +1,425 @@ +IncludeScript("base_id"); +IncludeScript("base_respawnturret"); +----------------------------------------------------------------------------- +-- globals +FLAG_RETURN_TIME = 60; +INITIAL_ROUND_DELAY = 45; +TEAM_SWITCH_DELAY = 4 +NUM_PHASES = 3 +NONINITIAL_ROUND_DELAY = 45; +RESPAWN_AFTER_CAP = false +----------------------------------------------------------------------------- +function respawnall() + BroadCastMessage( "Area Captured. Respawning..." ) + ApplyToAll( { AT.kRespawnPlayers, AT.kRemoveBuildables } ) +end + +-- sounds, right? +function precache() + PrecacheSound("otherteam.flagstolen") + PrecacheSound("misc.bloop") +end + +-- startup +function startup() + SetGameDescription("Invade Defend") + + -- set up team limits + local team = GetTeam( Team.kBlue ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kRed ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kYellow ) + team:SetPlayerLimit( -1 ) + + team = GetTeam( Team.kGreen ) + team:SetPlayerLimit( -1 ) + + + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + + local team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kSniper, -1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + team:SetClassLimit(Player.kSniper, -1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + -- start the timer for the points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_DELAY - 30 , schedulemessagetoall, "Gates open in 30 seconds!" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_DELAY - 10 , schedulemessagetoall, "Gates open in 10 seconds!" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_DELAY - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_DELAY - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_DELAY - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_DELAY - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_DELAY - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_DELAY - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_DELAY - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_DELAY - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_DELAY - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_DELAY - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_DELAY - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_DELAY - 1 , schedulecountdown, 1 ) end + + cp1_flag.enabled = true + for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do + local flag = GetInfoScriptByName(v) + if flag then + flag:SetModel(_G[v].model) + flag:SetSkin(teamskins[attackers]) + if i == 1 then + flag:Restore() + else + flag:Remove() + end + end + end + + flags_set_team( attackers ) + + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) +end + +-- overwriting these functions so that there aren't repeat messages +function round_30secwarn() end +function round_10secwarn() end + +-- Give everyone a full resupply, but strip secondary grenades and defender detpacks +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + + player:RemoveAmmo( Ammo.kGren2, 4 ) + + -- wtf, scout or med on d? are you mental? + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + local classt = "Scout" + if player:GetClass() == Player.kMedic then classt = "Medic" end + local id = player:GetId() + AddSchedule("force_changemessage"..id, 2, schedulechangemessage, player, "No "..classt.."s on defense. Autoswitching to Soldier." ) + AddSchedule("force_change"..id, 2.5, forcechange, player) + end + + if player:GetTeamId() == attackers then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) + --player:RemoveAmmo( Ammo.kManCannon, 1 ) + elseif player:GetTeamId() == defenders then + UpdateObjectiveIcon( player, DEFENDERS_OBJECTIVE_ENTITY ) + --player:RemoveAmmo( Ammo.kDetpack, 1 ) + end +end + +function base_id_cap:oncapture(player, item) + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") +--SmartSound(player, "vox.yourcap", "vox.yourcap", "vox.enemycap") + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) + + local flag_item = GetInfoScriptByName( item ) + RemoveHudItem( player, flag_item:GetName() ) + + -- turn off this flag + for i,v in ipairs(self.item) do + _G[v].enabled = nil + local flag = GetInfoScriptByName(v) + if flag then + flag:Remove() + end + end + + if phase == NUM_PHASES then + -- it's the last round. end and stuff + phase = 1 + + OutputEvent( "start_gate", "Close" ) + + AddSchedule("switch_teams", TEAM_SWITCH_DELAY, switch_teams) + else + if phase == 1 then + AddSchedule( "cp2partition", 5, OutputEvent, "cp2_partition", "Disable" ) + AddSchedule( "cp3partition", 5, OutputEvent, "cp3_partition", "Enable" ) + end + if phase == 2 then + AddSchedule( "cp2partition", 5, OutputEvent, "cp2_partition", "Enable" ) + AddSchedule( "cp3partition", 5, OutputEvent, "cp3_partition", "Disable" ) + AddSchedule( "cp3areaportal", 5, OutputEvent, "cp3_areaportal", "Toggle" ) + end + AddSchedule("respawnall", 5, respawnall) + phase = phase + 1 + + -- enable the next flag after a time + AddSchedule("flag_start", ROUND_DELAY, flag_start, self.next) + if ROUND_DELAY > 30 then AddSchedule("flag_30secwarn", ROUND_DELAY-30, flag_30secwarn) end + if ROUND_DELAY > 10 then AddSchedule("flag_10secwarn", ROUND_DELAY-10, flag_10secwarn) end + + OutputEvent( "start_gate", "Close" ) + setup_door_timer("start_gate", NONINITIAL_ROUND_DELAY) + + -- clear objective icon + ATTACKERS_OBJECTIVE_ENTITY = nil + if DEFENDERS_OBJECTIVE_ONFLAG or DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = nil + else DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_tobase_timer() + update_hud() + end + +end + +function switch_teams() + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + else + attackers = Team.kBlue + defenders = Team.kRed + end + + -- set all flag teams to new attackers + flags_set_team( attackers ) + + -- enable the first flag + cp1_flag.enabled = true + cp1_flag.status = 0 + local flag = GetInfoScriptByName("cp1_flag") + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + -- reset the timer on points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + -- respawn the players + RespawnAllPlayers() + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + -- run custom round reset stuff + onroundreset() + update_hud() + + OutputEvent( "point_template", "ForceSpawn" ) + OutputEvent( "cp3_areaportal", "Toggle" ) +end + +----------------------------------------------------------------------------- +-- Scheduled functions that do stuff +----------------------------------------------------------------------------- + +-- Sends a message to all after the determined time +function schedulechangemessage( player, message ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + BroadCastMessageToPlayer( player, message ) + end +end + +-- force a scout/med to switch to soli if they haven't +function forcechange( player ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + ApplyToPlayer( player, { AT.kChangeClassSoldier, AT.kRespawnPlayers } ) + end +end + +--------------------------------------------------------------------------- +--Turrets +------------------------------------------------------------ + +respawnturret_attackers = base_respawnturret:new({ team = attackers }) +respawnturret_defenders = base_respawnturret:new({ team = defenders }) + +--------------------- +--Backpacks +--------------------- +genpack = genericbackpack:new({ + health = 35, + armor = 50, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + cells = 120, + mancannons = 1, + gren1 = 0, + gren2 = 0, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function genpack:dropatspawn() return false +end + +genpack_grenpack = genericbackpack:new({ + health = 35, + armor = 50, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + cells = 120, + mancannons = 1, + gren1 = 2, + gren2 = 1, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +function genpack_grenpack:dropatspawn() return false +end + +---------------------------------------------------- +--Toggle Cap points +--------------------------------------------------- +function cp1_cap:ontouch( trigger_entity ) + OutputEvent( "cp1_door", "Toggle" ) + +end +function cp2_cap:ontouch( trigger_entity ) + OutputEvent( "cp2_door", "Toggle" ) + +end +function cp3_cap:ontouch( trigger_entity ) + OutputEvent( "cp3_door", "Toggle" ) + +end +function cp4_cap:ontouch( trigger_entity ) + OutputEvent( "cp4_door", "Toggle" ) + +end + +---------------------------------------------------- +--Random schedule functions +--------------------------------------------------- +-- Sends a message to all after the determined time +function schedulemessagetoall( message ) + BroadCastMessage( message ) +end + +-- Plays a sound to all after the determined time +function schedulesound( sound ) + BroadCastSound( sound ) +end + + +function schedulecountdown( time ) + BroadCastMessage( ""..time.."" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +function round_start(doorname) + BroadCastMessage("Gates are now open!") + OpenDoor(doorname) + + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) +end + +--------------------------------------- +--Resetting round +------------------------------------ +detpack_wall_open = nil + +function onroundreset() + -- close the door + if detpack_wall_open then + -- there's no "close".. wtf + OutputEvent("detpack_hole", "Toggle") + detpack_wall_open = nil + end + -- Reset The Turrets + respawnturret_attackers = base_respawnturret:new({ team = attackers }) + respawnturret_defenders = base_respawnturret:new({ team = defenders }) + + -- reset them limits + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + + team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, 0) + team:SetClassLimit(Player.kMedic, 0) + + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_DELAY - 30 , schedulemessagetoall, "Gates open in 30 seconds!" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_DELAY - 10 , schedulemessagetoall, "Gates open in 10 seconds!" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_DELAY - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_DELAY - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_DELAY - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_DELAY - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_DELAY - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_DELAY > 30 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_DELAY - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_DELAY - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_DELAY > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_DELAY - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_DELAY > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_DELAY - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_DELAY > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_DELAY - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_DELAY > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_DELAY - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_DELAY > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_DELAY - 1 , schedulecountdown, 1 ) end +end + +detpack_trigger = trigger_ff_script:new({}) +function detpack_trigger:onexplode( trigger_entity ) + if IsDetpack( trigger_entity ) then + BroadCastMessage("The detpack wall has been blown open!") + BroadCastSound( "otherteam.flagstolen" ) + OutputEvent("detpack_hole", "Toggle") + OutputEvent("break1", "PlaySound") + detpack_wall_open = true + end + return EVENT_ALLOWED +end + +-- Don't want any body touching/triggering it except the detpack +function trigger_detpackable_door:allowed( trigger_entity ) return EVENT_DISALLOWED +end + + diff --git a/maps/ff_openfire.lua b/maps/ff_openfire.lua new file mode 100644 index 0000000..3e31b4e --- /dev/null +++ b/maps/ff_openfire.lua @@ -0,0 +1,251 @@ +-- ff_openfire.lua +-- based on aardvark 15/09/07 + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base"); +IncludeScript("base_ctf"); +IncludeScript("base_location"); + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- +POINTS_PER_CAPTURE = 10; +FLAG_RETURN_TIME = 60; + +----------------------------------------------------------------------------- +-- unique openfire locations +----------------------------------------------------------------------------- +location_redspawn = location_info:new({ text = "Respawn", team = Team.kRed }) +location_redsec = location_info:new({ text = "Fire Control", team = Team.kRed }) +location_redfr = location_info:new({ text = "Flag Room", team = Team.kRed }) +location_redwater = location_info:new({ text = "Perilous Passage", team = Team.kRed }) +location_redfrontdoor = location_info:new({ text = "Front Door Corridor", team = Team.kRed }) +location_redbalcony = location_info:new({ text = "Balcony", team = Team.kRed }) + +location_bluespawn = location_info:new({ text = "Respawn", team = Team.kBlue }) +location_bluesec = location_info:new({ text = "Fire Control", team = Team.kBlue }) +location_bluefr = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_bluewater = location_info:new({ text = "Perilous Passage", team = Team.kBlue }) +location_bluefrontdoor = location_info:new({ text = "Front Door Corridor", team = Team.kBlue }) +location_bluebalcony = location_info:new({ text = "Balcony", team = Team.kBlue }) + +location_midmap = location_info:new({ text = "Outside", team = NO_TEAM }) + +----------------------------------------------------------------------------- +-- bagless resupply +----------------------------------------------------------------------------- +aardvarkresup = trigger_ff_script:new({ team = Team.kUnassigned }) + +function aardvarkresup:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == self.team then + player:AddHealth( 400 ) + player:AddArmor( 400 ) + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + end + end +end + +blue_aardvarkresup = aardvarkresup:new({ team = Team.kBlue }) +red_aardvarkresup = aardvarkresup:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- aardvark security +----------------------------------------------------------------------------- +red_aardvarksec = trigger_ff_script:new() +blue_aardvarksec = trigger_ff_script:new() +bluesecstatus = 1 +redsecstatus = 1 + +sec_iconx = 60 +sec_icony = 30 +sec_iconw = 16 +sec_iconh = 16 + +function red_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + if redsecstatus == 1 then + redsecstatus = 0 + AddSchedule("aardvarksecup10red",20,aardvarksecup10red) + AddSchedule("aardvarksecupred",30,aardvarksecupred) + OpenDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_REDDOWN" ) + RemoveHudItemFromAll( "red-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end + end + end +end + +function blue_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kRed then + if bluesecstatus == 1 then + bluesecstatus = 0 + AddSchedule("aardvarksecup10blue",20,aardvarksecup10blue) + AddSchedule("aardvarksecupblue",30,aardvarksecupblue) + OpenDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_30") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_BLUEDOWN" ) + RemoveHudItemFromAll( "blue-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + end + end +end + +function aardvarksecupred() + redsecstatus = 1 + CloseDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_ON") + SpeakAll( "SD_REDUP" ) + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) +end + +function aardvarksecupblue() + bluesecstatus = 1 + CloseDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_ON") + SpeakAll( "SD_BLUEUP" ) + RemoveHudItemFromAll( "blue-sec-down" ) + AddHudIconToAll( "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) +end + +function aardvarksecup10red() + BroadCastMessage("#FF_RED_SEC_10") +end + +function aardvarksecup10blue() + BroadCastMessage("#FF_BLUE_SEC_10") +end + +----------------------------------------------------------------------------- +-- aardvark lasers and respawn shields +----------------------------------------------------------------------------- +KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) +lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) + +function KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function lasers_KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + if self.team == Team.kBlue then + if redsecstatus == 1 then + return EVENT_ALLOWED + end + end + if self.team == Team.kRed then + if bluesecstatus == 1 then + return EVENT_ALLOWED + end + end + end + end + return EVENT_DISALLOWED +end + +blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) +red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) +sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue }) +sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed }) + +------------------------- +-- flaginfo +------------------------- +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + flaginfo_base(player_entity) --basic CTF HUD items + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if bluesecstatus == 1 then + AddHudIcon( player, "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + else + AddHudIcon( player, "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + + if redsecstatus == 1 then + AddHudIcon( player, "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + else + AddHudIcon( player, "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end +end + +----------------------------------------------------------------------------- +-- custom openfire pack +----------------------------------------------------------------------------- +aardvarkpack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 400, + nails = 400, + shells = 400, + rockets = 400, + cells = 130, + respawntime = 8, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function aardvarkpack:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- backpack entity setup (modified for aardvarkpack) +----------------------------------------------------------------------------- +function build_backpacks(tf) + return healthkit:new({touchflags = tf}), + armorkit:new({touchflags = tf}), + ammobackpack:new({touchflags = tf}), + bigpack:new({touchflags = tf}), + grenadebackpack:new({touchflags = tf}), + aardvarkpack:new({touchflags = tf}) +end + +blue_healthkit, blue_armorkit, blue_ammobackpack, blue_bigpack, blue_grenadebackpack, blue_aardvarkpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kBlue}) +red_healthkit, red_armorkit, red_ammobackpack, red_bigpack ,red_grenadebackpack, red_aardvarkpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kRed}) +yellow_healthkit, yellow_armorkit, yellow_ammobackpack, yellow_bigpack, yellow_grenadebackpack, yellow_aardvarkpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kYellow}) +green_healthkit, green_armorkit, green_ammobackpack, green_bigpack, green_grenadebackpack, green_aardvarkpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kGreen}) + +----------------------------------------------------------------------------- +-- SPAWNS +----------------------------------------------------------------------------- +red_o_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kSniper))) end +red_d_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false) and ((player:GetClass() == Player.kSniper) == false))) end + +redspawn_balc = { validspawn = red_o_only } +redspawn_fr = { validspawn = red_d_only } + +blue_o_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kSniper))) end +blue_d_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false) and ((player:GetClass() == Player.kSniper) == false))) end + +bluespawn_balc = { validspawn = blue_o_only } +bluespawn_fr = { validspawn = blue_d_only } diff --git a/maps/ff_palermo.lua b/maps/ff_palermo.lua new file mode 100644 index 0000000..7be1338 --- /dev/null +++ b/maps/ff_palermo.lua @@ -0,0 +1,189 @@ + +-- ff_palermo.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- + +IncludeScript("base_id_new"); +IncludeScript("base_respawnturret"); +IncludeScript("base_location"); + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +function startup() + id_startup() + + -- lower trigger_hurt damage in water + OutputEvent( "trigger_hurt", "SetDamage", "42" ) +end + +palammopack = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 100, + rockets = 15, + cells = 70, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) +palgrenadepackone = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + mancannons = 1, + gren1 = 2, + gren2 = 1, + armor = 50, + health = 25, + respawntime = 30, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) +attackers_palgrenadepackone = idbackpack:new({ + team = attackers, + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + mancannons = 1, + gren1 = 2, + gren2 = 1, + armor = 50, + health = 25, + respawntime = 30, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) +palammotypeone = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 75, + armor = 50, + health = 25, + respawntime = 7, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) +attackers_palammotypeone = idbackpack:new({ + team = attackers, + grenades = 20, + nails = 50, + shells = 50, + rockets = 20, + cells = 75, + armor = 50, + health = 25, + respawntime = 7, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch" +}) + +--This is called from base_id to do map-specific stuff +function onroundreset() + -- close the holes + OutputEvent("cp1_detpack_hole", "Enable") + OutputEvent("cp4_detpack_hole", "Enable") + --re-enable detpack relays + OutputEvent("cp1_detpack_relay", "Enable") + OutputEvent("cp4_detpack_relay", "Enable") + -- Reset The Turrets(?) and Bags + respawnturret_attackers = base_respawnturret:new({ team = attackers }) + respawnturret_defenders = base_respawnturret:new({ team = defenders }) + + attackers_palammotypeone.team = attackers + attackers_palgrenadepackone.team = attackers + + +end + +bellbutton = func_button:new({}) +function bellbutton:ondamage() return true end + +--------------------------- +--Detpack shit +--------------------------- + +detpack_trigger = trigger_ff_script:new({ prefix = "" }) + +function detpack_trigger:onexplode( trigger_entity ) + if IsDetpack( trigger_entity ) then + local detpack = CastToDetpack( trigger_entity ) + if detpack:GetTeamId() == attackers then + --This triggers a logic_relay in the map, which opens the hole and can trigger any other effect. + OutputEvent( self.prefix .. "_detpack_relay", "Trigger" ) + end + end + return EVENT_ALLOWED +end + +--The detpack trigger names. Only attakers can activate them. +--Prefix is used so each detpack area can have a different effect. +cp1_detpack_trigger = detpack_trigger:new({ prefix = "cp1" }) +cp4_detpack_trigger = detpack_trigger:new({ prefix = "cp4" }) + +--------------------------------------------------- +--Respawn the player if they go too far out to sea. +--------------------------------------------------- +out_of_bounds = trigger_ff_script:new({}) + +function out_of_bounds:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return EVENT_ALLOWED + end + return EVENT_DISALLOWED +end + +function out_of_bounds:ontrigger( triggering_entity ) + if IsPlayer( triggering_entity ) then + local player = CastToPlayer( triggering_entity ) + ApplyToPlayer( player, { AT.kRespawnPlayers } ) + end +end + +cp1_detpack_trigger_hint = trigger_ff_script:new({}) + +function cp1_detpack_trigger_hint:ontrigger( triggering_entity ) + if IsPlayer( triggering_entity ) then + local player = CastToPlayer( triggering_entity ) + DisplayMessage( player, "A demoman on the attacking team can open this passage by laying a detpack here." ) + end +end + +cp4_detpack_trigger_hint = cp1_detpack_trigger_hint +------------------------------------------ +--return the flag if it goes in the water. +------------------------------------------ +--hijacking this base_id function to add in the last line +function setup_return_timer() + RemoveSchedule( "timer_tobase_schedule" ) + current_timer = FLAG_RETURN_TIME + + AddScheduleRepeatingNotInfinitely( "timer_return_schedule", 1, timer_schedule, current_timer) + + --five seconds should be enough time to check. + AddSchedule( "water_check", 5, check_flag_position) +end + + +function check_flag_position() + local flag = GetInfoScriptByName(current_flag) + local o = flag:GetOrigin() + + -- -256 is Palermo's sea level + if o.z < -256 then + flag:Return() + BroadCastMessage("The flag was lost at sea and has returned.") + end +end \ No newline at end of file diff --git a/maps/ff_palermo.txt b/maps/ff_palermo.txt new file mode 100644 index 0000000..a91a943 --- /dev/null +++ b/maps/ff_palermo.txt @@ -0,0 +1,21 @@ +INVADE AND DEFEND + +Objective: + +Blue team starts as the attacker. Red team +starts as the defender. + +The attacking team must take control of the +town by pushing through and capping the four +Command Points sequentially. The defending +team simply tries to hold out as long as they +can. Once the attackers succeed, teams swap, +and play begins again. + +Command Points are captured by taking the flag +from the previous point and carrying it to the +next. When a Command Point is secured, the flag +required to capture the next Command Point +appears on top of it. For example, the flag +needed to capture Command Point 3 will always +spawn at Command Point 2. \ No newline at end of file diff --git a/maps/ff_push.lua b/maps/ff_push.lua new file mode 100644 index 0000000..f564e83 --- /dev/null +++ b/maps/ff_push.lua @@ -0,0 +1,48 @@ +-- ff_push.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_push"); + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- + +local orig_startup = startup + +function startup() + -- set up team names. Localisation? + SetTeamName( Team.kBlue, "Ball Locks" ) + SetTeamName( Team.kRed, "Rocket Expediting" ) + + orig_startup() +end + +----------------------------------------------------------------------------- +-- triggers for doors +----------------------------------------------------------------------------- +red_respawn_triggerA = respawndoor:new({ team = Team.kRed }) +red_respawn_triggerB = respawndoor:new({ team = Team.kRed }) + +blue_respawn_triggerA = respawndoor:new({ team = Team.kBlue }) +blue_respawn_triggerB = respawndoor:new({ team = Team.kBlue }) + + +----------------------------------------------------------------------------- +-- unique push locations +----------------------------------------------------------------------------- +location_blue_corridor = location_info:new({ text = "Corridor", team = Team.kBlue }) +location_red_corridor = location_info:new({ text = "Corridor", team = Team.kRed }) + +location_blue_lasers = location_info:new({ text = "Lasers", team = Team.kBlue }) +location_red_lasers = location_info:new({ text = "Lasers", team = Team.kRed }) + +location_blue_side_warehouse = location_info:new({ text = "Side Warehouse", team = Team.kBlue }) +location_red_side_warehouse = location_info:new({ text = "Side Warehouse", team = Team.kRed }) + +location_blue_loading_bay = location_info:new({ text = "Loading Bay", team = Team.kBlue }) +location_red_loading_bay = location_info:new({ text = "Loading Bay", team = Team.kRed }) + +location_middle_warehouse = location_info:new({ text = "Middle Warehouse", team = Team.kUnassigned }) + diff --git a/maps/ff_push.txt b/maps/ff_push.txt new file mode 100644 index 0000000..f2975b4 --- /dev/null +++ b/maps/ff_push.txt @@ -0,0 +1,4 @@ +PUSH SCORING + +Objective: Grab the ball from the centre warehouse and then run it to the enemy company's loading zone! Capture it on the raised platform. +The team with the most captures at the end of the game wins! \ No newline at end of file diff --git a/maps/ff_push_soundscapes.txt b/maps/ff_push_soundscapes.txt new file mode 100644 index 0000000..a9a6660 --- /dev/null +++ b/maps/ff_push_soundscapes.txt @@ -0,0 +1,211 @@ +// Push soundscape file +// Author: Defrag +// Some sections based on existing valve soundscapes but modified + +// generic outside sound +"ff.outside" +{ + // constant wind base + "playlooping" + { + "volume" "0.2" + "pitch" "100" + "wave" "ambient/wind/ff_wasteland_wind.wav" + } + + // Wind gusts (based on cliffe's cs_assault settings) + "playrandom" + { + "time" "20,30" + "volume" "0.3,0.4" + "pitch" "90,110" + + "rndwave" + { + "wave" "ambient/wind/wind_snippet1.wav" + "wave" "ambient/wind/wind_snippet2.wav" + "wave" "ambient/wind/wind_snippet3.wav" + "wave" "ambient/wind/wind_snippet4.wav" + "wave" "ambient/wind/wind_snippet5.wav" + } + } +} + // Rats. Ach, gash! +"push.rats" +{ + "playrandom" + { + "time" "20,30" + "volume" "0.3,0.5" + "pitch" "90,100" + "position" "random" + "soundlevel" "SNDLVL_140db" + + "rndwave" + { + "wave" "ambient/creatures/rats1.wav" + "wave" "ambient/creatures/rats2.wav" + "wave" "ambient/creatures/rats3.wav" + "wave" "ambient/creatures/rats4.wav" + } + } +} + + // workshop noises +"push.workshop" +{ + "playrandom" + { + "time" "30,60" + "volume" "0.1,0.2" + "pitch" "90,110" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/push/airhose.wav" + "wave" "ambient/push/airwrench1.wav" + "wave" "ambient/push/airwrench2.wav" + } + } +} +// outside area between the central warehouse and the base corridor +"push.outside" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playsoundscape" + { + "name" "ff.outside" + "volume" "1.0" + } +} + +// capture point area +"push.capturepoint" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playsoundscape" + { + "name" "ff.outside" + "volume" "1.0" + } + + // train going past + "playrandom" + { + "time" "120,180" + "volume" "0.3" + "pitch" "100" + + "rndwave" + { + "wave" "ambient/machines/train_rumble.wav" + } + } +} + + +// side warehouse with no roof +"push.sidewarehouse" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playsoundscape" + { + "name" "ff.outside" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "push.rats" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "push.workshop" + "volume" "1.0" + } +} + +// respawn +"push.respawn" +{ + "dsp" "1" + "dsp_volume" "0.5" + + // General ambient noise + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/push/inside_amb1.wav" + } + + "playrandom" + { + "time" "30,60" + "volume" "0.3,0.5" + "pitch" "90,100" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/materials/metal4.wav" + "wave" "ambient/materials/rustypipes1.wav" + "wave" "ambient/materials/rustypipes2.wav" + } + } +} + +// main warehouse in centre +"push.centralwarehouse" +{ + "dsp" "1" + "dsp_volume" "0.5" + + // General ambient noise + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "wave" "ambient/push/inside_amb1.wav" + } + + "playsoundscape" + { + "name" "push.workshop" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "ff.outside" + "volume" "0.6" + } +} + +// doughnut shaped hallway that connects the respawn, cap point, side warehouse etc. +"push.doughnut" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playsoundscape" + { + "name" "push.respawn" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "ff.outside" + "volume" "0.6" + } +} \ No newline at end of file diff --git a/maps/ff_schtop.lua b/maps/ff_schtop.lua new file mode 100644 index 0000000..9447cbf --- /dev/null +++ b/maps/ff_schtop.lua @@ -0,0 +1,250 @@ +----------------------------------------------------------------------------------------------------------------------------- +-- INCLUDES +----------------------------------------------------------------------------------------------------------------------------- + +IncludeScript("base_shutdown"); +IncludeScript("base_location"); + +----------------------------------------------------------------------------------------------------------------------------- +-- CONSTANT! +-- I don't recommend changing this, as the in-game timer (above the FR door) will not change along with it. +-- Behaviour is undefined for values <= 10 +----------------------------------------------------------------------------------------------------------------------------- + +SECURITY_LENGTH = 40 + +----------------------------------------------------------------------------------------------------------------------------- +-- LOCATIONS +----------------------------------------------------------------------------------------------------------------------------- + +location_blue_flagroom = location_info:new({ text = "Flag Room", team = Team.kBlue }) +location_blue_window = location_info:new({ text = "Security Window", team = Team.kBlue }) +location_blue_security = location_info:new({ text = "Security Area", team = Team.kBlue }) +location_blue_courtyard = location_info:new({ text = "Main Courtyard", team = Team.kBlue }) +location_blue_rampside = location_info:new({ text = "Ramp Side", team = Team.kBlue }) +location_blue_secside = location_info:new({ text = "Security Side", team = Team.kBlue }) +location_blue_frontdoor = location_info:new({ text = "Front Door", team = Team.kBlue }) +location_blue_water = location_info:new({ text = "Water Area", team = Team.kBlue }) +location_blue_spawn = location_info:new({ text = "Team Respawn", team = Team.kBlue }) + +location_red_flagroom = location_info:new({ text = "Flag Room", team = Team.kRed }) +location_red_window = location_info:new({ text = "Security Window", team = Team.kRed }) +location_red_security = location_info:new({ text = "Security Area", team = Team.kRed }) +location_red_courtyard = location_info:new({ text = "Main Courtyard", team = Team.kRed }) +location_red_rampside = location_info:new({ text = "Ramp Side", team = Team.kRed }) +location_red_secside = location_info:new({ text = "Security Side", team = Team.kRed }) +location_red_frontdoor = location_info:new({ text = "Front Door", team = Team.kRed }) +location_red_water = location_info:new({ text = "Water Area", team = Team.kRed }) +location_red_spawn = location_info:new({ text = "Team Respawn", team = Team.kRed }) + +location_yard = location_info:new({ text = "Yard", team = Team.kUnassigned }) + + +----------------------------------------------------------------------------- +-- TOUCH RESUP +-- Brush volume which gives players health, ammo, etc... +-- Pretty much taken from ff_.lua +----------------------------------------------------------------------------- + +touch_resup = trigger_ff_script:new({ team = Team.kUnassigned }) + +function touch_resup:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == self.team then + player:AddHealth( 400 ) + player:AddArmor( 400 ) + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + end + end +end + +blue_touch_resup = touch_resup:new({ team = Team.kBlue }) +red_touch_resup = touch_resup:new({ team = Team.kRed }) + +----------------------------------------------------------------------------------------------------------------------------- +-- WINDOWPACK +-- Team-specific packs which are located near the window where players can throw the flag out. +----------------------------------------------------------------------------------------------------------------------------- + +windowpack = genericbackpack:new({ + health = 50, + armor = 50, + + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 130, + + gren1 = 0, + gren2 = 0, + + respawntime = 8, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) +function windowpack:dropatspawn() return false end + +blue_windowpack = windowpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue } }) +red_windowpack = windowpack:new({ touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed } }) + +----------------------------------------------------------------------------- +-- SPAWN PROTECTION +-- kills those who wander into the enemy spawn +----------------------------------------------------------------------------- + +spawn_protection = trigger_ff_script:new({ team = Team.kUnassigned }) + +function spawn_protection:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +red_spawn_protection = spawn_protection:new({ team = Team.kBlue }) +blue_spawn_protection = spawn_protection:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- OFFENSIVE AND DEFENSIVE SPAWNS +-- Medic, Spy, and Scout spawn in the offensive spawns, other classes spawn in the defensive spawn, +-- Copied from ff_session.lua +----------------------------------------------------------------------------- + +red_o_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kEngineer))) end +red_d_only = function(self,player) return ((player:GetTeamId() == Team.kRed) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false) and ((player:GetClass() == Player.kEngineer) == false))) end + +red_ospawn = { validspawn = red_o_only } +red_dspawn = { validspawn = red_d_only } + +blue_o_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and ((player:GetClass() == Player.kScout) or (player:GetClass() == Player.kMedic) or (player:GetClass() == Player.kSpy) or (player:GetClass() == Player.kEngineer))) end +blue_d_only = function(self,player) return ((player:GetTeamId() == Team.kBlue) and (((player:GetClass() == Player.kScout) == false) and ((player:GetClass() == Player.kMedic) == false) and ((player:GetClass() == Player.kSpy) == false) and ((player:GetClass() == Player.kEngineer) == false))) end + +blue_ospawn = { validspawn = blue_o_only } +blue_dspawn = { validspawn = blue_d_only } + +----------------------------------------------------------------------------- +-- AND THEN, SOME MORE STUFF... +----------------------------------------------------------------------------- + +red_sec = trigger_ff_script:new() +blue_sec = trigger_ff_script:new() +bluesecstatus = 1 +redsecstatus = 1 + +sec_iconx = 60 +sec_icony = 30 +sec_iconw = 16 +sec_iconh = 16 + +function red_sec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + if redsecstatus == 1 then + redsecstatus = 0 + AddSchedule("secup10red", SECURITY_LENGTH - 10, secup10red) + AddSchedule("beginclosered", SECURITY_LENGTH - 6, beginclosered) + AddSchedule("secupred",SECURITY_LENGTH,secupred) + OpenDoor("red_secdoor") + BroadCastMessage("#FF_RED_SEC_40") + SpeakAll( "SD_REDDOWN" ) + RemoveHudItemFromAll( "red-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end + end + end +end + +function blue_sec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kRed then + if bluesecstatus == 1 then + bluesecstatus = 0 + AddSchedule("secup10blue", SECURITY_LENGTH - 10, secup10blue) + AddSchedule("begincloseblue", SECURITY_LENGTH - 6, begincloseblue) + AddSchedule("secupblue",SECURITY_LENGTH,secupblue) + OpenDoor("blue_secdoor") + BroadCastMessage("#FF_BLUE_SEC_40") + SpeakAll( "SD_BLUEDOWN" ) + RemoveHudItemFromAll( "blue-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + end + end +end + +function secupred() + redsecstatus = 1 + BroadCastMessage("#FF_RED_SEC_ON") + SpeakAll( "SD_REDUP" ) + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) +end + +function begincloseblue() + CloseDoor("blue_secdoor") +end + +function beginclosered() + CloseDoor("red_secdoor") +end + +function secupblue() + bluesecstatus = 1 + BroadCastMessage("#FF_BLUE_SEC_ON") + SpeakAll( "SD_BLUEUP" ) + RemoveHudItemFromAll( "blue-sec-down" ) + AddHudIconToAll( "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) +end + +function secup10red() + BroadCastMessage("#FF_RED_SEC_10") +end + +function secup10blue() + BroadCastMessage("#FF_BLUE_SEC_10") +end + +grp = bigpack:new({ +materializesound="Item.Materialize", +gren1=4,gren2=4,model= +"models/items/backpack/backpack.mdl", +respawntime=1,touchsound="Backpack.Touch"}) +function grp:dropatspawn() return false end + +------------------------- +-- flaginfo +------------------------- +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + flaginfo_base(player_entity) --basic CTF HUD items + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if bluesecstatus == 1 then + AddHudIcon( player, "hud_secup_blue.vtf", "blue-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + else + AddHudIcon( player, "hud_secdown.vtf", "blue-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 2 ) + end + + if redsecstatus == 1 then + AddHudIcon( player, "hud_secup_red.vtf", "red-sec-up", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + else + AddHudIcon( player, "hud_secdown.vtf", "red-sec-down", sec_iconx, sec_icony, sec_iconw, sec_iconh, 3 ) + end +end diff --git a/maps/ff_schtop.txt b/maps/ff_schtop.txt new file mode 100644 index 0000000..97ce269 --- /dev/null +++ b/maps/ff_schtop.txt @@ -0,0 +1,7 @@ +ff_schtop + +Shut off the security devices protecting the enemy flag and +steal it from their base. Capture it in your own base. + +Each capture is worth 10 points for your team. +The team with the most points at the end of the round wins. \ No newline at end of file diff --git a/maps/ff_schtop_soundscapes.txt b/maps/ff_schtop_soundscapes.txt new file mode 100644 index 0000000..2941bb6 --- /dev/null +++ b/maps/ff_schtop_soundscapes.txt @@ -0,0 +1,200 @@ +//////////////////////////////////////////////// +// FF_SCHTOP SOUNDSCAPES +// Modified ff_session soundscape file. +// +// GENERIC +// WATER +// YARD +// +//////////////////////////////////////////////// + +//////////////////////////////////////////////// +// STRANGE AMBIENCE +// Utility soundscape for some digital-sounding ambience. +//////////////////////////////////////////////// + +"ff_schtop.strange_ambience" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/levels/citadel/field_loop3.wav" + "volume" "0.25" + "pitch" "100" + } + + "playlooping" + { + "wave" "hl1/ambience/techamb2.wav" + "volume" "0.25" + "pitch" "100" + } + + "playlooping" + { + "wave" "hl1/ambience/alien_blipper.wav" + "volume" "0.25" + "pitch" "100" + } + + "playlooping" + { + "wave" "hl1/ambience/alien_cycletone.wav" + "volume" "0.25" + "pitch" "100" + } + + "playrandom" + { + "volume" "0.25,0.40" + "time" "5.0,15.0" + "pitch" "80,120" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/levels/prison/radio_random3.wav" + "wave" "ambient/levels/prison/radio_random7.wav" + "wave" "ambient/levels/canals/headcrab_canister_ambient3.wav" + "wave" "ambient/levels/citadel/portal_beam_shoot6.wav" + "wave" "ambient/machines/machine1_hit2.wav" + } + } + +} + +//////////////////////////////////////////////// +// GENERIC +// Some digital-sounding ambience and random wierd noises. +// Default soundscape. +//////////////////////////////////////////////// + + +"ff_schtop.generic" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/atmosphere/ff_ambience.wav" + "volume" "0.66" + "pitch" "100" + } + + "playlooping" + { + "wave" "ambient/push/inside_amb1.wav" + "volume" "0.33" + "pitch" "100" + } + + "playsoundscape" + { + "name" "ff_schtop.strange_ambience" + "volume" "0.66" + } + + "playrandom" + { + "volume" "0.15,0.30" + "time" "10.0,20.0" + "pitch" "50,150" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "weapons/physcannon/energy_sing_flyby1.wav" + "wave" "weapons/physcannon/energy_sing_flyby2.wav" + } + } +} + + +//////////////////////////////////////////////// +// YARD +// Outdoor wind ambience with random gusts. +//////////////////////////////////////////////// + + +"ff_schtop.yard" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/wind/ff_wasteland_wind.wav" + "volume" "0.8" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_windgusts" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "ff_schtop.strange_ambience" + "volume" "0.15" + } + + "playrandom" + { + "volume" "0.15,0.30" + "time" "7.0,14.0" + "pitch" "80,120" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/levels/citadel/strange_talk6.wav" + "wave" "ambient/levels/citadel/strange_talk7.wav" + "wave" "ambient/levels/citadel/strange_talk8.wav" + "wave" "ambient/levels/citadel/strange_talk9.wav" + "wave" "ambient/levels/citadel/strange_talk10.wav" + } + } + +} + + +//////////////////////////////////////////////// +// WATER +// Water running and random dripping ambience. +//////////////////////////////////////////////// + + +"ff_schtop.water" +{ + "dsp" "1" + + "playlooping" + { + "wave" "ambient/atmosphere/ambience5.wav" + "volume" "0.2" + "pitch" "100" + } + + "playlooping" + { + "wave" "ambient/levels/canals/waterleak_loop1.wav" + "volume" "0.3" + "pitch" "100" + } + + "playsoundscape" + { + "name" "d1_canals.util_drip" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "d1_canals.util_fardrips" + "volume" "1.0" + } +} + +//////////////////////////////////////////////// \ No newline at end of file diff --git a/maps/ff_shutdown2.lua b/maps/ff_shutdown2.lua new file mode 100644 index 0000000..7398138 --- /dev/null +++ b/maps/ff_shutdown2.lua @@ -0,0 +1,126 @@ +-- ff_shutdown2.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_shutdown"); + +----------------------------------------------------------------------------- +-- unique shutdown2 locations +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- aardvark security +----------------------------------------------------------------------------- +red_aardvarksec = trigger_ff_script:new() +blue_aardvarksec = trigger_ff_script:new() +bluesecstatus = 1 +redsecstatus = 1 + +function red_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + if redsecstatus == 1 then + redsecstatus = 0 + AddSchedule("aardvarksecup10red",50,aardvarksecup10red) + AddSchedule("aardvarksecupred",60,aardvarksecupred) + OpenDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_60") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_REDDOWN" ) + RemoveHudItemFromAll( "red-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "red-sec-down", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, 3 ) + end + end + end +end + +function blue_aardvarksec:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kRed then + if bluesecstatus == 1 then + bluesecstatus = 0 + AddSchedule("aardvarksecup10blue",50,aardvarksecup10blue) + AddSchedule("aardvarksecupblue",60,aardvarksecupblue) + OpenDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_60") + --BroadCastSound( "otherteam.flagstolen") + SpeakAll( "SD_BLUEDOWN" ) + RemoveHudItemFromAll( "blue-sec-up" ) + AddHudIconToAll( "hud_secdown.vtf", "blue-sec-down", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, 2 ) + end + end + end +end + +function aardvarksecupred() + redsecstatus = 1 + CloseDoor("red_aardvarkdoorhack") + BroadCastMessage("#FF_RED_SEC_ON") + SpeakAll( "SD_REDUP" ) + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( "hud_secup_red.vtf", "red-sec-up", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, 3 ) +end + +function aardvarksecupblue() + bluesecstatus = 1 + CloseDoor("blue_aardvarkdoorhack") + BroadCastMessage("#FF_BLUE_SEC_ON") + SpeakAll( "SD_BLUEUP" ) + RemoveHudItemFromAll( "blue-sec-down" ) + AddHudIconToAll( "hud_secup_blue.vtf", "blue-sec-up", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, 2 ) +end + +function aardvarksecup10red() + BroadCastMessage("#FF_RED_SEC_10") +end + +function aardvarksecup10blue() + BroadCastMessage("#FF_BLUE_SEC_10") +end + +------------------------- +-- flaginfo +------------------------- +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + flaginfo_base(player_entity) --basic CTF HUD items + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if bluesecstatus == 1 then + AddHudIcon( player, "hud_secup_blue.vtf", "blue-sec-up", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, 2 ) + else + AddHudIcon( player, "hud_secdown.vtf", "blue-sec-down", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, 2 ) + end + + if redsecstatus == 1 then + AddHudIcon( player, "hud_secup_red.vtf", "red-sec-up", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, 3 ) + else + AddHudIcon( player, "hud_secdown.vtf", "red-sec-down", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, 3 ) + end +end + +----------------------------------------------------------------------------- +-- respawn shields +----------------------------------------------------------------------------- +KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) + +function KILL_KILL_KILL:allowed( activator ) + local player = CastToPlayer( activator ) + if player then + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) +red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) diff --git a/maps/ff_shutdown2.txt b/maps/ff_shutdown2.txt new file mode 100644 index 0000000..9f9c4a0 --- /dev/null +++ b/maps/ff_shutdown2.txt @@ -0,0 +1,5 @@ +SHUTDOWN CAPTURE THE FLAG + +Objectives: +# Temporarily de-activate the enemy team's security systems by making your way to the security generator room and touching the switch. +# Once the lasers are de-activated, enter the flag room and steal the enemy flag! Return the enemy flag to your base to capture. The capture point is in the middle of the battlements. \ No newline at end of file diff --git a/maps/ff_shutdown2_level_sounds.txt b/maps/ff_shutdown2_level_sounds.txt new file mode 100644 index 0000000..72b85ac --- /dev/null +++ b/maps/ff_shutdown2_level_sounds.txt @@ -0,0 +1,32 @@ +"shutdown2.generatordown" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "0.5" + "wave" "ambient/shutdown/generator_down.wav" +} +"shutdown2.generatorup" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "0.5" + "wave" "ambient/shutdown/generator_up.wav" +} +"shutdown2.generatorhumloop1" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "0.5" + "wave" "ambient/shutdown/generator_hum_low.wav" +} +"shutdown2.generatorhumloop2" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "0.5" + "wave" "ambient/shutdown/generator_hum_high.wav" +} \ No newline at end of file diff --git a/maps/ff_shutdown2_soundscapes.txt b/maps/ff_shutdown2_soundscapes.txt new file mode 100644 index 0000000..be856ad --- /dev/null +++ b/maps/ff_shutdown2_soundscapes.txt @@ -0,0 +1,240 @@ +// Shutdown2 soundscape file +// Author: Defrag +// Some sections based on existing valve soundscapes but modified + +// Flag Room +"shutdown2.flagroom" +{ + "dsp" "1" + "dsp_volume" "0.6" + + // General ambient noise + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/atmosphere/ff_ambience.wav" + } + + "playrandom" + { + "time" "30,60" + "volume" "0.3,0.5" + "pitch" "90,100" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/materials/metal4.wav" + "wave" "ambient/materials/rustypipes1.wav" + "wave" "ambient/materials/rustypipes2.wav" + } + } + +} + +// Front door +"shutdown2.frontdoor" +{ + "dsp" "1" + "dsp_volume" "0.5" + "playsoundscape" + { + "name" "shutdown2.ramproom" + "volume" "0.7" + } + "playsoundscape" + { + "name" "shutdown2.yard" + "volume" "0.3" + } +} + +// Lift / Elevator +"shutdown2.lift" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playsoundscape" + { + "name" "shutdown2.topramp" + "volume" "0.5" + } + "playsoundscape" + { + "name" "shutdown2.flagroom" + "volume" "0.5" + } +} + +// Plank +"shutdown2.plank" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playsoundscape" + { + "name" "shutdown2.ramproom" + "volume" "0.2" + } + + "playsoundscape" + { + "name" "shutdown2.flagroom" + "volume" "0.6" + } + + "playrandom" + { + "time" "20,30" + "volume" "0.5, 0.8" + "pitch" "100" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/materials/rock1.wav" + "wave" "ambient/materials/rock2.wav" + "wave" "ambient/materials/rock3.wav" + "wave" "ambient/materials/rock4.wav" + "wave" "ambient/materials/rock5.wav" + } + } +} + +// Ramp Room +"shutdown2.ramproom" +{ + "dsp" "1" + "dsp_volume" "0.6" + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/tone_alley.wav" + } +} + +// Respawn Lower +"shutdown2.respawnlower" +{ + "dsp" "1" + "dsp_volume" "0.4" + "playsoundscape" + { + "name" "shutdown2.ramproom" + "volume" "0.6" + } +} +// Respawn Upper +"shutdown2.respawnupper" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playsoundscape" + { + "name" "shutdown2.topramp" + "volume" "0.6" + } +} + +// Switch Room +"shutdown2.switchroom" +{ + "playsoundscape" + { + "name" "shutdown2.topramp" + "volume" "1.0" + } + +} + +// Top Ramp +"shutdown2.topramp" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playsoundscape" + { + "name" "shutdown2.ramproom" + "volume" "0.2" + } + + "playsoundscape" + { + "name" "shutdown2.flagroom" + "volume" "0.6" + } +} + +// Train Tunnel +"shutdown2.traintunnel" +{ + "dsp" "1" + "dsp_volume" "0.8" + + + "playsoundscape" + { + "name" "shutdown2.ramproom" + "volume" "0.2" + } + + "playlooping" + { + "volume" "0.05" + "pitch" "100" + "wave" "ambient/atmosphere/undercity_loop1.wav" + } + + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/atmosphere/ff_ambience.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "wave" "ambient/water/drip_loop1.wav" + } + +} + +// Yard between two bases +"shutdown2.yard" +{ + "dsp" "1" + "dsp_volume" "0.4" + + // constant wind base + "playlooping" + { + "volume" "0.2" + "pitch" "100" + "wave" "ambient/wind/ff_wasteland_wind.wav" + } + + // Wind gusts (based on cliffe's cs_assault settings) + "playrandom" + { + "time" "20,30" + "volume" "0.3,0.4" + "pitch" "90,110" + + "rndwave" + { + "wave" "ambient/wind/wind_snippet1.wav" + "wave" "ambient/wind/wind_snippet2.wav" + "wave" "ambient/wind/wind_snippet3.wav" + "wave" "ambient/wind/wind_snippet4.wav" + "wave" "ambient/wind/wind_snippet5.wav" + } + } +} diff --git a/maps/ff_training.lua b/maps/ff_training.lua new file mode 100644 index 0000000..0e2d03b --- /dev/null +++ b/maps/ff_training.lua @@ -0,0 +1,1934 @@ +--------------------------------------------- +-- FF_Training +--------------------------------------------- + +IncludeScript("base_ctf") + +JUMP_TECHNIQUES = 1 +MOVEMENT = 2 +ALL_TOGETHER = 3 + +-- stage types +VERTICAL_JUMP = 1 +HORIZONTAL_JUMP = 2 +MISC_JUMP = 3 +MOVEMENT_STAGE = 4 +MOVEMENT_STAGE_START = 5 +MOVEMENT_STAGE_OTHER = 6 +ALL_TOGETHER_STAGE = 7 + +TIME_FOR_GOLD = 15 +TIME_FOR_SILVER = 20 +TIME_FOR_BRONZE = 25 + +stage_info = { + + [JUMP_TECHNIQUES] = { + technique_name = "Jump Techniques", + stages = { + [1] = { + stage_type = VERTICAL_JUMP, + stage_name = "Drop Concussion Jump", + stage_specific = "Vertical", + stage_checklist = "Vertical Drop Conc Jump", + stage_code = "v_conc", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Prime concussion gren:", + stage_key = "%+gren2% or %toggletwo%", + stage_limits = { + force_hhconc = false, + force_dropconc = true, + force_waterconc = true, + force_1pipe = false, + force_2pipe = false + } + }, + [2] = { + stage_type = HORIZONTAL_JUMP, + stage_name = "Drop Concussion Jump", + stage_specific = "Application", + stage_checklist = "Drop Conc Jump Application", + stage_code = "a_conc", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Prime concussion gren:", + stage_key = "%+gren2% or %toggletwo%", + stage_limits = { + force_hhconc = false, + force_dropconc = true, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + }, + [3] = { + stage_type = MISC_JUMP, + stage_name = "Concussion Jump", + stage_specific = "Water", + stage_checklist = "Water Conc Jump", + stage_code = "m_waterconc", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Prime concussion gren:", + stage_key = "%+gren2% or %toggletwo%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = true, + force_1pipe = false, + force_2pipe = false + } + }, + [4] = { + stage_type = VERTICAL_JUMP, + stage_name = "Hand-Held Concussion Jump", + stage_specific = "Vertical", + stage_checklist = "Vertical HH Conc Jump", + stage_code = "v_hhconc", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Prime concussion gren:", + stage_key = "%+gren2% or %toggletwo%", + stage_limits = { + force_hhconc = true, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + }, + [5] = { + stage_type = HORIZONTAL_JUMP, + stage_name = "Hand-Held Concussion Jump", + stage_specific = "Application", + stage_checklist = "HH Conc Jump Application", + stage_code = "a_hhconc", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Prime concussion gren:", + stage_key = "%+gren2% or %toggletwo%", + stage_limits = { + force_hhconc = true, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + }, + [6] = { + stage_type = VERTICAL_JUMP, + stage_name = "Rocket Jump", + stage_specific = "Vertical", + stage_checklist = "Vertical Rocket Jump", + stage_code = "v_rj", + stage_complete = false, + stage_class = Player.kSoldier, + stage_key_text = "Shoot rocket:", + stage_key = "%+attack%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + }, + [7] = { + stage_type = HORIZONTAL_JUMP, + stage_name = "Rocket Jump", + stage_specific = "Application", + stage_checklist = "Rocket Jump Application", + stage_code = "a_rj", + stage_complete = false, + stage_class = Player.kSoldier, + stage_key_text = "Shoot rocket:", + stage_key = "%+attack%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + }, + [8] = { + stage_type = VERTICAL_JUMP, + stage_name = "Pipe Jump", + stage_specific = "Vertical", + stage_checklist = "Vertical Pipe Jump", + stage_code = "v_pipe", + stage_complete = false, + stage_class = Player.kDemoman, + stage_key_text = "Det pipes:", + stage_key = "%+attack2%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = true + } + }, + [9] = { + stage_type = HORIZONTAL_JUMP, + stage_name = "Pipe Jump", + stage_specific = "Application", + stage_checklist = "Pipe Jump Application", + stage_code = "a_pipe", + stage_complete = false, + stage_class = Player.kDemoman, + stage_key_text = "Det pipes:", + stage_key = "%+attack2%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = false, + force_1pipe = true, + force_2pipe = false + } + }, + [10] = { + stage_type = HORIZONTAL_JUMP, + stage_name = "Flamethrower", + stage_specific = "Application", + stage_checklist = "Flamethrower", + stage_code = "a_ft", + stage_complete = false, + stage_class = Player.kPyro, + stage_key_text = "Shoot flamethrower:", + stage_key = "%+attack%", + stage_limits = { + force_hhconc = false, + force_dropconc = false, + force_waterconc = false, + force_1pipe = false, + force_2pipe = false + } + } + } + }, + + [MOVEMENT] = { + technique_name = "Movement Techniques", + stages = { + [1] = { + stage_type = MOVEMENT_STAGE, + stage_name = "Double Jump", + stage_specific = "Basics", + stage_checklist = "Double Jump", + stage_code = "move_doublejump", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Jump:", + stage_key = "%+jump%" + }, + [2] = { + stage_type = MOVEMENT_STAGE_START, + stage_name = "Air Control", + stage_specific = "Basics", + stage_checklist = "Air Control Basics", + stage_code = "move_aircontrol", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Strafe: %+moveleft% and %+moveright%", + stage_key = "Reset stage: %+use%" + }, + [3] = { + stage_type = MOVEMENT_STAGE, + stage_name = "Air Control", + stage_specific = "Jump", + stage_checklist = "Air Control Jump", + stage_code = "move_aircontrolpush", + stage_complete = false, + stage_class = Player.kScout, + stage_key = "" + }, + [4] = { + stage_type = MOVEMENT_STAGE_START, + stage_name = "Air Control", + stage_specific = "Gaining Speed", + stage_checklist = "Gaining Speed with Strafe", + stage_code = "move_aircontrolspeed", + stage_complete = false, + stage_class = Player.kScout, + stage_key = "" + }, + [5] = { + stage_type = MOVEMENT_STAGE_START, + stage_name = "Air Control", + stage_specific = "Bunnyhop Primer", + stage_checklist = "Bunnyhop Air Control", + stage_code = "move_aircontrolbhop", + stage_complete = false, + stage_class = Player.kScout, + stage_key = "" + }, + [6] = { + stage_type = MOVEMENT_STAGE_MULTIPLE, + stage_name = "Bunnyhop", + stage_specific = "Stepping Stones", + stage_checklist = "Bunnyhop", + stage_num_steps = 3, + stage_code = "move_bhop", + stage_complete = false, + stage_class = Player.kScout, + stage_key = "" + }, + [7] = { + stage_type = MOVEMENT_STAGE_START, + stage_name = "Rampslide", + stage_specific = "", + stage_checklist = "Rampslide", + stage_code = "move_rampslide", + stage_complete = false, + stage_class = Player.kScout, + stage_key = "" + }, + [8] = { + stage_type = MOVEMENT_STAGE_START, + stage_name = "Trimp", + stage_specific = "", + stage_checklist = "Trimp", + stage_code = "move_trimp", + stage_complete = false, + stage_class = Player.kScout, + stage_key_text = "Jump:", + stage_key = "%+jump%" + } + } + }, + + [ALL_TOGETHER] = { + technique_name = "Putting it All Together", + stages = { + [1] = { + stage_type = ALL_TOGETHER_STAGE, + stage_name = "Scout", + stage_specific = "Speed Run", + stage_checklist = "Scout Speed Run", + stage_code = "all_scout", + stage_complete = false, + stage_medal = 0, + stage_class = Player.kScout, + stage_key_text = "Reset:", + stage_key = "%+use%" + } + } + } +} + + +VERTICAL_JUMP_TOUCHED = 0 +VERTICAL_JUMP_BROADCASTED = 0 +VERTICAL_JUMP_MESSAGE = "What?" + +NUM_JUMP_QUEUES_NEEDED = 10 + +GIVE_GREN2 = false +GIVE_PIPES = false +GIVE_RPG = false + +TIMEOUT_REPLAY_TIME = 45 + +current_technique = JUMP_TECHNIQUES +current_stage = 1 +failed_attempts = 0 +best_run = nil +show_timer = false + + +-- startup +function startup() + SetGameDescription( "Training" ) + + SetTeamName( Team.kBlue, "Trainee" ) + + SetPlayerLimit( Team.kBlue, 1 ) + SetPlayerLimit( Team.kRed, -1 ) + SetPlayerLimit( Team.kYellow, -1 ) + SetPlayerLimit( Team.kGreen, -1 ) + + team = GetTeam( Team.kBlue ) + team:SetClassLimit( Player.kCivilian, 0 ) + + setup() + +end + +function setup() + + for i,v in ipairs(stage_info) do + for i2,v2 in ipairs(v.stages) do + _G[v2.stage_code.."_tele"] = base_tele:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_replay_btn"] = base_replay_btn:new({ technique_id = i, stage_number = i2 }) + if v2.stage_type == VERTICAL_JUMP then + _G[v2.stage_code] = v_jump:new({ technique_id = i, stage_number = i2 }) + elseif v2.stage_type == HORIZONTAL_JUMP then + _G[v2.stage_code] = a_jump:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_finish"] = a_finish:new({ technique_id = i, stage_number = i2 }) + elseif v2.stage_type == MISC_JUMP then + _G[v2.stage_code.."_start"] = m_jump_start:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code] = m_jump:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_finish"] = a_finish:new({ technique_id = i, stage_number = i2 }) + elseif v2.stage_type == MOVEMENT_STAGE then + _G[v2.stage_code] = move_room:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_init"] = move_init:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_finish"] = a_finish:new({ technique_id = i, stage_number = i2 }) + elseif v2.stage_type == MOVEMENT_STAGE_START then + _G[v2.stage_code] = move_area:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_start"] = move_start:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_init"] = move_init:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_finish"] = a_finish:new({ technique_id = i, stage_number = i2 }) + elseif v2.stage_type == MOVEMENT_STAGE_MULTIPLE then + for i3=1,v2.stage_num_steps do + _G[v2.stage_code..""..i3.."_replay_btn"] = base_replay_btn:new({ technique_id = i, stage_number = i2, step = i3 }) + _G[v2.stage_code..""..i3.."_tele"] = base_tele:new({ technique_id = i, stage_number = i2, step = i3 }) + _G[v2.stage_code..""..i3] = move_bhop_area:new({ technique_id = i, stage_number = i2, step = i3 }) + _G[v2.stage_code..""..i3.."_start"] = move_bhop_start:new({ technique_id = i, stage_number = i2, step = i3 }) + _G[v2.stage_code..""..i3.."_init"] = move_bhop_init:new({ technique_id = i, stage_number = i2, step = i3 }) + _G[v2.stage_code..""..i3.."_finish"] = move_bhop_finish:new({ technique_id = i, stage_number = i2, step = i3 }) + end + elseif v2.stage_type == ALL_TOGETHER_STAGE then + _G[v2.stage_code] = all_together_room:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_init"] = all_together_init:new({ technique_id = i, stage_number = i2 }) + _G[v2.stage_code.."_start"] = all_together_start:new({ technique_id = i, stage_number = i2 }) + else + --ChatToAll( "[SCRIPT] ERROR: no stage type defined for "..v2.stage_checklist ) + end + end + end + +end + +-- precache sounds +function precache() + for i,v in ipairs(stage_info) do + for i2,v2 in ipairs(v.stages) do + PrecacheSound("training."..v2.stage_code.."_start") + PrecacheSound("training."..v2.stage_code.."01") + PrecacheSound("training."..v2.stage_code.."02") + PrecacheSound("training."..v2.stage_code.."03") + PrecacheSound("training."..v2.stage_code.."04") + PrecacheSound("training."..v2.stage_code.."_timeout") + if v2.stage_num_steps ~= nil then + for i3=1,v2.stage_num_steps do + PrecacheSound("training."..v2.stage_code..i3.."_start") + end + end + if v2.stage_medal ~= nil then + PrecacheSound("training."..v2.stage_code.."_bronze") + PrecacheSound("training."..v2.stage_code.."_silver") + PrecacheSound("training."..v2.stage_code.."_gold") + end + end + end + + PrecacheSound("training.stage_complete") + PrecacheSound("training.all_complete") + PrecacheSound("training.intro") + + PrecacheSound("misc.bizwarn") + PrecacheSound("misc.bloop") + PrecacheSound("misc.buzwarn") + PrecacheSound("misc.dadeda") + PrecacheSound("misc.deeoo") + PrecacheSound("misc.doop") + PrecacheSound("misc.woop") + PrecacheSound("otherteam.flagstolen") +end + +function set_ammo( player_entity, ammo_type, amount ) + if IsPlayer( player_entity ) then + local player = CastToPlayer( player_entity ) + player:RemoveAmmo( ammo_type, 300 ) + player:AddAmmo( ammo_type, amount ) + end +end + +function reset_stock( player ) + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:RemoveAmmo( Ammo.kNails, 400 ) + player:RemoveAmmo( Ammo.kShells, 400 ) + player:RemoveAmmo( Ammo.kRockets, 400 ) + player:RemoveAmmo( Ammo.kCells, 400 ) + + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) +end + +function removeprimed( player_entity ) + if IsPlayer( player_entity ) then + local player = CastToPlayer( player_entity ) + + ApplyToPlayer( player, {AT.kStopPrimedGrens} ) + + BroadCastMessage( "You must drop the grenade!" ) + GIVE_GREN2 = true + end +end + +function add_timeout() + --ChatToAll( "[script] adding timeout schedule (time: "..TIMEOUT_REPLAY_TIME..")" ) + AddSchedule( "timeout", TIMEOUT_REPLAY_TIME, play_timeout ) +end + +function reset_timeout() + --ChatToAll( "[script] resetting timeout schedule (time: "..TIMEOUT_REPLAY_TIME..")" ) + RemoveSchedule( "timeout" ) + AddSchedule( "timeout", TIMEOUT_REPLAY_TIME, play_timeout ) +end + +function remove_timeout() + --ChatToAll( "[script] removing timeout schedule" ) + RemoveSchedule( "timeout" ) +end + +function play_timeout() + --ChatToAll( "[script] playing timeout sound" ) + BroadCastSound( "training."..stage_info[current_technique].stages[current_stage].stage_code.."_timeout" ) + reset_timeout() +end + +function increment_failed( player, inc ) + failed_attempts = failed_attempts + inc + --ChatToAll( "[script] failed attempts: "..failed_attempts ) + + if failed_attempts >= 3 then + --ChatToAll( "[script] broadcasting failed sound" ) + BroadCastSound( "training."..stage_info[current_technique].stages[current_stage].stage_code.."02" ) + reset_failed() + end +end + +function reset_failed() + failed_attempts = 0 + --ChatToAll( "[script] reset failed attempts: "..failed_attempts ) +end + +function complete_stage( player ) + --ChatToAll( "[script] technique #"..current_technique.." stage #"..current_stage.." complete" ) + stage_info[current_technique].stages[current_stage].stage_complete = true + + show_complete( player, stage_info[current_technique].stages[current_stage].stage_checklist ) + + if current_stage + 1 <= # stage_info[current_technique].stages then + current_stage = current_stage + 1 + else + current_technique = current_technique + 1 + current_stage = 1 + end + + flaginfo( player ) + + reset_failed() + + hide_current( player ) + AddSchedule( "hide_complete", 4, hide_complete, player ) + AddSchedule( "show_current", 4, show_current, player ) + + hide_key( player ) + hide_progressbar( player ) +end + +function award_medal( player, medal ) + local medal_name = "" + local sound_delay = 0 + if medal == 1 then medal_name = "Gold"; sound_delay = 6 + elseif medal == 2 then medal_name = "Silver"; sound_delay = 5 + elseif medal == 3 then medal_name = "Bronze"; sound_delay = 4 end + BroadCastSound( "training."..stage_info[current_technique].stages[current_stage].stage_code.."_"..string.lower(medal_name) ) + + hide_medal( player ) + show_medal_won( player, medal ) + AddSchedule( "hide_medal_won", 4, hide_medal_won, player ) + AddSchedule( "show_medal", 4, show_medal, player, medal ) + AddSchedule( "play_all_complete", sound_delay, play_all_complete, player ) + + stage_info[current_technique].stages[current_stage].stage_complete = true + stage_info[current_technique].stages[current_stage].stage_medal = medal +end + +function show_medal( player, medal ) + hide_medal(player) + if medal == 1 then + AddHudIcon( player, "ff_training_medal_gold.vtf", "Medal", 16, 64, 64, 64, 0 ) + elseif medal == 2 then + AddHudIcon( player, "ff_training_medal_silver.vtf", "Medal", 16, 64, 64, 64, 0 ) + elseif medal == 3 then + AddHudIcon( player, "ff_training_medal_bronze.vtf", "Medal", 16, 64, 64, 64, 0 ) + end +end + +function hide_medal( player ) + RemoveHudItem( player, "Medal" ) +end + +function show_medal_won( player, medal ) + local medal_name = "" + if medal == 1 then medal_name = "Gold" + elseif medal == 2 then medal_name = "Silver" + elseif medal == 3 then medal_name = "Bronze" end + hide_medal_won(player) + AddHudIcon( player, "hud_statusbar_256.vtf", "Medal_won_BG", -128, 180, 256, 16, 3 ) + AddHudIcon( player, "ff_training_medal_"..string.lower(medal_name)..".vtf", "Medal_won", -112, 170, 32, 32, 3 ) + AddHudText( player, "Medal_won_text", "You won the "..medal_name.." medal!", 0, 184, 4 ) +end + +function hide_medal_won( player ) + RemoveHudItem( player, "Medal_won" ) + RemoveHudItem( player, "Medal_won_text" ) + RemoveHudItem( player, "Medal_won_BG" ) +end + +function play_all_complete( player ) + BroadCastSound( "training.all_complete" ) +end + +function show_complete( player, technique ) + RemoveHudItem( player, "Completed_BG" ) + RemoveHudItem( player, "Completed_check" ) + RemoveHudItem( player, "Completed_text" ) + AddHudIcon( player, "hud_statusbar_256.vtf", "Completed_BG", -128, 180, 256, 16, 3 ) + AddHudIcon( player, "hud_checkmark.vtf", "Completed_check", -112, 170, 32, 32, 3 ) + AddHudText( player, "Completed_text", technique, 0, 184, 4 ) +end + +function hide_complete( player ) + RemoveHudItem( player, "Completed_BG" ) + RemoveHudItem( player, "Completed_check" ) + RemoveHudItem( player, "Completed_text" ) +end + +function show_current( player ) + RemoveHudItem( player, "Current_BG" ) + RemoveHudItem( player, "Current_BG2" ) + RemoveHudItem( player, "Current_arrow" ) + RemoveHudItem( player, "Current_arrow_l" ) + RemoveHudItem( player, "Current_text" ) + RemoveHudItem( player, "Current_text2" ) + AddHudIcon( player, "hud_statusbar_256.vtf", "Current_BG", -64, 40, 128, 16, 3 ) + AddHudIcon( player, "hud_statusbar_256.vtf", "Current_BG2", -64, 58, 128, 16, 3 ) + AddHudIcon( player, "hud_current_arrow.vtf", "Current_arrow", -90, 32, 32, 32, 3 ) + AddHudIcon( player, "hud_current_arrow_l.vtf", "Current_arrow_l", 58, 32, 32, 32, 3 ) + if current_technique == ALL_TOGETHER then + if show_timer then + AddHudTimer( player, "Current_text", "speedrun_timer", 0, 42, 4 ) + else + AddHudText( player, "Current_text", "Timer not started", 0, 44, 4 ) + end + if best_run ~= nil then + AddHudTextToAll( "Current_text2", string.format("Best Time: %.3f seconds", best_run), 0, 62, 4 ) + else + AddHudTextToAll( "Current_text2", "No best time yet", 0, 62, 4 ) + end + else + AddHudText( player, "Current_text", stage_info[current_technique].stages[current_stage].stage_name, 0, 44, 4 ) + AddHudText( player, "Current_text2", stage_info[current_technique].stages[current_stage].stage_specific, 0, 62, 4 ) + end + +end + +function hide_current( player ) + RemoveHudItem( player, "Current_BG" ) + RemoveHudItem( player, "Current_BG2" ) + RemoveHudItem( player, "Current_arrow" ) + RemoveHudItem( player, "Current_arrow_l" ) + RemoveHudItem( player, "Current_text" ) + RemoveHudItem( player, "Current_text2" ) +end + +function show_key( player ) + if stage_info[current_technique].stages[current_stage].stage_key ~= "" then + RemoveHudItem( player, "Key_BG" ) + RemoveHudItem( player, "Key_text" ) + RemoveHudItem( player, "Key_text2" ) + AddHudIcon( player, "hud_statusbar_256_128.vtf", "Key_BG", -64, 80, 128, 32, 3 ) + AddHudText( player, "Key_text", stage_info[current_technique].stages[current_stage].stage_key_text, 0, 88, 4 ) + AddHudText( player, "Key_text2", stage_info[current_technique].stages[current_stage].stage_key, 0, 96, 4 ) + end + +end + +function hide_key( player ) + RemoveHudItem( player, "Key_BG" ) + RemoveHudItem( player, "Key_text" ) + RemoveHudItem( player, "Key_text2" ) +end + +function show_progressbar( player ) + if stage_info[current_technique].stages[current_stage].stage_code == "move_aircontrolspeed" then + hide_progressbar( player ) + local bar_width = 1 + AddHudIcon( player, "hud_statusbar_256.vtf", "Progress_BG", -64, 80, 128, 16, 3 ) + AddHudIcon( player, "hud_statusbar_blue.vtf", "Progress_bar", -62, 80, bar_width, 16, 3 ) + end +end + +function update_progressbar( player, percent ) + RemoveHudItem( player, "Progress_bar" ) + RemoveHudItem( player, "Progress_text" ) + local max_width = 124 + local bar_width = percent * max_width + AddHudIcon( player, "hud_statusbar_blue_active.vtf", "Progress_bar", -62, 80, bar_width, 16, 3 ) + AddHudText( player, "Progress_text", tostring(math.floor(percent * 100 + 0.5)).."% of target speed", 0, 84, 4 ) +end + +function hide_progressbar( player ) + RemoveHudItem( player, "Progress_BG" ) + RemoveHudItem( player, "Progress_bar" ) + RemoveHudItem( player, "Progress_text" ) +end + +------------------------------------- +-- Teleports +------------------------------------- +base_tele = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0 }) + +function base_tele:ontouch( touch_entity ) + if IsPlayer(touch_entity) then + local player = CastToPlayer( touch_entity ) + player:SetVelocity(Vector(0,0,0)) + + OutputEvent("steppingstone_*", "Enable") + + increment_failed(player, 1) + reset_timeout() + end +end + +------------------------------------- +-- Teleports +------------------------------------- +base_replay_btn = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0 }) + +function base_replay_btn:ontrigger( touch_entity ) + if IsPlayer(touch_entity) then + local player = CastToPlayer( touch_entity ) + if player:IsInUse() then + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."_timeout" ) + end + end +end + +------------------------------------- +-- Vertical Jump Rooms +------------------------------------- +v_jump = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function v_jump:ontouch( touch_entity ) + if VERTICAL_JUMP_TOUCHED == 10 then + BroadCastSound( "training.stage_complete" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door", "Open" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door_trigger", "Enable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_light", "TurnOn" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_sprite", "ShowSprite" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_model", "Skin", "6" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_next", "Enable" ) + + remove_timeout() + end + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + --ChatToAll( "[script] technique: "..self.technique_id.." stage num: "..self.stage_number ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if (VERTICAL_JUMP_TOUCHED > 0) then + ------------------ + ----ChatToAll( "[training] "..VERTICAL_JUMP_TOUCHED.." marker touched") + ------------------ + -- first touch + else + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + else + OutputEvent( "start_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."01" ) + add_timeout() + end + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + GIVE_GREN2 = true + end + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + --ChatToAll( "[training] give the concs!" ) + set_ammo( p, Ammo.kGren2, 1 ) + --DisplayMessage( p, "Use {gren2} or {toggletwo} to throw a concussion grenade" ) + elseif stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kSoldier then + ApplyToPlayer( p, {AT.kChangeClassSoldier} ) + p:RemoveAllWeapons() + reset_stock( p ) + p:GiveWeapon( "ff_weapon_rpg", true ) + p:SetAmmoInClip(1) + GIVE_GREN2 = false + elseif stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kDemoman then + ApplyToPlayer( p, {AT.kChangeClassDemoman} ) + p:RemoveAllWeapons() + reset_stock( p ) + p:GiveWeapon( "ff_weapon_pipelauncher", true ) + if stage_info[self.technique_id].stages[self.stage_number].stage_code == "v_pipe" then + p:SetAmmoInClip(2) + else + p:SetAmmoInClip(1) + end + GIVE_GREN2 = false + GIVE_PIPES = false + end + ------------------ + end + end + end + end + + VERTICAL_JUMP_TOUCHED = 0 + VERTICAL_JUMP_BROADCASTED = 0 + +end + +function v_jump:ontrigger( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if p:IsOnGround() and GIVE_GREN2 then + ------------------ + set_ammo( p, Ammo.kGren2, 1 ) + GIVE_GREN2 = false + ------------------ + end + if p:IsOnGround() and p:GetClass() == Player.kSoldier then + ------------------ + p:GiveWeapon( "ff_weapon_rpg", true ) + set_ammo( p, Ammo.kRockets, 0 ) + ApplyToPlayer( p, {AT.kReloadClips} ) + p:SetAmmoInClip(1) + ------------------ + end + if p:IsOnGround() and p:GetClass() == Player.kDemoman and GIVE_PIPES then + ------------------ + p:GiveWeapon( "ff_weapon_pipelauncher", true ) + set_ammo( p, Ammo.kRockets, 0 ) + ApplyToPlayer( p, {AT.kReloadClips} ) + p:SetAmmoInClip(2) + GIVE_PIPES = false + ------------------ + end + end + end + end +end + +function v_jump:onexplode( explode_entity ) + return EVENT_ALLOWED +end + +function v_jump:onendtouch() + +end + + +------------------------------------- +-- Jump Application Rooms +------------------------------------- +a_jump = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function a_jump:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."01" ) + reset_timeout() + + show_current( p ) + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + set_ammo( p, Ammo.kGren2, 1 ) + elseif stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kSoldier then + ApplyToPlayer( p, {AT.kChangeClassSoldier} ) + p:RemoveAllWeapons() + reset_stock( p ) + p:GiveWeapon( "ff_weapon_rpg", true ) + GIVE_GREN2 = false + elseif stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kDemoman then + ApplyToPlayer( p, {AT.kChangeClassDemoman} ) + p:RemoveAllWeapons() + reset_stock( p ) + p:GiveWeapon( "ff_weapon_pipelauncher", true ) + GIVE_GREN2 = false + elseif stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kPyro then + ApplyToPlayer( p, {AT.kChangeClassPyro} ) + p:RemoveAllWeapons() + reset_stock( p ) + p:GiveWeapon( "ff_weapon_flamethrower", true ) + set_ammo( p, Ammo.kCells, 200 ) + GIVE_GREN2 = false + end + end + end + end + end +end + +function a_jump:ontrigger( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if p:IsOnGround() and GIVE_GREN2 then + ------------------ + set_ammo( p, Ammo.kGren2, 1 ) + GIVE_GREN2 = false + ------------------ + end + if p:IsOnGround() and p:GetClass() == Player.kSoldier then + ------------------ + p:GiveWeapon( "ff_weapon_rpg", true ) + set_ammo( p, Ammo.kRockets, 0 ) + ApplyToPlayer( p, {AT.kReloadClips} ) + p:SetAmmoInClip(1) + ------------------ + end + if p:IsOnGround() and p:GetClass() == Player.kDemoman and GIVE_PIPES then + ------------------ + p:GiveWeapon( "ff_weapon_pipelauncher", true ) + set_ammo( p, Ammo.kRockets, 0 ) + ApplyToPlayer( p, {AT.kReloadClips} ) + p:SetAmmoInClip(1) + GIVE_PIPES = false + ------------------ + end + if p:IsOnGround() and p:GetClass() == Player.kPyro then + ------------------ + set_ammo( p, Ammo.kCells, 200 ) + ------------------ + end + end + end + end +end + +function a_jump:onexplode( explode_entity ) + return EVENT_ALLOWED +end + +function a_jump:onendtouch() + +end + + +------------------------------------- +-- Misc Jump Start +------------------------------------- +m_jump_start = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function m_jump_start:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."_start" ) + + reset_timeout() + + show_current( p ) + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + GIVE_GREN2 = true + end + end + end + end + end +end + +function m_jump_start:onexplode( explode_entity ) + return EVENT_ALLOWED +end + +function m_jump_start:onendtouch() + +end + +------------------------------------- +-- Misc Jump Rooms +------------------------------------- +m_jump = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function m_jump:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."01" ) + reset_timeout() + end + end +end + +function m_jump:ontrigger( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if (p:IsOnGround() or p:IsUnderWater()) and p:GetClass() == Player.kScout and GIVE_GREN2 then + ------------------ + set_ammo( p, Ammo.kGren2, 1 ) + GIVE_GREN2 = false + ------------------ + end + end + end + end +end + +function m_jump:onexplode( explode_entity ) + return EVENT_ALLOWED +end + +function m_jump:onendtouch() + +end + +------------------------------------- +-- Movement Room +------------------------------------- +move_room = trigger_ff_script:new({ technique_id = 0, stage_number = 0, played_sound = false }) + +function move_room:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if not self.played_sound then + + self.played_sound = true + + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + elseif self.technique_id > 1 then + local num_stages_previous_technique = # stage_info[self.technique_id - 1].stages + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_finish_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."01" ) + + reset_timeout() + + show_current( p ) + end + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + end + end + + end + end + end +end + + +------------------------------------- +-- Movement Start +------------------------------------- +move_start = trigger_ff_script:new({ technique_id = 0, stage_number = 0, played_sound = false }) + +function move_start:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if not self.played_sound then + + self.played_sound = true + + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + elseif self.technique_id > 1 then + local num_stages_previous_technique = # stage_info[self.technique_id - 1].stages + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_finish_door", "Close" ) + end + + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."_start" ) + + reset_timeout() + + show_current( p ) + end + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + show_progressbar( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + end + end + end + end + end +end + + +------------------------------------- +-- Movement Area +------------------------------------- +move_area = trigger_ff_script:new({ technique_id = 0, stage_number = 0, disabled = false }) + +function move_area:ontrigger( touch_entity ) + if self.disabled then return end + + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + local l_stage_code = stage_info[self.technique_id].stages[self.stage_number].stage_code + + if l_stage_code == "move_aircontrol" or l_stage_code == "move_aircontrolbhop" then + if p:IsInUse() then + local neworigin = GetEntityByName( l_stage_code.."_tele_dest" ):GetOrigin() + neworigin = Vector(neworigin.x,neworigin.y,neworigin.z+36) + local newangles = GetEntityByName( l_stage_code.."_tele_dest" ):GetAngles() + local newvelocity = Vector(0,0,0) + p:Teleport( neworigin, newangles, newvelocity ) + p:SetGravity( 1 ) + p:SpeedMod( 1 ) + increment_failed(p, 1) + self:adddisable() + reset_timeout() + elseif p:IsInForward() then + BroadCastMessage( "Do not press forward while air controlling" ) + else + local speed = p:GetSpeed() + if speed < 50 then + BroadCastMessage( "You seem to be stuck. Press your USE button to retry" ) + end + end + end + + if l_stage_code == "move_rampslide" then + + local speed = p:GetSpeed() + + if speed < 800 then + local neworigin = GetEntityByName( l_stage_code.."_tele_dest" ):GetOrigin() + neworigin = Vector(neworigin.x,neworigin.y,neworigin.z+36) + local newangles = GetEntityByName( l_stage_code.."_tele_dest" ):GetAngles() + local newvelocity = Vector(0,0,0) + p:Teleport( neworigin, newangles, newvelocity ) + p:SetGravity( 1 ) + p:SpeedMod( 1 ) + increment_failed(p, 1) + self:adddisable() + reset_timeout() + end + end + + if l_stage_code == "move_trimp" then + + local speed = p:GetSpeed() + + if speed <= 500 then + local neworigin = GetEntityByName( l_stage_code.."_tele_dest" ):GetOrigin() + neworigin = Vector(neworigin.x,neworigin.y,neworigin.z+36) + local newangles = GetEntityByName( l_stage_code.."_tele_dest" ):GetAngles() + local newvelocity = Vector(0,0,0) + p:Teleport( neworigin, newangles, newvelocity ) + p:SetGravity( 1 ) + p:SpeedMod( 1 ) + increment_failed(p, 1) + self:adddisable() + reset_timeout() + end + end + + if l_stage_code == "move_aircontrolspeed" then + --if p:IsInUse() then + -- local origin = GetEntityByName( l_stage_code.."_tele_dest" ):GetOrigin() + -- p:SetOrigin( Vector( origin.x, origin.y, origin.z + 64 ) ) + -- p:SetVelocity( Vector( 0,0,0 ) ) + -- p:SetGravity( 1 ) + -- p:SpeedMod( 1 ) + if p:IsInForward() then + BroadCastMessage( "Do not press forward while air controlling" ) + else + local speed = p:GetSpeed() + update_progressbar( p, speed / 700 ) + if speed > 700 then + update_progressbar( p, 1.0 ) + BroadCastSound( "misc.doop" ) + remove_timeout() + OutputEvent("move_aircontrolspeed_showfinishblock", "Enable") + OutputEvent("move_aircontrolspeed", "Disable") + end + end + end + + end + end + end +end + +function move_area:adddisable() + self.disabled = true + AddSchedule(stage_info[self.technique_id].stages[self.stage_number].stage_code .. "-removedisable", 1, self.removedisable, self) +end + +function move_area.removedisable(self) + self.disabled = false +end + +------------------------------------- +-- Movement Room +------------------------------------- +move_init = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function move_init:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + + local l_stage_code = stage_info[self.technique_id].stages[self.stage_number].stage_code + + if l_stage_code == "move_aircontrol" then + p:SetVelocity( Vector( 500, 0, 600 ) ) + p:SetGravity( 0.000000001 ) + elseif l_stage_code == "move_aircontrolpush" then + p:SetVelocity( Vector( -800, 0, 600 ) ) + elseif l_stage_code == "move_aircontrolspeed" then + p:SetVelocity( Vector( 0, -300, 600 ) ) + p:SetGravity( 0.000000001 ) + elseif l_stage_code == "move_aircontrolbhop" then + p:SetVelocity( Vector( 0, -400, 600 ) ) + p:SetGravity( 0.000000001 ) + elseif l_stage_code == "move_rampslide" then + p:SetVelocity( Vector( 2000, 0, 0 ) ) + elseif l_stage_code == "move_trimp" then + p:SetVelocity( Vector( 1500, 0, 0 ) ) + end + end + end + end +end + +------------------------------------- +-- Application finish +------------------------------------- +a_finish = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function a_finish:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + + BroadCastSound( "misc.doop" ) + BroadCastSound( "training.stage_complete" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door", "Open" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door_trigger", "Enable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_light", "TurnOn" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_sprite", "ShowSprite" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_model", "Skin", "6" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_next", "Enable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_block", "Enable" ) + + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_tesla", "DoSpark" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_beam", "TurnOff" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_arrow", "Disable" ) + complete_stage( p ) + p:RemoveAllWeapons() + p:SetGravity( 1.0 ) + p:SpeedMod( 1.0 ) + + remove_timeout() + + end + end + end +end + +------------------------------------- +-- Aircontrolspeed +------------------------------------- + +move_aircontrolspeed_hidestartarrows = trigger_ff_script:new({ }) + +function move_aircontrolspeed_hidestartarrows:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + + OutputEvent("move_aircontrolspeed_starthideblock", "Disable") + OutputEvent("move_aircontrolspeed_arrow_starthide", "TurnOff") + OutputEvent("move_aircontrolspeed_arrow_startshow", "TurnOn") + OutputEvent("move_aircontrolspeed_startblock", "Enable") + + end + end +end + +move_aircontrolspeed_showfinishblock = trigger_ff_script:new({ touched=false }) + +function move_aircontrolspeed_showfinishblock:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + + if not self.touched then + OutputEvent("move_aircontrolspeed_finishshowblock", "Enable") + OutputEvent("move_aircontrolspeed_arrow_finishhide", "TurnOff") + OutputEvent("move_aircontrolspeed_arrow_finishshow", "TurnOn") + OutputEvent("move_aircontrolspeed_finishblock", "Disable") + self.touched = true + end + + end + end +end + + +------------------------------------- +-- Bhop +------------------------------------- + +move_bhop_init = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0 }) + +move_bhop_area = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0 }) + +move_bhop_start = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0, played_sound = false }) + +function move_bhop_start:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if not self.played_sound then + + self.played_sound = true + + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + elseif self.technique_id > 1 then + local num_stages_previous_technique = # stage_info[self.technique_id - 1].stages + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_finish_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code..self.step.."_start" ) + + OutputEvent("steppingstone_*", "Enable") + + reset_timeout() + + show_current( p ) + end + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + end + end + + if self.step == 1 then + p:SpeedMod( .5 ) + elseif self.step == 2 then + p:SpeedMod( .75 ) + else + p:SpeedMod( 1.0 ) + end + + end + end + end +end + + +move_bhop_finish = trigger_ff_script:new({ technique_id = 0, stage_number = 0, step = 0 }) + +function move_bhop_finish:ontouch( touch_entity ) + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + + BroadCastSound( "misc.doop" ) + + p:RemoveAllWeapons() + p:SetGravity( 1.0 ) + p:SpeedMod( 1.0 ) + + reset_timeout() + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code..self.step.."_block", "Enable" ) + + if self.step == stage_info[self.technique_id].stages[self.stage_number].stage_num_steps then + BroadCastSound( "training.stage_complete" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door", "Open" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_door_trigger", "Enable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_light", "TurnOn" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_sprite", "ShowSprite" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_finish_model", "Skin", "6" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_next", "Enable" ) + + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_tesla", "DoSpark" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_beam", "TurnOff" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_arrow", "Disable" ) + complete_stage( p ) + + remove_timeout() + end + + end + end + end +end + +------------------------------------- +-- freeze +------------------------------------- + +function player_freeze( p, bF ) + p:Freeze( bF ) +end + +------------------------------------- +-- Multipurpose remove +------------------------------------- + +remove_all = trigger_ff_script:new({}) + +function remove_all:allowed( allowed_entity ) + if not stage_info[current_technique].stages[current_stage].stage_complete and current_technique == JUMP_TECHNIQUES then + if stage_info[current_technique].stages[current_stage].stage_limits.force_hhconc then + ----ChatToAll( "[training] trigger_remove force_hhconc" ) + if IsGrenade( allowed_entity ) then + GIVE_GREN2 = true + return EVENT_ALLOWED + end + end + if stage_info[current_technique].stages[current_stage].stage_limits.force_waterconc then + ----ChatToAll( "[training] trigger_remove force_waterconc" ) + if IsGrenade( allowed_entity ) then + GIVE_GREN2 = true + BroadCastMessage( "Throw the conc in the water!" ) + --ApplyToPlayer( player, {AT.kStopPrimedGrens} ) + return EVENT_ALLOWED + end + end + end + return EVENT_DISALLOWED +end + +--- TEMPORARY +v_hhconc_remove = remove_all:new({}) +a_hhconc_remove = remove_all:new({}) +m_waterconc_remove = remove_all:new({}) +a_pipe_remove = remove_all:new({}) +v_pipe_remove = remove_all:new({}) + +------------------------------------- +-- Multipurpose catch +------------------------------------- + +catch_all = trigger_ff_script:new({}) + +function catch_all:ontouch( touch_entity ) + if IsPlayer(touch_entity) then return end +end + +function catch_all:ontrigger( touch_entity ) + return +end + +function catch_all:onexplode( explode_entity ) + if explode_entity:GetClassName() == "ff_projectile_pl" then + GIVE_PIPES = true + elseif explode_entity:GetClassName() == "ff_grenade_concussion" then + GIVE_GREN2 = true + end + return EVENT_ALLOWED +end + +------------------------------------- +-- speedrun +------------------------------------- +all_together_start = trigger_ff_script:new({ technique_id = 0, stage_number = 0, sound_played = false }) + +function all_together_start:ontouch( touch_entity ) + if show_timer then return end + if not stage_info[self.technique_id].stages[self.stage_number].stage_complete then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if not self.sound_played then + + self.sound_played = true + + if self.stage_number > 1 then + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id].stages[self.stage_number - 1].stage_code.."_finish_door", "Close" ) + elseif self.technique_id > 1 then + local num_stages_previous_technique = # stage_info[self.technique_id - 1].stages + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_next", "Disable" ) + OutputEvent( stage_info[self.technique_id - 1].stages[num_stages_previous_technique].stage_code.."_finish_door", "Close" ) + end + BroadCastSound( "training."..stage_info[self.technique_id].stages[self.stage_number].stage_code.."_start" ) + + reset_timeout() + + show_current( p ) + end + + if p:GetClass() ~= stage_info[self.technique_id].stages[self.stage_number].stage_class then + + show_key( p ) + + ------------------ + if stage_info[self.technique_id].stages[self.stage_number].stage_class == Player.kScout then + ApplyToPlayer( p, {AT.kChangeClassScout} ) + p:RemoveAllWeapons() + reset_stock( p ) + end + end + end + end + end +end + +all_together_init = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function all_together_init:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + RemoveTimer( "speedrun_timer" ) + AddTimer( "speedrun_timer", 0, 1 ) + show_timer = true + OutputEvent( stage_info[self.technique_id].stages[self.stage_number].stage_code.."_init", "Disable" ) + + player:GiveWeapon( "ff_weapon_crowbar", true ) + player:AddAmmo( Ammo.kGren1, 4 ) + player:AddAmmo( Ammo.kGren2, 4 ) + + show_current( player ) + + UpdateObjectiveIcon( player, GetEntityByName( "red_flag" ) ) + end +end + +all_together_room = trigger_ff_script:new({ technique_id = 0, stage_number = 0 }) + +function all_together_room:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + end +end + +function all_together_room:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if show_timer and player:IsInUse() then + RemoveTimer( "speedrun_timer" ) + OutputEvent( "all_scout_init", "Enable" ) + + show_timer = false + + player:RemoveAllWeapons() + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + + show_current( player ) + + local stage_code = stage_info[current_technique].stages[current_stage].stage_code + TeleportToEntity( player, stage_code.."_tele_dest" ) + player:SetGravity( 1 ) + player:SpeedMod( 1 ) + ApplyToPlayer( player, { AT.kStopPrimedGrens } ) + ApplyToAll({AT.kRemoveProjectiles}) + local flag = CastToInfoScript(GetEntityByName("red_flag")) + RemoveHudItem( player, flag:GetName() ) + flag:Return() + UpdateObjectiveIcon( player, nil ) + end + end +end + +function OutputTime( timername ) + local timerval = GetTimerTime( timername ) + --ChatToAll("["..timername.."] "..timerval.."s") + BroadCastMessage( string.format("Time: %.3f seconds", timerval), 10, Color.kBlue ) + return timerval +end + +function blue_cap:oncapture(player, item) + + local timerval = OutputTime( "speedrun_timer" ) + + RemoveTimer( "speedrun_timer" ) + OutputEvent( "all_scout_init", "Enable" ) + + show_timer = false + + player:RemoveAllWeapons() + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + + if timerval > 0 then + if best_run == nil then + best_run = timerval + else + if timerval < best_run then + best_run = timerval + end + end + end + + local medal_won = nil + if timerval <= TIME_FOR_GOLD then + medal_won = 1 + elseif timerval <= TIME_FOR_SILVER then + medal_won = 2 + elseif timerval <= TIME_FOR_BRONZE then + medal_won = 3 + else + -- only play the capture sound if no medal was won + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + end + + if medal_won ~= nil then + if stage_info[current_technique].stages[current_stage].stage_medal == 0 or stage_info[current_technique].stages[current_stage].stage_medal > medal_won then + award_medal( player, medal_won ) + end + end + + show_current( player ) + + local stage_code = stage_info[current_technique].stages[current_stage].stage_code + TeleportToEntity( player, stage_code.."_tele_dest" ) + player:SetGravity( 1 ) + player:SpeedMod( 1 ) + ApplyToPlayer( player, { AT.kStopPrimedGrens } ) + + -- let the teams know that a capture occured + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") +end + +function TeleportToEntity( player, entity_name ) + if GetEntityByName( entity_name ) ~= nil then + local neworigin = GetEntityByName( entity_name ):GetOrigin() + neworigin = Vector(neworigin.x,neworigin.y,neworigin.z+36+16) + local newangles = GetEntityByName( entity_name ):GetAngles() + local newvelocity = Vector(0,0,0) + player:Teleport( neworigin, newangles, newvelocity ) + return true + else + return false + end +end + +------------------------------------- +-- Change class triggers +------------------------------------- +ChangeClass = trigger_ff_script:new({ class=Player.kScout, changeclass=AT.kChangeClassScout }) + +function ChangeClass:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + ------------------ + ApplyToPlayer( p, {self.changeclass} ) + p:RemoveAllWeapons() + reset_stock( p ) + ------------------ + end + end +end + +ChangeClass_Scout = ChangeClass:new({ class=Player.kScout, changeclass=AT.kChangeClassScout }) +ChangeClass_Medic = ChangeClass:new({ class=Player.kMedic, changeclass=AT.kChangeClassMedic }) +ChangeClass_Civilian = ChangeClass:new({ class=Player.kCivilian, changeclass=AT.kChangeClassCivilian }) + +------------------------------------- +-- OnPrime +------------------------------------- + +function player_spawn( player ) + if IsPlayer( player ) then + BroadCastSound( "training.intro" ) + end +end + +function player_onprimegren1( player_id ) + ----ChatToAll( "[training] gren1 primed" ) + local player = GetPlayer(player_id) + if stage_info[current_technique].stages[current_stage].stage_code == "v_frag" then + AddSchedule("gren2prime3", .85, message, "3") + AddSchedule("gren2prime2", 1.85, message, "2") + AddSchedule("gren2prime1", 2.85, message, "1") + AddSchedule("gren2prime", 3.85, message, "Jump!") + end +end + +function player_onprimegren2( player_id ) + ----ChatToAll( "[training] gren2 primed" ) + local player = GetPlayer(player_id) + + if stage_info[current_technique].stages[current_stage].stage_type == VERTICAL_JUMP or stage_info[current_technique].stages[current_stage].stage_type == MISC_JUMP then + increment_failed(player, 1) + reset_timeout() + end + + if stage_info[current_technique].stages[current_stage].stage_code == "v_conc" then + AddSchedule("gren2prime3", .5, message, "3") + AddSchedule("gren2prime2", 1.5, message, "2") + AddSchedule("gren2prime1", 2.5, message, "1") + AddSchedule("gren2prime", 3.5, message, "Jump!") + AddSchedule("gren2primeremove", 3.6, removeprimed, player) + elseif stage_info[current_technique].stages[current_stage].stage_code == "a_conc" then + AddSchedule("gren2prime3", .5, message, "3") + AddSchedule("gren2prime2", 1.5, message, "2") + AddSchedule("gren2prime1", 2.5, message, "1") + AddSchedule("gren2prime", 3.5, message, "Jump!") + AddSchedule("gren2primeremove", 3.6, removeprimed, player) + elseif stage_info[current_technique].stages[current_stage].stage_code == "v_hhconc" then + AddSchedule("gren2prime3", .85, message, "3") + AddSchedule("gren2prime2", 1.85, message, "2") + AddSchedule("gren2prime1", 2.85, message, "1") + AddSchedule("gren2prime", 3.85, message, "Jump!") + elseif stage_info[current_technique].stages[current_stage].stage_code == "a_hhconc" then + AddSchedule("gren2prime3", .5, message, "3") + AddSchedule("gren2prime2", 1.5, message, "2") + AddSchedule("gren2prime1", 2.5, message, "1") + AddSchedule("gren2prime", 3.5, message, "Jump!") + end +end + +function player_onthrowgren1( player, primed ) + ----ChatToAll( "[training] gren1 thrown" ) + return EVENT_ALLOWED +end + +function player_onthrowgren2( player, primed ) + ----ChatToAll( "[training] gren2 thrown" ) + if stage_info[current_technique].stages[current_stage].stage_code == "v_hhconc" or stage_info[current_technique].stages[current_stage].stage_code == "a_hhconc" then + BroadCastMessage( "Do not throw the conc when Hand-Held Conc Jumping!" ) + GIVE_GREN2 = true + RemoveSchedule("gren2prime3") + RemoveSchedule("gren2prime2") + RemoveSchedule("gren2prime1") + RemoveSchedule("gren2prime") + --ApplyToPlayer( player, {AT.kStopPrimedGrens} ) + return EVENT_DISALLOWED + end + + if stage_info[current_technique].stages[current_stage].stage_code == "v_conc" or stage_info[current_technique].stages[current_stage].stage_code == "a_conc" then + RemoveSchedule("gren2primeremove") + return EVENT_ALLOWED + end + + return EVENT_ALLOWED +end + +----------------------------------------------------------------------------- +-- On damage +----------------------------------------------------------------------------- +function player_ondamage( player, damageinfo ) + ----ChatToAll( "[training] player ondamage" ) + if not damageinfo then + return + end + + damageinfo:SetDamage(0) + + local weapon = damageinfo:GetInflictor():GetClassName() + + if weapon == "ff_projectile_rocket" then + player:RemoveAllWeapons() + if stage_info[current_technique].stages[current_stage].stage_type == VERTICAL_JUMP then + increment_failed(player, 1) + reset_timeout() + end + end + + if weapon == "ff_projectile_pl" then + player:RemoveAllWeapons() + if stage_info[current_technique].stages[current_stage].stage_type == VERTICAL_JUMP then + increment_failed(player, .5) + reset_timeout() + end + end + +end + +------------------------------------- +-- Vertical Jump Markers +------------------------------------- +VerticalJumpMarker = trigger_ff_script:new({ message = "Touched", number = 0 }) + +function VerticalJumpMarker:ontouch( touch_entity ) + if VERTICAL_JUMP_BROADCASTED == 0 then + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + if self.number > VERTICAL_JUMP_TOUCHED then + ------------- + ----ChatToAll( "[training] Upped to: " .. self.number ) + -------------- + VERTICAL_JUMP_TOUCHED = self.number + VERTICAL_JUMP_MESSAGE = self.message + if self.number == 10 then + BroadCastSound ( "misc.doop" ) + OutputEvent( stage_info[current_technique].stages[current_stage].stage_code.."_tesla", "DoSpark" ) + OutputEvent( stage_info[current_technique].stages[current_stage].stage_code.."_beam", "TurnOff" ) + OutputEvent( stage_info[current_technique].stages[current_stage].stage_code.."_arrow", "Disable" ) + complete_stage( p ) + end + else + BroadCastMessage( VERTICAL_JUMP_MESSAGE ) + VERTICAL_JUMP_BROADCASTED = 1 + reset_timeout() + end + end + end + end +end + +function VerticalJumpMarker:onendtouch() + +end + +------------------------------------- +-- Declare Veritical Jump Markers +------------------------------------- +Jump1 = VerticalJumpMarker:new({ message="Not Quite", number=1 }) +Jump2 = VerticalJumpMarker:new({ message="Nice Try", number=2 }) +Jump3 = VerticalJumpMarker:new({ message="Keep it up", number=3 }) +Jump4 = VerticalJumpMarker:new({ message="Good Effort", number=4 }) +Jump5 = VerticalJumpMarker:new({ message="You're Getting It", number=5 }) +Jump6 = VerticalJumpMarker:new({ message="Good, but still a ways to go", number=6 }) +Jump7 = VerticalJumpMarker:new({ message="Great, but not quite", number=7 }) +Jump8 = VerticalJumpMarker:new({ message="Almost There", number=8 }) +Jump9 = VerticalJumpMarker:new({ message="So Close...", number=9 }) +Jump10 = VerticalJumpMarker:new({ message="Complete!", number=10 }) + + +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + + current_y = 0 + + for i,v in ipairs(stage_info) do + + heading_complete = true + for i2,v2 in ipairs(v.stages) do + if not v2.stage_complete then + heading_complete = false + break + end + end + + RemoveHudItem( player, "Checklist_Header"..i ) + RemoveHudItem( player, "Checklist_Header_text"..i ) + RemoveHudItem( player, "Checklist_Header"..i.."_check" ) + + AddHudIcon( player, "hud_statusbar_256.vtf", "Checklist_Header"..i, 10, current_y + 10, 136, 16, 1 ) + if heading_complete then + AddHudText( player, "Checklist_Header_text"..i, v.technique_name, 127, current_y + 14, 5 ) + AddHudIcon( player, "hud_checkmark.vtf", "Checklist_Header"..i.."_check", 124, current_y + 6, 20, 20, 1 ) + else + AddHudText( player, "Checklist_Header_text"..i, v.technique_name, 140, current_y + 14, 5 ) + end + + RemoveHudItem( player, "Checklist_BG"..i ) + + if i == current_technique then + if # v.stages > 2 then + AddHudIcon( player, "hud_statusbar_256_128.vtf", "Checklist_BG"..i, 10, current_y + 28, 136, 10 + # v.stages * 10, 1 ) + else + AddHudIcon( player, "hud_statusbar_256.vtf", "Checklist_BG"..i, 10, current_y + 28, 136, 10 + # v.stages * 10, 1 ) + end + end + for i2,v2 in ipairs(v.stages) do + RemoveHudItem( player, "Checklist_Item"..i.."-"..i2 ) + RemoveHudItem( player, "Checklist_Item"..i.."-"..i2.."_check" ) + + if i == current_technique then + if v2.stage_complete then + AddHudIcon( player, "hud_checkmark.vtf", "Checklist_Item"..i.."-"..i2.."_check", 132, current_y + 22 + i2 * 10, 10, 10, 1 ) + elseif i2 == current_stage and i == current_technique then + AddHudIcon( player, "hud_current_arrow.vtf", "Checklist_Item"..i.."-"..i2.."_check", 132, current_y + 23 + i2 * 10, 10, 10, 1 ) + end + AddHudText( player, "Checklist_Item"..i.."-"..i2, v2.stage_checklist, 130, current_y + 24 + i2 * 10, 5 ) + end + end + + if i == current_technique then + current_y = current_y + 32 + # v.stages * 10 + else + current_y = current_y + 20 + end + + end + + show_current( player ) +end + + +function message( text ) + BroadCastMessage( text ) +end + +function disable( entity ) + ConsoleToAll( entity.." you are nuts" ) + OutputEvent( entity, "Disable" ) +end \ No newline at end of file diff --git a/maps/ff_warpath.lua b/maps/ff_warpath.lua new file mode 100644 index 0000000..bb7edb1 --- /dev/null +++ b/maps/ff_warpath.lua @@ -0,0 +1,592 @@ +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_cp_default") +IncludeScript("base_cp_sequential") +IncludeScript("base_chatcommands") + +----------------------------------------------------------------------------- +--Globals +----------------------------------------------------------------------------- + +POINTS_FOR_COMPLETE_CONTROL = 25 +ENABLE_COMPLETE_CONTROL_RESET = true +ENABLE_COMPLETE_CONTROL_RESPAWN = true +COMPLETE_CONTROL_RESPAWN_DELAY = 5 +INITIAL_ROUND_DELAY = 20 +RETOUCH_DELAY = 10.0 --CP3 +RETOUCH_DELAY_CP2RED_CP4BLUE = 20 +RETOUCH_DELAY_CP2BLUE_CP4RED = 10 + +CAP_REQ_CP1_CP5 = 750 +CAP_REQ_CP3 = 1000 +CAP_REQ_CP2RED_CP4BLUE = 1000 +CAP_REQ_CP2BLUE_CP4RED = 1250 + +cp_blue = 1 +cp_red = 5 +RED_TUNNEL_WALL_BLOWN = false +BLUE_TUNNEL_WALL_BLOWN = false + +----------------------------------------------------------------------------- +-- Chat commands and settings +----------------------------------------------------------------------------- + +-- teamcapsound +chatbase_addcommand( "teamcapsound", "Determines if a sound is played when the other team starts capping a point", "teamcapsound 0/1" ) +function chat_teamcapsound( player, setting ) + setting = tonumber(setting) + if setting == "" or setting == nil then + -- no parameter, just echo back their current setting + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Current team capture sound setting: "..tostring(chatbase_getplayersetting(player, "startcapsound"))) + elseif setting == 0 or not setting then + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Turned your team capture sound off") + chatbase_setplayersetting(player, "teamcapsound", 0) + else + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Turned your team capture sound on") + chatbase_setplayersetting(player, "teamcapsound", 1) + end +end +chatbase_addplayersetting( "teamcapsound", 1, "Determines if a sound is played when the other team starts capping a point" ) + +-- startcapsound +chatbase_addcommand( "startcapsound", "Determines if a sound is played when you start to capture a point", "startcapsound 0/1" ) +function chat_startcapsound( player, setting ) + setting = tonumber(setting) + if setting == "" or setting == nil then + -- no parameter, just echo back their current setting + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Current start capture sound setting: "..tostring(chatbase_getplayersetting(player, "startcapsound"))) + elseif setting == 0 or not setting then + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Turned your start capture sound off") + chatbase_setplayersetting(player, "startcapsound", 0) + else + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Turned your start capture sound on") + chatbase_setplayersetting(player, "startcapsound", 1) + end +end + +chatbase_addplayersetting( "startcapsound", 1, "Determines if a sound is played when the opposite team starts to capture a point" ) + +----------------------------------------------------------------------------- +-- event outputs +----------------------------------------------------------------------------- + +function startup() + SetGameDescription("Sequential Control Points") + + -- disable certain teams + for i,v in pairs(disabled_teams) do + SetPlayerLimit( v, -1 ) + end + + -- set up team limits + for i1,v1 in pairs(teams) do + local team = GetTeam(v1) + for i2,v2 in ipairs(team_info[team:GetTeamId()].class_limits) do + team:SetClassLimit( i2, v2 ) + end + end + + RemoveAllCPAmmoAndArmor() + + for i,v in ipairs(command_points) do + RemoveSchedule( "cp" .. v.cp_number .. "_cap_timer" ) + ResetCPCapping( v ) + AddScheduleRepeating( "cp" .. v.cp_number .. "_cap_zone_timer", CAP_ZONE_TIMER_INTERVAL, cap_zone_timer, v ) + end + + reset_map_items(true) +end + +function complete_control_notification ( team_number ) + local team = GetTeam(team_number) + SmartTeamSound(team, "yourteam.flagcap", "otherteam.flagcap") + SmartTeamSpeak(team, "CZ_GOTALL", "CZ_THEYGOTALL") + SmartTeamMessage(team, "#FF_CZ2_YOURTEAM_COMPLETE", "#FF_CZ2_OTHERTEAM_COMPLETE") + + AddSchedule("reset_map_items", COMPLETE_CONTROL_RESPAWN_DELAY, reset_map_items, false) +end + +function reset_map_items (firstRound) + BLUE_TUNNEL_WALL_BLOWN = false + RED_TUNNEL_WALL_BLOWN = false + OutputEvent( "blue_detwall_template", "ForceSpawn" ) + OutputEvent( "red_detwall_template", "ForceSpawn" ) + + OBJECTIVE_TEAM1 = "cp2_zone" + OBJECTIVE_TEAM2 = "cp4_zone" + UpdateTeamObjectiveIcon( GetTeam(TEAM1), GetEntityByName( OBJECTIVE_TEAM1 ) ) + UpdateTeamObjectiveIcon( GetTeam(TEAM2), GetEntityByName( OBJECTIVE_TEAM2 ) ) + + if firstRound then + for i,v in ipairs(command_points) do + ChangeCPDefendingTeam(v.cp_number, Team.kUnassigned) + ResetCPCapping( v ) + end + + ChangeCPDefendingTeam( 1, TEAM1 ) + ChangeCPDefendingTeam( CP_COUNT, TEAM2 ) + + setup_door_timer("startgate_blue", INITIAL_ROUND_DELAY) + setup_door_timer("startgate_red", INITIAL_ROUND_DELAY) + else + setup_door_timer("startgate_blue", 12) + setup_door_timer("startgate_red", 12) + end +end + +function event_StopTouchingCP( entity, cp ) + return +end + +function event_StartTouchingCP( entity, cp ) + if IsPlayer( entity ) then + local player = CastToPlayer( entity ) + if chatbase_getplayersetting(player, "startcapsound") ~= 0 then + BroadCastSoundToPlayer( player, "misc.woop" ) + end + end + return +end + +function event_StartTouchingCC( entity, cc_team_number ) + return +end + +function event_StopTouchingCC( entity, cc_team_number ) + return +end + +function event_ChangeCPDefendingTeam( cp_number, new_defending_team ) + -- Change the skybeam and groundbeam color + OutputEvent( "cp" .. cp_number .. "_actiondoor_" .. team_info[command_points[cp_number].defending_team].team_name, "Close") + OutputEvent( "cp" .. cp_number .. "_actiondoor_" .. team_info[new_defending_team].team_name, "Open") + + -- update valid spawns + if new_defending_team == Team.kBlue then + cp_blue = cp_number + if command_points[cp_number].defending_team == Team.kRed then + cp_red = cp_number + 1 + end + elseif new_defending_team == Team.kRed then + cp_red = cp_number + if command_points[cp_number].defending_team == Team.kBlue then + cp_blue = cp_number - 1 + end + end +end + +function event_ResetTeamCPCapping( cp, team_number ) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[team_number].team_name .. "_beam", "TurnOff" ) +end + +function event_StartTeamCPCapping( cp, team_number ) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[team_number].team_name .. "_beam", "TurnOn" ) + local team = GetTeam(team_number) + for i,v in pairs(chatbase_players) do + local player = CastToPlayer(v.player) + if IsPlayer(player) then + if player:GetTeamId() ~= team_number then + if chatbase_getplayersetting(player, "teamcapsound") then + BroadCastSoundToPlayer( player, "misc.bloop" ) + end + end + end + end +end + + +team_info = { + + [Team.kUnassigned] = { + team_name = "neutral", + enemy_team = Team.kUnassigned, + objective_icon = nil, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen }, + skybeam_color = "128 128 128", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 1, + skin = "0", + flag_visibility = "TurnOff", + cc_touch_count = 0, + ccalarmicon = "hud_secdown.vtf", ccalarmiconx = 0, ccalarmicony = 0, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 2, + detcc_sentence = "HTD_DOORS", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + }, + + [TEAM1] = { + team_name = "blue", + enemy_team = TEAM2, + objective_icon = nil, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue }, + skybeam_color = "64 64 255", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 2, + skin = "2", + flag_visibility = "TurnOn", + cc_touch_count = 0, + ccalarmicon = "hud_secup_blue.vtf", ccalarmiconx = 60, ccalarmicony = 5, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 2, + detcc_sentence = "CZ_BCC_DET", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + }, + + [TEAM2] = { + team_name = "red", + enemy_team = TEAM1, + objective_icon = nil, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed }, + skybeam_color = "255 64 64", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 0, + skin = "1", + flag_visibility = "TurnOn", + cc_touch_count = 0, + ccalarmicon = "hud_secup_red.vtf", ccalarmiconx = 60, ccalarmicony = 5, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 3, + detcc_sentence = "CZ_RCC_DET", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + } +} + + +------------------------------------------- +-- Round start functions +------------------------------------------- + +function setup_door_timer(doorname, duration) + CloseDoor(doorname) + AddSchedule("round_opendoor_" .. doorname, duration, round_start, doorname) + + if duration > 10 then AddSchedule( "dooropen5sec" , duration - 10 , schedulemessagetoall, "Gates open in 10 seconds!" ) end + if duration > 5 then AddSchedule( "dooropen5sec" , duration - 5 , schedulemessagetoall, "5" ) end + if duration > 4 then AddSchedule( "dooropen4sec" , duration - 4 , schedulemessagetoall, "4" ) end + if duration > 3 then AddSchedule( "dooropen3sec" , duration - 3, schedulemessagetoall, "3" ) end + if duration > 2 then AddSchedule( "dooropen2sec" , duration - 2, schedulemessagetoall, "2" ) end + if duration > 1 then AddSchedule( "dooropen1sec" , duration - 1, schedulemessagetoall, "1" ) end + + if duration > 5 then AddSchedule( "dooropen5seccount" , duration - 5 , schedulecountdown, 5 ) end + if duration > 4 then AddSchedule( "dooropen4seccount" , duration - 4 , schedulecountdown, 4 ) end + if duration > 3 then AddSchedule( "dooropen3seccount" , duration - 3 , schedulecountdown, 3 ) end + if duration > 2 then AddSchedule( "dooropen2seccount" , duration - 2 , schedulecountdown, 2 ) end + if duration > 1 then AddSchedule( "dooropen1seccount" , duration - 1 , schedulecountdown, 1 ) end +end + +function round_start(doorname) + BroadCastMessage("Gates are now open!") + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) + + OpenDoor(doorname) +end + +function schedulemessagetoall( message ) + BroadCastMessage( message ) +end + +function schedulecountdown( time ) + BroadCastMessage( ""..time.."" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +----------------------------------------------------------------------------- +-- bags +----------------------------------------------------------------------------- + +gen_pack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 0, + gren2 = 0, + cells = 130, + respawntime = 10, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch"}) + +blue_gen_pack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 1, + gren2 = 0, + cells = 130, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue}}) + +red_gen_pack = genericbackpack:new({ + health = 50, + armor = 50, + grenades = 0, + nails = 300, + shells = 300, + rockets = 300, + gren1 = 1, + gren2 = 0, + cells = 130, + respawntime = 15, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kRed}}) + +----------------------------------------------------------------------------- +-- overrides +----------------------------------------------------------------------------- + +-- teleporting +ENABLE_CC_TELEPORTERS = false +ENABLE_CP_TELEPORTERS = false + +-- command center +ENABLE_CC = false + +-- command points +CP_COUNT = 5 + +command_points = { + [1] = { + cp_number = 1, + defending_team = Team.kBlue, + cap_requirement = { [TEAM1] = CAP_REQ_CP1_CP5, [TEAM2] = CAP_REQ_CP1_CP5 }, + cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, + cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, + next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, + delay_before_retouch = { [TEAM1] = RETOUCH_DELAY, [TEAM2] = RETOUCH_DELAY }, + touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + point_value = { [TEAM1] = 1, [TEAM2] = 5 }, + score_timer_interval = { [TEAM1] = 30.00, [TEAM2] = 15.00 }, + hudstatusicon = "hud_cp_1.vtf", hudposx = -40, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + + [2] = { + cp_number = 2, + defending_team = Team.kUnassigned, + cap_requirement = { [TEAM1] = CAP_REQ_CP2RED_CP4BLUE, [TEAM2] = CAP_REQ_CP2BLUE_CP4RED }, + cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, + cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, + next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, + delay_before_retouch = { [TEAM1] = RETOUCH_DELAY_CP2BLUE_CP4RED, [TEAM2] = RETOUCH_DELAY_CP2RED_CP4BLUE }, + touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + point_value = { [TEAM1] = 2, [TEAM2] = 4 }, + score_timer_interval = { [TEAM1] = 22.50, [TEAM2] = 22.50 }, + hudstatusicon = "hud_cp_2.vtf", hudposx = -20, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [3] = { + cp_number = 3, + defending_team = Team.kUnassigned, + cap_requirement = { [TEAM1] = CAP_REQ_CP3, [TEAM2] = CAP_REQ_CP3 }, + cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, + cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, + next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, + delay_before_retouch = { [TEAM1] = RETOUCH_DELAY, [TEAM2] = RETOUCH_DELAY }, + touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + point_value = { [TEAM1] = 3, [TEAM2] = 3 }, + score_timer_interval = { [TEAM1] = 30.00, [TEAM2] = 30.00 }, + hudstatusicon = "hud_cp_3.vtf", hudposx = 0, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [4] = { + cp_number = 4, + defending_team = Team.kUnassigned, + cap_requirement = { [TEAM1] = CAP_REQ_CP2BLUE_CP4RED, [TEAM2] = CAP_REQ_CP2RED_CP4BLUE }, + cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, + cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, + next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, + delay_before_retouch = { [TEAM1] = RETOUCH_DELAY_CP2RED_CP4BLUE, [TEAM2] = RETOUCH_DELAY_CP2BLUE_CP4RED }, + touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + point_value = { [TEAM1] = 4, [TEAM2] = 2 }, + score_timer_interval = { [TEAM1] = 22.50, [TEAM2] = 22.50 }, + hudstatusicon = "hud_cp_4.vtf", hudposx = 20, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [CP_COUNT] = { + cp_number = 5, + defending_team = Team.kRed, + cap_requirement = { [TEAM1] = CAP_REQ_CP1_CP5, [TEAM2] = CAP_REQ_CP1_CP5 }, + cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, + cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, + next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, + delay_before_retouch = { [TEAM1] = RETOUCH_DELAY, [TEAM2] = RETOUCH_DELAY }, + touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, + point_value = { [TEAM1] = 5, [TEAM2] = 1 }, + score_timer_interval = { [TEAM1] = 15.00, [TEAM2] = 30.00 }, + hudstatusicon = "hud_cp_5.vtf", hudposx = 40, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 } +} + +cap_resupply = { + health = 100, + armor = 300, + nails = 400, + shells = 400, + cells = 400, + grenades = 100, + rockets = 50, + detpacks = 0, + mancannons = 1, + gren1 = 2, + gren2 = 1 +} + +---------------------------------------------------------------------------- +-- Spawnpoints +---------------------------------------------------------------------------- + +-- Spawn Points +base_blue_spawn = info_ff_teamspawn:new({ cp_number = 0, validspawn = function(self,player) + return player:GetTeamId() == Team.kBlue and self.cp_number == cp_blue +end }) +base_red_spawn = info_ff_teamspawn:new({ cp_number = 0, validspawn = function(self,player) + return player:GetTeamId() == Team.kRed and self.cp_number == cp_red +end }) +bluespawn_cp1 = base_blue_spawn:new({cp_number=1}) +bluespawn_cp2 = base_blue_spawn:new({cp_number=2}) +bluespawn_cp3 = base_blue_spawn:new({cp_number=3}) +bluespawn_cp4 = base_blue_spawn:new({cp_number=4}) +redspawn_cp5 = base_red_spawn:new({cp_number=5}) +redspawn_cp4 = base_red_spawn:new({cp_number=4}) +redspawn_cp3 = base_red_spawn:new({cp_number=3}) +redspawn_cp2 = base_red_spawn:new({cp_number=2}) + +-- Spawn Doors (base entity) +blue_respawn_door = trigger_ff_script:new({cp_number = 0}) +red_respawn_door = trigger_ff_script:new({cp_number = 0}) + +-- Spawn Doors (validity checks) +function blue_respawn_door:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == Team.kBlue then --and self.cp_number <= cp_blue then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function red_respawn_door:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == Team.kRed then --and self.cp_number >= cp_red then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +--Spawn Doors (Validity checks failure) +function blue_respawn_door:onfailtouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + --if player:GetTeamId() == Team.kBlue then + -- BroadCastMessageToPlayer( player, "You need to capture Command Point ".. self.cp_number .. " before you can use this respawn!" ) + --else + BroadCastMessageToPlayer( player, "Your team cannot use this respawn." ) + --end + end +end + +function red_respawn_door:onfailtouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + --if player:GetTeamId() == Team.kRed then + -- BroadCastMessageToPlayer( player, "You need to capture Command Point ".. self.cp_number .." before you can use this respawn!" ) + --else + BroadCastMessageToPlayer( player, "Your team cannot use this respawn." ) + --end + end +end + + +-- Spawn Doors (actual entities with command point condition attached) +bluerespawn_cp2 = blue_respawn_door:new({cp_number=2}) +bluerespawn_cp3 = blue_respawn_door:new({cp_number=3}) +bluerespawn_cp4 = blue_respawn_door:new({cp_number=4}) +redrespawn_cp2 = red_respawn_door:new({cp_number=2}) +redrespawn_cp3 = red_respawn_door:new({cp_number=3}) +redrespawn_cp4 = red_respawn_door:new({cp_number=4}) + +----------------------------------------------------------------------------- +-- Grates +----------------------------------------------------------------------------- + +detwall_trigger = trigger_ff_script:new({ team = Team.kUnassigned, team_name = "neutral" }) + +function detwall_trigger:onexplode( explosion_entity ) + if team == Team.kUnassigned then + return + end + + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack( explosion_entity ) + -- GetTemId() might not exist for buildables, they have their own seperate shit and it might be named differently + -- if detpack:GetTeamId() ~= self.team then -- both teams can destroy while commented out + + BroadCastSound( "misc.thunder" ) + + if self.team == Team.kRed then + if not RED_TUNNEL_WALL_BLOWN then + OutputEvent( self.team_name .. "_detwall", "Kill" ) + BroadCastMessage("Red's tunnel has been blown!" ) + RED_TUNNEL_WALL_BLOWN = true + else + OutputEvent( self.team_name .. "_detwall_template", "ForceSpawn" ) + BroadCastMessage("Red's tunnel has been sealed!" ) + RED_TUNNEL_WALL_BLOWN = false + end + elseif self.team == Team.kBlue then + if not BLUE_TUNNEL_WALL_BLOWN then + OutputEvent( self.team_name .. "_detwall", "Kill" ) + BroadCastMessage("Blue's tunnel has been blown!" ) + BLUE_TUNNEL_WALL_BLOWN = true + else + OutputEvent( self.team_name .. "_detwall_template", "ForceSpawn" ) + BroadCastMessage("Blue's tunnel has been sealed!" ) + BLUE_TUNNEL_WALL_BLOWN = false + end + end + -- end + end +end + +red_detwall_trigger = detwall_trigger:new({ team = Team.kRed, team_name = "red" }) +blue_detwall_trigger = detwall_trigger:new({ team = Team.kBlue, team_name = "blue" }) \ No newline at end of file diff --git a/maps/ff_waterpolo.lua b/maps/ff_waterpolo.lua new file mode 100644 index 0000000..048894a --- /dev/null +++ b/maps/ff_waterpolo.lua @@ -0,0 +1,20 @@ +-- ff_waterpolo.lua + + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_fortball_default") +IncludeScript("base_fortball") + + +----------------------------------------------------------------------------- +-- overrides +----------------------------------------------------------------------------- + + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- + + diff --git a/maps/ff_waterpolo.txt b/maps/ff_waterpolo.txt new file mode 100644 index 0000000..45104b0 --- /dev/null +++ b/maps/ff_waterpolo.txt @@ -0,0 +1,30 @@ +FF_Waterpolo + +GAME MODE: Push Variant +Teams vie for control of the soccer ball. +The ball carrier must enter the enemy's goal + +Teams: Red VS Blue + +Objectives: + - Take the enemy flag + - Bring it to the enemy's goal + +Scoring: + - 10 points per goal + - 10 points given to the enemy team per own goal + - Team with most points at end of round wins + +Goalies: + - Each team can have 1 super-fast civialian goalie + - Goalies are invincible inside their own team's zone, but +take 3 times normal damage outside of their zone + - Goalies cannot go out-of-bounds or into the enemy's +zone + - Goalies return the ball if they touch it + +Notes: + - Landing out-of-bounds returns the ball + +Optional Objectives: + - Grenade packs can be found on the sides of the map \ No newline at end of file diff --git a/maps/ff_waterpolo_level_sounds.txt b/maps/ff_waterpolo_level_sounds.txt new file mode 100644 index 0000000..35ad1a3 --- /dev/null +++ b/maps/ff_waterpolo_level_sounds.txt @@ -0,0 +1,58 @@ +// game sounds for the ff_waterpolo map + +"ff_waterpolo.bizwarn" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/bizwarn.wav" +} + +"ff_waterpolo.bloop" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/bloop.wav" +} + +"ff_waterpolo.buzwarn" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/buzwarn.wav" +} + +"ff_waterpolo.dadeda" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/dadeda.wav" +} + +"ff_waterpolo.deeoo" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/deeoo.wav" +} + +"ff_waterpolo.doop" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/doop.wav" +} + +"ff_waterpolo.woop" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*misc/woop.wav" +} + diff --git a/maps/ff_waterpolo_soundscapes.txt b/maps/ff_waterpolo_soundscapes.txt new file mode 100644 index 0000000..9164407 --- /dev/null +++ b/maps/ff_waterpolo_soundscapes.txt @@ -0,0 +1,55 @@ +// Ramp Room, Front Door, and Resups +"waterpolo.center" +{ + "dsp" "1" + "dsp_volume" "0.4" + + "playlooping" + { + "volume" "0.2" + "pitch" "100" + "wave" "ambient/water/rumble_rain_nowind.wav" + } + + "playlooping" + { + "volume" "0.5" + "wave" "ambient/water/lake_water.wav" + "pitch" "100" + } + + // Wind gusts (based on cliffe's cs_assault settings) + "playrandom" + { + "time" "20,30" + "volume" "0.3,0.4" + "pitch" "90,110" + + "rndwave" + { + "wave" "ambient/wind/wind_snippet1.wav" + "wave" "ambient/wind/wind_snippet2.wav" + "wave" "ambient/wind/wind_snippet3.wav" + "wave" "ambient/wind/wind_snippet4.wav" + "wave" "ambient/wind/wind_snippet5.wav" + } + } + + "playrandom" + { + "time" "30,60" + "volume" "0.4,0.6" + "pitch" "90,110" + "position" "random" + + "rndwave" + { + "wave" "ambient/weather/thunder1.wav" + "wave" "ambient/weather/thunder2.wav" + "wave" "ambient/weather/thunder3.wav" + "wave" "ambient/weather/thunder4.wav" + "wave" "ambient/weather/thunder5.wav" + } + } + +} \ No newline at end of file diff --git a/maps/ff_well.lua b/maps/ff_well.lua new file mode 100644 index 0000000..a3a1e12 --- /dev/null +++ b/maps/ff_well.lua @@ -0,0 +1,193 @@ + +-- ff_well.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_ctf") +IncludeScript("base_teamplay") +IncludeScript("base_location") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- +POINTS_PER_CAPTURE = 10 +FLAG_RETURN_TIME = 60 +----------------------------------------------------------------------------- +-- Locations +----------------------------------------------------------------------------- +location_blue_frupper = location_info:new({ text = "Flag Room Catwalks", team = Team.kBlue }) +location_red_frupper = location_info:new({ text = "Flag Room Catwalks", team = Team.kRed }) + +location_blue_frlower = location_info:new({ text = "Lower Flag Room", team = Team.kBlue }) +location_red_frlower = location_info:new({ text = "Lower Flag Room", team = Team.kRed }) + +location_blue_frwater = location_info:new({ text = "Flag Room Water", team = Team.kBlue }) +location_red_frwater = location_info:new({ text = "Flag Room Water", team = Team.kRed }) + +location_blue_ladder = location_info:new({ text = "Battlements Ladder", team = Team.kBlue }) +location_red_ladder = location_info:new({ text = "Battlements Ladder", team = Team.kRed }) + +location_blue_concexit = location_info:new({ text = "Conc Route Exit", team = Team.kBlue }) +location_red_concexit = location_info:new({ text = "Conc Route Exit", team = Team.kRed }) + +location_blue_canal = location_info:new({ text = "Yard Canal", team = Team.kBlue }) +location_red_canal = location_info:new({ text = "Yard Canal", team = Team.kRed }) + + +----------------------------------------------------------------------------- +-- Doors +----------------------------------------------------------------------------- + + +blue_door1_trigger = trigger_ff_script:new({ team = Team.kBlue }) + +function blue_door1_trigger:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function blue_door1_trigger:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent("blue_door1_left", "Open") + OutputEvent("blue_door1_right", "Open") + end +end + + +blue_door2_trigger = trigger_ff_script:new({ team = Team.kBlue }) + +function blue_door2_trigger:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function blue_door2_trigger:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent("blue_door2_left", "Open") + OutputEvent("blue_door2_right", "Open") + end +end + +red_door1_trigger = trigger_ff_script:new({ team = Team.kRed }) + +function red_door1_trigger:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function red_door1_trigger:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent("red_door1_left", "Open") + OutputEvent("red_door1_right", "Open") + end +end + + +red_door2_trigger = trigger_ff_script:new({ team = Team.kRed }) + +function red_door2_trigger:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function red_door2_trigger:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent("red_door2_left", "Open") + OutputEvent("red_door2_right", "Open") + end +end + + +----------------------------------------------------------------------------- +-- backpacks +----------------------------------------------------------------------------- + +wellpackgeneric = genericbackpack:new({ + health = 20, + armor = 15, + grenades = 60, + nails = 60, + shells = 60, + rockets = 60, + cells = 60, + mancannons = 1, + gren1 = 1, + gren2 = 1, + respawntime = 35, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function wellpackgeneric:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- Grates +----------------------------------------------------------------------------- + +base_grate_trigger = trigger_ff_script:new({ team = Team.kUnassigned, team_name = "neutral" }) + +function base_grate_trigger:onexplode( explosion_entity ) + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack( explosion_entity ) + + -- GetTemId() might not exist for buildables, they have their own seperate shit and it might be named differently + if detpack:GetTeamId() ~= self.team then + OutputEvent( self.team_name .. "_grate", "Kill" ) + OutputEvent( self.team_name .. "_grate_wall", "Kill" ) + if self.team_name == "red" then BroadCastMessage("#FF_RED_GRATEBLOWN") end + if self.team_name == "blue" then BroadCastMessage("#FF_BLUE_GRATEBLOWN") end + end + end + + -- I think this is needed so grenades and other shit can blow up here. They won't fire the events, though. + return EVENT_ALLOWED +end + +red_grate_trigger = base_grate_trigger:new({ team = Team.kRed, team_name = "red" }) +blue_grate_trigger = base_grate_trigger:new({ team = Team.kBlue, team_name = "blue" }) + + +----------------------------------------------------------------------------- +-- Buttons +----------------------------------------------------------------------------- + +blue_fr_button = func_button:new({}) +function blue_fr_button:ondamage() OutputEvent( "blue_fr_grate_r", "Open" ) end +function blue_fr_button:ondamage() OutputEvent( "blue_fr_grate_l", "Open" ) end +function blue_fr_button:ontouch() OutputEvent( "blue_fr_grate_r", "Open" ) end +function blue_fr_button:ontouch() OutputEvent( "blue_fr_grate_l", "Open" ) end + +red_fr_button = func_button:new({}) +function red_fr_button:ondamage() OutputEvent( "red_fr_grate_r", "Open" ) end +function red_fr_button:ondamage() OutputEvent( "red_fr_grate_l", "Open" ) end +function red_fr_button:ontouch() OutputEvent( "red_fr_grate_r", "Open" ) end +function red_fr_button:ontouch() OutputEvent( "red_fr_grate_l", "Open" ) end + +blue_fd_button = func_button:new({}) +function blue_fd_button:ondamage() OutputEvent( "blue_door0", "Open" ) end +function blue_fd_button:ontouch() OutputEvent( "blue_door0", "Open" ) end + +red_fd_button = func_button:new({}) +function red_fd_button:ondamage() OutputEvent( "red_door0", "Open" ) end +function red_fd_button:ontouch() OutputEvent( "red_door0", "Open" ) end + diff --git a/maps/ff_well.txt b/maps/ff_well.txt new file mode 100644 index 0000000..067034a --- /dev/null +++ b/maps/ff_well.txt @@ -0,0 +1,5 @@ +CAPTURE THE FLAG + +Fight your way through the enemy base and bring back the flag to you own. The flag is located at the back of the base, high up overlooking the bridge. Open the water route using a detpack for a new route into the enemy base. + +The capture point is located in your own base, in the chamber below your flag room. \ No newline at end of file diff --git a/maps/ff_well_soundscapes.txt b/maps/ff_well_soundscapes.txt new file mode 100644 index 0000000..92e26fd --- /dev/null +++ b/maps/ff_well_soundscapes.txt @@ -0,0 +1,165 @@ +// The Well soundscape file +// Author: Mervaka +// Some sections based on existing valve soundscapes but modified + +"ff.drips1" +{ + "playrandom" + { + "volume" "0.1,0.3" + "pitch" "90,120" + "time" "0.5, 5.0" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/water/ff_distant_drip1.wav" + "wave" "ambient/water/ff_distant_drip2.wav" + "wave" "ambient/water/ff_distant_drip3.wav" + "wave" "ambient/water/ff_distant_drip4.wav" + } + } +} + +// Yard between two bases +"Well.yard" +{ + // DSP: 0 : "Normal (off)" + "dsp" "1" + "dsp_volume" "0.4" + + // constant wind base + "playlooping" + { + "volume" "0.2" + "pitch" "100" + "wave" "ambient/wind/ff_wasteland_wind.wav" + } + + // Wind gusts (based on cliffe's cs_assault settings) + "playrandom" + { + "time" "20,30" + "volume" "0.3,0.4" + "pitch" "90,110" + + "rndwave" + { + "wave" "ambient/wind/wind_snippet1.wav" + "wave" "ambient/wind/wind_snippet2.wav" + "wave" "ambient/wind/wind_snippet3.wav" + "wave" "ambient/wind/wind_snippet4.wav" + "wave" "ambient/wind/wind_snippet5.wav" + } + } +} + +// Large Open Flag Room +"Well.flagroom" +{ + // DSP: // 1 : "Generic" + "dsp" "1" + "dsp_volume" "0.6" + + // constant ambient base + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/atmosphere/ff_ambience.wav" + } + "playsoundscape" + { + "name" "ff.drips1" + "volume" "1.0" + } + +} + +// Centre Bunker +"Well.bunker" +{ + "dsp" "1" + "dsp_volume" "0.5" + + "playsoundscape" + { + "name" "Well.yard" + "volume" "0.6" + } +} + +// Ramp Room, Front Door, and Resups +"Well.front" +{ + // DSP: 0 : "Normal (off)" + "dsp" "1" + "dsp_volume" "0.5" + // General ambient noise + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/push/inside_amb1.wav" + } + + // constant ambient base + "playlooping" + { + "volume" "0.02" + "pitch" "100" + "wave" "ambient/atmosphere/ff_ambience.wav" + } + +// wind blowing through warehouse + "playrandom" + { + "time" "20,30" + "volume" "0.1,0.2" + "pitch" "90,110" + + "rndwave" + { + "ambient/wind/windgust.wav" + "ambient/wind/wind_moan1.wav" + "ambient/wind/wind_moan2.wav" + "ambient/wind/wind_moan4.wav" + } + } + + "playrandom" + { + "time" "30,60" + "volume" "0.3,0.5" + "pitch" "90,100" + "position" "random" + "soundlevel" "SNDLVL_140db" + "rndwave" + { + "wave" "ambient/materials/metal4.wav" + "wave" "ambient/materials/rustypipes1.wav" + "wave" "ambient/materials/rustypipes2.wav" + } + } +} + +// Attic +"Well.4bags" +{ + // DSP: 0 : "Normal (off)" + "dsp" "1" + "dsp_volume" "0.5 +" + "playsoundscape" + { + "name" "Well.front" + "volume" "1.0" + } + // constant ambient base + + "playsoundscape" + { + "name" "ff.drips1" + "volume" "0.1" + } +} \ No newline at end of file diff --git a/maps/includes/base.lua b/maps/includes/base.lua new file mode 100644 index 0000000..4354971 --- /dev/null +++ b/maps/includes/base.lua @@ -0,0 +1,198 @@ + +-- base.lua + + +----------------------------------------------------------------------------- +-- This file is loaded automatically whenever a map is loaded. +-- Do not change this file. +----------------------------------------------------------------------------- +local _G = getfenv(0) + + +----------------------------------------------------------------------------- +-- defines +----------------------------------------------------------------------------- +-- Events +EVENT_ALLOWED = true +EVENT_DISALLOWED = false + + +----------------------------------------------------------------------------- +-- set a cvar, but check to make sure it's not already set correctly +----------------------------------------------------------------------------- +function set_cvar( cvarname, value ) + if GetConvar( cvarname ) ~= value then + SetConvar( cvarname, value ) + end +end + + +----------------------------------------------------------------------------- +-- Output Events +----------------------------------------------------------------------------- +function OpenDoor(name) OutputEvent( name, "Open" ) end +function CloseDoor(name) OutputEvent( name, "Close" ) end +function ToggleDoor(name) OutputEvent( name, "Toggle" ) end + + +----------------------------------------------------------------------------- +-- baseclass (everything derives from this guy) +----------------------------------------------------------------------------- +baseclass = { } +function baseclass:new (o) + -- create object if user does not provide one + o = o or {} + setmetatable(o, self) + self.__index = self + return o +end + + +----------------------------------------------------------------------------- +-- reset everything +----------------------------------------------------------------------------- +function RespawnAllPlayers() + ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips, AT.kAllowRespawn, AT.kReturnDroppedItems }) +end + + +----------------------------------------------------------------------------- +-- lowercase c "Broadcast" functions, because uppercase C "BroadCast" functions are lame +----------------------------------------------------------------------------- +function BroadcastMessage( message ) + BroadCastMessage( message ) +end + +function BroadcastMessageToPlayer( player, message ) + BroadCastMessageToPlayer( player, message ) +end + +function BroadcastSound( soundname ) + BroadCastSound( soundname ) +end + +function BroadcastSoundToPlayer( player, soundname ) + BroadCastSoundToPlayer( player, soundname ) +end + + +----------------------------------------------------------------------------- +-- trigger_ff_script +----------------------------------------------------------------------------- +trigger_ff_script = baseclass:new({}) +function trigger_ff_script:allowed() return EVENT_ALLOWED end +function trigger_ff_script:ontouch() end +function trigger_ff_script:ontrigger() end +function trigger_ff_script:onendtouch() end +function trigger_ff_script:onfailtouch() end +function trigger_ff_script:onexplode() return EVENT_ALLOWED end +function trigger_ff_script:onbuild() return EVENT_ALLOWED end +function trigger_ff_script:onfailuse() end +function trigger_ff_script:onuse() end +function trigger_ff_script:onactive() end +function trigger_ff_script:oninactive() end +function trigger_ff_script:onremoved() end +function trigger_ff_script:onrestored() end + +function trigger_ff_script:spawn() + + -- notify the bot if this is a goal type + local info = CastToTriggerScript(entity) + if(info ~= nil) then + if self.botgoaltype and self.team then + info:SetBotGoalInfo(self.botgoaltype, self.team) + end + end +end + + +----------------------------------------------------------------------------- +-- trigger_ff_clip +----------------------------------------------------------------------------- +trigger_ff_clip = baseclass:new({}) +function trigger_ff_clip:spawn() + local clip = CastToTriggerClip(entity) + if (clip ~= nil) then + if self.clipflags then + clip:SetClipFlags(self.clipflags) + end + end +end + + +----------------------------------------------------------------------------- +-- func_button +----------------------------------------------------------------------------- +func_button = baseclass:new({}) +function func_button:allowed() return true end +function func_button:ondamage() end +function func_button:ontouch() end +function func_button:onuse() end +function func_button:onfailuse() end + + +----------------------------------------------------------------------------- +-- info_ff_script +----------------------------------------------------------------------------- +info_ff_script = baseclass:new({ model = "models/items/healthkit.mdl" }) +function info_ff_script:onreturn() end +function info_ff_script:ondrop() end +function info_ff_script:onownerdie() end +function info_ff_script:onownerforcerespawn() end +function info_ff_script:onownerfeign() end +function info_ff_script:onactive() end +function info_ff_script:oninactive() end +function info_ff_script:onremoved() end +function info_ff_script:onrestored() end +function info_ff_script:onexplode() end +function info_ff_script:dropatspawn() return false end +function info_ff_script:usephysics() return false end +function info_ff_script:hasshadow() return true end + +-- anims must be named certain things... +function info_ff_script:hasanimation() return false end + +-- For when this object is carried, these offsets are used to place +-- the info_ff_script relative to the objects GetAbsOrigin() +function info_ff_script:attachoffset() + local offset = Vector( 0, 0, 0 ) + return offset +end + +function info_ff_script:precache() + PrecacheModel(self.model) +end + +function info_ff_script:spawn() + -- set model and skin + local info = CastToInfoScript( entity ) + info:SetModel(self.model) + if self.modelskin then + info:SetSkin(self.modelskin) + end + + -- setup touch flags + if self.touchflags ~= nil then info:SetTouchFlags(self.touchflags) end + if self.disallowtouchflags ~= nil then info:SetDisallowTouchFlags(self.disallowtouchflags) end + + -- notify the bot if this is a goal type + if(info ~= nil) then + if self.botgoaltype then + info:SetBotGoalInfo(self.botgoaltype) + end + end + + if self.renderfx ~= nil then + info:SetRenderFx(self.renderfx) + end +end +function info_ff_script:gettouchsize( mins, maxs ) end +function info_ff_script:getphysicssize( mins, maxs ) end +function info_ff_script:getbloatsize() return 12 end + + +----------------------------------------------------------------------------- +-- info_ff_teamspawn +----------------------------------------------------------------------------- +info_ff_teamspawn = baseclass:new({}) +function info_ff_teamspawn:validspawn() return true end diff --git a/maps/includes/base_ad.lua b/maps/includes/base_ad.lua new file mode 100644 index 0000000..b1442c4 --- /dev/null +++ b/maps/includes/base_ad.lua @@ -0,0 +1,833 @@ +-- base_ad.lua +-- Attack / Defend gametype + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") + +----------------------------------------------------------------------------- +-- globals +----------------------------------------------------------------------------- +if NUM_PHASES == nil then NUM_PHASES = 3; end +if INITIAL_ROUND_LENGTH == nil then INITIAL_ROUND_LENGTH = 90 +POINTS_PER_CAPTURE = 25 +POINTS_PER_PERIOD = 1 +POSTCAP_TIMER = 2 + +if ATTACKERS == nil then ATTACKERS = Team.kBlue; end +if DEFENDERS == nil then DEFENDERS = Team.kRed; end +--if MAP_LENGTH == nil then MAP_LENGTH = 1436; end -- 23 minutes 56 seconds, 4 seconds less than the default timelimit of 24 minutes. + +if ATTACKERS_OBJECTIVE_ENTITY == nil then ATTACKERS_OBJECTIVE_ENTITY = nil end + +INITIAL_FUSE_TIMER = 80 +BLOW_CP1_ROUTE_TIMER = 300 +BLOW_CP2_ROUTE_TIMER = 780 + +allow_win = true +phase = 1 +current_timer = 0 +carried_by = nil + +function startup( ) + + SetGameDescription( "Attack Defend" ) + + -- 4 seconds less than mp_timelimit, just as was the case when it was fixed (I assume it always takes 4 seconds to initialise?) + MAP_LENGTH = (60 * GetConvar( "mp_timelimit" )) - 4; + PERIOD_TIME = MAP_LENGTH * POINTS_PER_PERIOD / 100; + + -- set up team limit + -- disable all teams + for i = Team.kBlue, Team.kGreen do + local team = GetTeam( i ) + if i then + team:SetPlayerLimit( -1 ) + end + end + + -- then re-enable attackers/defenders + local team = GetTeam( ATTACKERS ) + team:SetPlayerLimit( 0 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + local team = GetTeam( DEFENDERS ) + team:SetPlayerLimit( 0 ) + team:SetClassLimit( Player.kCivilian, -1 ) + team:SetClassLimit(Player.kScout, -1) + + -- Should this be map specific? + SetTeamName( ATTACKERS, "#FF_Attackers") + SetTeamName( DEFENDERS, "#FF_Defenders" ) + + -- start the timer for the points + AddScheduleRepeating( "addpoints", PERIOD_TIME, addpoints ) + + setup_door_timer( "cp1_gate", INITIAL_ROUND_LENGTH ) + setup_map_timers() + + allow_win = true + + cp1_flag.enabled = true + cp1_flag.team = ATTACKERS + for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag"}) do + local flag = GetInfoScriptByName(v) + if flag then + flag:SetModel(_G[v].model) + flag:SetSkin(teamskins[ATTACKERS]) + if i == 1 then + flag:Restore() + else + flag:Remove() + end + end + end + + -- Remove future phase flags + flag_remove( "cp2_flag" ) + flag_remove( "cp3_flag" ) + + -- add map initialise stuff. Needs to be done via lua for synchronisation + AddSchedule("blow_first_gate", INITIAL_FUSE_TIMER, blow_first_gate ) + AddSchedule("blow_cp1_extra_route", BLOW_CP1_ROUTE_TIMER, blow_cp1_extra_route ) + AddSchedule("blow_cp2_extra_route", BLOW_CP2_ROUTE_TIMER, blow_cp2_extra_route ) + + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + UpdateTeamObjectiveIcon( GetTeam(ATTACKERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(DEFENDERS), ATTACKERS_OBJECTIVE_ENTITY ) +end + +function blow_first_gate( ) + OutputEvent( "fuse01", "StartForward" ) -- delay of 80 secs +end + +function blow_cp1_extra_route( ) + OutputEvent( "cp1_extraroute", "Break" ) -- delay of 300 secs +end + +function blow_cp2_extra_route( ) + OutputEvent( "cp2_extraroute", "Break" ) -- delay of 780 secs +end + + +----------------------------------------- +-- Remove a flag by name +----------------------------------------- +function flag_remove( flag_name ) + local flag = GetInfoScriptByName( flag_name ) + if flag then + flag:Remove() + _G[flag_name].enabled = false + end +end + +----------------------------------------- +-- Restore a flag by name +----------------------------------------- +function flag_restore( flag_name ) + local flag = GetInfoScriptByName( flag_name ) + if flag then + flag:Restore() + _G[flag_name].enabled = true + end +end + +----------------------------------------- +-- +----------------------------------------- +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + -- Remove stuff + player:RemoveAmmo( Ammo.kNails, 400 ) + player:RemoveAmmo( Ammo.kShells, 400 ) + player:RemoveAmmo( Ammo.kRockets, 400 ) + player:RemoveAmmo( Ammo.kCells, 400 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + + -- Add items (similar to both teams) + player:AddAmmo( Ammo.kShells, 200 ) + player:AddAmmo( Ammo.kRockets, 30 ) + player:AddAmmo( Ammo.kNails, 200 ) + + -- Defenders get... + if player:GetTeamId() == DEFENDERS then + -- Player is at full armor now, so we can + -- easily reduce by some percent + -- but were not going to because + -- theres no reason to do so + -- player:RemoveArmor( ( player:GetArmor() * .25 ) ) + + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:AddAmmo( Ammo.kCells, 200 ) + elseif player:GetTeamId() == ATTACKERS then + -- Attackers get... + player:AddAmmo( Ammo.kCells, 200 ) + end + +-- if player:GetTeamId() == ATTACKERS then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) +-- elseif player:GetTeamId() == DEFENDERS then +-- UpdateObjectiveIcon( player, nil ) +-- end +end + +function addpoints( ) + local team = GetTeam( DEFENDERS ) + team:AddScore( POINTS_PER_PERIOD ) +end + +----------------------------------------- +-- base flag +----------------------------------------- +-- default +base_ad_flag = baseflag:new({ + modelskin = teamskins[ATTACKERS], + name = "base_ad_flag", + team = ATTACKERS, + phase = 1, + hudicon = team_hudicons[ATTACKERS], + touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kGreen, AllowFlags.kYellow} +}) + + -- if ATTACKERS == Team.kRed then + -- ConsoleToAll("Setting up RED ATTACKERS FLAG") + -- base_ad_flag.hudicon = "hud_flag_red.vtf" + -- base_ad_flag.touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kRed} + -- elseif ATTACKERS == Team.kGreen then + -- ConsoleToAll("Setting up GREEN ATTACKERS FLAG") + -- base_ad_flag.hudicon = "hud_flag_green.vtf" + -- base_ad_flag.touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kGreen} + -- elseif ATTACKERS == Team.kBlue then + -- ConsoleToAll("Setting up BLUE ATTACKERS FLAG") + -- base_ad_flag.hudicon = "hud_flag_blue.vtf" + -- base_ad_flag.touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kBlue} + -- elseif ATTACKERS == Team.kYellow then + -- ConsoleToAll("Setting up Yellow ATTACKERS FLAG") + -- base_ad_flag.hudicon = "hud_flag_yellow.vtf" + -- base_ad_flag.touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kYellow} + -- end +end + +function base_ad_flag:dropitemcmd( owner_entity ) +-- DO NOTHING! +-- -- throw the flag +-- local flag = CastToInfoScript(entity) +-- flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) +-- +-- if IsPlayer( owner_entity ) then +-- local player = CastToPlayer( owner_entity ) +-- player:RemoveEffect( EF.kSpeedlua1 ) +-- +-- -- Remove any hud icons with identifier "base_ad_flag" +-- RemoveHudItem( player, "base_ad_flag" ) +-- end +end + + +function base_ad_flag:touch( touch_entity ) + -- should only respond to players + if (IsPlayer(touch_entity) == false) then + return + end + + local player = CastToPlayer(touch_entity) + local teamId = player:GetTeamId() + + -- pickup if they can + if self.notouch then + if self.notouch[player:GetId()] then return; end + end + + if teamId == ATTACKERS and phase == self.phase then + if phase == 1 then + --BroadCastMessageToPlayer(player, "#FF_AD_TAKE1") + SmartMessage(player, "#FF_AD_TAKE1", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + elseif phase == 2 then + --BroadCastMessageToPlayer(player, "#FF_AD_TAKE2") + SmartMessage(player, "#FF_AD_TAKE2", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + else + --BroadCastMessageToPlayer(player, "#FF_AD_TAKE3") + SmartMessage(player, "#FF_AD_TAKE3", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + end + + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + RandomFlagTouchSpeak( player ) + + -- have player pick up the flag and lose his disguise (for spy class) + local flag = CastToInfoScript( entity ) + if flag ~= nil then + flag:Pickup( player) + player:AddEffect( EF.kSpeedlua1, -1, 0, 0.65 ) + player:SetDisguisable( false ) + -- if the player is a spy, then force him to lose his cloak + player:SetCloakable( false ) + + self.hudicon = team_hudicons[ATTACKERS] + -- Add hud icon to show we're carrying the flag + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudstatusiconw, self.hudstatusiconh, self.hudalign ) + + -- change objective icons + ATTACKERS_OBJECTIVE_ENTITY = player + UpdateTeamObjectiveIcon( GetTeam(ATTACKERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(DEFENDERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateObjectiveIcon( player, GetEntityByName( "cp"..self.phase.."_cap" ) ) + + LogLuaEvent(player:GetId(), 0, "flag_touch", "flag_name", flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) ), "player_health", "" .. player:GetHealth()); + -- show on the deathnotice board + --ObjectiveNotice( player, "grabbed the flag" ) + + carried_by = player:GetName() + destroy_return_timer() + update_hud() + end + end +end + +function base_ad_flag:onownerdie( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + player:RemoveEffect( EF.kSpeedlua1 ) + + player:SetDisguisable( true ) + player:SetCloakable( true ) + + -- Remove any hud icons with identifier "base_ad_flag" + RemoveHudItem( player, "base_ad_flag" ) + + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + UpdateObjectiveIcon( player, nil ) + UpdateTeamObjectiveIcon( GetTeam(ATTACKERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(DEFENDERS), ATTACKERS_OBJECTIVE_ENTITY ) + + -- remove flag icon from hud + RemoveHudItem( player, flag:GetName() ) + RemoveHudItemFromAll( flag:GetName() .. "_c" ) + AddHudIconToAll( self.hudstatusicondropped, ( flag:GetName() .. "_d" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) + self.status = 2 + + setup_return_timer() + update_hud() + end +end + +function base_ad_flag:onreturn( ) + -- let the teams know that the flag was returned + local team = GetTeam( self.team ) + SmartTeamMessage(team, "#FF_TEAMRETURN", "#FF_OTHERTEAMRETURN", Color.kYellow, Color.kYellow) + SmartTeamSound(team, "yourteam.flagreturn", "otherteam.flagreturn") + SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") + local flag = CastToInfoScript( entity ) + + RemoveHudItemFromAll( flag:GetName() .. "_d" ) + RemoveHudItemFromAll( flag:GetName() .. "_c" ) + AddHudIconToAll( self.hudstatusiconhome, ( flag:GetName() .. "_h" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) + self.status = 0 + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + UpdateTeamObjectiveIcon( GetTeam(ATTACKERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(DEFENDERS), ATTACKERS_OBJECTIVE_ENTITY ) + + LogLuaEvent(0, 0, "flag_returned","flag_name",flag:GetName()); + + destroy_return_timer() + update_hud() +end + +----------------------------------------- +-- base capture point +----------------------------------------- +base_ad_cap = basecap:new({ + phase = 0, + doorname = "cp2_gate", + duration = 90, + team = ATTACKERS +}) + +function base_ad_cap:allowed ( allowed_entity ) + if phase ~= self.phase then + return false + end + + -- only respond to players + if ( IsPlayer( allowed_entity ) == false ) then + return false + end + + if allow_win == false then + return false + end + + local player = CastToPlayer( allowed_entity ) + + -- check if the player has the flag + for i,v in ipairs( self.item ) do + if player:HasItem( v ) then + player:RemoveEffect( EF.kSpeedlua1 ) + + -- Remove any hud icons with identifier "base_ad_flag" + RemoveHudItem( player, "base_ad_flag" ) + + return true + end + end + + return false +end + +function base_ad_cap:oncapture( player, item ) + + if phase == 1 then + map_cap1() + elseif phase == 2 then + map_cap2() + else + allow_win = false + map_attackers_win() + end + + player:AddFortPoints(500, "#FF_FORTPOINTS_CAPTUREPOINT") + + if self.closedoor then + CloseDoor(self.closedoor) + end + + -- remove objective icon + ATTACKERS_OBJECTIVE_ENTITY = nil + UpdateTeamObjectiveIcon( GetTeam(ATTACKERS), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(DEFENDERS), ATTACKERS_OBJECTIVE_ENTITY ) + + -- Remove previous phase flag + flag_remove( item ) + + -- Delay for a couple seconds after the cap + AddSchedule( "cap_delay_timer", POSTCAP_TIMER, cap_delay_timer, self ) +end + +----------------------------------------- +-- waste a couple seconds before respawning/ending +----------------------------------------- +function cap_delay_timer( cap ) + if phase == NUM_PHASES then + -- it's the last round. end and stuff + GoToIntermission() + RemoveSchedule( "addpoints" ) + else + phase = phase + 1 + + -- setup double cap points for the last round + if phase == NUM_PHASES then + POINTS_PER_CAPTURE = POINTS_PER_CAPTURE * 2 + end + + -- Restore next flag + if phase == 2 then + flag_restore( "cp2_flag" ) + elseif phase == 3 then + flag_restore( "cp3_flag" ) + end + + -- update objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + + setup_door_timer( cap.doorname, cap.duration) + ApplyToAll( { AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips } ) + end +end + +function setup_door_timer( doorname, duration ) + AddSchedule( "round_start", duration, round_start, doorname ) + if duration > 65 then AddSchedule( "round_60secwarn", duration-60, round_60secwarn ) end + if duration > 35 then AddSchedule( "round_30secwarn", duration-30, round_30secwarn ) end + if duration > 15 then AddSchedule( "round_10secwarn", duration-10, round_10secwarn ) end +end + +function round_start( doorname ) + BroadCastMessage( "#FF_AD_GATESOPEN" ) + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) + OpenDoor( doorname ) +end + +function round_60secwarn( ) + BroadCastMessage( "#FF_ROUND_60SECWARN" ) +end + +function round_30secwarn( ) + BroadCastMessage( "#FF_ROUND_30SECWARN" ) +end + +function round_10secwarn( ) + BroadCastMessage( "#FF_ROUND_10SECWARN" ) +end + + +---------------- +-- map timers -- +---------------- + +function setup_map_timers( ) + local timelimit = MAP_LENGTH + + AddSchedule( "map_10mintimer", timelimit-600, map_timewarn, 600 ) + AddSchedule( "map_5mintimer", timelimit-300, map_timewarn, 300 ) + AddSchedule( "map_2mintimer", timelimit-120, map_timewarn, 120 ) + AddSchedule( "map_60sectimer", timelimit-60, map_timewarn, 60 ) + AddSchedule( "map_30sectimer", timelimit-30, map_timewarn, 30 ) + AddSchedule( "map_10sectimer", timelimit-10, map_timewarn, 10 ) + AddSchedule( "map_9sectimer", timelimit-9, map_timewarn, 9 ) + AddSchedule( "map_8sectimer", timelimit-8, map_timewarn, 8 ) + AddSchedule( "map_7sectimer", timelimit-7, map_timewarn, 7 ) + AddSchedule( "map_6sectimer", timelimit-6, map_timewarn, 6 ) + AddSchedule( "map_5sectimer", timelimit-5, map_timewarn, 5 ) + AddSchedule( "map_4sectimer", timelimit-4, map_timewarn, 4 ) + AddSchedule( "map_3sectimer", timelimit-3, map_timewarn, 3 ) + AddSchedule( "map_2sectimer", timelimit-2, map_timewarn, 2 ) + AddSchedule( "map_1sectimer", timelimit-1, map_timewarn, 1 ) + AddSchedule( "map_timer", timelimit, map_defenders_win ) +end + +function map_attackers_win( ) + RemoveSchedule( "map_10mintimer" ) + RemoveSchedule( "map_5mintimer" ) + RemoveSchedule( "map_2mintimer" ) + RemoveSchedule( "map_60sectimer" ) + RemoveSchedule( "map_30sectimer" ) + RemoveSchedule( "map_10sectimer" ) + RemoveSchedule( "map_9sectimer" ) + RemoveSchedule( "map_8sectimer" ) + RemoveSchedule( "map_7sectimer" ) + RemoveSchedule( "map_6sectimer" ) + RemoveSchedule( "map_5sectimer" ) + RemoveSchedule( "map_4sectimer" ) + RemoveSchedule( "map_3sectimer" ) + RemoveSchedule( "map_2sectimer" ) + RemoveSchedule( "map_1sectimer" ) + RemoveSchedule( "map_timer" ) + BroadCastSound( "yourteam.flagcap" ) + --BroadCastMessage("#FF_AD_" .. TeamName(ATTACKERS) .. "#FF_WIN") + BroadCastMessage( "#FF_AD_BLUEWIN" ) + --SpeakAll( "AD_" .. TeamName( ATTACKERS ) .. "CAP".. TeamName( DEFENDERS ) ) + SpeakAll( "AD_CAP" ) +end + +function map_defenders_win( ) + if allow_win == false then + return false + end + + --BroadCastSound("yourteam.flagcap") + BroadCastMessage("#FF_AD_REDWIN") + --SpeakAll( "AD_HOLD_" .. TeamName(DEFENDERS) ) + SpeakAll( "AD_HOLD" ) + allow_win = false + --Defenders wins, call Intermission! + phase = NUM_PHASES + RemoveSchedule( "addpoints" ) + addpoints() + AddSchedule( "cap_delay_timer", POSTCAP_TIMER, cap_delay_timer, self ) +end + +function map_timewarn( time ) + BroadCastMessage( "#FF_MAP_" .. time .. "SECWARN" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +function map_cap1( ) + BroadCastSound( "yourteam.flagcap" ) + BroadCastMessage( "#FF_AD_CAP1" ) + SpeakAll( "AD_CP1" ) + --SpeakAll("AD_CP1_" .. TeamName(ATTACKERS)) +end + +function map_cap2( ) + BroadCastSound( "yourteam.flagcap" ) + BroadCastMessage( "#FF_AD_CAP2" ) + SpeakAll( "AD_CP2" ) + --SpeakAll("AD_CP2_" .. TeamName(ATTACKERS)) +end + +function timer_schedule() + current_timer = current_timer -1 +end + +function setup_return_timer() + RemoveSchedule( "timer_tobase_schedule" ) + current_timer = FLAG_RETURN_TIME + + AddScheduleRepeatingNotInfinitely( "timer_return_schedule", 1, timer_schedule, current_timer) +end + +function destroy_return_timer() + RemoveSchedule( "timer_return_schedule" ) +end + +----------------------------------------- +-- spawn info stuffs +----------------------------------------- +function start_allowedmethod( self, player_entity ) + + if ( IsPlayer( player_entity ) == false ) then + return false + end + + local player = CastToPlayer( player_entity ) + local teamId = player:GetTeamId( ) + + return (teamId == ATTACKERS and phase == 1) +end + +function alpha_allowedmethod( self, player_entity ) + if ( IsPlayer( player_entity ) == false ) then + return false + end + + local player = CastToPlayer( player_entity ) + local teamId = player:GetTeamId( ) + + return (teamId == ATTACKERS and phase == 2) + or (teamId == DEFENDERS and phase == 1) +end + +function beta_allowedmethod( self, player_entity ) + if ( IsPlayer( player_entity ) == false ) then + return false + end + + local player = CastToPlayer( player_entity ) + local teamId = player:GetTeamId( ) + + return (teamId == ATTACKERS and phase == 3) + or (teamId == DEFENDERS and phase == 2) +end + +function final_allowedmethod( self, player_entity ) + if ( IsPlayer( player_entity ) == false ) then + return false + end + + local player = CastToPlayer( player_entity ) + local teamId = player:GetTeamId( ) + + return (teamId == DEFENDERS and phase == 3) +end + + +----------------------------------------- +-- instanciate everything +----------------------------------------- +cp1_flag = base_ad_flag:new({ phase = 1 }) +cp2_flag = base_ad_flag:new({ phase = 2 }) +cp3_flag = base_ad_flag:new({ phase = 3 }) + +cp1_cap = base_ad_cap:new({ item={"cp1_flag"}, phase = 1, doorname = "cp2_gate", closedoor = "cp1_exit"}) +cp2_cap = base_ad_cap:new({ item={"cp2_flag"}, phase = 2, doorname = "cp3_gate", closedoor = "cp2_exit"}) +cp3_cap = base_ad_cap:new({ item={"cp3_flag"}, phase = 3, doorname = "", closedoor = "cp3_exit"}) + +start_door = respawndoor:new({allowed = start_allowedmethod}) +start_spawn = {validspawn = start_allowedmethod} +alpha_door = respawndoor:new({allowed = alpha_allowedmethod}) +alpha_spawn = {validspawn = alpha_allowedmethod} +beta_door = respawndoor:new({allowed = beta_allowedmethod}) +beta_spawn = {validspawn = beta_allowedmethod} +final_door = respawndoor:new({allowed = final_allowedmethod}) +final_spawn = {validspawn = final_allowedmethod} + + +------------------------------------------------ +-- hud info +------------------------------------------------ +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + attackers = ATTACKERS + defenders = DEFENDERS + + --RemoveHudItemFromAll( "background" ) + --AddHudIconToAll( "hud_statusbar_256_128.vtf", "background", -64, 32, 128, 70, 3 ) + + RemoveHudItem( player, "cp_flag_c" ) + RemoveHudItem( player, "cp_flag_d" ) + RemoveHudItem( player, "cp_flag_h" ) + RemoveHudItem( player, "flag_tobase_timer" ) + RemoveHudItem( player, "flag_tobase_text" ) + RemoveHudItem( player, "flag_return_timer" ) + RemoveHudItem( player, "flag_return_text" ) + RemoveHudItem( player, "flag_carried_by" ) + RemoveHudItem( player, "flag_carried_by2" ) + RemoveHudItem( player, "flag_athome" ) + RemoveHudItem( player, "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudText(player, "flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudText(player, "flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIcon(player, hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + AddHudText(player, "flag_return_text", "#AD_FlagReturn", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTimer(player, "flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIcon(player, hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudText(player, "flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudText(player, "flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIcon(player, hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + end + + RemoveHudItem( player, "Zone_Team"..attackers ) + RemoveHudItem( player, "Zone_Team"..defenders ) + RemoveHudItem( player, "Zone_Phase"..attackers ) + RemoveHudItem( player, "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + if player:GetTeamId() == attackers then + AddHudIcon( player, "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + else + AddHudIcon( player, "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + end + +end + +function update_hud() + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + attackers = ATTACKERS + defenders = DEFENDERS + + --RemoveHudItemFromAll( "background" ) + --AddHudIconToAll( "hud_statusbar_256_128.vtf", "background", -64, 32, 128, 70, 3 ) + + RemoveHudItemFromAll( "cp_flag_c" ) + RemoveHudItemFromAll( "cp_flag_d" ) + RemoveHudItemFromAll( "cp_flag_h" ) + RemoveHudItemFromAll( "flag_tobase_timer" ) + RemoveHudItemFromAll( "flag_tobase_text" ) + RemoveHudItemFromAll( "flag_return_timer" ) + RemoveHudItemFromAll( "flag_return_text" ) + RemoveHudItemFromAll( "flag_carried_by" ) + RemoveHudItemFromAll( "flag_carried_by2" ) + RemoveHudItemFromAll( "flag_athome" ) + RemoveHudItemFromAll( "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudTextToAll("flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTextToAll("flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIconToAll( hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + AddHudTextToAll("flag_return_text", "#AD_FlagReturn", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTimerToAll("flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIconToAll( hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudTextToAll("flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTextToAll("flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIconToAll( hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + else + AddHudTextToAll("flag_tobase_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTimerToAll("flag_tobase_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIconToAll(hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + + RemoveHudItemFromAll( "Zone_Team"..attackers ) + RemoveHudItemFromAll( "Zone_Team"..defenders ) + RemoveHudItemFromAll( "Zone_Phase"..attackers ) + RemoveHudItemFromAll( "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + AddHudIconToTeam( GetTeam(attackers), "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(attackers), "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + + AddHudIconToTeam( GetTeam(defenders), "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(defenders), "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + +end diff --git a/maps/includes/base_adzone.lua b/maps/includes/base_adzone.lua new file mode 100644 index 0000000..1b2c91e --- /dev/null +++ b/maps/includes/base_adzone.lua @@ -0,0 +1,1105 @@ + +-- base_adzone.lua +-- Attack and Defend the Zone gametype + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") + +----------------------------------------------------------------------------- +-- global overrides that you can do what you want with +----------------------------------------------------------------------------- + +FORT_POINTS_PER_INITIAL_TOUCH = 200 +FORT_POINTS_PER_PERIOD = 50 +FORT_POINTS_PER_DEFEND = 100 + +POINTS_PER_INITIAL_TOUCH = 1 +POINTS_PER_PERIOD = 1 + +DELAY_BEFORE_PERIOD_POINTS = 2 +PERIOD_TIME = 1 +FLAG_RETURN_TIME = 0 +INITIAL_ROUND_PERIOD = 60 + +DELAY_BEFORE_DEFENSE_PERIOD_SCORING = 30 +DEFENSE_PERIOD_TIME = 10 +POINTS_PER_DEFENSE_PERIOD = POINTS_PER_PERIOD -- same as attackers +POINTS_PER_DEFENSE_60SEC_BONUS = POINTS_PER_PERIOD * 5 -- attackers period points * 5 +POINTS_PER_DEFENSE_SHUTOUT = POINTS_PER_DEFENSE_60SEC_BONUS * 10 --default, not used if GET_ROUND_PERIOD_FROM_TIMELIMIT is set to true + +ATTACKERS_OBJECTIVE_ENTITY = nil +DEFENDERS_OBJECTIVE_ENTITY = nil +ENABLE_ATTACKERS_OBJECTIVE = true -- puts attackers objective on the zone +ENABLE_DEFENDERS_OBJECTIVE = true -- puts defenders objective on the zone + +GET_ROUND_PERIOD_FROM_TIMELIMIT = true +NUMBER_OF_ROUNDS = 4 +ROUND_PERIOD = 600 --default, not used if GET_ROUND_PERIOD_FROM_TIMELIMIT is set to true + +ZONE_COLOR = "green" + +USE_ZONE_AREA = true + +NUM_DEFENDER_ONLY_PACKS = 0 + +----------------------------------------------------------------------------- +-- global variables and other shit that shouldn't be messed with +----------------------------------------------------------------------------- + +phase = 1 +zone_status = false +zone_area_status = false +gates_open = false + +current_timer = DELAY_BEFORE_DEFENSE_PERIOD_SCORING +current_seconds = 0 + +attackers = Team.kBlue +defenders = Team.kRed + +scoring_team = Team.kRed + +local teamdata = { + [Team.kBlue] = { skin = "0", beamcolour = "0 0 255" }, + [Team.kRed] = { skin = "1", beamcolour = "255 0 0" } +} + +-- stores attackers in the zone +local zone_collection = Collection() +-- stores attackers in the zone area +local zone_area_collection = Collection() +-- stores if the player has touched the cap point (for 1 touch per death) +local playerTouchedTable = {} + +----------------------------------------------------------------------------- +-- Entity definitions (flags/command points/backpacks etc.) +----------------------------------------------------------------------------- + +-- zone +base_zone_trigger = trigger_ff_script:new({}) +zone = base_zone_trigger:new({}) + +-- area around zone +base_zone_area_trigger = trigger_ff_script:new({}) +zone_area = base_zone_area_trigger:new({}) + +-- respawns +attacker_spawn = info_ff_teamspawn:new({ validspawn = function(self,player) + return player:GetTeamId() == attackers +end }) +defender_spawn = info_ff_teamspawn:new({ validspawn = function(self,player) + return player:GetTeamId() == defenders +end }) + + +----------------------------------------------------------------------------- +-- functions that do sh... stuff +----------------------------------------------------------------------------- + +-- sounds, right? +function precache() + PrecacheSound("otherteam.flagstolen") -- doors open sound + PrecacheSound("otherteam.drop") -- warning sound + PrecacheSound("yourteam.flagreturn") -- scoring sound + PrecacheSound("misc.bloop") -- minutes remaining + PrecacheSound("misc.doop") -- attackers capping sound +end + +-- pretty standard setup, aside from scoring starting +function startup() + + SetGameDescription( "Attack Defend the Zone" ) + + -- set up team limits on each team + SetPlayerLimit( Team.kBlue, 0 ) + SetPlayerLimit( Team.kRed, 0 ) + SetPlayerLimit( Team.kYellow, -1 ) + SetPlayerLimit( Team.kGreen, -1 ) + + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- set class limits + set_classlimits() + + AddSchedule( "round_start", INITIAL_ROUND_PERIOD, round_start) + if INITIAL_ROUND_PERIOD > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_30SecWarning" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_10SecWarning" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_PERIOD - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_PERIOD - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_PERIOD - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_PERIOD - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_PERIOD - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_PERIOD - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_PERIOD - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_PERIOD - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_PERIOD - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_PERIOD - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_PERIOD - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_PERIOD - 1 , schedulecountdown, 1 ) end + + -- get round times if its set to + if GET_ROUND_PERIOD_FROM_TIMELIMIT == true then + local timelimit = GetConvar( "mp_timelimit" ) + -- convert mp_timelimit from minutes to seconds and divide by the number of rounds minus initial round period + ROUND_PERIOD = timelimit * 60 / NUMBER_OF_ROUNDS - INITIAL_ROUND_PERIOD - 1 + POINTS_PER_DEFENSE_SHUTOUT = ROUND_PERIOD / ( 3 / ( POINTS_PER_DEFENSE_PERIOD / 4 ) ) + -- now lock mp_timelimit, so things don't get weird + AddScheduleRepeating( "set_cvar-mp_timelimit", 1, set_cvar, "mp_timelimit", timelimit ) + end + + if ENABLE_ATTACKERS_OBJECTIVE then ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "zone" ) end + if ENABLE_DEFENDERS_OBJECTIVE then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "zone" ) end + + custom_startup() + + current_timer = INITIAL_ROUND_PERIOD + AddScheduleRepeatingNotInfinitely( "timer_schedule", 1, timer_schedule, current_timer ) + + update_zone_text( nil ) + update_zone_status( false ) +end + +----------------------------------------------------------------------------- +-- player_ functions +----------------------------------------------------------------------------- + +-- spawns attackers with flags +function player_spawn( player_entity ) + + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + + player:SetCloakable( true ) + player:SetDisguisable( true ) + + -- nade/detpack limits + set_itemlimits( player ) + + -- wtf, scout or med on d? are you mental? + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + local classt = "Scout" + if player:GetClass() == Player.kMedic then classt = "Medic" end + local id = player:GetId() + AddSchedule("force_changemessage"..id, 2, schedulechangemessage, player, "No "..classt.."s on defense. Autoswitching to Soldier." ) + AddSchedule("force_change"..id, 2, forcechange, player) + end + + -- objective icon + if player:GetTeamId() == attackers then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) + elseif player:GetTeamId() == defenders then + UpdateObjectiveIcon( player, DEFENDERS_OBJECTIVE_ENTITY ) + end + + -- remove any players not on a team from playertouchedtable + for playerx, recordx in pairs(playerTouchedTable) do + if GetPlayerByID( playerx ) then + local playert = GetPlayerByID( playerx ) + if playert:GetTeamId() ~= attackers then + playerTouchedTable[playerx] = nil + end + end + end + + if player:GetTeamId() ~= attackers then return end + + -- add to table and reset touched to 0 + playerTouchedTable[player:GetId()] = {touched = false, allowed = true, points = 0} + +end + +function player_killed( player, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + else + return + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- If player killed self or teammate do nothing + if (player:GetId() == player_attacker:GetId()) or (player:GetTeamId() == player_attacker:GetTeamId()) then + return + end + + -- If player is an attacker, then do stuff + if player:GetTeamId() == attackers then + -- show scored points + BroadCastMessageToPlayer( player, "You scored "..playerTouchedTable[player:GetId()].points.." team points that run" ) + AddScheduleRepeatingNotInfinitely( "timer_return_schedule", .5, BroadCastMessageToPlayer, 4, player, "You scored "..playerTouchedTable[player:GetId()].points.." team points that run") + -- Check if he's in the zone + for playerx in zone_collection.items do + playerx = CastToPlayer(playerx) + if playerx:GetId() == player:GetId() then + player_attacker:AddFortPoints( FORT_POINTS_PER_DEFEND, "Defending the Zone" ) + return + end + end + -- Check if he's in the zone area + for playerx in zone_area_collection.items do + playerx = CastToPlayer(playerx) + if playerx:GetId() == player:GetId() then + if playerTouchedTable[player:GetId()].touched == false then + player_attacker:AddFortPoints( FORT_POINTS_PER_DEFEND * 2, "Denying Attacker from Scoring" ) + else + player_attacker:AddFortPoints( FORT_POINTS_PER_DEFEND / 2, "Defending the Zone Area" ) + end + return + end + end + end + +end + +function player_ondamage( player, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Get Damage Force + local damage = damageinfo:GetDamage() + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + else + return + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- If player killed self or teammate do nothing + if (player:GetId() == player_attacker:GetId()) or (player:GetTeamId() == player_attacker:GetTeamId()) then + return + end + + -- If player (victim) is an attacker, then do stuff + if player:GetTeamId() == attackers then + -- Check if he's in the zone + for playerx in zone_collection.items do + playerx = CastToPlayer(playerx) + if playerx:GetId() == player:GetId() then + if (damage > 100) then damage = 100 end + player_attacker:AddFortPoints( damage, "Protecting the Zone" ) + return + end + end + -- Check if he's in the zone area + for playerx in zone_area_collection.items do + playerx = CastToPlayer(playerx) + if playerx:GetId() == player:GetId() then + if (damage > 50) then damage = 50 end + player_attacker:AddFortPoints( damage, "Protecting the Zone Area" ) + return + end + end + end + +end + +----------------------------------------------------------------------------- +-- zone triggers +----------------------------------------------------------------------------- + +-- only attackers! +function base_zone_trigger:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == attackers then + if not gates_open then return EVENT_DISALLOWED end + return EVENT_ALLOWED + end + if player:GetTeamId() == defenders then + BroadCastMessageToPlayer( player, "ADZ_Defend" ) + return EVENT_DISALLOWED + end + end + return EVENT_DISALLOWED +end + +-- registers attackers as they enter the zone +function base_zone_trigger:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + player:SetCloakable( false ) + player:SetDisguisable( false ) + + local playerid = player:GetId() + zone_collection:AddItem( player ) + + local team = GetTeam(attackers) + -- if it's the first touch, give points and stuff + if playerTouchedTable[playerid].touched == false then + team:AddScore( POINTS_PER_INITIAL_TOUCH ) + player:AddFortPoints( FORT_POINTS_PER_INITIAL_TOUCH, "Initial Point Touch" ) + + RemoveSchedule( "shutout" ) -- O scores, no D shutout (put in all O scoring spots for safety, haha) + + SmartTeamSound( GetTeam(defenders), "yourteam.flagreturn", "misc.doop" ) + + playerTouchedTable[playerid].touched = true + playerTouchedTable[playerid].points = playerTouchedTable[playerid].points + POINTS_PER_INITIAL_TOUCH + + if zone_collection:Count() == 1 then + AddSchedule( "period_init", DELAY_BEFORE_PERIOD_POINTS, init_scoring, team ) + end + elseif zone_collection:Count() == 1 then + SmartTeamSound( GetTeam(defenders), "otherteam.drop", nil ) + end + if zone_collection:Count() == 1 then + -- activate the cap point, bro + zone_turnon() + end + + update_zone_status( true ) + + end +end + +-- deregisters attackers as they leave the zone +function base_zone_trigger:onendtouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + player:SetCloakable( true ) + player:SetDisguisable( true ) + + zone_collection:RemoveItem( player ) + end +end + +-- clear collection and start defender points when everyone's left +function base_zone_trigger:oninactive( ) + -- Clear out the flags in the collection + zone_collection:RemoveAllItems() + init_defender_countdown() + zone_turnoff() + update_zone_status( false ) +end + +----------------------------------------------------------------------------- +-- zone area triggers +----------------------------------------------------------------------------- + +-- only attackers! +function base_zone_area_trigger:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == attackers then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +-- registers attackers as they enter the zone area +function base_zone_area_trigger:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() == defenders then return end + update_zone_area_status( true ) + zone_area_collection:AddItem( player ) + end +end + +-- registers attackers as they enter the zone area +function base_zone_area_trigger:onendtouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() == defenders then return end + zone_area_collection:RemoveItem( player ) + end +end + +-- updates the hud if no one is in the zone area. +function base_zone_area_trigger:oninactive() + update_zone_area_status( false ) + zone_area_collection:RemoveAllItems() +end + + +----------------------------------------------------------------------------- +-- zone functions +----------------------------------------------------------------------------- + +function update_zone_status( on ) + RemoveHudItemFromAll( "Zone_Status" ) + if on then + AddHudIconToAll( "hud_zone_on_"..ZONE_COLOR..".vtf", "Zone_Status", -64, 32, 88, 88, 3 ) + zone_status = true; + else + AddHudIconToAll( "hud_zone_off.vtf", "Zone_Status", -64, 32, 88, 88, 3 ) + zone_status = false; + end + update_zone_text( nil ) +end + +function update_zone_area_status( on ) + if USE_ZONE_AREA then + RemoveHudItemFromAll( "Zone_Area_Status" ) + if on then + AddHudIconToAll( "hud_zone_area_active_"..ZONE_COLOR..".vtf", "Zone_Area_Status", -56, 40, 72, 72, 3 ) + zone_area_status = true; + else + AddHudIconToAll( "hud_zone_area_inactive.vtf", "Zone_Area_Status", -56, 40, 72, 72, 3 ) + zone_area_status = false; + end + end +end + +function flaginfo( player_entity ) + local player = CastToPlayer( player_entity ) + RemoveHudItem( player, "Zone_Status" ) + RemoveHudItem( player, "Zone_Area_Status" ) + if USE_ZONE_AREA then + if zone_area_status then + AddHudIcon( player, "hud_zone_area_active_"..ZONE_COLOR..".vtf", "Zone_Area_Status", -56, 40, 72, 72, 3 ) + else + AddHudIcon( player, "hud_zone_area_inactive.vtf", "Zone_Area_Status", -56, 40, 72, 72, 3 ) + end + end + if zone_status then + AddHudIcon( player, "hud_zone_on_"..ZONE_COLOR..".vtf", "Zone_Status", -64, 32, 88, 88, 3 ) + else + AddHudIcon( player, "hud_zone_off.vtf", "Zone_Status", -64, 32, 88, 88, 3 ) + end + update_zone_text( player ) + update_round_info( player ) +end + +function zone_turnon( ) + zone_on_outputs() + + -- init attacker scoring + AddSchedule( "period_init", DELAY_BEFORE_PERIOD_POINTS, init_scoring, team ) + AddSchedule( "period_init_alarm", DELAY_BEFORE_PERIOD_POINTS - 1, init_scoring_alarm ) + -- stop defender point countdown + DeleteSchedule( "timer_schedule" ) + RemoveSchedule( "defenders_period_scoring" ) + RemoveSchedule( "init_defenders_period_scoring" ) +end +function zone_turnoff( ) + zone_off_outputs() + + -- stop attacker scoring + DeleteSchedule( "period_init" ) + DeleteSchedule( "period_init_alarm" ) + DeleteSchedule( "period_scoring" ) + zone_scoring = false +end + +function update_zone_text( player ) + local text_align = 4 + local text_x = 40 + local text_line1y = 84 + local text_line2y = text_line1y + 8 + local text_line3y = text_line2y + 8 + + if IsPlayer( player ) then + -- defender period scoring text and timer + RemoveHudItem(player, "defender_points_timer") + RemoveHudItem(player, "defender_points_text") + RemoveHudItem(player, "defender_points_text2") + -- attackers in the zone text + RemoveHudItem(player, "attackers_in_text") + RemoveHudItem(player, "attackers_in_text2") + RemoveHudItem(player, "attackers_in_text3") + -- gates open in text and timer + RemoveHudItem(player, "gates_open_text") + RemoveHudItem(player, "gates_open_text2") + RemoveHudItem(player, "gates_open_timer") + if gates_open == true then + if not zone_status then + AddHudText( player, "defender_points_text", "#FF_Defenders", text_x, text_line1y, text_align ) + AddHudText( player, "defender_points_text2", "#ADZ_ScoreNotice", text_x, text_line2y, text_align ) + AddHudTimer( player, "defender_points_timer", current_timer +1, -1, text_x, text_line3y, text_align ) + else + AddHudText( player, "attackers_in_text", "#FF_Attackers", text_x, text_line1y, text_align ) + AddHudText( player, "attackers_in_text2", "#ADZ_AreIn", text_x, text_line2y, text_align ) + AddHudText( player, "attackers_in_text3", "#ADZ_TheZone", text_x, text_line3y, text_align ) + end + else + AddHudText( player, "gates_open_text", "#ADZ_GATES", text_x, text_line1y, text_align ) + AddHudText( player, "gates_open_text2", "#ADZ_OPENIN", text_x, text_line2y, text_align ) + AddHudTimer( player, "gates_open_timer", current_timer, -1, text_x, text_line3y, text_align ) + end + else + -- defender period scoring text and timer + RemoveHudItemFromAll("defender_points_timer") + RemoveHudItemFromAll("defender_points_text") + RemoveHudItemFromAll("defender_points_text2") + -- attackers in the zone text + RemoveHudItemFromAll("attackers_in_text") + RemoveHudItemFromAll("attackers_in_text2") + RemoveHudItemFromAll("attackers_in_text3") + -- gates open in text and timer + RemoveHudItemFromAll("gates_open_text") + RemoveHudItemFromAll("gates_open_text2") + RemoveHudItemFromAll("gates_open_timer") + if gates_open == true then + if not zone_status then + AddHudTextToAll( "defender_points_text", "#FF_Defenders", text_x, text_line1y, text_align ) + AddHudTextToAll( "defender_points_text2", "#ADZ_ScoreNotice", text_x, text_line2y, text_align ) + AddHudTimerToAll( "defender_points_timer", current_timer +1, -1, text_x, text_line3y, text_align ) + else + AddHudTextToAll( "attackers_in_text", "#FF_Attackers", text_x, text_line1y, text_align ) + AddHudTextToAll( "attackers_in_text2", "#ADZ_AreIn", text_x, text_line2y, text_align ) + AddHudTextToAll( "attackers_in_text3", "#ADZ_TheZone", text_x, text_line3y, text_align ) + end + else + AddHudTextToAll( "gates_open_text", "#ADZ_GATES", text_x, text_line1y, text_align ) + AddHudTextToAll( "gates_open_text2", "#ADZ_OPENIN", text_x, text_line2y, text_align ) + AddHudTimerToAll( "gates_open_timer", current_timer, -1, text_x, text_line3y, text_align ) + end + end +end + +function update_round_info( player ) + + RemoveHudItem( player, "Zone_Round" ) + RemoveHudItem( player, "Zone_Team"..attackers ) + RemoveHudItem( player, "Zone_Team"..defenders ) + RemoveHudItem( player, "Zone_Phase"..attackers ) + RemoveHudItem( player, "Zone_Phase"..defenders ) + + od_hudstatusiconx = 28 + od_hudstatusicony = 48 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + AddHudText( player, "Zone_Round", "#ADZ_Round", od_hudstatusiconx + od_hudstatusiconw / 2, od_hudstatusicony - 10, 4 ) + if player:GetTeamId() == attackers then + AddHudIcon( player, "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + elseif player:GetTeamId() == defenders then + AddHudIcon( player, "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + end + +end + +function init_defender_countdown() + -- init defender scoring + current_timer = DELAY_BEFORE_DEFENSE_PERIOD_SCORING + RemoveSchedule( "timer_schedule" ) + AddScheduleRepeatingNotInfinitely( "timer_schedule", 1, timer_schedule, current_timer ) + AddSchedule( "init_defenders_period_scoring", current_timer, init_defenders_period_scoring ) +end + +----------------------------------------------------------------------------- +-- Scheduled functions that do stuff +----------------------------------------------------------------------------- + +-- Sends a message to all after the determined time +function schedulechangemessage( player, message ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + BroadCastMessageToPlayer( player, message ) + end +end + +-- force a scout/med to switch to soli if they haven't +function forcechange( player ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + ApplyToPlayer( player, { AT.kChangeClassSoldier, AT.kRespawnPlayers } ) + end +end + +-- Sends a message to all after the determined time +function schedulemessagetoall( message ) + BroadCastMessage( message ) +end + +-- Plays a sound to all after the determined time +function schedulesound( sound ) + BroadCastSound( sound ) +end + + +function schedulecountdown( time ) + BroadCastMessage( ""..time.."" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +function timer_schedule() + current_timer = current_timer -1 +end + +----------------------------------------------------------------------------- +-- Scoring +----------------------------------------------------------------------------- + +-- Adds points based on time inside cap room and number of attackers inside cap room +function period_scoring( team ) + team:AddScore( POINTS_PER_PERIOD ) + SmartTeamSound( GetTeam(defenders), "yourteam.flagreturn", "misc.doop" ) + + for player in zone_collection.items do + player = CastToPlayer(player) + + if player ~= nil then + player:AddFortPoints( FORT_POINTS_PER_PERIOD, "Touching the Point" ) + playerTouchedTable[player:GetId()].points = playerTouchedTable[player:GetId()].points + POINTS_PER_PERIOD + else + ConsoleToAll("LUA ERROR: player_addfortpoints: Unable to find player") + end + end +end + +-- Initializes the period_scoring (allows for a delay after initial touch) +function init_scoring( team ) + if zone_collection:Count() > 0 then + team:AddScore( POINTS_PER_PERIOD ) + AddScheduleRepeating( "period_scoring", PERIOD_TIME, period_scoring, team) + + for player in zone_collection.items do + player = CastToPlayer(player) + if player ~= nil then + player:AddFortPoints( FORT_POINTS_PER_PERIOD, "Touching the Point" ) + playerTouchedTable[player:GetId()].points = playerTouchedTable[player:GetId()].points + POINTS_PER_PERIOD + else + ConsoleToAll("LUA ERROR: player_addfortpoints: Unable to find player") + end + end + end +end + +-- Initializes the period_scoring (allows for a delay after initial touch) +function init_scoring_alarm( ) + if zone_collection:Count() > 0 then + SmartTeamSound( GetTeam(defenders), "otherteam.drop", nil ) + end +end + +function init_defenders_period_scoring() + local team = GetTeam( defenders ) + team:AddScore( POINTS_PER_DEFENSE_PERIOD ) + SmartTeamSound( GetTeam(attackers), "yourteam.flagreturn", "misc.doop" ) + + current_seconds = 30 + + AddScheduleRepeating( "defenders_period_scoring", DEFENSE_PERIOD_TIME, defenders_period_scoring ) + current_timer = DEFENSE_PERIOD_TIME + RemoveSchedule( "timer_schedule" ) + AddScheduleRepeatingNotInfinitely( "timer_schedule", 1, timer_schedule, current_timer ) + update_zone_text( nil ) +end + +function defenders_period_scoring( ) + local team = GetTeam( defenders ) + team:AddScore( POINTS_PER_DEFENSE_PERIOD ) + SmartTeamSound( GetTeam(attackers), "yourteam.flagreturn", "misc.doop" ) + + if current_seconds >= 60 then + BroadCastMessage( "Defenders get "..POINTS_PER_DEFENSE_60SEC_BONUS.." bonus points" ) + team:AddScore( POINTS_PER_DEFENSE_60SEC_BONUS ) + current_seconds = 0 + else + current_seconds = current_seconds + 10 + end + + current_timer = DEFENSE_PERIOD_TIME + RemoveSchedule( "timer_schedule" ) + AddScheduleRepeatingNotInfinitely( "timer_schedule", 1, timer_schedule, current_timer ) + update_zone_text( nil ) +end + +function shutout( ) + + -- attackers instead of defenders, because the teams switched + local teamid = attackers + + -- but after the last round, use defenders + if phase >= NUMBER_OF_ROUNDS then + teamid = defenders + end + + local team = GetTeam( teamid ) + AddSchedule( "defenders_shutout_msg", 3, BroadCastMessage, "#ADZ_NoScore" ) + team:AddScore( POINTS_PER_DEFENSE_SHUTOUT ) +end + +----------------------------------------------------------------------------- +-- Round start/end +----------------------------------------------------------------------------- + +-- Opens the gates and schedules the round's end. +function round_start() + -- Opens the gates and all that lovely stuff + OpenDoor("frontgate") + BroadCastMessage( "#FF_AD_GATESOPEN" ) + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) + + gates_open = true + + openstartdoor() + + AddSchedule( "round_end", ROUND_PERIOD, round_end) + AddSchedule( "shutout", ROUND_PERIOD, shutout) + init_defender_countdown() + update_zone_status( false ) + + if phase < NUMBER_OF_ROUNDS then + -- Sets up the end of a round, and the appropriate timed messages + if ROUND_PERIOD > 300 then AddSchedule( "phase" .. phase .. "5minwarn" , ROUND_PERIOD - 300 , schedulemessagetoall, "#ADZ_Switch5Min" ) end + if ROUND_PERIOD > 120 then AddSchedule( "phase" .. phase .. "2minwarn" , ROUND_PERIOD - 120 , schedulemessagetoall, "#ADZ_Switch2Min" ) end + if ROUND_PERIOD > 60 then AddSchedule( "phase" .. phase .. "1minwarn" , ROUND_PERIOD - 60 , schedulemessagetoall, "#ADZ_Switch1Min" ) end + if ROUND_PERIOD > 30 then AddSchedule( "phase" .. phase .. "30secwarn" , ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_Switch30Sec" ) end + if ROUND_PERIOD > 10 then AddSchedule( "phase" .. phase .. "10secwarn" , ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_Switch10Sec" ) end + if ROUND_PERIOD > 5 then AddSchedule( "phase" .. phase .. "5secwarn" , ROUND_PERIOD - 5 , schedulemessagetoall, "5" ) end + if ROUND_PERIOD > 4 then AddSchedule( "phase" .. phase .. "4secwarn" , ROUND_PERIOD - 4 , schedulemessagetoall, "4" ) end + if ROUND_PERIOD > 3 then AddSchedule( "phase" .. phase .. "3secwarn" , ROUND_PERIOD - 3, schedulemessagetoall, "3" ) end + if ROUND_PERIOD > 2 then AddSchedule( "phase" .. phase .. "2secwarn" , ROUND_PERIOD - 2, schedulemessagetoall, "2" ) end + if ROUND_PERIOD > 1 then AddSchedule( "phase" .. phase .. "1secwarn" , ROUND_PERIOD - 1, schedulemessagetoall, "1" ) end + AddSchedule( "phase" .. phase .. "switchmessage" , ROUND_PERIOD, schedulemessagetoall, "#ADZ_Switch" ) + else + if ROUND_PERIOD > 300 then AddSchedule( "phase" .. phase .. "5minwarn" , ROUND_PERIOD - 300 , schedulemessagetoall, "#ADZ_End5Min" ) end + if ROUND_PERIOD > 120 then AddSchedule( "phase" .. phase .. "2minwarn" , ROUND_PERIOD - 120 , schedulemessagetoall, "#ADZ_End2Min" ) end + if ROUND_PERIOD > 60 then AddSchedule( "phase" .. phase .. "1minwarn" , ROUND_PERIOD - 60 , schedulemessagetoall, "#ADZ_End1Min" ) end + if ROUND_PERIOD > 30 then AddSchedule( "phase" .. phase .. "30secwarn" , ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_End30Sec" ) end + if ROUND_PERIOD > 10 then AddSchedule( "phase" .. phase .. "10secwarn" , ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_End10Sec" ) end + if ROUND_PERIOD > 5 then AddSchedule( "phase" .. phase .. "5secwarn" , ROUND_PERIOD - 5 , schedulemessagetoall, "5" ) end + if ROUND_PERIOD > 4 then AddSchedule( "phase" .. phase .. "4secwarn" , ROUND_PERIOD - 4 , schedulemessagetoall, "4" ) end + if ROUND_PERIOD > 3 then AddSchedule( "phase" .. phase .. "3secwarn" , ROUND_PERIOD - 3, schedulemessagetoall, "3" ) end + if ROUND_PERIOD > 2 then AddSchedule( "phase" .. phase .. "2secwarn" , ROUND_PERIOD - 2, schedulemessagetoall, "2" ) end + if ROUND_PERIOD > 1 then AddSchedule( "phase" .. phase .. "1secwarn" , ROUND_PERIOD - 1, schedulemessagetoall, "1" ) end + end + + -- sounds + if ROUND_PERIOD > 300 then AddSchedule( "phase" .. phase .. "5minwarnsound" , ROUND_PERIOD - 300 , schedulesound, "misc.bloop" ) end + if ROUND_PERIOD > 120 then AddSchedule( "phase" .. phase .. "2minwarnsound" , ROUND_PERIOD - 120 , schedulesound, "misc.bloop" ) end + if ROUND_PERIOD > 60 then AddSchedule( "phase" .. phase .. "1minwarnsound" , ROUND_PERIOD - 60 , schedulesound, "misc.bloop" ) end + if ROUND_PERIOD > 30 then AddSchedule( "phase" .. phase .. "30secwarnsound" , ROUND_PERIOD - 30 , schedulesound, "misc.bloop" ) end + if ROUND_PERIOD > 10 then AddSchedule( "phase" .. phase .. "10secwarnsound" , ROUND_PERIOD - 10 , schedulesound, "misc.bloop" ) end + if ROUND_PERIOD > 5 then AddSchedule( "phase" .. phase .. "5secwarnsound" , ROUND_PERIOD - 5 , schedulecountdown, 5 ) end + if ROUND_PERIOD > 4 then AddSchedule( "phase" .. phase .. "4secwarnsound" , ROUND_PERIOD - 4 , schedulecountdown, 4 ) end + if ROUND_PERIOD > 3 then AddSchedule( "phase" .. phase .. "3secwarnsound" , ROUND_PERIOD - 3 , schedulecountdown, 3 ) end + if ROUND_PERIOD > 2 then AddSchedule( "phase" .. phase .. "2secwarnsound" , ROUND_PERIOD - 2 , schedulecountdown, 2 ) end + if ROUND_PERIOD > 1 then AddSchedule( "phase" .. phase .. "1secwarnsound" , ROUND_PERIOD - 1 , schedulecountdown, 1 ) end + +end + +-- Checks to see if it's the first or second round, then either swaps teams, or ends the game. +function round_end() + + if phase == NUMBER_OF_ROUNDS then + DeleteSchedule( "period_scoring" ) + DeleteSchedule( "defenders_period_scoring" ) + DeleteSchedule( "init_defenders_period_scoring" ) + DeleteSchedule( "set_cvar-mp_timelimit" ) + update_zone_text( nil ) + GoToIntermission() + return + else + phase = phase + 1 + gates_open = false + end + + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + + onswitch_bluetodef() + else + attackers = Team.kBlue + defenders = Team.kRed + + onswitch_redtodef() + end + + -- switches some prop model's skins so teams spawn in appropriatly-coloured rooms. + OutputEvent( "prop_defender", "Skin", teamdata[defenders].skin ) + OutputEvent( "prop_attacker", "Skin", teamdata[attackers].skin ) + + -- reset the doors + CloseDoor("frontgate") + attacker_door_trigger = adz_door:new({ team = attackers, door = "attacker_door" }) + defender_door_trigger = adz_door:new({ team = defenders, door = "defender_door" }) + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- reset schedules + DeleteSchedule( "period_scoring" ) + DeleteSchedule( "period_init" ) + DeleteSchedule( "defenders_period_scoring" ) + DeleteSchedule( "init_defenders_period_scoring" ) + AddSchedule( "round_start", INITIAL_ROUND_PERIOD, round_start) + -- gate timer + current_timer = INITIAL_ROUND_PERIOD + AddScheduleRepeatingNotInfinitely( "timer_schedule", 1, timer_schedule, current_timer ) + + -- reset player touched table + playerTouchedTable = {} + -- remove all leftovers from the cap point collection + zone_collection:RemoveAllItems() + zone_area_collection:RemoveAllItems() + -- respawn, obviously + RespawnAllPlayers() + + -- switch pack touchflags + if NUM_DEFENDER_ONLY_PACKS > 0 then + -- get correct allow flags + if defenders == Team.kRed then pack_allowflags = AllowFlags.kRed + elseif defenders == Team.kBlue then pack_allowflags = AllowFlags.kBlue + elseif defenders == Team.kGreen then pack_allowflags = AllowFlags.kGreen + elseif defenders == Team.kYellow then pack_allowflags = AllowFlags.kYellow end + + -- this is a workaround due to how the touchflags are set in base.lua + for i=1,NUM_DEFENDER_ONLY_PACKS do + entity = GetEntityByName( "adz_pack_defender"..i ) + local info = CastToInfoScript( entity ) + info:SetTouchFlags({ pack_allowflags }) + end + end + + -- MORE scheduled message loveliness. + if INITIAL_ROUND_PERIOD > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_30SecWarning" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_10SecWarning" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5sec" , INITIAL_ROUND_PERIOD - 5 , schedulemessagetoall, "5" ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4sec" , INITIAL_ROUND_PERIOD - 4 , schedulemessagetoall, "4" ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3sec" , INITIAL_ROUND_PERIOD - 3, schedulemessagetoall, "3" ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2sec" , INITIAL_ROUND_PERIOD - 2, schedulemessagetoall, "2" ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1sec" , INITIAL_ROUND_PERIOD - 1, schedulemessagetoall, "1" ) end + + -- sounds + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_PERIOD - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_PERIOD - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_PERIOD - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_PERIOD - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_PERIOD - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_PERIOD - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_PERIOD - 1 , schedulecountdown, 1 ) end + + -- clear them zones + update_zone_status( false ) + zone_turnoff() + + set_classlimits() + onswitch() +end + +-- I dunno, does something, not sure what! +function RespawnAllPlayers() + ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips, AT.kAllowRespawn, AT.kReturnDroppedItems }) +end + +----------------------------------------------------------------------------- +-- output functions +----------------------------------------------------------------------------- + +function custom_startup() + return +end + +function zone_on_outputs() + OutputEvent( "zone_alarm", "PlaySound" ) + OutputEvent( "zone_light", "TurnOn" ) + OutputEvent( "zone_spot", "LightOn" ) + OutputEvent( "zone_rotate_clock", "Start" ) + OutputEvent( "zone_rotate_counterclock", "Start" ) + OutputEvent( "zone_tesla", "DoSpark" ) +end +function zone_off_outputs() + OutputEvent( "zone_alarm", "StopSound" ) + OutputEvent( "zone_light", "TurnOff" ) + OutputEvent( "zone_spot", "LightOff" ) + OutputEvent( "zone_rotate_clock", "Stop" ) + OutputEvent( "zone_rotate_counterclock", "Stop" ) +end +function onswitch_bluetodef() +end +function onswitch_redtodef() + return +end +function onswitch() + return +end +function openstartdoor() + return +end +function onreset_outputs() + return +end +function set_classlimits() + -- reset them limits + local team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, 0) + team:SetClassLimit(Player.kMedic, 0) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) +end +function set_itemlimits( player ) + player:RemoveAmmo( Ammo.kManCannon, 1 ) + -- give demo 1 mirv, and only 1 mirv + if player:GetClass() == Player.kDemoman or player:GetClass() == Player.kEngineer then + player:RemoveAmmo( Ammo.kGren2, 4 ) + player:AddAmmo( Ammo.kGren2, 1 ) + end + if player:GetTeamId() == defenders then + player:RemoveAmmo( Ammo.kDetpack, 1 ) + end +end + +----------------------------------------------------------------------------- +-- respawn shields +----------------------------------------------------------------------------- +hurt = trigger_ff_script:new({ team = Team.kUnassigned }) +function hurt:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == attackers then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +-- red lasers hurt blue and vice-versa + +red_laser_hurt = hurt:new({ team = Team.kBlue }) +blue_laser_hurt = hurt:new({ team = Team.kRed }) + +----------------------------------------------------------------------------- +-- backpacks, doors, etc. etc. +----------------------------------------------------------------------------- + +adz_pack = genericbackpack:new({ + health = 35, + armor = 35, + grenades = 20, + nails = 50, + shells = 300, + rockets = 15, + gren1 = 1, + gren2 = 0, + cells = 120, + respawntime = 10, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch"}) + +function adz_pack:dropatspawn() return false end + +if defenders == Team.kRed then pack_allowflags = AllowFlags.kRed +elseif defenders == Team.kBlue then pack_allowflags = AllowFlags.kBlue +elseif defenders == Team.kGreen then pack_allowflags = AllowFlags.kGreen +elseif defenders == Team.kYellow then pack_allowflags = AllowFlags.kYellow end + +adz_pack_defender1 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender2 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender3 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender4 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender5 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender6 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender7 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender8 = adz_pack:new({ touchflags = {pack_allowflags} }) +adz_pack_defender9 = adz_pack:new({ touchflags = {pack_allowflags} }) + +adz_defender_pack1 = adz_pack_defender1 +adz_defender_pack2 = adz_pack_defender2 +adz_defender_pack3 = adz_pack_defender3 +adz_defender_pack4 = adz_pack_defender4 +adz_defender_pack5 = adz_pack_defender5 +adz_defender_pack6 = adz_pack_defender6 +adz_defender_pack7 = adz_pack_defender7 +adz_defender_pack8 = adz_pack_defender8 +adz_defender_pack9 = adz_pack_defender9 + +------------------------------------------------------------------ +--Resup Doors +------------------------------------------------------------------ + +adz_door = trigger_ff_script:new({ team = Team.kUnassigned, door = nil }) + +function adz_door:allowed( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + return player:GetTeamId() == self.team + end + + return EVENT_DISALLOWED +end + +function adz_door:ontrigger( touch_entity ) + if IsPlayer( touch_entity ) then + OutputEvent(self.door, "Open") + end +end + +attacker_door_trigger = adz_door:new({ team = attackers, door = "attacker_door" }) +defender_door_trigger = adz_door:new({ team = defenders, door = "defender_door" }) \ No newline at end of file diff --git a/maps/includes/base_chatcommands.lua b/maps/includes/base_chatcommands.lua new file mode 100644 index 0000000..c297df3 --- /dev/null +++ b/maps/includes/base_chatcommands.lua @@ -0,0 +1,457 @@ +--[[ +================================================================================================================ +== base_chatcommands.lua +== -- Allows maps to use player chat as commands to perform +== -- various functions +================================================================================================================ +== Instructions +== -- To add commands: +=~~ Code: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +chatbase_addcommand( "commandname", "Command description", "command example" ) +function chat_commandname( player, parameter1, parameter2, ... ) + -- perform some task +end +=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +== -- The description and example parameters are both optional +== -- Do NOT put the command prefix in either the example or the commandname parameters +== -- The player parameter will always get sent to chat_commandname functions, but the others are optional +== -- Parameters are sent by players in this format !commandname param1 param2 ... +== -- +== -- To add player settings: +=~~ Code: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +chatbase_addplayersetting( "settingname", default_value, "Setting description" ) +=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +== -- The description is optional +== -- +== -- To get a setting value for a player: +=~~ Code: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +chatbase_getplayersetting( player, "settingname" ) +=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +== -- +== -- To set a setting value for a player: +=~~ Code: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +chatbase_setplayersetting( player, "settingname", value ) +=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= +== -- +== -- Settings: +== -- -- The settings below should be copied, pasted, and altered into your maps .lua if you want to +== -- -- change any of them +================================================================================================================ +]]-- + +-- chat command settings +CHAT_COMMAND_PREFIX = "!" -- Command prefix, all commands must start with this string +CHAT_COMMAND_HIDECHATSTRING = true -- Determines if the chat string is shown if it executes a command +CHAT_COMMAND_DISABLE_PERIODIC_NOTIFY = false -- If false, the server will notify players that chat commands + -- are enabled for the map ONLY IF non-default chat commands exist +CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT = 0 -- Number of times to repeat the notification (set to -1 for infinite) +CHAT_COMMAND_PERIODIC_NOTIFY_PERIOD = 60 -- Time between notifications (in seconds) + +-- theme settings +-- 0 = orange 1 = blue 2 = red 3 = yellow 4 = green +-- 5 = white 6 = black 7 = gray 8 = purple 9 = teal +CHAT_COMMAND_COLOR_MAIN = 0 -- used most often +CHAT_COMMAND_COLOR_HIGHLIGHT1 = 5 -- used to emphasize something +CHAT_COMMAND_COLOR_HIGHLIGHT2 = 5 -- used to emphasize something +CHAT_COMMAND_COLOR_HIGHLIGHT3 = 5 -- used to emphasize something +CHAT_COMMAND_COLOR_ERROR = 2 -- used for error messages + +-- chat command debug settings +CHAT_COMMAND_DEBUG = false +CHAT_COMMAND_DEBUG_PREFIX = "[lua-chatcommands] " + +--[[ +===================================== +== GLOBAL VARS +===================================== +== Do NOT edit these unless you know +== exactly what you're doing +===================================== +]]-- + +-- chat commands global table +chatbase_commands = {} +chatbase_players = {} +chatbase_settings = {} + +chatbase_defaultcommands = {"help","disablenotify"} + +--[[ +===================================== +== CHAT COMMAND FUNCTIONS +===================================== +== +===================================== +]]-- + +------------------------------------- +-- Setup +------------------------------------- + +function chatbase_addcommand( command, description, example ) + chatbase_debug( "Adding command "..tostring(command).." with desc "..tostring(description).." and example "..tostring(example) ) + chatbase_commands[command] = {} + chatbase_commands[command].description = description + chatbase_commands[command].example = example +end + +function chatbase_addplayersetting( setting, default, description ) + chatbase_debug( "Adding setting "..tostring(setting).." with default "..tostring(default).." and desc "..tostring(description) ) + chatbase_settings[setting] = {} + chatbase_settings[setting].default = default + chatbase_settings[setting].description = description +end + +------------------------------------- +-- Utilities +------------------------------------- + +function chatbase_customcommandsexist() + -- check that non-default commands exist + chatbase_debug("Checking if custom commands exist") + local nondefexist = false + for command,values in pairs(chatbase_commands) do + local found = false + chatbase_debug("Checking command "..tostring(command)) + for i,defcommand in pairs(chatbase_defaultcommands) do + chatbase_debug(" -> Against default command "..tostring(defcommand)) + if defcommand == command then + chatbase_debug("Command "..tostring(command).." is default") + found = true + end + end + if not found then + chatbase_debug("Command "..tostring(command).." is not default") + nondefexist = true + break; + end + end + + chatbase_debug("Custom commands exist: "..tostring(nondefexist)) + return nondefexist; +end + +------------------------------------- +-- Notifications +------------------------------------- + +function chatbase_setupnotify() + chatbase_debug("setupnotify called") + -- if notifications are completely disabled, return early + if CHAT_COMMAND_DISABLE_PERIODIC_NOTIFY then return end + chatbase_debug("setupnotify got past disabled check") + + -- if only default commands exist, then theres no reason to notify + if not chatbase_customcommandsexist() then return end + chatbase_debug("setupnotify got past custom commands check") + + -- call a function that will notify anyone that meets the requirements every NOTIFY_PERIOD + AddScheduleRepeating( "chatbase_notifyenabled", CHAT_COMMAND_PERIODIC_NOTIFY_PERIOD, chatbase_notifyenabled ) +end + +-- wait 10 seconds to setup notification, just to be safe that all commands are registered +AddSchedule("chatbase_setupnotify", 10, chatbase_setupnotify) + +function chatbase_notifyenabled() + chatbase_debug("notifyenabled called") + -- if notifications are completely disabled, return early + if CHAT_COMMAND_DISABLE_PERIODIC_NOTIFY then return end + chatbase_debug("notifyenabled got past disabled check") + + -- if only default commands exist, then theres no reason to notify + if not chatbase_customcommandsexist() then return end + chatbase_debug("notifyenabled got past custom commands check") + + -- notify any players that deserve it + for i,v in pairs(chatbase_players) do + chatbase_debug("checking player ID "..i) + local player = CastToPlayer(v.player) + if IsPlayer(player) then + chatbase_debug("--> IsPlayer") + -- only notify if they havent set their setting to disable notifications + if v.settings["disablenotify"] ~= true then + chatbase_debug("--> disablenotify not true | REPEAT: "..CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT.." numtimesnotified: "..tostring(v.settings["numtimesnotified"])) + -- check repeat type + if CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT == 0 and v.settings["numtimesnotified"] == 0 then + -- only show once + v.settings["numtimesnotified"] = v.settings["numtimesnotified"]+1 + chatbase_notifyplayer(player) + end + if CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT > 0 and v.settings["numtimesnotified"] <= CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT then + -- repeat a set number of times + v.settings["numtimesnotified"] = v.settings["numtimesnotified"]+1 + chatbase_notifyplayer(player) + end + if CHAT_COMMAND_PERIODIC_NOTIFY_REPEAT < 0 then + -- repeat infinitely (var is set to a negative number) + v.settings["numtimesnotified"] = v.settings["numtimesnotified"]+1 + chatbase_notifyplayer(player) + end + end + end + end +end + +function chatbase_notifyplayer(player) + if not IsPlayer(player) then chatbase_error("function chatbase_notifyplayer: Notifying a nonplayer"); return; end + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Chat commands are enabled for this map. Type "..CHAT_COMMAND_PREFIX.."help to see what is available") +end + +------------------------------------- +-- Player Table Functions +------------------------------------- + +function chatbase_addplayer(player) + if not IsPlayer(player) then chatbase_error("function chatbase_addplayer: Trying to add a nonplayer"); return; end + + -- add an entry for the player + chatbase_players[player:GetId()] = {} + chatbase_players[player:GetId()].player = player + chatbase_players[player:GetId()].settings = {} + for setting,values in pairs(chatbase_settings) do + chatbase_players[player:GetId()].settings[setting] = values.default + end +end + +function chatbase_removeplayer(player) + -- param could be a player or a playerid + if tonumber(player) then player = GetPlayerByID(player) end + if not IsPlayer(player) then chatbase_error("function chatbase_removeplayer: Trying to remove a nonplayer"); return; end + + -- clear their entry + chatbase_players[player:GetId()] = nil +end + +------------------------------------- +-- Player Settings Functions +------------------------------------- + +function chatbase_getplayersetting( player, setting ) + -- param could be a player or a playerid + if tonumber(player) then player = GetPlayerByID(player) end + if not IsPlayer(player) then chatbase_error("function chatbase_getplayersetting: Trying to get setting of a nonplayer"); return nil; end + + if chatbase_players[player:GetId()] ~= nil then + return chatbase_players[player:GetId()].settings[setting] + else + chatbase_error("function chatbase_getplayersetting: Player not found in the table"); + return nil + end +end + +function chatbase_setplayersetting( player, setting, value ) + -- param could be a player or a playerid + if tonumber(player) then player = GetPlayerByID(player) end + if not IsPlayer(player) then chatbase_error("function chatbase_setplayersetting: Trying to set setting of a nonplayer"); return false; end + + if chatbase_players[player:GetId()] ~= nil then + chatbase_players[player:GetId()].settings[setting] = value; + return true + else + chatbase_error("function chatbase_setplayersetting: Player not found in the table"); + return false + end +end + +------------------------------------- +-- Debug/Messaging +------------------------------------- + +function chatbase_error( str ) + ConsoleToAll(CHAT_COMMAND_DEBUG_PREFIX.."[ERROR] "..str) +end + +function chatbase_debug( str ) + if CHAT_COMMAND_DEBUG then ConsoleToAll(CHAT_COMMAND_DEBUG_PREFIX..str) end +end + +--[[ +===================================== +== DEFAULT COMMAND IMPLEMENTATION +===================================== +== +===================================== +]]-- + +chatbase_addcommand( "help", "Display a list of all available commands" ) +function chat_help( player ) + ChatToPlayer( player, "^"..CHAT_COMMAND_COLOR_MAIN.."Chat Commands:") + for command,values in pairs(chatbase_commands) do + local command_text = "^"..CHAT_COMMAND_COLOR_HIGHLIGHT1..CHAT_COMMAND_PREFIX..command + if values.description ~= nil then + command_text = command_text.. " ^"..CHAT_COMMAND_COLOR_MAIN.."- ".."^"..CHAT_COMMAND_COLOR_HIGHLIGHT2..values.description + end + if values.example ~= nil then + command_text = command_text.. " ^"..CHAT_COMMAND_COLOR_MAIN.."(example: "..CHAT_COMMAND_PREFIX..values.example..")" + end + ChatToPlayer( player, command_text ) + end +end + +if not CHAT_COMMAND_DISABLE_PERIODIC_NOTIFY then + +chatbase_addcommand( "disablenotify", "Disables the periodic notification that chat commands are enabled" ) +function chat_disablenotify( player ) + chatbase_setplayersetting( player, "disablenotify", true ) + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_MAIN.."Periodic \"chat commands are enabled\" notifications disabled") +end + +end + +--[[ +===================================== +== DEFAULT SETTING IMPLEMENTATION +===================================== +== +===================================== +]]-- + +chatbase_addplayersetting( "disablenotify", false, "Disables periodic notifications that chat commands are enabled" ) +chatbase_addplayersetting( "numtimesnotified", 0, "Number of times the player has been notified that chat commands are enabled" ) + +--[[ +===================================== +== CALLBACKS +===================================== +== +===================================== +]]-- + +-- player_onchat() +---- handle chat commands + +-- save parent player_onchat +local base_player_onchat = player_onchat + +function player_onchat( player, chatstring ) + + -- call parent onchat function if it exists + if base_player_onchat ~= nil then base_player_onchat(player,chatstring) end + + local player = CastToPlayer( player ) + + -- string.gsub call removes all control characters (newlines, return carriages, etc) + -- string.sub call removes the playername: part of the string, leaving just the message + local message = string.sub( string.gsub( chatstring, "%c", "" ), string.len(player:GetName())+3 ) + + chatbase_debug("Message: "..message) + + local prefix = string.sub(message,1,string.len(CHAT_COMMAND_PREFIX)) + + chatbase_debug("Prefix: "..prefix) + + -- if the first character of the string doesn't match the prefix, then we don't care about it + if prefix ~= CHAT_COMMAND_PREFIX then return true; end + + -- strip the prefix character + message = string.sub( message, 1+string.len(CHAT_COMMAND_PREFIX) ) + + chatbase_debug("Message: "..message) + + -- if there is no message at all, return + if string.match(message, "%a+") == nil then return true end + + -- get command and parameters + local command = string.lower( string.match(message, "%a+") ) + local paramstring = string.sub(message, string.len(command)+2) + local params = explode(" ", paramstring) + -- loop through all params and convert any numbers to actual numbers + for i,param in pairs(params) do + -- tonumber() returns nil if it can't convert to a number + if tonumber(param) ~= nil then + param = tonumber(param) + end + chatbase_debug(" Param "..i..": "..param) + end + -- insert the player as the first param always + table.insert( params, 1, player ) + + -- find function to call + local func, finderror = findfunction("chat_"..command) + + if func ~= nil then + if CHAT_COMMAND_DEBUG then ConsoleToAll(CHAT_COMMAND_DEBUG_PREFIX.."Function for "..command.." found"); end + -- translates to chat_( , , ... ) e.g. chat_help() or chat_set( "varname", 5 ) + func(unpack(params)) + else + ChatToPlayer(player, "^"..CHAT_COMMAND_COLOR_ERROR.."Unexpected error while executing command") + chat_error("Command function find error for "..command.."("..paramstring.."):".. finderror) + return true + end + + if CHAT_COMMAND_HIDECHATSTRING then + return false + else + return true + end +end + +-- player_connected() +---- keep track of players + +-- save parent player_connected +local base_player_connected = player_connected + +function player_connected( player ) + + -- call parent onchat function if it exists + if base_player_connected ~= nil then base_player_connected(player) end + + local player = CastToPlayer( player ) + + chatbase_addplayer( player ) +end + +-- player_disconnected() +---- keep track of players + +-- save parent player_disconnected +local base_player_disconnected = player_disconnected + +function player_disconnected( player ) + + -- call parent onchat function if it exists + if base_player_disconnected ~= nil then base_player_disconnected(player) end + + local player = CastToPlayer( player ) + + chatbase_removeplayer( player ) +end + +--[[ +===================================== +== HELPERS +===================================== +== +===================================== +]]-- + +-- Find a function with the given string name in the global table +function findfunction(x) + assert(type(x) == "string") + local f=_G + for v in x:gmatch("[^%.]+") do + if type(f) ~= "table" then + return nil, "looking for '"..v.."' expected table, not "..type(f) + end + f=f[v] + end + if type(f) == "function" then + return f + else + return nil, "expected function, not "..type(f) + end +end + +-- Explode a string by the given divider +function explode(div,str) + if (div=='') then return false end + local pos,arr = 0,{} + -- for each divider found + for st,sp in function() return string.find(str,div,pos,true) end do + table.insert(arr,string.sub(str,pos,st-1)) -- Attach chars left of current divider + pos = sp + 1 -- Jump past current divider + end + table.insert(arr,string.sub(str,pos)) -- Attach chars right of last divider + return arr +end diff --git a/maps/includes/base_cp.lua b/maps/includes/base_cp.lua new file mode 100644 index 0000000..23827d9 --- /dev/null +++ b/maps/includes/base_cp.lua @@ -0,0 +1,1620 @@ +-- base_cp.lua + +-- if you want base cp with the default setup, +-- include base_cp_default.lua in your map's lua file +-- and then include base_cp.lua + +function startup() + + SetGameDescription( "Control Points" ) + + -- disable certain teams + for i,v in pairs(disabled_teams) do + SetPlayerLimit( v, -1 ) + end + + -- set up team limits + for i1,v1 in pairs(teams) do + local team = GetTeam(v1) + for i2,v2 in ipairs(team_info[team:GetTeamId()].class_limits) do + team:SetClassLimit( i2, v2 ) + end + end + + RemoveAllCPAmmoAndArmor() + + for i,v in ipairs(command_points) do + RemoveSchedule( "cp" .. v.cp_number .. "_cap_timer" ) + ResetCPCapping( v ) + AddScheduleRepeating( "cp" .. v.cp_number .. "_cap_zone_timer", CAP_ZONE_TIMER_INTERVAL, cap_zone_timer, v ) + end +end + +function precache() + + -- precache the cap sounds + for i in pairs(good_cap_sounds) do + PrecacheSound(good_cap_sounds[i]) + PrecacheSound(bad_cap_sounds[i]) + end + + PrecacheSound("misc.thunder") + + PrecacheSound("Buttons.snd9") + PrecacheSound("Buttons.snd45") + + PrecacheSound("ff_cz2.teleport_exit") + + PrecacheSound("k_lab.teleport_post_winddown") + PrecacheSound("novaprospekt.teleport_post_thunder") + PrecacheSound("NPC_Ichthyosaur.AttackGrowl") + PrecacheSound("Streetwar.d3_c17_11_die") + PrecacheSound("streetwar.Ba_UseConsoleSounds") + + PrecacheSound( "yourteam.flagcap" ) + PrecacheSound( "otherteam.flagcap" ) +end + +function PlayerStartTouchingCapZone( touch_entity, cp ) + + local player = CastToPlayer(touch_entity) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] == cp then return end + + local team_number = player:GetTeamId() + + PLAYER_TOUCHING_CP_ZONE[player:GetId()] = cp + + cp.touching_players[team_number]:AddItem( player ) + cp.former_touching_players[team_number]:RemoveItem( player ) + cp.cap_speed[team_number] = cp.cap_speed[team_number] + ( player:MaxSpeed() / 10 ) + + if team_number ~= cp.defending_team then + player:SetCloakable( false ) + end + + local cp_zone_hudicon = cp_zone_icons[team_number] + AddHudIcon( player, cp_zone_hudicon.hudicon, cp_zone_hudicon.hudicon, cp_zone_hudicon.hudx, cp_zone_hudicon.hudy, cp_zone_hudicon.hudwidth, cp_zone_hudicon.hudheight, cp_zone_hudicon.hudalign ) + +end + +function PlayerStopTouchingCapZone( touch_entity, cp ) + + local player = CastToPlayer(touch_entity) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] == nil then return end + + local team_number = player:GetTeamId() + + PLAYER_TOUCHING_CP_ZONE[player:GetId()] = nil + + cp.touching_players[team_number]:RemoveItem( player ) + cp.former_touching_players[team_number]:AddItem( player ) + cp.cap_speed[team_number] = cp.cap_speed[team_number] - ( player:MaxSpeed() / 10 ) + + -- clamp + if cp.cap_speed[team_number] < 0 then + cp.cap_speed[team_number] = 0 + end + + player:SetCloakable( true ) + + RemoveHudItem( player, cp_zone_icons[team_number].hudicon ) + +end + + +function DrawCCAlarmIcon( cc_team_number ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + + -- turn on alarm + if team_info[cc_team_number].cc_touch_count > 0 then + + RemoveHudItemFromAll( cc_team_number .. "-ccalarmicon_neutral" ) + AddHudIconToAll( team_info[cc_team_number].ccalarmicon, cc_team_number .. "-ccalarmicon", team_info[cc_team_number].ccalarmiconx, team_info[cc_team_number].ccalarmicony, team_info[cc_team_number].ccalarmiconwidth, team_info[cc_team_number].ccalarmiconheight, team_info[cc_team_number].ccalarmiconalign ) + + -- turn off alarm + else + + RemoveHudItemFromAll( cc_team_number .. "-ccalarmicon" ) + AddHudIconToAll( team_info[Team.kUnassigned].ccalarmicon, cc_team_number .. "-ccalarmicon_neutral", team_info[cc_team_number].ccalarmiconx, team_info[cc_team_number].ccalarmicony, team_info[cc_team_number].ccalarmiconwidth, team_info[cc_team_number].ccalarmiconheight, team_info[cc_team_number].ccalarmiconalign ) + + end + +end + +function EntityStartTouchingCC( touch_entity, cc_team_number ) + + if ENTITY_TOUCHING_CC[touch_entity:GetId()] ~= nil then return end + + ENTITY_TOUCHING_CC[touch_entity:GetId()] = cc_team_number + + team_info[cc_team_number].cc_touch_count = team_info[cc_team_number].cc_touch_count + 1 + + -- turn on alarm + if team_info[cc_team_number].cc_touch_count > 0 then + + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_sound", "PlaySound" ) + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_light", "TurnOn" ) + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_beam", "Color", team_info[touch_entity:GetTeamId()].skybeam_color ) + + end + + DrawCCAlarmIcon( cc_team_number ) + +end + +function EntityStopTouchingCC( touch_entity, cc_team_number ) + + if ENTITY_TOUCHING_CC[touch_entity:GetId()] == nil then return end + + ENTITY_TOUCHING_CC[touch_entity:GetId()] = nil + + team_info[cc_team_number].cc_touch_count = team_info[cc_team_number].cc_touch_count - 1 + + -- turn off alarm + if team_info[cc_team_number].cc_touch_count <= 0 then + + team_info[cc_team_number].cc_touch_count = 0 + + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_sound", "StopSound" ) + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_light", "TurnOff" ) + OutputEvent( team_info[cc_team_number].team_name .. "_cc_alarm_beam", "Color", team_info[Team.kUnassigned].skybeam_color ) + + end + + DrawCCAlarmIcon( cc_team_number ) + +end + +function player_disconnected( player ) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] ~= nil then + PlayerStopTouchingCapZone( player, PLAYER_TOUCHING_CP_ZONE[player:GetId()] ) + end + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + EntityStopTouchingCC( player, ENTITY_TOUCHING_CC[player:GetId()] ) + end + +end + +function player_switchteam( player, currentteam, desiredteam ) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] ~= nil then + PlayerStopTouchingCapZone( player, PLAYER_TOUCHING_CP_ZONE[player:GetId()] ) + end + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + EntityStopTouchingCC( player, ENTITY_TOUCHING_CC[player:GetId()] ) + end + + return true + +end + +----------------------------------------------------------------------------- +-- timed scoring +----------------------------------------------------------------------------- +function cp_score_timer( cp_number, team_number ) + + local team = GetTeam(team_number) + team:AddScore(command_points[cp_number].point_value[team_number]) + +end + +----------------------------------------------------------------------------- +-- notify the players of the total cap. +-- Also, create a logic_relay in your map named fullcap_trigger to pass outputs to your entities. +----------------------------------------------------------------------------- +function complete_control_notification ( team_number ) + + local team = GetTeam(team_number) + SmartTeamSound(team, "yourteam.flagcap", "otherteam.flagcap") + SmartTeamSpeak(team, "CZ_GOTALL", "CZ_THEYGOTALL") + SmartTeamMessage(team, "#FF_CZ2_YOURTEAM_COMPLETE", "#FF_CZ2_OTHERTEAM_COMPLETE", Color.kGreen, Color.kRed) + OutputEvent( "fullcap_trigger", "Trigger" ) + +end + +----------------------------------------------------------------------------- +-- reset everything after the total cap. +----------------------------------------------------------------------------- +function complete_control_respawn () + ApplyToAll( { AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, kReloadClips } ) +end + +----------------------------------------------------------------------------- +-- emit a sound from an entity +----------------------------------------------------------------------------- +function EmitSound( entity, sound ) + + entity:EmitSound(sound) + +end + +----------------------------------------------------------------------------- +-- remove all the ammo and armor from the entire map +----------------------------------------------------------------------------- +function RemoveAllCPAmmoAndArmor() + + -- Remove all ammo and armor from CPs + local c = Collection() + c:GetByName(cp_ammo_and_armor_names, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Remove() + end + +end + +----------------------------------------------------------------------------- +-- does the player have a flag? +----------------------------------------------------------------------------- +function PlayerHasFlag( player ) + + -- check if the player has a flag + for i,v in ipairs(flags) do + if player:HasItem(v) then + -- player has a flag + return true + end + end + + -- player doesn't have a flag + return false + +end + +----------------------------------------------------------------------------- +-- return carried flags +----------------------------------------------------------------------------- +function ReturnFlagFromPlayer( player ) + + -- Get all carried flags and ... + local c = Collection() + c:GetByName(flags, { CF.kInfoScript_Carried, }) + + -- ... return the flag that the player is carrying. + for item in c.items do + item = CastToInfoScript(item) + carrier = item:GetCarrier() + if player:GetId() == carrier:GetId() then + item:Return() + end + end + +end + +----------------------------------------------------------------------------- +-- resupply a player when a cp is capped +----------------------------------------------------------------------------- +function CapResupply( player, scale, givethegoodshit ) + + -- give the player health and armor + if cap_resupply.health ~= nil and cap_resupply.health ~= 0 then player:AddHealth( cap_resupply.health * scale ) end + if cap_resupply.armor ~= nil and cap_resupply.armor ~= 0 then player:AddArmor( cap_resupply.armor * scale ) end + + -- give the player ammo + if cap_resupply.nails ~= nil and cap_resupply.nails ~= 0 then player:AddAmmo( Ammo.kNails, cap_resupply.nails * scale ) end + if cap_resupply.shells ~= nil and cap_resupply.shells ~= 0 then player:AddAmmo( Ammo.kShells, cap_resupply.shells * scale ) end + if cap_resupply.rockets ~= nil and cap_resupply.rockets ~= 0 then player:AddAmmo( Ammo.kRockets, cap_resupply.rockets * scale ) end + if cap_resupply.cells ~= nil and cap_resupply.cells ~= 0 then player:AddAmmo( Ammo.kCells, cap_resupply.cells * scale ) end + + if givethegoodshit then + -- give the player the good shit + if cap_resupply.detpacks ~= nil and cap_resupply.detpacks ~= 0 then player:AddAmmo( Ammo.kDetpack, cap_resupply.detpacks * scale ) end + if cap_resupply.mancannons ~= nil and cap_resupply.mancannons ~= 0 then player:AddAmmo( Ammo.kManCannon, cap_resupply.mancannons * scale ) end + if cap_resupply.gren1 ~= nil and cap_resupply.gren1 ~= 0 then player:AddAmmo( Ammo.kGren1, cap_resupply.gren1 * scale ) end + if cap_resupply.gren2 ~= nil and cap_resupply.gren2 ~= 0 then player:AddAmmo( Ammo.kGren2, cap_resupply.gren2 * scale ) end + end + +end + +function player_killed ( player_victim, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + end + + -- if still no attacking player after all that, try the inflictor + if not player_attacker then + + -- Entity that is attacking + local inflictor = damageinfo:GetInflictor() + + if inflictor then + if IsSentrygun(inflictor) then + inflictor = CastToSentrygun(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDetpack(inflictor) then + inflictor = CastToDetpack(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDispenser(inflictor) then + inflictor = CastToDispenser(inflictor) + player_attacker = inflictor:GetOwner() + end + end + + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- if victim killed self or teammate do nothing + if (player_victim:GetId() == player_attacker:GetId()) or (player_victim:GetTeamId() == player_attacker:GetTeamId()) then return end + + local player_victim_touching_cp = PLAYER_TOUCHING_CP_ZONE[player_victim:GetId()] + local player_attacker_touching_cp = PLAYER_TOUCHING_CP_ZONE[player_attacker:GetId()] + + -- the victim is standing in a zone + if player_victim_touching_cp ~= nil then + + -- the victim is defending a cp or trying to capture a neutral cp + if player_victim:GetTeamId() == player_victim_touching_cp.defending_team or player_victim_touching_cp.defending_team == Team.kUnassigned then + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_victim_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + -- the victim is trying to capture the attacker's cp + else + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_victim_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + + end + + end + + -- the attacker is standing in a zone + if player_attacker_touching_cp ~= nil then + + -- the attacker is defending a cp + if player_attacker:GetTeamId() == player_attacker_touching_cp.defending_team then + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_attacker_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + + -- the attacker is trying to capture a cp + else + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_attacker_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + end + + end + + -- loop through all former players of each command point + for k,v in ipairs(command_points) do + + -- victim's team + for i in v.former_touching_players[player_victim:GetTeamId()].items do + + i = CastToPlayer( i ) + + -- the victim was in an active zone + if i:GetId() == player_victim:GetId() then + + -- the victim is defending a cp or trying to capture a neutral cp + if player_victim:GetTeamId() == v.defending_team or v.defending_team == Team.kUnassigned then + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + -- the victim is trying to capture the attacker's cp + else + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + + end + + end + + end + + -- attacker's team + for i in v.former_touching_players[player_attacker:GetTeamId()].items do + + i = CastToPlayer( i ) + + -- the attacker was in an active zone + if i:GetId() == player_attacker:GetId() then + + -- the attacker is defending a cp + if player_attacker:GetTeamId() == v.defending_team then + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + + -- the attacker is trying to capture a cp + else + + CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + end + + end + + end + + end + +end + +----------------------------------------------------------------------------- +-- change the cp's defending team, its related visuals, and its scoring +----------------------------------------------------------------------------- +function ChangeCPDefendingTeam( cp_number, new_defending_team ) + + local cp = command_points[cp_number] + + -- Change the skybeam color + OutputEvent( "cp" .. cp_number .. "_skybeam", "Color", team_info[new_defending_team].skybeam_color ) + + -- Change the light color + for i in pairs(team_info) do + -- turn off all other lights as well + local input_name = "TurnOff" + local input2_name = "LightOff" + if i == new_defending_team then + input_name = "TurnOn" + input2_name = "LightOn" + end + OutputEvent( "cp" .. cp_number .. "_light_" .. team_info[i].team_name, input_name ) + OutputEvent( "cp" .. cp_number .. "_spotlight_" .. team_info[i].team_name, input2_name ) + end + + -- Change the rotating flag around + OutputEvent( "cp" .. cp_number .. "_flag_rotator", "Reverse") + OutputEvent( "cp" .. cp_number .. "_flag", "Skin", team_info[new_defending_team].skin ) + OutputEvent( "cp" .. cp_number .. "_flag", team_info[new_defending_team].flag_visibility) + + -- remove old flaginfo icons and add new ones + RemoveHudItemFromAll( cp_number .. "-background-" .. cp.defending_team ) + RemoveHudItemFromAll( cp_number .. "-foreground-" .. cp.defending_team ) + + AddHudIconToAll( icons[ new_defending_team ].teamicon, cp_number .. "-background-" .. new_defending_team, cp.hudposx, cp.hudposy, cp.hudwidth, cp.hudheight, cp.hudalign) + AddHudIconToAll( cp.hudstatusicon, cp_number .. "-foreground-" .. new_defending_team, cp.hudposx, cp.hudposy, cp.hudwidth, cp.hudheight, cp.hudalign) + + local schedule_name = "cp" .. cp_number .. "_score_timer" + + -- stop an existing timer + if cp.defending_team ~= Team.kUnassigned then + RemoveSchedule( schedule_name ) + end + + -- only worry with score timer for TEAM1 and TEAM2 + if new_defending_team ~= Team.kUnassigned then + + -- start the score timer + AddScheduleRepeating( schedule_name, cp.score_timer_interval[new_defending_team], cp_score_timer, cp_number, new_defending_team ) + + end + + cp.defending_team = new_defending_team + +end + +----------------------------------------------------------------------------- +-- restore all items in a CP +----------------------------------------------------------------------------- +function RestoreCPItems( cp_number, old_defending_team, new_defending_team ) + + local c = Collection() + c:GetByName( { "cp_cp" .. cp_number .. "_ammo", "cz2_cp" .. cp_number .. "_ammo", "cp_cp" .. cp_number .. "_armor", "cz2_cp" .. cp_number .. "_armor" }, { CF.kNone } ) + for item in c.items do + item = CastToInfoScript(item) + + -- restore this CP's ammo and armor + item:Restore() + + -- Also set the touchflags so only the defending team can use the packs + item:SetTouchFlags(team_info[new_defending_team].touchflags) + end + +end + +----------------------------------------------------------------------------- +-- reset team cp capping stuff +----------------------------------------------------------------------------- +function ResetTeamCPCapping( cp, team_number, do_total_reset, set_next_cap_zone_timer ) + + cp.cap_status[team_number] = 0 + cp.next_cap_zone_timer[team_number] = set_next_cap_zone_timer + + RemoveHudItemFromAll( cp.cp_number .. "-capstatusicon-" .. team_number ) + RemoveHudItemFromAll( cp.cp_number .. "-caplockicon-" .. team_number ) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[team_number].team_name .. "_capsprites", "HideSprite" ) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[team_number].team_name .. "_capsound", "StopSound" ) + + if cp.former_touching_players[team_number]:Count() > 0 then + cp.former_touching_players[team_number]:RemoveAllItems() + end + + if do_total_reset then + if cp.touching_players[team_number]:Count() > 0 then + cp.touching_players[team_number]:RemoveAllItems() + end + + cp.cap_speed[team_number] = 0 + end + +end + +----------------------------------------------------------------------------- +-- reset all cp capping stuff +----------------------------------------------------------------------------- +function ResetCPCapping( cp ) + + for i,v in pairs(teams) do + ResetTeamCPCapping( cp, v, true, 0 ) + end + +end + +----------------------------------------------------------------------------- +-- the cp has definitely been captured +----------------------------------------------------------------------------- +function CaptureCP( cp_number, new_defending_team ) + + local cp = command_points[cp_number] + local old_defending_team = cp.defending_team + + RestoreCPItems(cp_number, old_defending_team, new_defending_team) + + -- Give points to team and player + local team = GetTeam(new_defending_team) + team:AddScore(cp.point_value[new_defending_team]) + + -- Find out if any team has complete control + local team_with_complete_control = Team.kUnassigned + local control_count = { [TEAM1] = 0, [TEAM2] = 0 } + control_count[new_defending_team] = 1 + for i,v in ipairs(command_points) do + if v.defending_team ~= Team.kUnassigned and v.cp_number ~= cp_number then + control_count[v.defending_team] = control_count[v.defending_team] + 1 + end + if control_count[v.defending_team] == CP_COUNT then + team_with_complete_control = v.defending_team + break + end + end + + if team_with_complete_control ~= Team.kUnassigned then + + if ENABLE_COMPLETE_CONTROL_POINTS then + -- Bonus points for complete control + team:AddScore(POINTS_FOR_COMPLETE_CONTROL) + end + + if ENABLE_COMPLETE_CONTROL_RESET then + + AddSchedule("complete_control_notification", 0.1, complete_control_notification, team_with_complete_control) + + -- Reset all command points + for i,v in ipairs(command_points) do + ChangeCPDefendingTeam(v.cp_number, Team.kUnassigned) + ResetCPCapping( v ) + end + + -- reset colors of respawn beams + --OutputEvent( team_info[TEAM1].team_name .. "_respawn_beam", "Color", team_info[Team.kUnassigned].respawnbeam_color[0] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[1] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[2] ) + --OutputEvent( team_info[TEAM2].team_name .. "_respawn_beam", "Color", team_info[Team.kUnassigned].respawnbeam_color[0] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[1] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[2] ) + + if ENABLE_FLAGS then + -- Return all flags + local c = Collection() + c:GetByName(flags, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Return() + end + end + + RemoveAllCPAmmoAndArmor() + + if ENABLE_COMPLETE_CONTROL_RESPAWN then + AddSchedule("complete_control_respawn", 1.0, complete_control_respawn) + end + + -- get out now if resetting + return + + end + + end + + ChangeCPDefendingTeam(cp_number, new_defending_team) + + -- change the colors this team's respawn beams + --local beam_team = team_info[new_defending_team] + --beam_team.respawnbeam_color[beam_team.color_index] = beam_team.respawnbeam_color[Team.kUnassigned] + (control_count[new_defending_team] * 35) + --OutputEvent( beam_team.team_name .. "_respawn_beam", "Color", beam_team.respawnbeam_color[0] .. " " .. beam_team.respawnbeam_color[1] .. " " .. beam_team.respawnbeam_color[2] ) + + SmartTeamMessage( team, "#FF_CZ2_YOURTEAM_CP" .. cp_number, "#FF_CZ2_OTHERTEAM_CP" .. cp_number, Color.kGreen, Color.kRed ) + + -- sounds will get more and more crazy + --SmartTeamSound( team, good_cap_sounds[control_count[new_defending_team]], bad_cap_sounds[control_count[new_defending_team]] ) + + -- caes: changed it to announce the cp number captured/lost + SmartTeamSpeak( team, good_cap_sounds[cp_number], bad_cap_sounds[cp_number] ) +end + + +----------------------------------------------------------------------------- +-- a cp's defending team successfully defended or capped +----------------------------------------------------------------------------- +function SuccessfulCPDefense( cp, team_number, is_a_cap ) + + -- reward the touching players + for i in cp.touching_players[team_number].items do + i = CastToPlayer( i ) + if is_a_cap then + CapResupply( i, 1.00, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 100, "#FF_FORTPOINTS_CAPTUREPOINT") + i:SetCloakable( true ) + else + CapResupply( i, 0.50, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + end + end + + -- reward the former touching players + for i in cp.former_touching_players[team_number].items do + i = CastToPlayer( i ) + if is_a_cap then + CapResupply( i, 0.50, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + else + CapResupply( i, 0.25, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + end + end + + -- no need to keep them around for future rewards + cp.former_touching_players[team_number]:RemoveAllItems() + +end + + +----------------------------------------------------------------------------- +-- timed cp capping +----------------------------------------------------------------------------- +function cap_zone_timer( cp ) + + local new_defending_team = Team.kUnassigned + local other_team = Team.kUnassigned + local last_cap_status = {} + local total_cap_speed = 0 + local total_cap_status = 0 + + for i,v in pairs(teams) do + total_cap_speed = total_cap_speed + cp.cap_speed[v] + total_cap_status = total_cap_status + cp.cap_status[v] + end + + for i,v in pairs(teams) do + + -- don't bother doing some stuff if nothing has changed + last_cap_status[v] = cp.cap_status[v] + + -- after one team caps a cp, the other team can't touch that cp for X seconds + if cp.next_cap_zone_timer[v] > 0 then + + cp.next_cap_zone_timer[v] = cp.next_cap_zone_timer[v] - CAP_ZONE_TIMER_INTERVAL + + local lock_percent = math.min( 1.0, cp.next_cap_zone_timer[v] / cp.delay_before_retouch[v] ) + local minlockhudwidth = cp.hudwidth * 0.333 + local minlockhudheight = cp.hudheight * 0.333 + + AddHudIconToAll( icons[v].lockicon, cp.cp_number .. "-caplockicon-" .. v, cp.hudposx, cp.hudposy + cp_zone_icons[v].hudposy_offset, minlockhudwidth + ( (cp.hudwidth - minlockhudwidth) * lock_percent ), minlockhudheight + ( (cp.hudheight - minlockhudheight) * lock_percent ), cp.hudalign) + + -- clamp + if cp.next_cap_zone_timer[v] <= 0 then + cp.next_cap_zone_timer[v] = 0 + RemoveHudItemFromAll( cp.cp_number .. "-caplockicon-" .. v ) + end + + -- this team is standing in the zone + elseif cp.cap_speed[v] > 0 then + + -- don't bother with cap_status calculations for the defending team + if v == cp.defending_team then + + cp.cap_status[v] = cp.cap_requirement[v] + + -- calculate cap status + else + + -- every vote counts + local affected_cap_speed = cp.cap_speed[v] - ( total_cap_speed - cp.cap_speed[v] ) + + cp.cap_status[v] = cp.cap_status[v] + affected_cap_speed + + -- clamp + if cp.cap_status[v] < 0 then + + cp.cap_status[v] = 0 + + -- potential capping team + elseif cp.cap_status[v] >= cp.cap_requirement[v] then + + new_defending_team = v + + -- clamp + cp.cap_status[v] = cp.cap_requirement[v] + + end + end + + -- this team is not standing in the zone + else + if v == cp.defending_team then + -- don't bother with cap_status calculations for the defending team + cp.cap_status[v] = 0 + else + -- decrease cap status + cp.cap_status[v] = cp.cap_status[v] - ( CAP_ZONE_NOTOUCH_SPEED + total_cap_speed ) + + -- clamp + if cp.cap_status[v] < 0 then + cp.cap_status[v] = 0 + end + end + end + + -- don't bother doing some stuff if nothing has changed + if cp.cap_status[v] ~= last_cap_status[v] then + + -- draw the cap status icon + if cp.cap_status[v] > 0 then + + local cap_percent = cp.cap_status[v] / cp.cap_requirement[v] + local minhudwidth = cp.hudwidth * 0.333 + local minhudheight = cp.hudheight * 0.333 + AddHudIconToAll( cp_zone_icons[v].hudicon, cp.cp_number .. "-capstatusicon-" .. v, cp.hudposx, cp.hudposy + cp_zone_icons[v].hudposy_offset, minhudwidth + ( (cp.hudwidth - minhudwidth) * cap_percent ), minhudheight + ( (cp.hudheight - minhudheight) * cap_percent ), cp.hudalign) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[v].team_name .. "_capsprites", "ShowSprite" ) + OutputEvent( "cp" .. cp.cp_number .. "_" .. team_info[v].team_name .. "_capsound", "PlaySound" ) + + -- remove the cap status icon, remove former touching players, and reward defenders + else + + -- reward the defenders + if v ~= cp.defending_team and cp.defending_team ~= Team.kUnassigned then + SuccessfulCPDefense( cp, cp.defending_team, false ) + end + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( cp, v, false, 0 ) + + end + + end + + if new_defending_team ~= v then + other_team = v + end + + end + + -- someone capped this cp + if new_defending_team ~= Team.kUnassigned then + + -- cap the cp + SuccessfulCPDefense( cp, new_defending_team, true ) + CaptureCP( cp.cp_number, new_defending_team ) + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( cp, other_team, false, cp.delay_before_retouch[other_team] ) + + end + +end + + +----------------------------------------------------------------------------- +-- triggers +----------------------------------------------------------------------------- + +cp_base_trigger = trigger_ff_script:new({ team = Team.kUnassigned, failtouch_message = "" }) + +function cp_base_trigger:allowed( allowed_entity ) + + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function cp_base_trigger:onfailtouch( touch_entity ) + + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + BroadCastMessageToPlayer( player, failtouch_message ) + end +end + +cp_team1_door_trigger = cp_base_trigger:new({ team = TEAM1 , failtouch_message = "#FF_NOTALLOWEDDOOR" }) +cp_team2_door_trigger = cp_base_trigger:new({ team = TEAM2 , failtouch_message = "#FF_NOTALLOWEDDOOR" }) + + +----------------------------------------------------------------------------- +-- packs +----------------------------------------------------------------------------- +cp_base_pack = genericbackpack:new({ + health = 100, + armor = 300, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 0, + mancannons = 0, + gren1 = 0, + gren2 = 0, + respawntime = 1, + touchflags = team_info[Team.kUnassigned].touchflags, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + cp_number = 0, + botgoaltype = Bot.kBackPack_Ammo, +}) + +function cp_base_pack:dropatspawn() return false end + +cp_team1_respawn_pack = cp_base_pack:new( { touchflags = team_info[TEAM1].touchflags } ) +cp_team2_respawn_pack = cp_base_pack:new( { touchflags = team_info[TEAM2].touchflags } ) + +cp_cp1_ammo = ammobackpack:new({cp_number = 1}) +cp_cp2_ammo = ammobackpack:new({cp_number = 2}) +cp_cp3_ammo = ammobackpack:new({cp_number = 3}) +cp_cp4_ammo = ammobackpack:new({cp_number = 4}) +cp_cp5_ammo = ammobackpack:new({cp_number = 5}) + +cp_cp1_armor = armorkit:new({cp_number = 1}) +cp_cp2_armor = armorkit:new({cp_number = 2}) +cp_cp3_armor = armorkit:new({cp_number = 3}) +cp_cp4_armor = armorkit:new({cp_number = 4}) +cp_cp5_armor = armorkit:new({cp_number = 5}) + + +----------------------------------------------------------------------------- +-- grenade packs +----------------------------------------------------------------------------- +cp_base_grenade_pack = cp_base_pack:new({ + detpacks = 1, + mancannons = 1, + gren1 = 4, + gren2 = 4, + respawntime = 15, + touchflags = team_info[Team.kUnassigned].touchflags, + botgoaltype = Bot.kBackPack_Grenades, +}) + +cp_team1_grenade_pack = cp_base_grenade_pack:new( { touchflags = team_info[TEAM1].touchflags } ) +cp_team2_grenade_pack = cp_base_grenade_pack:new( { touchflags = team_info[TEAM2].touchflags } ) + + +----------------------------------------------------------------------------- +-- cp zones +----------------------------------------------------------------------------- + +cp_base_cp_zone = trigger_ff_script:new({ + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, + cp_number = 0, +}) + +function cp_base_cp_zone:ontrigger( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if ENABLE_FLAGS or not ENABLE_CP_TELEPORTERS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow players on defending team to teleport back to base + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- respawn the player + ApplyToPlayer( player, { AT.kRespawnPlayers, kReloadClips } ) + + OutputEvent( "cp" .. self.cp_number .. "_respawn_enter_sound", "PlaySound" ) + AddSchedule("cp" .. self.cp_number .. "_respawn_" .. player:GetId(), 0.1, EmitSound, player, "ff_cz2.teleport_exit") + else + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_RESPAWN") + end + + end + + end + +end + +function cp_base_cp_zone:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these zones are used + if ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + PlayerStartTouchingCapZone( player, cp ) + end + +end + +function cp_base_cp_zone:onendtouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these zones are used + if ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + PlayerStopTouchingCapZone( player, cp ) + end +end + +cp_cp1_cp_zone = cp_base_cp_zone:new({ cp_number = 1 }) +cp_cp2_cp_zone = cp_base_cp_zone:new({ cp_number = 2 }) +cp_cp3_cp_zone = cp_base_cp_zone:new({ cp_number = 3 }) +cp_cp4_cp_zone = cp_base_cp_zone:new({ cp_number = 4 }) +cp_cp5_cp_zone = cp_base_cp_zone:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- cp triggers +----------------------------------------------------------------------------- + +cp_base_cp_trigger = trigger_ff_script:new({ + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, + cp_number = 0, +}) + +function cp_base_cp_trigger:ontrigger( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS or not ENABLE_CP_TELEPORTERS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow players on defending team to teleport back to base + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- check if the player has a flag + for i,v in ipairs(flags) do + -- return the flag + if player:HasItem(v) then ReturnFlagFromPlayer(player) end + end + + -- respawn the player + ApplyToPlayer( player, { AT.kRespawnPlayers, kReloadClips } ) + + OutputEvent( "cp" .. self.cp_number .. "_respawn_enter_sound", "PlaySound" ) + AddSchedule("cp" .. self.cp_number .. "_respawn_" .. player:GetId(), 0.1, EmitSound, player, "ff_cz2.teleport_exit") + else + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_RESPAWN") + end + + end + + end + +end + +function cp_base_cp_trigger:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + + -- No capping if player's team already defends this CP + if player:GetTeamId() == cp.defending_team then return end + + -- get out if player doesn't have flag + if not PlayerHasFlag(player) then return end + + ReturnFlagFromPlayer(player) + + CaptureCP(self.cp_number, player:GetTeamId()) + player:AddFortPoints((cp.point_value[player:GetTeamId()]) * 100, "#FF_FORTPOINTS_CAPTUREPOINT") + end + +end + +cp_cp1_cp_trigger = cp_base_cp_trigger:new({ cp_number = 1 }) +cp_cp2_cp_trigger = cp_base_cp_trigger:new({ cp_number = 2 }) +cp_cp3_cp_trigger = cp_base_cp_trigger:new({ cp_number = 3 }) +cp_cp4_cp_trigger = cp_base_cp_trigger:new({ cp_number = 4 }) +cp_cp5_cp_trigger = cp_base_cp_trigger:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- flags +----------------------------------------------------------------------------- + +cp_base_flag = info_ff_script:new({ + name = "Base Flag", + team = 0, + model = "models/flag/flag.mdl", + tosssound = "Flag.Toss", + modelskin = 0, + dropnotouchtime = 2, + capnotouchtime = 2, + botgoaltype = Bot.kFlag, + hudicon = "", + hudx = 5, + hudy = 180, + hudalign = 1, + touchflags = team_info[Team.kUnassigned].touchflags +}) + +function cp_base_flag:precache() + PrecacheSound(self.tosssound) + info_ff_script.precache(self) +end + +function cp_base_flag:spawn() + self.notouch = { } + info_ff_script.spawn(self) +end + +function cp_base_flag:addnotouch(player_id, duration) + self.notouch[player_id] = duration + AddSchedule(self.name .. "-" .. player_id, duration, self.removenotouch, self, player_id) +end + +function cp_base_flag.removenotouch(self, player_id) + self.notouch[player_id] = nil +end + +function cp_base_flag:touch( touch_entity ) + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() ~= self.team then return end + + -- pickup if they can + if self.notouch[player:GetId()] then return end + + -- make sure they don't have any flags already + for i,v in ipairs(flags) do + if player:HasItem(v) then return end + end + + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + local flag = CastToInfoScript(entity) + flag:Pickup(player) + player:AddEffect( EF.kSpeedlua1, -1, 0, FLAG_CARRIER_SPEED ) + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) +end + +function cp_base_flag:onownerdie( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end + +function cp_base_flag:onownerfeign( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end +function cp_base_flag:onownercloak( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end +function cp_base_flag:dropitemcmd( owner_entity ) + -- throw the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) +end + +function cp_base_flag:ondrop( owner_entity ) + local flag = CastToInfoScript(entity) + flag:EmitSound(self.tosssound) +end + +function cp_base_flag:onloseitem( owner_entity ) + -- let the player that lost the flag put on a disguise + local player = CastToPlayer( owner_entity ) + player:SetDisguisable(true) + player:SetCloakable(true) + + self:addnotouch(player:GetId(), self.capnotouchtime) + + --player:RemoveEffect( EF.kSpeedlua1 ) + -- remove flag icon from hud + local flag = CastToInfoScript(entity) + RemoveHudItem( player, flag:GetName() ) +end + +function cp_base_flag:onreturn( ) +end + +cp_team1_flag = cp_base_flag:new({ + team = TEAM1, + modelskin = 0, + name = team_info[TEAM1].team_name .. " flag", + hudicon = "hud_flag_" .. team_info[TEAM1].team_name .. ".vtf", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + touchflags = team_info[TEAM1].touchflags +}) + +cp_team2_flag = cp_base_flag:new({ + team = TEAM2, + modelskin = 1, + name = team_info[TEAM2].team_name .. " flag", + hudicon = "hud_flag_" .. team_info[TEAM2].team_name .. ".vtf", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + touchflags = team_info[TEAM2].touchflags +}) + + +----------------------------------------------------------------------------- +-- flag dispensers +----------------------------------------------------------------------------- +cp_base_flag_dispenser = trigger_ff_script:new({ + name = "Base Flag Dispenser", + team = Team.kUnassigned, + dropnotouchtime = 2, + botgoaltype = Bot.kFlag, + hudicon = "", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + hudalign = 1, + flags = {"flag"} +}) + +function cp_base_flag_dispenser:allowed ( allowed_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return EVENT_DISALLOWED end + + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + + -- Player can't have a flag + local playerhasflag = false + + for i,v in ipairs(self.flags) do + if player:HasItem(v) then + playerhasflag = true + break + end + end + + -- get out if player doesn't have flag + if not playerhasflag then + return EVENT_ALLOWED + end + end + end + return EVENT_DISALLOWED +end + +function cp_base_flag_dispenser:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + + local player = CastToPlayer( trigger_entity ) + + local c = Collection() + c:GetByName( self.flags, { CF.kNone } ) + -- give the player an inactive flag + for item in c.items do + item = CastToInfoScript(item) + if item:IsInactive() then + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + item:Pickup(player) + player:AddEffect( EF.kSpeedlua1, -1, 0, FLAG_CARRIER_SPEED ) + AddHudIcon( player, self.hudicon, item:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) + + player:EmitSound("Buttons.snd9") + + -- all done + break + end + end + end +end + +cp_team1_flag_dispenser = cp_base_flag_dispenser:new({ + name = team_info[TEAM1].team_name .. " flag dispenser", + team = TEAM1, + hudicon = "hud_flag_" .. team_info[TEAM1].team_name .. ".vtf", + flags = { team_info[TEAM1].team_name .. "_flag" } +}) + +cp_team2_flag_dispenser = cp_base_flag_dispenser:new({ + name = team_info[TEAM2].team_name .. " flag dispenser", + team = TEAM2, + hudicon = "hud_flag_" .. team_info[TEAM2].team_name .. ".vtf", + flags = { team_info[TEAM2].team_name .. "_flag" } +}) + + +----------------------------------------------------------------------------- +-- command centers +----------------------------------------------------------------------------- + +cp_base_command_center = trigger_ff_script:new({ team = Team.kUnassigned, enemy_team = Team.kUnassigned }) +function cp_base_command_center:onexplode( explosion_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return EVENT_ALLOWED end + + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack(explosion_entity) + + -- don't let assholes destroy their own team's command center + if detpack:GetTeamId() == self.team then return EVENT_ALLOWED end + + local points = CC_DESTROY_POINTS + for i,v in ipairs(command_points) do + if v.defending_team == self.team then + -- taking CP 1 away from team2 is worth more than taking CP 5 away from them + points = points + v.point_value[self.team] + + -- Remove all ammo and armor from CPs + local c = Collection() + c:GetByName({"cp_cp" .. v.cp_number .. "_ammo", "cz2_cp" .. v.cp_number .. "_ammo", "cp_cp" .. v.cp_number .. "_armor", "cz2_cp" .. v.cp_number .. "_armor"}, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Remove() + end + + -- reset the CP + ChangeCPDefendingTeam(v.cp_number, Team.kUnassigned) + end + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( v, self.team, false, v.delay_before_retouch[self.team] * 2.0 ) + end + + local team = detpack:GetTeam() + team:AddScore(points) + + local player = detpack:GetOwner() + player:AddFortPoints(points * 100, "#FF_FORTPOINTS_DESTROY_CC" ) + + SmartSound(player, "misc.thunder", "misc.thunder", "misc.thunder") + SmartMessage(player, "#FF_CZ2_YOU_CC", "#FF_CZ2_YOURTEAM_CC", "#FF_CZ2_OTHERTEAM_CC", Color.kGreen, Color.kGreen, Color.kRed) + SpeakAll( team_info[self.team].detcc_sentence ) + +-- EntityStopTouchingCC( detpack, self.team ) + + end + + return EVENT_ALLOWED +end + +function cp_base_command_center:ontouch( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + +-- if IsDetpack( trigger_entity ) then +-- local detpack = CastToDetpack( trigger_entity ) +-- if detpack:GetTeamId() ~= self.team then +-- EntityStartTouchingCC( detpack, self.team ) +-- end +-- end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() ~= self.team then + EntityStartTouchingCC( player, self.team ) + end + end + +end + +function cp_base_command_center:onendtouch( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + +-- if IsDetpack( trigger_entity ) then +-- local detpack = CastToDetpack( trigger_entity ) +-- if detpack:GetTeamId() ~= self.team then +-- EntityStopTouchingCC( detpack, self.team ) +-- end +-- end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() ~= self.team then + EntityStopTouchingCC( player, self.team ) + end + end +end + +cp_team1_command_center = cp_base_command_center:new({ team = TEAM1, enemy_team = TEAM2 }) +cp_team2_command_center = cp_base_command_center:new({ team = TEAM2, enemy_team = TEAM1 }) + + +------------------------------------------- +-- cc computers +------------------------------------------- + +cp_base_cc_computer = trigger_ff_script:new({ prefix = "unassigned", enemy_team = Team.kUnassigned }) + +function cp_base_cc_computer:ontrigger( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow spies to open the enemy doors + if player:GetTeamId() == self.enemy_team and player:GetClass() == Player.kSpy then + + if player:IsInUse() then + for i,v in ipairs(doors) do + -- open each enemy door + OutputEvent( self.prefix .. v, "Open" ) + end + else + -- tell the player they can open the enemy doors + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_DOORS") + end + + end + end +end + +cp_team1_cc_computer = cp_base_cc_computer:new({ prefix = team_info[TEAM1].team_name, enemy_team = TEAM2 }) +cp_team2_cc_computer = cp_base_cc_computer:new({ prefix = team_info[TEAM2].team_name, enemy_team = TEAM1 }) + + +------------------------------------------- +-- cp flaginfo +------------------------------------------- + +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + for i,v in ipairs(command_points) do + + AddHudIcon( player, icons[ v.defending_team ].teamicon , v.cp_number .. "-background-" .. v.defending_team , command_points[v.cp_number].hudposx, command_points[v.cp_number].hudposy, command_points[v.cp_number].hudwidth, command_points[v.cp_number].hudheight, command_points[v.cp_number].hudalign) + AddHudIcon( player, command_points[v.cp_number].hudstatusicon, v.cp_number .. "-foreground-" .. v.defending_team , command_points[v.cp_number].hudposx, command_points[v.cp_number].hudposy, command_points[v.cp_number].hudwidth, command_points[v.cp_number].hudheight, command_points[v.cp_number].hudalign) + + end + + DrawCCAlarmIcon( TEAM1 ) + DrawCCAlarmIcon( TEAM2 ) + +end + + +------------------------------------------- +-- cp teleporters +------------------------------------------- + +trigger_teleport = trigger_ff_script:new({}) +cp_base_teleporter = trigger_teleport:new({ cp_number = 0, next_teleport_tick = 0 }) + +function cp_base_teleporter:allowed( allowed_entity ) + + -- check whether cc-to-cp teleporters are enabled + if not ENABLE_CC or not ENABLE_CC_TELEPORTERS then return EVENT_DISALLOWED end + + local stime = GetServerTime() + + if self.next_teleport_tick > stime then return end + + if IsPlayer( allowed_entity ) then + + local player = CastToPlayer( allowed_entity ) + -- Allow players on defending team to teleport to cp + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- teleport the player + local team_name = team_info[player:GetTeamId()].team_name + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + team_name = team_info[ENTITY_TOUCHING_CC[player:GetId()]].team_name + end + + OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_enter_sound", "PlaySound" ) + --OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_exit_sound", "PlaySound", "", 0.1 ) + OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_tesla", "DoSpark", "", 0.1 ) + + --self.next_teleport_tick = stime + 1.0 + + ApplyToPlayer( player, { AT.kStopPrimedGrens, kReloadClips } ) + + return EVENT_ALLOWED + else + -- tell the player they can teleport + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_TELEPORT") + end + + end + end + + return EVENT_DISALLOWED + +end + +-- team1 teleporters +cp_team1_teleporter_cp1 = cp_base_teleporter:new({ cp_number = 1 }) +cp_team1_teleporter_cp2 = cp_base_teleporter:new({ cp_number = 2 }) +cp_team1_teleporter_cp3 = cp_base_teleporter:new({ cp_number = 3 }) +cp_team1_teleporter_cp4 = cp_base_teleporter:new({ cp_number = 4 }) +cp_team1_teleporter_cp5 = cp_base_teleporter:new({ cp_number = 5 }) + +-- team2 teleporters +cp_team2_teleporter_cp1 = cp_base_teleporter:new({ cp_number = 1 }) +cp_team2_teleporter_cp2 = cp_base_teleporter:new({ cp_number = 2 }) +cp_team2_teleporter_cp3 = cp_base_teleporter:new({ cp_number = 3 }) +cp_team2_teleporter_cp4 = cp_base_teleporter:new({ cp_number = 4 }) +cp_team2_teleporter_cp5 = cp_base_teleporter:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- + +location_cp1 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_ONE", team = NO_TEAM }) +location_cp2 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_TWO", team = NO_TEAM }) +location_cp3 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_THREE", team = NO_TEAM }) +location_cp4 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_FOUR", team = NO_TEAM }) +location_cp5 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_FIVE", team = NO_TEAM }) + +location_cp1_path = location_info:new({ text = "#FF_LOCATION_CP1_PATH", team = TEAM1 }) +location_cp2_path = location_info:new({ text = "#FF_LOCATION_CP2_PATH", team = TEAM1 }) +location_cp3_path = location_info:new({ text = "#FF_LOCATION_CP3_PATH", team = NO_TEAM }) +location_cp4_path = location_info:new({ text = "#FF_LOCATION_CP4_PATH", team = TEAM2 }) +location_cp5_path = location_info:new({ text = "#FF_LOCATION_CP5_PATH", team = TEAM2 }) + +location_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = NO_TEAM }) + +location_blue_base = location_info:new({ text = "#FF_LOCATION_BASE", team = TEAM1 }) +location_blue_cc = location_info:new({ text = "#FF_LOCATION_COMMAND_CENTER", team = TEAM1 }) +location_blue_outside_base = location_info:new({ text = "#FF_LOCATION_OUTSIDE_BASE", team = TEAM1 }) +location_blue_canal = location_info:new({ text = "#FF_LOCATION_CANAL", team = TEAM1 }) +location_blue_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = TEAM1 }) + +location_red_base = location_info:new({ text = "#FF_LOCATION_BASE", team = TEAM2 }) +location_red_cc = location_info:new({ text = "#FF_LOCATION_COMMAND_CENTER", team = TEAM2 }) +location_red_outside_base = location_info:new({ text = "#FF_LOCATION_OUTSIDE_BASE", team = TEAM2 }) +location_red_canal = location_info:new({ text = "#FF_LOCATION_CANAL", team = TEAM2 }) +location_red_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = TEAM2 }) + + +----------------------------------------------------------------------------- +-- backwards compatiblity - use "cp_*" names in your map instead! +----------------------------------------------------------------------------- +base_team_trigger = cp_base_trigger +blue_door_trigger = cp_team1_door_trigger +red_door_trigger = cp_team2_door_trigger + +cz2_base_pack = cp_base_pack +cz2_blue_respawn_pack = cp_team1_respawn_pack +cz2_red_respawn_pack = cp_team2_respawn_pack + +cz2_cp1_ammo = cp_cp1_ammo +cz2_cp2_ammo = cp_cp2_ammo +cz2_cp3_ammo = cp_cp3_ammo +cz2_cp4_ammo = cp_cp4_ammo +cz2_cp5_ammo = cp_cp5_ammo + +cz2_cp1_armor = cp_cp1_armor +cz2_cp2_armor = cp_cp2_armor +cz2_cp3_armor = cp_cp3_armor +cz2_cp4_armor = cp_cp4_armor +cz2_cp5_armor = cp_cp5_armor + +cz2_base_grenade_pack = cp_base_grenade_pack +cz2_blue_grenade_pack = cp_team1_grenade_pack +cz2_red_grenade_pack = cp_team2_grenade_pack + +base_cp_zone = cp_base_cp_zone +cp1_zone = cp_cp1_cp_zone +cp2_zone = cp_cp2_cp_zone +cp3_zone = cp_cp3_cp_zone +cp4_zone = cp_cp4_cp_zone +cp5_zone = cp_cp5_cp_zone + +base_cp_trigger = cp_base_cp_trigger +cp1_trigger = cp_cp1_cp_trigger +cp2_trigger = cp_cp2_cp_trigger +cp3_trigger = cp_cp3_cp_trigger +cp4_trigger = cp_cp4_cp_trigger +cp5_trigger = cp_cp5_cp_trigger + +base_cp_flag = cp_base_flag +blue_flag = cp_team1_flag +red_flag = cp_team2_flag + +cp_base_flag_dispenser = base_cp_flag_dispenser +blue_flag_dispenser = cp_team1_flag_dispenser +red_flag_dispenser = cp_team2_flag_dispenser + +base_command_center = cp_base_command_center +blue_command_center = cp_team1_command_center +red_command_center = cp_team2_command_center + +base_cp_cc_computer = cp_base_cc_computer +blue_cc_computer = cp_team1_cc_computer +red_cc_computer = cp_team2_cc_computer + +base_cp_teleporter = cp_base_teleporter +blue_teleporter_cp1 = cp_team1_teleporter_cp1 +blue_teleporter_cp2 = cp_team1_teleporter_cp2 +blue_teleporter_cp3 = cp_team1_teleporter_cp3 +blue_teleporter_cp4 = cp_team1_teleporter_cp4 +blue_teleporter_cp5 = cp_team1_teleporter_cp5 +red_teleporter_cp1 = cp_team2_teleporter_cp1 +red_teleporter_cp2 = cp_team2_teleporter_cp2 +red_teleporter_cp3 = cp_team2_teleporter_cp3 +red_teleporter_cp4 = cp_team2_teleporter_cp4 +red_teleporter_cp5 = cp_team2_teleporter_cp5 + + diff --git a/maps/includes/base_cp_default.lua b/maps/includes/base_cp_default.lua new file mode 100644 index 0000000..b5cc4ea --- /dev/null +++ b/maps/includes/base_cp_default.lua @@ -0,0 +1,234 @@ +-- base_cp_default.lua + +-- if you want to customize these base cp defaults, copy all of this file's contents +-- into your map's lua file, edit what you want, and then include base_cp.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") +IncludeScript("base_location") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- globals +----------------------------------------------------------------------------- + + +-- teams +TEAM1 = Team.kBlue +TEAM2 = Team.kRed +DISABLED_TEAM3 = Team.kYellow +DISABLED_TEAM4 = Team.kGreen + +teams = { TEAM1, TEAM2 } +disabled_teams = { DISABLED_TEAM3, DISABLED_TEAM4 } + +team_info = { + + [Team.kUnassigned] = { + team_name = "neutral", + enemy_team = Team.kUnassigned, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen }, + skybeam_color = "128 128 128", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 1, + skin = "0", + flag_visibility = "TurnOff", + cc_touch_count = 0, + ccalarmicon = "hud_secdown.vtf", ccalarmiconx = 0, ccalarmicony = 0, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 2, + detcc_sentence = "HTD_DOORS", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + }, + + [TEAM1] = { + team_name = "blue", + enemy_team = TEAM2, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue }, + skybeam_color = "64 64 255", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 2, + skin = "0", + flag_visibility = "TurnOn", + cc_touch_count = 0, + ccalarmicon = "hud_secup_blue.vtf", ccalarmiconx = 60, ccalarmicony = 5, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 2, + detcc_sentence = "CZ_BCC_DET", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + }, + + [TEAM2] = { + team_name = "red", + enemy_team = TEAM1, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kRed }, + skybeam_color = "255 64 64", + respawnbeam_color = { [0] = 100, [1] = 100, [2] = 100 }, + color_index = 0, + skin = "1", + flag_visibility = "TurnOn", + cc_touch_count = 0, + ccalarmicon = "hud_secup_red.vtf", ccalarmiconx = 60, ccalarmicony = 5, ccalarmiconwidth = 16, ccalarmiconheight = 16, ccalarmiconalign = 3, + detcc_sentence = "CZ_RCC_DET", + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = -1, + } + } +} + + +-- command points +CP_COUNT = 5 + +command_points = { + [1] = { cp_number = 1, defending_team = Team.kUnassigned, cap_requirement = { [TEAM1] = 1000, [TEAM2] = 1000 }, cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, delay_before_retouch = { [TEAM1] = 4.0, [TEAM2] = 4.0 }, touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, point_value = { [TEAM1] = 1, [TEAM2] = 5 }, score_timer_interval = { [TEAM1] = 30.00, [TEAM2] = 15.00 }, hudstatusicon = "hud_cp_1.vtf", hudposx = -40, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [2] = { cp_number = 2, defending_team = Team.kUnassigned, cap_requirement = { [TEAM1] = 1000, [TEAM2] = 1000 }, cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, delay_before_retouch = { [TEAM1] = 4.0, [TEAM2] = 4.0 }, touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, point_value = { [TEAM1] = 2, [TEAM2] = 4 }, score_timer_interval = { [TEAM1] = 26.25, [TEAM2] = 18.75 }, hudstatusicon = "hud_cp_2.vtf", hudposx = -20, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [3] = { cp_number = 3, defending_team = Team.kUnassigned, cap_requirement = { [TEAM1] = 1000, [TEAM2] = 1000 }, cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, delay_before_retouch = { [TEAM1] = 4.0, [TEAM2] = 4.0 }, touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, point_value = { [TEAM1] = 3, [TEAM2] = 3 }, score_timer_interval = { [TEAM1] = 22.50, [TEAM2] = 22.50 }, hudstatusicon = "hud_cp_3.vtf", hudposx = 0, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [4] = { cp_number = 4, defending_team = Team.kUnassigned, cap_requirement = { [TEAM1] = 1000, [TEAM2] = 1000 }, cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, delay_before_retouch = { [TEAM1] = 4.0, [TEAM2] = 4.0 }, touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, point_value = { [TEAM1] = 4, [TEAM2] = 2 }, score_timer_interval = { [TEAM1] = 18.75, [TEAM2] = 26.25 }, hudstatusicon = "hud_cp_4.vtf", hudposx = 20, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 }, + [CP_COUNT] = { cp_number = 5, defending_team = Team.kUnassigned, cap_requirement = { [TEAM1] = 1000, [TEAM2] = 1000 }, cap_status = { [TEAM1] = 0, [TEAM2] = 0 }, cap_speed = { [TEAM1] = 0, [TEAM2] = 0 }, next_cap_zone_timer = { [TEAM1] = 0, [TEAM2] = 0 }, delay_before_retouch = { [TEAM1] = 4.0, [TEAM2] = 4.0 }, touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, former_touching_players = { [TEAM1] = Collection(), [TEAM2] = Collection() }, point_value = { [TEAM1] = 5, [TEAM2] = 1 }, score_timer_interval = { [TEAM1] = 15.00, [TEAM2] = 30.00 }, hudstatusicon = "hud_cp_5.vtf", hudposx = 40, hudposy = 56, hudalign = 4, hudwidth = 16, hudheight = 16 } +} + + +-- scoring +POINTS_FOR_COMPLETE_CONTROL = 100 +CC_DESTROY_POINTS = 15 + + +-- zones +CAP_ZONE_TIMER_INTERVAL = 0.2 +CAP_ZONE_NOTOUCH_SPEED = 10 +PLAYER_TOUCHING_CP_ZONE = {} +ENTITY_TOUCHING_CC = {} + + +-- flags +ENABLE_FLAGS = false +FLAG_CARRIER_SPEED = 0.75 +FLAG_RETURN_TIME = 0 +flags = { team_info[TEAM1].team_name .. "_flag", team_info[TEAM2].team_name .. "flag" } + + +-- teleporting +ENABLE_CC_TELEPORTERS = true +ENABLE_CP_TELEPORTERS = true + + +-- command center +ENABLE_CC = true + + +-- complete control +ENABLE_COMPLETE_CONTROL_POINTS = true +ENABLE_COMPLETE_CONTROL_RESET = true +ENABLE_COMPLETE_CONTROL_RESPAWN = true +COMPLETE_CONTROL_RESPAWN_DELAY = 1 + + +-- door names (prefixes will automatically be added based on the trigger's team) +doors = { "_flagroom_door_top" , "_flagroom_door_bottom", "_base_door_01_left", "_base_door_01_right", "_base_door_02_left", "_base_door_02_right" } + + +-- cp capture sounds +good_cap_sounds = { + [1] = "CZ_GOTCP1", + [2] = "CZ_GOTCP2", + [3] = "CZ_GOTCP3", + [4] = "CZ_GOTCP4", + [5] = "CZ_GOTCP5" +} +bad_cap_sounds = { + [1] = "CZ_LOSTCP1", + [2] = "CZ_LOSTCP2", + [3] = "CZ_LOSTCP3", + [4] = "CZ_LOSTCP4", + [5] = "CZ_LOSTCP5" +} + + +-- cp status background icons +icons = { + [TEAM1] = { teamicon = "hud_cp_" .. team_info[TEAM1].team_name .. ".vtf", lockicon = "hud_cp_locked.vtf" }, + [TEAM2] = { teamicon = "hud_cp_" .. team_info[TEAM2].team_name .. ".vtf", lockicon = "hud_cp_locked.vtf" }, + [Team.kUnassigned] = { teamicon = "hud_cp_neutral.vtf" } +} + + +-- cp cap status icons +cp_zone_icons = { + [TEAM1] = { hudicon = "hud_flag_" .. team_info[TEAM1].team_name .. ".vtf", hudx = 5, hudy = 162, hudwidth = 48, hudheight = 48, hudalign = 1, hudposy_offset = -20 }, + [TEAM2] = { hudicon = "hud_flag_" .. team_info[TEAM2].team_name .. ".vtf", hudx = 5, hudy = 162, hudwidth = 48, hudheight = 48, hudalign = 1, hudposy_offset = 20 } +} + + +-- All of the CP ammo and armor (mainly used for removing all ammo and armor when command points reset) +cp_ammo_and_armor_names = { + "cp_cp1_ammo", + "cp_cp2_ammo", + "cp_cp3_ammo", + "cp_cp4_ammo", + "cp_cp5_ammo", + + -- backwards compatiblity - use "cp_*" names in your map instead! + "cz2_cp1_ammo", + "cz2_cp2_ammo", + "cz2_cp3_ammo", + "cz2_cp4_ammo", + "cz2_cp5_ammo", + + "cp_cp1_armor", + "cp_cp2_armor", + "cp_cp3_armor", + "cp_cp4_armor", + "cp_cp5_armor", + + -- backwards compatiblity - use "cp_*" names in your map instead! + "cz2_cp1_armor", + "cz2_cp2_armor", + "cz2_cp3_armor", + "cz2_cp4_armor", + "cz2_cp5_armor", +} + +cap_resupply = { + health = 100, + armor = 100, + nails = 100, + shells = 100, + cells = 100, + grenades = 50, + rockets = 50, + detpacks = 0, + mancannons = 1, + gren1 = 2, + gren2 = 1 +} + diff --git a/maps/includes/base_cp_sequential.lua b/maps/includes/base_cp_sequential.lua new file mode 100644 index 0000000..bab9786 --- /dev/null +++ b/maps/includes/base_cp_sequential.lua @@ -0,0 +1,1735 @@ +-- base_cp.lua + +-- if you want base cp with the default setup, +-- include base_cp_default.lua in your map's lua file +-- and then include base_cp.lua + +if OBJECTIVE_TEAM1 == nil then OBJECTIVE_TEAM1 = nil end +if OBJECTIVE_TEAM2 == nil then OBJECTIVE_TEAM2 = nil end + +function startup() + SetGameDescription( "Sequential Control Points" ) + + -- disable certain teams + for i,v in pairs(disabled_teams) do + SetPlayerLimit( v, -1 ) + end + + -- set up team limits + for i1,v1 in pairs(teams) do + local team = GetTeam(v1) + for i2,v2 in ipairs(team_info[team:GetTeamId()].class_limits) do + team:SetClassLimit( i2, v2 ) + end + end + + RemoveAllCPAmmoAndArmor() + + ChangeCPDefendingTeam( 1, TEAM1 ) + ChangeCPDefendingTeam( CP_COUNT, TEAM2 ) + + for i,v in ipairs(command_points) do + RemoveSchedule( "cp" .. v.cp_number .. "_cap_timer" ) + ResetCPCapping( v ) + AddScheduleRepeating( "cp" .. v.cp_number .. "_cap_zone_timer", CAP_ZONE_TIMER_INTERVAL, cap_zone_timer, v ) + end + + OBJECTIVE_TEAM1 = "cp2_zone" + OBJECTIVE_TEAM2 = "cp4_zone" + UpdateTeamObjectiveIcon( GetTeam(TEAM1), GetEntityByName( OBJECTIVE_TEAM1 ) ) + UpdateTeamObjectiveIcon( GetTeam(TEAM2), GetEntityByName( OBJECTIVE_TEAM2 ) ) +end + +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + + if player:GetTeamId() == TEAM1 then + UpdateObjectiveIcon( player, GetEntityByName( OBJECTIVE_TEAM1 ) ) + elseif player:GetTeamId() == TEAM2 then + UpdateObjectiveIcon( player, GetEntityByName( OBJECTIVE_TEAM2 ) ) + end +end + +function precache() + + -- precache the cap sounds + for i in pairs(good_cap_sounds) do + PrecacheSound(good_cap_sounds[i]) + PrecacheSound(bad_cap_sounds[i]) + end + + PrecacheSound("misc.thunder") + + PrecacheSound("Buttons.snd9") + PrecacheSound("Buttons.snd45") + + PrecacheSound("ff_cz2.teleport_exit") + + PrecacheSound("k_lab.teleport_post_winddown") + PrecacheSound("novaprospekt.teleport_post_thunder") + PrecacheSound("NPC_Ichthyosaur.AttackGrowl") + PrecacheSound("Streetwar.d3_c17_11_die") + PrecacheSound("streetwar.Ba_UseConsoleSounds") + + PrecacheSound("misc.thunder") + PrecacheSound("misc.woop") + PrecacheSound("misc.bloop") + + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") +end + +function PlayerStartTouchingCapZone( touch_entity, cp ) + + local player = CastToPlayer(touch_entity) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] == cp then return end + + if player:GetTeamId() == TEAM1 then + if cp.cp_number > 1 then + local last_team1_cp = cp.cp_number - 1 + if command_points[last_team1_cp].defending_team ~= TEAM1 then return end + end + elseif player:GetTeamId() == TEAM2 then + if cp.cp_number < CP_COUNT then + local last_team2_cp = cp.cp_number + 1 + if command_points[last_team2_cp].defending_team ~= TEAM2 then return end + end + end + + local team_number = player:GetTeamId() + + PLAYER_TOUCHING_CP_ZONE[player:GetId()] = cp + + cp.touching_players[team_number]:AddItem( player ) + cp.former_touching_players[team_number]:RemoveItem( player ) + if player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic then + cp.cap_speed[team_number] = cp.cap_speed[team_number] + ( player:MaxSpeed() * 1.5 / 10 ) + else + cp.cap_speed[team_number] = cp.cap_speed[team_number] + ( player:MaxSpeed() / 10 ) + end + + if team_number ~= cp.defending_team then + player:SetCloakable( false ) + end + + local cp_zone_hudicon = cp_zone_icons[team_number] + AddHudIcon( player, cp_zone_hudicon.hudicon, cp_zone_hudicon.hudicon, cp_zone_hudicon.hudx, cp_zone_hudicon.hudy, cp_zone_hudicon.hudwidth, cp_zone_hudicon.hudheight, cp_zone_hudicon.hudalign ) + + event_StartTouchingCP( touch_entity, cp ) +end + +function PlayerStopTouchingCapZone( touch_entity, cp ) + + local player = CastToPlayer(touch_entity) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] == nil then return end + + local team_number = player:GetTeamId() + + PLAYER_TOUCHING_CP_ZONE[player:GetId()] = nil + + cp.touching_players[team_number]:RemoveItem( player ) + cp.former_touching_players[team_number]:AddItem( player ) + + if player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic then + cp.cap_speed[team_number] = cp.cap_speed[team_number] - ( player:MaxSpeed() * 1.5 / 10 ) + else + cp.cap_speed[team_number] = cp.cap_speed[team_number] - ( player:MaxSpeed() / 10 ) + end + + -- clamp + if cp.cap_speed[team_number] < 0 then + cp.cap_speed[team_number] = 0 + end + + player:SetCloakable( true ) + + RemoveHudItem( player, cp_zone_icons[team_number].hudicon ) + + event_StopTouchingCP( touch_entity, cp ) + +end + + +function DrawCCAlarmIcon( cc_team_number ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + + -- turn on alarm + if team_info[cc_team_number].cc_touch_count > 0 then + + RemoveHudItemFromAll( cc_team_number .. "-ccalarmicon_neutral" ) + AddHudIconToAll( team_info[cc_team_number].ccalarmicon, cc_team_number .. "-ccalarmicon", team_info[cc_team_number].ccalarmiconx, team_info[cc_team_number].ccalarmicony, team_info[cc_team_number].ccalarmiconwidth, team_info[cc_team_number].ccalarmiconheight, team_info[cc_team_number].ccalarmiconalign ) + + -- turn off alarm + else + + RemoveHudItemFromAll( cc_team_number .. "-ccalarmicon" ) + AddHudIconToAll( team_info[Team.kUnassigned].ccalarmicon, cc_team_number .. "-ccalarmicon_neutral", team_info[cc_team_number].ccalarmiconx, team_info[cc_team_number].ccalarmicony, team_info[cc_team_number].ccalarmiconwidth, team_info[cc_team_number].ccalarmiconheight, team_info[cc_team_number].ccalarmiconalign ) + + end + +end + +function EntityStartTouchingCC( touch_entity, cc_team_number ) + + if ENTITY_TOUCHING_CC[touch_entity:GetId()] ~= nil then return end + + ENTITY_TOUCHING_CC[touch_entity:GetId()] = cc_team_number + + team_info[cc_team_number].cc_touch_count = team_info[cc_team_number].cc_touch_count + 1 + + -- turn on alarm + if team_info[cc_team_number].cc_touch_count > 0 then + + event_StartTouchingCC( touch_entity, cc_team_number ) + + end + + DrawCCAlarmIcon( cc_team_number ) + +end + +function EntityStopTouchingCC( touch_entity, cc_team_number ) + + if ENTITY_TOUCHING_CC[touch_entity:GetId()] == nil then return end + + ENTITY_TOUCHING_CC[touch_entity:GetId()] = nil + + team_info[cc_team_number].cc_touch_count = team_info[cc_team_number].cc_touch_count - 1 + + -- turn off alarm + if team_info[cc_team_number].cc_touch_count <= 0 then + + team_info[cc_team_number].cc_touch_count = 0 + + event_StopTouchingCC( touch_entity, cc_team_number ) + + end + + DrawCCAlarmIcon( cc_team_number ) + +end + +function player_disconnected( player ) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] ~= nil then + PlayerStopTouchingCapZone( player, PLAYER_TOUCHING_CP_ZONE[player:GetId()] ) + end + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + EntityStopTouchingCC( player, ENTITY_TOUCHING_CC[player:GetId()] ) + end + +end + +function player_switchteam( player, currentteam, desiredteam ) + + if PLAYER_TOUCHING_CP_ZONE[player:GetId()] ~= nil then + PlayerStopTouchingCapZone( player, PLAYER_TOUCHING_CP_ZONE[player:GetId()] ) + end + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + EntityStopTouchingCC( player, ENTITY_TOUCHING_CC[player:GetId()] ) + end + + return true + +end + +----------------------------------------------------------------------------- +-- timed scoring +----------------------------------------------------------------------------- +function cp_score_timer( cp_number, team_number ) + + local team = GetTeam(team_number) + team:AddScore(command_points[cp_number].point_value[team_number]) + +end + +----------------------------------------------------------------------------- +-- notify the players of the total cap. +-- Also, create a logic_relay in your map named fullcap_trigger to pass outputs to your entities. +----------------------------------------------------------------------------- +function complete_control_notification ( team_number ) + local team = GetTeam(team_number) + SmartTeamSound(team, "yourteam.flagcap", "otherteam.flagcap") + SmartTeamSpeak(team, "CZ_GOTALL", "CZ_THEYGOTALL") + SmartTeamMessage(team, "#FF_CZ2_YOURTEAM_COMPLETE", "#FF_CZ2_OTHERTEAM_COMPLETE", Color.kGreen, Color.kRed) + OutputEvent( "fullcap_trigger", "Trigger" ) + + OBJECTIVE_TEAM1 = "cp2_zone" + OBJECTIVE_TEAM2 = "cp4_zone" + UpdateTeamObjectiveIcon( GetTeam(TEAM1), GetEntityByName( OBJECTIVE_TEAM1 ) ) + UpdateTeamObjectiveIcon( GetTeam(TEAM2), GetEntityByName( OBJECTIVE_TEAM2 ) ) +end + +----------------------------------------------------------------------------- +-- reset everything after the total cap. +----------------------------------------------------------------------------- +function complete_control_respawn () + ApplyToAll( { AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, kReloadClips } ) +end + +----------------------------------------------------------------------------- +-- emit a sound from an entity +----------------------------------------------------------------------------- +function EmitSound( entity, sound ) + + entity:EmitSound(sound) + +end + +----------------------------------------------------------------------------- +-- remove all the ammo and armor from the entire map +----------------------------------------------------------------------------- +function RemoveAllCPAmmoAndArmor() + + -- Remove all ammo and armor from CPs + local c = Collection() + c:GetByName(cp_ammo_and_armor_names, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Remove() + end + +end + +----------------------------------------------------------------------------- +-- does the player have a flag? +----------------------------------------------------------------------------- +function PlayerHasFlag( player ) + + -- check if the player has a flag + for i,v in ipairs(flags) do + if player:HasItem(v) then + -- player has a flag + return true + end + end + + -- player doesn't have a flag + return false + +end + +----------------------------------------------------------------------------- +-- return carried flags +----------------------------------------------------------------------------- +function ReturnFlagFromPlayer( player ) + + -- Get all carried flags and ... + local c = Collection() + c:GetByName(flags, { CF.kInfoScript_Carried, }) + + -- ... return the flag that the player is carrying. + for item in c.items do + item = CastToInfoScript(item) + carrier = item:GetCarrier() + if player:GetId() == carrier:GetId() then + item:Return() + end + end + +end + +----------------------------------------------------------------------------- +-- resupply a player when a cp is capped +----------------------------------------------------------------------------- +function CapResupply( player, scale, givethegoodshit ) + + -- give the player health and armor + if cap_resupply.health ~= nil and cap_resupply.health ~= 0 then player:AddHealth( cap_resupply.health * scale ) end + if cap_resupply.armor ~= nil and cap_resupply.armor ~= 0 then player:AddArmor( cap_resupply.armor * scale ) end + + -- give the player ammo + if cap_resupply.nails ~= nil and cap_resupply.nails ~= 0 then player:AddAmmo( Ammo.kNails, cap_resupply.nails * scale ) end + if cap_resupply.shells ~= nil and cap_resupply.shells ~= 0 then player:AddAmmo( Ammo.kShells, cap_resupply.shells * scale ) end + if cap_resupply.rockets ~= nil and cap_resupply.rockets ~= 0 then player:AddAmmo( Ammo.kRockets, cap_resupply.rockets * scale ) end + if cap_resupply.cells ~= nil and cap_resupply.cells ~= 0 then player:AddAmmo( Ammo.kCells, cap_resupply.cells * scale ) end + + if givethegoodshit then + -- give the player the good shit + if cap_resupply.detpacks ~= nil and cap_resupply.detpacks ~= 0 then player:AddAmmo( Ammo.kDetpack, cap_resupply.detpacks * scale ) end + if cap_resupply.mancannons ~= nil and cap_resupply.mancannons ~= 0 then player:AddAmmo( Ammo.kManCannon, cap_resupply.mancannons * scale ) end + if cap_resupply.gren1 ~= nil and cap_resupply.gren1 ~= 0 then player:AddAmmo( Ammo.kGren1, cap_resupply.gren1 * scale ) end + if cap_resupply.gren2 ~= nil and cap_resupply.gren2 ~= 0 then player:AddAmmo( Ammo.kGren2, cap_resupply.gren2 * scale ) end + end + +end + +function player_killed ( player_victim, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + end + + -- if still no attacking player after all that, try the inflictor + if not player_attacker then + + -- Entity that is attacking + local inflictor = damageinfo:GetInflictor() + + if inflictor then + if IsSentrygun(inflictor) then + inflictor = CastToSentrygun(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDetpack(inflictor) then + inflictor = CastToDetpack(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDispenser(inflictor) then + inflictor = CastToDispenser(inflictor) + player_attacker = inflictor:GetOwner() + end + end + + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- if victim killed self or teammate do nothing + if (player_victim:GetId() == player_attacker:GetId()) or (player_victim:GetTeamId() == player_attacker:GetTeamId()) then return end + + local player_victim_touching_cp = PLAYER_TOUCHING_CP_ZONE[player_victim:GetId()] + local player_attacker_touching_cp = PLAYER_TOUCHING_CP_ZONE[player_attacker:GetId()] + + -- the victim is standing in a zone + if player_victim_touching_cp ~= nil then + + -- the victim is defending a cp or trying to capture a neutral cp + if player_victim:GetTeamId() == player_victim_touching_cp.defending_team or player_victim_touching_cp.defending_team == Team.kUnassigned then + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_victim_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + -- the victim is trying to capture the attacker's cp + else + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_victim_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + + end + + end + + -- the attacker is standing in a zone + if player_attacker_touching_cp ~= nil then + + -- the attacker is defending a cp + if player_attacker:GetTeamId() == player_attacker_touching_cp.defending_team then + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_attacker_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + + -- the attacker is trying to capture a cp + else + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((player_attacker_touching_cp.point_value[player_attacker:GetTeamId()]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + end + + end + + -- loop through all former players of each command point + for k,v in ipairs(command_points) do + + -- victim's team + for i in v.former_touching_players[player_victim:GetTeamId()].items do + + i = CastToPlayer( i ) + + -- the victim was in an active zone + if i:GetId() == player_victim:GetId() then + + -- the victim is defending a cp or trying to capture a neutral cp + if player_victim:GetTeamId() == v.defending_team or v.defending_team == Team.kUnassigned then + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + -- the victim is trying to capture the attacker's cp + else + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + + end + + end + + end + + -- attacker's team + for i in v.former_touching_players[player_attacker:GetTeamId()].items do + + i = CastToPlayer( i ) + + -- the attacker was in an active zone + if i:GetId() == player_attacker:GetId() then + + -- the attacker is defending a cp + if player_attacker:GetTeamId() == v.defending_team then + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + + -- the attacker is trying to capture a cp + else + + --CapResupply( player_attacker, 0.25, false ) + player_attacker:AddFortPoints((v.point_value[player_attacker:GetTeamId()]) * 25, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + + end + + end + + end + + end + +end + +----------------------------------------------------------------------------- +-- change the cp's defending team, its related visuals, and its scoring +----------------------------------------------------------------------------- +function ChangeCPDefendingTeam( cp_number, new_defending_team ) + + local cp = command_points[cp_number] + + if cp_number > 1 and cp_number < CP_COUNT then + if new_defending_team == TEAM1 then + ResetCPCapping( command_points[cp_number - 1] ) + elseif new_defending_team == TEAM2 then + ResetCPCapping( command_points[cp_number + 1] ) + end + end + + event_ChangeCPDefendingTeam( cp_number, new_defending_team ) + + -- remove old flaginfo icons and add new ones + RemoveHudItemFromAll( cp_number .. "-background-" .. cp.defending_team ) + RemoveHudItemFromAll( cp_number .. "-foreground-" .. cp.defending_team ) + + AddHudIconToAll( icons[ new_defending_team ].teamicon, cp_number .. "-background-" .. new_defending_team, cp.hudposx, cp.hudposy, cp.hudwidth, cp.hudheight, cp.hudalign) + AddHudIconToAll( cp.hudstatusicon, cp_number .. "-foreground-" .. new_defending_team, cp.hudposx, cp.hudposy, cp.hudwidth, cp.hudheight, cp.hudalign) + + local schedule_name = "cp" .. cp_number .. "_score_timer" + + -- stop an existing timer + if cp.defending_team ~= Team.kUnassigned then + RemoveSchedule( schedule_name ) + end + + -- only worry with score timer for TEAM1 and TEAM2 + if new_defending_team ~= Team.kUnassigned then + + -- start the score timer + AddScheduleRepeating( schedule_name, cp.score_timer_interval[new_defending_team], cp_score_timer, cp_number, new_defending_team ) + + end + + cp.defending_team = new_defending_team + +end + +----------------------------------------------------------------------------- +-- restore all items in a CP +----------------------------------------------------------------------------- +function RestoreCPItems( cp_number, old_defending_team, new_defending_team ) + + local c = Collection() + c:GetByName( { "cp_cp" .. cp_number .. "_ammo", "cz2_cp" .. cp_number .. "_ammo", "cp_cp" .. cp_number .. "_armor", "cz2_cp" .. cp_number .. "_armor" }, { CF.kNone } ) + for item in c.items do + item = CastToInfoScript(item) + + -- restore this CP's ammo and armor + item:Restore() + + -- Also set the touchflags so only the defending team can use the packs + item:SetTouchFlags(team_info[new_defending_team].touchflags) + end + +end + +----------------------------------------------------------------------------- +-- reset team cp capping stuff +----------------------------------------------------------------------------- +function ResetTeamCPCapping( cp, team_number, do_total_reset, set_next_cap_zone_timer ) + + cp.cap_status[team_number] = 0 + cp.next_cap_zone_timer[team_number] = set_next_cap_zone_timer + + RemoveHudItemFromAll( cp.cp_number .. "-capstatusicon-" .. team_number ) + RemoveHudItemFromAll( cp.cp_number .. "-caplockicon-" .. team_number ) + event_ResetTeamCPCapping( cp, team_number ) + + if cp.former_touching_players[team_number]:Count() > 0 then + cp.former_touching_players[team_number]:RemoveAllItems() + end + + if do_total_reset then + if cp.touching_players[team_number]:Count() > 0 then + cp.touching_players[team_number]:RemoveAllItems() + end + + cp.cap_speed[team_number] = 0 + end + +end + +----------------------------------------------------------------------------- +-- reset all cp capping stuff +----------------------------------------------------------------------------- +function ResetCPCapping( cp ) + + for i,v in pairs(teams) do + ResetTeamCPCapping( cp, v, true, 0 ) + end + +end + +----------------------------------------------------------------------------- +-- reset and lock a capture point for a certain amount of time +----------------------------------------------------------------------------- +function LockCPCapping( cp, lock_time ) + + for i,v in pairs(teams) do + ResetTeamCPCapping( cp, v, true, lock_time ) + end + +end + +----------------------------------------------------------------------------- +-- reset and lock a capture point for a certain amount of time +----------------------------------------------------------------------------- +function StopCPScoring( cp_number ) + + local cp = command_points[cp_number] + + if cp.defending_team ~= Team.kUnassigned then + RemoveSchedule( "cp" .. cp_number .. "_score_timer" ) + end + +end + +----------------------------------------------------------------------------- +-- the cp has definitely been captured +----------------------------------------------------------------------------- +function CaptureCP( cp_number, new_defending_team ) + + local cp = command_points[cp_number] + local old_defending_team = cp.defending_team + + RestoreCPItems(cp_number, old_defending_team, new_defending_team) + + -- Give points to team and player + local team = GetTeam(new_defending_team) + team:AddScore(cp.point_value[new_defending_team]) + + -- Find out if any team has complete control + local team_with_complete_control = Team.kUnassigned + local control_count = { [TEAM1] = 0, [TEAM2] = 0 } + control_count[new_defending_team] = 1 + for i,v in ipairs(command_points) do + if v.defending_team ~= Team.kUnassigned and v.cp_number ~= cp_number then + control_count[v.defending_team] = control_count[v.defending_team] + 1 + end + if control_count[v.defending_team] == CP_COUNT then + team_with_complete_control = v.defending_team + break + end + end + + -- update objective icons if not all cp's captured + if team_with_complete_control == Team.kUnassigned then + if new_defending_team == TEAM1 then + OBJECTIVE_TEAM1 = "cp"..(cp_number+1).."_zone" + if old_defending_team ~= Team.kUnassigned then + OBJECTIVE_TEAM2 = "cp"..(cp_number).."_zone" + end + elseif new_defending_team == TEAM2 then + OBJECTIVE_TEAM2 = "cp"..(cp_number-1).."_zone" + if old_defending_team ~= Team.kUnassigned then + OBJECTIVE_TEAM1 = "cp"..(cp_number).."_zone" + end + end + UpdateTeamObjectiveIcon( GetTeam(TEAM1), GetEntityByName( OBJECTIVE_TEAM1 ) ) + UpdateTeamObjectiveIcon( GetTeam(TEAM2), GetEntityByName( OBJECTIVE_TEAM2 ) ) + end + + if team_with_complete_control ~= Team.kUnassigned then + + if ENABLE_COMPLETE_CONTROL_POINTS then + -- Bonus points for complete control + team:AddScore(POINTS_FOR_COMPLETE_CONTROL) + end + + if ENABLE_COMPLETE_CONTROL_RESET then + + AddSchedule("complete_control_notification", 0.1, complete_control_notification, team_with_complete_control) + + if ENABLE_COMPLETE_CONTROL_RESPAWN then + + -- change the team of the capped cp + ChangeCPDefendingTeam(cp_number, new_defending_team) + + -- Lock all command points + -- Stop periodic scoring for all command points + for i,v in ipairs(command_points) do + StopCPScoring( i ) + LockCPCapping( v, COMPLETE_CONTROL_RESPAWN_DELAY ) + end + + AddSchedule("complete_control", COMPLETE_CONTROL_RESPAWN_DELAY, TeamCompleteControl, team_with_complete_control ) + else + TeamCompleteControl( team_with_complete_control ) + end + + -- get out now if resetting + return + + end + + end + + ChangeCPDefendingTeam(cp_number, new_defending_team) + + -- change the colors this team's respawn beams + --local beam_team = team_info[new_defending_team] + --beam_team.respawnbeam_color[beam_team.color_index] = beam_team.respawnbeam_color[Team.kUnassigned] + (control_count[new_defending_team] * 35) + --OutputEvent( beam_team.team_name .. "_respawn_beam", "Color", beam_team.respawnbeam_color[0] .. " " .. beam_team.respawnbeam_color[1] .. " " .. beam_team.respawnbeam_color[2] ) + + SmartTeamMessage( team, "#FF_CZ2_YOURTEAM_CP" .. cp_number, "#FF_CZ2_OTHERTEAM_CP" .. cp_number, Color.kGreen, Color.kRed ) + + -- sounds will get more and more crazy + --SmartTeamSound( team, good_cap_sounds[control_count[new_defending_team]], bad_cap_sounds[control_count[new_defending_team]] ) + + -- caes: changed it to announce the cp number captured/lost + SmartTeamSpeak( team, good_cap_sounds[cp_number], bad_cap_sounds[cp_number] ) +end + +function TeamCompleteControl( control_team ) + + -- Reset all command points + for i,v in ipairs(command_points) do + ChangeCPDefendingTeam(v.cp_number, Team.kUnassigned) + ResetCPCapping( v ) + end + + ChangeCPDefendingTeam( 1, TEAM1 ) + ChangeCPDefendingTeam( CP_COUNT, TEAM2 ) + + -- reset colors of respawn beams + --OutputEvent( team_info[TEAM1].team_name .. "_respawn_beam", "Color", team_info[Team.kUnassigned].respawnbeam_color[0] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[1] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[2] ) + --OutputEvent( team_info[TEAM2].team_name .. "_respawn_beam", "Color", team_info[Team.kUnassigned].respawnbeam_color[0] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[1] .. " " .. team_info[Team.kUnassigned].respawnbeam_color[2] ) + + if ENABLE_FLAGS then + -- Return all flags + local c = Collection() + c:GetByName(flags, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Return() + end + end + + RemoveAllCPAmmoAndArmor() + + if ENABLE_COMPLETE_CONTROL_RESPAWN then + complete_control_respawn() + end + +end + + +----------------------------------------------------------------------------- +-- a cp's defending team successfully defended or capped +----------------------------------------------------------------------------- +function SuccessfulCPDefense( cp, team_number, is_a_cap ) + + -- reward the touching players + for i in cp.touching_players[team_number].items do + i = CastToPlayer( i ) + if is_a_cap then + CapResupply( i, 0.50, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 100, "#FF_FORTPOINTS_CAPTUREPOINT") + i:SetCloakable( true ) + else + --CapResupply( i, 0.50, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 50, "#FF_FORTPOINTS_DEFENDPOINT") + end + end + + -- reward the former touching players + for i in cp.former_touching_players[team_number].items do + i = CastToPlayer( i ) + if is_a_cap then + --CapResupply( i, 0.50, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 50, "#FF_FORTPOINTS_CAPTUREPOINT_ASSIST") + else + --CapResupply( i, 0.25, is_a_cap ) + i:AddFortPoints((cp.point_value[team_number]) * 25, "#FF_FORTPOINTS_DEFENDPOINT_ASSIST") + end + end + + -- no need to keep them around for future rewards + cp.former_touching_players[team_number]:RemoveAllItems() + +end + + +----------------------------------------------------------------------------- +-- timed cp capping +----------------------------------------------------------------------------- +function cap_zone_timer( cp ) + + local new_defending_team = Team.kUnassigned + local other_team = Team.kUnassigned + local last_cap_status = {} + local total_cap_speed = 0 + local total_cap_status = 0 + + for i,v in pairs(teams) do + total_cap_speed = total_cap_speed + cp.cap_speed[v] + total_cap_status = total_cap_status + cp.cap_status[v] + end + + for i,v in pairs(teams) do + + -- don't bother doing some stuff if nothing has changed + last_cap_status[v] = cp.cap_status[v] + + -- after one team caps a cp, the other team can't touch that cp for X seconds + if cp.next_cap_zone_timer[v] > 0 then + + cp.next_cap_zone_timer[v] = cp.next_cap_zone_timer[v] - CAP_ZONE_TIMER_INTERVAL + + local lock_percent = math.min( 1.0, cp.next_cap_zone_timer[v] / cp.delay_before_retouch[v] ) + local minlockhudwidth = cp.hudwidth * 0.333 + local minlockhudheight = cp.hudheight * 0.333 + + AddHudIconToAll( icons[v].lockicon, cp.cp_number .. "-caplockicon-" .. v, cp.hudposx, cp.hudposy + cp_zone_icons[v].hudposy_offset, minlockhudwidth + ( (cp.hudwidth - minlockhudwidth) * lock_percent ), minlockhudheight + ( (cp.hudheight - minlockhudheight) * lock_percent ), cp.hudalign) + + -- clamp + if cp.next_cap_zone_timer[v] <= 0 then + cp.next_cap_zone_timer[v] = 0 + RemoveHudItemFromAll( cp.cp_number .. "-caplockicon-" .. v ) + end + + -- this team is standing in the zone + elseif cp.cap_speed[v] > 0 then + + -- don't bother with cap_status calculations for the defending team + if v == cp.defending_team then + + cp.cap_status[v] = cp.cap_requirement[v] + + -- calculate cap status + else + + -- every vote counts + local affected_cap_speed = cp.cap_speed[v] - ( total_cap_speed - cp.cap_speed[v] ) + + cp.cap_status[v] = cp.cap_status[v] + affected_cap_speed + + -- clamp + if cp.cap_status[v] < 0 then + + cp.cap_status[v] = 0 + + -- potential capping team + elseif cp.cap_status[v] >= cp.cap_requirement[v] then + + new_defending_team = v + + -- clamp + cp.cap_status[v] = cp.cap_requirement[v] + + end + end + + -- this team is not standing in the zone + else + if v == cp.defending_team then + -- don't bother with cap_status calculations for the defending team + cp.cap_status[v] = 0 + else + -- decrease cap status + cp.cap_status[v] = cp.cap_status[v] - ( CAP_ZONE_NOTOUCH_SPEED + total_cap_speed ) + + -- clamp + if cp.cap_status[v] < 0 then + cp.cap_status[v] = 0 + end + end + end + + -- don't bother doing some stuff if nothing has changed + if cp.cap_status[v] ~= last_cap_status[v] then + + -- draw the cap status icon + if cp.cap_status[v] > 0 then + + local cap_percent = cp.cap_status[v] / cp.cap_requirement[v] + local minhudwidth = cp.hudwidth * 0.333 + local minhudheight = cp.hudheight * 0.333 + AddHudIconToAll( cp_zone_icons[v].hudicon, cp.cp_number .. "-capstatusicon-" .. v, cp.hudposx, cp.hudposy + cp_zone_icons[v].hudposy_offset, minhudwidth + ( (cp.hudwidth - minhudwidth) * cap_percent ), minhudheight + ( (cp.hudheight - minhudheight) * cap_percent ), cp.hudalign) + -- only do this event once, when the team first starts capping + if last_cap_status[v] <= 0 then + event_StartTeamCPCapping( cp, v ) + end + + -- remove the cap status icon, remove former touching players, and reward defenders + else + + -- reward the defenders + if v ~= cp.defending_team and cp.defending_team ~= Team.kUnassigned then + SuccessfulCPDefense( cp, cp.defending_team, false ) + end + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( cp, v, false, 0 ) + + end + + end + + if new_defending_team ~= v then + other_team = v + end + + end + + -- someone capped this cp + if new_defending_team ~= Team.kUnassigned then + + -- cap the cp + SuccessfulCPDefense( cp, new_defending_team, true ) + CaptureCP( cp.cp_number, new_defending_team ) + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( cp, other_team, false, cp.delay_before_retouch[other_team] ) + + end + +end + + +----------------------------------------------------------------------------- +-- triggers +----------------------------------------------------------------------------- + +cp_base_trigger = trigger_ff_script:new({ team = Team.kUnassigned, failtouch_message = "" }) + +function cp_base_trigger:allowed( allowed_entity ) + + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + return EVENT_DISALLOWED +end + +function cp_base_trigger:onfailtouch( touch_entity ) + + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + BroadCastMessageToPlayer( player, failtouch_message ) + end +end + +cp_team1_door_trigger = cp_base_trigger:new({ team = TEAM1 , failtouch_message = "#FF_NOTALLOWEDDOOR" }) +cp_team2_door_trigger = cp_base_trigger:new({ team = TEAM2 , failtouch_message = "#FF_NOTALLOWEDDOOR" }) + + +----------------------------------------------------------------------------- +-- packs +----------------------------------------------------------------------------- +cp_base_pack = genericbackpack:new({ + health = 100, + armor = 300, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 0, + mancannons = 0, + gren1 = 0, + gren2 = 0, + respawntime = 1, + touchflags = team_info[Team.kUnassigned].touchflags, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + cp_number = 0, + botgoaltype = Bot.kBackPack_Ammo, +}) + +function cp_base_pack:dropatspawn() return false end + +cp_team1_respawn_pack = cp_base_pack:new( { touchflags = team_info[TEAM1].touchflags } ) +cp_team2_respawn_pack = cp_base_pack:new( { touchflags = team_info[TEAM2].touchflags } ) + +cp_cp1_ammo = ammobackpack:new({cp_number = 1}) +cp_cp2_ammo = ammobackpack:new({cp_number = 2}) +cp_cp3_ammo = ammobackpack:new({cp_number = 3}) +cp_cp4_ammo = ammobackpack:new({cp_number = 4}) +cp_cp5_ammo = ammobackpack:new({cp_number = 5}) + +cp_cp1_armor = armorkit:new({cp_number = 1}) +cp_cp2_armor = armorkit:new({cp_number = 2}) +cp_cp3_armor = armorkit:new({cp_number = 3}) +cp_cp4_armor = armorkit:new({cp_number = 4}) +cp_cp5_armor = armorkit:new({cp_number = 5}) + + +----------------------------------------------------------------------------- +-- grenade packs +----------------------------------------------------------------------------- +cp_base_grenade_pack = cp_base_pack:new({ + detpacks = 1, + mancannons = 1, + gren1 = 4, + gren2 = 4, + respawntime = 15, + touchflags = team_info[Team.kUnassigned].touchflags, + botgoaltype = Bot.kBackPack_Grenades, +}) + +cp_team1_grenade_pack = cp_base_grenade_pack:new( { touchflags = team_info[TEAM1].touchflags } ) +cp_team2_grenade_pack = cp_base_grenade_pack:new( { touchflags = team_info[TEAM2].touchflags } ) + + +----------------------------------------------------------------------------- +-- cp zones +----------------------------------------------------------------------------- + +cp_base_cp_zone = trigger_ff_script:new({ + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, + cp_number = 0, +}) + +function cp_base_cp_zone:ontrigger( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if ENABLE_FLAGS or not ENABLE_CP_TELEPORTERS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow players on defending team to teleport back to base + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- respawn the player + ApplyToPlayer( player, { AT.kRespawnPlayers, kReloadClips } ) + + OutputEvent( "cp" .. self.cp_number .. "_respawn_enter_sound", "PlaySound" ) + AddSchedule("cp" .. self.cp_number .. "_respawn_" .. player:GetId(), 0.1, EmitSound, player, "ff_cz2.teleport_exit") + else + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_RESPAWN") + end + + end + + end + +end + +function cp_base_cp_zone:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these zones are used + if ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + PlayerStartTouchingCapZone( player, cp ) + end + +end + +function cp_base_cp_zone:onendtouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these zones are used + if ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + PlayerStopTouchingCapZone( player, cp ) + end +end + +cp_cp1_cp_zone = cp_base_cp_zone:new({ cp_number = 1 }) +cp_cp2_cp_zone = cp_base_cp_zone:new({ cp_number = 2 }) +cp_cp3_cp_zone = cp_base_cp_zone:new({ cp_number = 3 }) +cp_cp4_cp_zone = cp_base_cp_zone:new({ cp_number = 4 }) +cp_cp5_cp_zone = cp_base_cp_zone:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- cp triggers +----------------------------------------------------------------------------- + +cp_base_cp_trigger = trigger_ff_script:new({ + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, + cp_number = 0, +}) + +function cp_base_cp_trigger:ontrigger( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS or not ENABLE_CP_TELEPORTERS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow players on defending team to teleport back to base + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- check if the player has a flag + for i,v in ipairs(flags) do + -- return the flag + if player:HasItem(v) then ReturnFlagFromPlayer(player) end + end + + -- respawn the player + ApplyToPlayer( player, { AT.kRespawnPlayers, kReloadClips } ) + + OutputEvent( "cp" .. self.cp_number .. "_respawn_enter_sound", "PlaySound" ) + AddSchedule("cp" .. self.cp_number .. "_respawn_" .. player:GetId(), 0.1, EmitSound, player, "ff_cz2.teleport_exit") + else + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_RESPAWN") + end + + end + + end + +end + +function cp_base_cp_trigger:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + local cp = command_points[self.cp_number] + + -- No capping if player's team already defends this CP + if player:GetTeamId() == cp.defending_team then return end + + -- get out if player doesn't have flag + if not PlayerHasFlag(player) then return end + + ReturnFlagFromPlayer(player) + + CaptureCP(self.cp_number, player:GetTeamId()) + player:AddFortPoints((cp.point_value[player:GetTeamId()]) * 100, "#FF_FORTPOINTS_CAPTUREPOINT") + end + +end + +cp_cp1_cp_trigger = cp_base_cp_trigger:new({ cp_number = 1 }) +cp_cp2_cp_trigger = cp_base_cp_trigger:new({ cp_number = 2 }) +cp_cp3_cp_trigger = cp_base_cp_trigger:new({ cp_number = 3 }) +cp_cp4_cp_trigger = cp_base_cp_trigger:new({ cp_number = 4 }) +cp_cp5_cp_trigger = cp_base_cp_trigger:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- flags +----------------------------------------------------------------------------- + +cp_base_flag = info_ff_script:new({ + name = "Base Flag", + team = 0, + model = "models/flag/flag.mdl", + tosssound = "Flag.Toss", + modelskin = 0, + dropnotouchtime = 2, + capnotouchtime = 2, + botgoaltype = Bot.kFlag, + hudicon = "", + hudx = 5, + hudy = 180, + hudalign = 1, + touchflags = team_info[Team.kUnassigned].touchflags +}) + +function cp_base_flag:precache() + PrecacheSound(self.tosssound) + info_ff_script.precache(self) +end + +function cp_base_flag:spawn() + self.notouch = { } + info_ff_script.spawn(self) +end + +function cp_base_flag:addnotouch(player_id, duration) + self.notouch[player_id] = duration + AddSchedule(self.name .. "-" .. player_id, duration, self.removenotouch, self, player_id) +end + +function cp_base_flag.removenotouch(self, player_id) + self.notouch[player_id] = nil +end + +function cp_base_flag:touch( touch_entity ) + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() ~= self.team then return end + + -- pickup if they can + if self.notouch[player:GetId()] then return end + + -- make sure they don't have any flags already + for i,v in ipairs(flags) do + if player:HasItem(v) then return end + end + + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + local flag = CastToInfoScript(entity) + flag:Pickup(player) + player:AddEffect( EF.kSpeedlua1, -1, 0, FLAG_CARRIER_SPEED ) + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) +end + +function cp_base_flag:onownerdie( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end + +function cp_base_flag:onownerfeign( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end +function cp_base_flag:onownercloak( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) +end +function cp_base_flag:dropitemcmd( owner_entity ) + -- throw the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) +end + +function cp_base_flag:ondrop( owner_entity ) + local flag = CastToInfoScript(entity) + flag:EmitSound(self.tosssound) +end + +function cp_base_flag:onloseitem( owner_entity ) + -- let the player that lost the flag put on a disguise + local player = CastToPlayer( owner_entity ) + player:SetDisguisable(true) + player:SetCloakable(true) + + self:addnotouch(player:GetId(), self.capnotouchtime) + + --player:RemoveEffect( EF.kSpeedlua1 ) + -- remove flag icon from hud + local flag = CastToInfoScript(entity) + RemoveHudItem( player, flag:GetName() ) +end + +function cp_base_flag:onreturn( ) +end + +cp_team1_flag = cp_base_flag:new({ + team = TEAM1, + modelskin = 0, + name = team_info[TEAM1].team_name .. " flag", + hudicon = "hud_flag_" .. team_info[TEAM1].team_name .. ".vtf", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + touchflags = team_info[TEAM1].touchflags +}) + +cp_team2_flag = cp_base_flag:new({ + team = TEAM2, + modelskin = 1, + name = team_info[TEAM2].team_name .. " flag", + hudicon = "hud_flag_" .. team_info[TEAM2].team_name .. ".vtf", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + touchflags = team_info[TEAM2].touchflags +}) + + +----------------------------------------------------------------------------- +-- flag dispensers +----------------------------------------------------------------------------- +cp_base_flag_dispenser = trigger_ff_script:new({ + name = "Base Flag Dispenser", + team = Team.kUnassigned, + dropnotouchtime = 2, + botgoaltype = Bot.kFlag, + hudicon = "", + hudx = 5, + hudy = 180, + hudwidth = 48, + hudheight = 48, + hudalign = 1, + flags = {"flag"} +}) + +function cp_base_flag_dispenser:allowed ( allowed_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return EVENT_DISALLOWED end + + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + + -- Player can't have a flag + local playerhasflag = false + + for i,v in ipairs(self.flags) do + if player:HasItem(v) then + playerhasflag = true + break + end + end + + -- get out if player doesn't have flag + if not playerhasflag then + return EVENT_ALLOWED + end + end + end + return EVENT_DISALLOWED +end + +function cp_base_flag_dispenser:ontouch( trigger_entity ) + + -- check whether flags are used, and in turn wheter these triggers are used + if not ENABLE_FLAGS then return end + + if IsPlayer( trigger_entity ) then + + local player = CastToPlayer( trigger_entity ) + + local c = Collection() + c:GetByName( self.flags, { CF.kNone } ) + -- give the player an inactive flag + for item in c.items do + item = CastToInfoScript(item) + if item:IsInactive() then + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + item:Pickup(player) + player:AddEffect( EF.kSpeedlua1, -1, 0, FLAG_CARRIER_SPEED ) + AddHudIcon( player, self.hudicon, item:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) + + player:EmitSound("Buttons.snd9") + + -- all done + break + end + end + end +end + +cp_team1_flag_dispenser = cp_base_flag_dispenser:new({ + name = team_info[TEAM1].team_name .. " flag dispenser", + team = TEAM1, + hudicon = "hud_flag_" .. team_info[TEAM1].team_name .. ".vtf", + flags = { team_info[TEAM1].team_name .. "_flag" } +}) + +cp_team2_flag_dispenser = cp_base_flag_dispenser:new({ + name = team_info[TEAM2].team_name .. " flag dispenser", + team = TEAM2, + hudicon = "hud_flag_" .. team_info[TEAM2].team_name .. ".vtf", + flags = { team_info[TEAM2].team_name .. "_flag" } +}) + + +----------------------------------------------------------------------------- +-- command centers +----------------------------------------------------------------------------- + +cp_base_command_center = trigger_ff_script:new({ team = Team.kUnassigned, enemy_team = Team.kUnassigned }) +function cp_base_command_center:onexplode( explosion_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return EVENT_ALLOWED end + + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack(explosion_entity) + + -- don't let assholes destroy their own team's command center + if detpack:GetTeamId() == self.team then return EVENT_ALLOWED end + + local points = CC_DESTROY_POINTS + for i,v in ipairs(command_points) do + if v.defending_team == self.team then + -- taking CP 1 away from team2 is worth more than taking CP 5 away from them + points = points + v.point_value[self.team] + + -- Remove all ammo and armor from CPs + local c = Collection() + c:GetByName({"cp_cp" .. v.cp_number .. "_ammo", "cz2_cp" .. v.cp_number .. "_ammo", "cp_cp" .. v.cp_number .. "_armor", "cz2_cp" .. v.cp_number .. "_armor"}, { CF.kNone }) + for item in c.items do + item = CastToInfoScript(item) + item:Remove() + end + + -- reset the CP + ChangeCPDefendingTeam(v.cp_number, Team.kUnassigned) + end + + -- reset the other team's cp capping stuff + ResetTeamCPCapping( v, self.team, false, v.delay_before_retouch[self.team] * 2.0 ) + end + + local team = detpack:GetTeam() + team:AddScore(points) + + local player = detpack:GetOwner() + player:AddFortPoints(points * 100, "#FF_FORTPOINTS_DESTROY_CC" ) + + SmartSound(player, "misc.thunder", "misc.thunder", "misc.thunder") + SmartMessage(player, "#FF_CZ2_YOU_CC", "#FF_CZ2_YOURTEAM_CC", "#FF_CZ2_OTHERTEAM_CC", Color.kGreen, Color.kGreen, Color.kRed) + SpeakAll( team_info[self.team].detcc_sentence ) + +-- EntityStopTouchingCC( detpack, self.team ) + + end + + return EVENT_ALLOWED +end + +function cp_base_command_center:ontouch( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + +-- if IsDetpack( trigger_entity ) then +-- local detpack = CastToDetpack( trigger_entity ) +-- if detpack:GetTeamId() ~= self.team then +-- EntityStartTouchingCC( detpack, self.team ) +-- end +-- end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() ~= self.team then + EntityStartTouchingCC( player, self.team ) + end + end + +end + +function cp_base_command_center:onendtouch( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + +-- if IsDetpack( trigger_entity ) then +-- local detpack = CastToDetpack( trigger_entity ) +-- if detpack:GetTeamId() ~= self.team then +-- EntityStopTouchingCC( detpack, self.team ) +-- end +-- end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetTeamId() ~= self.team then + EntityStopTouchingCC( player, self.team ) + end + end +end + +cp_team1_command_center = cp_base_command_center:new({ team = TEAM1, enemy_team = TEAM2 }) +cp_team2_command_center = cp_base_command_center:new({ team = TEAM2, enemy_team = TEAM1 }) + + +------------------------------------------- +-- cc computers +------------------------------------------- + +cp_base_cc_computer = trigger_ff_script:new({ prefix = "unassigned", enemy_team = Team.kUnassigned }) + +function cp_base_cc_computer:ontrigger( trigger_entity ) + + -- check whether command centers are enabled + if not ENABLE_CC then return end + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- Allow spies to open the enemy doors + if player:GetTeamId() == self.enemy_team and player:GetClass() == Player.kSpy then + + if player:IsInUse() then + for i,v in ipairs(doors) do + -- open each enemy door + OutputEvent( self.prefix .. v, "Open" ) + end + else + -- tell the player they can open the enemy doors + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_DOORS") + end + + end + end +end + +cp_team1_cc_computer = cp_base_cc_computer:new({ prefix = team_info[TEAM1].team_name, enemy_team = TEAM2 }) +cp_team2_cc_computer = cp_base_cc_computer:new({ prefix = team_info[TEAM2].team_name, enemy_team = TEAM1 }) + + +------------------------------------------- +-- cp flaginfo +------------------------------------------- + +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + for i,v in ipairs(command_points) do + + ConsoleToAll( "CP Number: " .. v.cp_number ) + ConsoleToAll( "Team: " .. v.defending_team ) + ConsoleToAll( "Icon: " .. icons[ v.defending_team ].teamicon ) + + AddHudIcon( player, icons[ v.defending_team ].teamicon , v.cp_number .. "-background-" .. v.defending_team , command_points[v.cp_number].hudposx, command_points[v.cp_number].hudposy, command_points[v.cp_number].hudwidth, command_points[v.cp_number].hudheight, command_points[v.cp_number].hudalign) + AddHudIcon( player, command_points[v.cp_number].hudstatusicon, v.cp_number .. "-foreground-" .. v.defending_team , command_points[v.cp_number].hudposx, command_points[v.cp_number].hudposy, command_points[v.cp_number].hudwidth, command_points[v.cp_number].hudheight, command_points[v.cp_number].hudalign) + + end + + DrawCCAlarmIcon( TEAM1 ) + DrawCCAlarmIcon( TEAM2 ) + +end + + +------------------------------------------- +-- cp teleporters +------------------------------------------- + +trigger_teleport = trigger_ff_script:new({}) +cp_base_teleporter = trigger_teleport:new({ cp_number = 0, next_teleport_tick = 0 }) + +function cp_base_teleporter:allowed( allowed_entity ) + + -- check whether cc-to-cp teleporters are enabled + if not ENABLE_CC or not ENABLE_CC_TELEPORTERS then return EVENT_DISALLOWED end + + local stime = GetServerTime() + + if self.next_teleport_tick > stime then return end + + if IsPlayer( allowed_entity ) then + + local player = CastToPlayer( allowed_entity ) + -- Allow players on defending team to teleport to cp + if player:GetTeamId() == command_points[self.cp_number].defending_team then + + if player:IsInUse() then + -- teleport the player + local team_name = team_info[player:GetTeamId()].team_name + + if ENTITY_TOUCHING_CC[player:GetId()] ~= nil then + team_name = team_info[ENTITY_TOUCHING_CC[player:GetId()]].team_name + end + + OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_enter_sound", "PlaySound" ) + --OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_exit_sound", "PlaySound", "", 0.1 ) + OutputEvent( team_name .. "_cp" .. self.cp_number .. "_teleport_tesla", "DoSpark", "", 0.1 ) + + --self.next_teleport_tick = stime + 1.0 + + ApplyToPlayer( player, { AT.kStopPrimedGrens, kReloadClips } ) + + return EVENT_ALLOWED + else + -- tell the player they can teleport + BroadCastMessageToPlayer(player, "#FF_CZ2_USE_TELEPORT") + end + + end + end + + return EVENT_DISALLOWED + +end + +-- team1 teleporters +cp_team1_teleporter_cp1 = cp_base_teleporter:new({ cp_number = 1 }) +cp_team1_teleporter_cp2 = cp_base_teleporter:new({ cp_number = 2 }) +cp_team1_teleporter_cp3 = cp_base_teleporter:new({ cp_number = 3 }) +cp_team1_teleporter_cp4 = cp_base_teleporter:new({ cp_number = 4 }) +cp_team1_teleporter_cp5 = cp_base_teleporter:new({ cp_number = 5 }) + +-- team2 teleporters +cp_team2_teleporter_cp1 = cp_base_teleporter:new({ cp_number = 1 }) +cp_team2_teleporter_cp2 = cp_base_teleporter:new({ cp_number = 2 }) +cp_team2_teleporter_cp3 = cp_base_teleporter:new({ cp_number = 3 }) +cp_team2_teleporter_cp4 = cp_base_teleporter:new({ cp_number = 4 }) +cp_team2_teleporter_cp5 = cp_base_teleporter:new({ cp_number = 5 }) + + +----------------------------------------------------------------------------- +-- locations +----------------------------------------------------------------------------- + +location_cp1 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_ONE", team = NO_TEAM }) +location_cp2 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_TWO", team = NO_TEAM }) +location_cp3 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_THREE", team = NO_TEAM }) +location_cp4 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_FOUR", team = NO_TEAM }) +location_cp5 = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_FIVE", team = NO_TEAM }) + +location_cp1_path = location_info:new({ text = "#FF_LOCATION_CP1_PATH", team = TEAM1 }) +location_cp2_path = location_info:new({ text = "#FF_LOCATION_CP2_PATH", team = TEAM1 }) +location_cp3_path = location_info:new({ text = "#FF_LOCATION_CP3_PATH", team = NO_TEAM }) +location_cp4_path = location_info:new({ text = "#FF_LOCATION_CP4_PATH", team = TEAM2 }) +location_cp5_path = location_info:new({ text = "#FF_LOCATION_CP5_PATH", team = TEAM2 }) + +location_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = NO_TEAM }) + +location_blue_base = location_info:new({ text = "#FF_LOCATION_BASE", team = TEAM1 }) +location_blue_cc = location_info:new({ text = "#FF_LOCATION_COMMAND_CENTER", team = TEAM1 }) +location_blue_outside_base = location_info:new({ text = "#FF_LOCATION_OUTSIDE_BASE", team = TEAM1 }) +location_blue_canal = location_info:new({ text = "#FF_LOCATION_CANAL", team = TEAM1 }) +location_blue_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = TEAM1 }) + +location_red_base = location_info:new({ text = "#FF_LOCATION_BASE", team = TEAM2 }) +location_red_cc = location_info:new({ text = "#FF_LOCATION_COMMAND_CENTER", team = TEAM2 }) +location_red_outside_base = location_info:new({ text = "#FF_LOCATION_OUTSIDE_BASE", team = TEAM2 }) +location_red_canal = location_info:new({ text = "#FF_LOCATION_CANAL", team = TEAM2 }) +location_red_catacombs = location_info:new({ text = "#FF_LOCATION_CATACOMBS", team = TEAM2 }) + + +----------------------------------------------------------------------------- +-- backwards compatiblity - use "cp_*" names in your map instead! +----------------------------------------------------------------------------- +base_team_trigger = cp_base_trigger +blue_door_trigger = cp_team1_door_trigger +red_door_trigger = cp_team2_door_trigger + +cz2_base_pack = cp_base_pack +cz2_blue_respawn_pack = cp_team1_respawn_pack +cz2_red_respawn_pack = cp_team2_respawn_pack + +cz2_cp1_ammo = cp_cp1_ammo +cz2_cp2_ammo = cp_cp2_ammo +cz2_cp3_ammo = cp_cp3_ammo +cz2_cp4_ammo = cp_cp4_ammo +cz2_cp5_ammo = cp_cp5_ammo + +cz2_cp1_armor = cp_cp1_armor +cz2_cp2_armor = cp_cp2_armor +cz2_cp3_armor = cp_cp3_armor +cz2_cp4_armor = cp_cp4_armor +cz2_cp5_armor = cp_cp5_armor + +cz2_base_grenade_pack = cp_base_grenade_pack +cz2_blue_grenade_pack = cp_team1_grenade_pack +cz2_red_grenade_pack = cp_team2_grenade_pack + +base_cp_zone = cp_base_cp_zone +cp1_zone = cp_cp1_cp_zone +cp2_zone = cp_cp2_cp_zone +cp3_zone = cp_cp3_cp_zone +cp4_zone = cp_cp4_cp_zone +cp5_zone = cp_cp5_cp_zone + +base_cp_trigger = cp_base_cp_trigger +cp1_trigger = cp_cp1_cp_trigger +cp2_trigger = cp_cp2_cp_trigger +cp3_trigger = cp_cp3_cp_trigger +cp4_trigger = cp_cp4_cp_trigger +cp5_trigger = cp_cp5_cp_trigger + +base_cp_flag = cp_base_flag +blue_flag = cp_team1_flag +red_flag = cp_team2_flag + +cp_base_flag_dispenser = base_cp_flag_dispenser +blue_flag_dispenser = cp_team1_flag_dispenser +red_flag_dispenser = cp_team2_flag_dispenser + +base_command_center = cp_base_command_center +blue_command_center = cp_team1_command_center +red_command_center = cp_team2_command_center + +base_cp_cc_computer = cp_base_cc_computer +blue_cc_computer = cp_team1_cc_computer +red_cc_computer = cp_team2_cc_computer + +base_cp_teleporter = cp_base_teleporter +blue_teleporter_cp1 = cp_team1_teleporter_cp1 +blue_teleporter_cp2 = cp_team1_teleporter_cp2 +blue_teleporter_cp3 = cp_team1_teleporter_cp3 +blue_teleporter_cp4 = cp_team1_teleporter_cp4 +blue_teleporter_cp5 = cp_team1_teleporter_cp5 +red_teleporter_cp1 = cp_team2_teleporter_cp1 +red_teleporter_cp2 = cp_team2_teleporter_cp2 +red_teleporter_cp3 = cp_team2_teleporter_cp3 +red_teleporter_cp4 = cp_team2_teleporter_cp4 +red_teleporter_cp5 = cp_team2_teleporter_cp5 + + diff --git a/maps/includes/base_ctf.lua b/maps/includes/base_ctf.lua new file mode 100644 index 0000000..3feeee2 --- /dev/null +++ b/maps/includes/base_ctf.lua @@ -0,0 +1,151 @@ + +-- base_ctf.lua +-- Capture the flag gametype + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay"); + +----------------------------------------------------------------------------- +-- entities +----------------------------------------------------------------------------- + +-- hudalign and hudstatusiconalign : 0 = HUD_LEFT, 1 = HUD_RIGHT, 2 = HUD_CENTERLEFT, 3 = HUD_CENTERRIGHT +-- (pixels from the left / right of the screen / left of the center of the screen / right of center of screen, +-- AfterShock +blue_flag = baseflag:new({team = Team.kBlue, + modelskin = 0, + name = "Blue Flag", + hudicon = "hud_flag_blue_new.vtf", + hudx = 5, + hudy = 80, + hudwidth = 70, + hudheight = 70, + hudalign = 1, + hudstatusicondropped = "hud_flag_dropped_blue.vtf", + hudstatusiconhome = "hud_flag_home_blue.vtf", + hudstatusiconcarried = "hud_flag_carried_blue.vtf", + hudstatusiconx = 60, + hudstatusicony = 5, + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconalign = 2, + objectiveicon = true, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kRed,AllowFlags.kYellow,AllowFlags.kGreen}}) + +red_flag = baseflag:new({team = Team.kRed, + modelskin = 1, + name = "Red Flag", + hudicon = "hud_flag_red_new.vtf", + hudx = 5, + hudy = 150, + hudwidth = 70, + hudheight = 70, + hudalign = 1, + hudstatusicondropped = "hud_flag_dropped_red.vtf", + hudstatusiconhome = "hud_flag_home_red.vtf", + hudstatusiconcarried = "hud_flag_carried_red.vtf", + hudstatusiconx = 60, + hudstatusicony = 5, + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconalign = 3, + objectiveicon = true, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue,AllowFlags.kYellow,AllowFlags.kGreen}}) + +yellow_flag = baseflag:new({team = Team.kYellow, + modelskin = 2, + name = "Yellow Flag", + hudicon = "hud_flag_yellow_new.vtf", + hudx = 5, + hudy = 220, + hudwidth = 70, + hudheight = 70, + hudalign = 1, + hudstatusicondropped = "hud_flag_dropped_yellow.vtf", + hudstatusiconhome = "hud_flag_home_yellow.vtf", + hudstatusiconcarried = "hud_flag_carried_yellow.vtf", + hudstatusiconx = 53, + hudstatusicony = 25, + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconalign = 2, + objectiveicon = true, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue,AllowFlags.kRed,AllowFlags.kGreen} }) + +green_flag = baseflag:new({team = Team.kGreen, + modelskin = 3, + name = "Green Flag", + hudicon = "hud_flag_green_new.vtf", + hudx = 5, + hudy = 290, + hudwidth = 70, + hudheight = 70, + hudalign = 1, + hudstatusicondropped = "hud_flag_dropped_green.vtf", + hudstatusiconhome = "hud_flag_home_green.vtf", + hudstatusiconcarried = "hud_flag_carried_green.vtf", + hudstatusiconx = 53, + hudstatusicony = 25, + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconalign = 3, + objectiveicon = true, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue,AllowFlags.kRed,AllowFlags.kYellow} }) + +-- red cap point +red_cap = basecap:new({team = Team.kRed, + item = {"blue_flag","yellow_flag","green_flag"}}) + +-- blue cap point +blue_cap = basecap:new({team = Team.kBlue, + item = {"red_flag","yellow_flag","green_flag"}}) + +-- yellow cap point +yellow_cap = basecap:new({team = Team.kYellow, + item = {"blue_flag","red_flag","green_flag"}}) + +-- green cap point +green_cap = basecap:new({team = Team.kGreen, + item = {"blue_flag","red_flag","yellow_flag"}}) + +----------------------------------------------------------------------------- +-- map handlers +----------------------------------------------------------------------------- +function startup() + + SetGameDescription( "Capture the Flag" ) + + -- set up team limits on each team + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, -1) + SetPlayerLimit(Team.kGreen, -1) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) +end + +function precache() + -- precache sounds + PrecacheSound("yourteam.flagstolen") + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + PrecacheSound("yourteam.drop") + PrecacheSound("otherteam.drop") + PrecacheSound("yourteam.flagreturn") + PrecacheSound("otherteam.flagreturn") +end + +--flaginfo runs whenever the player spawns or uses the flaginfo command. +--Right now it just refreshes the HUD items; this ensures that players who just joined the server have the right information +function flaginfo( player_entity ) + flaginfo_base(player_entity) --see base_teamplay.lua +end \ No newline at end of file diff --git a/maps/includes/base_ctf4.lua b/maps/includes/base_ctf4.lua new file mode 100644 index 0000000..1d33dfd --- /dev/null +++ b/maps/includes/base_ctf4.lua @@ -0,0 +1,34 @@ + +-- base_ctf4.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_ctf") + +----------------------------------------------------------------------------- +-- map level handlers +----------------------------------------------------------------------------- +function startup() + SetGameDescription( "4-way CTF" ) + + -- set up team limits + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, 0) + SetPlayerLimit(Team.kGreen, 0) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) +end + +--flaginfo runs whenever the player spawns or uses the flaginfo command. +--Right now it just refreshes the HUD items; this ensures that players who just joined the server have the right information +function flaginfo( player_entity ) + flaginfo_base(player_entity) --see base_teamplay.lua +end \ No newline at end of file diff --git a/maps/includes/base_fortball.lua b/maps/includes/base_fortball.lua new file mode 100644 index 0000000..4348b7a --- /dev/null +++ b/maps/includes/base_fortball.lua @@ -0,0 +1,689 @@ +-- base_fortball.lua + +-- if you want base fortball with the default setup, +-- include base_fortball_default.lua in your map's lua file +-- and then include base_fortball.lua + +-- precache (sounds) +function precache() + PrecacheSound("misc.bizwarn") + PrecacheSound("misc.bloop") + PrecacheSound("misc.buzwarn") + PrecacheSound("misc.dadeda") + PrecacheSound("misc.deeoo") + PrecacheSound("misc.doop") + PrecacheSound("misc.woop") + + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + + -- Unagi Power! Unagi! + PrecacheSound("misc.unagi_spatial") + + -- goalie sounds + --PrecacheSound( goalie_sound_loop ) + --PrecacheSound( goalie_sound_idle ) + --PrecacheSound( goalie_sound_pain ) + --PrecacheSound( goalie_sound_kill ) +end + +function startup() + SetGameDescription( "Fortball" ) + + -- disable certain teams + for i,v in pairs(disabled_teams) do + SetPlayerLimit( v, -1 ) + end + + -- set up team limits + for i1,v1 in pairs(teams) do + local team = GetTeam(v1) + for i2,v2 in ipairs(team_info[team:GetTeamId()].class_limits) do + team:SetClassLimit( i2, v2 ) + end + end + + local ball = GetEntityByName( "ball" ) + for i,v in pairs(teams) do + objective_entities[v] = ball + end + + the_wall_reset() + +end + +function the_wall_reset() + OutputEvent( "the_wall", "Enable" ) + OutputEvent( "the_wall_laser_blue", "TurnOn" ) + OutputEvent( "the_wall_laser_red", "TurnOn" ) + AddSchedule("the_wall_disable", THE_WALL_TIMER_DISABLE, the_wall_disable ) + AddSchedule("the_wall_10secwarn", THE_WALL_TIMER_WARN, the_wall_10secwarn ) +end + +function the_wall_disable() + OutputEvent( "the_wall", "Disable" ) + OutputEvent( "the_wall_laser_blue", "TurnOff" ) + OutputEvent( "the_wall_laser_red", "TurnOff" ) + BroadCastMessage("#FF_ROUND_STARTED") + BroadCastSound("otherteam.flagstolen") +end + +function the_wall_10secwarn() + BroadCastMessage("#FF_MAP_10SECWARN") + AddSchedule("the_wall_9secwarn", 1, the_wall_9secwarn ) +end + +function the_wall_9secwarn() + BroadCastMessage("#FF_MAP_9SECWARN") + AddSchedule("the_wall_8secwarn", 1, the_wall_8secwarn ) +end + +function the_wall_8secwarn() + BroadCastMessage("#FF_MAP_8SECWARN") + AddSchedule("the_wall_7secwarn", 1, the_wall_7secwarn ) +end + +function the_wall_7secwarn() + BroadCastMessage("#FF_MAP_7SECWARN") + AddSchedule("the_wall_6secwarn", 1, the_wall_6secwarn ) +end + +function the_wall_6secwarn() + BroadCastMessage("#FF_MAP_6SECWARN") + AddSchedule("the_wall_5secwarn", 1, the_wall_5secwarn ) +end + +function the_wall_5secwarn() + BroadCastMessage("#FF_MAP_5SECWARN") + SpeakAll( "AD_5SEC" ) + AddSchedule("the_wall_4secwarn", 1, the_wall_4secwarn ) +end + +function the_wall_4secwarn() + BroadCastMessage("#FF_MAP_4SECWARN") + SpeakAll( "AD_4SEC" ) + AddSchedule("the_wall_3secwarn", 1, the_wall_3secwarn ) +end + +function the_wall_3secwarn() + BroadCastMessage("#FF_MAP_3SECWARN") + SpeakAll( "AD_3SEC" ) + AddSchedule("the_wall_2secwarn", 1, the_wall_2secwarn ) +end + +function the_wall_2secwarn() + BroadCastMessage("#FF_MAP_2SECWARN") + SpeakAll( "AD_2SEC" ) + AddSchedule("the_wall_1secwarn", 1, the_wall_1secwarn ) +end + +function the_wall_1secwarn() + BroadCastMessage("#FF_MAP_1SECWARN") + SpeakAll( "AD_1SEC" ) +end + +function goalie_bounds_notification(player) + BroadCastSoundToPlayer( player, "misc.buzwarn" ) + BroadCastMessageToPlayer(player, "#FF_WATERPOLO_GOALIE_BOUNDS") +end + +function reset_ball_carrier() + if ball_carrier ~= nil and IsPlayer( ball_carrier ) then + local player = CastToPlayer(ball_carrier) + UpdateObjectiveIcon( player, objective_entities[player:GetTeamId()] ) + if not BALL_ALWAYS_ENEMY_OBJECTIVE then + local enemy_team = team_info[player:GetTeamId()].enemy_team + objective_entities[enemy_team] = GetEntityByName( "ball" ) + UpdateTeamObjectiveIcon( GetTeam(enemy_team), objective_entities[enemy_team] ) + end + end + ball_carrier = nil +end + +-- Give everyone a full resupply, but strip grenades +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + + -- god damn right + player:RemoveAmmo( Ammo.kDetpack, 1 ) + player:RemoveAmmo( Ammo.kManCannon, 1 ) + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + + -- goalies run fast + if player:GetClass() ~= Player.kCivilian then + player:RemoveEffect( EF.kSpeedlua1 ) + else + player:AddEffect( EF.kSpeedlua1, -1, 0, GOALIE_SPEED ) + + -- stop the goalie loop sound + --player:StopSound( goalie_sound_loop ) + + -- play the goalie loop sound + --player:EmitSound( goalie_sound_loop ) + end + + -- objective + UpdateObjectiveIcon( player, objective_entities[player:GetTeamId()] ) +end + +function player_onkill( player ) + -- stop the goalie loop sound + --if player:GetClass() == Player.kCivilian then + --player:StopSound( goalie_sound_loop ) + --end + + return true +end + +function player_killed( player ) + -- stop the goalie loop sound + --if player:GetClass() == Player.kCivilian then + --player:StopSound( goalie_sound_loop ) + --end +end + +function player_switchteam( player, currentteam, desiredteam ) + + -- stop the goalie loop sound + --if player:GetClass() == Player.kCivilian then + --player:StopSound( goalie_sound_loop ) + --end + + return true + +end + +function player_disconnected( player ) + + if ball_carrier ~= nil then + if ball_carrier:GetId() == player:GetId() then + reset_ball_carrier() + end + end + + -- stop the goalie loop sound + --if player:GetClass() == Player.kCivilian then + --player:StopSound( goalie_sound_loop ) + --end + +end + +function remove_hud_items(ball, player) + + RemoveHudItem( player, ball:GetName() ) + + local team = player:GetTeamId() + + if (team == TEAM1) then + RemoveHudItemFromAll( "ball-icon-blue" ) + elseif (team == TEAM2) then + RemoveHudItemFromAll( "ball-icon-red" ) + end + +end + +function player_ondamage( player, damageinfo ) + -- goalies have "UNAGI POWER, UNAGI!" + local attacker = damageinfo:GetAttacker() + if IsPlayer( attacker ) then + attacker = CastToPlayer( attacker ) + if attacker:GetClass() == Player.kCivilian and attacker:GetTeamId() ~= player:GetTeamId() then + ConsoleToAll( "Goalie, " .. attacker:GetName() .. ", has UNAGI POWER, UNAGI!" ) + --attacker:EmitSound("misc.unagi_spatial") + attacker:AddFortPoints( POINTS_PER_GOALIE_ATTACK, "#FF_FORTPOINTS_GOALIE_ATTACK" ) + damageinfo:ScaleDamage(69) + --attacker:EmitSound( goalie_sound_kill ) + elseif attacker:GetClass() == Player.kSniper and player:GetClass() ~= Player.kCivilian then + -- snipers do less damage to non-goalies + damageinfo:ScaleDamage(0.1) + end + end + + if player:GetClass() == Player.kCivilian then + + if player:GetTeamId() == player:GetLocationTeam() then + + -- goalies are invincible in their team's locations + damageinfo:ScaleDamage(0) + --player:EmitSound( goalie_sound_idle ) + + else + + -- goalies take more damage outside their team's locations + damageinfo:ScaleDamage(3) + --player:EmitSound( goalie_sound_pain ) + + end + + end +end + + +----------------------------------------------------------------------------- +-- ball information +-- status: 0 = home, 1 = carried, 2 = dropped +----------------------------------------------------------------------------- +base_ball = info_ff_script:new({ + name = "base ball", + team = Team.kUnassigned, + model = "models/items/ball/ball.mdl", + modelskin = 0, + tosssound = "Flag.toss", + dropnotouchtime = 0, + capnotouchtime = 2, + hudicon = "hud_ball", + hudx = 5, + hudy = 210, + hudwidth = 48, + hudheight = 48, + hudalign = 1, + hudstatusiconbluex = 60, + hudstatusiconbluey = 5, + hudstatusiconredx = 60, + hudstatusiconredy = 5, + hudstatusiconblue = "hud_ball.vtf", + hudstatusiconred = "hud_ball.vtf", + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconbluealign = 2, + hudstatusiconredalign = 3, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed}, + botgoaltype = Bot.kFlag, + status = 0 +}) + +function base_ball:hasanimation() return false end +function base_ball:usephysics() return true end + +function base_ball:touch( touch_entity ) + if IsPlayer( touch_entity ) then + + local player = CastToPlayer( touch_entity ) + if self.notouch[player:GetId()] then return end + + local ball = CastToInfoScript( entity ) + + if player:GetClass() ~= Player.kCivilian then + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + player:SetCloakable( false ) + + ConsoleToAll( player:GetName() .. " has the ball!" ) + --SmartSound( player, "misc.bloop", "misc.bloop", "misc.bloop" ) + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + SmartSpeak(player, "CTF_YOUHAVEBALL", "CTF_TEAMHASBALL", "CTF_ENEMYHASBALL") + SmartMessage( player, "#FF_WATERPOLO_YOU_PICKUP", "#FF_WATERPOLO_TEAM_PICKUP", "#FF_WATERPOLO_ENEMY_PICKUP", Color.kGreen, Color.kGreen, Color.kRed ) + ball:Pickup( player ) + + AddHudIcon( player, self.hudicon, ball:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) + local team = player:GetTeamId() + if (team == TEAM1) then + AddHudIconToAll( self.hudstatusiconblue, "ball-icon-blue", self.hudstatusiconbluex, self.hudstatusiconbluey, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconbluealign ) + elseif (team == TEAM2) then + AddHudIconToAll( self.hudstatusiconred, "ball-icon-red", self.hudstatusiconredx, self.hudstatusiconredy, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconredalign ) + end + + -- 100 points for initial touch on ball + if self.status == 0 then player:AddFortPoints(POINTS_PER_INITIALTOUCH, "#FF_FORTPOINTS_INITIALTOUCH") end + self.status = 1 + + UpdateObjectiveIcon( player, goal_entities[player:GetTeamId()] ) + ball_carrier = player + + if not BALL_ALWAYS_ENEMY_OBJECTIVE then + local enemy_team = team_info[player:GetTeamId()].enemy_team + objective_entities[enemy_team] = nil + UpdateTeamObjectiveIcon( GetTeam(enemy_team), objective_entities[enemy_team] ) + end + + -- goalies return the ball + else + if ball:IsDropped() then + -- if pressing +use + if player:IsInUse() then + ConsoleToAll( "Goalie, " .. player:GetName() .. ", returned the ball!" ) + SmartSound( player, "misc.deeoo", "misc.deeoo", "misc.deeoo" ) + SmartMessage( player, "#FF_WATERPOLO_YOU_RETURN", "#FF_WATERPOLO_TEAM_GOALIE_RETURN", "#FF_WATERPOLO_ENEMY_GOALIE_RETURN" ) + player:AddFortPoints( POINTS_PER_GOALIE_RETURN, "#FF_FORTPOINTS_GOALIE_RETURN" ) + ball:Return() + self.status = 0 + else + BroadCastMessageToPlayer(player, "#FF_WATERPOLO_USE_RETURN") + end + end + end + end +end + +function base_ball:onownerdie( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + -- drop the ball + ConsoleToAll( player:GetName() .. " died and dropped the ball!" ) + local ball = CastToInfoScript( entity ) + ball:Drop(BALL_RETURN_TIME, 0.0) + remove_hud_items(ball, player) + self.status = 2 + + reset_ball_carrier() + end +end + +function base_ball:ownercloak( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + -- drop the ball + ConsoleToAll( player:GetName() .. " cloaked and dropped the ball!" ) + local ball = CastToInfoScript( entity ) + ball:Drop(BALL_RETURN_TIME, 0.0) + remove_hud_items(ball, player) + self.status = 2 + + reset_ball_carrier() + end +end + +function base_ball:ownerfeign( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + -- drop the ball + ConsoleToAll( player:GetName() .. " feigned and dropped the ball!" ) + local ball = CastToInfoScript( entity ) + ball:Drop(BALL_RETURN_TIME, 0.0) + remove_hud_items(ball, player) + self.status = 2 + + reset_ball_carrier() + end +end + +function base_ball:dropitemcmd( drop_entity ) + if IsPlayer( drop_entity ) then + -- throw the ball + local ball = CastToInfoScript( entity ) + + local player = CastToPlayer( drop_entity ) + if not player:IsInUse() then + ball:Drop(BALL_RETURN_TIME, BALL_THROW_SPEED) + else + ball:Drop(BALL_RETURN_TIME, BALL_THROW_SPEED * 0.333) + end + + ConsoleToAll( player:GetName() .. " passed the ball!" ) + remove_hud_items(ball, player) + self.status = 2 + + reset_ball_carrier() + + SmartSound( player, "misc.woop", "misc.woop", "misc.woop" ) + + -- Make it so the player can't touch the ball for 1 second + -- (so it can't be thrown and not stick to the player) + self:addnotouch(player:GetId(), 1) + end +end + +function base_ball:ondrop( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + -- let the teams know that the flag was dropped + SmartSound(player, "yourteam.drop", "yourteam.drop", "otherteam.drop") + SmartMessage(player, "#FF_YOUBALLDROP", "#FF_TEAMBALLDROP", "#FF_ENEMYBALLDROP", Color.kYellow, Color.kYellow, Color.kYellow) + end + + local ball = CastToInfoScript(entity) + ball:EmitSound(self.tosssound) +end + +function base_ball:onloseitem( owner_entity ) + if IsPlayer( owner_entity ) then + -- let the player that lost the ball put on a disguise + local player = CastToPlayer( owner_entity ) + player:SetDisguisable(true) + player:SetCloakable( true ) + + self:addnotouch(player:GetId(), self.capnotouchtime) + end +end + +function base_ball:spawn() + self.notouch = { } + info_ff_script.spawn(self) + self.status = 0 +end + +function base_ball:addnotouch( player_id, duration ) + self.notouch[player_id] = duration + AddSchedule(self.name .. "-" .. player_id, duration, self.removenotouch, self, player_id) +end + +function base_ball.removenotouch(self, player_id) + self.notouch[player_id] = nil +end + +-- For when this object is carried, these offsets are used to place +-- the info_ff_script relative to the players feet +function base_ball:attachoffset() + -- x = forward/backward + -- y = left/right + -- z = up/down + local offset = Vector( 32, 0, 0 ) + return offset +end + +function base_ball:precache() + PrecacheSound(self.tosssound) + info_ff_script.precache(self) +end + +function base_ball:onreturn() + ConsoleToAll( "The ball has returned!" ) + SpeakAll ( "CTF_BALLRETURN" ) + BroadCastMessage( "#FF_WATERPOLO_BALL_RETURN", Color.kYellow ) + self.status = 0 + + reset_ball_carrier() +end + +ball = base_ball:new({ + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed}, + botgoaltype = Bot.kFlag +}) + + + + +-- generic goal +base_goal = trigger_ff_script:new({ + health = 100, + armor = 300, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 0, + mancannons = 0, + gren1 = 0, + gren2 = 0, + item = "", + team = 0, + botgoaltype = Bot.kFlagCap +}) + +function base_goal:spawn() + if self.team ~= Team.kUnassigned then + goal_entities[self.team] = entity + end +end + +function base_goal:allowed ( allowed_entity ) + if IsPlayer( allowed_entity ) then + -- player has to be carrying the item + local player = CastToPlayer( allowed_entity ) + return player:HasItem( self.item ) + end + + return EVENT_DISALLOWED +end + +function base_goal:ontrigger ( trigger_entity ) + if IsPlayer( trigger_entity ) then + + -- player should capture now + local player = CastToPlayer( trigger_entity ) + if player:HasItem( self.item ) then + local team = GetTeam( self.team ) + team:AddScore( POINTS_PER_CAPTURE ) + ConsoleToAll( team:GetName() .. " team scores!" ) + + local ball = GetInfoScriptByName( self.item ) + ball:Return() + + remove_hud_items(ball, player) + + if player:GetTeamId() == self.team then + ConsoleToAll( player:GetName() .. " scored a goal!" ) + -- show on the deathnotice board + ObjectiveNotice( player, "scored a goal" ) + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") + SmartSpeak(player, "CTF_YOUSCORE", "CTF_TEAMSCORE", "CTF_THEYSCORE") + SmartMessage( player, "#FF_WATERPOLO_YOU_GOAL", "#FF_WATERPOLO_TEAM_GOAL", "#FF_WATERPOLO_ENEMY_GOAL", Color.kGreen, Color.kGreen, Color.kRed) + player:AddFortPoints( POINTS_PER_CAPTURE * 100, "#FF_FORTPOINTS_GOAL" ) + else + ConsoleToAll( player:GetName() .. " scored an own goal!\nWait, what?! Kill him like that Columbian a few years ago! OWN GOAL! OWN GOAL!" ) + -- show on the deathnotice board + ObjectiveNotice( player, "scored an own goal" ) + SmartSound(player, "otherteam.flagcap", "otherteam.flagcap", "yourteam.flagcap") + SmartSpeak(player, "CTF_THEYSCORE", "CTF_THEYSCORE", "CTF_TEAMSCORE") + SmartMessage( player, "#FF_WATERPOLO_YOU_OWN_GOAL", "#FF_WATERPOLO_TEAM_OWN_GOAL", "#FF_WATERPOLO_ENEMY_OWN_GOAL", Color.kRed, Color.kRed, Color.kGreen) + player:AddFortPoints( -POINTS_PER_CAPTURE * 100, "#FF_FORTPOINTS_OWN_GOAL" ) + end + + ApplyToAll({ AT.kRespawnPlayers, AT.kReloadClips }) + + the_wall_reset() + end + end +end + +-- on blue's side of map, but points go to red +blue_goal = base_goal:new({ item = "ball", team = TEAM2 }) + +-- on red's side of map, but points go to blue +red_goal = base_goal:new({ item = "ball", team = TEAM1 }) + + + + +-- respawns a goalie +base_goalie_respawner = trigger_ff_script:new({ team = Team.kUnassigned }) + +function base_goalie_respawner:ontouch( trigger_entity ) + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + if player:GetClass() == Player.kCivilian and player:GetTeamId() == self.team then + -- respawn the goalie + ApplyToPlayer(player, { AT.kRespawnPlayers }) + AddSchedule("goalie_bounds_notification_" .. player:GetId(), 0.1, goalie_bounds_notification, player ) + end + end + +end + +-- goalie respawner +blue_goalie_respawner = base_goalie_respawner:new({ team = TEAM1 }) +red_goalie_respawner = base_goalie_respawner:new({ team = TEAM2 }) + + + + +-- returns the item +base_item_returner = trigger_ff_script:new({ item = "", message = "" }) + +function base_item_returner:allowed ( allowed_entity ) + + if IsPlayer( allowed_entity ) then + -- player has to be carrying the item or be a goalie + local player = CastToPlayer( allowed_entity ) + if player:HasItem( self.item ) or player:GetClass() == Player.kCivilian then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED + +end + +function base_item_returner:ontrigger ( trigger_entity ) + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + if player:GetClass() ~= Player.kCivilian then + -- return the item + local item = GetInfoScriptByName( self.item ) + item:Return() + remove_hud_items(item, player) + ConsoleToAll( player:GetName() .. self.message ) + SpeakAll ( "CTF_BALLRETURN" ) + SmartMessage( player, "#FF_WATERPOLO_YOU_BOUNDS", "#FF_WATERPOLO_TEAM_BOUNDS", "#FF_WATERPOLO_ENEMY_BOUNDS", Color.kYellow, Color.kYellow, Color.kYellow ) + else + -- respawn the goalie + ApplyToPlayer(player, { AT.kRespawnPlayers }) + AddSchedule("goalie_bounds_notification_" .. player:GetId(), 0.1, goalie_bounds_notification, player ) + end + end + +end + +-- ball stripper +ball_stripper = base_item_returner:new({ item = "ball", message = " took the ball out of bounds!" }) + +-- spawn ammo packs +waterpolo_pack_spawn_blue = blue_ammobackpack +waterpolo_pack_spawn_red = red_ammobackpack + +fortball_pack_spawn_blue = blue_ammobackpack +fortball_pack_spawn_red = red_ammobackpack + +-- unique fortball spawns (goalies spawn on top of the goal) +bluespawn = { validspawn = function(self,player) return player:GetTeamId() == TEAM1 and player:GetClass() ~= Player.kCivilian and player:GetClass() ~= Player.kSniper end } +redspawn = { validspawn = function(self,player) return player:GetTeamId() == TEAM2 and player:GetClass() ~= Player.kCivilian and player:GetClass() ~= Player.kSniper end } +bluespawn_goalie = { validspawn = function(self,player) return player:GetTeamId() == TEAM1 and player:GetClass() == Player.kCivilian end } +redspawn_goalie = { validspawn = function(self,player) return player:GetTeamId() == TEAM2 and player:GetClass() == Player.kCivilian end } +bluespawn_sniper = { validspawn = function(self,player) return player:GetTeamId() == TEAM1 and player:GetClass() == Player.kSniper end } +redspawn_sniper = { validspawn = function(self,player) return player:GetTeamId() == TEAM2 and player:GetClass() == Player.kSniper end } + + +----------------------------------------------------------------------------- +-- unique fortball locations +----------------------------------------------------------------------------- +location_ballsonia = location_info:new({ text = "Ballsonia", team = Team.kUnassigned }) +location_midfield = location_info:new({ text = "Midfield", team = Team.kUnassigned }) +location_blue_side = location_info:new({ text = "Blue Side", team = TEAM1 }) +location_red_side = location_info:new({ text = "Red Side", team = TEAM2 }) +location_blue_goal = location_info:new({ text = "Blue Goal", team = TEAM1 }) +location_red_goal = location_info:new({ text = "Red Goal", team = TEAM2 }) +location_upper_deck = location_info:new({ text = "Upper Deck", team = Team.kUnassigned }) +location_blue_upper_deck = location_info:new({ text = "Blue Upper Deck", team = TEAM1 }) +location_red_upper_deck = location_info:new({ text = "Red Upper Deck", team = TEAM2 }) +location_nose_bleeds = location_info:new({ text = "Nose Bleeds", team = Team.kUnassigned }) +location_blue_nose_bleeds = location_info:new({ text = "Blue Nose Bleeds", team = TEAM1 }) +location_red_nose_bleeds = location_info:new({ text = "Red Nose Bleeds", team = TEAM2 }) +location_rainy_sky = location_info:new({ text = "Rainy Sky", team = Team.kUnassigned }) +location_death_hills = location_info:new({ text = "Death Hills", team = Team.kUnassigned }) +location_sideroom1 = location_info:new({ text = "Side Room 1", team = Team.kUnassigned }) +location_sideroom2 = location_info:new({ text = "Side Room 2", team = Team.kUnassigned }) + diff --git a/maps/includes/base_fortball_default.lua b/maps/includes/base_fortball_default.lua new file mode 100644 index 0000000..0116dc4 --- /dev/null +++ b/maps/includes/base_fortball_default.lua @@ -0,0 +1,101 @@ +-- base_fortball_default.lua + +-- if you want to customize these base fortball defaults, copy all of this file's contents +-- into your map's lua file, edit what you want, and then include base_fortball.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay"); +IncludeScript("base_location"); + +-- set genericbackpack's disallow touch flags for not letting goalies pick up anything +genericbackpack.disallowtouchflags = {AllowFlags.kCivilian} + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- + +-- teams +TEAM1 = Team.kBlue +TEAM2 = Team.kRed +DISABLED_TEAM3 = Team.kYellow +DISABLED_TEAM4 = Team.kGreen + +teams = { TEAM1, TEAM2 } +disabled_teams = { DISABLED_TEAM3, DISABLED_TEAM4 } + +team_info = { + [Team.kUnassigned] = { + team_name = "neutral", + enemy_team = Team.kUnassigned, + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = 0, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = 0, + }, + }, + [TEAM1] = { + team_name = "blue", + enemy_team = TEAM2, + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = -1, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = 1, + }, + }, + [TEAM2] = { + team_name = "red", + enemy_team = TEAM1, + class_limits = { + [Player.kScout] = 0, + [Player.kSniper] = -1, + [Player.kSoldier] = 0, + [Player.kDemoman] = 0, + [Player.kMedic] = 0, + [Player.kHwguy] = 0, + [Player.kPyro] = 0, + [Player.kSpy] = 0, + [Player.kEngineer] = 0, + [Player.kCivilian] = 1, + }, + }, +} + +-- objectives +objective_entities = { [TEAM1] = nil, [TEAM2] = nil } +goal_entities = { [TEAM1] = nil, [TEAM2] = nil } +ball_carrier = nil +BALL_ALWAYS_ENEMY_OBJECTIVE = true + +-- scoring +POINTS_PER_GOAL = 10 +POINTS_PER_INITIALTOUCH = 100 +POINTS_PER_GOALIE_RETURN = 50 +POINTS_PER_GOALIE_ATTACK = 10 +BALL_RETURN_TIME = 15 +BALL_THROW_SPEED = 2048 +GOALIE_SPEED = 2.0 +THE_WALL_TIMER_DISABLE = 12.5 +THE_WALL_TIMER_WARN = 2.5 + +-- goalie sounds +goalie_sound_loop = "ff_waterpolo.psychotic_goalie" +goalie_sound_idle = "NPC_BlackHeadcrab.Talk" +goalie_sound_pain = "NPC_BlackHeadcrab.ImpactAngry" +goalie_sound_kill = "NPC_BlackHeadcrab.Telegraph" + diff --git a/maps/includes/base_hunted.lua b/maps/includes/base_hunted.lua new file mode 100644 index 0000000..57b36d6 --- /dev/null +++ b/maps/includes/base_hunted.lua @@ -0,0 +1,471 @@ + +-- base_hunted.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay"); +IncludeScript("base_location"); + +----------------------------------------------------------------------------- +-- Basic hunted-style gameplay. Respawns all players when the VIP is killed +----------------------------------------------------------------------------- +POINTS_PER_HUNTED_DEATH = 5 +POINTS_PER_HUNTED_DEATH_FOR_ASSASSIN = 5 +POINTS_PER_HUNTED_ESCAPE = 10 +POINTS_PER_HUNTED_ESCAPE_FOR_HUNTED = 10 +POINTS_PER_HUNTED_ESCAPE_FOR_BODYGUARDS = 10 +POINTS_PER_HUNTED_ATTACK = 2 +HUNTED_ALLIES_TEAM = Team.kRed +HUNTED_ENTITY = nil +LAST_HUNTED_LOCATION = nil +ESCAPE_DOOR_BUTTON_UNLOCKED = true + +-- escape_door_top is also defined as a base_escape_door object down below +escape_door = { + entity_names = { "escape_door_top", "escape_door_bottom" }, + isopen = false, + openicon = "hud_door_open.vtf", + closedicon = "hud_door_closed.vtf", + hudposx = 0, + hudposy = 32, + hudwidth = 64, + hudheight = 32, + hudalignx = 4, + hudaligny = 0 +} + +-- precache sounds +function precache() + PrecacheSound("ff_hunted.thunder") + PrecacheSound("ff_hunted.cheer") + PrecacheSound("ff_hunted.dying_bird") + PrecacheSound("ff_hunted.dying_bird_full") + PrecacheSound("ff_hunted.dying_bird_full") + PrecacheSound("ff_hunted.i_am_the_werewolf") + PrecacheSound("ff_hunted.i_fight_vampires") + PrecacheSound("ff_hunted.werewolf_howling") + PrecacheSound("ff_hunted.werewolf_movies") + PrecacheSound("ff_hunted.werewolves_howling") + + PrecacheSound("otherteam.flagstolen") +end + +function startup() + SetGameDescription( "Hunted" ) + + -- set up team names + SetTeamName( Team.kBlue, "The Hunted" ) + SetTeamName( Team.kRed, "Bodyguards" ) + SetTeamName( Team.kYellow, "Assassins" ) + SetTeamName( Team.kGreen, "Green Kid Touchers" ) + + -- set up team limits + SetPlayerLimit( Team.kBlue, 1 ) -- There can be only one Highlander! + SetPlayerLimit( Team.kRed, 0 ) -- Unlimited bodyguards. + SetPlayerLimit( Team.kYellow, 6 ) -- Only 6 assassins, but can we dynamically change this based on maxplayers and/or the current playercount? + SetPlayerLimit( Team.kGreen, -1 ) -- Fuck green. + + local team = GetTeam( Team.kBlue ) + team:SetAllies( Team.kRed ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, -1 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, 0 ) + + team = GetTeam( Team.kRed ) + team:SetAllies( Team.kBlue ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, 1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, 0 ) + team:SetClassLimit( Player.kHwguy, 0 ) + team:SetClassLimit( Player.kPyro, 1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, 0 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + team = GetTeam( Team.kYellow ) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, 0 ) + team:SetClassLimit( Player.kSoldier, -1 ) + team:SetClassLimit( Player.kDemoman, -1 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, 1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + RemoveSchedule( "hunted_location_timer" ) + AddScheduleRepeating( "hunted_location_timer" , 1.0, hunted_location_timer ) + +end + +------------------------------------------- +-- hunted flaginfo +------------------------------------------- + +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + if escape_door.isopen then + RemoveHudItem( player, "escape_door_closed" ) + AddHudIcon( player, escape_door.openicon, "escape_door_open", escape_door.hudposx, escape_door.hudposy, escape_door.hudwidth, escape_door.hudheight, escape_door.hudalignx, escape_door.hudaligny ) + else + RemoveHudItem( player, "escape_door_open" ) + AddHudIcon( player, escape_door.closedicon, "escape_door_closed", escape_door.hudposx, escape_door.hudposy, escape_door.hudwidth, escape_door.hudheight, escape_door.hudalignx, escape_door.hudaligny ) + end + +end + +function hunted_location_timer() + + if HUNTED_ENTITY ~= nil then + + local player = CastToPlayer( HUNTED_ENTITY ) + + if player:GetLocation() ~= LAST_HUNTED_LOCATION then + + LAST_HUNTED_LOCATION = player:GetLocation() + RemoveHudItem( player, "hunted_location" ) + AddHudTextToTeam( GetTeam(Team.kRed), "hunted_location", "Hunted Location: " .. player:GetLocation(), 4, 44, 0, 1 ) + RemoveHudItemFromTeam( GetTeam(Team.kYellow), "hunted_location" ) + + end + + elseif LAST_HUNTED_LOCATION ~= nil then + + LAST_HUNTED_LOCATION = nil + RemoveHudItemFromAll( "hunted_location" ) + + end + +end + + +function respawn_everyone() + ApplyToAll({ AT.kAllowRespawn, AT.kRespawnPlayers, AT.kRemoveProjectiles, AT.kStopPrimedGrens }) + + AddSchedule( "close_escape_doors", 4.0, close_escape_doors ) +end + +function close_escape_doors() + for i,v in ipairs(escape_door.entity_names) do + -- close each enemy escape door + OutputEvent( v, "Close" ) + end +end + +function lock_escape_door_button() + ESCAPE_DOOR_BUTTON_UNLOCKED = false +end + +function unlock_escape_door_button() + ESCAPE_DOOR_BUTTON_UNLOCKED = true +end + +function hunted_escape_notification() + BroadCastMessage( "The Hunted escaped!" ) + BroadCastSound ( "ff_hunted.cheer" ) +end + +function player_ondamage( player, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + local attacker = damageinfo:GetAttacker() + local inflictor = damageinfo:GetInflictor() + + -- hunted has body armor on and only takes damage from certain things + if player:GetTeamId() == Team.kBlue then + + local weapon = damageinfo:GetInflictor():GetClassName() + local attacker_is_buildable = false + + if IsSentrygun(attacker) or IsDispenser(attacker) or IsSentrygun(inflictor) or IsDispenser(inflictor) then + + attacker_is_buildable = true + + end + + if attacker_is_buildable ~= true and weapon ~= "ff_weapon_sniperrifle" and weapon ~= "ff_weapon_crowbar" and weapon ~= "ff_projectile_dart" and weapon ~= "ff_weapon_knife" then + + damageinfo:ScaleDamage(0) + + else + + -- BroadCastSound ( "ff_hunted.dying_bird" ) + + end + + -- hunted also has quad damage + else + + if IsPlayer( attacker ) then + + attacker = CastToPlayer( attacker ) + + if attacker:GetTeamId() == Team.kBlue and player:GetTeamId() ~= HUNTED_ALLIES_TEAM then + + damageinfo:ScaleDamage(4) + attacker:AddFortPoints( POINTS_PER_HUNTED_ATTACK * 10, "Hunted Attack" ) + ConsoleToAll( "The Hunted, " .. attacker:GetName() .. ", dealt quad damage to" .. player:GetName() .. "!" ) + + end + + end + + end + +end + +function player_onkill( player ) + -- Don't let blue hunted suicide. + if player:GetTeamId() == Team.kBlue then + return false + end + return true +end + +-- We only care when The Hunted is killed by another player +function player_killed ( player_victim, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + end + + -- if still no attacking player after all that, try the inflictor + if not player_attacker then + + -- Entity that is attacking + local inflictor = damageinfo:GetInflictor() + + if inflictor then + if IsSentrygun(inflictor) then + inflictor = CastToSentrygun(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDetpack(inflictor) then + inflictor = CastToDetpack(inflictor) + player_attacker = inflictor:GetOwner() + elseif IsDispenser(inflictor) then + inflictor = CastToDispenser(inflictor) + player_attacker = inflictor:GetOwner() + end + end + + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + if player_victim:GetTeamId() == Team.kBlue then + ConsoleToAll( "The Hunted, " .. player_victim:GetName() .. ", was assassinated!" ) + BroadCastMessage( "The Hunted was assassinated!" ) + -- BroadCastSound ( "ff_hunted.werewolves_howling" ) + BroadCastSound ( "ff_hunted.thunder" ) + local team = GetTeam( Team.kYellow ) + team:AddScore( POINTS_PER_HUNTED_DEATH ) + ApplyToAll( { AT.kDisallowRespawn } ) + AddSchedule("respawn_everyone", 2, respawn_everyone) + end +end + +function player_disconnected( player ) + if player:GetTeamId() == Team.kBlue then + HUNTED_ENTITY = nil + UpdateObjectiveIcon( player, HUNTED_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(Team.kRed), HUNTED_ENTITY ) + RemoveHudItemFromAll("hunted_location") + end +end + + +BLOCKTEAMCHANGE = {} + +function player_switchteam( player, currentteam, desiredteam ) + local i = player:GetId() + local stime = GetServerTime() + + if desiredteam == Team.kBlue then + local delaytime = BLOCKTEAMCHANGE[i] + if delaytime ~= nil and delaytime > stime then + return false + end + + BLOCKTEAMCHANGE[i] = stime + 10; + end + + if player:GetTeamId() == Team.kBlue then + HUNTED_ENTITY = nil + UpdateObjectiveIcon( player, HUNTED_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(Team.kRed), HUNTED_ENTITY ) + RemoveHudItemFromAll("hunted_location") + end + + return true +end + +-- Give everyone a full resupply, but strip grenades from assassins +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 100 ) + player:AddAmmo( Ammo.kNails, 300 ) + player:AddAmmo( Ammo.kShells, 300 ) + player:AddAmmo( Ammo.kRockets, 300 ) + player:AddAmmo( Ammo.kCells, 300 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + + if player:GetTeamId() ~= Team.kYellow then + player:AddAmmo( Ammo.kGren1, 4 ) + player:AddAmmo( Ammo.kGren2, 4 ) + end + + -- AddHudText( player, "escape_door_text", "ESCAPE DOOR:", 0, 32, 4 ) + + if player:GetTeamId() == Team.kRed then + UpdateObjectiveIcon( player, HUNTED_ENTITY ) + if HUNTED_ENTITY ~= nil then + local player_hunted = CastToPlayer( HUNTED_ENTITY ) + AddHudText( player, "hunted_location", "Hunted Location: " .. player_hunted:GetLocation(), 4, 44, 0, 1 ) + end + elseif player:GetTeamId() == Team.kYellow then + UpdateObjectiveIcon( player, nil ) + else + HUNTED_ENTITY = player + UpdateObjectiveIcon( player, GetEntityByName("hunted_escape") ) + UpdateTeamObjectiveIcon( GetTeam(Team.kRed), HUNTED_ENTITY ) + end + +-- if player:GetTeamId() == Team.kRed then +-- BroadCastSoundToPlayer(player, "ff_hunted.i_fight_vampires") +-- elseif player:GetTeamId() == Team.kYellow then +-- BroadCastSoundToPlayer(player, "ff_hunted.werewolf_howling") +-- else +-- BroadCastSoundToPlayer(player, "ff_hunted.i_am_the_werewolf") +-- end +end + + +-- escape portal entrance +hunted_escape = trigger_ff_script:new({ + botgoaltype = Bot.kHuntedEscape, + team = Team.kBlue +}) + +-- escape touch +function hunted_escape:ontouch( touch_entity ) + + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + if player:GetTeamId() == Team.kBlue then + player:AddFrags( POINTS_PER_HUNTED_ESCAPE_FOR_HUNTED ) + player:AddFortPoints( POINTS_PER_HUNTED_ESCAPE_FOR_HUNTED * 10, "Hunted Escape" ) + + ConsoleToAll( "The Hunted, " .. player:GetName() .. ", escaped!" ) + + local team = GetTeam( Team.kBlue ) + team:AddScore( POINTS_PER_HUNTED_ESCAPE ) + team = GetTeam( Team.kRed ) + team:AddScore( POINTS_PER_HUNTED_ESCAPE ) + + ApplyToAll({ AT.kAllowRespawn, AT.kRespawnPlayers, AT.kRemoveProjectiles, AT.kStopPrimedGrens }) + AddSchedule( "hunted_escape_notification", 0.1, hunted_escape_notification ) + AddSchedule( "close_escape_doors", 4.0, close_escape_doors ) + + end + end + +end + + +base_escape_door = trigger_ff_script:new({}) + +function base_escape_door:onopen() + + BroadCastMessage("Escape Door Open!") + BroadCastSound("otherteam.flagstolen") + + escape_door.isopen = true + + RemoveHudItemFromAll( "escape_door_closed" ) + AddHudIconToAll( escape_door.openicon, "escape_door_open", escape_door.hudposx, escape_door.hudposy, escape_door.hudwidth, escape_door.hudheight, escape_door.hudalignx, escape_door.hudaligny ) + +end + +function base_escape_door:onfullyclosed() + + BroadCastMessage("Escape Door Closed!") + -- BroadCastSound("otherteam.flagstolen") + + escape_door.isopen = false + + RemoveHudItemFromAll( "escape_door_open" ) + AddHudIconToAll( escape_door.closedicon, "escape_door_closed", escape_door.hudposx, escape_door.hudposy, escape_door.hudwidth, escape_door.hudheight, escape_door.hudalignx, escape_door.hudaligny ) + +end + +escape_door_top = base_escape_door + + +base_escape_door_button = func_button:new({}) + +function base_escape_door_button:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if ESCAPE_DOOR_BUTTON_UNLOCKED then + lock_escape_door_button() + AddSchedule( "unlock_escape_door_button", 6.66, unlock_escape_door_button ) + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +-- TODO this doesn't work +function base_escape_door_button:onfailuse( use_entity ) + if IsPlayer( use_entity ) then + local player = CastToPlayer( use_entity ) + BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDBUTTON" ) + end +end + +escape_door_button_left = base_escape_door_button +escape_door_button_right = base_escape_door_button +escape_door_button_inside = base_escape_door_button + diff --git a/maps/includes/base_id.lua b/maps/includes/base_id.lua new file mode 100644 index 0000000..741fa8d --- /dev/null +++ b/maps/includes/base_id.lua @@ -0,0 +1,926 @@ + +-- base_id.lua +-- Invade / Defend gametype + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") + +----------------------------------------------------------------------------- +-- globals +----------------------------------------------------------------------------- +if POINTS_PER_CAPTURE == nil then POINTS_PER_CAPTURE = 10; end +if POINTS_PER_PERIOD == nil then POINTS_PER_PERIOD = 2; end +if PERIOD_TIME == nil then PERIOD_TIME = 30; end +if NUM_PHASES == nil then NUM_PHASES = 4; end +if INITIAL_ROUND_DELAY == nil then INITIAL_ROUND_DELAY = 45; end +if ROUND_DELAY == nil then ROUND_DELAY = 20; end +if onroundreset == nil then onroundreset = function() end end +if FLAG_RETURN_TIME == nil then FLAG_RETURN_TIME = 60; end +if ATTACKERS_OBJECTIVE_ENTITY == nil then ATTACKERS_OBJECTIVE_ENTITY = nil end +if DEFENDERS_OBJECTIVE_ENTITY == nil then DEFENDERS_OBJECTIVE_ENTITY = nil end +if DEFENDERS_OBJECTIVE_ONFLAG == nil then DEFENDERS_OBJECTIVE_ONFLAG = true end +if DEFENDERS_OBJECTIVE_ONCARRIER == nil then DEFENDERS_OBJECTIVE_ONCARRIER = true end +if TEAM_SWITCH_DELAY == nil then TEAM_SWITCH_DELAY = 2 end +if RESPAWN_AFTER_CAP == nil then RESPAWN_AFTER_CAP = false end +if RESPAWN_DELAY == nil then RESPAWN_DELAY = 2 end + +basecap = trigger_ff_script:new({ + health = 100, + armor = 300, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 1, + mancannons = 1, + gren1 = 0, + gren2 = 0, + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, +}) + +function basecap:allowed ( allowed_entity ) + if IsPlayer( allowed_entity ) then + -- get the player and his team + local player = CastToPlayer( allowed_entity ) + local team = player:GetTeam() + + -- check if the player is on our team + if team:GetTeamId() ~= self.team then + return false + end + + -- check if the player has the flag + for i,v in ipairs(self.item) do + local flag = GetInfoScriptByName(v) + + -- Make sure flag isn't nil + if flag then + if player:HasItem(flag:GetName()) then + return true + end + end + end + end + + return false +end + +function basecap:ontrigger ( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- player should capture now + for i,v in ipairs( self.item ) do + + -- find the flag and cast it to an info_ff_script + local flag = GetInfoScriptByName(v) + + -- Make sure flag isn't nil + if flag then + + -- check if the player is carrying the flag + if player:HasItem(flag:GetName()) then + + -- reward player for capture + player:AddFortPoints(FORTPOINTS_PER_CAPTURE, "#FF_FORTPOINTS_CAPTUREFLAG") + + -- reward player's team for capture + local team = player:GetTeam() + team:AddScore(POINTS_PER_CAPTURE) + + -- Remove any hud icons + -- local flag2 = CastToInfoScript(flag) + RemoveHudItem( player, flag:GetName() ) + RemoveHudItemFromAll( flag:GetName() .. "_c" ) + + LogLuaEvent(player:GetId(), 0, "flag_capture","flag_name",flag:GetName()) + + -- return the flag + flag:Return() + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then player:AddHealth(self.health) end + if self.armor ~= nil and self.armor ~= 0 then player:AddArmor(self.armor) end + + -- give the player some ammo + if self.nails ~= nil and self.nails ~= 0 then player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then player:AddAmmo(Ammo.kGren2, self.gren2) end + + self:oncapture( player, v ) + end + end + end + end +end + +function basecap:oncapture(player, item) + -- let the teams know that a capture occured + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) +end + +function baseflag:spawn() + self.notouch = { } + info_ff_script.spawn(self) + local flag = CastToInfoScript( entity ) + LogLuaEvent(0, 0, "flag_spawn","flag_name",flag:GetName()) + + self.status = 0 + + update_hud() +end + +function baseflag:ownercloak( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + + RemoveHudItem( player, flag:GetName() ) + self.status = 2 + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_return_timer() + update_hud() +end + +function baseflag:dropitemcmd( owner_entity ) + + if allowdrop == false then return end + + --Used by logging + self.flagtoss = true + + -- throw the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + + RemoveHudItem( player, flag:GetName() ) + self.status = 2 + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_return_timer() + update_hud() +end + +function baseflag:onownerforcerespawn( owner_entity ) + local flag = CastToInfoScript( entity ) + local player = CastToPlayer( owner_entity ) + player:SetDisguisable( true ) + player:SetCloakable( true ) + RemoveHudItem( player, flag:GetName() ) + flag:Drop(0, FLAG_THROW_SPEED) + + RemoveHudItem( player, flag:GetName() ) + self.status = 2 + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + update_hud() +end + +function baseflag:onreturn( ) + -- let the teams know that the flag was returned + local team = GetTeam( self.team ) + SmartTeamMessage(team, "#FF_TEAMRETURN", "#FF_OTHERTEAMRETURN", Color.kYellow, Color.kYellow) + SmartTeamSound(team, "yourteam.flagreturn", "otherteam.flagreturn") + SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") + local flag = CastToInfoScript( entity ) + + self.status = 0 + + LogLuaEvent(0, 0, "flag_returned","flag_name",flag:GetName()); + + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + destroy_return_timer() + update_hud() +end + +phase = 1 +current_flag = "cp1_flag" --currently only used by Palermo for hacky flag returning in water +attackers = Team.kBlue +defenders = Team.kRed +current_timer = 0 +carried_by = nil + +function startup() + SetGameDescription( "Invade Defend" ) + + -- set up team limits + local team = GetTeam( Team.kBlue ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kRed ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kYellow ) + team:SetPlayerLimit( -1 ) + + team = GetTeam( Team.kGreen ) + team:SetPlayerLimit( -1 ) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) + + -- set them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- start the timer for the points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + cp1_flag.enabled = true + for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do + local flag = GetInfoScriptByName(v) + if flag then + flag:SetModel(_G[v].model) + flag:SetSkin(teamskins[attackers]) + if i == 1 then + flag:Restore() + else + flag:Remove() + end + end + end + + flags_set_team( attackers ) + + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) +end + +-- Give everyone a full resupply, but strip secondary grenades +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + + player:RemoveAmmo( Ammo.kGren2, 4 ) + + if player:GetTeamId() == attackers then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) + elseif player:GetTeamId() == defenders then + UpdateObjectiveIcon( player, DEFENDERS_OBJECTIVE_ENTITY ) + end +end + +function addpoints() + local team = GetTeam(defenders) + team:AddScore(POINTS_PER_PERIOD) +end + +function precache() + -- precache sounds + PrecacheSound("yourteam.flagstolen") + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + PrecacheSound("yourteam.drop") + PrecacheSound("otherteam.drop") + PrecacheSound("yourteam.flagreturn") + PrecacheSound("otherteam.flagreturn") +-- PrecacheSound("vox.yourcap") +-- PrecacheSound("vox.enemycap") +-- PrecacheSound("vox.yourstole") +-- PrecacheSound("vox.enemystole") +-- PrecacheSound("vox.yourflagret") +-- PrecacheSound("vox.enemyflagret") +end + +-- kinda ghetto, sure +function flags_set_team( teamid ) + -- set all flags teams + cp1_flag.team = teamid + cp2_flag.team = teamid + cp3_flag.team = teamid + cp4_flag.team = teamid + cp5_flag.team = teamid + cp6_flag.team = teamid + cp7_flag.team = teamid + cp8_flag.team = teamid +end + +----------------------------------------- +--Backpacks +----------------------------------------- +idbackpack = genericbackpack:new({team = nil}) + +function idbackpack:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() ~= self.team then + return false + end + + local dispensed = 0 + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then dispensed = dispensed + player:AddHealth( self.health ) end + if self.armor ~= nil and self.armor ~= 0 then dispensed = dispensed + player:AddArmor( self.armor ) end + + -- give player ammo + if self.nails ~= nil and self.nails ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren2, self.gren2) end + + -- if the player took ammo, then have the backpack respawn with a delay + if dispensed >= 1 then + local backpack = CastToInfoScript(entity); + if backpack then + backpack:EmitSound(self.touchsound); + backpack:Respawn(self.respawntime); + end + end + end +end + +backpack_attackers = idbackpack:new({team = attackers}) +backpack_defenders = idbackpack:new({team = defenders}) + + +----------------------------------------- +-- base flag +----------------------------------------- +base_id_flag = baseflag:new({ + phase = 1, + enabled = nil, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kRed }, + hudicon = BLUE_FLAG_HUD_ICON, +}) +function base_id_flag:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + -- pickup if they can + if self.notouch[player:GetId()] then return; end + + if player:GetTeamId() == attackers and phase == self.phase and self.enabled then + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + RandomFlagTouchSpeak( player ) +--SmartSound(player, "vox.yourstole", "vox.yourstole", "vox.enemystole") + SmartMessage(player, "#FF_YOUPICKUP", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + + local flag = CastToInfoScript(entity) + flag:Pickup(player) + player:SetDisguisable( false ) + -- if the player is a spy, then force him to lose his cloak + player:SetCloakable( false ) + + self.hudicon = team_hudicons[attackers] + + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudstatusiconw, self.hudstatusiconh, self.hudalign ) + + -- log action in stats + LogLuaEvent(player:GetId(), 0, "flag_touch", "flag_name", flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) ), "player_health", "" .. player:GetHealth()); + + -- change objective icons + ATTACKERS_OBJECTIVE_ENTITY = player + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..self.phase.."_cap" ) end + if DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = player end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + UpdateObjectiveIcon( player, GetEntityByName( "cp"..self.phase.."_cap" ) ) + + carried_by = player:GetName() + destroy_return_timer() + update_hud() + end + end +end + +function player_switchclass( player, current, desired ) + return true +end + +function base_id_flag:onownerdie( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, flag:GetName() ) + + player:SetDisguisable( true ) + player:SetCloakable( true ) + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + UpdateObjectiveIcon( player, nil ) + + self.status = 2 + + setup_return_timer() + update_hud() +end + +----------------------------------------- +-- base capture point +----------------------------------------- +base_id_cap = basecap:new({ + phase = 0, +}) + +function base_id_cap:allowed ( touch_entity ) + if phase ~= self.phase then + return EVENT_DISALLOWED + end + + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() == defenders then + BroadCastMessageToPlayer( player, "#AD_Defend" ) + else + for i,v in ipairs(self.item) do + if player:HasItem( v ) then + return EVENT_ALLOWED + end + end + end + end + + return EVENT_DISALLOWED +end + +function base_id_cap:oncapture(player, item) + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") +--SmartSound(player, "vox.yourcap", "vox.yourcap", "vox.enemycap") + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) + + local flag_item = GetInfoScriptByName( item ) + RemoveHudItem( player, flag_item:GetName() ) + + -- turn off this flag + for i,v in ipairs(self.item) do + _G[v].enabled = nil + local flag = GetInfoScriptByName(v) + if flag then + flag:Remove() + end + end + + -- show on the deathnotice board + ObjectiveNotice( player, "captured point "..phase ) + + if phase == NUM_PHASES then + -- it's the last round. end and stuff + AddSchedule("team_switch_delay", TEAM_SWITCH_DELAY, round_end) + else + if RESPAWN_AFTER_CAP then + AddSchedule("respawn_all", RESPAWN_DELAY, respawn_all) + else + phase = phase + 1 + end + + -- enable the next flag after a time + AddSchedule("flag_start", ROUND_DELAY, flag_start, self.next) + if ROUND_DELAY > 30 then AddSchedule("flag_30secwarn", ROUND_DELAY-30, flag_30secwarn) end + if ROUND_DELAY > 10 then AddSchedule("flag_10secwarn", ROUND_DELAY-10, flag_10secwarn) end current_flag = self.next + + -- clear objective icon + ATTACKERS_OBJECTIVE_ENTITY = nil + if DEFENDERS_OBJECTIVE_ONFLAG or DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = nil + else DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_tobase_timer() + update_hud() + end + +end + +function respawn_all() + RespawnAllPlayers() + phase = phase + 1 +end + + +function round_end() + phase = 1 + current_flag = "cp1_flag" + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + else + attackers = Team.kBlue + defenders = Team.kRed + end + + -- set all flag teams to new attackers + flags_set_team( attackers ) + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- enable the first flag + cp1_flag.enabled = true + cp1_flag.status = 0 + local flag = GetInfoScriptByName("cp1_flag") + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + -- reset the timer on points + AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) + + -- respawn the players + RespawnAllPlayers() + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + -- run custom round reset stuff + onroundreset() + update_hud() +end + +function setup_door_timer(doorname, duration) + CloseDoor(doorname) + AddSchedule("round_start", duration, round_start, doorname) + AddSchedule("round_30secwarn", duration-30, round_30secwarn) + AddSchedule("round_10secwarn", duration-10, round_10secwarn) +end + +function round_start(doorname) + BroadCastMessage("#FF_AD_GATESOPEN") + BroadCastSound( "otherteam.flagstolen" ) + OpenDoor(doorname) +end +function round_30secwarn() BroadCastMessage("#FF_ROUND_30SECWARN") end +function round_10secwarn() BroadCastMessage("#FF_ROUND_10SECWARN") end + +function flag_start(flagname) + BroadCastMessage("#AD_FlagAtBase") + _G[flagname].enabled = true + _G[flagname].status = 0 + local flag = GetInfoScriptByName(flagname) + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + update_hud() +end +function flag_30secwarn() BroadCastMessage("#AD_30SecReturn") end +function flag_10secwarn() BroadCastMessage("#AD_10SecReturn") end + + +function timer_schedule() + current_timer = current_timer -1 +end + +function setup_return_timer() + RemoveSchedule( "timer_tobase_schedule" ) + current_timer = FLAG_RETURN_TIME + + AddScheduleRepeatingNotInfinitely( "timer_return_schedule", 1, timer_schedule, current_timer) +end + +function destroy_return_timer() + RemoveSchedule( "timer_return_schedule" ) +end + +function setup_tobase_timer() + RemoveSchedule( "timer_return_schedule" ) + current_timer = ROUND_DELAY + + AddScheduleRepeatingNotInfinitely( "timer_tobase_schedule", 1, timer_schedule, current_timer) +end + +function destroy_tobase_timer() + RemoveSchedule( "timer_tobase_schedule" ) +end + +------------------------------------------------ +-- instanciate them +------------------------------------------------ +cp1_flag = base_id_flag:new({phase = 1}) +cp2_flag = base_id_flag:new({phase = 2}) +cp3_flag = base_id_flag:new({phase = 3}) +cp4_flag = base_id_flag:new({phase = 4}) +cp5_flag = base_id_flag:new({phase = 5}) +cp6_flag = base_id_flag:new({phase = 6}) +cp7_flag = base_id_flag:new({phase = 7}) +cp8_flag = base_id_flag:new({phase = 8}) +cp1_cap = base_id_cap:new({phase = 1, item = {"cp1_flag"}, next = "cp2_flag"}) +cp2_cap = base_id_cap:new({phase = 2, item = {"cp2_flag"}, next = "cp3_flag"}) +cp3_cap = base_id_cap:new({phase = 3, item = {"cp3_flag"}, next = "cp4_flag"}) +cp4_cap = base_id_cap:new({phase = 4, item = {"cp4_flag"}, next = "cp5_flag"}) +cp5_cap = base_id_cap:new({phase = 5, item = {"cp5_flag"}, next = "cp6_flag"}) +cp6_cap = base_id_cap:new({phase = 6, item = {"cp6_flag"}, next = "cp7_flag"}) +cp7_cap = base_id_cap:new({phase = 7, item = {"cp7_flag"}, next = "cp8_flag"}) +cp8_cap = base_id_cap:new({phase = 8, item = {"cp8_flag"}, next = nil}) + +base_attacker_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == attackers and phase == self.phase +end }) +base_defender_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == defenders and phase == self.phase +end }) +cp1_attacker = base_attacker_spawn:new({phase=1}) +cp2_attacker = base_attacker_spawn:new({phase=2}) +cp3_attacker = base_attacker_spawn:new({phase=3}) +cp4_attacker = base_attacker_spawn:new({phase=4}) +cp5_attacker = base_attacker_spawn:new({phase=5}) +cp6_attacker = base_attacker_spawn:new({phase=6}) +cp7_attacker = base_attacker_spawn:new({phase=7}) +cp8_attacker = base_attacker_spawn:new({phase=8}) +cp1_defender = base_defender_spawn:new({phase=1}) +cp2_defender = base_defender_spawn:new({phase=2}) +cp3_defender = base_defender_spawn:new({phase=3}) +cp4_defender = base_defender_spawn:new({phase=4}) +cp5_defender = base_defender_spawn:new({phase=5}) +cp6_defender = base_defender_spawn:new({phase=6}) +cp7_defender = base_defender_spawn:new({phase=7}) +cp8_defender = base_defender_spawn:new({phase=8}) + +------------------------------------------------ +-- hud info +------------------------------------------------ +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + --RemoveHudItemFromAll( "background" ) + --AddHudIconToAll( "hud_statusbar_256_128.vtf", "background", -64, 32, 128, 70, 3 ) + + RemoveHudItem( player, "cp_flag_c" ) + RemoveHudItem( player, "cp_flag_d" ) + RemoveHudItem( player, "cp_flag_h" ) + RemoveHudItem( player, "flag_tobase_timer" ) + RemoveHudItem( player, "flag_tobase_text" ) + RemoveHudItem( player, "flag_return_timer" ) + RemoveHudItem( player, "flag_return_text" ) + RemoveHudItem( player, "flag_carried_by" ) + RemoveHudItem( player, "flag_carried_by2" ) + RemoveHudItem( player, "flag_athome" ) + RemoveHudItem( player, "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + local CPnumber = phase - 1 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudText(player, "flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudText(player, "flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIcon(player, hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + if CPnumber > 0 then + AddHudTextToAll("flag_return_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + else + AddHudTextToAll("flag_return_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + end + AddHudTimer(player, "flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIcon(player, hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudText(player, "flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + if CPnumber > 0 then + AddHudText(player, "flag_athome2", "Capture Point "..CPnumber, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + else + AddHudText(player, "flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + end + AddHudIcon(player, hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + else + if CPnumber > 0 then + AddHudText(player, "flag_tobase_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + else + AddHudText(player, "flag_tobase_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + end + AddHudTimer(player, "flag_tobase_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIcon(player, hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + + RemoveHudItem( player, "Zone_Team"..attackers ) + RemoveHudItem( player, "Zone_Team"..defenders ) + RemoveHudItem( player, "Zone_Phase"..attackers ) + RemoveHudItem( player, "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + if player:GetTeamId() == attackers then + AddHudIcon( player, "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + else + AddHudIcon( player, "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + end + +end + +function update_hud() + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + --RemoveHudItemFromAll( "background" ) + --AddHudIconToAll( "hud_statusbar_256_128.vtf", "background", -64, 32, 128, 70, 3 ) + + RemoveHudItemFromAll( "cp_flag_c" ) + RemoveHudItemFromAll( "cp_flag_d" ) + RemoveHudItemFromAll( "cp_flag_h" ) + RemoveHudItemFromAll( "flag_tobase_timer" ) + RemoveHudItemFromAll( "flag_tobase_text" ) + RemoveHudItemFromAll( "flag_return_timer" ) + RemoveHudItemFromAll( "flag_return_text" ) + RemoveHudItemFromAll( "flag_carried_by" ) + RemoveHudItemFromAll( "flag_carried_by2" ) + RemoveHudItemFromAll( "flag_athome" ) + RemoveHudItemFromAll( "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + local CPnumber = phase - 1 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudTextToAll("flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + AddHudTextToAll("flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + AddHudIconToAll( hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + if CPnumber > 0 then + AddHudTextToAll("flag_return_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + else + AddHudTextToAll("flag_return_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + end + AddHudTimerToAll("flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIconToAll( hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudTextToAll("flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + if CPnumber > 0 then + AddHudTextToAll("flag_athome2", "Capture Point "..CPnumber, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + else + AddHudTextToAll("flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0) + end + AddHudIconToAll( hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + else + if CPnumber > 0 then + AddHudTextToAll("flag_tobase_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + else + AddHudTextToAll("flag_tobase_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0) + end + AddHudTimerToAll("flag_tobase_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign) + AddHudIconToAll(hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + + RemoveHudItemFromAll( "Zone_Team"..attackers ) + RemoveHudItemFromAll( "Zone_Team"..defenders ) + RemoveHudItemFromAll( "Zone_Phase"..attackers ) + RemoveHudItemFromAll( "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + AddHudIconToTeam( GetTeam(attackers), "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(attackers), "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + + AddHudIconToTeam( GetTeam(defenders), "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(defenders), "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + +end diff --git a/maps/includes/base_id_new.lua b/maps/includes/base_id_new.lua new file mode 100644 index 0000000..d0eef12 --- /dev/null +++ b/maps/includes/base_id_new.lua @@ -0,0 +1,1189 @@ + +-- base_id_new.lua +-- Invade / Defend gametype +-- New scoring system included +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") + +----------------------------------------------------------------------------- +-- globals. Copy these your yourmap.lua if you want to change them. +----------------------------------------------------------------------------- +if NUM_PHASES == nil then NUM_PHASES = 4; end +if INITIAL_ROUND_DELAY == nil then INITIAL_ROUND_DELAY = 45; end +--How long it takes for the next flag to become available +if ROUND_DELAY == nil then ROUND_DELAY = 20; end +FLAG_RETURN_TIME = 60 +--A little pause before teams switch +TEAM_SWITCH_DELAY = 5 +--If true, all players will respawn when a flag is capped +if RESPAWN_AFTER_CAP == nil then RESPAWN_AFTER_CAP = false end +if RESPAWN_DELAY == nil then RESPAWN_DELAY = 2 end + +--Every cap has a time limit. The score for a capture decreases as time passes +if CAP_TIME_LIMIT == nil then CAP_TIME_LIMIT = 240 end +if SECONDS_PER_POINT == nil then SECONDS_PER_POINT = 12 end + +SECONDS_FOR_ONE_FULL_ROUND = INITIAL_ROUND_DELAY + TEAM_SWITCH_DELAY + ROUND_DELAY * (NUM_PHASES-1) + CAP_TIME_LIMIT * NUM_PHASES +--SECONDS_FOR_TWO_FULL_ROUNDS = (INITIAL_ROUND_DELAY + TEAM_SWITCH_DELAY + ROUND_DELAY * (NUM_PHASES-1) + CAP_TIME_LIMIT * NUM_PHASES) * 2 +--ConsoleToAll("SECONDS_FOR_ONE_FULL_ROUND = "..SECONDS_FOR_ONE_FULL_ROUND) +----------------------------------------------------------------------------- + +if ATTACKERS_OBJECTIVE_ENTITY == nil then ATTACKERS_OBJECTIVE_ENTITY = nil end +if DEFENDERS_OBJECTIVE_ENTITY == nil then DEFENDERS_OBJECTIVE_ENTITY = nil end +if DEFENDERS_OBJECTIVE_ONFLAG == nil then DEFENDERS_OBJECTIVE_ONFLAG = true end +if DEFENDERS_OBJECTIVE_ONCARRIER == nil then DEFENDERS_OBJECTIVE_ONCARRIER = true end +if onroundreset == nil then onroundreset = function() end end + +instantswitch = false + +--let players instantly change class before the gates open +function player_switchclass( player, oldclassid, newclassid ) + --avoids problems with joining a server + if oldclassid == 0 then return true end + if instantswitch and oldclassid ~= newclassid then + --add 16 to convert classes to AT flags + ApplyToPlayer( player, {newclassid+16} ) + + --The player gets full ammo/grenades on class switch! + if player:GetTeamId() == attackers then + player:RemoveAmmo( Ammo.kGren2, 4 ) + elseif player:GetTeamId() == defenders then + player:RemoveAmmo( Ammo.kDetpack, 1) + end + end + return true +end + +basecap = trigger_ff_script:new({ + health = 100, + armor = 300, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 1, + mancannons = 1, + gren1 = 0, + gren2 = 0, + item = "", + team = 0, + botgoaltype = Bot.kFlagCap, +}) + +function basecap:ontrigger ( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- player should capture now + for i,v in ipairs( self.item ) do + + -- find the flag and cast it to an info_ff_script + local flag = GetInfoScriptByName(v) + + -- Make sure flag isn't nil + if flag then + + -- check if the player is carrying the flag + if player:HasItem(flag:GetName()) then + + -- reward player for capture + player:AddFortPoints(FORTPOINTS_PER_CAPTURE, "#FF_FORTPOINTS_CAPTUREFLAG") + + -- Remove any hud icons + RemoveHudItem( player, flag:GetName() ) + RemoveHudItemFromAll( flag:GetName() .. "_c" ) + + LogLuaEvent(player:GetId(), 0, "flag_capture","flag_name",flag:GetName()) + + -- return the flag + flag:Return() + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then player:AddHealth(self.health) end + if self.armor ~= nil and self.armor ~= 0 then player:AddArmor(self.armor) end + + -- give the player some ammo + if self.nails ~= nil and self.nails ~= 0 then player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then player:AddAmmo(Ammo.kGren2, self.gren2) end + + self:oncapture( player, v ) + end + end + end + end +end + +function baseflag:spawn() + self.notouch = { } + info_ff_script.spawn(self) + local flag = CastToInfoScript( entity ) + LogLuaEvent(0, 0, "flag_spawn","flag_name",flag:GetName()) + + self.status = 0 + + update_hud() +end + +function baseflag:ownercloak( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + + RemoveHudItem( player, flag:GetName() ) + self.status = 2 + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_return_timer() + update_hud() +end + +function baseflag:dropitemcmd( owner_entity ) + + if allowdrop == false then return end + + --Used by logging + self.flagtoss = true + + -- throw the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + + RemoveHudItem( player, flag:GetName() ) + self.status = 2 + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_return_timer() + update_hud() +end + +function baseflag:onownerforcerespawn( owner_entity ) + local flag = CastToInfoScript( entity ) + local player = CastToPlayer( owner_entity ) + player:SetDisguisable( true ) + player:SetCloakable( true ) + RemoveHudItem( player, flag:GetName() ) + flag:Drop(0, FLAG_THROW_SPEED) + + self.status = 2 + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + update_hud() +end + +function baseflag:onreturn( ) + -- let the teams know that the flag was returned + local team = GetTeam( self.team ) + SmartTeamMessage(team, "#FF_TEAMRETURN", "#FF_OTHERTEAMRETURN", Color.kYellow, Color.kYellow) + SmartTeamSound(team, "yourteam.flagreturn", "otherteam.flagreturn") + SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") + local flag = CastToInfoScript( entity ) + + self.status = 0 + + LogLuaEvent(0, 0, "flag_returned","flag_name",flag:GetName()); + + -- objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + destroy_return_timer() + update_hud() +end + +phase = 1 +current_flag = "cp1_flag" +attackers = Team.kBlue +defenders = Team.kRed +current_timer = 0 +carried_by = nil +rounds_elapsed = 0 +cap_timeleft = 0 + +--This is the default startup script for id maps. If you use startup() in your map, call this and then do your own stuff before/after. +function id_startup() + + SetGameDescription( "Invade Defend" ) + + -- set up team limits + local team = GetTeam( Team.kBlue ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kRed ) + team:SetPlayerLimit( 0 ) + + team = GetTeam( Team.kYellow ) + team:SetPlayerLimit( -1 ) + + team = GetTeam( Team.kGreen ) + team:SetPlayerLimit( -1 ) + + redScore = 0 + blueScore = 0 + + --map will end after red gets to attack + roundnumber = 1 + lastround = false + --the original timelimit. If a server admin changes mp_timelimit, the script won't adjust to it. + timelimit = GetConvar( "mp_timelimit" ) + + -- CTF maps generally don't have civilians, + -- so override in map LUA file if you want 'em + local team = GetTeam(Team.kBlue) + team:SetClassLimit(Player.kCivilian, -1) + + team = GetTeam(Team.kRed) + team:SetClassLimit(Player.kCivilian, -1) + + -- set them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + cap_timeleft = 0 + + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + cp1_flag.enabled = true + for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do + local flag = GetInfoScriptByName(v) + if flag then + flag:SetModel(_G[v].model) + flag:SetSkin(teamskins[attackers]) + if i == 1 then + flag:Restore() + else + flag:Remove() + end + end + end + + flags_set_team( attackers ) + + ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) +end + +function startup() + id_startup() +end + +-- Give everyone a full resupply, but strip secondary grenades for offense +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + + if player:GetTeamId() == attackers then + UpdateObjectiveIcon( player, ATTACKERS_OBJECTIVE_ENTITY ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + elseif player:GetTeamId() == defenders then + UpdateObjectiveIcon( player, DEFENDERS_OBJECTIVE_ENTITY ) + player:RemoveAmmo( Ammo.kDetpack, 1) + end +end + +function precache() + -- precache sounds + PrecacheSound("yourteam.flagstolen") + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + PrecacheSound("yourteam.drop") + PrecacheSound("otherteam.drop") + PrecacheSound("yourteam.flagreturn") + PrecacheSound("otherteam.flagreturn") +end + +-- kinda ghetto, sure +function flags_set_team( teamid ) + -- set all flags teams + cp1_flag.team = teamid + cp2_flag.team = teamid + cp3_flag.team = teamid + cp4_flag.team = teamid + cp5_flag.team = teamid + cp6_flag.team = teamid + cp7_flag.team = teamid + cp8_flag.team = teamid +end + +----------------------------------------- +--Backpacks +----------------------------------------- +idbackpack = genericbackpack:new({team = nil}) + +function idbackpack:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() ~= self.team then + return false + end + + local dispensed = 0 + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then dispensed = dispensed + player:AddHealth( self.health ) end + if self.armor ~= nil and self.armor ~= 0 then dispensed = dispensed + player:AddArmor( self.armor ) end + + -- give player ammo + if self.nails ~= nil and self.nails ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren2, self.gren2) end + + -- if the player took ammo, then have the backpack respawn with a delay + if dispensed >= 1 then + local backpack = CastToInfoScript(entity); + if backpack then + backpack:EmitSound(self.touchsound); + backpack:Respawn(self.respawntime); + end + end + end +end + +--These bags will switch teams with the map. +backpack_attackers = idbackpack:new({team = attackers}) +backpack_defenders = idbackpack:new({team = defenders}) + + +----------------------------------------- +-- base flag +----------------------------------------- +base_id_flag = baseflag:new({ + phase = 1, + enabled = nil, + touchflags = { AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kRed }, + hudicon = BLUE_FLAG_HUD_ICON, +}) +function base_id_flag:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + -- pickup if they can + if self.notouch[player:GetId()] then return; end + + if player:GetTeamId() == attackers and phase == self.phase and self.enabled then + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + RandomFlagTouchSpeak( player ) + SmartMessage(player, "#FF_YOUPICKUP", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + + local flag = CastToInfoScript(entity) + flag:Pickup(player) + player:SetDisguisable( false ) + -- if the player is a spy, then force him to lose his cloak + player:SetCloakable( false ) + + self.hudicon = team_hudicons[attackers] + + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudstatusiconw, self.hudstatusiconh, self.hudalign ) + + -- log action in stats + LogLuaEvent(player:GetId(), 0, "flag_touch", "flag_name", flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) ), "player_health", "" .. player:GetHealth()); + + -- change objective icons + ATTACKERS_OBJECTIVE_ENTITY = player + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..self.phase.."_cap" ) end + if DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = player end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + UpdateObjectiveIcon( player, GetEntityByName( "cp"..self.phase.."_cap" ) ) + + carried_by = player:GetName() + destroy_return_timer() + update_hud() + end + end +end + +function base_id_flag:onownerdie( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, flag:GetName() ) + + player:SetDisguisable( true ) + player:SetCloakable( true ) + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + UpdateObjectiveIcon( player, nil ) + + self.status = 2 + + setup_return_timer() + update_hud() +end + +----------------------------------------- +-- base capture point +----------------------------------------- +base_id_cap = basecap:new({ + phase = 0, +}) + +function base_id_cap:allowed ( touch_entity ) + if phase ~= self.phase then + return EVENT_DISALLOWED + end + + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + if player:GetTeamId() == defenders then + BroadCastMessageToPlayer( player, "#AD_Defend" ) + else + for i,v in ipairs(self.item) do + if player:HasItem( v ) then + return EVENT_ALLOWED + end + end + end + end + + return EVENT_DISALLOWED +end + +function base_id_cap:oncapture(player, item) + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) + + --Custom map effects. Put a logic_relay in the map, eg. "cp1_relay_blue" to trigger when there's a cap. + if attackers == Team.kBlue then + OutputEvent( "cp"..self.phase.."_relay_blue", "Trigger" ) + else + OutputEvent( "cp"..self.phase.."_relay_red", "Trigger" ) + end + + local flag_item = GetInfoScriptByName( item ) + RemoveHudItem( player, flag_item:GetName() ) + + -- turn off this flag + for i,v in ipairs(self.item) do + _G[v].enabled = nil + local flag = GetInfoScriptByName(v) + if flag then + flag:Remove() + end + end + + + + --Team gets points for time left on the clock. + local team = player:GetTeam() + team:AddScore(math.ceil(cap_timeleft / SECONDS_PER_POINT)) + if attackers == Team.kBlue then + blueScore = blueScore + (math.ceil(cap_timeleft / SECONDS_PER_POINT)) + else + redScore = redScore + (math.ceil(cap_timeleft / SECONDS_PER_POINT)) + end + + -- show on the deathnotice board + ObjectiveNotice( player, "captured point "..phase.." for "..(math.ceil(cap_timeleft / SECONDS_PER_POINT)).." points" ) + + RemoveSchedule("cap_timer_schedule") + RemoveSchedule("forceRoundEnd") + RemoveSchedule("forceRoundWarn300") + RemoveSchedule("forceRoundWarn120") + RemoveSchedule("forceRoundWarn30") + RemoveSchedule("forceRoundWarn10") + RemoveSchedule("forceRoundWarn9") + RemoveSchedule("forceRoundWarn8") + RemoveSchedule("forceRoundWarn7") + RemoveSchedule("forceRoundWarn6") + RemoveSchedule("forceRoundWarn5") + RemoveSchedule("forceRoundWarn4") + RemoveSchedule("forceRoundWarn3") + RemoveSchedule("forceRoundWarn2") + RemoveSchedule("forceRoundWarn1") + cap_timeleft = 0 + + if phase == NUM_PHASES then + -- it's the last phase. end and stuff + rounds_elapsed = rounds_elapsed + 1 + + SmartTeamSpeak(GetTeam(attackers), "CZ_GOTALL", "CZ_THEYGOTALL") + freezeAllPlayers() + + --End the map if it's time. + if attackers == Team.kRed and lastround == true then + AddSchedule("QuitSched", 4, QuitIt()) + else + AddSchedule("team_switch_delay", TEAM_SWITCH_DELAY, round_end) + end + else + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + phase = phase + 1 + if RESPAWN_AFTER_CAP then + AddSchedule("respawn_all", RESPAWN_DELAY, respawn_all) + end + + -- enable the next flag after a time + AddSchedule("flag_start", ROUND_DELAY, flag_start, self.next) + if ROUND_DELAY > 30 then AddSchedule("flag_30secwarn", ROUND_DELAY-30, flag_30secwarn) end + if ROUND_DELAY > 10 then AddSchedule("flag_10secwarn", ROUND_DELAY-10, flag_10secwarn) end + + current_flag = self.next + + -- clear objective icon + ATTACKERS_OBJECTIVE_ENTITY = nil + if DEFENDERS_OBJECTIVE_ONFLAG or DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = nil + else DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + setup_tobase_timer() + update_hud() + end +end + +function respawn_all() + RespawnAllPlayers() +end + +function round_end() + + phase = 1 + + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + else + roundnumber = roundnumber + 1 + attackers = Team.kBlue + defenders = Team.kRed + AddHudTextToAll("finalround_text", "ROUND "..roundnumber, 20, od_hudstatusicony+5, 3, 0, 2) + end + + --ten minutes until the time limit, call it quits + if (GetServerTime() > 60 * timelimit - 600) and lastround == false and attackers == Team.kBlue then + lastround = true + AddHudTextToAll("finalround_text", "FINAL ROUND", 20, od_hudstatusicony+5, 3, 0, 2) + --ConsoleToAll("declaring last round: "..(timelimit - GetServerTime()/60).." minutes left until original map limit") + end + + -- set all flag teams to new attackers + flags_set_team( attackers ) + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- respawn the players + RespawnAllPlayers() + setup_door_timer("start_gate", INITIAL_ROUND_DELAY) + + --Telling players what's up + SmartTeamMessage(GetTeam(defenders), "You are now on defense. Move to command point 1", "You are now on Offense. When the gates open, attack!") + SmartTeamSpeak(GetTeam(attackers), "AD_ATTACK", "AD_DEFEND") + + if blueScore > redScore then + AddSchedule("WinningSpeak", 3, SmartTeamSpeak, GetTeam(Team.kBlue), "WINNING_YOURTEAM", "WINNING_ENEMYTEAM") + elseif redScore > blueScore then + AddSchedule("WinningSpeak", 3, SmartTeamSpeak, GetTeam(Team.kRed), "WINNING_YOURTEAM", "WINNING_ENEMYTEAM") + end + + current_flag = "cp1_flag" + + -- enable the first flag + cp1_flag.enabled = true + cp1_flag.status = 0 + local flag = GetInfoScriptByName("cp1_flag") + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + + update_hud() + + -- run custom round reset stuff + onroundreset() +end + +function setup_door_timer(doorname, duration) + CloseDoor(doorname) + AddSchedule("round_start", duration, round_start, doorname) + AddSchedule("round_30secwarn", duration-30, round_30secwarn) + AddSchedule("round_10secwarn", duration-10, round_10secwarn) + AddSchedule("round_5secwarn", duration-5, round_5secwarn) + AddSchedule("round_4secwarn", duration-4, round_4secwarn) + AddSchedule("round_3secwarn", duration-3, round_3secwarn) + AddSchedule("round_2secwarn", duration-2, round_2secwarn) + AddSchedule("round_1secwarn", duration-1, round_1secwarn) + --This overrides the schedules from the previous round + --Which should be over anyway, but don't fix what ain't broke, right? + AddSchedule("forceRoundEnd", CAP_TIME_LIMIT+duration, forceRoundEnd) + --Don't do vox as the gate opens becasue there's already an anouncement + if CAP_TIME_LIMIT >= 305 then AddSchedule("forceRoundWarn300", CAP_TIME_LIMIT+duration-300, forceRoundWarn300) end + if CAP_TIME_LIMIT >= 125 then AddSchedule("forceRoundWarn120", CAP_TIME_LIMIT+duration-120, forceRoundWarn120) end + AddSchedule("forceRoundWarn30", CAP_TIME_LIMIT+duration-30, forceRoundWarn30) + AddSchedule("forceRoundWarn10", CAP_TIME_LIMIT+duration-10, forceRoundWarn10) + AddSchedule("forceRoundWarn9", CAP_TIME_LIMIT+duration-9, forceRoundWarn9) + AddSchedule("forceRoundWarn8", CAP_TIME_LIMIT+duration-8, forceRoundWarn8) + AddSchedule("forceRoundWarn7", CAP_TIME_LIMIT+duration-7, forceRoundWarn7) + AddSchedule("forceRoundWarn6", CAP_TIME_LIMIT+duration-6, forceRoundWarn6) + AddSchedule("forceRoundWarn5", CAP_TIME_LIMIT+duration-5, forceRoundWarn5) + AddSchedule("forceRoundWarn4", CAP_TIME_LIMIT+duration-4, forceRoundWarn4) + AddSchedule("forceRoundWarn3", CAP_TIME_LIMIT+duration-3, forceRoundWarn3) + AddSchedule("forceRoundWarn2", CAP_TIME_LIMIT+duration-2, forceRoundWarn2) + AddSchedule("forceRoundWarn1", CAP_TIME_LIMIT+duration-1, forceRoundWarn1) + + instantswitch = true + + --Put more time on the clock if needed + if (60 * GetConvar( "mp_timelimit" ) - GetServerTime() - 4) < SECONDS_FOR_ONE_FULL_ROUND then + set_cvar("mp_timelimit", (GetServerTime() + SECONDS_FOR_ONE_FULL_ROUND)/60) + --ConsoleToAll("setting mp_timelimit: "..(GetServerTime() + SECONDS_FOR_ONE_FULL_ROUND/)60) + end +end + +function round_start(doorname) + cap_timeleft = CAP_TIME_LIMIT + AddScheduleRepeating( "cap_timer_schedule", 1, cap_timer_schedule) + BroadCastMessage("#FF_AD_GATESOPEN") + SpeakAll("AD_GATESOPEN") + OpenDoor(doorname) + update_hud() + instantswitch = false +end + +function cap_timer_schedule() + cap_timeleft = cap_timeleft - 1 + if cap_timeleft < 0 then cap_timeleft = 0 end +end + +function freezeAllPlayers() + local col = Collection() + col:GetByFilter( { CF.kPlayers, CF.kTeamBlue } ) + for temp in col.items do + local player = CastToPlayer( temp ) + if player then + player:Freeze(true) + end + end + col:GetByFilter( { CF.kPlayers, CF.kTeamRed } ) + for temp in col.items do + local player = CastToPlayer( temp ) + if player then + player:Freeze(true) + end + end +end + +function forceRoundEnd() + freezeAllPlayers() + + BroadCastMessage("#ADZ_Switch") + SpeakAll("CZ_POINTSRESET") + RemoveSchedule("cap_timer_schedule") + cap_timeleft = 0 + + rounds_elapsed = rounds_elapsed + 1 + + --These relays fire if the round times out + if attackers == Team.kBlue then + OutputEvent("timeout_relay_blue", "Trigger") + else + OutputEvent("timeout_relay_red", "Trigger") + end + + --cancel any flag action + local flag = GetInfoScriptByName(current_flag) + if flag then + flag:Remove() + end + RemoveHudItemFromAll(current_flag) + update_hud() + + --End the map if it's time + if attackers == Team.kRed and lastround == true then + AddSchedule("QuitSched", 4, QuitIt()) + else + AddSchedule("team_switch_delay", TEAM_SWITCH_DELAY, round_end) + end +end + +function QuitIt() + GoToIntermission() + if blueScore > redScore then + AddSchedule("WinSpeak", 1, SpeakAll, "WIN_BLUE") + elseif redScore > blueScore then + AddSchedule("WinSpeak", 1, SpeakAll, "WIN_RED") + end +end + +function forceRoundWarn300() + BroadCastMessage("#ADZ_Switch5Min") + SpeakAll("AD_300SEC") +end +function forceRoundWarn120() + BroadCastMessage("#ADZ_Switch2Min") + SpeakAll("AD_120SEC") +end +function forceRoundWarn30() + BroadCastMessage("#ADZ_Switch30Sec") + SpeakAll("AD_30SEC") +end +function forceRoundWarn10() + BroadCastMessage("#ADZ_Switch10Sec") + SpeakAll("AD_10SEC") +end +function forceRoundWarn9() + BroadCastMessage("9") + SpeakAll("AD_9SEC") +end +function forceRoundWarn8() + BroadCastMessage("8") + SpeakAll("AD_8SEC") +end +function forceRoundWarn7() + BroadCastMessage("7") + SpeakAll("AD_7SEC") +end +function forceRoundWarn6() + BroadCastMessage("6") + SpeakAll("AD_6SEC") +end +function forceRoundWarn5() + BroadCastMessage("5") + SpeakAll("AD_5SEC") +end +function forceRoundWarn4() + BroadCastMessage("4") + SpeakAll("AD_4SEC") +end +function forceRoundWarn3() + BroadCastMessage("3") + SpeakAll("AD_3SEC") +end +function forceRoundWarn2() + BroadCastMessage("2") + SpeakAll("AD_2SEC") +end +function forceRoundWarn1() + BroadCastMessage("1") + SpeakAll("AD_1SEC") +end + + +function round_30secwarn() + BroadCastMessage("#FF_ROUND_30SECWARN") +end +function round_10secwarn() + BroadCastMessage("#FF_ROUND_10SECWARN") +end +function round_5secwarn() + BroadCastMessage("5") + SpeakAll("AD_5SEC") +end +function round_4secwarn() + BroadCastMessage("4") + SpeakAll("AD_4SEC") +end +function round_3secwarn() + BroadCastMessage("3") + SpeakAll("AD_3SEC") +end +function round_2secwarn() + BroadCastMessage("2") + SpeakAll("AD_2SEC") +end +function round_1secwarn() + BroadCastMessage("1") + SpeakAll("AD_1SEC") +end + + +function flag_start(flagname) + BroadCastMessage("#AD_FlagAtBase") + _G[flagname].enabled = true + _G[flagname].status = 0 + local flag = GetInfoScriptByName(flagname) + if flag then + flag:Restore() + flag:SetSkin(teamskins[attackers]) + end + + --reset the cap timer + cap_timeleft = CAP_TIME_LIMIT + AddScheduleRepeating( "cap_timer_schedule", 1, cap_timer_schedule) + + AddSchedule("forceRoundEnd", CAP_TIME_LIMIT, forceRoundEnd) + if CAP_TIME_LIMIT >= 300 then AddSchedule("forceRoundWarn300", CAP_TIME_LIMIT-300, forceRoundWarn300) end + if CAP_TIME_LIMIT >= 120 then AddSchedule("forceRoundWarn120", CAP_TIME_LIMIT-120, forceRoundWarn120) end + AddSchedule("forceRoundWarn30", CAP_TIME_LIMIT-30, forceRoundWarn30) + AddSchedule("forceRoundWarn10", CAP_TIME_LIMIT-10, forceRoundWarn10) + AddSchedule("forceRoundWarn9", CAP_TIME_LIMIT-9, forceRoundWarn9) + AddSchedule("forceRoundWarn8", CAP_TIME_LIMIT-8, forceRoundWarn8) + AddSchedule("forceRoundWarn7", CAP_TIME_LIMIT-7, forceRoundWarn7) + AddSchedule("forceRoundWarn6", CAP_TIME_LIMIT-6, forceRoundWarn6) + AddSchedule("forceRoundWarn5", CAP_TIME_LIMIT-5, forceRoundWarn5) + AddSchedule("forceRoundWarn4", CAP_TIME_LIMIT-4, forceRoundWarn4) + AddSchedule("forceRoundWarn3", CAP_TIME_LIMIT-3, forceRoundWarn3) + AddSchedule("forceRoundWarn2", CAP_TIME_LIMIT-2, forceRoundWarn2) + AddSchedule("forceRoundWarn1", CAP_TIME_LIMIT-1, forceRoundWarn1) + + + -- change objective icon + ATTACKERS_OBJECTIVE_ENTITY = flag + if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end + UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) + UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY ) + update_hud() +end +function flag_30secwarn() BroadCastMessage("#AD_30SecReturn") end +function flag_10secwarn() BroadCastMessage("#AD_10SecReturn") end + + +function timer_schedule() + current_timer = current_timer -1 +end + +function setup_return_timer() + RemoveSchedule( "timer_tobase_schedule" ) + current_timer = FLAG_RETURN_TIME + + AddScheduleRepeatingNotInfinitely( "timer_return_schedule", 1, timer_schedule, current_timer) +end + +function destroy_return_timer() + RemoveSchedule( "timer_return_schedule" ) +end + +function setup_tobase_timer() + RemoveSchedule( "timer_return_schedule" ) + current_timer = ROUND_DELAY + + AddScheduleRepeatingNotInfinitely( "timer_tobase_schedule", 1, timer_schedule, current_timer) +end + +function destroy_tobase_timer() + RemoveSchedule( "timer_tobase_schedule" ) +end + +------------------------------------------------ +-- instanciate them +------------------------------------------------ +cp1_flag = base_id_flag:new({phase = 1}) +cp2_flag = base_id_flag:new({phase = 2}) +cp3_flag = base_id_flag:new({phase = 3}) +cp4_flag = base_id_flag:new({phase = 4}) +cp5_flag = base_id_flag:new({phase = 5}) +cp6_flag = base_id_flag:new({phase = 6}) +cp7_flag = base_id_flag:new({phase = 7}) +cp8_flag = base_id_flag:new({phase = 8}) +cp1_cap = base_id_cap:new({phase = 1, item = {"cp1_flag"}, next = "cp2_flag"}) +cp2_cap = base_id_cap:new({phase = 2, item = {"cp2_flag"}, next = "cp3_flag"}) +cp3_cap = base_id_cap:new({phase = 3, item = {"cp3_flag"}, next = "cp4_flag"}) +cp4_cap = base_id_cap:new({phase = 4, item = {"cp4_flag"}, next = "cp5_flag"}) +cp5_cap = base_id_cap:new({phase = 5, item = {"cp5_flag"}, next = "cp6_flag"}) +cp6_cap = base_id_cap:new({phase = 6, item = {"cp6_flag"}, next = "cp7_flag"}) +cp7_cap = base_id_cap:new({phase = 7, item = {"cp7_flag"}, next = "cp8_flag"}) +cp8_cap = base_id_cap:new({phase = 8, item = {"cp8_flag"}, next = nil}) + +base_attacker_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == attackers and phase == self.phase +end }) +base_defender_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == defenders and phase == self.phase +end }) +cp1_attacker = base_attacker_spawn:new({phase=1}) +cp2_attacker = base_attacker_spawn:new({phase=2}) +cp3_attacker = base_attacker_spawn:new({phase=3}) +cp4_attacker = base_attacker_spawn:new({phase=4}) +cp5_attacker = base_attacker_spawn:new({phase=5}) +cp6_attacker = base_attacker_spawn:new({phase=6}) +cp7_attacker = base_attacker_spawn:new({phase=7}) +cp8_attacker = base_attacker_spawn:new({phase=8}) +cp1_defender = base_defender_spawn:new({phase=1}) +cp2_defender = base_defender_spawn:new({phase=2}) +cp3_defender = base_defender_spawn:new({phase=3}) +cp4_defender = base_defender_spawn:new({phase=4}) +cp5_defender = base_defender_spawn:new({phase=5}) +cp6_defender = base_defender_spawn:new({phase=6}) +cp7_defender = base_defender_spawn:new({phase=7}) +cp8_defender = base_defender_spawn:new({phase=8}) + +------------------------------------------------ +-- hud info +------------------------------------------------ +function flaginfo( player_entity ) + + local player = CastToPlayer( player_entity ) + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + RemoveHudItem( player, "cp_flag_c" ) + RemoveHudItem( player, "cp_flag_d" ) + RemoveHudItem( player, "cp_flag_h" ) + RemoveHudItem( player, "flag_tobase_timer" ) + RemoveHudItem( player, "flag_tobase_text" ) + RemoveHudItem( player, "flag_return_timer" ) + RemoveHudItem( player, "flag_return_text" ) + RemoveHudItem( player, "flag_carried_by" ) + RemoveHudItem( player, "flag_carried_by2" ) + RemoveHudItem( player, "flag_athome" ) + RemoveHudItem( player, "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + local CPnumber = phase - 1 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudText(player, "flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + AddHudText(player, "flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + AddHudIcon(player, hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + if CPnumber > 0 then + AddHudTextToAll("flag_return_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + else + AddHudTextToAll("flag_return_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + end + AddHudTimer(player, "flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 3) + AddHudIcon(player, hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudText(player, "flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + if CPnumber > 0 then + AddHudText(player, "flag_athome2", "Capture Point "..CPnumber, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + else + AddHudText(player, "flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + end + AddHudIcon(player, hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + else + if CPnumber > 0 then + AddHudText(player, "flag_tobase_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + else + AddHudText(player, "flag_tobase_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + end + AddHudTimer(player, "flag_tobase_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 3) + AddHudIcon(player, hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + + RemoveHudItem( player, "Zone_Team"..attackers ) + RemoveHudItem( player, "Zone_Team"..defenders ) + RemoveHudItem( player, "Zone_Phase"..attackers ) + RemoveHudItem( player, "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + RemoveHudItem(player, "cap_timer") + RemoveHudItem(player, "cap_timer_text") + if cap_timeleft > 0 then + AddHudText(player, "cap_timer_text", "Time left", 40, od_hudstatusicony, 2, 0, 2) + AddHudTimer(player, "cap_timer", cap_timeleft, -1, 40, od_hudstatusicony+10, 2, 0, 3) + end + + if lastround == true then AddHudText(player, "finalround_text", "FINAL ROUND", 20, od_hudstatusicony+5, 3, 0, 2) + else AddHudText(player, "finalround_text", "ROUND "..roundnumber, 20, od_hudstatusicony+5, 3, 0, 2) + end + + if player:GetTeamId() == attackers then + AddHudIcon( player, "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + else + AddHudIcon( player, "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIcon( player, "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + end + +end + +function update_hud() + + local flag = GetInfoScriptByName("cp"..phase.."_flag") + local flagname = flag:GetName() + + RemoveHudItemFromAll( "cp_flag_c" ) + RemoveHudItemFromAll( "cp_flag_d" ) + RemoveHudItemFromAll( "cp_flag_h" ) + RemoveHudItemFromAll( "flag_tobase_timer" ) + RemoveHudItemFromAll( "flag_tobase_text" ) + RemoveHudItemFromAll( "flag_return_timer" ) + RemoveHudItemFromAll( "flag_return_text" ) + RemoveHudItemFromAll( "flag_carried_by" ) + RemoveHudItemFromAll( "flag_carried_by2" ) + RemoveHudItemFromAll( "flag_athome" ) + RemoveHudItemFromAll( "flag_athome2" ) + + if attackers == Team.kBlue then + hudstatusicondropped = "hud_flag_dropped_blue.vtf" + hudstatusiconhome = "hud_flag_home_blue.vtf" + hudstatusiconcarried = "hud_flag_carried_blue.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kRed then + hudstatusicondropped = "hud_flag_dropped_red.vtf" + hudstatusiconhome = "hud_flag_home_red.vtf" + hudstatusiconcarried = "hud_flag_carried_red.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + elseif attackers == Team.kYellow then + hudstatusicondropped = "hud_flag_dropped_yellow.vtf" + hudstatusiconhome = "hud_flag_home_yellow.vtf" + hudstatusiconcarried = "hud_flag_carried_yellow.vtf" + hudstatusicontobase = "hud_flag_home_l.vtf" + elseif attackers == Team.kGreen then + hudstatusicondropped = "hud_flag_dropped_green.vtf" + hudstatusiconhome = "hud_flag_home_green.vtf" + hudstatusiconcarried = "hud_flag_carried_green.vtf" + hudstatusicontobase = "hud_flag_home_r.vtf" + end + + flag_hudstatusiconx = 4 + flag_hudstatusicony = 42 + flag_hudstatusiconw = 15 + flag_hudstatusiconh = 15 + flag_hudstatusiconalign = 3 + text_hudstatusx = 0 + text_hudstatusy = flag_hudstatusicony + 24 + text_hudstatusalign = 4 + + local CPnumber = phase - 1 + + if _G[flagname].enabled == true then + if flag:IsCarried() then + AddHudTextToAll("flag_carried_by", "#AD_FlagCarriedBy", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + AddHudTextToAll("flag_carried_by2", carried_by, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + AddHudIconToAll( hudstatusiconcarried, ( "cp_flag_c" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif flag:IsDropped() and _G[flagname].status == 2 then + if CPnumber > 0 then + AddHudTextToAll("flag_return_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + else + AddHudTextToAll("flag_return_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + end + AddHudTimerToAll("flag_return_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 3) + AddHudIconToAll( hudstatusicondropped, ( "cp_flag_d" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + elseif _G[flagname].status == 0 then + AddHudTextToAll("flag_athome", "#AD_FlagIsAt", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + if CPnumber > 0 then + AddHudTextToAll("flag_athome2", "Capture Point "..CPnumber, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + else + AddHudTextToAll("flag_athome2", "#AD_ASpawn", text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 2) + end + AddHudIconToAll( hudstatusiconhome, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + else + if CPnumber > 0 then + AddHudTextToAll("flag_tobase_text", "Flag will return to CP"..CPnumber.." in", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + else + AddHudTextToAll("flag_tobase_text", "#AD_FlagReturnBase", text_hudstatusx, text_hudstatusy, text_hudstatusalign, 0, 2) + end + AddHudTimerToAll("flag_tobase_timer", current_timer + 1, -1, text_hudstatusx, text_hudstatusy+8, text_hudstatusalign, 0, 3) + AddHudIconToAll(hudstatusicontobase, ( "cp_flag_h" ), flag_hudstatusiconx, flag_hudstatusicony, flag_hudstatusiconw, flag_hudstatusiconh, flag_hudstatusiconalign ) + end + + + RemoveHudItemFromAll( "Zone_Team"..attackers ) + RemoveHudItemFromAll( "Zone_Team"..defenders ) + RemoveHudItemFromAll( "Zone_Phase"..attackers ) + RemoveHudItemFromAll( "Zone_Phase"..defenders ) + + od_hudstatusiconx = -28 + od_hudstatusicony = 38 + od_hudstatusiconw = 24 + od_hudstatusiconh = 24 + od_hudstatusiconalign = 3 + + RemoveHudItemFromAll("cap_timer") + RemoveHudItemFromAll("cap_timer_text") + if cap_timeleft > 0 then + AddHudTextToAll("cap_timer_text", "Time left", 40, od_hudstatusicony, 2, 0, 2) + AddHudTimerToAll("cap_timer", cap_timeleft, -1, 40, od_hudstatusicony+10, 2, 0, 3) + end + + AddHudIconToTeam( GetTeam(attackers), "hud_offense.vtf", "Zone_Team"..attackers, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(attackers), "hud_cp_"..phase..".vtf", "Zone_Phase"..attackers, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + + AddHudIconToTeam( GetTeam(defenders), "hud_defense.vtf", "Zone_Team"..defenders, od_hudstatusiconx, od_hudstatusicony, od_hudstatusiconw, od_hudstatusiconh, od_hudstatusiconalign ) + AddHudIconToTeam( GetTeam(defenders), "hud_cp_"..phase..".vtf", "Zone_Phase"..defenders, od_hudstatusiconx + 2, od_hudstatusicony + 2, 20, 20, od_hudstatusiconalign ) + +end \ No newline at end of file diff --git a/maps/includes/base_idzone.lua b/maps/includes/base_idzone.lua new file mode 100644 index 0000000..e0ab1d5 --- /dev/null +++ b/maps/includes/base_idzone.lua @@ -0,0 +1,898 @@ + +-- base_idzone.lua +-- Invade / Defend the Zone gametype + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay") + +----------------------------------------------------------------------------- +-- global overrides that you can do what you want with +----------------------------------------------------------------------------- + +FORT_POINTS_PER_INITIAL_TOUCH = 200 +FORT_POINTS_PER_PERIOD = 50 +FORT_POINTS_PER_DEFEND = 100 + +POINTS_PER_INITIAL_TOUCH = 1 +POINTS_PER_PERIOD = 1 + +DELAY_BEFORE_PERIOD_POINTS = 2 +PERIOD_TIME = 1 +INITIAL_ROUND_PERIOD = 60 +ROUND_SETUP_PERIOD = 17 + +DEFENSE_PERIOD_TIME = 60 +POINTS_PER_DEFENSE_PERIOD = 1 + +DEFAULT_POINTS_TO_CAP = 10 +NUMBER_OF_CAP_POINTS = 3 +DELAY_BEFORE_TEAMSWITCH = 2 +DELAY_AFTER_CAP = 3 + +ZONE_COLOR = "blue" + +----------------------------------------------------------------------------- +-- global variables and other shit that shouldn't be messed with +----------------------------------------------------------------------------- + +phase = 1 +zone_points = 0 +zone_max_points = DEFAULT_POINTS_TO_CAP +zone_scoring = false +draw_hud = true + +attackers = Team.kBlue +defenders = Team.kRed + +scoring_team = Team.kRed + +local teamdata = { + [Team.kBlue] = { skin = "0", beamcolour = "0 0 255" }, + [Team.kRed] = { skin = "1", beamcolour = "255 0 0" } +} + +-- stores ID's of attackers in the cap room +local zone_collection = Collection() + +-- stores if the player has touched the cap point (for 1 touch per death) +local playerTouchedTable = {} + +----------------------------------------------------------------------------- +-- functions that do sh... stuff +----------------------------------------------------------------------------- + +-- sounds, right? +function precache() + PrecacheSound("otherteam.flagstolen") -- doors open sound + PrecacheSound("otherteam.drop") -- warning sound + PrecacheSound("yourteam.flagreturn") -- scoring sound + PrecacheSound("misc.bloop") -- minutes remaining + PrecacheSound("misc.doop") -- attackers capping sound +end + +-- pretty standard setup, aside from scoring starting +function startup() + SetGameDescription( "Invade Defend the Zone" ) + + -- set up team limits on each team + SetPlayerLimit( Team.kBlue, 0 ) + SetPlayerLimit( Team.kRed, 0 ) + SetPlayerLimit( Team.kYellow, -1 ) + SetPlayerLimit( Team.kGreen, -1 ) + + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- Making the game not suck. + local team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + team:SetClassLimit(Player.kSniper, 1) + team:SetClassLimit(Player.kEngineer, 2) + team:SetClassLimit(Player.kDemoman, 2) + team:SetClassLimit(Player.kHwguy, 2) + team:SetClassLimit(Player.kPyro, 2) + + + AddSchedule( "round_start", INITIAL_ROUND_PERIOD, round_start) + if INITIAL_ROUND_PERIOD > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_30SecWarning" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_10SecWarning" ) end + + -- sounds + if INITIAL_ROUND_PERIOD > 30 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_PERIOD - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_PERIOD - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_PERIOD - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_PERIOD - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_PERIOD - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_PERIOD - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_PERIOD - 1 , schedulecountdown, 1 ) end + + zone_max_points = zone1.pointstocap + + -- calculate defense period points + local total_points_to_reset = 1 + for i=1,NUMBER_OF_CAP_POINTS do + local t_points = getfield("zone"..i..".pointstocap") + total_points_to_reset = total_points_to_reset + t_points + end + local timelimit = GetConvar( "mp_timelimit" ) + -- convert mp_timelimit from minutes to seconds and divide by the number of rounds minus initial round period + POINTS_PER_DEFENSE_PERIOD = total_points_to_reset / (timelimit / (DEFENSE_PERIOD_TIME / 60)) + POINTS_PER_DEFENSE_PERIOD = math.ceil(POINTS_PER_DEFENSE_PERIOD) + + update_zone_all( ) + AddScheduleRepeating( "period_scoring_sched", PERIOD_TIME, period_scoring ) + AddScheduleRepeating( "defense_period_scoring_sched", DEFENSE_PERIOD_TIME, defenders_scoring ) +end + +----------------------------------------------------------------------------- +-- player_ functions +----------------------------------------------------------------------------- + +-- on player spawn +function player_spawn( player_entity ) + + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:RemoveAmmo( Ammo.kManCannon, 1 ) + + player:SetCloakable( true ) + player:SetDisguisable( true ) + + update_zone_player( player ) + + -- give demo 1 mirv, and only 1 mirv + if player:GetClass() == Player.kDemoman or player:GetClass() == Player.kEngineer then + player:RemoveAmmo( Ammo.kGren2, 4 ) + player:AddAmmo( Ammo.kGren2, 1 ) + end + + if player:GetTeamId() == attackers then + local attackers_objective = GetEntityByName( "zone"..phase ) + UpdateObjectiveIcon( player, attackers_objective ) + else + UpdateObjectiveIcon( player, nil ) + player:RemoveAmmo( Ammo.kDetpack, 1 ) + end + + -- wtf, scout or med on d? are you mental? + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + local classt = "Scout" + if player:GetClass() == Player.kMedic then classt = "Medic" end + local id = player:GetId() + AddSchedule("force_changemessage"..id, 2, schedulechangemessage, player, "No "..classt.."s on defense. Autoswitching to Soldier." ) + AddSchedule("force_change"..id, 2, forcechange, player) + end + + -- remove any players not on a team from playertouchedtable + for playerx, recordx in pairs(playerTouchedTable) do + if GetPlayerByID( playerx ) then + local playert = GetPlayerByID( playerx ) + if ( playert:GetTeamId() ~= attackers ) then + playerTouchedTable[playerx] = nil + end + end + end + + if player:GetTeamId() ~= attackers then return end + + -- add to table and reset touched to 0 + playerTouchedTable[player:GetId()] = {touched = false, allowed = true} + +end + +-- needed so that people who switch team are removed from the cap room collection properly. +function player_switchteam ( player, oldteam, newteam ) + if oldteam == attackers then + base_zone_trigger:onendtouch( player ) + end + + return true +end + +-- on player killed +function player_killed ( player, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + else + return + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- If player killed self or teammate do nothing + if (player:GetId() == player_attacker:GetId()) or (player:GetTeamId() == player_attacker:GetTeamId()) then + return + end + + -- If player is an attacker, then do stuff + if player:GetTeamId() == attackers then + -- Check if he's in the cap point + for playerx in zone_collection.items do + playerx = CastToPlayer(playerx) + + if playerx:GetId() == player:GetId() then + player_attacker:AddFortPoints( FORT_POINTS_PER_DEFEND, "Defending the Point" ) + + -- for safety, remove player from collection + zone_collection:RemoveItem( player ) + -- also for safety, if no more players, reset the cap + if zone_collection:Count() == 0 then + update_zone_all( ) + zone_turnoff( phase ) + end + + return + end + end + + end + +end + +function player_ondamage ( player, damageinfo ) + + -- if no damageinfo do nothing + if not damageinfo then return end + + -- Get Damage Force + local damage = damageinfo:GetDamage() + + -- Entity that is attacking + local attacker = damageinfo:GetAttacker() + + -- If no attacker do nothing + if not attacker then return end + + local player_attacker = nil + + -- get the attacking player + if IsPlayer(attacker) then + attacker = CastToPlayer(attacker) + player_attacker = attacker + elseif IsSentrygun(attacker) then + attacker = CastToSentrygun(attacker) + player_attacker = attacker:GetOwner() + elseif IsDetpack(attacker) then + attacker = CastToDetpack(attacker) + player_attacker = attacker:GetOwner() + elseif IsDispenser(attacker) then + attacker = CastToDispenser(attacker) + player_attacker = attacker:GetOwner() + else + return + end + + -- if still no attacking player after all that, forget about it + if not player_attacker then return end + + -- If player killed self or teammate do nothing + if (player:GetId() == player_attacker:GetId()) or (player:GetTeamId() == player_attacker:GetTeamId()) then + return + end + + -- If player is an attacker, then do stuff + if player:GetTeamId() == attackers then + -- Check if he's in the cap point + for playerx in zone_collection.items do + playerx = CastToPlayer(playerx) + + if playerx:GetId() == player:GetId() then + if (damage > 100) then damage = 100 end + player_attacker:AddFortPoints( damage, "Protecting the Point" ) + return + end + end + + end + +end + +----------------------------------------------------------------------------- +-- on cap +----------------------------------------------------------------------------- + +function zone_cap( cap_phase ) + zone_collection:RemoveAllItems() + zone_turnoff( phase ) + + zone_points = 0 + + -- reset touches + for playerx, recordx in pairs(playerTouchedTable) do + if GetPlayerByID( playerx ) then + local playert = GetPlayerByID( playerx ) + if ( playert:GetTeamId() == attackers ) then + -- add to table and reset touched to 0 + playerTouchedTable[playert:GetId()] = {touched = false, allowed = true} + end + end + end + + draw_hud = false + + if phase == NUMBER_OF_CAP_POINTS then + onreset_outputs() + -- it's the last round. end and stuff + phase = 1 + -- run custom round reset stuff + AddSchedule( "onroundreset_sched", DELAY_BEFORE_TEAMSWITCH, onroundreset ) + else + oncap_outputs() + phase = phase + 1 + AddSchedule( "aftercap_sched", DELAY_AFTER_CAP, oncap_outputs_nextphase ) + + + AddSchedule( "aftercap_sched2", DELAY_AFTER_CAP, oncap_nextphase ) + end + + update_zone_all( ) + +end + + +----------------------------------------------------------------------------- +-- round functions +----------------------------------------------------------------------------- + +-- Opens the gates and schedules the round's end. +function round_start() + -- Opens the gates and all that lovely stuff + OpenDoor("frontgate") + BroadCastMessage( "#FF_AD_GATESOPEN" ) + BroadCastSound( "otherteam.flagstolen" ) + SpeakAll( "AD_GATESOPEN" ) + + openstartdoor() +end + +-- Checks to see if it's the first or second round, then either swaps teams, or ends the game. +function onroundreset() + + if attackers == Team.kBlue then + attackers = Team.kRed + defenders = Team.kBlue + + onswitch_bluetodef() + else + attackers = Team.kBlue + defenders = Team.kRed + + onswitch_redtodef() + end + + -- objective icon + UpdateTeamObjectiveIcon( GetTeam(attackers), nil ) + UpdateTeamObjectiveIcon( GetTeam(defenders), nil ) + + -- switch them team names + SetTeamName( attackers, "Attackers" ) + SetTeamName( defenders, "Defenders" ) + + -- reset them limits + team = GetTeam(defenders) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, -1) + team:SetClassLimit(Player.kMedic, -1) + + team = GetTeam(attackers) + team:SetClassLimit(Player.kCivilian, -1) + team:SetClassLimit(Player.kScout, 0) + team:SetClassLimit(Player.kMedic, 0) + + -- reset schedules + AddSchedule( "round_start", INITIAL_ROUND_PERIOD, round_start) + + -- reset player touched table + playerTouchedTable = {} + -- remove all leftovers from the cap point collection + zone_collection:RemoveAllItems() + -- respawn the players + RespawnAllPlayers() + + -- MORE scheduled message loveliness. + if INITIAL_ROUND_PERIOD > 30 then AddSchedule( "dooropen30sec" , INITIAL_ROUND_PERIOD - 30 , schedulemessagetoall, "#ADZ_30SecWarning" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10sec" , INITIAL_ROUND_PERIOD - 10 , schedulemessagetoall, "#ADZ_10SecWarning" ) end + + -- sounds + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen30secsound" , INITIAL_ROUND_PERIOD - 30 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 10 then AddSchedule( "dooropen10secsound" , INITIAL_ROUND_PERIOD - 10 , schedulesound, "misc.bloop" ) end + if INITIAL_ROUND_PERIOD > 5 then AddSchedule( "dooropen5seccount" , INITIAL_ROUND_PERIOD - 5 , schedulecountdown, 5 ) end + if INITIAL_ROUND_PERIOD > 4 then AddSchedule( "dooropen4seccount" , INITIAL_ROUND_PERIOD - 4 , schedulecountdown, 4 ) end + if INITIAL_ROUND_PERIOD > 3 then AddSchedule( "dooropen3seccount" , INITIAL_ROUND_PERIOD - 3 , schedulecountdown, 3 ) end + if INITIAL_ROUND_PERIOD > 2 then AddSchedule( "dooropen2seccount" , INITIAL_ROUND_PERIOD - 2 , schedulecountdown, 2 ) end + if INITIAL_ROUND_PERIOD > 1 then AddSchedule( "dooropen1seccount" , INITIAL_ROUND_PERIOD - 1 , schedulecountdown, 1 ) end + + DeleteSchedule( "defense_period_scoring_sched" ) + AddScheduleRepeating( "defense_period_scoring_sched", DEFENSE_PERIOD_TIME, defenders_scoring ) + + draw_hud = true + update_zone_all( ) + + onswitch() +end + + +----------------------------------------------------------------------------- +-- zone functions +----------------------------------------------------------------------------- + +function zone_turnon( cp_num ) + zone_on_outputs() + + -- init scoring + AddSchedule( "period_init", DELAY_BEFORE_PERIOD_POINTS, init_scoring, team ) + AddSchedule( "period_init_alarm", DELAY_BEFORE_PERIOD_POINTS - 1, init_scoring_alarm ) +end +function zone_turnoff( cp_num ) + zone_off_outputs() + + -- stop scoring + zone_scoring = false +end +function oncap_nextphase() + draw_hud = true + update_zone_all( ) + + -- update objective icon + local attackers_objective = GetEntityByName( "zone"..phase ) + UpdateTeamObjectiveIcon( GetTeam(attackers), attackers_objective ) + UpdateTeamObjectiveIcon( GetTeam(defenders), nil ) +end + +----------------------------------------------------------------------------- +-- output functions +----------------------------------------------------------------------------- + +function zone_on_outputs() + return +end +function zone_off_outputs() + return +end +function onswitch_bluetodef() + return +end +function onswitch_redtodef() + return +end +function onswitch() + return +end +function openstartdoor() + return +end +function oncap_outputs() + return +end +function oncap_outputs_nextphase() + return +end +function onreset_outputs() + return +end + +----------------------------------------------------------------------------- +-- hud +----------------------------------------------------------------------------- + +function update_zone_all( ) + + RemoveHudItemFromAll( "Zone_Status" ) + RemoveHudItemFromAll( "Zone_Status_BG" ) + RemoveHudItemFromAll( "Zone_Status_Points" ) + RemoveHudItemFromAll( "Zone_Team"..attackers ) + RemoveHudItemFromAll( "Zone_Team"..defenders ) + RemoveHudItemFromAll( "Zone_Team_Text"..attackers ) + RemoveHudItemFromAll( "Zone_Team_Text"..defenders ) + + if draw_hud then + AddHudIconToAll( "hud_statusbar_256.vtf", "Zone_Status_BG", -64, 36, 128, 16, 3 ) + AddHudTextToTeam( GetTeam(attackers), "Zone_Team_Text"..attackers, "Attacking Zone "..phase, 33, 56, 4, 0 ) + AddHudTextToTeam( GetTeam(defenders), "Zone_Team_Text"..defenders, "Defending Zone "..phase, 33, 56, 4, 0 ) + AddHudTextToAll( "Zone_Status_Points", zone_points.." / "..zone_max_points, 40, 56, 2, 0 ) + + AddHudIconToTeam( GetTeam(attackers), "hud_offense.vtf", "Zone_Team"..attackers, -92, 38, 24, 24, 3 ) + AddHudIconToTeam( GetTeam(defenders), "hud_defense.vtf", "Zone_Team"..defenders, -92, 38, 24, 24, 3 ) + + local max_width = 124 + if zone_points > 0 then + + bar_width = zone_points / zone_max_points * max_width + + if zone_collection:Count() > 0 then + AddHudIconToAll( "hud_statusbar_"..ZONE_COLOR.."_active.vtf", "Zone_Status", -62, 36, bar_width, 16, 3 ) + else + AddHudIconToAll( "hud_statusbar_"..ZONE_COLOR..".vtf", "Zone_Status", -62, 36, bar_width, 16, 3 ) + end + + end + end +end + +function update_zone_player( player ) + RemoveHudItem( player, "Zone_Status" ) + RemoveHudItem( player, "Zone_Status_BG" ) + RemoveHudItem( player, "Zone_Status_Points" ) + RemoveHudItem( player, "Zone_Team"..attackers ) + RemoveHudItem( player, "Zone_Team"..defenders ) + RemoveHudItem( player, "Zone_Team_Text"..attackers ) + RemoveHudItem( player, "Zone_Team_Text"..defenders ) + + if draw_hud then + AddHudIcon( player, "hud_statusbar_256.vtf", "Zone_Status_BG", -64, 36, 128, 16, 3 ) + AddHudText( player, "Zone_Status_Points", zone_points.." / "..zone_max_points, 40, 56, 2, 0 ) + + if player:GetTeamId() == attackers then + AddHudIcon( player, "hud_offense.vtf", "Zone_Team"..attackers, -92, 38, 24, 24, 3 ) + AddHudText( player, "Zone_Team_Text"..attackers, "Attacking Zone "..phase, 33, 56, 4, 0 ) + else + AddHudIcon( player, "hud_defense.vtf", "Zone_Team"..defenders, -92, 38, 24, 24, 3 ) + AddHudText( player, "Zone_Team_Text"..defenders, "Defending Zone "..phase, 33, 56, 4, 0 ) + end + + local max_width = 124 + if zone_points > 0 then + + bar_width = zone_points / zone_max_points * max_width + + if zone_collection:Count() > 0 then + AddHudIcon( player, "hud_statusbar_"..ZONE_COLOR.."_active.vtf", "Zone_Status", -62, 36, bar_width, 16, 3 ) + else + AddHudIcon( player, "hud_statusbar_"..ZONE_COLOR..".vtf", "Zone_Status", -62, 36, bar_width, 16, 3 ) + end + + end + end +end + +----------------------------------------------------------------------------- +-- base_zone_trigger +----------------------------------------------------------------------------- + +-- capture room +base_zone_trigger = trigger_ff_script:new({ phase = 0, pointstocap = DEFAULT_POINTS_TO_CAP }) + +zone1 = base_zone_trigger:new({phase=1}) +zone2 = base_zone_trigger:new({phase=2}) +zone3 = base_zone_trigger:new({phase=3}) +zone4 = base_zone_trigger:new({phase=4}) +zone5 = base_zone_trigger:new({phase=5}) +zone6 = base_zone_trigger:new({phase=6}) +zone7 = base_zone_trigger:new({phase=7}) +zone8 = base_zone_trigger:new({phase=8}) + +-- registers attackers as they enter the cap room +function base_zone_trigger:ontouch( trigger_entity ) + if IsPlayer( trigger_entity ) then + + local player = CastToPlayer( trigger_entity ) + + if phase ~= self.phase then return end + if player:GetTeamId() == defenders then return end + + player:SetCloakable( false ) + player:SetDisguisable( false ) + + update_zone_all( ) + + local playerid = player:GetId() + zone_collection:AddItem( player ) + + local team = GetTeam(attackers) + -- if it's the first touch, give points and stuff + if playerTouchedTable[playerid].touched == false then + team:AddScore( POINTS_PER_INITIAL_TOUCH ) + player:AddFortPoints( FORT_POINTS_PER_INITIAL_TOUCH, "Initial Point Touch" ) + + zone_points = zone_points + POINTS_PER_INITIAL_TOUCH + update_zone_all( ) + + if zone_points >= self.pointstocap then + zone_cap( self.phase ) + return + end + + SmartTeamSound( GetTeam(defenders), "yourteam.flagreturn", "misc.doop" ) + + playerTouchedTable[playerid].touched = true + + elseif zone_collection:Count() == 1 then + SmartTeamSound( GetTeam(defenders), "otherteam.drop", nil ) + end + if zone_collection:Count() == 1 then + -- activate the cap point, bro + update_zone_all( ) + zone_turnon( self.phase ) + end + + end +end + +-- deregisters attackers as they enter the cap room. Checks to see if all attackers have left. +function base_zone_trigger:onendtouch( trigger_entity ) + + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + if player:GetTeamId() == defenders then return end + + player:SetCloakable( true ) + player:SetDisguisable( true ) + + zone_collection:RemoveItem( player ) + + local team = GetTeam(defenders) + if zone_collection:Count() == 0 then + update_zone_all( ) + zone_turnoff( self.phase ) + end + end +end + +-- empties the collection if no-one in in the room. Shouldn't really be nessecary. +function base_zone_trigger:oninactive() + -- Clear out the flags in the collection + DeleteSchedule( "period_scoring" ) + DeleteSchedule( "period_init" ) + DeleteSchedule( "period_init_alarm" ) + zone_collection:RemoveAllItems() + update_zone_status( false ) + zone_turnoff( self.phase ) +end + +----------------------------------------------------------------------------- +-- scoring +----------------------------------------------------------------------------- + +-- Adds points based on time inside cap room and number of attackers inside cap room +function period_scoring( ) + if zone_scoring then + local team = GetTeam( attackers ) + team:AddScore( POINTS_PER_PERIOD ) + zone_points = zone_points + POINTS_PER_PERIOD + update_zone_all( ) + SmartTeamSound( GetTeam(defenders), "yourteam.flagreturn", "misc.doop" ) + + for player in zone_collection.items do + player = CastToPlayer(player) + + if player ~= nil then + player:AddFortPoints( FORT_POINTS_PER_PERIOD, "Touching the Point" ) + else + ConsoleToAll("LUA ERROR: player_addfortpoints: Unable to find player") + end + end + end + -- cap zone if the points say to + if zone_points >= zone_max_points then + zone_cap( phase ) + end +end + +-- Initializes the period_scoring (allows for a delay after initial touch) +function init_scoring( team ) + if zone_collection:Count() > 0 then + zone_scoring = true + end +end + +-- Initializes the period_scoring (allows for a delay after initial touch) +function init_scoring_alarm( ) + if zone_collection:Count() > 0 then + SmartTeamSound( GetTeam(defenders), "otherteam.drop", nil ) + end +end + +-- Adds points based on time inside cap room and number of attackers inside cap room +function defenders_scoring( ) + local team = GetTeam( defenders ) + team:AddScore( POINTS_PER_DEFENSE_PERIOD ) +end + +----------------------------------------------------------------------------- +-- misc functions +----------------------------------------------------------------------------- + +-- Sends a message to all after the determined time +function schedulechangemessage( player, message ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + BroadCastMessageToPlayer( player, message ) + end +end + +-- reset everything +function RespawnAllPlayers() + ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips, AT.kAllowRespawn, AT.kReturnDroppedItems }) +end + +-- force a scout/med to switch to soli if they haven't +function forcechange( player ) + if (player:GetClass() == Player.kScout or player:GetClass() == Player.kMedic) and (player:GetTeamId() == defenders) then + ApplyToPlayer( player, { AT.kChangeClassSoldier, AT.kRespawnPlayers } ) + end +end + +-- Sends a message to all after the determined time +function schedulemessagetoall( message ) + BroadCastMessage( message ) +end + +-- Plays a sound to all after the determined time +function schedulesound( sound ) + BroadCastSound( sound ) +end + + +function schedulecountdown( time ) + BroadCastMessage( ""..time.."" ) + SpeakAll( "AD_" .. time .. "SEC" ) +end + +----------------------------------------------------------------------------- +-- Entity definitions (flags/command points/backpacks etc.) +----------------------------------------------------------------------------- + +-- respawns +base_attacker_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == attackers and phase == self.phase +end }) +base_defender_spawn = info_ff_teamspawn:new({ phase = 0, validspawn = function(self,player) + return player:GetTeamId() == defenders and phase == self.phase +end }) +zone1_attacker = base_attacker_spawn:new({phase=1}) +zone2_attacker = base_attacker_spawn:new({phase=2}) +zone3_attacker = base_attacker_spawn:new({phase=3}) +zone4_attacker = base_attacker_spawn:new({phase=4}) +zone5_attacker = base_attacker_spawn:new({phase=5}) +zone6_attacker = base_attacker_spawn:new({phase=6}) +zone7_attacker = base_attacker_spawn:new({phase=7}) +zone8_attacker = base_attacker_spawn:new({phase=8}) +zone1_defender = base_defender_spawn:new({phase=1}) +zone2_defender = base_defender_spawn:new({phase=2}) +zone3_defender = base_defender_spawn:new({phase=3}) +zone4_defender = base_defender_spawn:new({phase=4}) +zone5_defender = base_defender_spawn:new({phase=5}) +zone6_defender = base_defender_spawn:new({phase=6}) +zone7_defender = base_defender_spawn:new({phase=7}) +zone8_defender = base_defender_spawn:new({phase=8}) + +-- generic respawns +attacker_spawn = info_ff_teamspawn:new({ validspawn = function(self,player) + return player:GetTeamId() == attackers +end }) +defender_spawn = info_ff_teamspawn:new({ validspawn = function(self,player) + return player:GetTeamId() == defenders +end }) + +----------------------------------------------------------------------------- +-- Generic Backpack +----------------------------------------------------------------------------- +genericbackpack = info_ff_script:new({ + health = 0, + armor = 0, + grenades = 0, + shells = 0, + nails = 0, + rockets = 0, + cells = 0, + detpacks = 0, + mancannons = 0, + gren1 = 0, + gren2 = 0, + respawntime = 5, + model = "models/items/healthkit.mdl", + materializesound = "Item.Materialize", + touchsound = "HealthKit.Touch", + notallowedmsg = "#FF_NOTALLOWEDPACK", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen} +}) + +function genericbackpack:dropatspawn() return false end + +function genericbackpack:precache( ) + -- precache sounds + PrecacheSound(self.materializesound) + PrecacheSound(self.touchsound) + + -- precache models + PrecacheModel(self.model) +end + +function genericbackpack:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + local dispensed = 0 + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then dispensed = dispensed + player:AddHealth( self.health ) end + if self.armor ~= nil and self.armor ~= 0 then dispensed = dispensed + player:AddArmor( self.armor ) end + + -- give player ammo + if self.nails ~= nil and self.nails ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren2, self.gren2) end + + -- if the player took ammo, then have the backpack respawn with a delay + if dispensed >= 1 then + local backpack = CastToInfoScript(entity); + if backpack then + backpack:EmitSound(self.touchsound); + backpack:Respawn(self.respawntime); + end + end + end +end + +function genericbackpack:materialize( ) + entity:EmitSound(self.materializesound) +end + +-- from http://www.lua.org/pil/14.1.html +function getfield (f) + local v = _G -- start with the table of globals + for w in string.gfind(f, "[%w_]+") do + v = v[w] + end + return v +end +function setfield (f, v) + local t = _G -- start with the table of globals + for w, d in string.gfind(f, "([%w_]+)(.?)") do + if d == "." then -- not last field? + t[w] = t[w] or {} -- create table if absent + t = t[w] -- get the table + else -- last field + t[w] = v -- do the assignment + end + end +end diff --git a/maps/includes/base_location.lua b/maps/includes/base_location.lua new file mode 100644 index 0000000..f62ff39 --- /dev/null +++ b/maps/includes/base_location.lua @@ -0,0 +1,222 @@ + +-- base_location.lua + +----------------------------------------------------------------------------- +-- Include this file to add base location functionality to your map +-- DO NOT ALTER THIS FILE +----------------------------------------------------------------------------- +location_info = trigger_ff_script:new({ text = "Unknown", team = Team.kUnassigned }) + +function location_info:ontouch( touch_entity ) + + -- set the location of the player + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + player:SetLocation(entity:GetId(), self.text, self.team) + end +end + +-- Locations were randomly screwing up when you move between them. I removed this and it appears to have completely fixed it. +-- I am not familiar with all this though, so someone who knows btr should check it over please (caesium). +--function location_info:onendtouch( touch_entity ) + -- remove the location from the player +-- if IsPlayer( touch_entity ) then +-- local player = CastToPlayer( touch_entity ) +-- player:RemoveLocation(entity:GetId()) +-- end +--end + +----------------------------------------------------------------------------- +-- Some common locations +-- PREFIX locations with the word "location_" (or just follow the same style as below!) +----------------------------------------------------------------------------- +location_attic = location_info:new({ text = "#FF_LOCATION_ATTIC", team = Team.kUnassigned }) +location_blue_attic = location_info:new({ text = "#FF_LOCATION_ATTIC", team = Team.kBlue }) +location_red_attic = location_info:new({ text = "#FF_LOCATION_ATTIC", team = Team.kRed }) +location_yellow_attic = location_info:new({ text = "#FF_LOCATION_ATTIC", team = Team.kYellow }) +location_green_attic = location_info:new({ text = "#FF_LOCATION_ATTIC", team = Team.kGreen }) + +location_base = location_info:new({ text = "#FF_LOCATION_BASE", team = Team.kUnassigned }) +location_blue_base = location_info:new({ text = "#FF_LOCATION_BASE", team = Team.kBlue }) +location_red_base = location_info:new({ text = "#FF_LOCATION_BASE", team = Team.kRed }) +location_yellow_base = location_info:new({ text = "#FF_LOCATION_BASE", team = Team.kYellow }) +location_green_base = location_info:new({ text = "#FF_LOCATION_BASE", team = Team.kGreen }) + +location_balcony = location_info:new({ text = "#FF_LOCATION_BALCONY", team = Team.kUnassigned }) +location_blue_balcony = location_info:new({ text = "#FF_LOCATION_BALCONY", team = Team.kBlue }) +location_red_balcony = location_info:new({ text = "#FF_LOCATION_BALCONY", team = Team.kRed }) +location_yellow_balcony = location_info:new({ text = "#FF_LOCATION_BALCONY", team = Team.kYellow }) +location_green_balcony = location_info:new({ text = "#FF_LOCATION_BALCONY", team = Team.kGreen }) + +location_battlements = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kUnassigned }) +location_blue_battlements = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kBlue }) +location_red_battlements = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kRed }) +location_yellow_battlements = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kYellow }) +location_green_battlements = location_info:new({ text = "#FF_LOCATION_BATTLEMENTS", team = Team.kGreen }) + +location_bunker = location_info:new({ text = "#FF_LOCATION_BUNKER", team = Team.kUnassigned }) +location_blue_bunker = location_info:new({ text = "#FF_LOCATION_BUNKER", team = Team.kBlue }) +location_red_bunker = location_info:new({ text = "#FF_LOCATION_BUNKER", team = Team.kRed }) +location_yellow_bunker = location_info:new({ text = "#FF_LOCATION_BUNKER", team = Team.kYellow }) +location_green_bunker = location_info:new({ text = "#FF_LOCATION_BUNKER", team = Team.kGreen }) + +location_button = location_info:new({ text = "#FF_LOCATION_BUTTON", team = Team.kUnassigned }) +location_blue_button = location_info:new({ text = "#FF_LOCATION_BUTTON", team = Team.kBlue }) +location_red_button = location_info:new({ text = "#FF_LOCATION_BUTTON", team = Team.kRed }) +location_yellow_button = location_info:new({ text = "#FF_LOCATION_BUTTON", team = Team.kYellow }) +location_green_button = location_info:new({ text = "#FF_LOCATION_BUTTON", team = Team.kGreen }) + +location_cappoint = location_info:new({ text = "#FF_LOCATION_CAPPOINT", team = Team.kUnassigned }) +location_blue_cappoint = location_info:new({ text = "#FF_LOCATION_CAPPOINT", team = Team.kBlue }) +location_red_cappoint = location_info:new({ text = "#FF_LOCATION_CAPPOINT", team = Team.kRed }) +location_yellow_cappoint = location_info:new({ text = "#FF_LOCATION_CAPPOINT", team = Team.kYellow }) +location_green_cappoint = location_info:new({ text = "#FF_LOCATION_CAPPOINT", team = Team.kGreen }) + +location_elevator = location_info:new({ text = "#FF_LOCATION_ELEVATOR", team = Team.kUnassigned }) +location_blue_elevator = location_info:new({ text = "#FF_LOCATION_ELEVATOR", team = Team.kBlue }) +location_red_elevator = location_info:new({ text = "#FF_LOCATION_ELEVATOR", team = Team.kRed }) +location_yellow_elevator = location_info:new({ text = "#FF_LOCATION_ELEVATOR", team = Team.kYellow }) +location_green_elevator = location_info:new({ text = "#FF_LOCATION_ELEVATOR", team = Team.kGreen }) + +location_flagroom = location_info:new({ text = "#FF_LOCATION_FLAGROOM", team = Team.kUnassigned }) +location_blue_flagroom = location_info:new({ text = "#FF_LOCATION_FLAGROOM", team = Team.kBlue }) +location_red_flagroom = location_info:new({ text = "#FF_LOCATION_FLAGROOM", team = Team.kRed }) +location_yellow_flagroom = location_info:new({ text = "#FF_LOCATION_FLAGROOM", team = Team.kYellow }) +location_green_flagroom = location_info:new({ text = "#FF_LOCATION_FLAGROOM", team = Team.kGreen }) + +location_frontdoor = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kUnassigned }) +location_blue_frontdoor = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kBlue }) +location_red_frontdoor = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kRed }) +location_yellow_frontdoor = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kYellow }) +location_green_frontdoor = location_info:new({ text = "#FF_LOCATION_FRONTDOOR", team = Team.kGreen }) + +location_lift = location_info:new({ text = "#FF_LOCATION_LIFT", team = Team.kUnassigned }) +location_blue_lift = location_info:new({ text = "#FF_LOCATION_LIFT", team = Team.kBlue }) +location_red_lift = location_info:new({ text = "#FF_LOCATION_LIFT", team = Team.kRed }) +location_yellow_lift = location_info:new({ text = "#FF_LOCATION_LIFT", team = Team.kYellow }) +location_green_lift = location_info:new({ text = "#FF_LOCATION_LIFT", team = Team.kGreen }) + +location_loft = location_info:new({ text = "#FF_LOCATION_LOFT", team = Team.kUnassigned }) +location_blue_loft = location_info:new({ text = "#FF_LOCATION_LOFT", team = Team.kBlue }) +location_red_loft = location_info:new({ text = "#FF_LOCATION_LOFT", team = Team.kRed }) +location_yellow_loft = location_info:new({ text = "#FF_LOCATION_LOFT", team = Team.kYellow }) +location_green_loft = location_info:new({ text = "#FF_LOCATION_LOFT", team = Team.kGreen }) + +location_pit = location_info:new({ text = "#FF_LOCATION_PIT", team = Team.kUnassigned }) +location_blue_pit = location_info:new({ text = "#FF_LOCATION_PIT", team = Team.kBlue }) +location_red_pit = location_info:new({ text = "#FF_LOCATION_PIT", team = Team.kRed }) +location_yellow_pit = location_info:new({ text = "#FF_LOCATION_PIT", team = Team.kYellow }) +location_green_pit = location_info:new({ text = "#FF_LOCATION_PIT", team = Team.kGreen }) + +location_plank = location_info:new({ text = "#FF_LOCATION_PLANK", team = Team.kUnassigned }) +location_blue_plank = location_info:new({ text = "#FF_LOCATION_PLANK", team = Team.kBlue }) +location_red_plank = location_info:new({ text = "#FF_LOCATION_PLANK", team = Team.kRed }) +location_yellow_plank = location_info:new({ text = "#FF_LOCATION_PLANK", team = Team.kYellow }) +location_green_plank = location_info:new({ text = "#FF_LOCATION_PLANK", team = Team.kGreen }) + +location_ramp = location_info:new({ text = "#FF_LOCATION_RAMP", team = Team.kUnassigned }) +location_blue_ramp = location_info:new({ text = "#FF_LOCATION_RAMP", team = Team.kBlue }) +location_red_ramp = location_info:new({ text = "#FF_LOCATION_RAMP", team = Team.kRed }) +location_yellow_ramp = location_info:new({ text = "#FF_LOCATION_RAMP", team = Team.kYellow }) +location_green_ramp = location_info:new({ text = "#FF_LOCATION_RAMP", team = Team.kGreen }) + +location_ramp_bottom = location_info:new({ text = "#FF_LOCATION_RAMP_BOTTOM", team = Team.kUnassigned }) +location_blue_ramp_bottom = location_info:new({ text = "#FF_LOCATION_RAMP_BOTTOM", team = Team.kBlue }) +location_red_ramp_bottom = location_info:new({ text = "#FF_LOCATION_RAMP_BOTTOM", team = Team.kRed }) +location_yellow_ramp_bottom = location_info:new({ text = "#FF_LOCATION_RAMP_BOTTOM", team = Team.kYellow }) +location_green_ramp_bottom = location_info:new({ text = "#FF_LOCATION_RAMP_BOTTOM", team = Team.kGreen }) + +location_ramp_top = location_info:new({ text = "#FF_LOCATION_RAMP_TOP", team = Team.kUnassigned }) +location_blue_ramp_top = location_info:new({ text = "#FF_LOCATION_RAMP_TOP", team = Team.kBlue }) +location_red_ramp_top = location_info:new({ text = "#FF_LOCATION_RAMP_TOP", team = Team.kRed }) +location_yellow_ramp_top = location_info:new({ text = "#FF_LOCATION_RAMP_TOP", team = Team.kYellow }) +location_green_ramp_top = location_info:new({ text = "#FF_LOCATION_RAMP_TOP", team = Team.kGreen }) + +location_ramproom = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kUnassigned }) +location_blue_ramproom = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kBlue }) +location_red_ramproom = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kRed }) +location_yellow_ramproom = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kYellow }) +location_green_ramproom = location_info:new({ text = "#FF_LOCATION_RAMPROOM", team = Team.kGreen }) + +location_respawn = location_info:new({ text = "#FF_LOCATION_RESPAWN", team = Team.kUnassigned }) +location_blue_respawn = location_info:new({ text = "#FF_LOCATION_RESPAWN", team = Team.kBlue }) +location_red_respawn = location_info:new({ text = "#FF_LOCATION_RESPAWN", team = Team.kRed }) +location_yellow_respawn = location_info:new({ text = "#FF_LOCATION_RESPAWN", team = Team.kYellow }) +location_green_respawn = location_info:new({ text = "#FF_LOCATION_RESPAWN", team = Team.kGreen }) + +location_roof = location_info:new({ text = "#FF_LOCATION_ROOF", team = Team.kUnassigned }) +location_blue_roof = location_info:new({ text = "#FF_LOCATION_ROOF", team = Team.kBlue }) +location_red_roof = location_info:new({ text = "#FF_LOCATION_ROOF", team = Team.kRed }) +location_yellow_roof = location_info:new({ text = "#FF_LOCATION_ROOF", team = Team.kYellow }) +location_green_roof = location_info:new({ text = "#FF_LOCATION_ROOF", team = Team.kGreen }) + +location_security = location_info:new({ text = "#FF_LOCATION_SECURITY", team = Team.kUnassigned }) +location_blue_security = location_info:new({ text = "#FF_LOCATION_SECURITY", team = Team.kBlue }) +location_red_security = location_info:new({ text = "#FF_LOCATION_SECURITY", team = Team.kRed }) +location_yellow_security = location_info:new({ text = "#FF_LOCATION_SECURITY", team = Team.kYellow }) +location_green_security = location_info:new({ text = "#FF_LOCATION_SECURITY", team = Team.kGreen }) + +location_sniper_perch = location_info:new({ text = "#FF_LOCATION_SNIPER_PERCH", team = Team.kUnassigned }) +location_blue_sniper_perch = location_info:new({ text = "#FF_LOCATION_SNIPER_PERCH", team = Team.kBlue }) +location_red_sniper_perch = location_info:new({ text = "#FF_LOCATION_SNIPER_PERCH", team = Team.kRed }) +location_yellow_sniper_perch = location_info:new({ text = "#FF_LOCATION_SNIPER_PERCH", team = Team.kYellow }) +location_green_sniper_perch = location_info:new({ text = "#FF_LOCATION_SNIPER_PERCH", team = Team.kGreen }) + +location_spiral = location_info:new({ text = "#FF_LOCATION_SPIRAL", team = Team.kUnassigned }) +location_blue_spiral = location_info:new({ text = "#FF_LOCATION_SPIRAL", team = Team.kBlue }) +location_red_spiral = location_info:new({ text = "#FF_LOCATION_SPIRAL", team = Team.kRed }) +location_yellow_spiral = location_info:new({ text = "#FF_LOCATION_SPIRAL", team = Team.kYellow }) +location_green_spiral = location_info:new({ text = "#FF_LOCATION_SPIRAL", team = Team.kGreen }) + +location_switch = location_info:new({ text = "#FF_LOCATION_SWITCH", team = Team.kUnassigned }) +location_blue_switch = location_info:new({ text = "#FF_LOCATION_SWITCH", team = Team.kBlue }) +location_red_switch = location_info:new({ text = "#FF_LOCATION_SWITCH", team = Team.kRed }) +location_yellow_switch = location_info:new({ text = "#FF_LOCATION_SWITCH", team = Team.kYellow }) +location_green_switch = location_info:new({ text = "#FF_LOCATION_SWITCH", team = Team.kGreen }) + +location_t = location_info:new({ text = "#FF_LOCATION_T", team = Team.kUnassigned }) +location_blue_t = location_info:new({ text = "#FF_LOCATION_T", team = Team.kBlue }) +location_red_t = location_info:new({ text = "#FF_LOCATION_T", team = Team.kRed }) +location_yellow_t = location_info:new({ text = "#FF_LOCATION_T", team = Team.kYellow }) +location_green_t = location_info:new({ text = "#FF_LOCATION_T", team = Team.kGreen }) + +location_train_tunnel = location_info:new({ text = "#FF_LOCATION_TRAIN_TUNNEL", team = Team.kUnassigned }) +location_blue_train_tunnel = location_info:new({ text = "#FF_LOCATION_TRAIN_TUNNEL", team = Team.kBlue }) +location_red_train_tunnel = location_info:new({ text = "#FF_LOCATION_TRAIN_TUNNEL", team = Team.kRed }) +location_yellow_train_tunnel = location_info:new({ text = "#FF_LOCATION_TRAIN_TUNNEL", team = Team.kYellow }) +location_green_train_tunnel = location_info:new({ text = "#FF_LOCATION_TRAIN_TUNNEL", team = Team.kGreen }) + +location_underground = location_info:new({ text = "#FF_LOCATION_UNDERGROUND", team = Team.kUnassigned }) +location_blue_underground = location_info:new({ text = "#FF_LOCATION_UNDERGROUND", team = Team.kBlue }) +location_red_underground = location_info:new({ text = "#FF_LOCATION_UNDERGROUND", team = Team.kRed }) +location_yellow_underground = location_info:new({ text = "#FF_LOCATION_UNDERGROUND", team = Team.kYellow }) +location_green_underground = location_info:new({ text = "#FF_LOCATION_UNDERGROUND", team = Team.kGreen }) + +location_waterroute = location_info:new({ text = "#FF_LOCATION_WATERROUTE", team = Team.kUnassigned }) +location_blue_waterroute = location_info:new({ text = "#FF_LOCATION_WATERROUTE", team = Team.kBlue }) +location_red_waterroute = location_info:new({ text = "#FF_LOCATION_WATERROUTE", team = Team.kRed }) +location_yellow_waterroute = location_info:new({ text = "#FF_LOCATION_WATERROUTE", team = Team.kYellow }) +location_green_waterroute = location_info:new({ text = "#FF_LOCATION_WATERROUTE", team = Team.kGreen }) + +location_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kUnassigned }) +location_blue_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kBlue }) +location_red_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kRed }) +location_yellow_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kYellow }) +location_green_yard = location_info:new({ text = "#FF_LOCATION_YARD", team = Team.kGreen }) + +-- Generic Invade/Defend Locations + +location_attackerspawn = location_info:new({ text = "#FF_LOCATION_ATTACKER_SPAWN", team = Team.kUnassigned }) + +location_defenderspawn = location_info:new({ text = "#FF_LOCATION_DEFENDER_SPAWN", team = Team.kUnassigned }) + +location_commandpointone = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_ONE", team = Team.kUnassigned }) + +location_commandpointtwo = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_TWO", team = Team.kUnassigned }) + +location_commandpointthree = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_THREE", team = Team.kUnassigned }) + +location_commandpointfour = location_info:new({ text = "#FF_LOCATION_COMMAND_POINT_FOUR", team = Team.kUnassigned }) + +location_detpack_hole = location_info:new({ text = "#FF_LOCATION_DETPACK_HOLE", team = Team.kUnassigned }) + diff --git a/maps/includes/base_push.lua b/maps/includes/base_push.lua new file mode 100644 index 0000000..5618433 --- /dev/null +++ b/maps/includes/base_push.lua @@ -0,0 +1,351 @@ +-- base_push.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base_teamplay"); +IncludeScript("base_location"); +IncludeScript("base_respawnturret"); + +BALL_THROW_SPEED = 512; +BALL_RETURN_TIME = 120; + +----------------------------------------------------------------------------- +-- Some Global Stuff! +----------------------------------------------------------------------------- +function startup() + SetGameDescription( "Push" ) + + -- set up team limits on each team + SetPlayerLimit(Team.kBlue, 0) + SetPlayerLimit(Team.kRed, 0) + SetPlayerLimit(Team.kYellow, -1) + SetPlayerLimit(Team.kGreen, -1) + + -- push maps generally don't have civilians, so override in map LUA file if you want 'em + local team = GetTeam( Team.kBlue ) + team:SetClassLimit( Player.kCivilian, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + + local team = GetTeam( Team.kRed ) + team:SetClassLimit( Player.kCivilian, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) +end + +-- Give everyone a full resupply, but strip grenades +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 100 ) + player:AddArmor( 300 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) + player:AddAmmo( Ammo.kDetpack, 1 ) + player:AddAmmo( Ammo.kManCannon, 1 ) + + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) +end + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- backpacks +----------------------------------------------------------------------------- +push_backpack = genericbackpack:new({ + health = 25, + armor = 50, + touchsound = "ArmorKit.Touch", + respawntime = 10, + model = "models/items/backpack/backpack.mdl", + botgoaltype = Bot.kBackPack_Health +}) + +function push_backpack:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- base_ball +----------------------------------------------------------------------------- +base_ball = info_ff_script:new({ + name = "base ball", + team = Team.kUnassigned, + model = "models/items/ball/ball.mdl", + modelskin = 0, + tosssound = "Flag.Toss", + dropnotouchtime = 2, + capnotouchtime = 2, + hudicon = "hud_ball", + hudx = 5, + hudy = 210, + hudwidth = 48, + hudheight = 48, + hudalign = 1, + hudstatusiconbluex = 60, + hudstatusiconbluey = 5, + hudstatusiconredx = 60, + hudstatusiconredy = 5, + hudstatusiconblue = "hud_ball.vtf", + hudstatusiconred = "hud_ball.vtf", + hudstatusiconw = 15, + hudstatusiconh = 15, + hudstatusiconbluealign = 2, + hudstatusiconredalign = 3, + + touchflags = {AllowFlags.kOnlyPlayers, AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen}, + botgoaltype = Bot.kFlag +}) + +function base_ball:hasanimation() return true end + +-- For when this object is carried, these offsets are used to place +-- the info_ff_script relative to the players feet +function base_ball:attachoffset() + -- x = forward/backward + -- y = left/right + -- z = up/down + local offset = Vector( 32, 0, 0 ) + return offset +end + +function base_ball:precache() + PrecacheSound(self.tosssound) + PrecacheSound("yourteam.flagstolen") + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.drop") + PrecacheSound("otherteam.drop") + PrecacheSound("yourteam.flagreturn") + PrecacheSound("otherteam.flagreturn") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + info_ff_script.precache(self) +end + +function base_ball:spawn() + self.notouch = { } + info_ff_script.spawn(self) +end + +function base_ball:addnotouch(player_id, duration) + self.notouch[player_id] = duration + AddSchedule(self.name .. "-" .. player_id, duration, self.removenotouch, self, player_id) +end + +function base_ball.removenotouch(self, player_id) + self.notouch[player_id] = nil +end + +function base_ball:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + -- pickup if they can + if self.notouch[player:GetId()] then return; end + + if player:GetTeamId() ~= self.team then + -- let the teams know that the ball was picked up + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + SmartSpeak(player, "CTF_YOUHAVEBALL", "CTF_TEAMHASBALL", "CTF_ENEMYHASBALL") + SmartMessage(player, "#FF_YOUHAVEBALL", "#FF_TEAMHASBALL", "#FF_ENEMYHASBALL", Color.kGreen, Color.kGreen, Color.kRed) + + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + -- if the player is a spy, then force him to lose his cloak + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + local ball = CastToInfoScript(entity) + ball:Pickup(player) + AddHudIcon( player, self.hudicon, ball:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) + + + RemoveHudItemFromAll( "ball-icon-dropped" ) + local team = player:GetTeamId() + if (team == Team.kBlue) then + AddHudIconToAll( self.hudstatusiconblue, "ball-icon-blue", self.hudstatusiconbluex, self.hudstatusiconbluey, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconbluealign ) + elseif (team == Team.kRed) then + AddHudIconToAll( self.hudstatusiconred, "ball-icon-red", self.hudstatusiconredx, self.hudstatusiconredy, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconredalign ) + end + + end + end +end + +function base_ball:onownerdie( owner_entity ) + -- drop the ball + local ball = CastToInfoScript(entity) + ball:Drop(BALL_RETURN_TIME, 0.0) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, ball:GetName() ) + + local team = player:GetTeamId() + if (team == Team.kBlue) then + RemoveHudItemFromAll( "ball-icon-blue" ) + elseif (team == Team.kRed) then + RemoveHudItemFromAll( "ball-icon-red" ) + end + end +end +function base_ball:ownerfeign( owner_entity ) + -- drop the ball + local ball = CastToInfoScript(entity) + ball:Drop(BALL_RETURN_TIME, 0.0) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, ball:GetName() ) + local team = player:GetTeamId() + if (team == Team.kBlue) then + RemoveHudItemFromAll( "ball-icon-blue" ) + elseif (team == Team.kRed) then + RemoveHudItemFromAll( "ball-icon-red" ) + end + end +end +function base_ball:dropitemcmd( owner_entity ) + -- throw the ball + local ball = CastToInfoScript(entity) + ball:Drop(BALL_RETURN_TIME, BALL_THROW_SPEED) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, ball:GetName() ) + local team = player:GetTeamId() + if (team == Team.kBlue) then + RemoveHudItemFromAll( "ball-icon-blue" ) + elseif (team == Team.kRed) then + RemoveHudItemFromAll( "ball-icon-red" ) + end + end +end + +function base_ball:ondrop( owner_entity ) + if IsPlayer( owner_entity ) then + local player = CastToPlayer( owner_entity ) + -- let the teams know that the flag was dropped + SmartSound(player, "yourteam.drop", "yourteam.drop", "otherteam.drop") + SmartMessage(player, "#FF_YOUBALLDROP", "#FF_TEAMBALLDROP", "#FF_ENEMYBALLDROP", Color.kYellow, Color.kYellow, Color.kYellow) + end + + local ball = CastToInfoScript(entity) + ball:EmitSound(self.tosssound) +end + +function base_ball:onloseitem( owner_entity ) + if IsPlayer( owner_entity ) then + -- let the player that lost the ball put on a disguise + local player = CastToPlayer( owner_entity ) + player:SetDisguisable(true) + player:SetCloakable( true ) + + self:addnotouch(player:GetId(), self.capnotouchtime) + end +end + +function base_ball:onreturn( ) + -- let the teams know that the ball was returned + BroadCastMessage("#FF_BALLRETURN", Color.kYellow) + BroadCastSound ( "yourteam.flagreturn" ) + SpeakAll( "CTF_BALLRETURN" ) +end + +-- Define the ball +ball = base_ball:new({}) + +----------------------------------------------------------------------------- +-- Capture Points +----------------------------------------------------------------------------- +pushcap = trigger_ff_script:new({ + health = 100, + armor = 300, + grenades = 200, + nails = 200, + shells = 200, + rockets = 200, + cells = 200, + detpacks = 1, + mancannons = 1, + gren1 = 0, + gren2 = 0, + item = "", + team = Team.kUnassigned, + botgoaltype = Bot.kFlagCap +}) + +function pushcap:allowed ( allowed_entity ) + if IsPlayer( allowed_entity ) then + -- get the player and his team + local player = CastToPlayer( allowed_entity ) + + -- check if the player is on our team + if player:GetTeamId() ~= self.team then + return EVENT_DISALLOWED + end + + if player:HasItem( self.item ) then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +function pushcap:ontrigger( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- check if the player is carrying the ball + if player:HasItem( self.item ) then + + -- reward player for goal + player:AddFortPoints(FORTPOINTS_PER_CAPTURE, "#FF_FORTPOINTS_GOAL") + + -- reward player's team for capture + local team = player:GetTeam() + team:AddScore(POINTS_PER_CAPTURE) + + local ball = GetInfoScriptByName( "ball" ) + + -- return the ball + ball:Return() + + -- Remove any hud icons + RemoveHudItem( player, ball:GetName() ) + local team = player:GetTeamId() + if (team == Team.kBlue) then + RemoveHudItemFromAll( "ball-icon-blue" ) + elseif (team == Team.kRed) then + RemoveHudItemFromAll( "ball-icon-red" ) + end + + -- let the teams know that a capture occured + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") + SmartSpeak(player, "CTF_YOUSCORE", "CTF_TEAMSCORE", "CTF_THEYSCORE") + SmartMessage(player, "#FF_YOUSCORE", "#FF_TEAMSCORE", "#FF_ENEMYSCORE", Color.kGreen, Color.kGreen, Color.kRed) + + ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips }) + end + end +end + +-- declare the elements +red_cap = pushcap:new({ team = Team.kRed, item = "ball" }) +blue_cap = pushcap:new({ team = Team.kBlue, item = "ball" }) + +----------------------------------------------------------------------------- +-- Hurts +----------------------------------------------------------------------------- +hurt = trigger_ff_script:new({ team = Team.kUnassigned }) +function hurt:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +hurt_blue = hurt:new({ team = Team.kBlue }) +hurt_red = hurt:new({ team = Team.kRed }) diff --git a/maps/includes/base_respawnturret.lua b/maps/includes/base_respawnturret.lua new file mode 100644 index 0000000..54a0a22 --- /dev/null +++ b/maps/includes/base_respawnturret.lua @@ -0,0 +1,41 @@ + +-- base_turret handles some stuff for Respawn Turrets + +-- Custom target selection should be handled in your map's .lua +-- file and not this one (so please do not mess with this file)! + +---------------------------------------------------------------------------- +-- Team assigned Respawn Turrets target players, dispensers, and sentryguns +-- that are not on the Respawn Turrets team as well as players, dispensers, +-- and sentryguns that are not on a team that is allied to the Respawn +-- Turrets team +---------------------------------------------------------------------------- +base_respawnturret = baseclass:new({ team = Team.kUnassigned }) + +-- Note: GetObjectsTeam only works on players, dispensers, and sentryguns so +-- don't use it where an object could be anything except those 3 items + +-- Note: IsTeam1AlliedToTeam2 will return true if team1 is allied to team2 or +-- if team1 is the same as team2 + +function base_respawnturret:validtarget( target_entity ) + --local entity = GetEntity(ent_id) + return (AreTeamsAllied(self.team, target_entity:GetTeamId()) == false) +end + +-- Turrets, by default, have a 2 second delay after they +-- spot a target and before they're deployed (opened) +function base_respawnturret:deploydelay( target_entity ) return 2.0 end + +---------------------------------------------------------------------------- +-- Generic Respawn Turret assigned to no team. +---------------------------------------------------------------------------- +respawnturret = base_respawnturret:new({ team = Team.kUnassigned }) + +---------------------------------------------------------------------------- +-- Team assigned Respawn Turrets +---------------------------------------------------------------------------- +respawnturret_blue = base_respawnturret:new({ team = Team.kBlue }) +respawnturret_red = base_respawnturret:new({ team = Team.kRed }) +respawnturret_yellow = base_respawnturret:new({ team = Team.kYellow }) +respawnturret_green = base_respawnturret:new({ team = Team.kGreen }) diff --git a/maps/includes/base_shutdown.lua b/maps/includes/base_shutdown.lua new file mode 100644 index 0000000..0fe5510 --- /dev/null +++ b/maps/includes/base_shutdown.lua @@ -0,0 +1,193 @@ + +-- base_shutdown.lua + +----------------------------------------------------------------------------- +-- includes +----------------------------------------------------------------------------- +IncludeScript("base"); +IncludeScript("base_ctf"); +IncludeScript("base_teamplay"); +IncludeScript("base_location"); +IncludeScript("base_respawnturret"); + +----------------------------------------------------------------------------- +-- global overrides +----------------------------------------------------------------------------- +POINTS_PER_CAPTURE = 10; +FLAG_RETURN_TIME = 60; + +----------------------------------------------------------------------------- +-- Buttons +----------------------------------------------------------------------------- + +-- base button stuff (common functionality) +button_common = func_button:new({ team = Team.kUnassigned }) + +function button_common:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team and player:IsAlive() then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +-- TODO this doesn't work +function button_common:onfailuse( use_entity ) + if IsPlayer( use_entity ) then + local player = CastToPlayer( use_entity ) + BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDBUTTON" ) + end +end + +----------------------------------------------------------------------------- +-- Button inputs (touch, use, damage etc.) +----------------------------------------------------------------------------- + +-- red button +--button_red = button_common:new({ team = Team.kBlue, sec_up = true }) + +button_red = button_common:new({ + team = Team.kBlue, + sec_up = true, + sec_down_icon = "hud_secdown.vtf", + sec_up_icon = "hud_secup_red.vtf", + iconx = 60, + icony = 30, + iconw = 16, + iconh = 16, + iconalign = 3 +}) + +----------------------------------------------------------------------------- +-- Button responses +----------------------------------------------------------------------------- +function button_red:onin() + BroadCastMessage( "#FF_RED_SECURITY_DEACTIVATED" ) + SpeakAll( "SD_REDDOWN" ) + + self.sec_up = false + + RemoveHudItemFromAll( "red-sec-up") + AddHudIconToAll( self.sec_down_icon, "red-sec-down", self.iconx, self.icony, self.iconw, self.iconh, self.iconalign ) + LogLuaEvent(0, 0, "security_down", "team", "red") + +end + +function button_red:onout() + BroadCastMessage( "#FF_RED_SECURITY_ACTIVATED" ) + SpeakAll( "SD_REDUP" ) + + self.sec_up = true + + RemoveHudItemFromAll( "red-sec-down" ) + AddHudIconToAll( self.sec_up_icon, "red-sec-up", self.iconx, self.icony, self.iconw, self.iconh, self.iconalign ) + LogLuaEvent(0, 0, "security_up", "team", "red") + +end + +----------------------------------------------------------------------------- +-- Button inputs (touch, use, damage etc.) +----------------------------------------------------------------------------- + +-- blue button +--button_blue = button_common:new({ team = Team.kRed, sec_up = true }) + +button_blue = button_common:new({ + team = Team.kRed, + sec_up = true, + sec_down_icon = "hud_secdown.vtf", + sec_up_icon = "hud_secup_blue.vtf", + iconx = 60, + icony = 30, + iconw = 16, + iconh = 16, + iconalign = 2 +}) + +----------------------------------------------------------------------------- +-- Button responses +----------------------------------------------------------------------------- +function button_blue:onin() + BroadCastMessage( "#FF_BLUE_SECURITY_DEACTIVATED" ) + SpeakAll( "SD_BLUEDOWN" ) + + self.sec_up = false + + RemoveHudItemFromAll( "blue-sec-up") + AddHudIconToAll( self.sec_down_icon, "blue-sec-down", self.iconx, self.icony, self.iconw, self.iconh, self.iconalign ) + LogLuaEvent(0, 0, "security_down", "team", "blue") + +end + +function button_blue:onout() + BroadCastMessage( "#FF_BLUE_SECURITY_ACTIVATED" ) + SpeakAll( "SD_BLUEUP" ) + + self.sec_up = true + + RemoveHudItemFromAll( "blue-sec-down") + AddHudIconToAll( self.sec_up_icon, "blue-sec-up", self.iconx, self.icony, self.iconw, self.iconh, self.iconalign ) + LogLuaEvent(0, 0, "security_up", "team", "blue") +end + +----------------------------------------------------------------------------- +-- Hurts +----------------------------------------------------------------------------- +hurt = trigger_ff_script:new({ team = Team.kUnassigned }) +function hurt:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + local player = CastToPlayer( allowed_entity ) + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + end + + return EVENT_DISALLOWED +end + +-- red lasers hurt blue and vice-versa + +red_laser_hurt = hurt:new({ team = Team.kBlue }) +blue_laser_hurt = hurt:new({ team = Team.kRed }) + +-- function precache() + -- precache sounds +-- PrecacheSound("vox.blueup") +-- PrecacheSound("vox.bluedown") +-- PrecacheSound("vox.redup") +-- PrecacheSound("vox.reddown") +-- end + + + +------------------------- +-- flaginfo +------------------------- + +--flaginfo runs whenever the player spawns or uses the flaginfo command. +--Right now it just refreshes the HUD items; this ensures that players who just joined the server have the right information +function flaginfo( player_entity ) + flaginfo_base(player_entity) --see base_teamplay.lua + + local player = CastToPlayer( player_entity ) + + RemoveHudItem( player, "red-sec-down" ) + RemoveHudItem( player, "blue-sec-down" ) + RemoveHudItem( player, "red-sec-up" ) + RemoveHudItem( player, "blue-sec-up" ) + + if button_blue.sec_up == true then + AddHudIcon( player, button_blue.sec_up_icon, "blue-sec-up", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, button_blue.iconalign ) + else + AddHudIcon( player, button_blue.sec_down_icon, "blue-sec-down", button_blue.iconx, button_blue.icony, button_blue.iconw, button_blue.iconh, button_blue.iconalign ) + end + + if button_red.sec_up == true then + AddHudIcon( player, button_red.sec_up_icon, "red-sec-up", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, button_red.iconalign ) + else + AddHudIcon( player, button_red.sec_down_icon, "red-sec-down", button_red.iconx, button_red.icony, button_red.iconw, button_red.iconh, button_red.iconalign ) + end +end \ No newline at end of file diff --git a/maps/includes/base_soldierarena.lua b/maps/includes/base_soldierarena.lua new file mode 100644 index 0000000..1864a64 --- /dev/null +++ b/maps/includes/base_soldierarena.lua @@ -0,0 +1,111 @@ + +-- base_soldierarena + +function startup() + + local team = GetTeam(Team.kBlue) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, 0 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + team = GetTeam(Team.kRed) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, 0 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + team = GetTeam(Team.kYellow) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, 0 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + + team = GetTeam(Team.kGreen) + team:SetClassLimit( Player.kScout, -1 ) + team:SetClassLimit( Player.kSniper, -1 ) + team:SetClassLimit( Player.kSoldier, 0 ) + team:SetClassLimit( Player.kDemoman, 0 ) + team:SetClassLimit( Player.kMedic, -1 ) + team:SetClassLimit( Player.kHwguy, -1 ) + team:SetClassLimit( Player.kPyro, -1 ) + team:SetClassLimit( Player.kSpy, -1 ) + team:SetClassLimit( Player.kEngineer, -1 ) + team:SetClassLimit( Player.kCivilian, -1 ) + +end + +function player_spawn( player_id ) + -- 400 for overkill. of course the values + -- get clamped in game code + local player = GetPlayer(player_id) + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:RemoveAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:RemoveAmmo( Ammo.kCells, 400 ) + player:RemoveAmmo( Ammo.kDetpack, 1 ) + player:RemoveAmmo( Ammo.kManCannon, 1 ) + player:RemoveAmmo( Ammo.kGren1, 4 ) + player:RemoveAmmo( Ammo.kGren2, 4 ) + + -- Players get 1 gren1 + player:AddAmmo( Ammo.kGren1, 1 ) +end + +function player_ondamage( player, damageinfo ) + + if not player_entity then return end + if not damageinfo then return end + + local attackerPlayer = CastToPlayer(damageinfo:GetAttacker()) + if not attackerPlayer then return end + + local weapon = damageinfo:GetInflictor():GetClassName() + local player = CastToPlayer(player_entity) + + -- Don't take rocket, gl/pl damage from ourselves + if ( player:GetId() == attackerPlayer:GetId() ) then + + if ( weapon == "ff_projectile_rocket" ) then + damageinfo:SetDamage(0); + -- green pipes + elseif ( weapon == "ff_projectile_pl" ) then + damageinfo:SetDamage(0); + -- blue pipes + elseif ( weapon == "ff_projectile_gl" ) then + damageinfo:SetDamage(0); + end + end +end + +function player_killed( player_id ) + -- If you kill someone, give your team a point + local killer = GetPlayer(killer) + local victim = GetPlayer(player_id) + + if not (victim:GetTeamId() == killer:GetTeamId()) then + local killersTeam = killer:GetTeam() + killersTeam:AddScore(1) + end +end diff --git a/maps/includes/base_teamplay.lua b/maps/includes/base_teamplay.lua new file mode 100644 index 0000000..04f7b15 --- /dev/null +++ b/maps/includes/base_teamplay.lua @@ -0,0 +1,872 @@ + +-- base_teamplay.lua + +----------------------------------------------------------------------------- +-- base_teamplay handles stuff for "normal" maps so this stuff doesn't need +-- to be replicated all over the place (like standard teamspawns, +-- doors, bags, and such) +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Globals +----------------------------------------------------------------------------- +if POINTS_PER_CAPTURE == nil then POINTS_PER_CAPTURE = 10; end +if FORTPOINTS_PER_CAPTURE == nil then FORTPOINTS_PER_CAPTURE = 1000; end +if FORTPOINTS_PER_INITIALTOUCH == nil then FORTPOINTS_PER_INITIALTOUCH = 100; end +if FLAG_RETURN_TIME == nil then FLAG_RETURN_TIME = 60; end +if FLAG_THROW_SPEED == nil then FLAG_THROW_SPEED = 330; end + +redallowedmethod = function(self,player) return player:GetTeamId() == Team.kRed end +blueallowedmethod = function(self,player) return player:GetTeamId() == Team.kBlue end +yellowallowedmethod = function(self,player) return player:GetTeamId() == Team.kYellow end +greenallowedmethod = function(self,player) return player:GetTeamId() == Team.kGreen end + +-- things for flags +teamskins = {} +teamskins[Team.kBlue] = 0 +teamskins[Team.kRed] = 1 +teamskins[Team.kYellow] = 2 +teamskins[Team.kGreen] = 3 + +team_hudicons = {} +team_hudicons[Team.kBlue] = "hud_flag_blue_new.vtf" +team_hudicons[Team.kRed] = "hud_flag_red_new.vtf" +team_hudicons[Team.kGreen] = "hud_flag_green_new.vtf" +team_hudicons[Team.kYellow] = "hud_flag_yellow_new.vtf" + +----------------------------------------------------------------------------- +-- Player spawn: give full health, armor, and ammo +----------------------------------------------------------------------------- +function player_spawn( player_entity ) + local player = CastToPlayer( player_entity ) + + player:AddHealth( 400 ) + player:AddArmor( 400 ) + + player:AddAmmo( Ammo.kNails, 400 ) + player:AddAmmo( Ammo.kShells, 400 ) + player:AddAmmo( Ammo.kRockets, 400 ) + player:AddAmmo( Ammo.kCells, 400 ) +end + +----------------------------------------------------------------------------- +-- No builds: area where you can't build +----------------------------------------------------------------------------- +nobuild = trigger_ff_script:new({}) + +function nobuild:onbuild( build_entity ) + return EVENT_DISALLOWED +end + +no_build = nobuild + +----------------------------------------------------------------------------- +-- No grens: area where grens won't explode +----------------------------------------------------------------------------- +nogrens = trigger_ff_script:new({}) + +function nogrens:onexplode( explode_entity ) + if IsGrenade( explode_entity ) then + return EVENT_DISALLOWED + end + return EVENT_ALLOWED +end + +no_grens = nogrens + +----------------------------------------------------------------------------- +-- No Fucking Annoyances +----------------------------------------------------------------------------- +noannoyances = trigger_ff_script:new({}) + +function noannoyances:onbuild( build_entity ) + return EVENT_DISALLOWED +end + +function noannoyances:onexplode( explode_entity ) + if IsGrenade( explode_entity ) then + return EVENT_DISALLOWED + end + return EVENT_ALLOWED +end + +function noannoyances:oninfect( infect_entity ) + return EVENT_DISALLOWED +end + +no_annoyances = noannoyances +spawn_protection = noannoyances + +----------------------------------------------------------------------------- +-- Trigger_ff_clips +----------------------------------------------------------------------------- + +-- these block all players except the team the clip "belongs to" (clip_red blocks all players not on the red team) +clip_blue = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamRed, ClipFlags.kClipTeamYellow, ClipFlags.kClipTeamGreen, ClipFlags.kClipAllNonPlayers} }) +clip_red = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamBlue, ClipFlags.kClipTeamYellow, ClipFlags.kClipTeamGreen, ClipFlags.kClipAllNonPlayers} }) +clip_yellow = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamBlue, ClipFlags.kClipTeamRed, ClipFlags.kClipTeamGreen, ClipFlags.kClipAllNonPlayers} }) +clip_green = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamBlue, ClipFlags.kClipTeamRed, ClipFlags.kClipTeamYellow, ClipFlags.kClipAllNonPlayers} }) + +-- each of these block specific things +block_buildables = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllBuildables, ClipFlags.kClipAllBuildableWeapons} }) +block_buildablepathing = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllBuildables} }) +block_buildableweapons = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllBuildableWeapons} }) +block_spawnturrets = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllSpawnTurrets} }) +block_nonplayers = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllNonPlayers} }) +block_players = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllPlayers} }) +block_backpacks = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllBackpacks} }) +block_flags = trigger_ff_clip:new({ clipflags = {ClipFlags.kClipAllInfoScripts} }) + +----------------------------------------------------------------------------- +-- Generic Backpack +----------------------------------------------------------------------------- +genericbackpack = info_ff_script:new({ + health = 0, + armor = 0, + grenades = 0, + shells = 0, + nails = 0, + rockets = 0, + cells = 0, + detpacks = 0, + mancannons = 0, + gren1 = 0, + gren2 = 0, + respawntime = 5, + model = "models/items/healthkit.mdl", + materializesound = "Item.Materialize", + touchsound = "HealthKit.Touch", + notallowedmsg = "#FF_NOTALLOWEDPACK", + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen} +}) + +function genericbackpack:dropatspawn() return false end + +function genericbackpack:precache( ) + -- precache sounds + PrecacheSound(self.materializesound) + PrecacheSound(self.touchsound) + + -- precache models + PrecacheModel(self.model) +end + +function genericbackpack:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + local dispensed = 0 + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then dispensed = dispensed + player:AddHealth( self.health ) end + if self.armor ~= nil and self.armor ~= 0 then dispensed = dispensed + player:AddArmor( self.armor ) end + + -- give player ammo + if self.nails ~= nil and self.nails ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then dispensed = dispensed + player:AddAmmo(Ammo.kGren2, self.gren2) end + + -- if the player took ammo, then have the backpack respawn with a delay + if dispensed >= 1 then + local backpack = CastToInfoScript(entity); + if backpack then + backpack:EmitSound(self.touchsound); + backpack:Respawn(self.respawntime); + end + end + end +end + +function genericbackpack:materialize( ) + entity:EmitSound(self.materializesound) +end + +----------------------------------------------------------------------------- +-- Health Kit (backpack-based) +----------------------------------------------------------------------------- +healthkit = genericbackpack:new({ + health = 25, + model = "models/items/healthkit.mdl", + materializesound = "Item.Materialize", + respawntime = 20, + touchsound = "HealthKit.Touch", + botgoaltype = Bot.kBackPack_Health +}) + +function healthkit:dropatspawn() return true end + +----------------------------------------------------------------------------- +-- Armor Kit (backpack-based) +----------------------------------------------------------------------------- +armorkit = genericbackpack:new({ + armor = 200, + cells = 150, -- mirv: armour in 2fort/rock2/etc gives 150 cells too + model = "models/items/armour/armour.mdl", + materializesound = "Item.Materialize", + touchsound = "ArmorKit.Touch", + botgoaltype = Bot.kBackPack_Armor +}) + +function armorkit:dropatspawn() return true end + +----------------------------------------------------------------------------- +-- Ammo Kit (backpack-based) +----------------------------------------------------------------------------- +ammobackpack = genericbackpack:new({ + grenades = 20, + nails = 50, + shells = 100, + rockets = 15, + cells = 70, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function ammobackpack:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- bigpack -- has a bit of everything (excluding grens) (backpack-based) +----------------------------------------------------------------------------- +bigpack = genericbackpack:new({ + health = 150, + armor = 200, + grenades = 50, + nails = 150, + shells = 200, + rockets = 100, + cells = 200, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Ammo +}) + +function bigpack:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- Grenade Backpack +----------------------------------------------------------------------------- +grenadebackpack = genericbackpack:new({ + mancannons = 1, + gren1 = 2, + gren2 = 2, + model = "models/items/backpack/backpack.mdl", + materializesound = "Item.Materialize", + respawntime = 30, + touchsound = "Backpack.Touch", + botgoaltype = Bot.kBackPack_Grenades +}) + +function grenadebackpack:dropatspawn() return false end + +----------------------------------------------------------------------------- +-- Door Triggers +----------------------------------------------------------------------------- +respawndoor = trigger_ff_script:new({ team = Team.kUnassigned, allowdisguised=false }) + +function respawndoor:allowed( allowed_entity ) + if IsPlayer( allowed_entity ) then + + local player = CastToPlayer( allowed_entity ) + + if player:GetTeamId() == self.team then + return EVENT_ALLOWED + end + + if self.allowdisguised then + if player:IsDisguised() and player:GetDisguisedTeam() == self.team then + return EVENT_ALLOWED + end + end + end + return EVENT_DISALLOWED +end + +function respawndoor:onfailtouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDDOOR" ) + end +end + +bluerespawndoor = respawndoor:new({ team = Team.kBlue }) +redrespawndoor = respawndoor:new({ team = Team.kRed }) +greenrespawndoor = respawndoor:new({ team = Team.kGreen }) +yellowrespawndoor = respawndoor:new({ team = Team.kYellow }) + +----------------------------------------------------------------------------- +-- Elevator Triggers +----------------------------------------------------------------------------- + +elevator_trigger = respawndoor:new( {} ) + +function elevator_trigger:onfailtouch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDELEVATOR" ) + end +end + +blue_elevator_trigger = elevator_trigger:new({ team = Team.kBlue }) +red_elevator_trigger = elevator_trigger:new({ team = Team.kRed }) +green_elevator_trigger = elevator_trigger:new({ team = Team.kGreen }) +yellow_elevator_trigger = elevator_trigger:new({ team = Team.kYellow }) + +----------------------------------------------------------------------------- +-- Spawn functions +----------------------------------------------------------------------------- +redspawn = { validspawn = redallowedmethod } +bluespawn = { validspawn = blueallowedmethod } +greenspawn = { validspawn = greenallowedmethod } +yellowspawn = { validspawn = yellowallowedmethod } + +-- aliases for people that like underscores +red_spawn = redspawn; blue_spawn = bluespawn; +green_spawn = greenspawn; yellow_spawn = yellowspawn +blue_respawndoor = bluerespawndoor; red_respawndoor = redrespawndoor; +green_respawndoor = greenrespawndoor; yellow_respawndoor = yellowrespawndoor + +----------------------------------------------------------------------------- +-- Capture Points +----------------------------------------------------------------------------- +basecap = trigger_ff_script:new({ + health = 100, + armor = 300, + grenades = 200, + shells = 200, + nails = 200, + rockets = 200, + cells = 200, + detpacks = 1, + mancannons = 1, + gren1 = 4, + gren2 = 4, + item = "", + team = 0, + -- teampoints and fortpoints are defined as functions here for backwards compatibility (to always get the current value of the global variable) + -- when defining capture points that inherit from basecap, teampoints and fortpoints can be set to numbers instead + teampoints = function(cap, team) return POINTS_PER_CAPTURE end, + fortpoints = function(cap, player) return FORTPOINTS_PER_CAPTURE end, + botgoaltype = Bot.kFlagCap, +}) + +bluerspawn = info_ff_script:new() + +function basecap:allowed ( allowed_entity ) + if IsPlayer( allowed_entity ) then + -- get the player and his team + local player = CastToPlayer( allowed_entity ) + local team = player:GetTeam() + + -- check if the player is on our team + if team:GetTeamId() ~= self.team then + return false + end + + -- check if the player has the flag + for i,v in ipairs(self.item) do + local flag = GetInfoScriptByName(v) + + -- Make sure flag isn't nil + if flag then + if player:HasItem(flag:GetName()) then + return true + end + end + end + end + + return false +end + +function basecap:ontrigger ( trigger_entity ) + if IsPlayer( trigger_entity ) then + local player = CastToPlayer( trigger_entity ) + + -- player should capture now + for i,v in ipairs( self.item ) do + + -- find the flag and cast it to an info_ff_script + local flag = GetInfoScriptByName(v) + + -- Make sure flag isn't nil + if flag then + + -- check if the player is carrying the flag + if player:HasItem(flag:GetName()) then + flag.status = 0 + + -- reward player for capture + local fortpoints = (type(self.fortpoints) == "function" and self.fortpoints(self, player) or self.fortpoints) + player:AddFortPoints(fortpoints, "#FF_FORTPOINTS_CAPTUREFLAG") + + -- reward player's team for capture + local team = player:GetTeam() + local teampoints = (type(self.teampoints) == "function" and self.teampoints(self, team) or self.teampoints) + team:AddScore(teampoints) + + LogLuaEvent(player:GetId(), 0, "flag_capture","flag_name",flag:GetName()) + -- show on the deathnotice board + ObjectiveNotice( player, "captured the flag" ) + + -- clear the objective icon + UpdateObjectiveIcon( player, nil ) + + -- Remove any hud icons + RemoveHudItem( player, flag:GetName() ) + + -- return the flag + flag:Return() + + --Cappin cures what ails ya + player:RemoveEffect(EF.kOnfire) + player:RemoveEffect(EF.kConc) + player:RemoveEffect(EF.kGas) + player:RemoveEffect(EF.kInfect) + player:RemoveEffect(EF.kRadiotag) + player:RemoveEffect(EF.kTranq) + player:RemoveEffect(EF.kLegshot) + player:RemoveEffect(EF.kRadiotag) + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then player:AddHealth(self.health) end + if self.armor ~= nil and self.armor ~= 0 then player:AddArmor(self.armor) end + + -- give the player some ammo + if self.nails ~= nil and self.nails ~= 0 then player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then player:AddAmmo(Ammo.kGren2, self.gren2) end + + self:oncapture( player, v ) + end + end + end + end +end + +function basecap:oncapture(player, item) + -- let the teams know that a capture occured + SmartSound(player, "yourteam.flagcap", "yourteam.flagcap", "otherteam.flagcap") + SmartSpeak(player, "CTF_YOUCAP", "CTF_TEAMCAP", "CTF_THEYCAP") + SmartMessage(player, "#FF_YOUCAP", "#FF_TEAMCAP", "#FF_OTHERTEAMCAP", Color.kGreen, Color.kGreen, Color.kRed) +end + +----------------------------------------------------------------------------- +-- Flag +-- status: 0 = home, 1 = carried, 2 = dropped +----------------------------------------------------------------------------- +baseflag = info_ff_script:new({ + name = "base flag", + team = 0, + model = "models/flag/flag.mdl", + tosssound = "Flag.Toss", + modelskin = 1, + dropnotouchtime = 2, + capnotouchtime = 2, + botgoaltype = Bot.kFlag, + status = 0, + hudicon = "", + hudx = 5, + hudy = 114, + hudalign = 1, + hudstatusiconalign = 2, + hudstatusicon = "", + hudstatusiconx = 0, + hudstatusicony = 0, + hudstatusiconw = 50, + hudstatusiconh = 50, + allowdrop = true, + droppedlocation = "", + carriedby = "", + flagtoss = false, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen} +}) + +function baseflag:precache() + PrecacheSound(self.tosssound) + PrecacheSound("yourteam.flagstolen") + PrecacheSound("otherteam.flagstolen") + PrecacheSound("yourteam.drop") + PrecacheSound("otherteam.drop") + PrecacheSound("yourteam.flagreturn") + PrecacheSound("otherteam.flagreturn") + PrecacheSound("yourteam.flagcap") + PrecacheSound("otherteam.flagcap") + info_ff_script.precache(self) +end + +function baseflag:spawn() + self.notouch = { } + info_ff_script.spawn(self) + local flag = CastToInfoScript( entity ) + LogLuaEvent(0, 0, "flag_spawn","flag_name",flag:GetName()) + self.status = 0 + self:refreshStatusIcons(flag:GetName()) +end + +function baseflag:addnotouch(player_id, duration) + self.notouch[player_id] = duration + AddSchedule(self.name .. "-" .. player_id, duration, self.removenotouch, self, player_id) +end + +function baseflag.removenotouch(self, player_id) + self.notouch[player_id] = nil +end + +function baseflag:touch( touch_entity ) + local player = CastToPlayer( touch_entity ) + -- pickup if they can + if self.notouch[player:GetId()] then return; end + + if player:GetTeamId() ~= self.team then + -- let the teams know that the flag was picked up + SmartSound(player, "yourteam.flagstolen", "yourteam.flagstolen", "otherteam.flagstolen") + RandomFlagTouchSpeak( player ) + SmartMessage(player, "#FF_YOUPICKUP", "#FF_TEAMPICKUP", "#FF_OTHERTEAMPICKUP", Color.kGreen, Color.kGreen, Color.kRed) + + -- if the player is a spy, then force him to lose his disguise + player:SetDisguisable( false ) + -- if the player is a spy, then force him to lose his cloak + player:SetCloakable( false ) + + -- note: this seems a bit backwards (Pickup verb fits Player better) + local flag = CastToInfoScript(entity) + flag:Pickup(player) + AddHudIcon( player, self.hudicon, flag:GetName(), self.hudx, self.hudy, self.hudwidth, self.hudheight, self.hudalign ) + + -- show on the deathnotice board + --ObjectiveNotice( player, "grabbed the flag" ) + -- log action in stats + LogLuaEvent(player:GetId(), 0, "flag_touch", "flag_name", flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) ), "player_health", "" .. player:GetHealth()); + + local team = nil + -- get team as a lowercase string + if player:GetTeamId() == Team.kBlue then team = "blue" end + if player:GetTeamId() == Team.kRed then team = "red" end + if player:GetTeamId() == Team.kGreen then team = "green" end + if player:GetTeamId() == Team.kYellow then team = "yellow" end + + -- objective icon pointing to the cap + UpdateObjectiveIcon( player, GetEntityByName( team.."_cap" ) ) + + -- 100 points for initial touch on flag + if self.status == 0 then player:AddFortPoints(FORTPOINTS_PER_INITIALTOUCH, "#FF_FORTPOINTS_INITIALTOUCH") end + self.status = 1 + self.carriedby = player:GetName() + self:refreshStatusIcons(flag:GetName()) + + end +end + +function baseflag:onownerdie( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, flag:GetName() ) + + self.status = 2 + self.carriedby = "" + self.droppedlocation = player:GetLocation() + self:refreshStatusIcons(flag:GetName()) + + -- clear the objective icon + UpdateObjectiveIcon( player, nil ) + +end + +function baseflag:ownercloak( owner_entity ) + -- drop the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, 0.0) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, flag:GetName() ) + + self.status = 2 + self.carriedby = "" + self.droppedlocation = player:GetLocation() + self:refreshStatusIcons(flag:GetName()) + + -- clear the objective icon + UpdateObjectiveIcon( player, nil ) +end + +function baseflag:dropitemcmd( owner_entity ) + if allowdrop == false then return end + + --Used by logging + self.flagtoss = true + + -- throw the flag + local flag = CastToInfoScript(entity) + flag:Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) + + -- remove flag icon from hud + local player = CastToPlayer( owner_entity ) + RemoveHudItem( player, flag:GetName() ) + + self.status = 2 + self.carriedby = "" + self.droppedlocation = player:GetLocation() + self:refreshStatusIcons(flag:GetName()) + + -- clear the objective icon + UpdateObjectiveIcon( player, nil ) +end + +function baseflag:ondrop( owner_entity ) + local player = CastToPlayer( owner_entity ) + -- let the teams know that the flag was dropped + SmartSound(player, "yourteam.drop", "yourteam.drop", "otherteam.drop") + SmartMessage(player, "#FF_YOUDROP", "#FF_TEAMDROP", "#FF_OTHERTEAMDROP", Color.kYellow, Color.kYellow, Color.kYellow) + + local flag = CastToInfoScript(entity) + --Log a toss if drop was intentional. Otherwise, drop + if self.flagtoss == true then + LogLuaEvent(player:GetId(), 0, "flag_thrown","flag_name",flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) ), "player_health", "" ..player:GetHealth()); + + self.flagtoss = false + else + LogLuaEvent(player:GetId(), 0, "flag_dropped", "flag_name", flag:GetName(), "player_origin", (string.format("%0.2f",player:GetOrigin().x) .. ", " .. string.format("%0.2f",player:GetOrigin().y) .. ", " .. string.format("%0.1f",player:GetOrigin().z) )); + + end + + flag:EmitSound(self.tosssound) +end + +function baseflag:onloseitem( owner_entity ) + local flag = CastToInfoScript( entity ) + -- let the player that lost the flag put on a disguise + local player = CastToPlayer( owner_entity ) + player:SetDisguisable(true) + -- let player cloak if he can + player:SetCloakable( true ) + + self.status = 0 --For some reason, the flag won't register as home when captured, unless I do this. + self.carriedby = "" + self:refreshStatusIcons(flag:GetName()) + self:addnotouch(player:GetId(), self.capnotouchtime) +end + +function baseflag:onownerforcerespawn( owner_entity ) + local flag = CastToInfoScript( entity ) + local player = CastToPlayer( owner_entity ) + player:SetDisguisable( true ) + player:SetCloakable( true ) + RemoveHudItem( player, flag:GetName() ) + flag:Drop(0, FLAG_THROW_SPEED) + + self.status = 2 + self.carriedby = "" + self.droppedlocation = player:GetLocation() + self:refreshStatusIcons(flag:GetName()) + + -- clear the objective icon + UpdateObjectiveIcon( player, nil ) +end + +function baseflag:onreturn( ) + -- let the teams know that the flag was returned + local team = GetTeam( self.team ) + SmartTeamMessage(team, "#FF_TEAMRETURN", "#FF_OTHERTEAMRETURN", Color.kYellow, Color.kYellow) + SmartTeamSound(team, "yourteam.flagreturn", "otherteam.flagreturn") + SmartTeamSpeak(team, "CTF_FLAGBACK", "CTF_EFLAGBACK") + local flag = CastToInfoScript( entity ) + + LogLuaEvent(0, 0, "flag_returned","flag_name",flag:GetName()); + + RemoveHudItemFromAll( flag:GetName() .. "location" ) + self.status = 0 + self.droppedlocation = "" + self:refreshStatusIcons(flag:GetName()) +end + +function baseflag:hasanimation() return true end + +function baseflag:gettouchsize( mins, maxs ) + mins.x = mins.x * 0.75 + mins.y = mins.y * 0.75 + maxs.x = maxs.x * 0.75 + maxs.y = maxs.y * 0.75 + mins.z = 0 + maxs.z = maxs.z * 0.5 +end + +function baseflag:getphysicssize( mins, maxs ) + mins.x = mins.x / 2 + mins.y = mins.y / 2 + maxs.x = maxs.x / 2 + maxs.y = maxs.y / 2 + mins.z = 0 + maxs.z = 1 +end + +function baseflag:getbloatsize() + return 0 +end + +--All your flag HUD status needs in a convenient package (sort of) +function baseflag:refreshStatusIcons(flagname) + RemoveHudItemFromAll( flagname .. "_status" ) + RemoveHudItemFromAll( flagname .. "location" ) + RemoveHudItemFromAll( flagname .. "carrier" ) + RemoveHudItemFromAll( flagname .. "timer" ) + + if self.status == 1 then + AddHudTextToAll( flagname .. "carrier", self.carriedby, self.hudstatusiconx, (self.hudstatusicony + self.hudstatusiconh), self.hudstatusiconalign ) + AddHudIconToAll( self.hudstatusiconcarried, ( flagname .. "_status" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) + elseif self.status == 2 then + AddHudTextToAll( flagname .. "location", self.droppedlocation, self.hudstatusiconx + 24, (self.hudstatusicony + self.hudstatusiconh), self.hudstatusiconalign ) + AddHudTimerToAll( flagname .. "timer", FLAG_RETURN_TIME+1, -1, self.hudstatusiconx, (self.hudstatusicony + self.hudstatusiconh), self.hudstatusiconalign ) + AddHudIconToAll( self.hudstatusicondropped, ( flagname .. "_status" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) + else + AddHudIconToAll( self.hudstatusiconhome, ( flagname .. "_status" ), self.hudstatusiconx, self.hudstatusicony, self.hudstatusiconw, self.hudstatusiconh, self.hudstatusiconalign ) + end +end + +----------------------------------------------------------------------------- +--flaginfo, basic version. If you override flaginfo in a map's lua, call this to get default functionality. +----------------------------------------------------------------------------- +function flaginfo_base( player_entity ) + local player = CastToPlayer( player_entity ) + + local flag = GetInfoScriptByName("blue_flag") + if flag then + local flagname = flag:GetName() + + RemoveHudItem( player, flagname .. "_status" ) + RemoveHudItem( player, "blue_flagcarrier" ) + RemoveHudItem( player, "blue_flaglocation" ) + + if flag:IsCarried() then + AddHudText( player, "blue_flagcarrier", blue_flag.carriedby, blue_flag.hudstatusiconx, (blue_flag.hudstatusicony + blue_flag.hudstatusiconh), blue_flag.hudstatusiconalign ) + AddHudIcon( player, blue_flag.hudstatusiconcarried, ( flagname .. "_status" ), blue_flag.hudstatusiconx, blue_flag.hudstatusicony, blue_flag.hudstatusiconw, blue_flag.hudstatusiconh, blue_flag.hudstatusiconalign ) + elseif flag:IsDropped() then + AddHudText( player, "blue_flaglocation", blue_flag.droppedlocation, blue_flag.hudstatusiconx + 24, (blue_flag.hudstatusicony + blue_flag.hudstatusiconh), blue_flag.hudstatusiconalign ) + AddHudIcon( player, blue_flag.hudstatusicondropped, ( flagname .. "_status" ), blue_flag.hudstatusiconx, blue_flag.hudstatusicony, blue_flag.hudstatusiconw, blue_flag.hudstatusiconh, blue_flag.hudstatusiconalign ) + else + AddHudIcon( player, blue_flag.hudstatusiconhome, ( flagname .. "_status" ), blue_flag.hudstatusiconx, blue_flag.hudstatusicony, blue_flag.hudstatusiconw, blue_flag.hudstatusiconh, blue_flag.hudstatusiconalign ) + end + end + local flag = GetInfoScriptByName("red_flag") + if flag then + local flagname = flag:GetName() + + RemoveHudItem( player, flagname .. "_status" ) + RemoveHudItem( player, "red_flagcarrier" ) + RemoveHudItem( player, "red_flaglocation" ) + + if flag:IsCarried() then + AddHudText( player, "red_flagcarrier", red_flag.carriedby, red_flag.hudstatusiconx, (red_flag.hudstatusicony + red_flag.hudstatusiconh), red_flag.hudstatusiconalign ) + AddHudIcon( player, red_flag.hudstatusiconcarried, ( flagname .. "_status" ), red_flag.hudstatusiconx, red_flag.hudstatusicony, red_flag.hudstatusiconw, red_flag.hudstatusiconh, red_flag.hudstatusiconalign ) + elseif flag:IsDropped() then + AddHudText( player, "red_flaglocation", red_flag.droppedlocation, red_flag.hudstatusiconx + 24, (red_flag.hudstatusicony + red_flag.hudstatusiconh), red_flag.hudstatusiconalign ) + AddHudIcon( player, red_flag.hudstatusicondropped, ( flagname .. "_status" ), red_flag.hudstatusiconx, red_flag.hudstatusicony, red_flag.hudstatusiconw, red_flag.hudstatusiconh, red_flag.hudstatusiconalign ) + else + AddHudIcon( player, red_flag.hudstatusiconhome, ( flagname .. "_status" ), red_flag.hudstatusiconx, red_flag.hudstatusicony, red_flag.hudstatusiconw, red_flag.hudstatusiconh, red_flag.hudstatusiconalign ) + end + end + local flag = GetInfoScriptByName("yellow_flag") + if flag then + local flagname = flag:GetName() + + RemoveHudItem( player, flagname .. "_status" ) + RemoveHudItem( player, "yellow_flagcarrier" ) + RemoveHudItem( player, "yellow_flaglocation" ) + + if flag:IsCarried() then + AddHudText( player, "yellow_flagcarrier", yellow_flag.carriedby, yellow_flag.hudstatusiconx, (yellow_flag.hudstatusicony + yellow_flag.hudstatusiconh), yellow_flag.hudstatusiconalign ) + AddHudIcon( player, yellow_flag.hudstatusiconcarried, ( flagname .. "_status" ), yellow_flag.hudstatusiconx, yellow_flag.hudstatusicony, yellow_flag.hudstatusiconw, yellow_flag.hudstatusiconh, yellow_flag.hudstatusiconalign ) + elseif flag:IsDropped() then + AddHudText( player, "yellow_flaglocation", yellow_flag.droppedlocation, yellow_flag.hudstatusiconx + 24, (yellow_flag.hudstatusicony + yellow_flag.hudstatusiconh), yellow_flag.hudstatusiconalign ) + AddHudIcon( player, yellow_flag.hudstatusicondropped, ( flagname .. "_status" ), yellow_flag.hudstatusiconx, yellow_flag.hudstatusicony, yellow_flag.hudstatusiconw, yellow_flag.hudstatusiconh, yellow_flag.hudstatusiconalign ) + else + AddHudIcon( player, yellow_flag.hudstatusiconhome, ( flagname .. "_status" ), yellow_flag.hudstatusiconx, yellow_flag.hudstatusicony, yellow_flag.hudstatusiconw, yellow_flag.hudstatusiconh, yellow_flag.hudstatusiconalign ) + end + end + local flag = GetInfoScriptByName("green_flag") + if flag then + local flagname = flag:GetName() + + RemoveHudItem( player, flagname .. "_status" ) + RemoveHudItem( player, "green_flagcarrier" ) + RemoveHudItem( player, "green_flaglocation" ) + + if flag:IsCarried() then + AddHudText( player, "green_flagcarrier", green_flag.carriedby, green_flag.hudstatusiconx, (green_flag.hudstatusicony + green_flag.hudstatusiconh), green_flag.hudstatusiconalign ) + AddHudIcon( player, green_flag.hudstatusiconcarried, ( flagname .. "_status" ), green_flag.hudstatusiconx, green_flag.hudstatusicony, green_flag.hudstatusiconw, green_flag.hudstatusiconh, green_flag.hudstatusiconalign ) + elseif flag:IsDropped() then + AddHudText( player, "green_flaglocation", green_flag.droppedlocation, green_flag.hudstatusiconx + 24, (green_flag.hudstatusicony + green_flag.hudstatusiconh), green_flag.hudstatusiconalign ) + AddHudIcon( player, green_flag.hudstatusicondropped, ( flagname .. "_status" ), green_flag.hudstatusiconx, green_flag.hudstatusicony, green_flag.hudstatusiconw, green_flag.hudstatusiconh, green_flag.hudstatusiconalign ) + else + AddHudIcon( player, green_flag.hudstatusiconhome, ( flagname .. "_status" ), green_flag.hudstatusiconx, green_flag.hudstatusicony, green_flag.hudstatusiconw, green_flag.hudstatusiconh, green_flag.hudstatusiconalign ) + end + end +end +----------------------------------------------------------------------------- +-- Dettable triggers. Use this to make triggers that respond to a detpack explosion. +----------------------------------------------------------------------------- + +detpack_trigger = trigger_ff_script:new({ team = Team.kUnassigned, team_name = "neutral" }) + +function detpack_trigger:onexplode( explosion_entity ) + if IsDetpack( explosion_entity ) then + local detpack = CastToDetpack( explosion_entity ) + + if detpack:GetTeamId() ~= self.team then + -- Generic 'trigger' output for use with logic_ entities. + OutputEvent( self.team_name .. "_det_relay", "trigger" ) + end + end + + return EVENT_ALLOWED +end + +red_detpack_trigger = detpack_trigger:new({ team = Team.kRed, team_name = "red" }) +blue_detpack_trigger = detpack_trigger:new({ team = Team.kBlue, team_name = "blue" }) +green_detpack_trigger = detpack_trigger:new({ team = Team.kGreen, team_name = "green" }) +yellow_detpack_trigger = detpack_trigger:new({ team = Team.kYellow, team_name = "yellow" }) + +----------------------------------------------------------------------------- +-- backpack entity setup +----------------------------------------------------------------------------- +function build_backpacks(tf) + return healthkit:new({touchflags = tf}), + armorkit:new({touchflags = tf}), + ammobackpack:new({touchflags = tf}), + bigpack:new({touchflags = tf}), + grenadebackpack:new({touchflags = tf}) +end + +blue_healthkit, blue_armorkit, blue_ammobackpack, blue_bigpack, blue_grenadebackpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kBlue}) +red_healthkit, red_armorkit, red_ammobackpack, red_bigpack ,red_grenadebackpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kRed}) +yellow_healthkit, yellow_armorkit, yellow_ammobackpack, yellow_bigpack, yellow_grenadebackpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kYellow}) +green_healthkit, green_armorkit, green_ammobackpack, green_bigpack, green_grenadebackpack = build_backpacks({AllowFlags.kOnlyPlayers,AllowFlags.kGreen}) + +----------------------------------------------------------------------------- +-- plays random flag touched sounds to avoid repetition +-- use instead of: SmartSpeak(player, "CTF_YOUGOTFLAG", "CTF_GOTFLAG", "CTF_LOSTFLAG") +----------------------------------------------------------------------------- +function RandomFlagTouchSpeak( player ) + local rnd = RandomInt(1,4) + if rnd == 1 then SmartSpeak(player, "CTF_YOUGOTFLAG", "CTF_GOTFLAG", "CTF_LOSTFLAG") + elseif rnd == 2 then SmartSpeak(player, "CTF_YOUGOTFLAG2", "CTF_GOTFLAG2", "CTF_LOSTFLAG2") + elseif rnd == 3 then SmartSpeak(player, "CTF_YOUGOTFLAG3", "CTF_GOTFLAG3", "CTF_LOSTFLAG3") + else SmartSpeak(player, "CTF_YOUGOTFLAG4", "CTF_GOTFLAG4", "CTF_LOSTFLAG4") end +end diff --git a/maps/includes/base_test.lua b/maps/includes/base_test.lua new file mode 100644 index 0000000..8dd5244 --- /dev/null +++ b/maps/includes/base_test.lua @@ -0,0 +1,5 @@ +ConsoleToAll("base_test loaded!"); + +function tick() + ConsoleToAll("Tick"); +end diff --git a/maps/includes/base_training.lua b/maps/includes/base_training.lua new file mode 100644 index 0000000..e5d7c56 --- /dev/null +++ b/maps/includes/base_training.lua @@ -0,0 +1,658 @@ +-- base_training.lua + +-- contains common useful functionality for maps that include training elements. + +IncludeScript("base_teamplay") +IncludeScript("base_respawnturret") + +----------------------------------------------------------------------------- +-- helper functions +----------------------------------------------------------------------------- + +function restoreEntityByName(name) + local e = GetInfoScriptByName(name) + if e ~= nil then e:Restore() end +end + +----------------------------------------------------------------------------- +-- glass +----------------------------------------------------------------------------- + +breakable_glass = info_ff_script:new({ }) + +function breakable_glass:spawn() end + +function breakable_glass:OnBreak() + if self.BotSignal ~= nil then + bot.signal(self.BotSignal.."_OnBreak") + end +end + +function breakable_glass:ondamage() end + +----------------------------------------------------------------------------- +-- Class specific trainer spawns +----------------------------------------------------------------------------- +training_spawn = info_ff_script:new({ + name="Trainer", + model="", + botteam=Team.kYellow, + botclass=0, + botgoaltype=Bot.kTrainerSpawn, +}) + +function training_spawn:spawn() + info_ff_script.spawn(self) + + local info = CastToInfoScript(entity) + info:SpawnBot(self.name, self.botteam, self.botclass); +end + +scout_trainer = training_spawn:new({ name="Scout Instructor", botclass=Player.kScout, }) +sniper_trainer = training_spawn:new({ name="Sniper Instructor", botclass=Player.kSniper, }) +soldier_trainer = training_spawn:new({ name="Soldier Instructor", botclass=Player.kSoldier, }) +demoman_trainer = training_spawn:new({ name="Demo-man Instructor", botclass=Player.kDemoman, }) +medic_trainer = training_spawn:new({ name="Medic Instructor", botclass=Player.kMedic, }) +hwguy_trainer = training_spawn:new({ name="HwGuy Instructor", botclass=Player.kHwguy, }) +pyro_trainer = training_spawn:new({ name="Pyro Instructor", botclass=Player.kPyro, }) +engineer_trainer = training_spawn:new({ name="Engineer Instructor", botclass=Player.kEngineer, }) +spy_trainer = training_spawn:new({ name="Spy Instructor", botclass=Player.kSpy, }) +civilian_trainer = training_spawn:new({ name="Civilian Instructor", botclass=Player.kCivilian, }) + +random_target = training_spawn:new({ name="Target", botclass=Player.kRandom, }) + +----------------------------------------------------------------------------- +-- Training buttons +----------------------------------------------------------------------------- + +train_button = func_button:new({}) +function train_button:allowed() return true end +function train_button:ondamage() end +function train_button:ontouch() end +function train_button:onuse() + + if self.restoreentity ~= nil then + local e = GetInfoScriptByName(self.restoreentity) + if e ~= nil then + e:Restore() + else + ConsoleToAll("Could not restore " .. self.restoreentity) + end + end + + bot.signal(entity:GetName()) + + ConsoleToAll(entity:GetName() .. " onuse") +end + +function train_button:onfailuse() + ConsoleToAll("button failuse") +end + +----------------------------------------------------------------------------- +-- Fake weapon pickups +----------------------------------------------------------------------------- + +fakeweapon_spawn = info_ff_script:new({ + model = "models/items/backpack/backpack.mdl", + weaponname = "ff_weapon_crowbar", + ammo = {}, + touchsound = "HealthKit.Touch", + materializesound = "Item.Materialize", + respawntime = 5, + removeOnSpawn = false, + touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kBlue, AllowFlags.kRed, AllowFlags.kYellow, AllowFlags.kGreen} +}) + +function fakeweapon_spawn:spawn() + + -- temporary override + --self.model = "models/items/backpack/backpack.mdl" + + info_ff_script.spawn(self) + + local info = CastToInfoScript(entity) + if self.removeOnSpawn then + info:Remove() + end +end + +function fakeweapon_spawn:precache( ) + PrecacheSound(self.materializesound) + PrecacheSound(self.touchsound) + --PrecacheModel(self.model) +end + +function fakeweapon_spawn:materialize( ) + entity:EmitSound(self.materializesound) +end + +function fakeweapon_spawn:touch( touch_entity ) + if IsPlayer( touch_entity ) then + local player = CastToPlayer( touch_entity ) + + local dispensed = 0 + + if self.weaponclass ~= nil and not player:OwnsWeaponType(self.weaponclass) then + player:GiveWeapon(self.weaponclass) + dispensed = dispensed + 1 + end + + if self.weaponclass2 ~= nil and not player:OwnsWeaponType(self.weaponclass2) then + player:GiveWeapon(self.weaponclass2) + dispensed = dispensed + 1 + end + + -- give player some health and armor + if self.health ~= nil and self.health ~= 0 then player:AddHealth(self.health) end + if self.armor ~= nil and self.armor ~= 0 then player:AddArmor(self.armor) end + + -- give the player some ammo + if self.nails ~= nil and self.nails ~= 0 then player:AddAmmo(Ammo.kNails, self.nails) end + if self.shells ~= nil and self.shells ~= 0 then player:AddAmmo(Ammo.kShells, self.shells) end + if self.rockets ~= nil and self.rockets ~= 0 then player:AddAmmo(Ammo.kRockets, self.rockets) end + if self.cells ~= nil and self.cells ~= 0 then player:AddAmmo(Ammo.kCells, self.cells) end + if self.detpacks ~= nil and self.detpacks ~= 0 then player:AddAmmo(Ammo.kDetpack, self.detpacks) end + if self.mancannons ~= nil and self.mancannons ~= 0 then player:AddAmmo(Ammo.kManCannon, self.mancannons) end + if self.gren1 ~= nil and self.gren1 ~= 0 then player:AddAmmo(Ammo.kGren1, self.gren1) end + if self.gren2 ~= nil and self.gren2 ~= 0 then player:AddAmmo(Ammo.kGren2, self.gren2) end + + if dispensed > 0 then + local item = CastToInfoScript(entity); + item:EmitSound(self.touchsound) + + -- Do this or don't call Respawn? + --item:SetStartOrigin(item:GetOrigin()) + --item:SetStartAngles(item:GetAngles()) + + --item:Remove() + --item:Respawn(self.respawntime); + end + + end +end + +function fakeweapon_spawn:add_weapon( weaponname ) + ConsoleToAll("fakeweapon_spawn:add_weapon " .. weaponname) + self.weaponclass2 = weaponname +end + +----------------------------------------------------------------------------- +-- Weapon pickup variations. +----------------------------------------------------------------------------- + +weapon_assaultcannon = fakeweapon_spawn:new({ model = "models/weapons/assaultcannon/w_assaultcannon.mdl", weaponclass = "ff_weapon_assaultcannon", shells = 400 }) +weapon_autorifle = fakeweapon_spawn:new({ model = "models/weapons/autorifle/w_autorifle.mdl", weaponclass = "ff_weapon_autorifle", shells = 400 }) +weapon_crowbar = fakeweapon_spawn:new({ model = "models/weapons/crowbar/w_crowbar.mdl", weaponclass = "ff_weapon_crowbar", }) +weapon_flamethrower = fakeweapon_spawn:new({ model = "models/weapons/flamethrower/w_flamethrower.mdl", weaponclass = "ff_weapon_flamethrower", cells = 400 }) +weapon_grenadelauncher = fakeweapon_spawn:new({ model = "models/weapons/grenadelauncher/w_grenadelauncher.mdl", weaponclass = "ff_weapon_grenadelauncher", rockets = 400 }) +weapon_incendiarycannon = fakeweapon_spawn:new({ model = "models/weapons/incendiarycannon/w_incendiarycannon.mdl", weaponclass = "ff_weapon_ic", rockets = 400 }) +weapon_knife = fakeweapon_spawn:new({ model = "models/weapons/knife/w_knife.mdl", weaponclass = "ff_weapon_knife" }) +weapon_medkit = fakeweapon_spawn:new({ model = "models/weapons/medkit/w_medkit.mdl", weaponclass = "ff_weapon_medkit" }) +weapon_nailgun = fakeweapon_spawn:new({ model = "models/weapons/nailgun/w_nailgun.mdl", weaponclass = "ff_weapon_nailgun", nails = 400 }) +weapon_pipelauncher = fakeweapon_spawn:new({ model = "models/weapons/pipelauncher/w_pipelauncher.mdl", weaponclass = "ff_weapon_pipelauncher", rockets = 400 }) +weapon_railgun = fakeweapon_spawn:new({ model = "models/weapons/railgun/w_railgun.mdl", weaponclass = "ff_weapon_railgun", nails = 400 }) +weapon_rpg = fakeweapon_spawn:new({ model = "models/weapons/rpg/w_rpg.mdl", weaponclass = "ff_weapon_rpg", rockets = 400 }) +weapon_shotgun = fakeweapon_spawn:new({ model = "models/weapons/shotgun/w_shotgun.mdl", weaponclass = "ff_weapon_shotgun", shells = 400 }) +weapon_sniperrifle = fakeweapon_spawn:new({ model = "models/weapons/sniperrifle/w_sniperrifle.mdl", weaponclass = "ff_weapon_sniperrifle", nails = 400 }) +weapon_spanner = fakeweapon_spawn:new({ model = "models/weapons/spanner/w_spanner.mdl", weaponclass = "ff_weapon_spanner" }) +weapon_supernailgun = fakeweapon_spawn:new({ model = "models/weapons/supernailgun/w_supernailgun.mdl", weaponclass = "ff_weapon_supernailgun", nails = 400 }) +weapon_supershotgun = fakeweapon_spawn:new({ model = "models/weapons/supershotgun/w_supershotgun.mdl", weaponclass = "ff_weapon_supershotgun", shells = 400 }) +weapon_tommygun = fakeweapon_spawn:new({ model = "models/weapons/tommygun/w_tommygun.mdl", weaponclass = "ff_weapon_tommygun", shells = 400 }) +weapon_tranq = fakeweapon_spawn:new({ model = "models/weapons/tranq/w_tranq.mdl", weaponclass = "ff_weapon_tranq", nails = 400 }) +weapon_umbrella = fakeweapon_spawn:new({ model = "models/weapons/umbrella/w_umbrella.mdl", weaponclass = "ff_weapon_umbrella" }) + +grenade_pack = fakeweapon_spawn:new({ model = "models/items/backpack/backpack.mdl", gren1 = 4, gren2 = 4 }) + +weapon_sentry = fakeweapon_spawn:new({ weaponclass = "ff_weapon_deploysentrygun" }) +weapon_dispenser = fakeweapon_spawn:new({ weaponclass = "ff_weapon_deploydispenser" }) + +----------------------------------------------------------------------------- +-- class scanner triggers +----------------------------------------------------------------------------- + +function perform_player_scan(player, expectedclass, respawnturret) + + if expectedclass ~= player:GetClass() then + BroadCastMessage("Wrong Class") + respawnturret.killplayer = true + else + --BroadCastMessage("Wrong Class") + end +end + +scanner_class = trigger_ff_script:new({ }) + +function scanner_class:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + AddSchedule("perform_player_scan", 0, perform_player_scan, p, self.class, self.turret) + end + end +end + +function scanner_class:onendtouch() + RemoveSchedule("perform_player_scan") +end + +scout_scanner = scanner_class:new({ class=Player.kScout, }) +sniper_scanner = scanner_class:new({ class=Player.kSniper, }) +soldier_scanner = scanner_class:new({ class=Player.kSoldier, }) +demoman_scanner = scanner_class:new({ class=Player.kDemoman, }) +medic_scanner = scanner_class:new({ class=Player.kMedic, }) +hwguy_scanner = scanner_class:new({ class=Player.kHwguy, }) +pyro_scanner = scanner_class:new({ class=Player.kPyro, }) +engineer_scanner = scanner_class:new({ class=Player.kEngineer, }) +spy_scanner = scanner_class:new({ class=Player.kSpy, }) +civilian_scanner = scanner_class:new({ class=Player.kCivilian, }) + +----------------------------------------------------------------------------- +-- class turrets +----------------------------------------------------------------------------- + +scanner_turret = respawnturret:new({ team = Team.kGreen }) +function scanner_turret:deploydelay( target_entity ) return 0.5 end + +function scanner_turret:validtarget( target_entity ) + --local entity = GetEntity(ent_id) + + if self.killplayer then + local player = CastToPlayer( target_entity ) + if player ~= nil and not player:IsBot() then + return true + end + end + + if not AreTeamsAllied(self.team, target_entity:GetTeamId()) then return true end + + return false +end + +scout_turret = scanner_turret:new({ class=Player.kScout, }) +sniper_turret = scanner_turret:new({ class=Player.kSniper, }) +soldier_turret = scanner_turret:new({ class=Player.kSoldier, }) +demoman_turret = scanner_turret:new({ class=Player.kDemoman, }) +medic_turret = scanner_turret:new({ class=Player.kMedic, }) +hwguy_turret = scanner_turret:new({ class=Player.kHwguy, }) +pyro_turret = scanner_turret:new({ class=Player.kPyro, }) +engineer_turret = scanner_turret:new({ class=Player.kEngineer, }) +spy_turret = scanner_turret:new({ class=Player.kSpy, }) +civilian_turret = scanner_turret:new({ class=Player.kCivilian, }) + +----------------------------------------------------------------------------- +-- class holograms +----------------------------------------------------------------------------- + +base_hologram = info_ff_script:new({ model = "models/player/pyro/pyro.mdl", renderfx = RenderFx.kHologram }) + +scout_hologram = base_hologram:new({ model = "models/player/scout/scout.mdl" }) +sniper_hologram = base_hologram:new({ model = "models/player/sniper/sniper.mdl" }) +soldier_hologram = base_hologram:new({ model = "models/player/soldier/soldier.mdl" }) +demoman_hologram = base_hologram:new({ model = "models/player/demoman/demoman.mdl" }) +medic_hologram = base_hologram:new({ model = "models/player/medic/medic.mdl" }) +hwguy_hologram = base_hologram:new({ model = "models/player/hwguy/hwguy.mdl" }) +pyro_hologram = base_hologram:new({ model = "models/player/pyro/pyro.mdl" }) +engineer_hologram = base_hologram:new({ model = "models/player/engineer/engineer.mdl" }) +spy_hologram = base_hologram:new({ model = "models/player/spy/spy.mdl" }) + +----------------------------------------------------------------------------- +-- Beams +----------------------------------------------------------------------------- + +base_beam = baseclass:new({ startstate="on",startcolor="0 255 0" }) +function base_beam:spawn() + + if startstate == "on" then + OutputEvent( entity:GetName(), "TurnOn" ) + else + OutputEvent( entity:GetName(), "TurnOff" ) + end + + if startstate ~= nil then + OutputEvent( entity:GetName(), "Color", startcolor ) + end + +end + +function base_beam:turnon() + OutputEvent( entity:GetName(), "TurnOn" ) +end + +function base_beam:turnoff() + OutputEvent( entity:GetName(), "TurnOff" ) +end + +function base_beam:setcolor(newcolor) + if newcolor ~= nil then + OutputEvent( entity:GetName(), "Color", newcolor ) + end +end + +----------------------------------------------------------------------------- +-- training room triggers +----------------------------------------------------------------------------- +training_room = trigger_ff_script:new({ }) + +function training_room:allowed() + +-- if self.restrictClass ~= nil then +-- entity:EmitSound(self.speakOnceOnEnter) +-- end + + return EVENT_ALLOWED +end + +function training_room:ontrigger() + --ConsoleToAll("training_room:ontrigger() ") +end + +function training_room:ontouch( touch_entity ) + if IsPlayer( touch_entity ) then + local p = CastToPlayer( touch_entity ) + if not p:IsBot() then + bot.signal(entity:GetName()) + end + end + + ------------------ + ConsoleToAll(entity:GetName() .. " ontouch") + ------------------ +end + +function training_room:onendtouch() + ------------------ + ConsoleToAll(entity:GetName() .. " onendtouch") + ------------------ +end + +function training_room:onfailtouch() +end + +function training_room:onexplode() + return EVENT_ALLOWED +end + +function training_room:onbuild() + return EVENT_ALLOWED +end + +function training_room:onfailuse() +end + +function training_room:onuse() + +end + +function training_room:onactive() +end + +function training_room:oninactive() +end + +function training_room:onremoved() + +end + +function training_room:onrestored() +end + +function training_room:spawn() + +end + +----------------------------------------------------------------------------- +-- current training status +----------------------------------------------------------------------------- + + +----------------------------------------------------------------------------- +-- bot helper functions +----------------------------------------------------------------------------- +function restore_entity(entname) + local info = GetInfoScriptByName(entname) + if info ~= nil then + info:Restore() + end +end + +function remove_entity(entname) + local info = GetInfoScriptByName(entname) + if info ~= nil then + info:Remove() + end +end + +function update_grenadecount(entname, g1, g2) + local info = GetInfoScriptByName(entname) + if info ~= nil then + info.gren1 = tonumber(g1) + info.gren2 = tonumber(g2) + end +end + +function vec_tostring(v) + return string.format("%f %f %f", v.x, v.y, v.z) +end + +bot = {} + +bot.spawnAtEntity = function(spawnent, name, team, class) + local info = GetInfoScriptByName(spawnent) + if info ~= nil then + info:SpawnBot(name, team, class); + end +end + +bot.sendMsg = function(botname, msg, d1, d2, d3) + local p = GetPlayerByName(botname) + if p ~= nil then + p:SendBotMessage(msg, d1, d2, d3) + else + ConsoleToAll("bot.sendMsg: player not found: " .. botname) + end +end + +bot.signal = function(signalname) + SendBotSignal(signalname) +end + +bot.moveTo = function(botname, targetentity) + local e = GetEntityByName(targetentity) + if e ~= nil then + local epos = e:GetOrigin() + local eface = e:GetAbsFacing() + -- convert epos to string + bot.sendMsg(botname, "run_to", vec_tostring(epos), vec_tostring(eface)) + end +end + +bot.setIdlePoint = function(botname, targetentity) + local e = GetEntityByName(targetentity) + if e ~= nil then + local epos = e:GetOrigin() + local eface = e:GetAbsFacing() + -- convert epos to string + bot.sendMsg(botname, "set_idle_position", vec_tostring(epos), vec_tostring(eface)) + end +end + +bot.leaveGame = function(botname) + bot.sendMsg(botname, "leave_game") +end + +-- teleportTo(botname, targetEntName) +-- local p = GetPlayerByName(botname) +-- local e = GetEntityByName(targetentity) +-- if p ~= nil and e ~= nil then +-- p:SetOrigin(e:GetOrigin()) +-- p:SetAngles(e:GetAngles()) +-- else +-- ConsoleToAll("teleportTo: player not found: " .. botname) +-- end +-- end + +function player_giveweapon(weaponname, as) + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + local autoselect = false + if as == "true" then autoselect = true end + player:GiveWeapon(weaponname, autoselect) + end +end + +function player_giveammo(ammoname, amount) + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + if ammoname == "nails" then player:AddAmmo(Ammo.kNails, tonumber(amount)) end + if ammoname == "shells" then player:AddAmmo(Ammo.kShells, tonumber(amount)) end + if ammoname == "rockets" then player:AddAmmo(Ammo.kRockets, tonumber(amount)) end + if ammoname == "cells" then player:AddAmmo(Ammo.kCells, tonumber(amount)) end + if ammoname == "detpack" then player:AddAmmo(Ammo.kDetpack, tonumber(amount)) end + if ammoname == "mancannon" then player:AddAmmo(Ammo.kManCannon, tonumber(amount)) end + if ammoname == "gren1" then player:AddAmmo(Ammo.kGren1, tonumber(amount)) end + if ammoname == "gren2" then player:AddAmmo(Ammo.kGren2, tonumber(amount)) end + end +end +function player_removeweapon(weaponname) + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + player:RemoveWeapon(weaponname) + end +end + +function player_givedetpack() + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + player:AddAmmo(Ammo.kDetpack, 1) + end +end + +function player_givemancannon() + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + player:AddAmmo(Ammo.kManCannon, 1) + end +end + +function player_givegren1() + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + player:AddAmmo(Ammo.kGren1, 4) + end +end + +function player_givegren2() + local c = Collection() + c:GetByFilter({ CF.kHumanPlayers }) + for temp in c.items do + local player = CastToPlayer( temp ) + player:AddAmmo(Ammo.kGren2, 4) + end +end + +function player_removehealth(playername, amt) + p = GetPlayerByName(playername) + if p ~= nil then + p:AddHealth(-tonumber(amt)) + else + ConsoleToAll("player_removehealth: Unable to find " .. playername) + end +end + +function player_removearmor(playername, amt) + p = GetPlayerByName(playername) + if p ~= nil then + p:RemoveArmor(tonumber(amt)) + else + ConsoleToAll("player_removehealth: Unable to find " .. playername) + end +end + +function player_forcerespawn(playername, amt) + p = GetPlayerByName(playername) + if p ~= nil then + ApplyToPlayer(p, { AT.kRespawnPlayers }) + else + ConsoleToAll("player_forcerespawn: Unable to find " .. playername) + end +end + +function broadcast_message(message) + BroadCastMessage(message) +end + +function training_intro(classname) + if classname == "Scout" then + BroadCastSound("training.fem_scout_ovr") + elseif classname == "Sniper" then + BroadCastSound("training.fem_sniper_ovr") + elseif classname == "Soldier" then + BroadCastSound("training.fem_soldier_ovr") + elseif classname == "Demoman" then + BroadCastSound("training.fem_demo_ovr") + elseif classname == "Medic" then + BroadCastSound("training.fem_medic_ovr") + elseif classname == "HwGuy" then + BroadCastSound("training.fem_hwguy_ovr") + elseif classname == "Pyro" then + BroadCastSound("training.fem_pyro_ovr") + elseif classname == "Spy" then + BroadCastSound("training.fem_spy_ovr") + elseif classname == "Engineer" then + BroadCastSound("training.fem_engy_ovr") + end +end + +function section_complete(sectionname, room) + BroadCastSound("training.section_complete") +end + +function training_complete(classname) + if classname == "Scout" then + BroadCastSound("training.fem_scout_comp") + elseif classname == "Sniper" then + BroadCastSound("training.fem_sniper_comp") + elseif classname == "Soldier" then + BroadCastSound("training.fem_soldier_comp") + elseif classname == "Demoman" then + BroadCastSound("training.fem_demo_comp") + elseif classname == "Medic" then + BroadCastSound("training.fem_medic_comp") + elseif classname == "HwGuy" then + BroadCastSound("training.fem_hwguy_comp") + elseif classname == "Pyro" then + BroadCastSound("training.fem_pyro_comp") + elseif classname == "Spy" then + BroadCastSound("training.fem_spy_comp") + elseif classname == "Engineer" then + BroadCastSound("training.fem_engy_comp") + end +end + +function training_classname(classId) + if classId == Player.kScout then return "Scout" end + if classId == Player.kSniper then return "Sniper" end + if classId == Player.kSoldier then return "Soldier" end + if classId == Player.kDemoman then return "Demoman" end + if classId == Player.kMedic then return "Medic" end + if classId == Player.kHwguy then return "HwGuy" end + if classId == Player.kPyro then return "Pyro" end + if classId == Player.kSpy then return "Spy" end + if classId == Player.kEngineer then return "Engineer" end + if classId == Player.kCivilian then return "Civilian" end +end + + diff --git a/motd.txt b/motd.txt new file mode 100644 index 0000000..afe91e0 --- /dev/null +++ b/motd.txt @@ -0,0 +1 @@ +Welcome to Fortress-Forever. \ No newline at end of file diff --git a/pure_server_whitelist.txt b/pure_server_whitelist.txt new file mode 100644 index 0000000..ef660db --- /dev/null +++ b/pure_server_whitelist.txt @@ -0,0 +1,60 @@ +whitelist +{ + // + // 3 modifiers are allowed on file specifications: + // + // from_steam - only check the Steam cache for the file (ignore anything on disk) + // allow_from_disk - allow the file to come from disk + // check_crc - used with allow_from_disk - server does CRC checks on the client's file to make sure it matches + // + // The default modifier on all files is allow_from_disk. Thus, all files can come from disk and don't need CRC checks unless + // allow_from_disk can be set at the same time as check_crc. Use the + character in between them to signify this: allow_from_disk+check_crc. + + + // + // Three types of file specifications: + // + // 1. directory/*.* - refers to all files under the directory + // 2. directory/... - refers to all files under the directory and all directories under that (recursively) + // 3. directory/filename - refers to a single file + + + // + // By default, when in pure server mode, most content file types are only allowed to come from Steam. + // + materials/... allow_from_disk + materials/effects/... allow_from_disk+check_crc + models/... allow_from_disk + models/player/... allow_from_disk+check_crc + models/grenades/... allow_from_disk+check_crc + models/projectiles/... allow_from_disk+check_crc + models/flag/... allow_from_disk+check_crc + shaders/... allow_from_disk+check_crc + sound/... allow_from_disk + sound/sound/player/footsteps/... allow_from_disk+check_crc + sound/buildable/sentry/sg_scan1 allow_from_disk+check_crc + sound/buildable/sentry/sg_scan2 allow_from_disk+check_crc + + // + // Allow custom player models. Don't do CRC checks on them because the clients may all + // have different custom models and the server won't have them all. + // + //models/player/... allow_from_disk + //materials/models/player/... allow_from_disk + + // + // Allow custom spray decals. + // + materials/temp/... allow_from_disk + materials/vgui/logos/... allow_from_disk + materials/vgui/logos/ui/... allow_from_disk + + + // + // (Uncomment and edit these for mods). + // Allow mod resources to come from disk. + // + // materials/mymod/... allow_from_disk+check_crc + // models/mymod/... allow_from_disk+check_crc + // sound/mymod/... allow_from_disk+check_crc +} \ No newline at end of file diff --git a/resource/ClientScheme.res b/resource/ClientScheme.res new file mode 100644 index 0000000..b64c19c --- /dev/null +++ b/resource/ClientScheme.res @@ -0,0 +1,2814 @@ +/////////////////////////////////////////////////////////// +// Fortress Forever scheme resource file +// +// sections: +// Colors - All the colors used by the scheme +// BaseSettings - contains settings for app to use to draw controls +// Fonts - list of all the fonts used by app +// Borders - description of all the borders +// CustomFontFiles - defines fonts to be loaded which are not part of the system +// +// P.S. Advise you turn off wordwrap xP +/////////////////////////////////////////////////////////// +Scheme +{ + /////////////////////////// COLORS /////////////////////////// + Colors + { + /////////////// HUD Colours /////////////// + "HUD_Tone_Bright" "225 235 255 235" + "HUD_Tone_Default" "199 219 255 215" + "HUD_Tone_Dim" "199 219 255 120" + + "HUD_BG_Bright" "109 124 142 185" + "HUD_BG_Default" "109 124 142 115" + "HUD_BG_Dim" "109 124 142 50" + + "HUD_Surface_Bright" "82 92 104 210" + "HUD_Surface_Default" "75 85 95 200" + "HUD_Surface_Dim" "75 85 95 50" + + "HUD_Border_Bright" "255 255 255 255" + "HUD_Border_Default" "245 245 245 230" + "HUD_Border_Dim" "245 245 245 50" + + "Hud_Status_Bright" "255 255 255 255" + "Hud_status_Default" "109 124 142 200" + "Hud_Status_Dim" "109 124 142 100" + + "ArmorIncColor" "255 220 0 255" + "ArmorLowColor" "255 0 0 255" + "ArmorDmgColor" "255 0 0 255" + + "HealthIncColor" "255 220 0 255" + "HealthIncAbove100Color" "0 255 0 255" + "HealthLowColor" "255 0 0 255" + "HealthDmgColor" "255 0 0 255" + + /////////////// VGUI Colours /////////////// + "UI_Tone_Default" "199 219 255 255" + "UI_Tone_Dim" "109 124 142 115" + "UI_Tone_Dark" "75 85 95 115" + + "UI_BG_Highlight" "225 235 255 45" + "UI_BG_Dim" "0 0 0 165" + "UI_BG_Dark" "0 0 0 90" + + //"UI_Slider_Text" "127 140 127 255" + "UI_Slider_Text" "0 255 0 255" + "UI_Slider_Nob" "108 108 108 255" + "UI_Slider_Track" "31 31 31 255" + "UI_Slider_DisabledText1" "117 117 117 255" + "UI_Slider_DisabledText2" "30 30 30 255" + + /////////////// Team Colours /////////////// + "BlueTeamColor" "56 100 171 196" + "RedTeamColor" "188 0 0 196" + "YellowTeamColor" "202 173 33 196" + "GreenTeamColor" "68 144 65 196" + + /////////////// Misc. Colours /////////////// + "Red" "255 0 0 255" + "Yellow" "255 255 0 255" + "Blue" "0 255 0 255" + "Cyan" "0 255 255 255" + "Green" "0 255 0 255" + "Magenta" "255 0 255 255" + + "White" "255 255 255 255" + "Black" "0 0 0 255" + + "Blank" "0 0 0 0" + + "Normal" "109 124 142 115" + "Dark" "50 50 50 180" + } + + /////////////////////////// BASE SETTINGS /////////////////////////// + BaseSettings + { + HudItem.Foreground "HUD_Tone_Default" + HudItem.Background "HUD_BG_Default" + + "TeamColorHud.BackgroundAlpha" "0 0 0 150" + + "FgColor" "HUD_Tone_Default" + "BgColor" "Blank" + + "Panel.FgColor" "HUD_Tone_Default" + "Panel.BgColor" "Blank" + + "BrightFg" "HUD_Tone_Bright" + + "DamagedBg" "Blank" + "DamagedFg" "Red" + "BrightDamagedFg" "Red" + + "ZoomReticleColor" "Green" + + /////////////// Weapon Selection Colours /////////////// + "SelectionNumberFg" "HUD_Tone_Bright" + "SelectionTextFg" "HUD_Tone_Bright" + "SelectionEmptyBoxBg" "HUD_BG_Dim" + "SelectionBoxBg" "HUD_BG_Dim" + "SelectionSelectedBoxBg" "HUD_BG_Dim" + + /////////////// VGUI Colour Specification /////////////// + Border.Bright "UI_Tone_Dark" // the lit side of a control + Border.Dark "UI_Tone_Dark" // the dark/unlit side of a control + Border.Selection "Blank" // the additional border color for displaying the default/selected button + + Button.TextColor "UI_Tone_Default" + Button.BgColor "Blank" + Button.ArmedTextColor "UI_Tone_Default" + Button.ArmedBgColor "UI_BG_Highlight" + Button.DepressedTextColor "UI_Tone_Default" + Button.DepressedBgColor "UI_BG_Highlight" + + CheckButton.TextColor "UI_Tone_Default" + CheckButton.SelectedTextColor "UI_Tone_Default" + CheckButton.BgColor "UI_BG_Dim" + CheckButton.Border1 "Border.Dark" // the left checkbutton border + CheckButton.Border2 "Border.Bright" // the right checkbutton border + CheckButton.Check "UI_Tone_Default" // color of the check itself + + ComboBoxButton.ArrowColor "UI_Tone_Default" + ComboBoxButton.ArmedArrowColor "UI_Tone_Default" + ComboBoxButton.BgColor "UI_BG_Dim" + ComboBoxButton.DisabledBgColor "Blank" + + Frame.BgColor "Blank" + Frame.OutOfFocusBgColor "Blank" + Frame.FocusTransitionEffectTime "0.0" // time it takes for a window to fade in/out on focus/out of focus + Frame.TransitionEffectTime "0.0" // time it takes for a window to fade in/out on open/close + Frame.AutoSnapRange "0" + FrameGrip.Color1 "Blank" + FrameGrip.Color2 "Blank" + FrameTitleButton.FgColor "Blank" + FrameTitleButton.BgColor "Blank" + FrameTitleButton.DisabledFgColor "Blank" + FrameTitleButton.DisabledBgColor "Blank" + FrameSystemButton.FgColor "Blank" + FrameSystemButton.BgColor "Blank" + FrameSystemButton.Icon "" + FrameSystemButton.DisabledIcon "" + FrameTitleBar.TextColor "UI_Tone_Default" + FrameTitleBar.BgColor "Blank" + FrameTitleBar.DisabledTextColor "UI_Tone_Default" + FrameTitleBar.DisabledBgColor "Blank" + + GraphPanel.FgColor "UI_Tone_Default" + GraphPanel.BgColor "UI_BG_Dim" + + Label.TextDullColor "UI_Tone_Default" + Label.TextColor "UI_Tone_Default" + Label.TextBrightColor "UI_Tone_Default" + Label.SelectedTextColor "UI_Tone_Default" + Label.BgColor "Blank" + Label.DisabledFgColor1 "Blank" + Label.DisabledFgColor2 "UI_Tone_Dark" + + ListPanel.TextColor "UI_Tone_Default" + ListPanel.BgColor "UI_BG_Dim" + ListPanel.SelectedTextColor "Black" + ListPanel.SelectedBgColor "UI_BG_Highlight" + ListPanel.SelectedOutOfFocusBgColor "UI_BG_Highlight" + ListPanel.EmptyListInfoTextColor "UI_Tone_Default" + + Menu.TextColor "UI_Tone_Default" + Menu.BgColor "UI_BG_Dim" + Menu.ArmedTextColor "UI_Tone_Default" + Menu.ArmedBgColor "UI_BG_Highlight" + Menu.TextInset "6" + + Chat.TypingText "UI_Tone_Default" + + Panel.FgColor "UI_Tone_Dim" + Panel.BgColor "blank" + + HTML.BgColor "0 0 0 255" + + ProgressBar.FgColor "UI_Tone_Default" + ProgressBar.BgColor "UI_BG_Dim" + + PropertySheet.TextColor "UI_Tone_Default" + PropertySheet.SelectedTextColor "UI_Tone_Default" + PropertySheet.TransitionEffectTime "0.25" // time to change from one tab to another + + RadioButton.TextColor "UI_Tone_Default" + RadioButton.SelectedTextColor "UI_Tone_Default" + + RichText.TextColor "UI_Tone_Default" + RichText.BgColor "Blank" + RichText.SelectedTextColor "UI_Tone_Default" + RichText.SelectedBgColor "Blank" + + ScrollBarButton.FgColor "UI_Tone_Default" + ScrollBarButton.BgColor "Blank" + ScrollBarButton.ArmedFgColor "UI_Tone_Default" + ScrollBarButton.ArmedBgColor "Blank" + ScrollBarButton.DepressedFgColor "UI_Tone_Default" + ScrollBarButton.DepressedBgColor "Blank" + + ScrollBarSlider.FgColor "Blank" // nob color + ScrollBarSlider.BgColor "Blank" // slider background color + + SectionedListPanel.HeaderTextColor "UI_Tone_Default" + SectionedListPanel.HeaderBgColor "Blank" + SectionedListPanel.DividerColor "Black" + SectionedListPanel.TextColor "UI_Tone_Default" + SectionedListPanel.BrightTextColor "UI_Tone_Default" + SectionedListPanel.BgColor "UI_BG_Dark" + SectionedListPanel.SelectedTextColor "Black" + SectionedListPanel.SelectedBgColor "UI_BG_Highlight" + SectionedListPanel.OutOfFocusSelectedTextColor "Black" + SectionedListPanel.OutOfFocusSelectedBgColor "UI_BG_Highlight" + + Slider.TextColor "UI_Slider_Text" + Slider.NobColor "UI_Slider_Nob" + Slider.TrackColor "UI_Slider_Track" + Slider.DisabledTextColor1 "UI_Slider_DisabledText1" + Slider.DisabledTextColor2 "UI_Slider_DisabledText1" + + TextEntry.TextColor "UI_Tone_Default" + TextEntry.BgColor "UI_BG_Dim" + TextEntry.CursorColor "UI_Tone_Default" + TextEntry.DisabledTextColor "UI_Tone_Default" + TextEntry.DisabledBgColor "Blank" + TextEntry.SelectedTextColor "Black" + TextEntry.SelectedBgColor "UI_BG_Highlight" + TextEntry.OutOfFocusSelectedBgColor "UI_BG_Highlight" + TextEntry.FocusEdgeColor "UI_BG_Dim" + + ToggleButton.SelectedTextColor "UI_Tone_Default" + + Tooltip.TextColor "UI_BG_Dim" + Tooltip.BgColor "UI_BG_Highlight" + + TreeView.BgColor "UI_BG_Dim" + + WizardSubPanel.BgColor "Blank" + + // Top-left corner of the main screen title + "Main.Title1.X" "76" //76 + "Main.Title1.Y" "194" //184 + "Main.Title1.Color" "White" + + // Top-left corner of the menu on the main screen + "Main.Menu.X" "76" + "Main.Menu.Y" "250" //240 + + // Blank space to leave beneath the menu on the main screen + "Main.BottomBorder" "40" + + "FFButton.BgColor" "HUD_Surface_Default" + "FFButton.BgColorArmed" "HUD_Surface_Bright" + "FFButton.BgColorPressed" "HUD_Surface_Bright" + "FFButton.BgColorDisabled" "HUD_Surface_Dim" + + "FFButton.FgColor" "HUD_Border_Default" + "FFButton.FgColorArmed" "HUD_Border_Bright" + "FFButton.FgColorPressed" "HUD_Border_Bright" + "FFButton.FgColorDisabled" "HUD_Border_Dim" + } + + /////////////////////////// FONTS /////////////////////////// + Fonts + { + // fonts are used in order that they are listed + "DebugFixed" + { + "1" + { + "name" "Courier New" + "tall" "14" + "weight" "400" + "antialias" "1" + } + } + // fonts are used in order that they are listed + "DebugFixedSmall" + { + "1" + { + "name" "Courier New" + "tall" "14" + "weight" "400" + "antialias" "1" + } + } + // fonts listed later in the order will only be used if they fulfill a range not already filled + // if a font fails to load then the subsequent fonts will replace + + "Default" // death messages, not sure bout what else + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + } + "2" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + } + } + + "Default_Shadow" // death messages, not sure bout what else + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + + "DefaultBG" // used for testing shoks crosshair thing + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "blur" "3" + "additive" "0" + } + "2" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "blur" "3" + "additive" "0" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "blur" "3" + "additive" "0" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "blur" "3" + "additive" "0" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "blur" "3" + "additive" "0" + } + } + + HudQuickmenu + { + "1" + { + "name" "FortressForever - HUD Glyphs" + "custom" "1" + "tall" "16" + "weight" "0" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Glyphs" + "custom" "1" + "tall" "18" + "weight" "0" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Glyphs" + "custom" "1" + "tall" "24" + "weight" "0" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Glyphs" + "custom" "1" + "tall" "32" + "weight" "0" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Glyphs" + "custom" "1" + "tall" "40" + "weight" "0" + "antialias" "1" + "yres" "1200 10000" + } + } + HudNumbers2 + { + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "32" + "weight" "0" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "35" + "weight" "0" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "37" + "weight" "0" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "43" + "weight" "0" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "47" + "weight" "0" + "antialias" "1" + "yres" "1200 10000" + "additive" "1" + } + } + "DefaultSmall" // doesn't appear to be used + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "480 599" + } + "2" + { + "name" "Verdana" + "tall" "13" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "600 767" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "768 1023" + "antialias" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "1024 1199" + "antialias" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "1200 6000" + "antialias" "1" + } + "6" + { + "name" "Arial" + "tall" "12" + "range" "0x0000 0x00FF" + "weight" "0" + } + } + "DefaultSmall_Shadow" // doesn't appear to be used + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "480 599" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "13" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "600 767" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "768 1023" + "antialias" "1" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "1024 1199" + "antialias" "1" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "0" + "range" "0x0000 0x017F" + "yres" "1200 6000" + "antialias" "1" + "dropshadow" "1" + } + "6" + { + "name" "Arial" + "tall" "12" + "range" "0x0000 0x00FF" + "weight" "0" + "dropshadow" "1" + } + } + "DefaultVerySmall" // doesn't appear to be used + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "480 599" + } + "2" + { + "name" "Verdana" + "tall" "13" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "600 767" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "768 1023" + "antialias" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "1024 1199" + "antialias" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "1200 6000" + "antialias" "1" + } + "6" + { + "name" "Verdana" + "tall" "12" + "range" "0x0000 0x00FF" + "weight" "0" + } + "7" + { + "name" "Arial" + "tall" "11" + "range" "0x0000 0x00FF" + "weight" "0" + } + } + "DefaultVerySmall_Shadow" // doesn't appear to be used + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "480 599" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "13" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "600 767" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "768 1023" + "antialias" "1" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "1024 1199" + "antialias" "1" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + "yres" "1200 6000" + "antialias" "1" + "dropshadow" "1" + } + "6" + { + "name" "Verdana" + "tall" "12" + "range" "0x0000 0x00FF" + "weight" "0" + "dropshadow" "1" + } + "7" + { + "name" "Arial" + "tall" "11" + "range" "0x0000 0x00FF" + "weight" "0" + "dropshadow" "1" + } + } + Crosshairs + { + "1" + { + "name" "HalfLife2" + "tall" "40" + "weight" "0" + "antialias" "0" + "additive" "1" + "custom" "1" + "yres" "1 10000" + } + } + QuickInfo + { + "1" + { + "name" "HL2cross" + "tall" "28" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + HudNumbers + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "32" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + HudNumbersGlow + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "32" + "weight" "0" + "blur" "4" + "scanlines" "2" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + HudNumbersSmall + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "16" + "weight" "1000" + "additive" "1" + "antialias" "1" + "custom" "1" + } + } + HudSelectionNumbers + { + "1" + { + "name" "Verdana" + "tall" "11" + "weight" "700" + "antialias" "1" + "additive" "1" + } + } + + "HudHintCenterIcon" + { + "1" + { + "name" "FortressForever - Hud Glyphs" + "tall" "32" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + + "HudHintCenterIconGlow" + { + "1" + { + "name" "FortressForever - Hud Glyphs" + "tall" "32" + "weight" "0" + "blur" "4" + "scanlines" "2" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + + HudAddHealth + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "16" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + + HudTeamScore + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "14" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + + HudPlayerScore + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "16" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + HudPlayerScoreDesc + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "12" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + + HudPlayerScoreBG + { + "1" + { + "name" "Verdana" + "tall" "18" + "weight" "1000" + "antialias" "1" + "blur" "5" + "additive" "0" + } + } + + HudPlayerScoreDescBG + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "1000" + "antialias" "1" + "blur" "5" + "additive" "0" + } + } + + HudBonusScore + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "12" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + + HudBonusScoreDesc + { + "1" + { + "name" "FortressForever - HUD Font CAPS" + "tall" "10" + "weight" "0" + "antialias" "1" + "additive" "0" + "dropshadow" "1" + } + } + HudHintTextLarge + { + "1" + { + "name" "Verdana" + "tall" "14" + "weight" "1000" + "antialias" "1" + "additive" "1" + } + } + HudHintTextSmall + { + "1" + { + "name" "Verdana" + "tall" "11" + "weight" "0" + "antialias" "1" + "additive" "1" + } + } + + BudgetLabel + { + "1" + { + "name" "Courier New" + "tall" "14" + "weight" "400" + "outline" "1" + } + } + DebugOverlay + { + "1" + { + "name" "Courier New" + "tall" "14" + "weight" "400" + "outline" "1" + } + } + "CloseCaption_Normal" + { + "1" + { + "name" "Tahoma" + "tall" "26" + "weight" "500" + "dropshadow" "1" + } + } + "CloseCaption_Italic" + { + "1" + { + "name" "Tahoma" + "tall" "26" + "weight" "500" + "italic" "1" + "dropshadow" "1" + } + } + "CloseCaption_Bold" + { + "1" + { + "name" "Tahoma" + "tall" "26" + "weight" "900" + "dropshadow" "1" + } + } + "CloseCaption_BoldItalic" + { + "1" + { + "name" "Tahoma" + "tall" "26" + "weight" "900" + "italic" "1" + "dropshadow" "1" + } + } + + // this is the symbol font + "Marlett" + { + "1" + { + "name" "Marlett" + "tall" "14" + "weight" "0" + "symbol" "1" + } + } + "Trebuchet24" + { + "1" + { + "name" "Trebuchet MS" + "tall" "24" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + "antialias" "1" + "additive" "1" + } + } + "Trebuchet18" + { + "1" + { + "name" "Trebuchet MS" + "tall" "18" + "weight" "900" + } + } + "ClientTitleFont" // Main Title above resume game etc.. + { + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "24" + "weight" "0" + "additive" "0" + "antialias" "1" + "yres" "480 599" + } + + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "40" + "weight" "0" + "additive" "0" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "48" + "weight" "0" + "additive" "0" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "80" + "weight" "0" + "yres" "1024 1199" + "antialias" "1" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "96" + "weight" "0" + "yres" "1200 6000" + "antialias" "1" + } + } + CreditsLogo + { + "1" + { + "name" "HalfLife2" + "tall" "128" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + CreditsText + { + "1" + { + "name" "Trebuchet MS" + "tall" "20" + "weight" "900" + "antialias" "1" + "additive" "1" + } + } + CreditsOutroLogos + { + "1" + { + "name" "HalfLife2" + "tall" "48" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + CreditsOutroText + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "900" + "antialias" "1" + } + } + CenterPrintText + { + // note that this scales with the screen resolution + "1" + { + "name" "Trebuchet MS" + "tall" "18" + "weight" "900" + "antialias" "1" + "additive" "1" + } + } + "ChatFont" + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "yres" "480 599" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "13" + "weight" "700" + "yres" "600 767" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "700" + "yres" "768 1023" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "700" + "yres" "1024 1199" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "700" + "yres" "1200 10000" + "dropshadow" "1" + } + } + ///////////////////////////NEW STUFF///////////////////////////// + + + + HudSelectionText //Text below weapon selection glyphs + { + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "9" + "weight" "500" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "11" + "weight" "500" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "13" + "weight" "600" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "16" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "17" + "weight" "1000" + "antialias" "1" + "yres" "1200 10000" + } + } + "MenuTitle" // class menu title, flythrough title etc + { + + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "18" + "weight" "500" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "18" + "weight" "500" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "24" + "weight" "600" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "36" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "48" + "weight" "1000" + "antialias" "1" + "yres" "1200 10000" + } + } + ClassMenu // class selection text + { + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "10" + "weight" "300" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "12" + "weight" "500" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "14" + "weight" "500" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "20" + "weight" "1000" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "24" + "weight" "1000" + "antialias" "1" + "yres" "1200 10000" + } + } + "HUD_BackGround" // hud shape glyphs + { + "1" + { + "name" "FortressForever - HUD Glyphs" + "tall" "31" + "custom" "1" + "antialias" "1" + } + } + "HUD_ForeGround" // hud shape glyphs + { + "1" + { + "name" "FortressForever - HUD Glyphs" + "tall" "31" + "custom" "1" + "antialias" "1" + } + } + "HUD_NumSmall" + { + "1" + { + "name" "FortressForever - HUD Glyphs" + "tall" "10" + "custom" "1" + "antialias" "1" + + } + } + "HUD_NumLarge" + { + "1" + { + "name" "FortressForever - HUD Glyphs" + "tall" "20" + "custom" "1" + "antialias" "1" + + } + } + "HUD_TextSmall" // font used when you disguise + { + "1" + { + "name" "FortressForever - HUD Font" // Tahoma + "tall" "10" + "antialias" "1" + } + } + "HUD_TextSmall_Shadow" // font used when you disguise + { + "1" + { + "name" "FortressForever - HUD Font" // Tahoma + "tall" "10" + "antialias" "1" + "dropshadow" "1" + } + } + "HUD_TextRoundInfo" + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "12" + "custom" "1" + "antialias" "1" + "additive" "0" + } + } + "WeaponIcons" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "64" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "WeaponIconsSelected" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "64" + "weight" "0" + "antialias" "1" + "blur" "5" + "scanlines" "2" + "additive" "1" + "custom" "1" + } + } + "WeaponIconsClassSelect" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "50" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "WeaponIconsHUD" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "38" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "WeaponIconsSmall" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "28" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "AmmoIconsSmall" + { + "1" + { + "name" "FortressForever - Item Glyphs" + "tall" "16" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "StatusGlyphs" + { + "1" + { + "name" "FortressForever - Status Glyphs" + "tall" "48" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "StatusGlyphsSmall" + { + "1" + { + "name" "FortressForever - Status Glyphs" + "tall" "20" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "GrenadeIcons" + { + "1" + { + "name" "FortressForever - Status Glyphs" + "tall" "18" + "weight" "0" + "antialias" "1" + //"dropshadow" "1" + } + } + "GrenadeAmmoIcons" + { + "1" + { + "name" "FortressForever - Status Glyphs" + "tall" "28" + "weight" "0" + "antialias" "1" + "additive" "1" + "custom" "1" + } + } + "ClassGlyphs" // icons on hud when you disguise and such + { + "1" + { + "name" "FortressForever - Hud Glyphs" + "tall" "26" + "weight" "0" + "antialias" "1" + "additive" "0" + "custom" "1" + } + } + + "TeamMenuTitles_small" + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "8" // 6 + "weight" "0" + "antialias" "1" + } + } + "TeamMenuTitles" + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "10" // 6 + "weight" "0" + "antialias" "1" + } + } + + "TeamMenuTitles_large" + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "12" // 6 + "weight" "0" + "antialias" "1" + } + } + + "TeamMenuTitles_small" + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "8" // 6 + "weight" "0" + "antialias" "1" + } + } + + "Tahoma8" // after you've joined server-map information titles and shit, now replaced + { + "1" + { + "name" "Tahoma" + "tall" "8" // 6 + "weight" "0" + "antialias" "1" + } + } + "Tahoma12" + { + "1" + { + "name" "Tahoma" + "tall" "12" // 6 + "weight" "0" + "antialias" "1" + } + + } + "Tahoma16" // Scoreboard listing of map and server name? + { + "1" + { + "name" "Tahoma" + "tall" "16" // 12 + "weight" "700" + "antialias" "1" + } + } + "Scoreboard" // Column titles and player list + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "10" + "weight" "0" + "dropshadow" "1" + "antialias" "1" + "yres" "1 599" + } + + "2" + { + "name" "FortressForever - HUD Font" + "tall" "12" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "tall" "14" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "tall" "20" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "tall" "24" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "1200 9999" + } + } + "Scoreboard_Header" // Main Scoreboard titles + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "14" + "weight" "0" + "dropshadow" "1" + "antialias" "1" + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "tall" "16" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "tall" "18" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "tall" "24" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "tall" "32" + "weight" "0" + "antialias" "1" + "dropshadow" "1" + "yres" "1200 9999" + } + } + + "LuaText_Default" // used for Lua hud timers, text, etc + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + "LuaText1" + { + "1" + { + "name" "Verdana" + "tall" "9" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "14" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + "LuaText2" + { + "1" + { + "name" "Verdana" + "tall" "12" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "14" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "20" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "30" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + "LuaText3" + { + "1" + { + "name" "Verdana" + "tall" "14" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "20" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "24" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "30" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "36" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + "LuaText4" + { + "1" + { + "name" "Verdana" + "tall" "20" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "24" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "30" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "36" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "40" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + "LuaText5" + { + "1" + { + "name" "Verdana" + "tall" "24" + "weight" "700" + "antialias" "1" + "yres" "1 599" + "additive" "0" + "dropshadow" "1" + } + "2" + { + "name" "Verdana" + "tall" "30" + "weight" "700" + "antialias" "1" + "yres" "600 767" + "additive" "0" + "dropshadow" "1" + } + "3" + { + "name" "Verdana" + "tall" "36" + "weight" "900" + "antialias" "1" + "yres" "768 1023" + "additive" "0" + "dropshadow" "1" + } + "4" + { + "name" "Verdana" + "tall" "40" + "weight" "900" + "antialias" "1" + "yres" "1024 1199" + "additive" "0" + "dropshadow" "1" + } + "5" + { + "name" "Verdana" + "tall" "48" + "weight" "900" + "antialias" "1" + "yres" "1200 10000" + "additive" "0" + "dropshadow" "1" + } + } + } + + /////////////////////////// BORDERS /////////////////////////// + Borders + { + BaseBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + TitleButtonBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + TitleButtonDisabledBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BgColor" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BgColor" + "offset" "1 0" + } + } + Top + { + "1" + { + "color" "BgColor" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BgColor" + "offset" "0 0" + } + } + } + + TitleButtonDepressedBorder + { + "inset" "1 1 1 1" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + ScrollBarButtonBorder + { + "inset" "1 0 0 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ScrollBarButtonDepressedBorder + { + "inset" "2 2 0 0" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + ButtonBorder + { + "inset" "0 0 0 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "1 1" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ScoreBoardItemBorder + { + "inset" "0 0 0 0" + Left + { + "1" + { + "color" "White" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "White" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "White" + "offset" "1 1" + } + } + + Bottom + { + "1" + { + "color" "White" + "offset" "0 0" + } + } + } + + FrameBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "ControlBG" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "ControlBG" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "ControlBG" + "offset" "0 1" + } + } + + Bottom + { + "1" + { + "color" "ControlBG" + "offset" "0 0" + } + } + } + + TabBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + TabActiveBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "ControlBG" + "offset" "6 2" + } + } + } + + + ToolTipBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + // this is the border used for default buttons (the button that gets pressed when you hit enter) + ButtonKeyFocusBorder + { + "inset" "0 0 0 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "1 1" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ButtonDepressedBorder + { + "inset" "0 0 0 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "1 1" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ComboBoxBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + MenuBorder + { + "inset" "1 1 1 1" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + BrowserBorder + { + "inset" "0 0 0 0" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + } + + /////////////////////////// CUSTOM FONT FILES /////////////////////////// + CustomFontFiles + { + "1" "resource/HUDGlyphs.ttf" + "2" "resource/ItemGlyphs.ttf" + "3" "resource/StatusGlyphs.ttf" + "4" "resource/Crosshairs.ttf" + "5" "resource/HALFLIFE2.ttf" + "6" "resource/HL2crosshairs.ttf" + "7" "resource/HUDfont.ttf" + "8" "resource/HUDfont_caps.ttf" + } +} diff --git a/resource/CrosshairScheme.res b/resource/CrosshairScheme.res new file mode 100644 index 0000000..88d0d0a --- /dev/null +++ b/resource/CrosshairScheme.res @@ -0,0 +1,127 @@ +/////////////////////////////////////////////////////////// +// Crosshair scheme resource file +// +// Here you can apply a number of additional effects which aren't available in +// the main option screen (some of which will work better than others). You're +// advised to leave the 'tall' values alone, the crosshair font was specifically +// engineered for these values and other ones may cause certain glyphs to +// misalign. Likewise, keep anti-aliasing set to 1 for best results. +// +// Additional switches; +// additive, blur, dropshadow, outline, scanlines, weight +// +// Peace out, +// ~~~Fooley^Cooley. B) +/////////////////////////////////////////////////////////// +Scheme +{ + Fonts + { + "PrimaryCrosshairs1" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "12" //20 + "custom" "1" + "antialias" "0" + } + } + "PrimaryCrosshairs2" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "16" //30 + "custom" "1" + "antialias" "1" + } + } + "PrimaryCrosshairs3" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "20" //40 + "custom" "1" + "antialias" "1" + } + } + "PrimaryCrosshairs4" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "30" //52 + "custom" "1" + "antialias" "1" + } + } + "PrimaryCrosshairs5" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "40" //60 + "custom" "1" + "antialias" "1" + } + } + + "SecondaryCrosshairs1" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "30" //52 + "custom" "1" + "antialias" "1" + } + } + "SecondaryCrosshairs2" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "40" //72 + "custom" "1" + "antialias" "1" + } + } + "SecondaryCrosshairs3" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "52" //80 + "custom" "1" + "antialias" "1" + } + } + "SecondaryCrosshairs4" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "64" //100 + "custom" "1" + "antialias" "1" + } + } + "SecondaryCrosshairs5" + { + "1" + { + "name" "FontressForever - Crosshairs" + "tall" "72" //114 + "custom" "1" + "antialias" "1" + } + } + } + + CustomFontFiles + { + "1" "resource/Crosshairs.ttf" + } +} \ No newline at end of file diff --git a/resource/Crosshairs.ttf b/resource/Crosshairs.ttf new file mode 100644 index 0000000..eb2bfe2 Binary files /dev/null and b/resource/Crosshairs.ttf differ diff --git a/resource/Font Layouts.txt b/resource/Font Layouts.txt new file mode 100644 index 0000000..e6e7394 --- /dev/null +++ b/resource/Font Layouts.txt @@ -0,0 +1,222 @@ +This is a temp file which basically just shows what +glyphs are planned and what characters they correspond +to. Glyphs with * have been completed. + +Characters to avoid (so far): + + "& + +************************************************** +ItemGlyphs.ttf +************************************************** + +Ammo glyphs + +1 * Shells (Shotgun) +2 * Shells (SuperShotgun) +3 * Shells (SniperRifle) +4 * Shells (Assault Cannon/AutoRifle) +5 * Nails (Nailgun/SuperNailgun) +6 * Nails (Railgun) +7 * Nails (Tranq/RadioTag) +8 * Rockets (RPG) +9 * Rockets (IC) +0 * Rockets (GL/PL) +- Fuel (Spanner) += Fuel (Flamethrower) + +Weapon Selection glyphs + +a * Crowbar +b * Knife +c Medkit +d * Spanner +e Umbrella +f Flag +g Shotgun +h * SuperShotgun +i * Nailgun +j * SuperNailgun +k SniperRifle +l AutoRifle +m * GrenadeLauncher +n * PipeLauncher +o * Flamethrower +p Incendiary Cannon +q * RPG +r * Assault Cannon +s * Tranq +t * Railgun + +A Detpack +B Dispenser +C SentryGun + +Grenade glyphs + +\ Frag Grenade +, Nail Grenade +. EMP Grenade +/ MIRV Grenade +| Napalm Grenade +< Caltrops +> Gas Grenade +? Conc Grenade + +************************************************** +StatusGlyphs +************************************************** + +Status effect glyphs + +1 * Conc +2 * Plague +3 * Leg Injury (Sniped) +4 * Leg Injury (Caltrop) +5 * Tranq +6 * Hallucinations +7 * Fire +8 * Drowning +9 * Radiation +0 * Cold +- Toxic + +Weapon Death glyphs + +a * Crowbar +b * Knife +c Medkit +d * Spanner +e Umbrella +f Flag +g Shotgun +h * SuperShotgun +i * Nailgun +j * SuperNailgun +k SniperRifle +l AutoRifle +m * GrenadeLauncher +n * PipeLauncher +o * Flamethrower +p Incendiary Cannon +q * RPG +r * Assault Cannon +s * Tranq +t * Railgun + +A Detpack +B Dispenser +C SentryGun Level 1 +D SentryGun Level 2 +E SentryGun Level 3 +F Plagued +G Headshot + +Environmental Death glyphs + +M * Fall death +N * Crushed (Lifts etc.) +O * Physics death +P * Respawn Turret +Q * Lasered +R Burned +S Drowned +T Radiation +U Froze + +Grenade Death glyphs + +\ Frag Grenade +, Nail Grenade +. EMP Grenade +/ MIRV Grenade +| Napalm Grenade +< Caltrops +> Gas Grenade + +************************************************** +HUDGlyphs +************************************************** + +Numerics + +1 * 1 +2 * 2 +3 * 3 +4 * 4 +5 * 5 +6 * 6 +7 * 7 +8 * 8 +9 * 9 +0 * 0 +- * - += Infinity symbol +: * Colon + +Class glyphs + +! * Scout +@ * Sniper +# * Soldier +$ * Demoman +% * Medic +^ * HWGuy +? * Pyro +* * Spy +( * Engineer +) * Civilian +_ * Random + +HUD elements + +a * Location Box (Background) +b * Location Box (Foreground) +c * Health Box (Background) +d * Health Box (Foreground) +e * Armour Box (Background) +f * Armour Box (Foreground) +g * Weapon Box (Background) +h * Weapon Box (Foreground) +i * Ammo Carried Box (Background) +j * Ammo Carried Box (Foreground) +k * Ammo Loaded Box (Background) +l * Ammo Loaded Box (Foreground) +m * Primary Gren Box (Background) +n * Primary Gren Box (Foreground) +o * Secondary Gren Box (Background) +p * Secondary Gren Box (Foreground) + +Structure Glyphs + +[ SentryGun Level 1 +] SentryGun Level 2 +{ SentryGun Level 3 +} Dispenser + +Logos + +, Blue Team +. Red Team +< Yellow Team +> Green Team +/ FF Logo + +Goal item glyphs + + Flag + Keycard + Ball + Gasmask + Lasers + Detpack destructible terrain + +Misc glyphs + + Simple flag glyph + Capture point glyph + Healme + Repairme + DON'T SHOOT ME I'M A SPY + In 'nobuild' area + In 'nogrens' area \ No newline at end of file diff --git a/resource/FortressForever_english.txt b/resource/FortressForever_english.txt new file mode 100644 index 0000000..693db90 Binary files /dev/null and b/resource/FortressForever_english.txt differ diff --git a/resource/GameMenu.res b/resource/GameMenu.res new file mode 100644 index 0000000..f9843e7 --- /dev/null +++ b/resource/GameMenu.res @@ -0,0 +1,62 @@ +"GameMenu" +{ + "1" + { + "label" "#GameUI_GameMenu_ResumeGame" + "command" "ResumeGame" + "OnlyInGame" "1" + } + "2" + { + "label" "#GameUI_GameMenu_Disconnect" + "command" "Disconnect" + "OnlyInGame" "1" + } + "3" + { + "label" "#GameUI_GameMenu_PlayerList" + "command" "OpenPlayerListDialog" + "OnlyInGame" "1" + } + "4" + { + "label" "#GameUI_GameMenu_FindServers" + "command" "OpenServerBrowser" + } + "5" + { + "label" "#GameUI_GameMenu_CreateServer" + "command" "OpenCreateMultiplayerGameDialog" + } + "6" + { + "label" "#GameUI_GameMenu_Training" + "command" "engine ff_training" + } + "7" + { + "label" "#GameUI_GameMenu_Friends" + "command" "OpenFriendsDialog" + } + "8" + { + "label" "#GameUI_GameMenu_Options" + "command" "OpenOptionsDialog" + } + "9" + { + "label" "#GameUI_GameMenu_FFOptions" + "command" "engine ff_options" + } +// "10" +// { +// "label" "#GameUI_GameMenu_MP3Player" +// "command" "engine mp3" +// } + "11" + { + "label" "#GameUI_GameMenu_Quit" + "command" "Quit" + } +} + diff --git a/resource/HUDGlyphs.ttf b/resource/HUDGlyphs.ttf new file mode 100644 index 0000000..8682a96 Binary files /dev/null and b/resource/HUDGlyphs.ttf differ diff --git a/resource/HUDfont.ttf b/resource/HUDfont.ttf new file mode 100644 index 0000000..f6693c0 Binary files /dev/null and b/resource/HUDfont.ttf differ diff --git a/resource/HUDfont_caps.ttf b/resource/HUDfont_caps.ttf new file mode 100644 index 0000000..2b1afb4 Binary files /dev/null and b/resource/HUDfont_caps.ttf differ diff --git a/resource/ItemGlyphs.ttf b/resource/ItemGlyphs.ttf new file mode 100644 index 0000000..e54fa52 Binary files /dev/null and b/resource/ItemGlyphs.ttf differ diff --git a/resource/LoadingDialogNoBanner.res b/resource/LoadingDialogNoBanner.res new file mode 100644 index 0000000..8308901 --- /dev/null +++ b/resource/LoadingDialogNoBanner.res @@ -0,0 +1,85 @@ +"Resource/LoadingDialog.res" //credit to dystopia mod team for optimal locations +{ + "LoadingDialog" + { + "ControlName" "Frame" + "fieldName" "LoadingDialog" + "xpos" "322" + "ypos" "249" + "wide" "800" + "tall" "600" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ImagePanel" + { + "ControlName" "ImagePanel" + "fieldName" "ImagePanelLogo" + "xpos" "20" + "ypos" "24" + "wide" "760" + "tall" "540" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "loading_screen_map" + "scaleImage" "1" + } + "InfoLabel" + { + "ControlName" "Label" + "fieldName" "InfoLabel" + "xpos" "470" + "ypos" "570" + "wide" "250" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "1" + "brighttext" "0" + } + "progress" + { + "ControlName" "ProgressBar" + "fieldName" "Progress" + "xpos" "60" + "ypos" "570" + "wide" "400" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "720" + "ypos" "570" + "wide" "72" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "Cancel" + "Default" "0" + } +} diff --git a/resource/LoadingDialogNoBannerSingle.res b/resource/LoadingDialogNoBannerSingle.res new file mode 100644 index 0000000..1a630d0 --- /dev/null +++ b/resource/LoadingDialogNoBannerSingle.res @@ -0,0 +1,85 @@ +"Resource/LoadingDialog.res" //credit to dystopia mod for optimal locations! +{ + "LoadingDialog" + { + "ControlName" "Frame" + "fieldName" "LoadingDialog" + "xpos" "322" + "ypos" "249" + "wide" "800" + "tall" "600" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ImagePanel" + { + "ControlName" "ImagePanel" + "fieldName" "ImagePanelLogo" + "xpos" "20" + "ypos" "24" + "wide" "760" + "tall" "540" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "loading_screen_map" + "scaleImage" "1" + } + "InfoLabel" + { + "ControlName" "Label" + "fieldName" "InfoLabel" + "xpos" "470" + "ypos" "570" + "wide" "250" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "1" + "brighttext" "0" + } + "progress" + { + "ControlName" "ProgressBar" + "fieldName" "Progress" + "xpos" "60" + "ypos" "570" + "wide" "400" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "720" + "ypos" "570" + "wide" "72" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "Cancel" + "Default" "0" + } +} diff --git a/resource/LoadingDialogVAC.res b/resource/LoadingDialogVAC.res new file mode 100644 index 0000000..e235f8f --- /dev/null +++ b/resource/LoadingDialogVAC.res @@ -0,0 +1,101 @@ +"Resource/LoadingDialog.res" //credit to dystopia mod for optimal locations! +{ + "LoadingDialog" + { + "ControlName" "Frame" + "fieldName" "LoadingDialog" + "xpos" "322" + "ypos" "249" + "wide" "800" + "tall" "600" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ImagePanel" + { + "ControlName" "ImagePanel" + "fieldName" "ImagePanelLogo" + "xpos" "20" + "ypos" "24" + "wide" "760" + "tall" "540" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "loading_screen_map" + "scaleImage" "1" + } + "InfoLabel" + { + "ControlName" "Label" + "fieldName" "InfoLabel" + "xpos" "470" + "ypos" "570" + "wide" "250" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "1" + "brighttext" "0" + } + "VACImage" + { + "ControlName" "ImagePanel" + "fieldName" "VACImage" + "xpos" "20" + "ypos" "565" + "wide" "64" + "tall" "64" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "border" "" + "scaleimage" "1" + "image" "resource/icon_vac" + } + "progress" + { + "ControlName" "ProgressBar" + "fieldName" "Progress" + "xpos" "60" + "ypos" "570" + "wide" "400" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "720" + "ypos" "570" + "wide" "72" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "Cancel" + "Default" "0" + } +} diff --git a/resource/ModEvents.res b/resource/ModEvents.res new file mode 100644 index 0000000..c9c7334 --- /dev/null +++ b/resource/ModEvents.res @@ -0,0 +1,222 @@ +//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. =========== +// +// The copyright to the contents herein is the property of Valve, L.L.C. +// The contents may be used and/or copied only with the written permission of +// Valve, L.L.C., or in accordance with the terms and conditions stipulated in +// the agreement/contract under which the contents have been supplied. +//============================================================================= + +// No spaces in event names, max length 32 +// All strings are case sensitive +// +// valid data key types are: +// string : a zero terminated string +// bool : unsigned int, 1 bit +// byte : unsigned int, 8 bit +// short : signed int, 16 bit +// long : signed int, 32 bit +// float : float, 32 bit +// local : any data, but not networked to clients +// +// following key names are reserved: +// local : if set to 1, event is not networked to clients +// unreliable : networked, but unreliable +// suppress : never fire this event +// time : firing server time +// eventid : holds the event ID + +"ffevents" +{ + "player_sayteam" + { + "userid" "short" + "text" "string" + } + "player_death" // a game event, name may be 32 charaters long + { + // this extents the original player_death by a new + // field "headshot", all other fields remains the same + "userid" "short" + "attacker" "short" + "weapon" "string" // weapon name killer used + "damagetype" "long" // damage type + "killersglevel" "short" + } + + // From here down are events necessary for bot support. + "player_changeclass" + { + "userid" "short" + "oldclass" "short" + "newclass" "short" + } + + "build_dispenser" + { + "userid" "short" // who built it + } + + "build_sentrygun" + { + "userid" "short" + } + + "build_detpack" + { + "userid" "short" + } + + "build_mancannon" + { + "userid" "short" + } + + "detpack_detonated" + { + "userid" "short" + } + + "sentrygun_killed" + { + "userid" "short" // owner + "attacker" "short" + "weapon" "string" + "attackerpos" "string" + "killedsglevel" "short" + "killersglevel" "short" + } + + "dispenser_killed" + { + "userid" "short" // owner + "attacker" "short" + "weapon" "string" + "killersglevel" "short" + } + + "mancannon_detonated" + { + "userid" "short" // owner + } + + "mancannon_killed" + { + "userid" "short" // owner + "attacker" "short" + "weapon" "string" + "killersglevel" "short" + } + + "sentrygun_upgraded" + { + "userid" "short" // upgrader + "sgownerid" "short" // owner + "level" "short" + } + + "disguised" + { + "userid" "short" + "team" "short" + "class" "short" + } + + "disguise_lost" + { + "userid" "short" + "attackerid" "short" + } + + "cloak_lost" + { + "userid" "short" + "attackerid" "short" + } + + "uncloaked" + { + "userid" "short" + } + + "cloaked" + { + "userid" "short" + } + + "dispenser_enemyused" + { + "userid" "short" // owner + "enemyid" "short" + } + + "dispenser_detonated" + { + "userid" "short" + } + + "dispenser_dismantled" + { + "userid" "short" + } + + "dispenser_sabotaged" + { + "userid" "short" // owner + "saboteur" "short" // who done it? + } + + "sentry_detonated" + { + "userid" "short" + "level" "short" + } + + "sentry_dismantled" + { + "userid" "short" + "level" "short" + } + + "sentry_sabotaged" + { + "userid" "short" // owner + "saboteur" "short" // who done it? + } + "player_additem" + { + "userid" "short" + "item" "string" + } + "player_removeitem" + { + "userid" "short" + "item" "string" + } + "player_removeallitems" + { + "userid" "short" + } + "ff_restartround" + { + } + "objective_event" + { + "userid" "short" // entity index of the player + //"eventname" "string" + "eventtext" "string" + } + "luaevent" + { + "userid" "short" // entity index of the first player + "userid2" "short" // entity index of the 2nd player + "eventname" "string" // name for the event - like flag_cap, flag_drop, etc - something stats programs could use + + // These next ones are just brainstorming... + "key0" "string" + "value0" "string" + "key1" "string" + "value1" "string" + "key2" "string" + "value2" "string" + } +} diff --git a/resource/MultiplayerAdvancedDialog.res b/resource/MultiplayerAdvancedDialog.res new file mode 100644 index 0000000..b01cb46 --- /dev/null +++ b/resource/MultiplayerAdvancedDialog.res @@ -0,0 +1,83 @@ +"Resource\MultiplayerAdvancedDia" +{ + "MultiplayerAdvancedDialog" + { + "ControlName" "Frame" + "fieldName" "MultiplayerAdvancedDialog" + "xpos" "60" + "ypos" "108" + "wide" "472" + "tall" "376" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "Cancel" + { + "ControlName" "Button" + "fieldName" "Cancel" + "xpos" "396" + "ypos" "338" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "command" "Close" + "default" "0" + } + "OK" + { + "ControlName" "Button" + "fieldName" "OK" + "xpos" "328" + "ypos" "338" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "labelText" "#GameUI_OK" + "textAlignment" "west" + "dulltext" "0" + "command" "Ok" + "default" "1" + } + "PanelListPanel" + { + "ControlName" "CPanelListPanel" + "fieldName" "PanelListPanel" + "xpos" "16" + "ypos" "56" + "wide" "442" + "tall" "274" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "BuildDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildDialog" + "xpos" "532" + "ypos" "108" + "wide" "285" + "tall" "640" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } +} diff --git a/resource/Options1.vdf b/resource/Options1.vdf new file mode 100644 index 0000000..1129ccb --- /dev/null +++ b/resource/Options1.vdf @@ -0,0 +1,28 @@ +"Options" +{ + "heading" + { + "caption" "#GameUI_GameplayHeading" + } + + "hints" + { + "caption" "#GameUI_ShowHelpfulHints" + "cvar" "cl_hints" + } + "autoreload" + { + "caption" "#GameUI_AutoReloadGuns" + "cvar" "cl_autoreload" + } + "changeclass" + { + "caption" "#GameUI_InstantClassChange" + "cvar" "cl_classautokill" + } + "ragdolldeath" + { + "caption" "#GameUI_RagdollDeathView" + "cvar" "cl_ragdoll_deathview" + } +} diff --git a/resource/Options2.vdf b/resource/Options2.vdf new file mode 100644 index 0000000..a11b4a9 --- /dev/null +++ b/resource/Options2.vdf @@ -0,0 +1,67 @@ +"Options" +{ + "heading" + { + "caption" "#GameUI_GraphicalEffectsHeading" + } + + "mblur" + { + "caption" "#GameUI_EnableBlurredVision" + "cvar" "cl_dynamicblur" + } + "mfov" + { + "caption" "#GameUI_EnableDynamicFOV" + "cvar" "cl_dynamicfov" + } + "gtarget" + { + "caption" "#GameUI_DrawGrenadeTargets" + "cvar" "cl_grenadetargets" + } + "gtrail" + { + "caption" "#GameUI_DrawGrenadeTrails" + "cvar" "cl_grenadetrails" + } + "cl_nail_trail" + { + "caption" "#GameUI_DrawNailTrails" + "cvar" "cl_nail_trail" + } + "cl_conc_refract" + { + "caption" "#GameUI_UseConcRefractSphere" + "cvar" "cl_conc_refract" + } + "effectdetail" + { + "caption" "#GameUI_LevelOfEffectsDetail" + "cvar" "cl_effectsdetail" + "type" "discrete" + "values" + { + "2" "#GameUI_High" + "1" "#GameUI_Medium" + "0" "#GameUI_None" + } + } + "default_fov" + { + "caption" "#GameUI_FOV" + "cvar" "default_fov" + "type" "slider" + "minval" "80" + "maxval" "120" + } + "viewmodel_fov" + { + "caption" "#GameUI_ViewModelFOV" + "cvar" "viewmodel_fov" + "type" "slider" + "minval" "74" + "maxval" "120" + } +} + \ No newline at end of file diff --git a/resource/Options3.vdf b/resource/Options3.vdf new file mode 100644 index 0000000..f245810 --- /dev/null +++ b/resource/Options3.vdf @@ -0,0 +1,85 @@ +"Options" +{ + "heading" + { + "caption" "#GameUI_HeadsUpDisplayHeading" + } + + "tchud" + { + "caption" "#GameUI_TeamColorHUD" + "cvar" "cl_teamcolourhud" + } + "hud_centerid" + { + "caption" "#GameUI_CenterPlayerInfo" + "cvar" "hud_centerid" + } + "hud_takesshots" + { + "caption" "#GameUI_TakeEndRoundScreenshots" + "cvar" "hud_takesshots" + } + "hud_speedometer" + { + "caption" "#GameUI_ShowSpeedometer" + "cvar" "hud_speedometer" + } + "hud_speedometer_avg" + { + "caption" "#GameUI_ShowAverageSpeedometer" + "cvar" "hud_speedometer_avg" + } + + "heading" + { + "caption" "#GameUI_InGameMenusHeading" + } + "usemouse" + { + "caption" "#GameUI_UseMouseIngameMenus" + "cvar" "cl_cmusemouse" + } + + "heading" + { + "caption" "#GameUI_ObjectiveIconHeading" + } + "cl_objectiveicon" + { + "caption" "#GameUI_ObjectiveIcon" + "cvar" "cl_objectiveicon" + "type" "discrete" + "values" + { + "1" "#GameUI_On" + "2" "#GameUI_HideArrow" + "0" "#GameUI_Off" + } + } + + "cl_objectiveicon_teamcolor" + { + "caption" "#GameUI_ObjectiveTeamColoredIcon" + "cvar" "cl_objectiveicon_teamcolor" + "type" "discrete" + "values" + { + "1" "#GameUI_On" + "0" "#GameUI_Off" + } + } + + "cl_objectiveicon_arrow_teamcolor" + { + "caption" "#GameUI_ObjectiveTeamColoredArrow" + "cvar" "cl_objectiveicon_arrow_teamcolor" + "type" "discrete" + "values" + { + "1" "#GameUI_On" + "0" "#GameUI_Off" + } + } +} + \ No newline at end of file diff --git a/resource/Options4.vdf b/resource/Options4.vdf new file mode 100644 index 0000000..6bdf437 --- /dev/null +++ b/resource/Options4.vdf @@ -0,0 +1,90 @@ +"Options" +{ + "heading" + { + "caption" "#GameUI_OptimisationsHeading" + } + + //"ragdolls1" + //{ + // "caption" "#GameUI_RagdollLifetime" + // "cvar" "cl_ragdolltime" + // "type" "discrete" + // "values" + // { + // "20.0" "#GameUI_Normal" + // "5.0" "#GameUI_Quick" + // "0" "#GameUI_None" + // } + //} + + "ragdolls2" + { + "caption" "#GameUI_RagdollSleepAfterTime" + "cvar" "ragdoll_sleepaftertime" + "type" "discrete" + "values" + { + "3.5" "#GameUI_Normal" + "0.5" "#GameUI_Quick" + "0" "#GameUI_Instant" + } + } + + "gibs" + { + "caption" "#GameUI_GibCount" + "cvar" "cl_gib_count" + "type" "discrete" + "values" + { + "6" "#GameUI_Normal" + "12" "#GameUI_Many" + "24" "#GameUI_Lots" + "0" "#GameUI_None" + } + } + + "r_dynamic_ff" + { + "caption" "#GameUI_DynamicLights" + "cvar" "r_dynamic_ff" + } + + "cl_phys_props_enable" + { + "caption" "#GameUI_DisablePhysicsProps" + "cvar" "cl_phys_props_enable" + } + + "cl_reduced_explosions" + { + "caption" "#GameUI_HigherFPSExplosions" + "cvar" "cl_reduced_explosions" + } + + "r_WaterDrawReflection" + { + "caption" "#GameUI_WaterReflections" + "cvar" "r_WaterDrawReflection" + } + + "r_WaterDrawRefraction" + { + "caption" "#GameUI_WaterRefraction" + "cvar" "r_WaterDrawRefraction" + } + + "r_3dsky" + { + "caption" "#GameUI_Draw3DSkyBox" + "cvar" "r_3dsky" + } + + "r_drawflecks" + { + "caption" "#GameUI_DrawFlecks" + "cvar" "r_drawflecks" + } +} + \ No newline at end of file diff --git a/resource/OptionsSubMultiplayer.res b/resource/OptionsSubMultiplayer.res new file mode 100644 index 0000000..0231736 --- /dev/null +++ b/resource/OptionsSubMultiplayer.res @@ -0,0 +1,552 @@ +"Resource/OptionsSubMultiplayer.res" +{ + "Cancel" + { + "ControlName" "Button" + "fieldName" "Cancel" + "xpos" "378" + "ypos" "322" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "3" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Close" + "Default" "0" + } + "ok" + { + "ControlName" "Button" + "fieldName" "OK" + "xpos" "308" + "ypos" "322" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "3" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_OK" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Ok" + "Default" "0" + } + "Apply" + { + "ControlName" "Button" + "fieldName" "Apply" + "xpos" "448" + "ypos" "322" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "3" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Apply" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Apply" + "Default" "0" + } + "Advanced" + { + "ControlName" "Button" + "fieldName" "Advanced" + "xpos" "40" + "ypos" "260" + "wide" "120" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "9" + "labelText" "#GameUI_AdvancedEllipsis" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Advanced" + "Default" "1" + } + "ImportSprayImage" + { + "ControlName" "Button" + "fieldName" "ImportSprayImage" + "xpos" "112" + "ypos" "160" + "wide" "124" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_ImportSprayEllipsis" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "1" + } + "NameLabel" + { + "ControlName" "Label" + "fieldName" "NameLabel" + "xpos" "40" + "ypos" "28" + "wide" "150" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_PlayerName" + "textAlignment" "west" + "associate" "NameEntry" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "NameEntry" + { + "ControlName" "CCvarTextEntry" + "fieldName" "NameEntry" + "xpos" "40" + "ypos" "52" + "wide" "196" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "1" + "maxchars" "63" + "NumericInputOnly" "0" + "unicode" "1" + } + "Primary Color Slider" + { + "ControlName" "CCvarSlider" + "fieldName" "Primary Color Slider" + "xpos" "20" + "ypos" "188" + "wide" "140" + "tall" "39" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "3" + "leftText" " " + "rightText" " " + } + "Secondary Color Slider" + { + "ControlName" "CCvarSlider" + "fieldName" "Secondary Color Slider" + "xpos" "20" + "ypos" "223" + "wide" "140" + "tall" "42" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "4" + "leftText" " " + "rightText" " " + } + "High Quality Models" + { + "ControlName" "CCvarToggleCheckButton" + "fieldName" "High Quality Models" + "xpos" "190" + "ypos" "259" + "wide" "174" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "5" + "labelText" "#GameUI_HighModels" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "Player model" + { + "ControlName" "CLabeledCommandComboBox" + "fieldName" "Player model" + "xpos" "40" + "ypos" "122" + "wide" "140" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "2" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "SpraypaintList" + { + "ControlName" "CLabeledCommandComboBox" + "fieldName" "SpraypaintList" + "xpos" "112" + "ypos" "120" + "wide" "124" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "ModelImage" + { + "ControlName" "Panel" + "fieldName" "ModelImage" + "xpos" "176" + "ypos" "36" + "wide" "164" + "tall" "200" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + } + "LogoImage" + { + "ControlName" "ImagePanel" + "fieldName" "LogoImage" + "xpos" "40" + "ypos" "120" + "wide" "64" + "tall" "64" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "" + "border" "InsetBorder" + "scaleImage" "1" + } + "CrosshairColorComboBox" + { + "ControlName" "ComboBox" + "fieldName" "CrosshairColorComboBox" + "xpos" "354" + "ypos" "160" + "wide" "108" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "8" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "CrosshairSizeComboBox" + { + "ControlName" "CLabeledCommandComboBox" + "fieldName" "CrosshairSizeComboBox" + "xpos" "354" + "ypos" "120" + "wide" "108" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "6" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "CrosshairTranslucencyCheckbox" + { + "ControlName" "CCvarToggleCheckButton" + "fieldName" "CrosshairTranslucencyCheckbox" + "xpos" "281" + "ypos" "188" + "wide" "181" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Translucent" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "LockRadarRotationCheckbox" + { + "ControlName" "CCvarToggleCheckButton" + "fieldName" "LockRadarRotationCheckbox" + "xpos" "281" + "ypos" "214" + "wide" "181" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Cstrike_RadarLocked" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + "cvar_name" "cl_radar_locked" + "cvar_value" "0" + } + "CrosshairLabel" + { + "ControlName" "Label" + "fieldName" "CrosshairLabel" + "xpos" "281" + "ypos" "94" + "wide" "181" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_CrosshairDescription" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "CrosshairImage" + { + "ControlName" "ImagePanel" + "fieldName" "CrosshairImage" + "xpos" "281" + "ypos" "120" + "wide" "64" + "tall" "64" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "gfx/vgui/crosshair" + "border" "InsetBorder" + "scaleImage" "1" + } + "SysMenu" + { + "ControlName" "Menu" + "fieldName" "SysMenu" + "xpos" "0" + "ypos" "0" + "zpos" "1" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + } + "topHorizLeft" + { + "ControlName" "Label" + "fieldName" "topHorizLeft" + "xpos" "186" + "ypos" "120" + "wide" "21" + "tall" "16" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "392" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "topVertLeft" + { + "ControlName" "Label" + "fieldName" "topVertLeft" + "xpos" "374" + "ypos" "58" + "wide" "21" + "tall" "16" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "133" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "bottomHorizRight" + { + "ControlName" "Label" + "fieldName" "bottomHorizRight" + "xpos" "508" + "ypos" "176" + "wide" "21" + "tall" "16" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "133" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "bottomVertRight" + { + "ControlName" "Label" + "fieldName" "bottomVertRight" + "xpos" "496" + "ypos" "260" + "wide" "21" + "tall" "16" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "133" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Colors" + { + "ControlName" "Label" + "fieldName" "Colors" + "xpos" "20" + "ypos" "164" + "wide" "88" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_ColorSliders" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label1" + { + "ControlName" "Label" + "fieldName" "Label1" + "xpos" "40" + "ypos" "98" + "wide" "152" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_PlayerModel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label2" + { + "ControlName" "Label" + "fieldName" "Label2" + "xpos" "40" + "ypos" "94" + "wide" "150" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_SpraypaintImage" + "textAlignment" "west" + "associate" "SpraypaintList" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label3" + { + "ControlName" "Label" + "fieldName" "Label3" + "xpos" "40" + "ypos" "187" + "wide" "196" + "tall" "64" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_SpraypaintServerNote" + "textAlignment" "west" + "dulltext" "1" + "brighttext" "0" + "wrap" "1" + } +} + diff --git a/resource/PlayerListDialog.res b/resource/PlayerListDialog.res new file mode 100644 index 0000000..b4aff0e --- /dev/null +++ b/resource/PlayerListDialog.res @@ -0,0 +1,72 @@ +"Resource/PlayerListDialog.res" +{ + "PlayerListDialog" + { + "ControlName" "CPlayerListDialog" + "fieldName" "PlayerListDialog" + "xpos" "168" + "ypos" "55" + "wide" "467" + "tall" "388" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + } + "MuteButton" + { + "ControlName" "Button" + "fieldName" "MuteButton" + "xpos" "173" + "ypos" "326" + "wide" "144" + "tall" "24" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "labelText" "#GameUI_MuteIngameVoice" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "Mute" + "Default" "1" + } + "PlayerList" + { + "ControlName" "ListPanel" + "fieldName" "PlayerList" + "xpos" "28" + "ypos" "38" + "wide" "410" + "tall" "279" + "autoResize" "3" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + } + "Button1" + { + "ControlName" "Button" + "fieldName" "Button1" + "xpos" "352" + "ypos" "352" + "wide" "86" + "tall" "24" + "autoResize" "0" + "pinCorner" "3" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "labelText" "#GameUI_Close" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "Close" + "Default" "0" + } +} diff --git a/resource/RedOctoberff.ttf b/resource/RedOctoberff.ttf new file mode 100644 index 0000000..36e53f3 Binary files /dev/null and b/resource/RedOctoberff.ttf differ diff --git a/resource/SOVIET4.TTF b/resource/SOVIET4.TTF new file mode 100644 index 0000000..1ef6be4 Binary files /dev/null and b/resource/SOVIET4.TTF differ diff --git a/resource/SourceScheme.res b/resource/SourceScheme.res new file mode 100644 index 0000000..6fd4a2d --- /dev/null +++ b/resource/SourceScheme.res @@ -0,0 +1,1007 @@ +/////////////////////////////////////////////////////////// +// Tracker scheme resource file +// +// sections: +// Colors - all the colors used by the scheme +// BaseSettings - contains settings for app to use to draw controls +// Fonts - list of all the fonts used by app +// Borders - description of all the borders +// +/////////////////////////////////////////////////////////// +Scheme +{ + //////////////////////// COLORS /////////////////////////// + // color details + // this is a list of all the colors used by the scheme + Colors + { + // base colors + "White" "255 255 255 255" + "OffWhite" "216 216 216 255" + "DullWhite" "142 142 142 255" + "Orange" "255 155 0 255" + "TransparentBlack" "0 0 0 128" + "Black" "0 0 0 255" + + "Blank" "0 0 0 0" + // custom colors + "HUD_Tone_Bright" "225 235 255 255" + "HUD_Tone_Default" "199 219 255 255" + "HUD_Tone_Dim" "199 219 255 120" + + "HUD_BG_Bright" "109 124 142 185" + "HUD_BG_Default" "109 124 142 115" + "HUD_BG_Dim" "109 124 142 50" + /////////////// VGUI Colours /////////////// + "UI_Tone_Default" "199 219 255 255" + "UI_Tone_Dim" "109 124 142 115" + "UI_Tone_Dark" "75 85 95 115" + + "UI_BG_Highlight" "225 235 255 45" + "UI_BG_Dim" "100 110 128 165" + "UI_BG_Dark" "0 0 0 90" + + "UI_Text_Default" "199 219 255 255" + } + + ///////////////////// BASE SETTINGS //////////////////////// + // + // default settings for all panels + // controls use these to determine their settings + BaseSettings + { + // vgui_controls color specifications + Border.Bright "UI_BG_Highlight" // the lit side of a control + Border.Dark "UI_BG_Highlight" // the dark/unlit side of a control + Border.Selection "White" // the additional border color for displaying the default/selected button + + Button.TextColor "UI_Tone_Default" + Button.BgColor "Blank" + Button.ArmedTextColor "UI_Tone_Default" + Button.ArmedBgColor "UI_BG_Highlight" + Button.DepressedTextColor "UI_Tone_Default" + Button.DepressedBgColor "UI_BG_Highlight" + + CheckButton.TextColor "UI_Tone_Default" + CheckButton.SelectedTextColor "White" + CheckButton.BgColor "TransparentBlack" + CheckButton.Border1 "Border.Dark" // the left checkbutton border + CheckButton.Border2 "Border.Bright" // the right checkbutton border + CheckButton.Check "White" // color of the check itself + + ComboBoxButton.ArrowColor "DullWhite" + ComboBoxButton.ArmedArrowColor "White" + ComboBoxButton.BgColor "Blank" + ComboBoxButton.DisabledBgColor "Blank" + + Frame.TitleTextInsetX 16 + Frame.ClientInsetX 8 + Frame.ClientInsetY 6 + Frame.BgColor "UI_Tone_Dim" // main menu box color + Frame.OutOfFocusBgColor "UI_BG_Dim" + Frame.FocusTransitionEffectTime "0.3" // time it takes for a window to fade in/out on focus/out of focus + Frame.TransitionEffectTime "0.3" // time it takes for a window to fade in/out on open/close + Frame.AutoSnapRange "0" + FrameGrip.Color1 "UI_BG_Highlight" + FrameGrip.Color2 "UI_BG_Dim" + FrameTitleButton.FgColor "200 200 200 196" + FrameTitleButton.BgColor "Blank" + FrameTitleButton.DisabledFgColor "255 255 255 192" + FrameTitleButton.DisabledBgColor "Blank" + FrameSystemButton.FgColor "Blank" + FrameSystemButton.BgColor "Blank" + FrameSystemButton.Icon "" + FrameSystemButton.DisabledIcon "" + FrameTitleBar.Font "UiBold" + FrameTitleBar.TextColor "UI_Tone_Default" + FrameTitleBar.BgColor "Blank" + FrameTitleBar.DisabledTextColor "UI_Tone_Dim" + FrameTitleBar.DisabledBgColor "Blank" + + GraphPanel.FgColor "White" + GraphPanel.BgColor "TransparentBlack" + + Label.TextDullColor "DullWhite" + Label.TextColor "UI_Tone_Default" + Label.TextBrightColor "UI_Tone_Default" + Label.SelectedTextColor "White" + Label.BgColor "Blank" + Label.DisabledFgColor1 "117 117 117 255" + Label.DisabledFgColor2 "30 30 30 255" + + ListPanel.TextColor "UI_Tone_Default" + ListPanel.TextBgColor "Blank" + ListPanel.BgColor "TransparentBlack" + ListPanel.SelectedTextColor "Black" + ListPanel.SelectedBgColor "128 128 128 196" //ui_tone_default + ListPanel.SelectedOutOfFocusBgColor "255 155 0 128" + ListPanel.EmptyListInfoTextColor "OffWhite" + + Menu.TextColor "UI_Tone_Default" + Menu.BgColor "UI_BG_Dim" + Menu.ArmedTextColor "UI_Tone_Default" + Menu.ArmedBgColor "UI_BG_Highlight" + Menu.TextInset "6" + + Panel.FgColor "DullWhite" + Panel.BgColor "Blank" + + ProgressBar.FgColor "White" + ProgressBar.BgColor "TransparentBlack" + + PropertySheet.TextColor "UI_Tone_default" + PropertySheet.SelectedTextColor "White" + PropertySheet.TransitionEffectTime "0.25" // time to change from one tab to another + + RadioButton.TextColor "UI_Tone_Default" + RadioButton.SelectedTextColor "White" + + RichText.TextColor "UI_Tone_Default" + RichText.BgColor "TransparentBlack" + RichText.SelectedTextColor "Black" + RichText.SelectedBgColor "UI_Tone_Default" + + ScrollBar.Wide 17 + + ScrollBarButton.FgColor "UI_Tone_Default" + ScrollBarButton.BgColor "Blank" + ScrollBarButton.ArmedFgColor "UI_Tone_Default" + ScrollBarButton.ArmedBgColor "Blank" + ScrollBarButton.DepressedFgColor "UI_Tone_Default" + ScrollBarButton.DepressedBgColor "Blank" + + ScrollBarSlider.FgColor "Blank" // nob color + ScrollBarSlider.BgColor "255 255 255 64" // slider background color + + SectionedListPanel.HeaderTextColor "UI_Tone_Default" + SectionedListPanel.HeaderBgColor "Blank" + SectionedListPanel.DividerColor "Black" + SectionedListPanel.TextColor "UI_Tone_Default" + SectionedListPanel.BrightTextColor "White" + SectionedListPanel.BgColor "TransparentBlack" + SectionedListPanel.SelectedTextColor "Black" + SectionedListPanel.SelectedBgColor "UI_Tone_Default" + SectionedListPanel.OutOfFocusSelectedTextColor "Black" + SectionedListPanel.OutOfFocusSelectedBgColor "255 155 0 128" + + Slider.NobColor "108 108 108 255" + Slider.TextColor "180 180 180 255" + Slider.TrackColor "31 31 31 255" + Slider.DisabledTextColor1 "117 117 117 255" + Slider.DisabledTextColor2 "30 30 30 255" + + TextEntry.TextColor "UI_Tone_Default" + TextEntry.BgColor "TransparentBlack" + TextEntry.CursorColor "OffWhite" + TextEntry.DisabledTextColor "DullWhite" + TextEntry.DisabledBgColor "Blank" + TextEntry.SelectedTextColor "Black" + TextEntry.SelectedBgColor "White" + TextEntry.OutOfFocusSelectedBgColor "255 155 0 128" + TextEntry.FocusEdgeColor "0 0 0 196" + + ToggleButton.SelectedTextColor "White" + + Tooltip.TextColor "0 0 0 196" + Tooltip.BgColor "UI_Tone_Default" + + TreeView.BgColor "TransparentBlack" + + WizardSubPanel.BgColor "Blank" + + // scheme-specific colors + MainMenu.TextColor "UI_Tone_Default" + MainMenu.ArmedTextColor "White" + MainMenu.DepressedTextColor "192 186 80 255" + MainMenu.MenuItemHeight "30" // spacing between resume game etc -why doesn't this scale at higher res..fu valve you're retarded + MainMenu.Inset "32" + MainMenu.Backdrop "0 0 0 156" + + Console.TextColor "OffWhite" + Console.DevTextColor "White" + + NewGame.TextColor "White" + NewGame.FillColor "0 0 0 255" + NewGame.SelectionColor "UI_Tone_Default" //ui tone default + NewGame.DisabledColor "128 128 128 196" + } + + // + //////////////////////// FONTS ///////////////////////////// + // + // describes all the fonts + Fonts + { + // fonts are used in order that they are listed + // fonts listed later in the order will only be used if they fulfill a range not already filled + // if a font fails to load then the subsequent fonts will replace + // fonts are used in order that they are listed + "DebugFixed" + { + "1" + { + "name" "Courier New" + "tall" "10" + "weight" "500" + "antialias" "1" + } + } + // fonts are used in order that they are listed + "DebugFixedSmall" + { + "1" + { + "name" "Courier New" + "tall" "7" + "weight" "500" + "antialias" "1" + } + } + "DefaultFixedOutline" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + "outline" "1" + } + } + "Default" //join menu option/ window text and button text + { + "1" + { + "name" "FortressForever - HUD Font" + "tall" "14" + "antialias" "1" + "custom" "1" + } + } + "DefaultBold" //doesn't appear to be used + { + "1" + { + + "name" "Tahoma" + "custom" "1" + "tall" "16" + "weight" "500" + } + } + "DefaultUnderline" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "underline" "1" + } + } + "DefaultSmall" // doesn't appear to be used + { + "1" + { + + "name" "Verdana" + "custom" "1" + "tall" "12" + "weight" "0" + } + } + "DefaultSmallDropShadow" + { + "1" + { + + "name" "Verdana" + "custom" "1" + "tall" "13" + "weight" "0" + "dropshadow" "1" + } + } + "DefaultVerySmall" // header text on keyboard bindings screen + { + "1" + { + + "name" "Tahoma" + "custom" "1" + "tall" "14" + "weight" "0" + } + } + + "DefaultLarge" // doesn't appear to be used + { + "1" + { + + "name" "Verdana" + "custom" "1" + "tall" "18" + "weight" "0" + } + } + "UiBold" // top left of options screen etc + { + "1" + { + + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "16" + "weight" "500" + "antialias" "1" + } + } + "MenuLarge" // Resume game, find servers etc + { + + "1" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "16" + "weight" "500" + "antialias" "1" + + "yres" "1 599" + } + "2" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "18" + "weight" "500" + "antialias" "1" + "yres" "600 767" + } + "3" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "22" + "weight" "500" + "antialias" "1" + "yres" "768 1023" + } + "4" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "24" + "weight" "600" + "antialias" "1" + "yres" "1024 1199" + } + "5" + { + "name" "FortressForever - HUD Font" + "custom" "1" + "tall" "32" + "weight" "600" + "antialias" "1" + "yres" "1200 10000" + } + } + + "ConsoleText" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "500" + } + } + + // this is the symbol font + "Marlett" + { + "1" + { + "name" "Marlett" + "tall" "14" + "weight" "0" + "symbol" "1" + } + } + + "Trebuchet24" + { + "1" + { + "name" "Trebuchet MS" + "tall" "24" + "weight" "900" + "dropshadow" "1" + } + } + + + "Trebuchet20" + { + "1" + { + "name" "Trebuchet MS" + "tall" "20" + "weight" "900" + } + } + + "Trebuchet18" + { + "1" + { + "name" "Trebuchet MS" + "tall" "18" + "weight" "900" + } + } + + // HUD numbers + // We use multiple fonts to 'pulse' them in the HUD, hence the need for many of near size + "HUDNumber" + { + "1" + { + "name" "Trebuchet MS" + "tall" "40" + "weight" "900" + } + } + "HUDNumber1" + { + "1" + { + "name" "Trebuchet MS" + "tall" "41" + "weight" "900" + } + } + "HUDNumber2" + { + "1" + { + "name" "Trebuchet MS" + "tall" "42" + "weight" "900" + } + } + "HUDNumber3" + { + "1" + { + "name" "Trebuchet MS" + "tall" "43" + "weight" "900" + } + } + "HUDNumber4" + { + "1" + { + "name" "Trebuchet MS" + "tall" "44" + "weight" "900" + } + } + "HUDNumber5" + { + "1" + { + "name" "Trebuchet MS" + "tall" "45" + "weight" "900" + } + } + "DefaultFixed" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + } +// "1" +// { +// "name" "FixedSys" +// "tall" "20" +// "weight" "0" +// } + } + + "DefaultFixedDropShadow" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + "dropshadow" "1" + } +// "1" +// { +// "name" "FixedSys" +// "tall" "20" +// "weight" "0" +// } + } + + "CloseCaption_Normal" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "dropshadow" "1" + } + } + "CloseCaption_Italic" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "italic" "1" + "dropshadow" "1" + } + } + "CloseCaption_Bold" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "900" + "dropshadow" "1" + } + } + "CloseCaption_BoldItalic" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "900" + "italic" "1" + "dropshadow" "1" + } + } + + TitleFont // don't think its used + { + "1" + { + "name" "HalfLife2" + "tall" "72" + "weight" "400" + "antialias" "1" + "custom" "1" + } + } + + TitleFont2 // don't think its used + { + "1" + { + "name" "HalfLife2" + "tall" "120" + "weight" "400" + "antialias" "1" + "custom" "1" + } + } + } + + // + //////////////////// BORDERS ////////////////////////////// + // + // describes all the border types + Borders + { + BaseBorder DepressedBorder + ButtonBorder RaisedBorder + ComboBoxBorder DepressedBorder + MenuBorder RaisedBorder + BrowserBorder DepressedBorder + PropertySheetBorder RaisedBorder + + FrameBorder + { + // rounded corners for frames + "backgroundtype" "3" // Phish- original 2 + } + + DepressedBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + RaisedBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + TitleButtonBorder + { + "backgroundtype" "0" // dont think it shows if splash image used + } + + TitleButtonDisabledBorder + { + "backgroundtype" "0" + } + + TitleButtonDepressedBorder + { + "backgroundtype" "0" + } + + ScrollBarButtonBorder + { + "inset" "2 2 0 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ScrollBarButtonDepressedBorder + { + "inset" "2 2 0 0" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + + TabBorder + { + + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + } + + TabActiveBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + + } + + + ToolTipBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + // this is the border used for default buttons (the button that gets pressed when you hit enter) + ButtonKeyFocusBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "Border.Selection" + "offset" "0 0" + } + "2" + { + "color" "Border.Bright" + "offset" "0 1" + } + } + Top + { + "1" + { + "color" "Border.Selection" + "offset" "0 0" + } + "2" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + Right + { + "1" + { + "color" "Border.Selection" + "offset" "0 0" + } + "2" + { + "color" "Border.Dark" + "offset" "1 0" + } + } + Bottom + { + "1" + { + "color" "Border.Selection" + "offset" "0 0" + } + "2" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + } + + ButtonDepressedBorder + { + "inset" "2 1 1 1" + Left + { + "1" + { + "color" "Border.Dark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "Border.Bright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "Border.Dark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "Border.Bright" + "offset" "0 0" + } + } + } + } + + //////////////////////// CUSTOM FONT FILES ///////////////////////////// + // + // specifies all the custom (non-system) font files that need to be loaded to service the above described fonts + CustomFontFiles + { + "1" "resource/HALFLIFE2.ttf" + "2" "resource/HUDfont.ttf" + } +} diff --git a/resource/StatusGlyphs.ttf b/resource/StatusGlyphs.ttf new file mode 100644 index 0000000..f7300a2 Binary files /dev/null and b/resource/StatusGlyphs.ttf differ diff --git a/resource/TrackerScheme.res b/resource/TrackerScheme.res new file mode 100644 index 0000000..7c303a5 --- /dev/null +++ b/resource/TrackerScheme.res @@ -0,0 +1,1210 @@ +/////////////////////////////////////////////////////////// +// Tracker scheme resource file +// +// sections: +// Colors - all the colors used by the scheme +// BaseSettings - contains settings for app to use to draw controls +// Fonts - list of all the fonts used by app +// Borders - description of all the borders +// +// hit ctrl-alt-shift-R in the app to reload this file +// +/////////////////////////////////////////////////////////// +Scheme +{ + //////////////////////// COLORS /////////////////////////// + // color details + // this is a list of all the colors used by the scheme + Colors + { + // base colors + "BaseText" "216 222 211 255" // used in text windows, lists + "BrightBaseText" "255 255 255 255" // brightest text + "DimBaseText" "150 159 142 255" // dim base text + "SelectedText" "255 255 255 255" // selected text + + "LabelDimText" "160 170 149 255" // slight modification on above, used for info text + // could be just removed and use DimBaseText? + + "ControlText" "216 222 211 255" // used in all text controls + "BrightControlText" "196 181 80 255" // use for selected controls + "DisabledText1" "117 128 111 255" // disabled text + "DisabledText2" "30 30 30 255" // overlay color for disabled text (to give that inset look) + "DimListText" "117 134 102 255" // offline friends, unsubscribed games, etc. + + // background colors + "ControlBG" "76 88 68 255" // background color of controls + "ControlDarkBG" "90 106 80 255" // darker background color; used for background of scrollbars + "WindowBG" "62 70 55 255" // background color of text edit panes (chat, text entries, etc.) + "SelectionBG" "149 136 49 255" // background color of any selected text or menu item + "SelectionBG2" "40 46 34 255" // selection background in window w/o focus + "ListBG" "62 70 55 255" // background of server browser, buddy list, etc. + + // title colors + "TitleText" "255 255 255 255" + "TitleDimText" "120 132 114 255" + "TitleBG" "76 88 68 0" + "TitleDimBG" "76 88 68 0" + + // slider tick colors + "SliderTickColor" "127 140 127 255" + "SliderTrackColor" "31 31 31 255" + + // border colors + "BorderBright" "136 145 128 255" // the lit side of a control + "BorderDark" "45 49 40 255" // the dark/unlit side of a control + "BorderSelection" "0 0 0 255" // the additional border color for displaying the default/selected button + } + + ///////////////////// BASE SETTINGS //////////////////////// + // + // default settings for all panels + // controls use these to determine their settings + BaseSettings + { + "FgColor" "ControlText" + "BgColor" "ControlBG" + "LabelBgColor" "ControlBG" + "SubPanelBgColor" "ControlBG" + + "DisabledFgColor1" "DisabledText1" + "DisabledFgColor2" "DisabledText2" // set this to the BgColor if you don't want it to draw + + "TitleBarFgColor" "TitleText" + "TitleBarDisabledFgColor" "TitleDimText" + "TitleBarBgColor" "TitleBG" + "TitleBarDisabledBgColor" "TitleDimBG" + +// "TitleBarIcon" "resource/icon_steam" +// "TitleBarDisabledIcon" "resource/icon_steam_disabled" + "TitleBarIcon" "resource/icon_hlicon1" + "TitleBarDisabledIcon" "resource/icon_hlicon2" + + "TitleButtonFgColor" "BorderBright" + "TitleButtonBgColor" "ControlBG" + "TitleButtonDisabledFgColor" "TitleDimText" + "TitleButtonDisabledBgColor" "TitleDimBG" + + "TextCursorColor" "BaseText" // color of the blinking text cursor in text entries + "URLTextColor" "BrightBaseText" // color that URL's show up in chat window + + Menu + { + "FgColor" "DimBaseText" + "BgColor" "ControlBG" + "ArmedFgColor" "BrightBaseText" + "ArmedBgColor" "SelectionBG" + "DividerColor" "BorderDark" + + "TextInset" "6" + } + + MenuButton // the little arrow on the side of boxes that triggers drop down menus + { + "ButtonArrowColor" "DimBaseText" // color of arrows + "ButtonBgColor" "WindowBG" // bg color of button. same as background color of text edit panes + + "ArmedArrowColor" "BrightBaseText" // color of arrow when mouse is over button + "ArmedBgColor" "DimBaseText" // bg color of button when mouse is over button + } + + Slider + { + "SliderFgColor" "ControlBG" // handle with which the slider is grabbed + "SliderBgColor" "ControlDarkBG" // area behind handle + "SliderTickColor" "127 140 127 255" // slider tick's color + "SliderTickLabelColor" "127 140 127 255" // color of labels at the ends of the slider tick + } + + ScrollBarSlider + { + "BgColor" "ControlBG" // this isn't really used + + "ScrollBarSliderFgColor" "ControlBG" // handle with which the slider is grabbed + "ScrollBarSliderBgColor" "ControlDarkBG" // area behind handle + + "ButtonFgColor" "DimBaseText" // color of arrows + } + + + // text edit windows + "WindowFgColor" "BaseText" // off-white + "WindowBgColor" "WindowBG" + "WindowDisabledFgColor" "DimBaseText" + "WindowDisabledBgColor" "66 80 60 255" // background of chat conversation + + "SelectionFgColor" "255 255 255 255" // fg color of selected text + "SelectionBgColor" "SelectionBG" + "ListSelectionFgColor" "255 255 255 255" // + + "ListBgColor" "62 70 55 255" // background of server browser control, etc + "BuddyListBgColor" "62 70 55 255" // background of buddy list pane + + // App-specific stuff + "ChatBgColor" "WindowBgColor" + + // status selection + "StatusSelectFgColor" "BrightBaseText" + "StatusSelectFgColor2" "BrightControlText" // this is the color of the friends status + + // checkboxes + "CheckButtonBorder1" "BorderDark" // the left checkbutton border + "CheckButtonBorder2" "BorderBright" // the right checkbutton border + "CheckButtonCheck" "0 0 0 255" // color of the check itself + "CheckBgColor" "158 168 150 255" + + // buttons (default fg/bg colors are used if these are not set) +// "ButtonArmedFgColor" +// "ButtonArmedBgColor" +// "ButtonDepressedFgColor" "BrightControlText" +// "ButtonDepressedBgColor" + + // buddy buttons + BuddyButton + { + "FgColor1" "ControlText" + "FgColor2" "117 134 102 255" + + "ArmedFgColor1" "BrightBaseText" + "ArmedFgColor2" "BrightBaseText" + "ArmedBgColor" "SelectionBG" + } + + Chat + { + "TextColor" "BrightControlText" + "SelfTextColor" "BaseText" + "SeperatorTextColor" "DimBaseText" + } + + InGameDesktop + { + "MenuColor" "200 200 200 255" + "ArmedMenuColor" "255 255 255 255" + "DepressedMenuColor" "192 186 80 255" + "WidescreenBarColor" "0 0 0 0" + "MenuItemVisibilityRate" "0.03" // time it takes for one menu item to appear + "MenuItemHeight" "28" + "GameMenuInset" "32" + } + + "SectionTextColor" "BrightControlText" // text color for IN-GAME, ONLINE, OFFLINE sections of buddy list + "SectionDividerColor" "BorderDark" // color of line that runs under section name in buddy list + + // TF2 HUD + "HudStatusBgColor" "0 0 0 64" + "HudStatusSelectedBgColor" "0 0 0 192" + } + + // + //////////////////////// FONTS ///////////////////////////// + // + // describes all the fonts + Fonts + { + // fonts are used in order that they are listed + // fonts listed later in the order will only be used if they fulfill a range not already filled + // if a font fails to load then the subsequent fonts will replace + // fonts are used in order that they are listed + "DebugFixed" + { + "1" + { + "name" "Courier New" + "tall" "10" + "weight" "500" + "antialias" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + // fonts are used in order that they are listed + "DebugFixedSmall" + { + "1" + { + "name" "Courier New" + "tall" "7" + "weight" "500" + "antialias" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "Default" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "DefaultUnderline" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "underline" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "DefaultSmall" + { + "1" + { + "name" "Tahoma" + "tall" "13" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "DefaultSmallDropShadow" + { + "1" + { + "name" "Tahoma" + "tall" "13" + "weight" "0" + "dropshadow" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "DefaultVerySmall" + { + "1" + { + "name" "Tahoma" + "tall" "12" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + + "DefaultLarge" + { + "1" + { + "name" "Tahoma" + "tall" "18" + "weight" "0" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + + "MenuLarge" + { + "1" + { + "name" "Verdana" + "tall" "20" + "weight" "1000" + "antialias" "1" + } + } + + "ConsoleText" + { + "1" + { + "name" "Tahoma" + "tall" "13" + "weight" "500" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + + // this is the symbol font + "Marlett" + { + "1" + { + "name" "Marlett" + "tall" "14" + "weight" "0" + "symbol" "1" + "range" "0x0000 0x007F" // Basic Latin + } + } + + "Trebuchet24" + { + "1" + { + "name" "Trebuchet MS" + "tall" "24" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + + + "Trebuchet20" + { + "1" + { + "name" "Trebuchet MS" + "tall" "20" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + + "Trebuchet18" + { + "1" + { + "name" "Trebuchet MS" + "tall" "18" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + + // HUD numbers + // We use multiple fonts to 'pulse' them in the HUD, hence the need for many of near size + "HUDNumber" + { + "1" + { + "name" "Trebuchet MS" + "tall" "40" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "HUDNumber1" + { + "1" + { + "name" "Trebuchet MS" + "tall" "41" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "HUDNumber2" + { + "1" + { + "name" "Trebuchet MS" + "tall" "42" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "HUDNumber3" + { + "1" + { + "name" "Trebuchet MS" + "tall" "43" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "HUDNumber4" + { + "1" + { + "name" "Trebuchet MS" + "tall" "44" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "HUDNumber5" + { + "1" + { + "name" "Trebuchet MS" + "tall" "45" + "weight" "900" + "range" "0x0000 0x007F" // Basic Latin + } + } + "DefaultFixed" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + "range" "0x0000 0x007F" // Basic Latin + } +// "1" +// { +// "name" "FixedSys" +// "tall" "20" +// "weight" "0" +// "range" "0x0000 0x007F" // Basic Latin +// } + } + + "DefaultFixedDropShadow" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + "dropshadow" "1" + "range" "0x0000 0x007F" // Basic Latin + } +// "1" +// { +// "name" "FixedSys" +// "tall" "20" +// "weight" "0" +// "range" "0x0000 0x007F" // Basic Latin +// } + } + + "DefaultFixedOutline" + { + "1" + { + "name" "Lucida Console" + "tall" "10" + "weight" "0" + "outline" "1" + "range" "0x0000 0x007F" // Basic Latin + } +// "1" +// { +// "name" "FixedSys" +// "tall" "20" +// "weight" "0" +// "range" "0x0000 0x007F" // Basic Latin +// } + } + + "CloseCaption_Normal" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "CloseCaption_Italic" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "500" + "italic" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "CloseCaption_Bold" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "900" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + "CloseCaption_BoldItalic" + { + "1" + { + "name" "Tahoma" + "tall" "16" + "weight" "900" + "italic" "1" + "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A + } + } + + TitleFont + { + "1" + { + "name" "HalfLife2" + "tall" "72" + "weight" "400" + "antialias" "1" + } + } + } + + // + //////////////////// BORDERS ////////////////////////////// + // + // describes all the border types + Borders + { + BaseBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + TitleButtonBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "4" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + TitleButtonDisabledBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BgColor" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BgColor" + "offset" "1 0" + } + } + Top + { + "1" + { + "color" "BgColor" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BgColor" + "offset" "0 0" + } + } + } + + TitleButtonDepressedBorder + { + "inset" "1 1 1 1" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + ScrollBarButtonBorder + { + "inset" "2 2 0 0" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + ScrollBarButtonDepressedBorder + { + "inset" "2 2 0 0" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + ButtonBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + FrameBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + TabBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + TabActiveBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "ControlBG" + "offset" "6 2" + } + } + } + + + ToolTipBorder + { + "inset" "0 0 1 0" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + // this is the border used for default buttons (the button that gets pressed when you hit enter) + ButtonKeyFocusBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderSelection" + "offset" "0 0" + } + "2" + { + "color" "BorderBright" + "offset" "0 1" + } + } + Top + { + "1" + { + "color" "BorderSelection" + "offset" "0 0" + } + "2" + { + "color" "BorderBright" + "offset" "1 0" + } + } + Right + { + "1" + { + "color" "BorderSelection" + "offset" "0 0" + } + "2" + { + "color" "BorderDark" + "offset" "1 0" + } + } + Bottom + { + "1" + { + "color" "BorderSelection" + "offset" "0 0" + } + "2" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + ButtonDepressedBorder + { + "inset" "2 1 1 1" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + ComboBoxBorder + { + "inset" "0 0 1 1" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + + MenuBorder + { + "inset" "1 1 1 1" + Left + { + "1" + { + "color" "BorderBright" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderDark" + "offset" "1 0" + } + } + + Top + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + } + + BrowserBorder + { + "inset" "0 0 0 1" + Left + { + "1" + { + "color" "BorderDark" + "offset" "0 1" + } + } + + Right + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + + Top + { + "1" + { + "color" "BorderDark" + "offset" "0 0" + } + } + + Bottom + { + "1" + { + "color" "BorderBright" + "offset" "0 0" + } + } + } + } + + //////////////////////// CUSTOM FONT FILES ///////////////////////////// + // + // specifies all the custom (non-system) font files that need to be loaded to service the above described fonts + CustomFontFiles + { + "1" "resource/HALFLIFE2.ttf" + } +} \ No newline at end of file diff --git a/resource/classes/civilian.html b/resource/classes/civilian.html new file mode 100644 index 0000000..4c174d7 --- /dev/null +++ b/resource/classes/civilian.html @@ -0,0 +1,58 @@ + + +Civilian + + + +
+
+ff +
+
CIVILIAN +civilian +There are "" on your team + +STATS +Max health: 50 +Max armor: None +Max speed: Medium + +WEAPONS +Crowbar + +GRENADES +None + +ABILITIES +None + +
+
+ + \ No newline at end of file diff --git a/resource/classes/civilian.jpg b/resource/classes/civilian.jpg new file mode 100644 index 0000000..e4bf3e5 Binary files /dev/null and b/resource/classes/civilian.jpg differ diff --git a/resource/classes/default.html b/resource/classes/default.html new file mode 100644 index 0000000..25d6e00 --- /dev/null +++ b/resource/classes/default.html @@ -0,0 +1,41 @@ + + + +Default + + + +
+
+ff +Default class html file thing! +
+
+ + \ No newline at end of file diff --git a/resource/classes/demoman.html b/resource/classes/demoman.html new file mode 100644 index 0000000..4840aea --- /dev/null +++ b/resource/classes/demoman.html @@ -0,0 +1,57 @@ + + +Demoman + + + +
+
+ff +
+
DEMOMAN +demoman +There are "" on your team + +STATS +Max health: 90 +Max armor: 120 Medium Armor +Max speed: Medium + +WEAPONS +Grenade + Pipebomb Launcher, Single-Barrel Shotgun, Crowbar + +GRENADES +Hand Grenades, MIRV Grenades + +ABILITIES +Can set large explosive devices. +
+
+ + \ No newline at end of file diff --git a/resource/classes/demoman.jpg b/resource/classes/demoman.jpg new file mode 100644 index 0000000..c2065e2 Binary files /dev/null and b/resource/classes/demoman.jpg differ diff --git a/resource/classes/engineer.html b/resource/classes/engineer.html new file mode 100644 index 0000000..cd76e87 --- /dev/null +++ b/resource/classes/engineer.html @@ -0,0 +1,60 @@ + + +Engineer + + + +
+
+ff +
+
ENGINEER +engineer +There are "" on your team + +STATS +Max health: 90 +Max armor: 50 Medium Armor +Max speed: Medium + +WEAPONS +Railgun, Double-Barrel Shotgun, Wrench + +GRENADES +Hand Grenades, EMP Grenades + +ABILITIES +Can build automatic sentryguns. +Can build ammunition dispensers. +Can repair teammates armor. +Can create ammunition. +
+
+ + \ No newline at end of file diff --git a/resource/classes/engineer.jpg b/resource/classes/engineer.jpg new file mode 100644 index 0000000..6fca135 Binary files /dev/null and b/resource/classes/engineer.jpg differ diff --git a/resource/classes/ffheader.jpg b/resource/classes/ffheader.jpg new file mode 100644 index 0000000..696e416 Binary files /dev/null and b/resource/classes/ffheader.jpg differ diff --git a/resource/classes/hwguy.html b/resource/classes/hwguy.html new file mode 100644 index 0000000..bc7028c --- /dev/null +++ b/resource/classes/hwguy.html @@ -0,0 +1,57 @@ + + +HWGuy + + + +
+
+ff +
+
HEAVY WEAPONS GUY +hwguy +There are "" on your team + +STATS +Max health: 100 +Max armor: 300 Heavy Armor +Max speed: Very Slow + +WEAPONS +Assault Cannon, Single-Barrel Shotgun, Double-Barrel Shotgun, Crowbar + +GRENADES +Hand Grenades, MIRV Grenades + +ABILITIES +Heavy, isn't pushed by explosions. +
+
+ + \ No newline at end of file diff --git a/resource/classes/hwguy.jpg b/resource/classes/hwguy.jpg new file mode 100644 index 0000000..5ca557d Binary files /dev/null and b/resource/classes/hwguy.jpg differ diff --git a/resource/classes/medic.html b/resource/classes/medic.html new file mode 100644 index 0000000..8cb2d9e --- /dev/null +++ b/resource/classes/medic.html @@ -0,0 +1,58 @@ + + +Medic + + + +
+
+ff +
+
MEDIC +medic +There are "" on your team + +STATS +Max health: 90 +Max armor: 100 Medium Armor +Max speed: Fast + +WEAPONS +Medikit, Super Nail Gun, Single-Barrel Shotgun, Double-Barrel Shotgun + +GRENADES +Hand Grenades, Concussion Grenades + +ABILITIES +Can heal teammates with Medikit. +Automatically regenerates health. +
+
+ + \ No newline at end of file diff --git a/resource/classes/medic.jpg b/resource/classes/medic.jpg new file mode 100644 index 0000000..d9f4707 Binary files /dev/null and b/resource/classes/medic.jpg differ diff --git a/resource/classes/pyro.html b/resource/classes/pyro.html new file mode 100644 index 0000000..70cde9f --- /dev/null +++ b/resource/classes/pyro.html @@ -0,0 +1,57 @@ + + +Pyro + + + +
+
+ff +
+
PYRO +pyro +There are "" on your team + +STATS +Max health: 100 +Max armor: 150 Medium Armor +Max speed: Medium + +WEAPONS +Flam-Thrower, Incendiary Cannon, Single-Barrel Shotgun, Crowbar + +GRENADES +Hand Grenades, Napalm Grenades + +ABILITIES +Flame resistant. +
+
+ + \ No newline at end of file diff --git a/resource/classes/pyro.jpg b/resource/classes/pyro.jpg new file mode 100644 index 0000000..fbb0377 Binary files /dev/null and b/resource/classes/pyro.jpg differ diff --git a/resource/classes/random.html b/resource/classes/random.html new file mode 100644 index 0000000..198ec0c --- /dev/null +++ b/resource/classes/random.html @@ -0,0 +1,45 @@ + + +Random + + + +
+
+ff +
+
RANDOM +randompc +There are "" on your team + +Every time you die, RandomPC will randomly pick one of the other classes to become. +
+
+ + \ No newline at end of file diff --git a/resource/classes/randompc.jpg b/resource/classes/randompc.jpg new file mode 100644 index 0000000..b268456 Binary files /dev/null and b/resource/classes/randompc.jpg differ diff --git a/resource/classes/scout.html b/resource/classes/scout.html new file mode 100644 index 0000000..68a49fd --- /dev/null +++ b/resource/classes/scout.html @@ -0,0 +1,59 @@ + + +Scout + + + +
+
+ff +
+
SCOUT +scout +There are "" on your team + +STATS +Max health: 75 +Max armor: 50 Light Armor +Max speed: Very Fast + +WEAPONS +Single-Barrel Shotgun, Nail Gun, Crowbar + +GRENADES +Caltrop Canisters, Concussion Grenades + +ABILITIES +Can remove an enemy Spy's disguise. +Can disarm Demomen's detpacks. + +
+
+ + \ No newline at end of file diff --git a/resource/classes/scout.jpg b/resource/classes/scout.jpg new file mode 100644 index 0000000..8b71916 Binary files /dev/null and b/resource/classes/scout.jpg differ diff --git a/resource/classes/sniper.html b/resource/classes/sniper.html new file mode 100644 index 0000000..c1d0734 --- /dev/null +++ b/resource/classes/sniper.html @@ -0,0 +1,55 @@ + + +Sniper + + + +
+
+ff +
+
SNIPER +sniper +There are "" on your team + +STATS +Max health: 90 +Max armor: 50 Light Armor +Max speed: Medium + +WEAPONS +Sniper Rifle (with automatic fire), Nail Gun, Crowbar + +GRENADES +Hand Grenades + +
+
+ + \ No newline at end of file diff --git a/resource/classes/sniper.jpg b/resource/classes/sniper.jpg new file mode 100644 index 0000000..7d37fbb Binary files /dev/null and b/resource/classes/sniper.jpg differ diff --git a/resource/classes/soldier.html b/resource/classes/soldier.html new file mode 100644 index 0000000..7ff89b3 --- /dev/null +++ b/resource/classes/soldier.html @@ -0,0 +1,55 @@ + + +Soldier + + + +
+
+ff +
+
SOLDIER +soldier +There are "" on your team + +STATS +Max health: 100 +Max armor: 200 Heavy Armor +Max speed: Slow + +WEAPONS +Rocket Launcher, Single-Barrel Shotgun, Double-Barrel Shotgun, Crowbar + +GRENADES +Hand Grenades, Nail grenades + +
+
+ + \ No newline at end of file diff --git a/resource/classes/soldier.jpg b/resource/classes/soldier.jpg new file mode 100644 index 0000000..4ff7e2d Binary files /dev/null and b/resource/classes/soldier.jpg differ diff --git a/resource/classes/spy.html b/resource/classes/spy.html new file mode 100644 index 0000000..7e053df --- /dev/null +++ b/resource/classes/spy.html @@ -0,0 +1,60 @@ + + +Spy + + + +
+
+ff +
+
SPY +spy +There are "" on your team + +STATS +Max health: 90 +Max armor: 100 Light Armor +Max speed: Medium + +WEAPONS +Tranquilizer, Double-Barrel Shotgun, Nail Gun, Knife + +GRENADES +Hand Grenades, Hallucination Grenades + +ABILITIES +Can disguise to look like and enemy. +Can feign death. +Can remove an enemy Spy's disguise. +Can backstab for and instant kill. +
+
+ + \ No newline at end of file diff --git a/resource/classes/spy.jpg b/resource/classes/spy.jpg new file mode 100644 index 0000000..4b5e8f1 Binary files /dev/null and b/resource/classes/spy.jpg differ diff --git a/resource/ff_version_client.txt b/resource/ff_version_client.txt new file mode 100644 index 0000000..b888de8 --- /dev/null +++ b/resource/ff_version_client.txt @@ -0,0 +1,13 @@ +2.46.1 + +CLIENT version: +- only the first line of this file matters +- this determines the version of the CLIENT +- it can only be up to 15 characters long + +// Okay the server and client are versioned separately so that we can do a +// client- or server- only update if required. +// The client version is checked when FF is loaded +// The client + server versions are checked when a server is joined +// It is the discretion of the web-based version check script whether or not +// to tell the client to upgrade or that the server they are joining is out of date. \ No newline at end of file diff --git a/resource/ff_version_server.txt b/resource/ff_version_server.txt new file mode 100644 index 0000000..52d98b7 --- /dev/null +++ b/resource/ff_version_server.txt @@ -0,0 +1,13 @@ +2.46 + +SERVER version: +- only the first line of this file matters +- this determines the version of the SERVER +- it can only be up to 15 characters long + +// Okay the server and client are versioned separately so that we can do a +// client- or server- only update if required. +// The client version is checked when FF is loaded +// The client + server versions are checked when a server is joined +// It is the discretion of the web-based version check script whether or not +// to tell the client to upgrade or that the server they are joining is out of date. \ No newline at end of file diff --git a/resource/game_menu.tga b/resource/game_menu.tga new file mode 100644 index 0000000..f75ead1 Binary files /dev/null and b/resource/game_menu.tga differ diff --git a/resource/game_menu_mouseover.tga b/resource/game_menu_mouseover.tga new file mode 100644 index 0000000..0dc5fe4 Binary files /dev/null and b/resource/game_menu_mouseover.tga differ diff --git a/resource/gameui_english.txt b/resource/gameui_english.txt new file mode 100644 index 0000000..05f8b8f Binary files /dev/null and b/resource/gameui_english.txt differ diff --git a/resource/halflife2.ttf b/resource/halflife2.ttf new file mode 100644 index 0000000..e121d7e Binary files /dev/null and b/resource/halflife2.ttf differ diff --git a/resource/icon_ff-original.tga b/resource/icon_ff-original.tga new file mode 100644 index 0000000..060511f Binary files /dev/null and b/resource/icon_ff-original.tga differ diff --git a/resource/icon_ff.tga b/resource/icon_ff.tga new file mode 100644 index 0000000..657077d Binary files /dev/null and b/resource/icon_ff.tga differ diff --git a/resource/overviews/ff_hunted_a08.txt b/resource/overviews/ff_hunted_a08.txt new file mode 100644 index 0000000..40771a8 --- /dev/null +++ b/resource/overviews/ff_hunted_a08.txt @@ -0,0 +1,9 @@ +"ff_hunted_a08" +{ + "material" "overviews/ff_hunted_a08" // texture file + "pos_x" "3998" // X coordinate, + "pos_y" "3463" // Y coordinate, + "scale" "7.0" // and used scale used when taking the screenshot + "rotate" "0" // map was rotated by 90 degress in image editor + "zoom" "1.3" // optimal zoom factor if map is shown in full size +} \ No newline at end of file diff --git a/resource/spectatormenu.res b/resource/spectatormenu.res new file mode 100644 index 0000000..b6bb677 --- /dev/null +++ b/resource/spectatormenu.res @@ -0,0 +1,130 @@ + // Command Menu Definition +// +// "filename.res" +// { +// "menuitem1" +// { +// "label" "#GoToB" // lable name shown in game, # = localized string +// "command" "echo hallo" // a command string +// "toggle" "sv_cheats" // a 0/1 toggle cvar +// "rule" "map" // visibility rules : "none", "team", "map","class" +// "ruledata" "de_dust" // rule data, eg map name or team number +// } +// +// "menuitem2" +// { +// ... +// } +// +// ... +// +// } +// +//-------------------------------------------------------- +// Everything below here is editable + +"spectatormenu.res" +{ + "menuitem1" + { + "label" "#Valve_Close" // name shown in game + "command" "spec_menu 0" // type data + } + + "menuitem2" + { + "label" "#Valve_Settings" + + "menuitem21" + { + "label" "#Valve_Chat_Messages" + "toggle" "hud_saytext" + } + + "menuitem22" + { + "label" "#Valve_Show_Status" + "toggle" "spec_drawstatus" + } + + "menuitem23" + { + "label" "#Valve_Overview_Locked" + "toggle" "overview_locked" + } + + "menuitem24" + { + "label" "#Valve_Overview_Names" + "toggle" "overview_names" + } + + "menuitem25" + { + "label" "#Valve_Overview_Health" + "toggle" "overview_health" + } + + "menuitem26" + { + "label" "#Valve_Overview_Tracks" + "toggle" "overview_tracks" + } + } + + "menuitem3" + { + "label" "#Valve_Overview" + + "menuitem31" + { + "label" "#Valve_Overview_Off" + "command" "overview_mode 0" + } + + "menuitem32" + { + "label" "#Valve_Overview_Small" + "command" "overview_mode 1" + } + + "menuitem33" + { + "label" "#Valve_Overview_Large" + "command" "overview_mode 2" + } + + "menuitem34" + { + "label" "#Valve_Overview_ZoomIn" + "command" "overview_zoomrel 1.1" + } + + "menuitem35" + { + "label" "#Valve_Overview_ZoomOut" + "command" "overview_zoomrel 0.9" + } + } + + "menuitem4" + { + "label" "#Valve_Auto_Director" + "toggle" "spec_autodirector" + } + + "menuitem5" + { + "label" "#Valve_Show_Scores" + "command" "togglescores" + } +} + +// Here are the rest of the buttons and submenus +// You can change these safely if you want. + + + + + + diff --git a/resource/spectatormodes.res b/resource/spectatormodes.res new file mode 100644 index 0000000..955bc48 --- /dev/null +++ b/resource/spectatormodes.res @@ -0,0 +1,53 @@ +// Command Menu Definition +// +// "filename.res" +// { +// "menuitem1" +// { +// "label" "#GoToB" // lable name shown in game, # = localized string +// "toggle" "sv_cheats" // a 0/1 toggle cvar +// "command" "say_team Go 2 B" // your type specific data, a client command or cvar etc. +// "rule" "map" // visibility rules : "none", "team", "map","class" +// "ruledata" "de_dust" // rule data, eg map name or team number +// } +// +// "menuitem2" +// { +// ... +// } +// +// ... +// +// } +// +//-------------------------------------------------------- +// Everything below here is editable + +"spectatormodes.res" +{ + "type" "menu" + + "menuitem1" + { + "label" "#Spec_Mode3" // name shown in game + "command" "spec_mode 3" // type data + } + + "menuitem2" + { + "label" "#Spec_Mode4" + "command" "spec_mode 4" + } + + "menuitem3" + { + "label" "#Spec_Mode5" + "command" "spec_mode 5" + } +} + + + + + + diff --git a/resource/ui/BottomSpectator.res b/resource/ui/BottomSpectator.res new file mode 100644 index 0000000..5f9d3c7 --- /dev/null +++ b/resource/ui/BottomSpectator.res @@ -0,0 +1,105 @@ +"Resource/UI/BottomSpectator.res" +{ + "specmenu" + { + "ControlName" "Frame" + "fieldName" "specmenu" + "xpos" "0" + "ypos" "428" + "wide" "640" + "tall" "55" + "visible" "1" + "enabled" "0" + "tabPosition" "0" + } + "settingscombo" + { + "ControlName" "ComboBox" + "fieldName" "settingscombo" + "xpos" "15" + "ypos" "14" + "wide" "140" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "west" + } + "playercombo" + { + "ControlName" "ComboBox" + "fieldName" "playercombo" + "xpos" "c-108" + "ypos" "14" + "wide" "216" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "center" + } + "viewcombo" + { + "ControlName" "ComboBox" + "fieldName" "viewcombo" + "xpos" "r155" + "ypos" "14" + "wide" "140" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "west" + } + "specprev" + { + "ControlName" "Button" + "fieldName" "specprev" + "xpos" "c-140" + "ypos" "14" + "wide" "25" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "command" "specprev" + } + "specnext" + { + "ControlName" "Button" + "fieldName" "specnext" + "xpos" "c115" + "ypos" "14" + "wide" "25" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "command" "specnext" + } + +} diff --git a/resource/ui/ClassMenu.res b/resource/ui/ClassMenu.res new file mode 100644 index 0000000..a24df3e --- /dev/null +++ b/resource/ui/ClassMenu.res @@ -0,0 +1,602 @@ +"Resource/UI/ClassMenu.res" +{ + "class" + { + "ControlName" "CClassMenu" + "fieldName" "classmenu" + "xpos" "c-320" //0 + "ypos" "0" + "wide" "640" //640 + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "SysMenu" + { + "ControlName" "Menu" + "fieldName" "SysMenu" + "xpos" "0" + "ypos" "0" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "0" + "tabPosition" "0" + } + "ClassPreview" + { + "ControlName" "ModelPanel" + "fieldName" "ClassPreview" + "xpos" "c" + "ypos" "60" + "wide" "316" + "tall" "350" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FullSection" + { + "ControlName" "Section" + "fieldName" "FullSection" + "xpos" "0" //12 + "ypos" "0" + "wide" "640" //616 + "tall" "480"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_small" + "titleText" "" + } + "ChangeClassSection" + { + "ControlName" "Section" + "fieldName" "ChangeClassSection" + "xpos" "62" //12 + "ypos" "73" + "wide" "180" //616 + "tall" "270"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_small" + "titleText" "" + } + "WeaponsSection" + { + "ControlName" "Section" + "fieldName" "WeaponsSection" + "xpos" "246" //12 + "ypos" "73" + "wide" "125" //616 + "tall" "270"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "MenuTitle" + "titleText" "Weapons" + } + "WepSlot1" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot1" + "xpos" "246" //12 + "ypos" "93" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot2" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot2" + "xpos" "246" //12 + "ypos" "133" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot3" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot3" + "xpos" "246" //12 + "ypos" "173" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot4" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot4" + "xpos" "246" //12 + "ypos" "213" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot5" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot5" + "xpos" "246" //12 + "ypos" "253" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot6" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot6" + "xpos" "246" //12 + "ypos" "293" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "WepSlot7" + { + "ControlName" "LoadoutLabel" + "fieldName" "WepSlot6" + "xpos" "246" //12 + "ypos" "333" + "wide" "125" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "GrenadesSection" + { + "ControlName" "Section" + "fieldName" "GrenadesSection" + "xpos" "375" //12 + "ypos" "73" + "wide" "175" //616 + "tall" "80"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "MenuTitle" + "titleText" "Grenades" + } + "PrimaryGren" + { + "ControlName" "LoadoutLabel" + "fieldName" "PrimaryGren" + "xpos" "385" //12 + "ypos" "103" + "wide" "70" //616 + "tall" "40"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "SecondaryGren" + { + "ControlName" "LoadoutLabel" + "fieldName" "SecondaryGren" + "xpos" "465" //12 + "ypos" "103" + "wide" "70" //616 + "tall" "40"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ClassInfoSection" + { + "ControlName" "Section" + "fieldName" "ClassInfoSection" + "xpos" "62" //12 + "ypos" "347" + "wide" "309" //616 + "tall" "80"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "ClassMenu" + "titleText" "Class Information" + } + "ClassInfo" + { + "ControlName" "RichText" + "fieldName" "ClassInfo" + "xpos" "232" //12 + "ypos" "367" + "wide" "130" //616 + "tall" "52"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "text" "Special Abilities: Test +Second Line: Test word wrap word wrap word wrap word wrap" + "border" "0" + } + "SpeedLabel" + { + "ControlName" "ClassPropertiesLabel" + "fieldName" "SpeedLabel" + "xpos" "72" //12 + "ypos" "367" + "wide" "150" //616 + "tall" "16"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FirepowerLabel" + { + "ControlName" "ClassPropertiesLabel" + "fieldName" "FirepowerLabel" + "xpos" "72" //12 + "ypos" "385" + "wide" "150" //616 + "tall" "16"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "HealthLabel" + { + "ControlName" "ClassPropertiesLabel" + "fieldName" "HealthLabel" + "xpos" "72" //12 + "ypos" "403" + "wide" "150" //616 + "tall" "16"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ClassRoleSection" + { + "ControlName" "Section" + "fieldName" "ClassRoleSection" + "xpos" "375" //12 + "ypos" "397" + "wide" "175" //616 + "tall" "30"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ClassRole" + { + "ControlName" "Label" + "fieldName" "ClassRole" + "xpos" "375" + "ypos" "397" + "wide" "175" + "tall" "30" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + + "changeclass" + { + "ControlName" "Label" + "fieldName" "changeclass" + "xpos" "76" + "ypos" "70" + "wide" "450" + "tall" "48" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#FF_CHANGECLASS" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + "ScoutButton" + { + "ControlName" "MouseOverButton" + "fieldName" "ScoutButton" + "xpos" "76" + "ypos" "116" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "labelText" "#FF_MENU_SCOUT" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "scout" + } + "SniperButton" + { + "ControlName" "MouseOverButton" + "fieldName" "SniperButton" + "xpos" "156" + "ypos" "116" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "labelText" "#FF_MENU_SNIPER" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "sniper" + } + + "SoldierButton" + { + "ControlName" "MouseOverButton" + "fieldName" "SoldierButton" + "xpos" "76" + "ypos" "148" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "5" + "labelText" "#FF_MENU_SOLDIER" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "soldier" + } + + "DemomanButton" + { + "ControlName" "MouseOverButton" + "fieldName" "DemomanButton" + "xpos" "156" + "ypos" "148" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "labelText" "#FF_MENU_DEMOMAN" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "demoman" + } + "MedicButton" + { + "ControlName" "MouseOverButton" + "fieldName" "MedicButton" + "xpos" "76" + "ypos" "180" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "labelText" "#FF_MENU_MEDIC" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "medic" + } + "HwguyButton" + { + "ControlName" "MouseOverButton" + "fieldName" "HwguyButton" + "xpos" "156" + "ypos" "180" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_HWGUY" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "hwguy" + } + "PyroButton" + { + "ControlName" "MouseOverButton" + "fieldName" "PyroButton" + "xpos" "76" + "ypos" "212" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_PYRO" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "pyro" + } + "SpyButton" + { + "ControlName" "MouseOverButton" + "fieldName" "SpyButton" + "xpos" "156" + "ypos" "212" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_SPY" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "spy" + } + "EngineerButton" + { + "ControlName" "MouseOverButton" + "fieldName" "EngineerButton" + "xpos" "76" + "ypos" "244" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_ENGINEER" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "engineer" + } + "CivilianButton" + { + "ControlName" "MouseOverButton" + "fieldName" "CivilianButton" + "xpos" "156" + "ypos" "244" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_CIVILIAN" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "civilian" + } + "RandomButton" + { + "ControlName" "MouseOverButton" + "fieldName" "RandomButton" + "xpos" "76" + "ypos" "276" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_RANDOM" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "randompc" + } + "CancelButton" + { + "ControlName" "FFButton" + "fieldName" "CancelButton" + "xpos" "76" + "ypos" "308" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_CANCEL" + "font" "ClassMenu" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "cancel" + } +} \ No newline at end of file diff --git a/resource/ui/FFGameModes.res b/resource/ui/FFGameModes.res new file mode 100644 index 0000000..01eb6d2 --- /dev/null +++ b/resource/ui/FFGameModes.res @@ -0,0 +1,65 @@ +"Resource/UI/FFGameModes.res" +{ + "FFGameModesPanel" + { + "ControlName" "CFFGameModesPanel" + "fieldName" "FFGameModesPanel" + "xpos" "212" + "ypos" "106" + "wide" "512" + "tall" "406" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#GameUI_FortressGameModes" + } + "PlayButton" + { + "ControlName" "Button" + "fieldName" "PlayButton" + "xpos" "344" + "ypos" "372" + "wide" "72" + "tall" "24" + "labelText" "#GameUI_Play" + "Command" "OK" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "424" + "ypos" "372" + "wide" "72" + "tall" "24" + "labelText" "#GameUI_Cancel" + "Command" "Cancel" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "GameModesPages" + { + "ControlName" "CFFGameModesPages" + "fieldName" "GameModesPages" + "xpos" "8" + "ypos" "26" + "wide" "496" + "tall" "342" + "autoResize" "1" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } +} \ No newline at end of file diff --git a/resource/ui/FFGameModesScenario.res b/resource/ui/FFGameModesScenario.res new file mode 100644 index 0000000..e400ed1 --- /dev/null +++ b/resource/ui/FFGameModesScenario.res @@ -0,0 +1,409 @@ +"resource/ui/FFGameModesScenario.res" +{ + "ScenarioGameMode" + { + "ControlName" "CFFScenarioGameMode" + "fieldName" "ScenarioGameMode" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "AllowedClass" + { + "ControlName" "CFFAllowedClasses" + "fieldName" "AllowedClass" + "xpos" "243" + "ypos" "230" + "wide" "313" + "tall" "140" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } + "BlueTeamNumbers" + { + "ControlName" "ComboBox" + "fieldName" "BlueTeamNumbers" + "xpos" "82" + "ypos" "108" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "BlueTeamAllowed" + { + "ControlName" "Button" + "fieldName" "BlueTeamAllowed" + "xpos" "32" + "ypos" "138" + "wide" "116" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_AllowedClasses" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "BlueTeamTitle" + { + "ControlName" "Label" + "fieldName" "BlueTeamTitle" + "xpos" "14" + "ypos" "74" + "wide" "185" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Blue Team - Offence" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "BlueTeamBotsLabel" + { + "ControlName" "Label" + "fieldName" "BlueTeamBotsLabel" + "xpos" "10" + "ypos" "108" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Bots" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "RedTeamNumbers" + { + "ControlName" "ComboBox" + "fieldName" "RedTeamNumbers" + "xpos" "82" + "ypos" "220" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "RedTeamAllowed" + { + "ControlName" "Button" + "fieldName" "RedTeamAllowed" + "xpos" "32" + "ypos" "250" + "wide" "118" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_AllowedClasses" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "RedTeamTitle" + { + "ControlName" "Label" + "fieldName" "RedTeamTitle" + "xpos" "14" + "ypos" "191" + "wide" "185" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Red Team - Offence" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "RedTeamBotsLabel" + { + "ControlName" "Label" + "fieldName" "RedTeamBotsLabel" + "xpos" "9" + "ypos" "220" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Bots" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "YellowTeamNumbers" + { + "ControlName" "ComboBox" + "fieldName" "YellowTeamNumbers" + "xpos" "330" + "ypos" "108" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "YellowTeamAllowed" + { + "ControlName" "Button" + "fieldName" "YellowTeamAllowed" + "xpos" "278" + "ypos" "138" + "wide" "116" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_AllowedClasses" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "YellowTeamTitle" + { + "ControlName" "Label" + "fieldName" "YellowTeamTitle" + "xpos" "262" + "ypos" "74" + "wide" "185" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Yellow team" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "YellowTeamBotsLabel" + { + "ControlName" "Label" + "fieldName" "YellowTeamBotsLabel" + "xpos" "258" + "ypos" "105" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Bots" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "GreenTeamNumbers" + { + "ControlName" "ComboBox" + "fieldName" "GreenTeamNumbers" + "xpos" "330" + "ypos" "220" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "GreenTeamAllowed" + { + "ControlName" "Button" + "fieldName" "GreenTeamAllowed" + "xpos" "278" + "ypos" "250" + "wide" "116" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_AllowedClasses" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "GreenTeamTitle" + { + "ControlName" "Label" + "fieldName" "GreenTeamTitle" + "xpos" "262" + "ypos" "191" + "wide" "185" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Green team" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "GreenTeamBotsLabel" + { + "ControlName" "Label" + "fieldName" "GreenTeamBotsLabel" + "xpos" "258" + "ypos" "220" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Bots" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "MapCombo" + { + "ControlName" "ComboBox" + "fieldName" "MapCombo" + "xpos" "194" + "ypos" "17" + "wide" "115" + "tall" "25" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "Label2" + { + "ControlName" "Label" + "fieldName" "Label2" + "xpos" "147" + "ypos" "18" + "wide" "37" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Map" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Divider1" + { + "ControlName" "Divider" + "fieldName" "Divider1" + "xpos" "246" + "ypos" "63" + "wide" "2" + "tall" "239" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "0" + "ypos" "0" + "wide" "304" + "tall" "577" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFGamemodesScenarioAllowedClasses.res b/resource/ui/FFGamemodesScenarioAllowedClasses.res new file mode 100644 index 0000000..6392960 --- /dev/null +++ b/resource/ui/FFGamemodesScenarioAllowedClasses.res @@ -0,0 +1,483 @@ +"resource/ui/FFGameModesScenarioAllowedClasses.res" +{ + "AllowedClass" + { + "ControlName" "CFFAllowedClasses" + "fieldName" "AllowedClass" + "xpos" "243" + "ypos" "230" + "wide" "313" + "tall" "140" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#GameUI_AllowedClasses" + } + "frame_topGrip" + { + "ControlName" "Panel" + "fieldName" "frame_topGrip" + "xpos" "8" + "ypos" "0" + "wide" "297" + "tall" "5" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_bottomGrip" + { + "ControlName" "Panel" + "fieldName" "frame_bottomGrip" + "xpos" "8" + "ypos" "135" + "wide" "287" + "tall" "5" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_leftGrip" + { + "ControlName" "Panel" + "fieldName" "frame_leftGrip" + "xpos" "0" + "ypos" "8" + "wide" "5" + "tall" "124" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_rightGrip" + { + "ControlName" "Panel" + "fieldName" "frame_rightGrip" + "xpos" "308" + "ypos" "8" + "wide" "5" + "tall" "114" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_tlGrip" + { + "ControlName" "Panel" + "fieldName" "frame_tlGrip" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_trGrip" + { + "ControlName" "Panel" + "fieldName" "frame_trGrip" + "xpos" "305" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_blGrip" + { + "ControlName" "Panel" + "fieldName" "frame_blGrip" + "xpos" "0" + "ypos" "132" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_brGrip" + { + "ControlName" "Panel" + "fieldName" "frame_brGrip" + "xpos" "295" + "ypos" "122" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_caption" + { + "ControlName" "Panel" + "fieldName" "frame_caption" + "xpos" "0" + "ypos" "0" + "wide" "303" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_minimize" + { + "ControlName" "Button" + "fieldName" "frame_minimize" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "0" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_maximize" + { + "ControlName" "Button" + "fieldName" "frame_maximize" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "1" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_mintosystray" + { + "ControlName" "Button" + "fieldName" "frame_mintosystray" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "o" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "MinimizeToSysTray" + "Default" "0" + } + "frame_close" + { + "ControlName" "Button" + "fieldName" "frame_close" + "xpos" "288" + "ypos" "8" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "r" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_menu" + { + "ControlName" "FrameSystemButton" + "fieldName" "frame_menu" + "xpos" "7" + "ypos" "8" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "ScoutChk" + { + "ControlName" "CheckButton" + "fieldName" "ScoutChk" + "xpos" "10" + "ypos" "28" + "wide" "96" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_SCOUT" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "SniperChk" + { + "ControlName" "CheckButton" + "fieldName" "SniperChk" + "xpos" "10" + "ypos" "52" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_SNIPER" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "SoldierChk" + { + "ControlName" "CheckButton" + "fieldName" "SoldierChk" + "xpos" "10" + "ypos" "76" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_SOLDIER" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "DemomanChk" + { + "ControlName" "CheckButton" + "fieldName" "DemomanChk" + "xpos" "106" + "ypos" "28" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_DEMOMAN" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "MedicChk" + { + "ControlName" "CheckButton" + "fieldName" "MedicChk" + "xpos" "106" + "ypos" "52" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_MEDIC" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "HwguyChk" + { + "ControlName" "CheckButton" + "fieldName" "HwguyChk" + "xpos" "106" + "ypos" "76" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_HWGUY" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "PyroChk" + { + "ControlName" "CheckButton" + "fieldName" "PyroChk" + "xpos" "202" + "ypos" "28" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_PYRO" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "SpyChk" + { + "ControlName" "CheckButton" + "fieldName" "SpyChk" + "xpos" "202" + "ypos" "52" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_SPY" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "EngineerChk" + { + "ControlName" "CheckButton" + "fieldName" "EngineerChk" + "xpos" "202" + "ypos" "76" + "wide" "96" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_PLAYER_ENGINEER" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "OKButton" + { + "ControlName" "Button" + "fieldName" "OKButton" + "xpos" "154" + "ypos" "107" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_OK" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "OK" + "Default" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "224" + "ypos" "107" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Cancel" + "Default" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "0" + "ypos" "0" + "wide" "304" + "tall" "577" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFGamemodesTraining.res b/resource/ui/FFGamemodesTraining.res new file mode 100644 index 0000000..07bc733 --- /dev/null +++ b/resource/ui/FFGamemodesTraining.res @@ -0,0 +1,91 @@ +"resource/ui/FFGameModesTraining.res" +{ + "TrainingGameMode" + { + "ControlName" "CFFTrainingGameMode" + "fieldName" "TrainingGameMode" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "TrainingTitle" + { + "ControlName" "Label" + "fieldName" "TrainingTitle" + "xpos" "24" + "ypos" "52" + "wide" "348" + "tall" "26" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Training_AvD" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "Trebuchet24" + "wrap" "0" + } + "TrainingDescription" + { + "ControlName" "Label" + "fieldName" "TrainingDescription" + "xpos" "24" + "ypos" "78" + "wide" "282" + "tall" "175" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Training_AvD_Desc" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "1" + } + "TrainingScriptsCombo" + { + "ControlName" "ComboBox" + "fieldName" "TrainingScriptsCombo" + "xpos" "24" + "ypos" "21" + "wide" "208" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "470" + "ypos" "21" + "wide" "304" + "tall" "577" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFOptions.res b/resource/ui/FFOptions.res new file mode 100644 index 0000000..dd5b2ff --- /dev/null +++ b/resource/ui/FFOptions.res @@ -0,0 +1,81 @@ +"Resource/UI/FFOptions.res" +{ + "FFOptionsPanel" + { + "ControlName" "CFFOptionsPanel" + "fieldName" "FFOptionsPanel" + "xpos" "212" + "ypos" "106" + "wide" "512" + "tall" "406" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#GameUI_FortressOptions" + } + "OKButton" + { + "ControlName" "Button" + "fieldName" "OKButton" + "xpos" "264" + "ypos" "372" + "wide" "72" + "tall" "24" + "labelText" "#GameUI_OK" + "Command" "OK" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "344" + "ypos" "372" + "wide" "72" + "tall" "24" + "labelText" "#GameUI_Cancel" + "Command" "Cancel" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ApplyButton" + { + "ControlName" "Button" + "fieldName" "ApplyButton" + "xpos" "424" + "ypos" "372" + "wide" "72" + "tall" "24" + "labelText" "#GameUI_Apply" + "Command" "Apply" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OptionsPages" + { + "ControlName" "CFFOptionsPages" + "fieldName" "OptionsPages" + "xpos" "8" + "ypos" "26" + "wide" "496" + "tall" "342" + "autoResize" "1" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } +} \ No newline at end of file diff --git a/resource/ui/FFOptionsSubCrosshairs.res b/resource/ui/FFOptionsSubCrosshairs.res new file mode 100644 index 0000000..25e043d --- /dev/null +++ b/resource/ui/FFOptionsSubCrosshairs.res @@ -0,0 +1,804 @@ +"resource/ui/FFOptionsSubCrosshairs.res" +{ + "CrosshairOptions" + { + "ControlName" "CFFCrosshairOptions" + "fieldName" "CrosshairOptions" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerCharacter" + { + "ControlName" "ComboBox" + "fieldName" "InnerCharacter" + "xpos" "78" + "ypos" "28" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "OuterCharacter" + { + "ControlName" "ComboBox" + "fieldName" "OuterCharacter" + "xpos" "78" + "ypos" "181" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "7" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "InnerScale" + { + "ControlName" "CInputSlider" + "fieldName" "InnerScale" + "xpos" "78" + "ypos" "52" + "wide" "126" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerScaleInput" + { + "ControlName" "TextEntry" + "fieldName" "InnerScaleInput" + "xpos" "211" + "ypos" "52" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "outerScale" + { + "ControlName" "CInputSlider" + "fieldName" "OuterScale" + "xpos" "78" + "ypos" "205" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OuterScaleInput" + { + "ControlName" "TextEntry" + "fieldName" "OuterScaleInput" + "xpos" "211" + "ypos" "205" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "8" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "InnerRed" + { + "ControlName" "CInputSlider" + "fieldName" "InnerRed" + "xpos" "78" + "ypos" "73" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerRedInput" + { + "ControlName" "TextEntry" + "fieldName" "InnerRedInput" + "xpos" "211" + "ypos" "73" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "OuterRed" + { + "ControlName" "CInputSlider" + "fieldName" "OuterRed" + "xpos" "78" + "ypos" "226" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OuterRedInput" + { + "ControlName" "TextEntry" + "fieldName" "OuterRedInput" + "xpos" "211" + "ypos" "226" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "9" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "InnerGreen" + { + "ControlName" "CInputSlider" + "fieldName" "InnerGreen" + "xpos" "78" + "ypos" "94" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerGreenInput" + { + "ControlName" "TextEntry" + "fieldName" "InnerGreenInput" + "xpos" "211" + "ypos" "94" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "OuterGreen" + { + "ControlName" "CInputSlider" + "fieldName" "OuterGreen" + "xpos" "78" + "ypos" "247" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OuterGreenInput" + { + "ControlName" "TextEntry" + "fieldName" "OuterGreenInput" + "xpos" "211" + "ypos" "247" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "10" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "InnerBlue" + { + "ControlName" "CInputSlider" + "fieldName" "InnerBlue" + "xpos" "78" + "ypos" "115" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerBlueInput" + { + "ControlName" "TextEntry" + "fieldName" "InnerBlueInput" + "xpos" "211" + "ypos" "115" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "5" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "OuterBlue" + { + "ControlName" "CInputSlider" + "fieldName" "OuterBlue" + "xpos" "78" + "ypos" "268" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OuterBlueInput" + { + "ControlName" "TextEntry" + "fieldName" "OuterBlueInput" + "xpos" "211" + "ypos" "268" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "11" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "InnerAlpha" + { + "ControlName" "CInputSlider" + "fieldName" "InnerAlpha" + "xpos" "78" + "ypos" "136" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "InnerAlphaInput" + { + "ControlName" "TextEntry" + "fieldName" "InnerAlphaInput" + "xpos" "210" + "ypos" "136" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "6" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "OuterAlpha" + { + "ControlName" "CInputSlider" + "fieldName" "OuterAlpha" + "xpos" "78" + "ypos" "289" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "OuterAlphaInput" + { + "ControlName" "TextEntry" + "fieldName" "OuterAlphaInput" + "xpos" "211" + "ypos" "289" + "wide" "32" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "12" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "InnerUseGlobal" + { + "ControlName" "CheckButton" + "fieldName" "InnerUseGlobal" + "xpos" "130" + "ypos" "5" + "wide" "133" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "0" + "tabPosition" "0" + "labelText" "#GameUI_UseGlobal" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "outerUseGlobal" + { + "ControlName" "CheckButton" + "fieldName" "OuterUseGlobal" + "xpos" "130" + "ypos" "158" + "wide" "134" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "0" + "tabPosition" "0" + "labelText" "#GameUI_UseGlobal" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "UseGlobal" + { + "ControlName" "CheckButton" + "fieldName" "UseGlobal" + "xpos" "275" + "ypos" "49" + "wide" "185" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_UseGlobalAll" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "innerDisplay" + { + "ControlName" "Label" + "fieldName" "innerDisplay" + "xpos" "280" + "ypos" "100" + "zpos" "2" + "wide" "190" + "tall" "190" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "0" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "font" "Crosshairs1" + "wrap" "0" + } + "outerDisplay" + { + "ControlName" "Label" + "fieldName" "outerDisplay" + "xpos" "280" + "ypos" "100" + "zpos" "1" + "wide" "190" + "tall" "190" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "F" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "CrosshairBackground" + { + "ControlName" "ImagePanel" + "fieldName" "CrosshairBackground" + "xpos" "280" + "ypos" "100" + "zpos" "-1" + "wide" "190" + "tall" "190" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "border" "DepressedBorder" + "scaleImage" "1" + } + "weapon" + { + "ControlName" "ComboBox" + "fieldName" "Weapon" + "xpos" "292" + "ypos" "23" + "wide" "150" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "13" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "Label1" + { + "ControlName" "Label" + "fieldName" "Label1" + "xpos" "8" + "ypos" "28" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Shape" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label2" + { + "ControlName" "Label" + "fieldName" "Label2" + "xpos" "6" + "ypos" "73" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Red" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label3" + { + "ControlName" "Label" + "fieldName" "Label3" + "xpos" "7" + "ypos" "52" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Size" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label4" + { + "ControlName" "Label" + "fieldName" "Label4" + "xpos" "7" + "ypos" "94" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Green" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label5" + { + "ControlName" "Label" + "fieldName" "Label5" + "xpos" "6" + "ypos" "115" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Blue" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label6" + { + "ControlName" "Label" + "fieldName" "Label6" + "xpos" "7" + "ypos" "136" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Alpha" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label7" + { + "ControlName" "Label" + "fieldName" "Label7" + "xpos" "10" + "ypos" "5" + "wide" "113" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_PrimaryCrosshair" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label8" + { + "ControlName" "Label" + "fieldName" "Label8" + "xpos" "10" + "ypos" "158" + "wide" "121" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_SecondaryCrosshair" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label9" + { + "ControlName" "Label" + "fieldName" "Label9" + "xpos" "8" + "ypos" "181" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Shape" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label10" + { + "ControlName" "Label" + "fieldName" "Label10" + "xpos" "8" + "ypos" "205" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Size" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label11" + { + "ControlName" "Label" + "fieldName" "Label11" + "xpos" "8" + "ypos" "226" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Red" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label12" + { + "ControlName" "Label" + "fieldName" "Label12" + "xpos" "8" + "ypos" "247" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Green" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label13" + { + "ControlName" "Label" + "fieldName" "Label13" + "xpos" "8" + "ypos" "268" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Blue" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label14" + { + "ControlName" "Label" + "fieldName" "Label14" + "xpos" "8" + "ypos" "289" + "wide" "64" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Alpha" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "0" + "ypos" "0" + "wide" "304" + "tall" "577" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFOptionsSubDLights.res b/resource/ui/FFOptionsSubDLights.res new file mode 100644 index 0000000..45ec9a7 --- /dev/null +++ b/resource/ui/FFOptionsSubDLights.res @@ -0,0 +1,679 @@ +"resource/ui/FFOptionsSubDLights.res" +{ + "DLightOptions" + { + "ControlName" "CFFDLightOptions" + "fieldName" "DLightOptions" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightMax" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightMax" + "xpos" "130" + "ypos" "20" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightMaxInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightMaxInput" + "xpos" "430" + "ypos" "20" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightExplosion" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightExplosion" + "xpos" "130" + "ypos" "60" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightExplosionInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightExplosionInput" + "xpos" "430" + "ypos" "60" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightMuzzle" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightMuzzle" + "xpos" "130" + "ypos" "82" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightMuzzleInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightMuzzleInput" + "xpos" "430" + "ypos" "82" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightFlamethrower" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightFlamethrower" + "xpos" "130" + "ypos" "104" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightFlamethrowerInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightFlamethrowerInput" + "xpos" "430" + "ypos" "104" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightIgnited" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightIgnited" + "xpos" "130" + "ypos" "126" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightIgnitedInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightIgnitedInput" + "xpos" "430" + "ypos" "126" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "5" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightNapalm" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightNapalm" + "xpos" "130" + "ypos" "148" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightNapalmInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightNapalmInput" + "xpos" "430" + "ypos" "148" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "6" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightIC" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightIC" + "xpos" "130" + "ypos" "170" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightICInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightICInput" + "xpos" "430" + "ypos" "170" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "7" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightRocket" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightRocket" + "xpos" "130" + "ypos" "192" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightRocketInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightRocketInput" + "xpos" "430" + "ypos" "192" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "8" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightRail" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightRail" + "xpos" "130" + "ypos" "214" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightRailInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightRailInput" + "xpos" "430" + "ypos" "214" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "9" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightConc" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightConc" + "xpos" "130" + "ypos" "236" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightConcInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightConcInput" + "xpos" "430" + "ypos" "236" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "10" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightFlashlight" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightFlashlight" + "xpos" "130" + "ypos" "258" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightFlashlightInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightFlashlightInput" + "xpos" "430" + "ypos" "258" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "11" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "FFDLightGeneric" + { + "ControlName" "CInputSlider" + "fieldName" "FFDLightGeneric" + "xpos" "130" + "ypos" "280" + "wide" "300" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "FFDLightGenericInput" + { + "ControlName" "TextEntry" + "fieldName" "FFDLightGenericInput" + "xpos" "430" + "ypos" "280" + "wide" "40" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "12" + "textHidden" "0" + "editable" "1" + "maxchars" "-1" + "NumericInputOnly" "1" + "unicode" "0" + } + "Label1" + { + "ControlName" "Label" + "fieldName" "Label1" + "xpos" "0" + "ypos" "0" + "wide" "496" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DLightOptions" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label2" + { + "ControlName" "Label" + "fieldName" "Label2" + "xpos" "0" + "ypos" "20" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_MaxDLights" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label3" + { + "ControlName" "Label" + "fieldName" "Label3" + "xpos" "0" + "ypos" "60" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Explosion" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label4" + { + "ControlName" "Label" + "fieldName" "Label4" + "xpos" "0" + "ypos" "82" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_MFlash" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label5" + { + "ControlName" "Label" + "fieldName" "Label5" + "xpos" "0" + "ypos" "104" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Flamer" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label6" + { + "ControlName" "Label" + "fieldName" "Label6" + "xpos" "0" + "ypos" "126" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_PlayerBurn" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label7" + { + "ControlName" "Label" + "fieldName" "Label7" + "xpos" "0" + "ypos" "148" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Napalm" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label8" + { + "ControlName" "Label" + "fieldName" "Label8" + "xpos" "0" + "ypos" "170" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_IC" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label9" + { + "ControlName" "Label" + "fieldName" "Label9" + "xpos" "0" + "ypos" "192" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Rocket" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label10" + { + "ControlName" "Label" + "fieldName" "Label10" + "xpos" "0" + "ypos" "214" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Rail" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label11" + { + "ControlName" "Label" + "fieldName" "Label11" + "xpos" "0" + "ypos" "236" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Conc" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label12" + { + "ControlName" "Label" + "fieldName" "Label12" + "xpos" "0" + "ypos" "258" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Flashlight" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label13" + { + "ControlName" "Label" + "fieldName" "Label13" + "xpos" "0" + "ypos" "280" + "wide" "120" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Generic" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "Label14" + { + "ControlName" "Label" + "fieldName" "Label14" + "xpos" "0" + "ypos" "40" + "wide" "496" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_DL_Scale" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } +} diff --git a/resource/ui/FFOptionsSubMisc.res b/resource/ui/FFOptionsSubMisc.res new file mode 100644 index 0000000..a4360aa --- /dev/null +++ b/resource/ui/FFOptionsSubMisc.res @@ -0,0 +1,17 @@ +"resource/ui/FFOptionsSubMisc.res" +{ + "MiscOptions" + { + "ControlName" "CFFMiscOptions" + "fieldName" "MiscOptions" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } +} diff --git a/resource/ui/FFOptionsSubTimer.res b/resource/ui/FFOptionsSubTimer.res new file mode 100644 index 0000000..6ce5233 --- /dev/null +++ b/resource/ui/FFOptionsSubTimer.res @@ -0,0 +1,151 @@ +"resource/ui/FFOptionsSubTimer.res" +{ + "TimerOptions" + { + "ControlName" "CFFTimerOptions" + "fieldName" "TimerOptions" + "xpos" "0" + "ypos" "28" + "wide" "496" + "tall" "314" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "TimerList" + { + "ControlName" "ComboBox" + "fieldName" "TimerList" + "xpos" "31" + "ypos" "30" + "wide" "145" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "PlayButton" + { + "ControlName" "Button" + "fieldName" "PlayButton" + "xpos" "183" + "ypos" "30" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Play" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Play" + "Default" "0" + } + "Label1" + { + "ControlName" "Label" + "fieldName" "Label1" + "xpos" "31" + "ypos" "66" + "wide" "188" + "tall" "112" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_TimerHelp" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "1" + } + "BeepList" + { + "ControlName" "ComboBox" + "fieldName" "BeepList" + "xpos" "280" + "ypos" "30" + "wide" "145" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "unicode" "0" + } + "PlayButton2" + { + "ControlName" "Button" + "fieldName" "PlayButton2" + "xpos" "432" + "ypos" "30" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Play" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Play2" + "Default" "0" + } + "Label2" + { + "ControlName" "Label" + "fieldName" "Label2" + "xpos" "280" + "ypos" "66" + "wide" "188" + "tall" "112" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_KillBeepHelp" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "1" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "0" + "ypos" "0" + "wide" "304" + "tall" "577" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFSplash.res b/resource/ui/FFSplash.res new file mode 100644 index 0000000..a8972f1 --- /dev/null +++ b/resource/ui/FFSplash.res @@ -0,0 +1,275 @@ +"resource/ui/FFSplash.res" +{ + "FFSplashPanel" + { + "ControlName" "CFFSplashPanel" + "fieldName" "FFSplashPanel" + "xpos" "100" + "ypos" "100" + "wide" "440" + "tall" "320" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Splash" + } + "frame_topGrip" + { + "ControlName" "Panel" + "fieldName" "frame_topGrip" + "xpos" "8" + "ypos" "0" + "wide" "424" + "tall" "5" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_bottomGrip" + { + "ControlName" "Panel" + "fieldName" "frame_bottomGrip" + "xpos" "8" + "ypos" "315" + "wide" "414" + "tall" "5" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_leftGrip" + { + "ControlName" "Panel" + "fieldName" "frame_leftGrip" + "xpos" "0" + "ypos" "8" + "wide" "5" + "tall" "304" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_rightGrip" + { + "ControlName" "Panel" + "fieldName" "frame_rightGrip" + "xpos" "435" + "ypos" "8" + "wide" "5" + "tall" "294" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_tlGrip" + { + "ControlName" "Panel" + "fieldName" "frame_tlGrip" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_trGrip" + { + "ControlName" "Panel" + "fieldName" "frame_trGrip" + "xpos" "432" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_blGrip" + { + "ControlName" "Panel" + "fieldName" "frame_blGrip" + "xpos" "0" + "ypos" "312" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_brGrip" + { + "ControlName" "Panel" + "fieldName" "frame_brGrip" + "xpos" "422" + "ypos" "302" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_caption" + { + "ControlName" "Panel" + "fieldName" "frame_caption" + "xpos" "0" + "ypos" "0" + "wide" "430" + "tall" "23" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_minimize" + { + "ControlName" "Button" + "fieldName" "frame_minimize" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "0" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_maximize" + { + "ControlName" "Button" + "fieldName" "frame_maximize" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "1" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_mintosystray" + { + "ControlName" "Button" + "fieldName" "frame_mintosystray" + "xpos" "0" + "ypos" "0" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "o" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "MinimizeToSysTray" + "Default" "0" + } + "frame_close" + { + "ControlName" "Button" + "fieldName" "frame_close" + "xpos" "415" + "ypos" "8" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "r" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "frame_menu" + { + "ControlName" "FrameSystemButton" + "fieldName" "frame_menu" + "xpos" "7" + "ypos" "8" + "wide" "18" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Default" "0" + } + "FFSplashPanelHTML" + { + "ControlName" "SplashHTML" + "fieldName" "FFSplashPanelHTML" + "xpos" "20" + "ypos" "30" + "wide" "390" + "tall" "270" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "500" + "ypos" "75" + "wide" "300" + "tall" "420" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/resource/ui/FFTraining.res b/resource/ui/FFTraining.res new file mode 100644 index 0000000..c7f91fb --- /dev/null +++ b/resource/ui/FFTraining.res @@ -0,0 +1,119 @@ +"Resource/UI/FFTraining.res" +{ + "FFTrainingPanel" + { + "ControlName" "CFFTrainingPanel" + "fieldName" "FFTrainingPanel" + "xpos" "212" + "ypos" "106" + "wide" "512" + "tall" "406" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#GameUI_Training" + } + "TrainingTitle" + { + "ControlName" "Label" + "fieldName" "TrainingTitle" + "xpos" "24" + "ypos" "52" + "wide" "348" + "tall" "26" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Training_Title" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "Trebuchet24" + "wrap" "0" + } + "TrainingDescription" + { + "ControlName" "Label" + "fieldName" "TrainingDescription" + "xpos" "24" + "ypos" "78" + "wide" "282" + "tall" "175" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Training_Desc" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "1" + } + "StatusLabel" + { + "ControlName" "Label" + "fieldName" "StatusLabel" + "xpos" "40" + "ypos" "78" + "wide" "150" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + } + "OKButton" + { + "ControlName" "Button" + "fieldName" "OKButton" + "xpos" "330" + "ypos" "372" + "wide" "88" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Start" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "OK" + "Default" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "424" + "ypos" "372" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Cancel" + "Default" "0" + } +} diff --git a/resource/ui/FFUpdates.res b/resource/ui/FFUpdates.res new file mode 100644 index 0000000..ed97789 --- /dev/null +++ b/resource/ui/FFUpdates.res @@ -0,0 +1,100 @@ +"Resource/UI/FFUpdates.res" +{ + "ff_update_info" + { + "ControlName" "CFFUpdateInfo" + "fieldName" "ff_update_info" + "xpos" "212" + "ypos" "106" + "wide" "512" + "tall" "206" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "Fortress Forever Updater" + } + "UpdateTitle" + { + "ControlName" "Label" + "fieldName" "UpdateTitle" + "xpos" "24" + "ypos" "25" + "wide" "480" + "tall" "50" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_UPDATE_TITLE_OUTOFDATE" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "Trebuchet24" + "wrap" "0" + } + "UpdateDescription" + { + "ControlName" "Label" + "fieldName" "UpdateDescription" + "xpos" "24" + "ypos" "78" + "wide" "480" + "tall" "75" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_UPDATE_TEXT_OUTOFDATE" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "1" + } + "OKButton" + { + "ControlName" "Button" + "fieldName" "OKButton" + "xpos" "50" + "ypos" "172" + "wide" "368" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_UPDATE_DOWNLOAD" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "OK" + "Default" "0" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "424" + "ypos" "172" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#GameUI_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "Command" "Cancel" + "Default" "0" + } +} diff --git a/resource/ui/MOTD.res b/resource/ui/MOTD.res new file mode 100644 index 0000000..d3e10ed --- /dev/null +++ b/resource/ui/MOTD.res @@ -0,0 +1,70 @@ +"Resource/UI/MOTD.res" +{ + "ClientMOTD" //master frame + { + "ControlName" "Frame" + "fieldName" "ClientMOTD" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "setTitleBarVisible" "0" + } + "Message" + { + "ControlName" "HTML" + "fieldName" "Message" + "xpos" "76" + "ypos" "116" + "wide" "480" + "tall" "240" + "autoResize" "3" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ok" + { + "ControlName" "Button" + "fieldName" "ok" + "xpos" "76" + "ypos" "364" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Cstrike_OK" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "Command" "okay" + "Default" "1" + } + "serverName" + { + "ControlName" "Label" + "fieldName" "serverName" + "xpos" "84" + "ypos" "72" + "wide" "400" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Server Name Goes Here +++ :p" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } +} diff --git a/resource/ui/MapGuideMenu.res b/resource/ui/MapGuideMenu.res new file mode 100644 index 0000000..84084b7 --- /dev/null +++ b/resource/ui/MapGuideMenu.res @@ -0,0 +1,202 @@ +"Resource/UI/MapGuideMenu.res" +{ + "mapguides" + { + "ControlName" "CMapGuideMenu" + "fieldName" "mapguidemenu" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "SysMenu" + { + "ControlName" "Menu" + "fieldName" "SysMenu" + "xpos" "0" + "ypos" "0" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "0" + "tabPosition" "0" + } + "MapGuideImage" + { + "ControlName" "ImagePanel" + "fieldName" "MapGuideImage" + "xpos" "244" + "ypos" "116" + "wide" "316" + "tall" "286" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "scaleImage" "1" + } + "choosemapguide" + { + "ControlName" "Label" + "fieldName" "choosemapguide" + "xpos" "76" + "ypos" "22" + "wide" "450" + "tall" "48" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#FF_MAPGUIDE_CHOOSE" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + "overview" + { + "ControlName" "MouseOverPanelButton" + "fieldName" "overview" + "xpos" "76" + "ypos" "116" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "labelText" "#FF_MAPGUIDE_OVERVIEW" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "mapguide overview" + } + + "interest" + { + "ControlName" "MouseOverPanelButton" + "fieldName" "interest" + "xpos" "76" + "ypos" "148" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "5" + "labelText" "#FF_MAPGUIDE_INTEREST" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "mapguide interest" + } + + "extraguide1" + { + "ControlName" "MouseOverPanelButton" + "fieldName" "extraguide1" + "xpos" "76" + "ypos" "180" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "mapguide extraguide1" + } + + "extraguide2" + { + "ControlName" "MouseOverPanelButton" + "fieldName" "extraguide2" + "xpos" "76" + "ypos" "212" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "mapguide extraguide2" + } + + "extraguide3" + { + "ControlName" "MouseOverPanelButton" + "fieldName" "extraguide3" + "xpos" "76" + "ypos" "244" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "mapguide extraguide3" + } + + "extraguide4" + { + "ControlName" "Button" + "fieldName" "extraguide4" + "xpos" "76" + "ypos" "276" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "mapguide extraguide4" + } + "cancelbutton" + { + "ControlName" "Button" + "fieldName" "cancelbutton" + "xpos" "76" + "ypos" "308" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_MENU_CANCEL" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "cancel" + } +} \ No newline at end of file diff --git a/resource/ui/MapScreenshotMenu.res b/resource/ui/MapScreenshotMenu.res new file mode 100644 index 0000000..3f4c081 --- /dev/null +++ b/resource/ui/MapScreenshotMenu.res @@ -0,0 +1,56 @@ +"Resource/UI/MapScreenshotMenu.res" +{ + "map" + { + "ControlName" "CMapScreen" + "fieldName" "mapscreen" + "xpos" "c-320" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + + + "ImagePanel" + { + "ControlName" "ImagePanel" + "fieldName" "ImagePanelLogo" + "xpos" "20" + "ypos" "26" + "wide" "600" + "tall" "426" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "loading_screen_map" + "scaleImage" "1" + } + + "CloseButton" + { + "ControlName" "FFButton" + "fieldName" "CloseButton" + "xpos" "76" + "ypos" "454" + "wide" "68" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#FF_CLOSE" + "font" "ClassMenu" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "Command" "close" + } +} \ No newline at end of file diff --git a/resource/ui/ScoreBoard.res b/resource/ui/ScoreBoard.res new file mode 100644 index 0000000..11339c8 --- /dev/null +++ b/resource/ui/ScoreBoard.res @@ -0,0 +1,84 @@ +"Resource/UI/ScoreBoard.res" +{ + "ScoreboardFrame" + { + "ControlName" "Section" + "fieldName" "ScoreboardFrame" + "xpos" "0" + "ypos" "0" + "wide" "444" + "tall" "360" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "titleText" "#TITLE_SCOREBOARD" + } + "scores" + { + "ControlName" "CClientScoreBoardDialog" + "fieldName" "scores" + "xpos" "63" + "ypos" "42" + "wide" "444" + "tall" "360" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + } + "ServerName" + { + "ControlName" "Label" + "fieldName" "ServerName" + "xpos" "10" + "ypos" "11" + "wide" "250" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "font" "Scoreboard_Header" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "1" + } + "MapName" + { + "ControlName" "Label" + "fieldName" "MapName" + "xpos" "334" + "ypos" "11" + "wide" "100" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "font" "Scoreboard_Header" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "1" + } + "PlayerList" + { + "ControlName" "SectionedListPanel" + "fieldName" "PlayerList" + "xpos" "0" + "ypos" "0" + "wide" "444" + "tall" "320" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "autoresize" "3" + "linespacing" "13" + } +} diff --git a/resource/ui/Spectator.res b/resource/ui/Spectator.res new file mode 100644 index 0000000..9a760c4 --- /dev/null +++ b/resource/ui/Spectator.res @@ -0,0 +1,91 @@ +"Resource/UI/SpectatorGUI.res" +{ + "SpectatorGUI" + { + "ControlName" "Frame" + "fieldName" "SpectatorGUI" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "topbar" + { + "ControlName" "Panel" + "fieldName" "topbar" + "xpos" "10" + "ypos" "10" + "tall" "19" + "wide" "125" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "bottombarblank" + { + "ControlName" "Panel" + "fieldName" "bottombarblank" + "xpos" "0" + "ypos" "428" + "tall" "55" // this needs to match the size of BottomBar + "wide" "640" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "playerlabel" + { + "ControlName" "Label" + "fieldName" "playerlabel" + "xpos" "c-108" + "ypos" "441" + "wide" "216" + "tall" "26" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "center" + } + "DividerBar" + { + "ControlName" "ImagePanel" + "fieldName" "DividerBar" + "xpos" "r94" + "ypos" "12" + "wide" "1" + "tall" "30" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "fillcolor" "BorderBright" + "labelText" "" + "textAlignment" "center" + } + "extrainfo" + { + "ControlName" "Label" + "fieldName" "extrainfo" + "xpos" "18" + "ypos" "12" + "wide" "150" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } +} diff --git a/resource/ui/TeamMenu.res b/resource/ui/TeamMenu.res new file mode 100644 index 0000000..7b41d1a --- /dev/null +++ b/resource/ui/TeamMenu.res @@ -0,0 +1,360 @@ +"Resource/UI/TeamMenu.res" +{ + "ServerInfo" + { + "ControlName" "Section" + "fieldName" "ServerInfo" + "xpos" "20" //12 + "ypos" "12" + "wide" "600" //616 + "tall" "80"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_small" + "titleText" "#TITLE_SERVERINFO" + } + "ServerInfoButton" + { + "ControlName" "FFButton" + "fieldName" "ServerInfoButton" + "xpos" "34" + "ypos" "34" + "wide" "188" + "tall" "48" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "font" "TeamMenuTitles" + "labelText" "VIEW SERVER INFORMATION" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "command" "serverinfo" + "default" "1" + } + "ServerInfoHost" + { + "ControlName" "HTML" + "fieldName" "ServerInfoHost" + "xpos" "242" //20 + "ypos" "34" + "wide" "360" //600 + "tall" "48" //51 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "wrap" "1" + //"border" "" + "tabPosition" "0" + } + "TeamSelection" + { + "ControlName" "Section" + "fieldName" "TeamSelection" + "xpos" "20" //12 + "ypos" "100" + "wide" "600" //616 + "tall" "167" + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_large" + "titleText" "#TITLE_TEAMSELECTION" + } +// "MapScreenshot" +// { +// "ControlName" "Section" +// "fieldName" "MapScreenshot" +// "xpos" "12" //12 +// "ypos" "276" +// "wide" "190" //187 +// "tall" "187" +// "autoResize" "0" //0 +// "pinCorner" "0" +// "visible" "1" +// "enabled" "1" +// "tabPosition" "0" +// "font" "TeamMenuTitles_small" +// "titleText" "#TITLE_MAPSCREENSHOT" +// } + + "MapScreenshotButton" + { + "ControlName" "Section" //"Button" + "fieldName" "MapScreenshotButton" + "xpos" "20" + "ypos" "276" + "wide" "182" //190 + "tall" "187" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_large" + "labelText" "#TITLE_MAPSCREENSHOT" + "textAlignment" "center" + //"dulltext" "0" + //"brighttext" "0" + "Command" "map shot" + } + "ImagePanel" + { + "ControlName" "ImagePanel" + "fieldName" "ImagePanelLogo" + "xpos" "30" + "ypos" "290" + "wide" "160" + "tall" "160" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "image" "loading_screen_map" + "scaleImage" "1" + } + + //"MapInfo" + //{ + // "ControlName" "Section" + // "fieldName" "MapInfo" + // "xpos" "212" + // "ypos" "280" + // "wide" "175" + // "tall" "50" + // "autoResize" "1" //0 + // "pinCorner" "0" + // "visible" "1" + // "enabled" "1" + // "tabPosition" "0" + // "font" "TeamMenuTitles_small" + // "titleText" "#TITLE_MAPINFO" + //} + //"ServerVars" + //{ + // "ControlName" "Section" + // "fieldName" "ServerVars" + // "xpos" "400" + // "ypos" "280" + // "wide" "227" + // "tall" "50" + // "autoResize" "0" //0 + // "pinCorner" "0" + // "visible" "1" + // "enabled" "1" + // "tabPosition" "0" + // "font" "TeamMenuTitles_small" + // "titleText" "#TITLE_SERVERVARS" + //} + "MapDescription" //objectives + { + "ControlName" "Section" + "fieldName" "MapDescription" + "xpos" "212" //212 + "ypos" "276" //342 + "wide" "408" //416 + "tall" "187" //125 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_small" + "titleText" "#TITLE_MAPDESCRIPTION" + } + "MapDescriptionHead" + { + "ControlName" "Label" + "fieldName" "MapDescriptionHead" + "xpos" "220" //220 + "ypos" "294" //360 + "wide" "400" //399 + "tall" "16" + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "wrap" "1" + "tabPosition" "0" + } + "MapDescriptionText" + { + "ControlName" "RichText" + "fieldName" "MapDescriptionText" + "xpos" "220" //220 + "ypos" "310" //376 + "wide" "392" //400 + "tall" "143" //81 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "wrap" "0" + "border" "0" + "tabPosition" "0" + } + "team" + { + "ControlName" "CTeamMenu" + "fieldName" "teammenu" + "xpos" "c-320" //0 + "ypos" "0" + "wide" "640" //640 + "tall" "480" + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "BlueTeamButton" + { + "ControlName" "TeamButton" + "fieldName" "BlueTeamButton" + "xpos" "76" //76 + "ypos" "114" //112 + "wide" "110" + "tall" "110" + "autoResize" "0" //0 + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_BLUE" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "team blue" + } + "RedTeamButton" + { + "ControlName" "TeamButton" + "fieldName" "RedTeamButton" + "xpos" "76" //76 + "ypos" "114" + "wide" "110" + "tall" "110" + "autoResize" "0" //0 + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_RED" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "team red" + } + "YellowTeamButton" + { + "ControlName" "TeamButton" + "fieldName" "YellowTeamButton" + "xpos" "76" + "ypos" "114" + "wide" "110" + "tall" "110" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "5" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_YELLOW" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "team yellow" + } + "GreenTeamButton" + { + "ControlName" "TeamButton" + "fieldName" "GreenTeamButton" + "xpos" "76" + "ypos" "114" + "wide" "110" + "tall" "110" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_GREEN" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "team green" + } + "AutoAssignButton" + { + "ControlName" "FFButton" + "fieldName" "AutoAssignButton" + "xpos" "76" + "ypos" "234" + "wide" "96" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_AUTOTEAM" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "command" "team auto" + "default" "1" + } + "SpectateButton" + { + "ControlName" "FFButton" + "fieldName" "SpectateButton" + "xpos" "76" + "ypos" "234" + "wide" "96" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_SPECTATOR" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "Command" "team spec" + } + "FlythroughButton" + { + "ControlName" "FFButton" + "fieldName" "FlythroughButton" + "xpos" "76" + "ypos" "234" + "wide" "96" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "6" + "font" "TeamMenuTitles" + "labelText" "#FF_MENU_MAPGUIDE" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "Command" "mapguidemenu" + } +} diff --git a/resource/ui/TextWindow.res b/resource/ui/TextWindow.res new file mode 100644 index 0000000..cc803f4 --- /dev/null +++ b/resource/ui/TextWindow.res @@ -0,0 +1,106 @@ +"Resource/UI/TextWindow.res" +{ + "info" + { + "ControlName" "CTextWindow" + "fieldName" "TextWindow" + "xpos" "c-320" //0 + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + } + + "MOTD" + { + "ControlName" "Section" + "fieldName" "MOTD" + "xpos" "20" //12 + "ypos" "12" + "wide" "600" //616 + "tall" "463"//75 + "autoResize" "0" //0 + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "font" "TeamMenuTitles_small" + "titleText" "" + } + + "HTMLMessage" + { + "ControlName" "HTML" + "fieldName" "HTMLMessage" + "xpos" "36" + "ypos" "56" + "wide" "568" + "tall" "376" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "TextMessage" + { + "ControlName" "TextEntry" + "fieldName" "TextMessage" + "xpos" "36" + "ypos" "56" + "wide" "568" + "tall" "376" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "textAlignment" "northwest" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + } + + "MessageTitle" + { + "ControlName" "Label" + "fieldName" "MessageTitle" + "xpos" "46" + "ypos" "14" + "wide" "450" + "tall" "48" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "Message Title" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + + "ok" + { + "ControlName" "FFButton" + "fieldName" "ok" + "xpos" "40" + "ypos" "444" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "labelText" "#PropertyDialog_OK" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "command" "okay" + "default" "1" + } +} diff --git a/scripts/HudAnimations.txt b/scripts/HudAnimations.txt new file mode 100644 index 0000000..336637f --- /dev/null +++ b/scripts/HudAnimations.txt @@ -0,0 +1,1082 @@ +// sample animation script +// +// +// commands: +// Animate +// variables: +// FgColor +// BgColor +// Position +// Size +// Blur (hud panels only) +// TextColor (hud panels only) +// Ammo2Color (hud panels only) +// Alpha (hud weapon selection only) +// SelectionAlpha (hud weapon selection only) +// TextScan (hud weapon selection only) +// +// interpolator: +// Linear +// Accel - starts moving slow, ends fast +// Deaccel - starts moving fast, ends slow +// +// RunEvent +// starts another even running at the specified time +// +// StopEvent +// stops another event that is current running at the specified time +// +// StopAnimation +// stops all animations refering to the specified variable in the specified panel +// +// StopPanelAnimations +// stops all active animations operating on the specified panel +// +// SetFont +// change to a diff font- use cl_Animation info to get Font parameter (left column) +// +// +// Useful game console commands: +// cl_Animationinfo or +// displays all the animatable variables for the hud element +// + +////////////////////// HUD MENU ///////////////////////////// + +event MenuOpen +{ + StopEvent MenuClose 0.0 + + // fade in + Animate HudMenu Alpha "255" Linear 0.0 0.1 + Animate HudMenu SelectionAlpha "255" Linear 0.0 0.1 + Animate HudMenu MenuColor "255 255 255 255" Linear 0.0 0.1 + Animate HudMenu ItemColor "200 200 200 255" Linear 0.0 0.1 + Animate HudMenu MenuBoxColor "0 0 0 25" Linear 0.0 0.1 + Animate HudMenu TextScan "1" Linear 0.0 0.1 + + // Undo any blur + Animate HudMenu Blur "1" Linear 0.0 0.01 + + // Fonts + SetFont HudMenu "TextFont" "Default" 0.0 + SetFont HudMenu "ItemFont" "Default" 0.0 + SetFont HudMenu "ItemFontPulsing" "Default" 0.0 +} + +event MenuClose +{ + // Hide it + Animate HudMenu Alpha "0" Linear 0.0 1 + Animate HudMenu SelectionAlpha "0" Linear 0.0 1 + Animate HudMenu MenuColor "0 0 0 0" Linear 0.0 1 + Animate HudMenu ItemColor "0 0 0 0" Linear 0.0 1 +} + +event MenuPulse +{ + Animate HudMenu Blur "7" Linear 0.0 0.1 + Animate HudMenu Blur "2" Deaccel 0.1 0.1 + Animate HudMenu Blur "7" Linear 0.2 0.1 + Animate HudMenu Blur "2" Deaccel 0.3 0.1 + Animate HudMenu Blur "7" Linear 0.4 0.1 + Animate HudMenu Blur "2" Deaccel 0.5 0.1 + Animate HudMenu Blur "1" Deaccel 0.6 0.4 +} + +////////////////////// FORTRESS POINTS ///////////////////////////// + +event NewTotalFortPoints +{ + + Animate HudPlayerTotalScore FgColor "HealthIncAbove100Color" Linear 0.0 0.25 + Animate HudPlayerTotalScore FgColor "FgColor" Linear 0.25 0.3 + Animate HudPlayerTotalScore Blur "3" Linear 0.0 0.1 + Animate HudPlayerTotalScore Blur "0" Deaccel 0.1 2.0 +} + +event NewLatestFortPoints +{ + + Animate HudPlayerLatestScore FgColor "HealthIncAbove100Color" Linear 0.0 0.25 +// Animate HudPlayerLatestScore FgColor "FgColor" Linear 0.75 0.3 + +// change the number after Linear here for however long you want the latest score to stay on screen before fading + Animate HudPlayerLatestScore FgColor "0 0 0 0" Linear 4.0 0.5 + Animate HudPlayerLatestScore Blur "3" Linear 0.0 0.1 + Animate HudPlayerLatestScore Blur "0" Deaccel 0.1 2.0 +} + +////////////////////// ARMOR ///////////////////////////// + +// "0 210 0 255" - semidark green +event ArmorIncrease +{ + StopEvent ArmorBelow25 0.0 + Animate HudArmor FgColor "FgColor" Linear 0.0 0.0 + Animate HudArmor FgColor "200 255 200 255" Deaccel 0.0 0.3 + Animate HudArmor FgColor "FgColor" Accel 0.3 0.3 + +} + +event ArmorDamageTaken +{ + Animate HudArmor FgColor "255 255 255 255" Linear 0.0 0.0 + Animate HudArmor FgColor "255 255 255 255" Linear 0.0 0.05 + Animate HudArmor FgColor "FgColor" Deaccel 0.05 0.05 +} + +event ArmorBelow25 +{ + Animate HudArmor FgColor "ArmorLowColor" Linear 0.0 0.0 + Animate HudArmor FgColor "ArmorLowColor" Linear 0.0 0.27 + Animate HudArmor FgColor "255 255 255 255" Linear 0.27 0.03 + Animate HudArmor FgColor "ArmorLowColor" Linear 0.3 0.01 + + RunEvent ArmorBelow25 0.31 +} + +event ArmorIncreaseBelow25 +{ + StopEvent ArmorBelow25 0.0 + RunEvent ArmorIncrease 0.0 + RunEvent ArmorBelow25 0.8 +} + +////////////////////// ADDARMOR ///////////////////////////// + +// "0 210 0 255" - semidark green +event NewAddArmor +{ + Animate HudPlayerAddArmor FgColor "FgColor" Linear 0.0 0.0 + Animate HudPlayerAddArmor FgColor "255 128 50 255" Deaccel 0.0 0.3 + + Animate HudPlayerAddArmor Position "87 406" Linear 0.0 0.0 + Animate HudPlayerAddArmor Position "87 376" Linear 0.0 4.5 + +// change the number after Linear here for however long you want the +/- armor to stay on screen before fading + Animate HudPlayerAddArmor FgColor "0 0 0 0" Linear 2.0 0.5 + Animate HudPlayerAddArmor Blur "3" Linear 0.0 0.1 + Animate HudPlayerAddArmor Blur "0" Deaccel 0.1 2.0 + +} + +event NewSubtractArmor +{ + Animate HudPlayerAddArmor FgColor "FgColor" Linear 0.0 0.0 + Animate HudPlayerAddArmor FgColor "ArmorLowColor" Deaccel 0.0 0.3 + + Animate HudPlayerAddArmor Position "87 406" Linear 0.0 0.0 + Animate HudPlayerAddArmor Position "87 376" Linear 0.0 4.5 + +// change the number after Linear here for however long you want the +/- armor to stay on screen before fading + Animate HudPlayerAddArmor FgColor "0 0 0 0" Linear 2.0 0.5 + Animate HudPlayerAddArmor Blur "3" Linear 0.0 0.1 + Animate HudPlayerAddArmor Blur "0" Deaccel 0.1 2.0 +} + +////////////////////// HEALTH ///////////////////////////// + +event HealthIncrease +{ + StopEvent HealthBelow25 0.0 + Animate HudHealth FgColor "FgColor" Linear 0.0 0.0 + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +event HealthIncreaseAbove100 +{ + StopEvent HealthBelow25 0.0 + Animate HudHealth FgColor "HealthIncAbove100Color" Linear 0.0 0.25 + Animate HudHealth FgColor "FgColor" Linear 0.25 0.3 + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +// Pertains to FortressForever HudHealth +event HealthDamageTaken +{ + Animate HudHealth FgColor "255 255 255 255" Linear 0.0 0.0 + Animate HudHealth FgColor "255 255 255 255" Linear 0.0 0.05 + Animate HudHealth FgColor "FgColor" Deaccel 0.05 0.05 +} + +// Pertains to FortressForever HudHealth +event HealthBelow25 +{ + Animate HudHealth FgColor "HealthLowColor" Linear 0.0 0.0 + Animate HudHealth FgColor "HealthLowColor" Linear 0.0 0.27 + Animate HudHealth FgColor "255 255 255 255" Accel 0.27 0.03 + Animate HudHealth FgColor "HealthLowColor" Deaccel 0.3 0.27 + Animate HudHealth FgColor "255 255 255 255" Accel 0.57 0.03 + Animate HudHealth FgColor "HealthLowColor" Deaccel 0.6 0.1 + + RunEvent HealthBelow25 0.7 +} + +// Pertains to FortressForever HudHealth +event HealthIncreaseBelow25 +{ + StopEvent HealthBelow25 0.0 + + RunEvent HealthIncrease 0.0 + RunEvent HealthBelow25 0.8 +} + +////////////////////// ADDHEALTH ///////////////////////////// + +// "0 210 0 255" - semidark green +event NewAddHealth +{ + Animate HudPlayerAddHealth FgColor "FgColor" Linear 0.0 0.0 + Animate HudPlayerAddHealth FgColor "0 210 0 255" Deaccel 0.0 0.3 + + Animate HudPlayerAddHealth Position "3 406" Linear 0.0 0.0 + Animate HudPlayerAddHealth Position "3 376" Linear 0.0 4.5 + +// change the number after Linear here for however long you want the +/- armor to stay on screen before fading + Animate HudPlayerAddHealth FgColor "0 0 0 0" Linear 2.0 0.5 + Animate HudPlayerAddHealth Blur "3" Linear 0.0 0.1 + Animate HudPlayerAddHealth Blur "0" Deaccel 0.1 2.0 + +} + +event NewSubtractHealth +{ + Animate HudPlayerAddHealth FgColor "FgColor" Linear 0.0 0.0 + Animate HudPlayerAddHealth FgColor "HealthLowColor" Deaccel 0.0 0.3 + + Animate HudPlayerAddHealth Position "3 406" Linear 0.0 0.0 + Animate HudPlayerAddHealth Position "3 376" Linear 0.0 4.5 + +// change the number after Linear here for however long you want the +/- armor to stay on screen before fading + Animate HudPlayerAddHealth FgColor "0 0 0 0" Linear 2.0 0.5 + Animate HudPlayerAddHealth Blur "3" Linear 0.0 0.1 + Animate HudPlayerAddHealth Blur "0" Deaccel 0.1 2.0 +} + +////////////////////// OTHER ///////////////////////////// + +event LevelInit +{ +} + +event OpenWeaponSelectionMenu +{ + StopEvent CloseWeaponSelectionMenu 0.0 + StopEvent WeaponPickup 0.0 + StopEvent FadeOutWeaponSelectionMenu 0.0 + + // make the display visible + Animate HudWeaponSelection Alpha "128" Linear 0.0 0.1 + Animate HudWeaponSelection SelectionAlpha "255" Linear 0.0 0.1 + Animate HudWeaponSelection FgColor "FgColor" Linear 0.0 0.1 + Animate HudWeaponSelection TextColor "BrightFg" Linear 0.0 0.1 + Animate HudWeaponSelection TextScan "1" Linear 0.0 0.1 +} + +event CloseWeaponSelectionMenu +{ + // hide the whole thing near immediately + Animate HudWeaponSelection FgColor "0 0 0 0" Linear 0.0 0.1 + Animate HudWeaponSelection TextColor "0 0 0 0" Linear 0.0 0.1 + Animate HudWeaponSelection Alpha "0" Linear 0.0 0.1 + Animate HudWeaponSelection SelectionAlpha "0" Linear 0.0 0.1 +} + +event FadeOutWeaponSelectionMenu +{ + // slowly hide the whole thing + Animate HudWeaponSelection FgColor "0 0 0 0" Linear 0.0 1.5 + Animate HudWeaponSelection TextColor "0 0 0 0" Linear 0.0 1.5 + Animate HudWeaponSelection Alpha "0" Linear 0.0 1.5 + Animate HudWeaponSelection SelectionAlpha "0" Linear 0.0 1.5 +} + +// Jiggles: Hint Box Fade in/out + +event OpenHintCenter +{ + StopEvent CloseHintCenter 0.0 + StopEvent FadeOutHintCenter 0.0 + StopEvent OpenHintCenterIcon 0.0 + + // make the display visible + //Animate HudHintCenter Alpha "180" Linear 0.0 0.1 + Animate HudHintCenter SelectionAlpha "255" Linear 0.0 0.1 + Animate HudHintCenter BGBoxColor "Dark" Linear 0.0 0.1 + Animate HudHintCenter TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHintCenter TextScan "1" Linear 0.0 0.1 + Animate HudHintText Alpha "255" Linear 0.0 0.1 + Animate NextButton Alpha "255" Linear 0.0 0.1 + Animate PrevButton Alpha "255" Linear 0.0 0.1 +} + +event OpenHintCenterIcon +{ + StopEvent CloseHintCenter 0.0 + StopEvent FadeOutHintCenter 0.0 + StopEvent OpenHintCenter 0.0 + + // make the display visible + //Animate HudHintCenter Alpha "180" Linear 0.0 0.1 + Animate HudHintCenter SelectionAlpha "0" Linear 0.0 0.1 + Animate HudHintCenter BGBoxColor "Dark" Linear 0.0 0.1 + Animate HudHintCenter TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHintCenter TextScan "1" Linear 0.0 0.1 + Animate HudHintText Alpha "0" Linear 0.0 0.1 + Animate NextButton Alpha "0" Linear 0.0 0.1 + Animate PrevButton Alpha "0" Linear 0.0 0.1 +} + +event CloseHintCenter +{ + // hide the whole thing near immediately + Animate HudHintCenter BGBoxColor "0 0 0 0" Linear 0.0 0.1 + Animate HudHintCenter TextColor "0 0 0 0" Linear 0.0 0.1 + //Animate HudHintCenter Alpha "0" Linear 0.0 0.1 + Animate HudHintCenter SelectionAlpha "0" Linear 0.0 0.1 + Animate HudHintText Alpha "0" Linear 0.0 0.1 + Animate NextButton Alpha "0" Linear 0.0 0.1 + Animate PrevButton Alpha "0" Linear 0.0 0.1 +} + +event FadeOutHintCenter +{ + // slowly hide the whole thing + Animate HudHintCenter BGBoxColor "0 0 0 0" Linear 0.0 1.5 + Animate HudHintCenter TextColor "0 0 0 0" Linear 0.0 1.5 + //Animate HudHintCenter Alpha "0" Linear 0.0 1.5 + Animate HudHintCenter SelectionAlpha "0" Linear 0.0 1.5 + Animate HudHintText Alpha "0" Linear 0.0 1.5 + Animate NextButton Alpha "0" Linear 0.0 1.5 + Animate PrevButton Alpha "0" Linear 0.0 1.5 +} + +// End + + +event SuitAuxPowerMax +{ + // hide the suit power + Animate HudSuitPower BgColor "0 0 0 0" Linear 0.0 0.4 + Animate HudSuitPower AuxPowerColor "0 0 0 0" Linear 0.0 0.4 +} + +event SuitAuxPowerNotMax +{ + // show suit power + Animate HudSuitPower BgColor "BgColor" Linear 0.0 0.4 + Animate HudSuitPower AuxPowerColor "255 220 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerDecreasedBelow25 +{ + // make color red + Animate HudSuitPower AuxPowerColor "255 0 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerIncreasedAbove25 +{ + // make colr bright + Animate HudSuitPower AuxPowerColor "255 220 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerNoItemsActive +{ + // resize the aux power to be the smallest size + Animate HudSuitPower Size "102 26" Linear 0.0 0.4 + Animate HudSuitPower Position "16 400" Linear 0.0 0.4 +// Animate HudSuitPower text_xpos "8" Linear 0.0 0.4 +// Animate HudSuitPower text_ypos "15" Linear 0.0 0.4 +} + +event SuitAuxPowerOneItemActive +{ + // resize the aux power to fit one item + Animate HudSuitPower Size "102 36" Linear 0.0 0.4 + Animate HudSuitPower Position "16 390" Linear 0.0 0.4 +} + +event SuitAuxPowerTwoItemsActive +{ + // resize the aux power to fit two items + Animate HudSuitPower Size "102 46" Linear 0.0 0.4 + Animate HudSuitPower Position "16 380" Linear 0.0 0.4 +} + +event SuitAuxPowerThreeItemsActive +{ + // resize the aux power to fit three items + Animate HudSuitPower Size "102 56" Linear 0.0 0.4 + Animate HudSuitPower Position "16 370" Linear 0.0 0.4 +} + +event SuitFlashlightOn +{ + Animate HudFlashlight TextColor "255 220 0 255" Linear 0.0 0.1 + Animate HudFlashlight TextColor "255 220 0 160" Deaccel 0.1 0.75 + Animate HudFlashlight BgColor "BgColor" Linear 0.0 0.75 +} + +event SuitFlashlightOff +{ + StopEvent SuitFlashlightOn 0.0 + Animate HudFlashlight TextColor "0 0 0 0" Linear 0.0 0.4 + Animate HudFlashlight BgColor "0 0 0 0" Linear 0.0 0.4 +} + +event HudTakeDamageAll +{ + RunEvent HudTakeDamageFront 0.0 + RunEvent HudTakeDamageLeft 0.0 + RunEvent HudTakeDamageRight 0.0 + RunEvent HudTakeDamageBehind 0.0 +} + +event HudTakeDamageFront +{ + Animate HudDamageIndicator DmgColorFront "255 88 0 150" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorFront "255 0 0 150" Linear 0.0 0.2 + Animate HudDamageIndicator DmgColorFront "255 0 0 0" Deaccel 0.2 0.3 +} + +event HudTakeDamageLeft +{ + Animate HudDamageIndicator DmgColorLeft "255 88 0 150" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorLeft "255 0 0 150" Linear 0.0 0.2 + Animate HudDamageIndicator DmgColorLeft "255 0 0 0" Deaccel 0.2 0.3 +} + +event HudTakeDamageRight +{ + Animate HudDamageIndicator DmgColorRight "255 88 0 150" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorRight "255 0 0 150" Linear 0.0 0.2 + Animate HudDamageIndicator DmgColorRight "255 0 0 0" Deaccel 0.2 0.3 +} + +event HudTakeDamageBehind +{ +// RunEvent HudTakeDamageLeft 0.0 +// RunEvent HudTakeDamageRight 0.0 + Animate HudDamageIndicator DmgColorBehind "255 88 0 150" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorBehind "255 0 0 150" Linear 0.0 0.2 + Animate HudDamageIndicator DmgColorBehind "255 0 0 0" Deaccel 0.2 0.3 +} + +event HudTakeDamageMidLeft +{ + Animate HudDamageIndicator DmgColorLeft "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorLeft "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorLeft "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageMidRight +{ + Animate HudDamageIndicator DmgColorRight "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorRight "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorRight "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageMidBehind +{ + Animate HudDamageIndicator DmgColorBehind "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorBehind "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorBehind "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageMidFront +{ + Animate HudDamageIndicator DmgColorFront "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorFront "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorFront "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageHighLeft +{ + Animate HudDamageIndicator DmgColorLeft "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorLeft "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgColorLeft "255 0 0 0" Deaccel 0.4 0.7 +} + +event HudTakeDamageHighRight +{ + Animate HudDamageIndicator DmgColorRight "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorRight "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgColorRight "255 0 0 0" Deaccel 0.4 0.7 +} + +event HudTakeDamageHighBehind +{ + Animate HudDamageIndicator DmgColorBehind "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorBehind "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgColorBehind "255 0 0 0" Deaccel 0.4 0.7 +} + +event HudTakeDamageHighFront +{ + Animate HudDamageIndicator DmgColorFront "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorFront "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgColorFront "255 0 0 0" Deaccel 0.4 0.7 +} + +event HudTakeDamageDrown +{ + RunEvent HudTakeDamageAll 0.0 +} + +event HudTakeDamagePoison +{ + Animate HudDamageIndicator DmgFullscreenColor "255 236 128 240" Linear 0.0 0.0 + Animate HudDamageIndicator DmgFullscreenColor "255 236 128 0" Deaccel 0.4 0.8 +} + +event HudTakeDamageBurn +{ + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 0" Deaccel 0.2 0.4 +} + +event HudTakeDamageRadiation +{ + Animate HudDamageIndicator DmgFullscreenColor "255 255 255 128" Deaccel 0.0 0.1 + Animate HudDamageIndicator DmgFullscreenColor "255 255 255 0" Deaccel 0.1 0.4 + RunEvent HudTakeDamageBehind 0.0 +} + +event HudPlayerDeath +{ + StopEvent HealthLoop 0.0 + StopEvent HealthPulse 0.0 + + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 96" Deaccel 0.1 0.2 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 255" Deaccel 0.3 4.0 +} + +event HealthIncreasedAbove20 +{ + StopEvent HealthLoop 0.0 + StopEvent HealthPulse 0.0 + StopEvent HealthLow 0.0 + + Animate HudHealth BgColor "BgColor" Linear 0.0 0.0 + + Animate HudHealth TextColor "FgColor" Linear 0.0 0.04 + Animate HudHealth FgColor "FgColor" Linear 0.0 0.03 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +event HealthIncreasedBelow20 +{ + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.25 + Animate HudHealth FgColor "FgColor" Linear 0.3 0.75 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +event SuitPowerIncreasedAbove20 +{ + StopEvent SuitLoop 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitPowerZero 0.0 + + Animate HudSuit Alpha "255" Linear 0.0 0.0 + + Animate HudSuit BgColor "BgColor" Linear 0.0 0.0 + + Animate HudSuit TextColor "FgColor" Linear 0.0 0.05 + Animate HudSuit FgColor "FgColor" Linear 0.0 0.05 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 +} + + +event SuitPowerIncreasedBelow20 +{ + StopEvent SuitPowerZero 0.0 + Animate HudSuit Alpha "255" Linear 0.0 0.0 + + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 +} + +event SuitPowerZero +{ + StopEvent SuitLoop 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitArmorLow 0.0 + StopEvent SuitDamageTaken 0.0 + + Animate HudSuit Alpha "0" Linear 0.0 0.4 +} + +event TestMovement +{ + Animate HudHealth Position "256 120" Linear 0.0 2.0 + Animate HudHealth Size "128 24" Linear 0.0 1.5 +} + +event HealthDamageTaken +{ + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.25 + Animate HudHealth FgColor "FgColor" Linear 0.3 0.75 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 + + Animate HudHealth TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHealth TextColor "FgColor" Deaccel 0.1 1.2 +} + +event SuitDamageTaken +{ + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 + + Animate HudSuit TextColor "BrightFg" Linear 0.0 0.1 + Animate HudSuit TextColor "FgColor" Deaccel 0.1 1.2 +} + +// health has been damaged to below 20% +event HealthLow +{ + StopEvent HealthDamageTaken 0.0 + StopEvent HealthPulse 0.0 + StopEvent HealthLoop 0.0 + + //Animate HudHealth BgColor "DamagedBg" Linear 0.0 0.1 + //Animate HudHealth BgColor "BgColor" Deaccel 0.1 1.75 + + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.2 + Animate HudHealth FgColor "DamagedFg" Linear 0.2 1.2 + + Animate HudHealth TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHealth TextColor "DamagedFg" Linear 0.1 1.2 + + Animate HudHealth Blur "5" Linear 0.0 0.1 + Animate HudHealth Blur "3" Deaccel 0.1 0.9 + + RunEvent HealthPulse 1.0 +} + +event HealthPulse +{ + Animate HudHealth Blur "5" Linear 0.0 0.1 + Animate HudHealth Blur "2" Deaccel 0.1 0.8 + Animate HudHealth TextColor "BrightDamagedFg" Linear 0.0 0.1 + Animate HudHealth TextColor "DamagedFg" Deaccel 0.1 0.8 + //Animate HudHealth BgColor "100 0 0 80" Linear 0.0 0.1 + //Animate HudHealth BgColor "BgColor" Deaccel 0.1 0.8 + + RunEvent HealthLoop 0.8 +} + +// call to loop HealthPulse +event HealthLoop +{ + RunEvent HealthPulse 0.0 +} + + +// suit armor has been damaged to below 20% +event SuitArmorLow +{ + StopEvent SuitDamageTaken 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitLoop 0.0 + +// removing this effect -- matching it to the event for normal suit damage +// so, there will be no special indication (redness, flashing) +// in the hud that the suit armor is low + +// Animate HudSuit BgColor "DamagedBg" Linear 0.0 0.1 +// Animate HudSuit BgColor "BgColor" Deaccel 0.1 1.75 + + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 + + Animate HudSuit TextColor "BrightFg" Linear 0.0 0.1 + Animate HudSuit TextColor "FgColor" Deaccel 0.1 1.2 + +// RunEvent SuitPulse 1.0 +} + +event SuitPulse +// this even no longer gets called +{ + Animate HudSuit Blur "5" Linear 0.0 0.1 + Animate HudSuit Blur "2" Deaccel 0.1 0.8 + Animate HudSuit TextColor "BrightDamagedFg" Linear 0.0 0.1 + Animate HudSuit TextColor "DamagedFg" Deaccel 0.1 0.8 + Animate HudSuit BgColor "100 0 0 80" Linear 0.0 0.1 + Animate HudSuit BgColor "BgColor" Deaccel 0.1 0.8 + RunEvent SuitLoop 0.8 +} + +event SuitLoop +{ +// this event no longer gets called + RunEvent SuitPulse 0.0 +} + +// ammo has been picked up +event AmmoIncreased +{ + Animate HudAmmo FgColor "0 0 255 255" Linear 0.0 0.3 + Animate HudAmmo FgColor "FgColor" Deaccel 0.3 1.5 + Animate HudAmmo Blur "5" Linear 0.0 0.0 + Animate HudAmmo Blur "0" Accel 0.01 1.5 +} + +// ammo has been decreased, but there is still some remaining +event AmmoDecreased +{ + StopEvent AmmoIncreased 0.0 + + Animate HudAmmo Blur "7" Linear 0.0 0.0 + Animate HudAmmo Blur "0" Deaccel 0.1 1.5 + + Animate HudAmmo TextColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmo TextColor "FgColor" Deaccel 0.1 0.75 +} + +// primary ammo is zero +event AmmoEmpty +{ + Animate Hudammo FgColor "HealthLowColor" Linear 0.0 0.0 +} + +// ammo2 is the total ammo for a weapon that uses clip ammo +event Ammo2Increased +{ + Animate Hudammo ammo2color "BrightFg" Linear 0.0 0.2 + Animate Hudammo ammo2color "FgColor" Accel 0.2 1.2 +} + +// total ammo has been decreased, but there is still some remaining +event Ammo2Decreased +{ + Animate Hudammo ammo2color "BrightFg" Linear 0.0 0.2 + Animate Hudammo ammo2color "FgColor" Accel 0.2 1.2 +} + +// total ammo is zero +event Ammo2Empty +{ + Animate Hudammo FgColor "HealthLowColor" Linear 0.0 0.0 +} + +event AmmoSecondaryIncreased +{ + Animate HudAmmoSecondary FgColor "BrightFg" Linear 0.0 0.15 + Animate HudAmmoSecondary FgColor "FgColor" Deaccel 0.15 1.5 + Animate HudAmmoSecondary Blur "5" Linear 0.0 0.0 + Animate HudAmmoSecondary Blur "0" Accel 0.01 1.5 +} + +event AmmoSecondaryDecreased +{ + StopEvent AmmoSecondaryIncreased 0.0 + + Animate HudAmmoSecondary Blur "7" Linear 0.0 0.0 + Animate HudAmmoSecondary Blur "0" Deaccel 0.1 1.5 + + Animate HudAmmoSecondary TextColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmoSecondary TextColor "FgColor" Deaccel 0.1 0.75 +} + +event AmmoSecondaryEmpty +{ + Animate HudAmmoSecondary FgColor "HealthLowColor" Linear 0.0 0.0 + +} + +// current weapon has been changed +event WeaponChanged +{ + //Animate HudAmmo BgColor "250 220 0 80" Linear 0.0 0.1 + //Animate HudAmmo BgColor "BgColor" Deaccel 0.1 1.0 + Animate HudAmmo FgColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmo FgColor "FgColor" Linear 0.2 1.5 +} + +// ran if we just changed to a weapon that needs clip ammo +event WeaponUsesClips +{ + Animate HudAmmo Position "r150 432" Deaccel 0.0 0.4 + Animate HudAmmo Size "132 36" Deaccel 0.0 0.4 +} + +// ran if we just changed to a weapon that does not use clip ammo +event WeaponDoesNotUseClips +{ + Animate HudAmmo Position "r118 432" Deaccel 0.0 0.4 + Animate HudAmmo Size "100 36" Deaccel 0.0 0.4 +} + +event WeaponUsesSecondaryAmmo +{ + StopAnimation HudAmmo Position 0.0 + StopAnimation HudAmmo Size 0.0 + StopPanelAnimations HudAmmoSecondary 0.0 + + //Animate HudAmmoSecondary BgColor "250 220 0 60" Linear 0.0 0.1 + //Animate HudAmmoSecondary BgColor "BgColor" Deaccel 0.1 1.0 + Animate HudAmmoSecondary FgColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmoSecondary FgColor "FgColor" Linear 0.2 1.5 + Animate HudAmmoSecondary Alpha 255 Linear 0.0 0.1 + + //Animate HudAmmo Position "r222 432" Deaccel 0.0 0.5 + //Animate HudAmmo Size "132 36" Deaccel 0.0 0.4 +} + +event WeaponDoesNotUseSecondaryAmmo +{ + StopPanelAnimations HudAmmoSecondary 0.0 + Animate HudAmmoSecondary FgColor "0 0 0 0" Linear 0.0 0.4 + //Animate HudAmmoSecondary BgColor "0 0 0 0" Linear 0.0 0.4 + Animate HudAmmoSecondary Alpha 0 Linear 0.0 0.1 +} + +event CraneMagnetFlash +{ + Animate HudCraneMagnet TextColor "255 220 0 255" Linear 0.0 0.1 + Animate HudCraneMagnet TextColor "255 220 0 160" Deaccel 0.1 0.3 + Animate HudCraneMagnet TextColor "255 170 0 220" Deaccel 0.4 0.3 + Animate HudCraneMagnet TextColor "255 220 0 255" Linear 0.8 0.2 +} + +event HintMessageShow +{ + // show the hints + Animate HudHintDisplay Alpha 255 Linear 0.0 0.5 + + // flash text + Animate HudHintDisplay FgColor "FgColor" Linear 0.0 0.01 + Animate HudHintDisplay FgColor "255 220 0 255" Linear 0.5 0.2 + Animate HudHintDisplay FgColor "FgColor" Linear 0.7 0.2 + Animate HudHintDisplay FgColor "255 220 0 255" Linear 1.5 0.2 + Animate HudHintDisplay FgColor "FgColor" Linear 1.7 0.2 + + // hide the panel after a while + Animate HudHintDisplay Alpha 0 Linear 12.0 1.0 +} + +event HintMessageHide +{ + Animate HudHintDisplay Alpha 0 Linear 0.0 0.5 +} + +event SquadMemberAdded +{ + StopEvent SquadMemberDied 0.0 + StopEvent SquadMemberLeft 0.0 + + // add in the squad member, brighter then normal color + Animate HudSquadStatus LastMemberColor "255 220 0 255" Linear 0.0 0.3 + Animate HudSquadStatus LastMemberColor "255 220 0 160" Linear 0.3 0.3 +} + +event SquadMemberLeft +{ + StopEvent SquadMemberDied 0.0 + StopEvent SquadMemberAdded 0.0 + + // fade out the icon + Animate HudSquadStatus LastMemberColor "255 220 0 0" Linear 0.0 0.5 +} + +event SquadMemberDied +{ + StopEvent SquadMemberAdded 0.0 + StopEvent SquadMemberLeft 0.0 + + // flash red, hold, then disappear + Animate HudSquadStatus LastMemberColor "255 0 0 255" Linear 0.0 0.5 + Animate HudSquadStatus LastMemberColor "255 0 0 0" Linear 2.0 2.0 +} + +event SquadMembersFollowing +{ + StopEvent SquadMembersStationed 0.0 + Animate HudSquadStatus SquadTextColor "255 220 0 255" Linear 0.0 0.2 + Animate HudSquadStatus SquadTextColor "255 220 0 160" Linear 0.2 0.4 +} + +event SquadMembersStationed +{ + StopEvent SquadMembersFollowing 0.0 + Animate HudSquadStatus SquadTextColor "255 220 0 160" Linear 0.5 0.5 +} + +event PoisonDamageTaken +{ + Animate HudPoisonDamageIndicator Alpha 255 Linear 0.0 1.0 + RunEvent PoisonLoop 0.0 +} + +event PoisonDamageCured +{ + StopEvent PoisonDamageTaken 0.0 + StopEvent PoisonLoop 0.0 + StopEvent PoisonPulse 0.0 + Animate HudPoisonDamageIndicator Alpha 0 Linear 0.0 1.0 +} + +event PoisonPulse +{ + Animate HudPoisonDamageIndicator TextColor "BrightFg" Linear 0.0 0.1 + Animate HudPoisonDamageIndicator TextColor "FgColor" Deaccel 0.1 0.8 + Animate HudPoisonDamageIndicator BgColor "100 0 0 80" Linear 0.0 0.1 + Animate HudPoisonDamageIndicator BgColor "BgColor" Deaccel 0.1 0.8 + + RunEvent PoisonLoop 0.8 +} + +// call to loop PoisonLoop +event PoisonLoop +{ + RunEvent PoisonPulse 0.0 +} + +// Grenade has been picked up +event GrenadeIncreased +{ + Animate HudGrenade FgColor "BrightFg" Linear 0.0 0.15 + Animate HudGrenade FgColor "FgColor" Deaccel 0.15 1.5 + Animate HudGrenade Blur "5" Linear 0.0 0.0 + Animate HudGrenade Blur "0" Accel 0.01 1.5 +} + +// Grenade has been decreased, but there is still some remaining +event GrenadeDecreased +{ + StopEvent GrenadeIncreased 0.0 + + Animate HudGrenade Blur "7" Linear 0.0 0.0 + Animate HudGrenade Blur "0" Deaccel 0.1 1.5 + + Animate HudGrenade TextColor "BrightFg" Linear 0.0 0.1 + Animate HudGrenade TextColor "FgColor" Deaccel 0.1 0.75 +} + +// primary Grenade is zero +event GrenadeEmpty +{ + Animate HudGrenade FgColor "HealthLowColor" Linear 0.0 0.0 +} + +// Grenade2 is the total Grenade for a weapon that uses clip Grenade +event Grenade2Increased +{ + Animate HudGrenade Grenade2color "BrightFg" Linear 0.0 0.2 + Animate HudGrenade Grenade2color "FgColor" Accel 0.2 1.2 +} + +// total Grenade has been decreased, but there is still some remaining +event Grenade2Decreased +{ + Animate HudGrenade Grenade2color "BrightFg" Linear 0.0 0.2 + Animate HudGrenade Grenade2color "FgColor" Accel 0.2 1.2 +} + +// total Grenade is zero +event Grenade2Empty +{ + Animate HudGrenade Grenade2color "HealthLowColor" Linear 0.0 0.2 +} + +event GrenadeSecondaryIncreased +{ + Animate HudGrenadeSecondary FgColor "BrightFg" Linear 0.0 0.15 + Animate HudGrenadeSecondary FgColor "FgColor" Deaccel 0.15 1.5 + Animate HudGrenadeSecondary Blur "5" Linear 0.0 0.0 + Animate HudGrenadeSecondary Blur "0" Accel 0.01 1.5 +} + +event GrenadeSecondaryDecreased +{ + StopEvent GrenadeSecondaryIncreased 0.0 + + Animate HudGrenadeSecondary Blur "7" Linear 0.0 0.0 + Animate HudGrenadeSecondary Blur "0" Deaccel 0.1 1.5 + + Animate HudGrenadeSecondary TextColor "BrightFg" Linear 0.0 0.1 + Animate HudGrenadeSecondary TextColor "FgColor" Deaccel 0.1 0.75 +} + +event GrenadeSecondaryEmpty +{ + Animate HudGrenadeSecondary FgColor "BrightDamagedFg" Linear 0.0 0.2 + Animate HudGrenadeSecondary FgColor "DamagedFg" Accel 0.2 1.2 + Animate HudGrenadeSecondary Blur "7" Linear 0.0 0.0 + Animate HudGrenadeSecondary Blur "0" Deaccel 0.1 1.5 + +} + +// current Grenades has been changed +event ClassHasGrenades +{ + Animate HudGrenade BgColor "250 220 0 80" Linear 0.0 0.1 + Animate HudGrenade BgColor "BgColor" Deaccel 0.1 1.0 + Animate HudGrenade FgColor "BrightFg" Linear 0.0 0.1 + Animate HudGrenade FgColor "FgColor" Linear 0.2 1.5 +} + +// ran if we just changed to a Grenades that needs clip Grenade +event ClassHasTwoGrenades +{ + Animate HudGrenade Position "r150 382" Deaccel 0.0 0.4 + Animate HudGrenade Size "132 36" Deaccel 0.0 0.4 +} + +// ran if we just changed to a Grenades that does not use clip Grenade +event ClassHasOneGrenade +{ + Animate HudGrenade Position "r118 382" Deaccel 0.0 0.4 + Animate HudGrenade Size "100 36" Deaccel 0.0 0.4 +} + +event FadeInBuildTimer +{ + Animate HudBuildTimer Alpha 255 Linear 0.0 0.2 +} + +event FadeOutBuildTimer +{ + Animate HudBuildTimer Alpha 0 Linear 0.0 0.2 +} + +event FadeInGrenade1Timer +{ + Animate HudGrenade1Timer Alpha 255 Linear 0.0 0.2 +} + +event FadeOutGrenade1Timer +{ + Animate HudGrenade1Timer Alpha 0 Linear 0.0 0.2 +} + +event FadeInGrenade2Timer +{ + Animate HudGrenade2Timer Alpha 255 Linear 0.0 0.2 +} + +event FadeOutGrenade2Timer +{ + Animate HudGrenade2Timer Alpha 0 Linear 0.0 0.2 +} diff --git a/scripts/HudLayout.res b/scripts/HudLayout.res new file mode 100644 index 0000000..6a30f45 --- /dev/null +++ b/scripts/HudLayout.res @@ -0,0 +1,1416 @@ +/////////////////////////////////////////////////////////// +// Fortress Forever HUD Layout resource file +// +// This file is cross-referenced and shares resources with; +// +// resource/clientscheme.res - HUD Colours & Font definitions +// scripts/ff_hud_textures.txt - Glyph definitions for the HUD font +// scripts/HudAnimations.txt - Animations for stuff like low ammo, etc. +// +/////////////////////////////////////////////////////////// + +"scripts/HudLayout.res" +{ + HudLocation // hudlocation + { + "fieldName" "HudLocation" + + "visible" "1" + "enabled" "1" + + "xpos" "3" + "ypos" "447" + "wide" "640" //256 + "tall" "480" //32 + + "text1_xpos" "4" + "text1_ypos" "20" //19 + + "TextFont" "HUD_TextSmall_Shadow" + "TextColor" "HUD_Tone_Default" // Ignored: locations are colour coded + + "ForegroundTexture" "locationBoxFG1" + "BackgroundTexture" "locationBoxBG1" + } + HudLocation2 + { + "fieldName" "HudLocation2" + + "visible" "1" + "enabled" "1" + "pinCorner" "3" + + "xpos" "85" //85 x pos controlled by HudLocation + "ypos" "447" + "wide" "640" //256 + "tall" "480" //32 + + "ForegroundTexture" "locationBoxFG2" + "BackgroundTexture" "locationBoxBG2" + } + + HudHealth + { + "fieldName" "HudHealth" + + "visible" "1" + "enabled" "1" + + "xpos" "3" + "ypos" "431" + "wide" "128" + "tall" "32" + + "digit_xpos" "44" + "digit_ypos" "8" + + "NumberFont" "HUD_NumLarge" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "healthBoxFG" + "BackgroundTexture" "healthBoxBG" + } + + HudPlayerAddHealth + { + "fieldName" "HudPlayerAddHealth" + + "visible" "1" + "enabled" "1" + + "xpos" "3" + "ypos" "406" + "wide" "128" + "tall" "32" + + "HealthFont_xpos" "32" + "HealthFont_ypos" "8" + + "HealthFont" "HudAddHealth" + "TextColor" "255 255 255 255" //black + "HealthFontBG" "HudPlayerScoreBG" + + "ForegroundTexture" "playerScoreBoxFG1" + "BackgroundTexture" "playerScoreBoxBG1" + } + + HudArmor + { + "fieldName" "HudArmor" + + "visible" "1" + "enabled" "1" + + "xpos" "87" + "ypos" "431" + "wide" "128" + "tall" "32" + + "digit_xpos" "38" + "digit_ypos" "18" + + "NumberFont" "HUD_NumSmall" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "armourBoxFG" + "BackgroundTexture" "armourBoxBG" + } + + HudPlayerAddArmor + { + "fieldName" "HudPlayerAddArmor" + + "visible" "1" + "enabled" "1" + + "xpos" "87" + "ypos" "406" + "wide" "128" + "tall" "32" + + "ArmorFont_xpos" "32" + "ArmorFont_ypos" "18" + + "ArmorFont" "HudAddHealth" + "TextColor" "255 255 255 255" //black + "ArmorFontBG" "HudPlayerScoreBG" + + "ForegroundTexture" "playerScoreBoxFG1" + "BackgroundTexture" "playerScoreBoxBG1" + } + + // Added by AfterShock - for displaying weapon icon in bottom right + HudWeaponInfo + { + "fieldName" "HudWeaponInfo" + + "visible" "1" + "enabled" "1" + + // xpos and ypos define where the top left corner of the panel will be + "xpos" "r124" //x pos controlled by HudAmmoInfo2 + "ypos" "447" + "zpos" "2" + + "wide" "640" // This stuff is proportional, so 640x480 is actually the size of the whole screen at any resolution. Unless, that is, you have a non-4:3 monitor. Vgui is a pain in the ass to get right then. + "tall" "480" + + "ammo_xpos" "5" // Note that these positions are relative to the position of the panel + "ammo_ypos" "18" // i.e. 0,0 is the top left corner of the panel + + "TextFont" "HudNumbers" + "TextColor" "HUD_Tone_Default" + + "IconFont" "WeaponIconsHUD" // Defines which Font to look in for the icons + "AmmoFont" "AmmoIconsSmall" // Defines which Font to look in for the icons + } + + HudAmmoInfo // should be weapon item glyphs in lower right + { + "fieldName" "HudAmmoInfo" + + "visible" "1" + "enabled" "1" + + "xpos" "r124" //x pos controlled by HudAmmoInfo2 + "ypos" "447" + "wide" "640" //128 + "tall" "480" //64 + + "text1_xpos" "0" + "text1_ypos" "0" + + "TextFont" "HudNumbers" + "TextColor" "HUD_Tone_Default" + "IconFont" "weaponglyphssmall" + + "ForegroundTexture" "weaponBoxFG1" + "BackgroundTexture" "weaponBoxBG1" + } + HudAmmoInfo2 + { + "fieldName" "HudAmmoInfo2" + + "visible" "1" + "enabled" "1" + + "xpos" "r42" + "ypos" "447" + "wide" "640" //128 + "tall" "480" //64 + + "ForegroundTexture" "weaponBoxFG2" + "BackgroundTexture" "weaponBoxBG2" + } + + HudAmmo + { + "fieldName" "HudAmmo" + + "visible" "1" + "enabled" "1" + + "xpos" "r152" //488 + "ypos" "447" + "wide" "640" //128 + "tall" "480" //32 + "digit_xpos" "4" + "digit_ypos" "19" + + "NumberFont" "HUD_NumSmall" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "ammoCarriedBoxFG" + "BackgroundTexture" "ammoCarriedBoxBG" + } + + HudAmmoClip + { + "fieldName" "HudAmmoClip" + + "visible" "1" + "enabled" "1" + + "xpos" "r149" //491 + "ypos" "430" + "wide" "640" //128 + "tall" "480" //32 + + "digit_xpos" "16" + "digit_ypos" "8" + + "NumberFont" "HUD_NumLarge" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "ammoLoadedBoxFG" + "BackgroundTexture" "ammoLoadedBoxBG" + } + + HudGrenade1 + { + "fieldName" "HudGrenade1" + + "visible" "1" + "enabled" "1" + + "xpos" "r91" //549 + "ypos" "414" + "wide" "640" //128 + "tall" "480" //32 + + "digit_xpos" "33" + "digit_ypos" "18" + + "icon_xpos" "10" + "icon_ypos" "25" + "icon_font" "StatusGlyphsSmall" + "icon_color" "HUD_Tone_Default" + + "NumberFont" "HUD_NumSmall" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "grenPrimaryBoxFG" + "BackgroundTexture" "grenPrimaryBoxBG" + } + + HudGrenade2 // far right glyph + { + "fieldName" "HudGrenade2" + + "visible" "1" + "enabled" "1" + + "xpos" "r47" //593 + "ypos" "414" + "wide" "640" //128 + "tall" "480" //32 + + "digit_xpos" "35" + "digit_ypos" "18" + + "icon_xpos" "10" + "icon_ypos" "25" + "icon_font" "StatusGlyphsSmall" + "icon_color" "HUD_Tone_Default" + + "NumberFont" "HUD_NumSmall" + "NumberColor" "HUD_Tone_Default" + + "ForegroundTexture" "grenSecondaryBoxFG" + "BackgroundTexture" "grenSecondaryBoxBG" + } + + HudRoundInfo // top center item glyph, fucked by non 4:3 aspect ratio, new settings seem to stay in center, but text needs fixin + { + "fieldName" "HudRoundInfo" + + "visible" "1" + "enabled" "1" + + "xpos" "c-60" //256 + "ypos" "1" + "wide" "120" //128 , 120 + "tall" "128" //128 + + + "MapNameFont" "HUD_TextRoundInfo" + "MapNameColor" "HUD_Tone_Default" + "MapNameX" "32" //32 + "MapNameY" "3" + //"center_x" "1" // center text horizontally + //"RightJustify" "1" + + "TimerFont" "HUD_TextRoundInfo" + "TimerColor" "HUD_Tone_Default" + "TimerX" "43" //45 + "TimerY" "18" + + "ForegroundTexture" "RoundInfoBoxFG" + "BackgroundTexture" "RoundInfoBoxBG" + } + + HudTeamScores + { + "fieldName" "HudTeamScores" + + "visible" "1" + "enabled" "1" + + // xpos and ypos define where the top left corner of the panel will be + "xpos" "c-120" // Right in the middle of the damn screen + //"xpos" "130" // Right in the middle of the damn screen + "ypos" "7" + "wide" "640" // This stuff is proportional, so 640x480 is actually the size of the whole screen at any resolution. Unless, that is, you have a non-4:3 monitor. Vgui is a pain in the ass to get right then. + "tall" "480" + + "TeamScoreBlue_xpos" "0" // Note that these positions are relative to the position of the panel + "TeamScoreBlue_ypos" "0" // i.e. 0,0 is the top left corner of the panel + "TeamScoreRed_xpos" "200" // Note that these positions are relative to the position of the panel + "TeamScoreRed_ypos" "0" // i.e. 0,0 is the top left corner of the panel + "TeamScoreYellow_xpos" "5" // Note that these positions are relative to the position of the panel + "TeamScoreYellow_ypos" "22" // i.e. 0,0 is the top left corner of the panel + "TeamScoreGreen_xpos" "195" // Note that these positions are relative to the position of the panel + "TeamScoreGreen_ypos" "22" // i.e. 0,0 is the top left corner of the panel + + "TeamScoreBlueFont" "HudTeamScore" + "TeamScoreRedFont" "HudTeamScore" + "TeamScoreYellowFont" "HudTeamScore" + "TeamScoreGreenFont" "HudTeamScore" + + "TextColor" "Black" + + "ForegroundTexture" "TeamScoreBoxFG1" + "BackgroundTexture" "TeamScoreBoxBG1" + } + + HudPlayerTotalScore + { + "fieldName" "HudPlayerTotalScore" + + "visible" "1" + "enabled" "1" + + // xpos and ypos define where the top left corner of the panel will be + "xpos" "0" // Right in the middle of the damn screen 20 + "ypos" "0" //20 + "wide" "640" // This stuff is proportional, so 640x480 is actually the size of the whole screen at any resolution. Unless, that is, you have a non-4:3 monitor. Vgui is a pain in the ass to get right then. + "tall" "480" + + "TotalDescFont_xpos" "5" // Note that these positions are relative to the position of the panel + "TotalDescFont_ypos" "3" // i.e. 0,0 is the top left corner of the panel + "TotalScoreFont_xpos" "5" // Note that these positions are relative to the position of the panel + "TotalScoreFont_ypos" "15" // i.e. 0,0 is the top left corner of the panel + + "TotalScoreFont" "HudPlayerScore" + "TotalDescFont" "HudPlayerScoreDesc" + + "TotalScoreFontBG" "HudPlayerScoreBG" + "TotalDescFontBG" "HudPlayerScoreDescBG" + + "TextColor" "Black" + + "ForegroundTexture" "playerScoreBoxFG1" + "BackgroundTexture" "playerScoreBoxBG1" + } + HudPlayerLatestScore + { + "fieldName" "HudPlayerLatestScore" + + "visible" "1" + "enabled" "1" + + // xpos and ypos define where the top left corner of the panel will be + "xpos" "0" // Right in the middle of the damn screen + "ypos" "0" // + "wide" "640" // This stuff is proportional, so 640x480 is actually the size of the whole screen at any resolution. Unless, that is, you have a non-4:3 monitor. Vgui is a pain in the ass to get right then. + "tall" "480" + + "DescFont_xpos" "13" // Note that these positions are relative to the position of the panel + "DescFont_ypos" "33" // i.e. 0,0 is the top left corner of the panel + "ScoreFont_xpos" "8" // Note that these positions are relative to the position of the panel + "ScoreFont_ypos" "43" // i.e. 0,0 is the top left corner of the panel + + "ScoreFont" "HudBonusScore" + "DescFont" "HudBonusScoreDesc" + + "ScoreFontBG" "HudPlayerScoreBG" + "DescFontBG" "HudPlayerScoreDescBG" + + "TextColor" "255 255 255 255" //black + + "ForegroundTexture" "playerScoreBoxFG1" + "BackgroundTexture" "playerScoreBoxBG1" + } + + HudOverpressure + { + "fieldName" "HudOverpressure" + + "visible" "1" + "enabled" "1" + + "xpos" "3" + "ypos" "404" + "wide" "128" + "tall" "128" + + "text1_xpos" "34" + "text1_ypos" "12" + + "image1_xpos" "3" + "image1_ypos" "4" + + "bar_width" "75" + "bar_height" "24" + + "TextFont" "HUD_TextSmall" + "TextColor" "HUD_Tone_Default" //overridden by teamcolor of disguise + + "ForegroundTexture" "CooldownBoxFG" + "BackgroundTexture" "CooldownBoxBG" + } + + HudCellCount + { + "fieldName" "HudCellCount" + + "visible" "1" + "enabled" "1" + + "xpos" "r198" + "ypos" "447" + "xpos" "3" + "ypos" "404" + "wide" "128" + "tall" "128" + + "text_xpos" "19" + "text_ypos" "19" + + "image_xpos" "3" + "image_ypos" "18" + + "IconFont" "AmmoIconsSmall" + + "TextFont" "HUD_TextRoundInfo" + "TextColor" "HUD_Tone_Default" + + "ForegroundTexture" "CellCountBoxFG" + "BackgroundTexture" "CellCountBoxBG" + } + + HudSpyDisguise + { + "fieldName" "HudSpyDisguise" + + "visible" "1" + "enabled" "1" + + "xpos" "3" + "ypos" "404" + "wide" "128" + "tall" "128" + + "text1_xpos" "34" + "text1_ypos" "12" + + "image1_xpos" "3" + "image1_ypos" "4" + + "bar_width" "75" + "bar_height" "24" + + "DisguiseFont" "ClassGlyphs" + + "TextFont" "HUD_TextSmall" + "TextColor" "HUD_Tone_Default" //overridden by teamcolor of disguise + + "ForegroundTexture" "CooldownBoxFG" + "BackgroundTexture" "CooldownBoxBG" + } + + HudSpyDisguise2 + { + "fieldName" "HudSpyDisguise2" + + "visible" "1" + "enabled" "1" + + "xpos" "82" + "ypos" "404" + "wide" "128" + "tall" "128" + + "image1_xpos" "2" + "image1_ypos" "4" + + "WeaponFont" "WeaponIconsHUD" + "WeaponColor" "HUD_Tone_Default" + + "ForegroundTexture" "SpyDisguiseBoxFG2" + "BackgroundTexture" "SpyDisguiseBoxBG2" + } + + HudSpyDisguise3 + { + "fieldName" "HudSpyDisguise3" + + "visible" "1" + "enabled" "1" + + "xpos" "82" + "ypos" "431" + "wide" "128" + "tall" "128" + + "ForegroundTexture" "SpyDisguiseBoxFG3" + "BackgroundTexture" "SpyDisguiseBoxBG3" + } + + HudHintCenter + { + "fieldName" "HudHintCenter" + + "visible" "1" + "enabled" "1" + + "xpos" "c-130" + "ypos" "404" + + "wide" "260" + "tall" "70" + + "text1_xpos" "34" + "text1_ypos" "10" + + "text1_wide" "220" + "text1_tall" "40" + + "image1_xpos" "4" + "image1_ypos" "8" + + "IconFont" "HudHintCenterIcon" + "IconFontGlow" "HudHintCenterIconGlow" + + "TextFont" "HUD_TextSmall" + "TextColor" "HUD_Tone_Default" + "BGBoxColor" "Dark" + + + // The buttons + "B_wide" "20" + "B_tall" "10" + + "NextB_xpos" "235" + "NextB_ypos" "55" + + "PrevB_xpos" "5" + "PrevB_ypos" "55" + + // The hint index thingy + "index_xpos" "9" + "index_ypos" "45" + + + "SmallBoxSize" "36" //32 + "LargeBoxWide" "112" + "LargeBoxTall" "80" + "BoxGap" "8" + "SelectionNumberXPos" "4" + "SelectionNumberYPos" "4" + "SelectionGrowTime" "0.4" + "TextYPos" "64" + } + + + HudGrenade1Timer + { + "fieldName" "HudGrenade1Timer" + + "visible" "1" + "enabled" "1" + + "xpos" "c-123" + "ypos" "414" + "wide" "256" + "tall" "32" + + "bar_xpos" "69" + "bar_ypos" "4" + "bar_width" "118" + "bar_height" "13" + "bar_color" "HUD_Tone_Default" + + "icon_xpos" "10" + "icon_ypos" "25" + + //"icon_color" "0 0 0 255" + + "ForegroundTexture" "Gren1TimerFGBox" + "BackgroundTexture" "Gren1TimerBGBox" + } + + HudGrenade2Timer + { + "fieldName" "HudGrenade2Timer" + + "visible" "1" + "enabled" "1" + + "xpos" "c-123" + "ypos" "434" + "wide" "256" + "tall" "32" + + "bar_xpos" "69" + "bar_ypos" "16" + "bar_width" "118" + "bar_height" "13" + "bar_color" "HUD_Tone_Default" + + "icon_xpos" "8" + "icon_ypos" "24" + + //"icon_color" "0 0 0 255" + + "ForegroundTexture" "Gren2TimerFGBox" + "BackgroundTexture" "Gren2TimerBGBox" + } + + // + // you are entering untamed land! + // + + HudBuildTimer + { + "fieldName" "HudBuildTimer" + "xpos" "c-123" + "ypos" "r132" + "wide" "256" + "tall" "32" + "visible" "1" + "enabled" "1" + + "text_xpos" "256" + "text_ypos" "0" + + "icon_xpos" "40" + "icon_ypos" "8" + "icon_width" "16" + "icon_height" "16" + + "bar_xpos" "64" + "bar_ypos" "8" + "bar_width" "128" + "bar_height" "16" + "bar_color" "HUD_Tone_Default" + } + + //HudGrenade1Timer + //{ + // "fieldName" "HudGrenade1Timer" + // "xpos" "140" + // "ypos" "r56" + // "wide" "192" + // "tall" "20" + // "visible" "1" + // "enabled" "1" +// +// "text_xpos" "0" +// "text_ypos" "0" +// +// "icon_xpos" "4" +// "icon_ypos" "4" +// "icon_width" "20" +// "icon_height" "20" +// +// "bar_xpos" "16" +// "bar_ypos" "4" +// "bar_width" "128" +// "bar_height" "12" +// "bar_color" "HUD_Tone_Default" +// } +// +// HudGrenade2Timer +// { +// "fieldName" "HudGrenade2Timer" +// "xpos" "140" +// "ypos" "r32" +// "wide" "192" +// "tall" "20" +// "visible" "1" +// "enabled" "1" +// +// "text_xpos" "0" +// "text_ypos" "0" +// +// "icon_xpos" "4" +// "icon_ypos" "4" +// "icon_width" "20" +// "icon_height" "20" +// +// "bar_xpos" "16" +// "bar_ypos" "4" +// "bar_width" "128" +// "bar_height" "12" +// "bar_color" "HUD_Tone_Default" +// } + + HudBuildState + { + "fieldName" "HudBuildState" + "xpos" "r210" + "ypos" "380" + "wide" "210" + "tall" "40" + "visible" "1" + "enabled" "1" + + "text1_xpos" "24" + "text1_ypos" "3" + "text2_xpos" "24" + "text2_ypos" "22" + + "icon1_xpos" "0" + "icon1_ypos" "0" + "icon1_width" "20" + "icon1_height" "20" + + "icon2_xpos" "0" + "icon2_ypos" "20" + "icon2_width" "20" + "icon2_height" "20" + } + + + HudBuildStateSentry + { + "fieldName" "HudBuildStateSentry" + "PaintBackgroundType" "2" + } + + HudAmmoSecondary + { + "fieldName" "HudAmmoSecondary" + "xpos" "r76" + "ypos" "432" + "wide" "60" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "digit_xpos" "10" + "digit_ypos" "2" + + "TextColor" "HUD_Tone_Default" + } + + HudSuitPower + { + "fieldName" "HudSuitPower" + "visible" "1" + "enabled" "1" + "xpos" "16" + "ypos" "396" + "wide" "102" + "tall" "26" + + "AuxPowerLowColor" "255 0 0 220" + "AuxPowerHighColor" "255 220 0 220" + "AuxPowerDisabledAlpha" "70" + + "BarInsetX" "8" + "BarInsetY" "15" + "BarWidth" "92" + "BarHeight" "4" + "BarChunkWidth" "6" + "BarChunkGap" "3" + + "text_xpos" "8" + "text_ypos" "4" + "text2_xpos" "8" + "text2_ypos" "22" + "text2_gap" "10" + + "PaintBackgroundType" "2" + } + + HudFlashlight + { + "fieldName" "HudFlashlight" + "visible" "0" + "enabled" "1" + "xpos" "16" + "ypos" "370" + "wide" "102" + "tall" "20" + + "text_xpos" "8" + "text_ypos" "6" + "TextColor" "255 170 0 220" + + "PaintBackgroundType" "2" + } + + HudDamageIndicator + { + "fieldName" "HudDamageIndicator" + "visible" "1" + "enabled" "1" + "DmgColorLeft" "255 0 0 0" + "DmgColorRight" "255 0 0 0" + + "dmg_xmargin" "40" + "dmg_ymargin" "40" + + "dmg_depth" "40" + "dmg_outerlength" "300" + "dmg_innerlength" "240" + } + + HudHitIndicator + { + "fieldName" "HudHitIndicator" + "visible" "1" + "enabled" "1" + "zpos" "2" // draw above crosshair + } + + HudZoom + { + "fieldName" "HudZoom" + "visible" "1" + "enabled" "1" + "Circle1Radius" "66" + "Circle2Radius" "74" + "DashGap" "16" + "DashHeight" "4" + "BorderThickness" "88" + } + + HudWeaponSelection + { + "fieldName" "HudWeaponSelection" + "ypos" "16" + "visible" "1" + "enabled" "1" + "SmallBoxSize" "36" //32 + "LargeBoxWide" "112" + "LargeBoxTall" "80" + "BoxGap" "8" + "SelectionNumberXPos" "4" + "SelectionNumberYPos" "4" + "SelectionGrowTime" "0.4" + "TextYPos" "64" + } + + HudCrosshair + { + "fieldName" "HudCrosshair" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudDeathNotice + { + "fieldName" "HudDeathNotice" + "visible" "1" + "enabled" "1" + "xpos" "r640" + "ypos" "0" + "wide" "640" + "tall" "480" + + "HighlightColor" "255 255 255 100" + "ObjectiveNoticeColor" "0 0 0 180" + + "LineHeight" "22" + "RightJustify" "1" + + "TextFont" "Default" + } + + HudVehicle + { + "fieldName" "HudVehicle" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + ScorePanel + { + "fieldName" "ScorePanel" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudTrain + { + "fieldName" "HudTrain" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudMOTD + { + "fieldName" "HudMOTD" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudMessage + { + "fieldName" "HudMessage" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudMenu + { + "fieldName" "HudMenu" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + "zpos" "1" + "TextFont""Default" + "ItemFont""Default" + "ItemFontPulsing""Default" + } + + HudCloseCaption + { + "fieldName" "HudCloseCaption" + "visible" "1" + "enabled" "1" + "xpos" "c-250" + "ypos" "276" + "wide" "500" + "tall" "136" + + "BgAlpha" "128" + + "GrowTime" "0.25" + "ItemHiddenTime" "0.2" // Nearly same as grow time so that the item doesn't start to show until growth is finished + "ItemFadeInTime" "0.15" // Once ItemHiddenTime is finished, takes this much longer to fade in + "ItemFadeOutTime" "0.3" + + } + + HudChat + { + "fieldName" "HudChat" + "visible" "1" + "enabled" "1" + "xpos" "0" + "ypos" "200" + "wide" "520" + "tall" "200" + } + + HudHistoryResource + { + "fieldName" "HudHistoryResource" + "visible" "1" + "enabled" "1" + "xpos" "r252" + "ypos" "40" + "wide" "248" + "tall" "320" + + "history_gap" "24" + "icon_inset" "28" + "text_inset" "26" + "NumberFont" "HudNumbersSmall" + } + + HudGeiger + { + "fieldName" "HudGeiger" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HUDQuickInfo + { + "fieldName" "HUDQuickInfo" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudWeapon + { + "fieldName" "HudWeapon" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + "Iconfont" "WeaponIconsSmall" + } + HudAnimationInfo + { + "fieldName" "HudAnimationInfo" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudPredictionDump + { + "fieldName" "HudPredictionDump" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudHintDisplay + { + "fieldName" "HudHintDisplay" + "visible" "0" + "enabled" "1" + "xpos" "r120" + "ypos" "r340" + "wide" "100" + "tall" "200" + "text_xpos" "8" + "text_ypos" "8" + "text_xgap" "8" + "text_ygap" "8" + "TextColor" "255 170 0 220" + + "PaintBackgroundType" "2" + } + + HudSquadStatus + { + "fieldName" "HudSquadStatus" + "visible" "1" + "enabled" "1" + "xpos" "r120" + "ypos" "380" + "wide" "104" + "tall" "46" + "text_xpos" "8" + "text_ypos" "34" + "SquadIconColor" "255 220 0 160" + "IconInsetX" "8" + "IconInsetY" "0" + "IconGap" "24" + + "PaintBackgroundType" "2" + } + + HudPoisonDamageIndicator + { + "fieldName" "HudPoisonDamageIndicator" + "visible" "0" + "enabled" "1" + "xpos" "16" + "ypos" "346" + "wide" "136" + "tall" "38" + "text_xpos" "8" + "text_ypos" "8" + "text_ygap" "14" + "TextColor" "255 170 0 220" + "PaintBackgroundType" "2" + } + HudCredits + { + "fieldName" "HudCredits" + "TextFont" "Default" + "visible" "1" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "TextColor" "255 255 255 192" + } + HudSpeedometer + { + "fieldName" "HudSpeedometer" + "xpos" "r65" + "ypos" "r95" + "wide" "65" + "tall" "50" + "PaintBackgroundType" "2" + "AvgSpeedFont_xpos" "0" + "AvgSpeedFont_ypos" "0" + "SpeedFont_xpos" "0" + "SpeedFont_ypos" "15" + "TextColor" "HUD_Tone_Default" + } + HudRadialMenu + { + "fieldName" "HudRadialMenu" + "visible" "1" + "enabled" "1" + } + HudCrosshairInfo + { + "fieldName" "HudCrosshairInfo" + "visible" "1" + "enabled" "1" + + // Position when hud_centerid = 0 + "text1_xpos" "20" + "text1_ypos" "280" + } + HudSentryGunStatus + { + "fieldName" "HudSentryGunStatus" + "visible" "0" + "enabled" "0" + "xpos" "16" + "ypos" "400" + "wide" "0" + "tall" "0" + "PaintBackgroundType" "2" + } + HudBuildableMessages + { + "fieldName" "HudBuildableMessages" + "visible" "0" + "enabled" "0" + "xpos" "0" + // Don't mess with the Y value + // Everything else gets overridden except the Y value... + "ypos" "300" + "wide" "0" + "tall" "0" + + "PaintBackgroundType" "2" + } + HudLua + { + "fieldName" "HudLua" + "visible" "1" + "enabled" "0" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + + "PaintBackgroundType" "2" + + "TextColor" "255 170 0 220" + } + HudHint + { + "fieldName" "HudHint" + "visible" "1" + "enabled" "0" + "xpos" "430" + "ypos" "200" + "wide" "200" + "tall" "100" + + "PaintBackgroundType" "2" + + "TextColor" "255 170 0 220" + } + + HudStatusIcons + { + "fieldName" "HudStatusIcons" + "visible" "1" + "enabled" "1" + "xpos" "16" + "ypos" "300" + "wide" "60" + "tall" "200" + + "TextColor" "255 170 0 220" + } + HudRadar + { + "fieldName" "HudRadar" + "visible" "0" + "enabled" "1" + } + HudRadioTag + { + "fieldName" "HudRadioTag" + "visible" "0" + "enabled" "1" + } + HudObjectiveIcon + { + "fieldName" "HudObjectiveIcon" + "visible" "0" + "enabled" "1" + } + HudGameMessage + { + "fieldName" "HudGameMessage" + "visible" "0" + "enabled" "0" + "xpos" "c-200" + "ypos" "120" + "wide" "400" + "tall" "300" + "PaintBackgroundType" "1" + } + + HudSuit + { + "fieldName" "HudSuit" + "xpos" "140" + "ypos" "432" + "wide" "108" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + + "text_xpos" "8" + "text_ypos" "20" + "digit_xpos" "50" + "digit_ypos" "2" + } + + HudVoiceSelfStatus + { + "fieldName" "HudVoiceSelfStatus" + "visible" "1" + "enabled" "1" + "xpos" "r43" + "ypos" "355" + "wide" "24" + "tall" "24" + } + + HudVoiceStatus + { + "fieldName" "HudVoiceStatus" + "visible" "1" + "enabled" "1" + "xpos" "r200" + "ypos" "0" + "wide" "100" + "tall" "400" + + "item_tall" "24" + "item_wide" "100" + + "item_spacing" "2" + + "icon_ypos" "0" + "icon_xpos" "0" + "icon_tall" "24" + "icon_wide" "24" + + "text_xpos" "26" + } + HudRadio + { + "fieldName""HudRadio" + "TextFont""Default" + "visible""1" + "xpos""10" + "ypos""c" + "wide""Default" + "tall""Default" + "text_ygap""2" + "TextColor""255 255 255 192" + "PaintBackgroundType""0" + } + + HudHintKeyDisplay + { + "fieldName" "HudHintKeyDisplay" + "visible" "0" + "enabled" "1" + "xpos" "r120" [$WIN32] + "ypos" "r340" [$WIN32] + "xpos" "r148" [$X360] + "ypos" "r338" [$X360] + "wide" "100" + "tall" "200" + "text_xpos" "8" + "text_ypos" "8" + "text_xgap" "8" + "text_ygap" "8" + "TextColor" "255 170 0 220" + + "PaintBackgroundType" "2" + } + + HUDAutoAim + { + "fieldName" "HUDAutoAim" + "visible" "1" + "enabled" "1" + "wide" "640" [$WIN32] + "tall" "480" [$WIN32] + "wide" "960" [$X360] + "tall" "720" [$X360] + } + + HudCommentary + { + "fieldName" "HudCommentary" + "xpos" "c-190" + "ypos" "350" + "wide" "380" + "tall" "40" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "bar_xpos" "50" + "bar_ypos" "20" + "bar_height" "8" + "bar_width" "320" + "speaker_xpos" "50" + "speaker_ypos" "8" + "count_xpos_from_right" "10" // Counts from the right side + "count_ypos" "8" + + "icon_texture" "vgui/hud/icon_commentary" + "icon_xpos" "0" + "icon_ypos" "0" + "icon_width" "40" + "icon_height" "40" + } + + HudHDRDemo + { + "fieldName" "HudHDRDemo" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "visible" "1" + "enabled" "1" + + "Alpha" "255" + "PaintBackgroundType" "2" + + "BorderColor" "0 0 0 255" + "BorderLeft" "16" + "BorderRight" "16" + "BorderTop" "16" + "BorderBottom" "64" + "BorderCenter" "0" + + "TextColor" "255 255 255 255" + "LeftTitleY" "422" + "RightTitleY" "422" + } + + AchievementNotificationPanel + { + "fieldName" "AchievementNotificationPanel" + "visible" "1" + "enabled" "1" + "xpos" "0" + "ypos" "180" + "wide" "f10" [$WIN32] + "wide" "f60" [$X360] + "tall" "100" + } +} diff --git a/scripts/_hl2_HudAnimations.txt b/scripts/_hl2_HudAnimations.txt new file mode 100644 index 0000000..5591f38 --- /dev/null +++ b/scripts/_hl2_HudAnimations.txt @@ -0,0 +1,628 @@ +// sample animation script +// +// +// commands: +// Animate +// variables: +// FgColor +// BgColor +// Position +// Size +// Blur (hud panels only) +// TextColor (hud panels only) +// Ammo2Color (hud panels only) +// Alpha (hud weapon selection only) +// SelectionAlpha (hud weapon selection only) +// TextScan (hud weapon selection only) +// +// interpolator: +// Linear +// Accel - starts moving slow, ends fast +// Deaccel - starts moving fast, ends slow +// +// RunEvent +// starts another even running at the specified time +// +// StopEvent +// stops another event that is current running at the specified time +// +// StopAnimation +// stops all animations refering to the specified variable in the specified panel +// +// StopPanelAnimations +// stops all active animations operating on the specified panel +// +// +// Useful game console commands: +// cl_Animationinfo or +// displays all the animatable variables for the hud element +// + + +event LevelInit +{ +} + +event OpenWeaponSelectionMenu +{ + StopEvent CloseWeaponSelectionMenu 0.0 + StopEvent WeaponPickup 0.0 + StopEvent FadeOutWeaponSelectionMenu 0.0 + + // make the display visible + Animate HudWeaponSelection Alpha "128" Linear 0.0 0.1 + Animate HudWeaponSelection SelectionAlpha "255" Linear 0.0 0.1 + Animate HudWeaponSelection FgColor "FgColor" Linear 0.0 0.1 + Animate HudWeaponSelection TextColor "BrightFg" Linear 0.0 0.1 + Animate HudWeaponSelection TextScan "1" Linear 0.0 0.1 +} + +event CloseWeaponSelectionMenu +{ + // hide the whole thing near immediately + Animate HudWeaponSelection FgColor "0 0 0 0" Linear 0.0 0.1 + Animate HudWeaponSelection TextColor "0 0 0 0" Linear 0.0 0.1 + Animate HudWeaponSelection Alpha "0" Linear 0.0 0.1 + Animate HudWeaponSelection SelectionAlpha "0" Linear 0.0 0.1 +} + +event FadeOutWeaponSelectionMenu +{ + // slowly hide the whole thing + Animate HudWeaponSelection FgColor "0 0 0 0" Linear 0.0 1.5 + Animate HudWeaponSelection TextColor "0 0 0 0" Linear 0.0 1.5 + Animate HudWeaponSelection Alpha "0" Linear 0.0 1.5 + Animate HudWeaponSelection SelectionAlpha "0" Linear 0.0 1.5 +} + +event SuitAuxPowerMax +{ + // hide the suit power + Animate HudSuitPower BgColor "0 0 0 0" Linear 0.0 0.4 + Animate HudSuitPower AuxPowerColor "0 0 0 0" Linear 0.0 0.4 +} + +event SuitAuxPowerNotMax +{ + // show suit power + Animate HudSuitPower BgColor "BgColor" Linear 0.0 0.4 + Animate HudSuitPower AuxPowerColor "255 220 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerDecreasedBelow25 +{ + // make color red + Animate HudSuitPower AuxPowerColor "255 0 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerIncreasedAbove25 +{ + // make colr bright + Animate HudSuitPower AuxPowerColor "255 220 0 220" Linear 0.0 0.4 +} + +event SuitAuxPowerNoItemsActive +{ + // resize the aux power to be the smallest size + Animate HudSuitPower Size "102 26" Linear 0.0 0.4 + Animate HudSuitPower Position "16 400" Linear 0.0 0.4 +// Animate HudSuitPower text_xpos "8" Linear 0.0 0.4 +// Animate HudSuitPower text_ypos "15" Linear 0.0 0.4 +} + +event SuitAuxPowerOneItemActive +{ + // resize the aux power to fit one item + Animate HudSuitPower Size "102 36" Linear 0.0 0.4 + Animate HudSuitPower Position "16 390" Linear 0.0 0.4 +} + +event SuitAuxPowerTwoItemsActive +{ + // resize the aux power to fit two items + Animate HudSuitPower Size "102 46" Linear 0.0 0.4 + Animate HudSuitPower Position "16 380" Linear 0.0 0.4 +} + +event SuitAuxPowerThreeItemsActive +{ + // resize the aux power to fit three items + Animate HudSuitPower Size "102 56" Linear 0.0 0.4 + Animate HudSuitPower Position "16 370" Linear 0.0 0.4 +} + +event SuitFlashlightOn +{ + Animate HudFlashlight TextColor "255 220 0 255" Linear 0.0 0.1 + Animate HudFlashlight TextColor "255 220 0 160" Deaccel 0.1 0.75 + Animate HudFlashlight BgColor "BgColor" Linear 0.0 0.75 +} + +event SuitFlashlightOff +{ + StopEvent SuitFlashlightOn 0.0 + Animate HudFlashlight TextColor "0 0 0 0" Linear 0.0 0.4 + Animate HudFlashlight BgColor "0 0 0 0" Linear 0.0 0.4 +} + +event HudTakeDamageFront +{ +} + +event HudTakeDamageLeft +{ + Animate HudDamageIndicator DmgColorLeft "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorLeft "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorLeft "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageRight +{ + Animate HudDamageIndicator DmgColorRight "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgColorRight "255 0 0 200" Linear 0.0 0.3 + Animate HudDamageIndicator DmgColorRight "255 0 0 0" Deaccel 0.3 0.5 +} + +event HudTakeDamageBehind +{ + RunEvent HudTakeDamageLeft 0.0 + RunEvent HudTakeDamageRight 0.0 +} + +event HudTakeDamageHighLeft +{ + Animate HudDamageIndicator DmgHighColorLeft "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgHighColorLeft "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgHighColorLeft "255 0 0 0" Deaccel 0.4 2.4 +} + +event HudTakeDamageHighRight +{ + Animate HudDamageIndicator DmgHighColorRight "255 88 0 255" Linear 0.0 0.0 + Animate HudDamageIndicator DmgHighColorRight "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgHighColorRight "255 0 0 0" Deaccel 0.4 2.4 +} + +event HudTakeDamageHigh +{ + Animate HudDamageIndicator DmgFullscreenColor "255 88 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 200" Linear 0.0 0.4 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 0" Deaccel 0.4 2.4 +} + +event HudTakeDamageDrown +{ + RunEvent HudTakeDamageBehind 0.0 +} + +event HudTakeDamagePoison +{ + Animate HudDamageIndicator DmgFullscreenColor "255 236 128 240" Linear 0.0 0.0 + Animate HudDamageIndicator DmgFullscreenColor "255 236 128 0" Deaccel 0.4 0.8 +} + +event HudTakeDamageBurn +{ + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 200" Linear 0.0 0.0 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 0" Deaccel 0.2 0.4 +} + +event HudTakeDamageRadiation +{ + Animate HudDamageIndicator DmgFullscreenColor "255 255 255 128" Deaccel 0.0 0.1 + Animate HudDamageIndicator DmgFullscreenColor "255 255 255 0" Deaccel 0.1 0.4 + RunEvent HudTakeDamageBehind 0.0 +} + +event HudPlayerDeath +{ + StopEvent HealthLoop 0.0 + StopEvent HealthPulse 0.0 + + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 96" Deaccel 0.1 0.2 + Animate HudDamageIndicator DmgFullscreenColor "255 0 0 255" Deaccel 0.3 4.0 +} + +event HealthIncreasedAbove20 +{ + StopEvent HealthLoop 0.0 + StopEvent HealthPulse 0.0 + StopEvent HealthLow 0.0 + + Animate HudHealth BgColor "BgColor" Linear 0.0 0.0 + + Animate HudHealth TextColor "FgColor" Linear 0.0 0.04 + Animate HudHealth FgColor "FgColor" Linear 0.0 0.03 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +event HealthIncreasedBelow20 +{ + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.25 + Animate HudHealth FgColor "FgColor" Linear 0.3 0.75 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 +} + +event SuitPowerIncreasedAbove20 +{ + StopEvent SuitLoop 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitPowerZero 0.0 + + Animate HudSuit Alpha "255" Linear 0.0 0.0 + + Animate HudSuit BgColor "BgColor" Linear 0.0 0.0 + + Animate HudSuit TextColor "FgColor" Linear 0.0 0.05 + Animate HudSuit FgColor "FgColor" Linear 0.0 0.05 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 +} + + +event SuitPowerIncreasedBelow20 +{ + StopEvent SuitPowerZero 0.0 + Animate HudSuit Alpha "255" Linear 0.0 0.0 + + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 +} + +event SuitPowerZero +{ + StopEvent SuitLoop 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitArmorLow 0.0 + StopEvent SuitDamageTaken 0.0 + + Animate HudSuit Alpha "0" Linear 0.0 0.4 +} + +event TestMovement +{ + Animate HudHealth Position "256 120" Linear 0.0 2.0 + Animate HudHealth Size "128 24" Linear 0.0 1.5 +} + +event HealthDamageTaken +{ + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.25 + Animate HudHealth FgColor "FgColor" Linear 0.3 0.75 + + Animate HudHealth Blur "3" Linear 0.0 0.1 + Animate HudHealth Blur "0" Deaccel 0.1 2.0 + + Animate HudHealth TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHealth TextColor "FgColor" Deaccel 0.1 1.2 +} + +event SuitDamageTaken +{ + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 + + Animate HudSuit TextColor "BrightFg" Linear 0.0 0.1 + Animate HudSuit TextColor "FgColor" Deaccel 0.1 1.2 +} + +// health has been damaged to below 20% +event HealthLow +{ + StopEvent HealthDamageTaken 0.0 + StopEvent HealthPulse 0.0 + StopEvent HealthLoop 0.0 + + Animate HudHealth BgColor "DamagedBg" Linear 0.0 0.1 + Animate HudHealth BgColor "BgColor" Deaccel 0.1 1.75 + + Animate HudHealth FgColor "BrightFg" Linear 0.0 0.2 + Animate HudHealth FgColor "DamagedFg" Linear 0.2 1.2 + + Animate HudHealth TextColor "BrightFg" Linear 0.0 0.1 + Animate HudHealth TextColor "DamagedFg" Linear 0.1 1.2 + + Animate HudHealth Blur "5" Linear 0.0 0.1 + Animate HudHealth Blur "3" Deaccel 0.1 0.9 + + RunEvent HealthPulse 1.0 +} + +event HealthPulse +{ + Animate HudHealth Blur "5" Linear 0.0 0.1 + Animate HudHealth Blur "2" Deaccel 0.1 0.8 + Animate HudHealth TextColor "BrightDamagedFg" Linear 0.0 0.1 + Animate HudHealth TextColor "DamagedFg" Deaccel 0.1 0.8 + Animate HudHealth BgColor "100 0 0 80" Linear 0.0 0.1 + Animate HudHealth BgColor "BgColor" Deaccel 0.1 0.8 + + RunEvent HealthLoop 0.8 +} + +// call to loop HealthPulse +event HealthLoop +{ + RunEvent HealthPulse 0.0 +} + + +// suit armor has been damaged to below 20% +event SuitArmorLow +{ + StopEvent SuitDamageTaken 0.0 + StopEvent SuitPulse 0.0 + StopEvent SuitLoop 0.0 + +// removing this effect -- matching it to the event for normal suit damage +// so, there will be no special indication (redness, flashing) +// in the hud that the suit armor is low + +// Animate HudSuit BgColor "DamagedBg" Linear 0.0 0.1 +// Animate HudSuit BgColor "BgColor" Deaccel 0.1 1.75 + + Animate HudSuit FgColor "BrightFg" Linear 0.0 0.25 + Animate HudSuit FgColor "FgColor" Linear 0.3 0.75 + + Animate HudSuit Blur "3" Linear 0.0 0.1 + Animate HudSuit Blur "0" Deaccel 0.1 2.0 + + Animate HudSuit TextColor "BrightFg" Linear 0.0 0.1 + Animate HudSuit TextColor "FgColor" Deaccel 0.1 1.2 + +// RunEvent SuitPulse 1.0 +} + +event SuitPulse +// this even no longer gets called +{ + Animate HudSuit Blur "5" Linear 0.0 0.1 + Animate HudSuit Blur "2" Deaccel 0.1 0.8 + Animate HudSuit TextColor "BrightDamagedFg" Linear 0.0 0.1 + Animate HudSuit TextColor "DamagedFg" Deaccel 0.1 0.8 + Animate HudSuit BgColor "100 0 0 80" Linear 0.0 0.1 + Animate HudSuit BgColor "BgColor" Deaccel 0.1 0.8 + RunEvent SuitLoop 0.8 +} + +event SuitLoop +{ +// this event no longer gets called + RunEvent SuitPulse 0.0 +} + +// ammo has been picked up +event AmmoIncreased +{ + Animate HudAmmo FgColor "BrightFg" Linear 0.0 0.15 + Animate HudAmmo FgColor "FgColor" Deaccel 0.15 1.5 + Animate HudAmmo Blur "5" Linear 0.0 0.0 + Animate HudAmmo Blur "0" Accel 0.01 1.5 +} + +// ammo has been decreased, but there is still some remaining +event AmmoDecreased +{ + StopEvent AmmoIncreased 0.0 + + Animate HudAmmo Blur "7" Linear 0.0 0.0 + Animate HudAmmo Blur "0" Deaccel 0.1 1.5 + + Animate HudAmmo TextColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmo TextColor "FgColor" Deaccel 0.1 0.75 +} + +// primary ammo is zero +event AmmoEmpty +{ + Animate Hudammo FgColor "BrightDamagedFg" Linear 0.0 0.2 + Animate Hudammo FgColor "DamagedFg" Accel 0.2 1.2 +} + +// ammo2 is the total ammo for a weapon that uses clip ammo +event Ammo2Increased +{ + Animate Hudammo ammo2color "BrightFg" Linear 0.0 0.2 + Animate Hudammo ammo2color "FgColor" Accel 0.2 1.2 +} + +// total ammo has been decreased, but there is still some remaining +event Ammo2Decreased +{ + Animate Hudammo ammo2color "BrightFg" Linear 0.0 0.2 + Animate Hudammo ammo2color "FgColor" Accel 0.2 1.2 +} + +// total ammo is zero +event Ammo2Empty +{ + Animate Hudammo ammo2color "BrightDamagedFg" Linear 0.0 0.2 + Animate Hudammo ammo2color "DamagedFg" Accel 0.2 1.2 +} + +event AmmoSecondaryIncreased +{ + Animate HudAmmoSecondary FgColor "BrightFg" Linear 0.0 0.15 + Animate HudAmmoSecondary FgColor "FgColor" Deaccel 0.15 1.5 + Animate HudAmmoSecondary Blur "5" Linear 0.0 0.0 + Animate HudAmmoSecondary Blur "0" Accel 0.01 1.5 +} + +event AmmoSecondaryDecreased +{ + StopEvent AmmoSecondaryIncreased 0.0 + + Animate HudAmmoSecondary Blur "7" Linear 0.0 0.0 + Animate HudAmmoSecondary Blur "0" Deaccel 0.1 1.5 + + Animate HudAmmoSecondary TextColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmoSecondary TextColor "FgColor" Deaccel 0.1 0.75 +} + +event AmmoSecondaryEmpty +{ + Animate HudAmmoSecondary FgColor "BrightDamagedFg" Linear 0.0 0.2 + Animate HudAmmoSecondary FgColor "DamagedFg" Accel 0.2 1.2 + Animate HudAmmoSecondary Blur "7" Linear 0.0 0.0 + Animate HudAmmoSecondary Blur "0" Deaccel 0.1 1.5 + +} + +// current weapon has been changed +event WeaponChanged +{ + Animate HudAmmo BgColor "250 220 0 80" Linear 0.0 0.1 + Animate HudAmmo BgColor "BgColor" Deaccel 0.1 1.0 + Animate HudAmmo FgColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmo FgColor "FgColor" Linear 0.2 1.5 +} + +// ran if we just changed to a weapon that needs clip ammo +event WeaponUsesClips +{ + Animate HudAmmo Position "r150 432" Deaccel 0.0 0.4 + Animate HudAmmo Size "132 36" Deaccel 0.0 0.4 +} + +// ran if we just changed to a weapon that does not use clip ammo +event WeaponDoesNotUseClips +{ + Animate HudAmmo Position "r118 432" Deaccel 0.0 0.4 + Animate HudAmmo Size "100 36" Deaccel 0.0 0.4 +} + +event WeaponUsesSecondaryAmmo +{ + StopAnimation HudAmmo Position 0.0 + StopAnimation HudAmmo Size 0.0 + StopPanelAnimations HudAmmoSecondary 0.0 + + Animate HudAmmoSecondary BgColor "250 220 0 60" Linear 0.0 0.1 + Animate HudAmmoSecondary BgColor "BgColor" Deaccel 0.1 1.0 + Animate HudAmmoSecondary FgColor "BrightFg" Linear 0.0 0.1 + Animate HudAmmoSecondary FgColor "FgColor" Linear 0.2 1.5 + Animate HudAmmoSecondary Alpha 255 Linear 0.0 0.1 + + Animate HudAmmo Position "r222 432" Deaccel 0.0 0.5 + Animate HudAmmo Size "132 36" Deaccel 0.0 0.4 +} + +event WeaponDoesNotUseSecondaryAmmo +{ + StopPanelAnimations HudAmmoSecondary 0.0 + Animate HudAmmoSecondary FgColor "0 0 0 0" Linear 0.0 0.4 + Animate HudAmmoSecondary BgColor "0 0 0 0" Linear 0.0 0.4 + Animate HudAmmoSecondary Alpha 0 Linear 0.0 0.1 +} + +event CraneMagnetFlash +{ + Animate HudCraneMagnet TextColor "255 220 0 255" Linear 0.0 0.1 + Animate HudCraneMagnet TextColor "255 220 0 160" Deaccel 0.1 0.3 + Animate HudCraneMagnet TextColor "255 170 0 220" Deaccel 0.4 0.3 + Animate HudCraneMagnet TextColor "255 220 0 255" Linear 0.8 0.2 +} + +event HintMessageShow +{ + // show the hints + Animate HudHintDisplay Alpha 255 Linear 0.0 0.5 + + // flash text + Animate HudHintDisplay FgColor "FgColor" Linear 0.0 0.01 + Animate HudHintDisplay FgColor "255 220 0 255" Linear 0.5 0.2 + Animate HudHintDisplay FgColor "FgColor" Linear 0.7 0.2 + Animate HudHintDisplay FgColor "255 220 0 255" Linear 1.5 0.2 + Animate HudHintDisplay FgColor "FgColor" Linear 1.7 0.2 + + // hide the panel after a while + Animate HudHintDisplay Alpha 0 Linear 12.0 1.0 +} + +event HintMessageHide +{ + Animate HudHintDisplay Alpha 0 Linear 0.0 0.5 +} + +event SquadMemberAdded +{ + StopEvent SquadMemberDied 0.0 + StopEvent SquadMemberLeft 0.0 + + // add in the squad member, brighter then normal color + Animate HudSquadStatus LastMemberColor "255 220 0 255" Linear 0.0 0.3 + Animate HudSquadStatus LastMemberColor "255 220 0 160" Linear 0.3 0.3 +} + +event SquadMemberLeft +{ + StopEvent SquadMemberDied 0.0 + StopEvent SquadMemberAdded 0.0 + + // fade out the icon + Animate HudSquadStatus LastMemberColor "255 220 0 0" Linear 0.0 0.5 +} + +event SquadMemberDied +{ + StopEvent SquadMemberAdded 0.0 + StopEvent SquadMemberLeft 0.0 + + // flash red, hold, then disappear + Animate HudSquadStatus LastMemberColor "255 0 0 255" Linear 0.0 0.5 + Animate HudSquadStatus LastMemberColor "255 0 0 0" Linear 2.0 2.0 +} + +event SquadMembersFollowing +{ + StopEvent SquadMembersStationed 0.0 + Animate HudSquadStatus SquadTextColor "255 220 0 255" Linear 0.0 0.2 + Animate HudSquadStatus SquadTextColor "255 220 0 160" Linear 0.2 0.4 +} + +event SquadMembersStationed +{ + StopEvent SquadMembersFollowing 0.0 + Animate HudSquadStatus SquadTextColor "255 220 0 160" Linear 0.5 0.5 +} + +event PoisonDamageTaken +{ + Animate HudPoisonDamageIndicator Alpha 255 Linear 0.0 1.0 + RunEvent PoisonLoop 0.0 +} + +event PoisonDamageCured +{ + StopEvent PoisonDamageTaken 0.0 + StopEvent PoisonLoop 0.0 + StopEvent PoisonPulse 0.0 + Animate HudPoisonDamageIndicator Alpha 0 Linear 0.0 1.0 +} + +event PoisonPulse +{ + Animate HudPoisonDamageIndicator TextColor "BrightFg" Linear 0.0 0.1 + Animate HudPoisonDamageIndicator TextColor "FgColor" Deaccel 0.1 0.8 + Animate HudPoisonDamageIndicator BgColor "100 0 0 80" Linear 0.0 0.1 + Animate HudPoisonDamageIndicator BgColor "BgColor" Deaccel 0.1 0.8 + + RunEvent PoisonLoop 0.8 +} + +// call to loop PoisonLoop +event PoisonLoop +{ + RunEvent PoisonPulse 0.0 +} diff --git a/scripts/_hl2_hud_textures.txt b/scripts/_hl2_hud_textures.txt new file mode 100644 index 0000000..c23f812 --- /dev/null +++ b/scripts/_hl2_hud_textures.txt @@ -0,0 +1,434 @@ +"sprites/640_hud" +{ + TextureData + { + "selection" + { + "file" "sprites/640hud3" + "x" "0" + "y" "180" + "width" "170" + "height" "45" + } + "dmg_bio" + { + "file" "sprites/d_icons" + "x" "42" + "y" "38" + "width" "42" + "height" "38" + } + "dmg_poison" + { + "file" "sprites/640hud8" + "x" "128" + "y" "0" + "width" "64" + "height" "64" + } + "dmg_chem" + { + "file" "sprites/640hud8" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + "dmg_cold" + { + "file" "sprites/640hud9" + "x" "64" + "y" "0" + "width" "64" + "height" "64" + } + "dmg_drown" + { + "file" "sprites/d_icons" + "x" "42" + "y" "0" + "width" "42" + "height" "38" + } + "dmg_heat" + { + "file" "sprites/d_icons" + "x" "0" + "y" "0" + "width" "42" + "height" "38" + } + "dmg_gas" + { + "file" "sprites/640hud9" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + "dmg_rad" + { + "file" "sprites/d_icons" + "x" "0" + "y" "38" + "width" "42" + "height" "38" + } + "dmg_shock" + { + "file" "sprites/d_icons" + "x" "84" + "y" "0" + "width" "42" + "height" "38" + } + "arrow" + { + "file" "sprites/arrow" + "x" "0" + "y" "0" + "width" "32" + "height" "32" + } + "ammo_label" + { + "file" "sprites/hud1" + "x" "120" + "y" "28" + "width" "40" + "height" "14" + } + "health_label" + { + "file" "sprites/hud1" + "x" "160" + "y" "28" + "width" "50" + "height" "14" + } + "battery_label" + { + "file" "sprites/hud1" + "x" "220" + "y" "28" + "width" "40" + "height" "14" + } + "train_back" + { + "file" "sprites/640hud5" + "x" "170" + "y" "0" + "width" "72" + "height" "72" + } + "train_stop" + { + "file" "sprites/640hud5" + "x" "170" + "y" "72" + "width" "72" + "height" "72" + } + "train_forward1" + { + "file" "sprites/640hud5" + "x" "170" + "y" "144" + "width" "72" + "height" "72" + } + "train_forward2" + { + "file" "sprites/640hud6" + "x" "170" + "y" "0" + "width" "72" + "height" "72" + } + "train_forward3" + { + "file" "sprites/640hud6" + "x" "170" + "y" "72" + "width" "72" + "height" "72" + } + "autoaim_c" + { + "file" "sprites/crosshairs" + "x" "96" + "y" "0" + "width" "24" + "height" "24" + } + "title_half" + { + "file" "sprites/640hud4" + "x" "0" + "y" "226" + "width" "256" + "height" "30" + } + "title_life" + { + "file" "sprites/640hud5" + "x" "0" + "y" "226" + "width" "220" + "height" "30" + } + "d_crowbar" + { + "file" "sprites/640hud1" + "x" "192" + "y" "0" + "width" "48" + "height" "16" + } + "d_9mmhandgun" + { + "file" "sprites/640hud1" + "x" "192" + "y" "16" + "width" "32" + "height" "16" + } + "d_357" + { + "file" "sprites/640hud1" + "x" "192" + "y" "32" + "width" "32" + "height" "16" + } + "d_9mmAR" + { + "file" "sprites/640hud1" + "x" "192" + "y" "48" + "width" "48" + "height" "16" + } + "d_shotgun" + { + "file" "sprites/640hud1" + "x" "192" + "y" "64" + "width" "48" + "height" "16" + } + "d_bolt" + { + "file" "sprites/640hud1" + "x" "192" + "y" "80" + "width" "48" + "height" "16" + } + "d_crossbow" + { + "file" "sprites/640hud1" + "x" "192" + "y" "80" + "width" "48" + "height" "16" + } + "d_rpg_rocket" + { + "file" "sprites/640hud1" + "x" "192" + "y" "96" + "width" "48" + "height" "16" + } + "d_gauss" + { + "file" "sprites/640hud1" + "x" "192" + "y" "112" + "width" "32" + "height" "16" + } + "d_egon" + { + "file" "sprites/640hud1" + "x" "192" + "y" "128" + "width" "32" + "height" "16" + } + "d_hornet" + { + "file" "sprites/640hud1" + "x" "192" + "y" "144" + "width" "48" + "height" "16" + } + "d_grenade" + { + "file" "sprites/640hud1" + "x" "192" + "y" "160" + "width" "32" + "height" "16" + } + "d_satchel" + { + "file" "sprites/640hud1" + "x" "192" + "y" "176" + "width" "32" + "height" "16" + } + "d_tripmine" + { + "file" "sprites/640hud1" + "x" "192" + "y" "192" + "width" "32" + "height" "16" + } + "d_snark" + { + "file" "sprites/640hud1" + "x" "192" + "y" "208" + "width" "32" + "height" "16" + } + "d_skull" + { + "file" "sprites/640hud1" + "x" "192" + "y" "224" + "width" "32" + "height" "16" + } + "d_tracktrain" + { + "file" "sprites/640hud1" + "x" "192" + "y" "240" + "width" "32" + "height" "16" + } + "microphone" + { + "file" "sprites/640hud1" + "x" "0" + "y" "225" + "width" "24" + "height" "24" + } + "item_battery" + { + "font" "WeaponIcons" + "character" "*" + } + "item_healthkit" + { + "font" "WeaponIcons" + "character" "+" + } + "item_longjump" + { + "file" "sprites/640hud2" + "x" "176" + "y" "96" + "width" "44" + "height" "44" + } + "grenade" + { + "file" "sprites/640hud7" + "x" "48" + "y" "96" + "width" "24" + "height" "24" + } + "crosshair" + { + "file" "sprites/qi_center" + "x" "0" + "y" "0" + "width" "40" + "height" "40" + } + "crosshair_left" + { + "font" "QuickInfo" + "character" "(" + } + "crosshair_right" + { + "font" "QuickInfo" + "character" ")" + } + "crosshair_left_full" + { + "font" "QuickInfo" + "character" "[" + } + "crosshair_right_full" + { + "font" "QuickInfo" + "character" "]" + } + "crosshair_left_empty" + { + "font" "QuickInfo" + "character" "{" + } + "crosshair_right_empty" + { + "font" "QuickInfo" + "character" "}" + } + "crosshair_default" + { + "file" "sprites/crosshairs" + "x" "0" + "y" "48" + "width" "24" + "height" "24" + } + "viewhair" + { + "file" "sprites/hud/v_crosshair2" + "x" "0" + "y" "0" + "width" "32" + "height" "32" + } + "gunhair" + { + "file" "sprites/hud/v_crosshair1" + "x" "0" + "y" "0" + "width" "32" + "height" "32" + } + + "progress_bar" + { + "file" "sprites/hud1" + "x" "238" + "y" "0" + "width" "10" + "height" "28" + } + + "plushair" + { + "font" "Crosshairs" + "character" "Q" +// "file" "sprites/crosshairs" +// "x" "0" +// "y" "24" +// "width" "24" +// "height" "24" + } + } +} diff --git a/scripts/decals_subrect.txt b/scripts/decals_subrect.txt new file mode 100644 index 0000000..d65a6cd --- /dev/null +++ b/scripts/decals_subrect.txt @@ -0,0 +1,413 @@ +// Decal definitions, format is +// decalname weight +// where weight is used to randomly selected a decal to apply from within the group + +// This is just an entry to map material types to "impact.xxx" +"TranslationData" +{ + "-" "" // don't decal this surface + + "C" "Impact.Concrete" + "M" "Impact.Metal" + "W" "Impact.Wood" + "Y" "Impact.Glass" + "F" "Impact.Flesh" + "B" "Impact.BloodyFlesh" + "H" "Impact.AlienFlesh" + "A" "Impact.Antlion" + "N" "Impact.Sand" + "V" "Impact.Metal" + +// These might be translated in the future + //CHAR_TEX_DIRT 'D' + //CHAR_TEX_GRATE 'G' + //CHAR_TEX_TILE 'T' + //CHAR_TEX_SLOSH 'S' + //CHAR_TEX_COMPUTER 'P' + //CHAR_TEX_CLIP 'I' + //CHAR_TEX_ANTLION 'A' + //CHAR_TEX_FOLIAGE 'O' +} + +"Impact.Concrete" +{ + "decals/concrete/shot1_subrect" "1" + "decals/concrete/shot2_subrect" "1" + "decals/concrete/shot3_subrect" "1" + "decals/concrete/shot4_subrect" "1" + "decals/concrete/shot5_subrect" "1" +} + +"Impact.Metal" +{ + "decals/metal/shot1_subrect" "1" + "decals/metal/shot2_subrect" "1" + "decals/metal/shot3_subrect" "1" + "decals/metal/shot4_subrect" "1" + "decals/metal/shot5_subrect" "1" +} + +"Impact.Wood" +{ + "decals/wood/shot1_subrect" "1" + "decals/wood/shot2_subrect" "1" + "decals/wood/shot3_subrect" "1" + "decals/wood/shot4_subrect" "1" + "decals/wood/shot5_subrect" "1" +} + +"Impact.Glass" +{ + "decals/glass/shot1_subrect" "1" + "decals/glass/shot2_subrect" "1" + "decals/glass/shot3_subrect" "1" + "decals/glass/shot4_subrect" "1" + "decals/glass/shot5_subrect" "1" +} + + +"Impact.Flesh" +{ + "decals/flesh/blood1_subrect" "1" + "decals/flesh/blood2_subrect" "1" + "decals/flesh/blood3_subrect" "1" + "decals/flesh/blood4_subrect" "1" + "decals/flesh/blood5_subrect" "1" +} + + +"Impact.BloodyFlesh" +{ + "decals/bloodyflesh/blood1_subrect" "1" + "decals/bloodyflesh/blood2_subrect" "1" + "decals/bloodyflesh/blood3_subrect" "1" + "decals/bloodyflesh/blood4_subrect" "1" + "decals/bloodyflesh/blood5_subrect" "1" +} + +"Impact.AlienFlesh" +{ + "decals/alienflesh/shot1_subrect" "1" + "decals/alienflesh/shot2_subrect" "1" + "decals/alienflesh/shot3_subrect" "1" + "decals/alienflesh/shot4_subrect" "1" + "decals/alienflesh/shot5_subrect" "1" +} + +"Impact.Antlion" +{ + "decals/antlion/shot1_subrect" "1" + "decals/antlion/shot2_subrect" "1" + "decals/antlion/shot3_subrect" "1" + "decals/antlion/shot4_subrect" "1" + "decals/antlion/shot5_subrect" "1" +} + +// Sand does not have model versions of the decals. +"Impact.Sand" +{ + "decals/sand/shot1_subrect" "1" + "decals/sand/shot2_subrect" "1" + "decals/sand/shot3_subrect" "1" + "decals/sand/shot4_subrect" "1" +} + +"Scorch" +{ + "decals/scorch1_subrect" "1" + "decals/scorch2_subrect" "1" +} + +"Blood" +{ + "decals/blood1_subrect" "1" + "decals/blood2_subrect" "1" + "decals/blood3_subrect" "1" + "decals/blood4_subrect" "1" + "decals/blood5_subrect" "1" + "decals/blood6_subrect" "1" +} + +"YellowBlood" +{ + "decals/yblood1_subrect" "1" + "decals/yblood2_subrect" "1" + "decals/yblood3_subrect" "1" + "decals/yblood4_subrect" "1" + "decals/yblood5_subrect" "1" + "decals/yblood6_subrect" "1" +} + +"GlassBreak" +{ + "decals/break1_subrect" "1" + "decals/break2_subrect" "1" + "decals/break3_subrect" "1" +} + +"BigShot" +{ + "decals/bigshot1_subrect" "1" + "decals/bigshot2_subrect" "1" + "decals/bigshot3_subrect" "1" + "decals/bigshot4_subrect" "1" + "decals/bigshot5_subrect" "1" +} + +"BulletProof" +{ + "decals/bproof1_subrect" "1" +} + +"SmallScorch" +{ + "decals/smscorch1_subrect" "1" + "decals/smscorch2_subrect" "1" + "decals/smscorch3_subrect" "1" +} + +"FadingScorch" +{ + "decals/scorchfade_subrect" "1" +} + +"BeerSplash" +{ + "decals/beersplash_subrect" "1" +} + +"ManhackCut" +{ + "decals/manhackcut_subrect" "1" + "decals/manhackcut2_subrect" "1" + "decals/manhackcut3_subrect" "1" +} + +"RedGlowFade" +{ + "decals/redglowfade" "1" +} + +"CombineBallFade" +{ + "decals/combineballfade" "1" +} + +"CombineBallFade2" +{ + "decals/combineballfade2" "1" +} + +"CombineBallFade3" +{ + "decals/combineballfade3" "1" +} + +"PlasmaGlowFade" +{ + "decals/plasmaglowfade" "1" +} + +"Splash" +{ + "decals/decalsplash" "1" +} + +"ExplosiveGunshot" +{ + "decals/concrete/shot1_subrect" "1" +} + +"Fire" +{ + "sprites/fire_floor" "1" +} + +// Currently a model version of this decal doesn't exist. +"Antion.Unburrow" +{ + "decals/unburrow_subrect" "1" +} + +"Extinguish" +{ + "decals/extinguish1_subrect" "1" + "decals/extinguish2_subrect" "1" +} + +// Currently a model version of these decals don't exist. +"Splash.Large" +{ + "decals/splash1_subrect" "1" + "decals/splash2_subrect" "1" + "decals/splash3_subrect" "1" +} + +// Currently a model version of these decals don't exist. +"Splash.Small" +{ + "decals/splash1_subrect" "1" + "decals/splash1_subrect" "1" + "decals/splash1_subrect" "1" +} + +// Currently a model version of this decal doesn't exit. +"Rollermine.Crater" +{ + "decals/rollermine_crater_subrect" "1" +} + +"BirdPoop" +{ + "decals/decal_birdpoop001_subrect" "1" + "decals/decal_birdpoop002_subrect" "1" + "decals/decal_birdpoop003_subrect" "1" + "decals/decal_birdpoop004_subrect" "1" +} + +"PaintSplatBlue" +{ + "decals/decal_paintsplatterblue001_subrect" "1" +} + +"PaintSplatGreen" +{ + "decals/decal_paintsplattergreen001_subrect" "1" +} + +"PaintSplatPink" +{ + "decals/decal_paintsplatterpink001_subrect" "1" +} + +"LaserBurn" +{ + "decals/laserburn1" "1" + "decals/laserburn2" "1" + "decals/laserburn3" "1" +} + +// Currently a model version doesn't exist and it is not in a decal page. +"Antlion.Splat" +{ + "decals/antlion/antlion_splat" "1" +} + +"Models" +{ + // World Model specific decal precache. + "decals/concrete/shot1" "1" + "decals/concrete/shot2" "1" + "decals/concrete/shot3" "1" + "decals/concrete/shot4" "1" + "decals/concrete/shot5" "1" + "decals/metal/shot1" "1" + "decals/metal/shot2" "1" + "decals/metal/shot3" "1" + "decals/metal/shot4" "1" + "decals/metal/shot5" "1" + "decals/wood/shot1" "1" + "decals/wood/shot2" "1" + "decals/wood/shot3" "1" + "decals/wood/shot4" "1" + "decals/wood/shot5" "1" + "decals/glass/shot1" "1" + "decals/glass/shot2" "1" + "decals/glass/shot3" "1" + "decals/glass/shot4" "1" + "decals/glass/shot5" "1" + "decals/flesh/blood1" "1" + "decals/flesh/blood2" "1" + "decals/flesh/blood3" "1" + "decals/flesh/blood4" "1" + "decals/flesh/blood5" "1" + "decals/bloodyflesh/blood1" "1" + "decals/bloodyflesh/blood2" "1" + "decals/bloodyflesh/blood3" "1" + "decals/bloodyflesh/blood4" "1" + "decals/bloodyflesh/blood5" "1" + "decals/alienflesh/shot1" "1" + "decals/alienflesh/shot2" "1" + "decals/alienflesh/shot3" "1" + "decals/alienflesh/shot4" "1" + "decals/alienflesh/shot5" "1" + "decals/antlion/shot1" "1" + "decals/antlion/shot2" "1" + "decals/antlion/shot3" "1" + "decals/antlion/shot4" "1" + "decals/antlion/shot5" "1" + "decals/scorch1" "1" + "decals/scorch2" "1" + "decals/blood1" "1" + "decals/blood2" "1" + "decals/blood3" "1" + "decals/blood4" "1" + "decals/blood5" "1" + "decals/blood6" "1" + "decals/blood7" "1" + "decals/blood8" "1" + "decals/yblood1" "1" + "decals/yblood2" "1" + "decals/yblood3" "1" + "decals/yblood4" "1" + "decals/yblood5" "1" + "decals/yblood6" "1" + "decals/break1" "1" + "decals/break2" "1" + "decals/break3" "1" + "decals/bigshot1" "1" + "decals/bigshot2" "1" + "decals/bigshot3" "1" + "decals/bigshot4" "1" + "decals/bigshot5" "1" + "decals/bproof1" "1" + "decals/smscorch1" "1" + "decals/smscorch2" "1" + "decals/smscorch3" "1" + "decals/scorchfade" "1" + "decals/beersplash" "1" + "decals/manhackcut" "1" + "decals/manhackcut2" "1" + "decals/manhackcut3" "1" + "decals/unburrow" "1" + "decals/extinguish1" "1" + "decals/extinguish2" "1" + "decals/splash1" "1" + "decals/splash2" "1" + "decals/splash3" "1" + "decals/rollermine_crater" "1" + "decals/decal_birdpoop001" "1" + "decals/decal_birdpoop002" "1" + "decals/decal_birdpoop003" "1" + "decals/decal_birdpoop004" "1" + "decals/decal_paintsplatterblue001" "1" + "decals/decal_paintsplattergreen001" "1" + "decals/decal_paintsplatterpink001" "1" + "decals/decal_paintsplatterblue_model" "1" + "decals/decal_paintsplattergreen_model" "1" + "decals/decal_paintsplatterpink_model" "1" + "decals/antlion/antlion_splat" "1" + + // Model specific decal precache. + "decals/beersplashmodel" "1" + "decals/bigshot1model" "1" + "decals/bigshot2model" "1" + "decals/bigshot3model" "1" + "decals/bigshot4model" "1" + "decals/bigshot5model" "1" + "decals/bproof1model" "1" + "decals/break1model" "1" + "decals/break2model" "1" + "decals/break3model" "1" + "decals/decal_paintsplatterblue_model" "1" + "decals/decal_paintsplattergreen_model" "1" + "decals/decal_paintsplatterpink_model" "1" + "decals/extinguish1model" "1" + "decals/extinguish2model" "1" + "decals/scorch1model" "1" + "decals/scorch2model" "1" + "decals/scorchfademodel" "1" + "decals/smscorch1model" "1" + "decals/smscorch2model" "1" + "decals/smscorch3model" "1" +} \ No newline at end of file diff --git a/scripts/dsp_presets.txt b/scripts/dsp_presets.txt new file mode 100644 index 0000000..0505023 --- /dev/null +++ b/scripts/dsp_presets.txt @@ -0,0 +1,1198 @@ +// DSP preset definition file. + +///////////////////////////////////// +// WARNING: do not edit this file! // +///////////////////////////////////// + +// console "dsp_reload" reloads while engine running + +// PROCESSOR TYPE: +// NULL 0 // pass through - must be 0 +// DLY 1 // simple feedback reverb +// RVA 2 // parallel reverbs +// FLT 3 // lowpass or highpass filter +// CRS 4 // chorus NOT TESTED +// PTC 5 // pitch shifter NOT TESTED (UPDATE: DOES NOT INTEGRATE WITH NEW SOUND LENGTH CODE. DO NOT USE.) +// ENV 6 // adsr envelope NOT TESTED +// LFO 7 // lfo +// EFO 8 // envelope follower/gate +// MDY 9 // mod delay +// DFR 10 // diffusor - n series allpass delays +// AMP 11 // amplifier with distortion + +// FILTER TYPE: +// LP 0 // lowpass filter +// HP 1 // highpass filter +// BP 2 // bandpass filter + +// FILTER QUALITY: +// LO 0 // quality of filter or reverb. Must be 0,1,2,3. +// MED 1 +// HI 2 +// VHI 3 + +// DELAY TYPE: +// PLAIN 0 // single feedback loop +// ALLPASS 1 // feedback and feedforward loop - flat frequency response (diffusor) +// LOWPASS 2 // lowpass filter in feedback loop +// DLINEAR 3 // linear delay, no feedback, unity gain +// FLINEAR 4 // linear delay with lowpass filter and output gain +// LOWPASS_4TAP 5 // lowpass filter in feedback loop, 4 delay taps +// PLAIN_4TAP 6 // single feedback loop, 4 delay taps + +// LFO TYPE: +// SIN 0 // sine wav +// TRI 1 // triangle wav +// SQR 2 // square wave, 50% duty cycle +// SAW 3 // forward saw wav +// RND 4 // random wav +// LOG_IN 5 // logarithmic fade in NOT TESTED +// LOG_OUT 6 // logarithmic fade out NOT TESTED +// LIN_IN 7 // linear fade in +// LIN_OUT 8 // linear fade out + +// ENVELOPE TYPE: +// LIN 0 // linear a,d,s,r +// EXP 1 // exponential a,d,s,r (IGNORED) + +// PRESET CONFIGURATION TYPE: +// SIMPLE 0 // optimized +// LINEAR 1 // optimized +// PARALLEL2 5 +// PARALLEL4 6 +// PARALLEL5 7 +// FEEDBACK 8 +// FEEDBACK3 9 +// FEEDBACK4 10 +// MOD 11 // NOT TESTED +// MOD2 12 // NOT TESTED +// MOD3 13 // NOT TESTED + +// PSET_SIMPLE 0 +// x(n)--->P(0)--->y(n) + +// PSET_LINEAR 1 +// x(n)--->P(0)-->P(1)-->...P(m)--->y(n) + +// PSET_PARALLEL2 5 +// x(n)--->P(0)-->(+)-->y(n) +// ^ +// | +// x(n)--->P(1)----- + +// PSET_PARALLEL4 6 +// x(n)--->P(0)-->P(1)-->(+)-->y(n) +// ^ +// | +// x(n)--->P(2)-->P(3)----- + +// PSET_PARALLEL5 7 +// x(n)--->P(0)-->P(1)-->(+)-->P(4)-->y(n) +// ^ +// | +// x(n)--->P(2)-->P(3)----- + +// PSET_FEEDBACK 8 +// x(n)-P(0)--(+)-->P(1)-->P(2)-->->y(n) +// ^ | +// | v +// -----P(4)<--P(3)-- + +// PSET_FEEDBACK3 9 +// x(n)---(+)-->P(0)--------->y(n) +// ^ | +// | v +// -----P(2)<--P(1)-- + +// PSET_FEEDBACK4 10 +// x(n)---(+)-->P(0)-------->P(3)--->y(n) +// ^ | +// | v +// ---P(2)<--P(1)-- + +// PSET_MOD 11 +// x(n)------>P(1)--P(2)--P(3)--->y(n) +// ^ +// x(n)------>P(0)....: + +// PSET_MOD2 12 +// x(n)-------P(1)-->y(n) +// ^ +// x(n)-->P(0)..: + + +// PSET_MOD3 13 +// x(n)-------P(1)-->P(2)-->y(n) +// ^ +// x(n)-->P(0)..: + + +// PRESET DEFINITIONS: (correct use of parentheses is critical for parsing) +// +// { <# processors> +// { ...} +// { ...} ... } + +// Presets are made up of one or more processors. A preset corresponds to a 'room'. + +// #: preset number - must be unique, no holes in # sequence (although sequential order in this file is not important) +// ptype: preset type from PSET_* above - typically LINEAR - this is how the processors are chained +// mixrng: min and max dsp mix values for sounds. mix value is based on sound source distance from listener. +// Smaller rooms have larger min values. Sounds far from listener have more dsp fx mix. +// duration: if 0.0, preset lasts until another is set +// if > 0.0 duration is preset duration in seconds. resets to previous preset when time expires +// fadetime: time to fade out preset if duration > 0.0. if fadetime < 0, exponential fade. +// db_min: for dsp_room only: if sndlvl in dB of a new sound is < db_min, reduce mix_min/max by db_mixdrop +// db_mixdrop: for dsp_room only: reduce mix_min/max by n% if sndlvl of new sound less than db_min +// so - for some rooms (ie: outside) low level sounds get less dsp fx mix + +// ******************************************************************* +// presets 0-29 map to legacy room_type 0-29. Don't change order or # +// ******************************************************************* +// # ptype mixrng dur fade dbmin mixdrop + // *** NULL PRESET *** +{ 0 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } +} + + // *** AUTO PRESET *** +{ 1 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } +} + + // *** METALIC S *** +{ 2 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 80.0 30.0 4 0.85 1.1 4000 1 0 0 0 0 0 0 0 0 0} +} + + // *** METALIC M *** +{ 3 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 80.0 30.0 4 0.9 1.4 4000 1 0 0 0 0 0 0 0 0 0} +} + + // *** METALIC L *** +{ 4 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.1483 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 100.0 30.0 4 0.95 1.8 4000 1 0 0 0 0 0 0 0 0 0} + +} + // *** TUNNEL S *** +{ 5 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 8.0 2 0.92 1.1 6000 1 0 0 0 0 0 0 0 0 0} + +} + // *** TUNNEL M *** +{ 6 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 100.0 15.0 2 0.92 1.1 5000 1 0 0 0 0 0 0 0 0 0} +} + + // *** TUNNEL L *** +{ 7 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 120.0 25.0 2 0.95 1.1 4000 1 0 0 0 0 0 0 0 0 0} +} + + // *** CHAMBER S *** +{ 8 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 6 0.9 1.4 5000 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CHAMBER M *** +{ 9 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 6 0.9 1.4 6000 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CHAMBER L *** +{ 10 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 9 0.9 1.4 6000 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** BRITE S *** +{ 11 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 3 0.9 1.0 5000 1 0 0 0 0 0 0 0 0} +} + + // *** BRITE M *** +{ 12 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 5 0.9 1.0 5000 1 0 0 0 0 0 0 0 0} +} + + // *** BRITE L *** +{ 13 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 6 0.9 1.0 6000 0 0 0 0 0 0 0 0 0} +} + + // *** WATER S *** +{ 14 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // AMP gain vthresh distmix vfeed modrate moddepth modglide rand + { AMP 1.0 0 0 0.0 10.0 0.6 80 0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 82.0 59.0 2 0.4 2.0 1800 0 10 3.0 0 0 0 0 0 0 0} + +} + // *** WATER M *** +{ 15 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 5 0.9 1.4 1000 0 4 3.48 0 0 0 0 0 0 0} +} + + // *** WATER L *** +{ 16 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 7 0.9 1.0 1000 0 4 3.48 0 0 0 0 0 0 0} + + // MDY dtype delay feedback gain ftype cutoff qwidth qual modrate moddepth modglide mix + { MDY PLAIN 500.0 0.4 1.0 0 0 0 LO 2.0 0.01 15 1.0 } +} + + // *** CONCRETE S *** +{ 17 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 6 0.9 1.4 4000 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CONCRETE M *** +{ 18 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 7 0.9 1.4 3500 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CONCRETE L *** +{ 19 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 8 0.9 1.4 3000 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** OUTSIDE S *** +{ 20 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 300.0 0.5 0.84 LP 2000 0 LO 0 0 0} +} + + // *** OUTSIDE M *** +{ 21 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 400.0 0.5 0.84 LP 1500 0 LO 0 0 0} +} + + // *** OUTSIDE L *** +{ 22 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 750.0 0.5 0.84 LP 1000 0 LO 0 0 0} +} + + // *** CAVERN S *** +{ 23 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 150.0 0.5 0.84 LP 3000 0 LO} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 1.3 0.9 1.0 1500 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CAVERN M *** +{ 24 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 200.0 0.7 0.6 LP 3000 0 LO} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 7 0.9 1.0 1500 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** CAVERN L *** +{ 25 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 300.0 0.7 0.6 LP 3000 0 LO} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 50.0 20.0 9 0.9 1.0 1500 1 4 3.48 0 0 0 0 0 0 0} +} + + // *** WEIRD 1 *** +{ 26 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 400.0 0.5 0.6 LP 1500 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } +} + + // *** WEIRD 2 *** +{ 27 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 400.0 0.5 0.6 LP 1500 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } +} + + // *** WEIRD 3 *** +{ 28 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS 400.0 0.5 0.6 LP 1500 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } +} + // *** WEIRD 4 *** +{ 29 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY 2 400.0 0.5 0.6 LP 1500 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } +} + +// *********************************************** +// presets 30-43 are system presets. Don't change. +// *********************************************** +// # ptype mixrng dur fade dbmin mixdrop + // *** LOWPASS - FACING AWAY *** +{ 30 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // FLT ftype cutoff qwidth quality gain + { FLT LP 3000 0 MED 1.0} + +} + // *** LOWPASS - FACING AWAY + 80ms delay *** +{ 31 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // FLT ftype cutoff qwidth quality gain + { FLT LP 1000 0 MED 1.0} + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY DLINEAR 80.0 0.0 1.0 0 0 0 LO 0 0 0} + +} + + // *** EXPLOSION RING 1 *** +{ 32 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // FLT ftype cutoff qwidth quality gain + { FLT LP 1000 0 MED 0.25} +} + + + // *** EXPLOSION RING 2 *** +{ 33 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // FLT ftype cutoff qwidth quality gain + { FLT LP 1000 0 MED 0.25} +} + + + // *** EXPLOSION RING 3 *** +{ 34 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // FLT ftype cutoff qwidth quality gain + { FLT LP 1000 0 MED 0.25} +} + +{ 35 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 // *** SHOCK MUFFLE 1 *** + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // LFO wavtype rate foneshot gain + { LFO SIN 3000.0 0.0 0.25} +} + +{ 36 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 // *** SHOCK MUFFLE 2 *** + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // LFO wavtype rate foneshot gain + { LFO SIN 3000.0 0.0 0.25} +} + +{ 37 LINEAR 0.2 0.7 1.6 -1.0 80 0.5 // *** SHOCK MUFFLE 3 *** + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // LFO wavtype rate foneshot gain + { LFO SIN 3000.0 0.0 0.25} +} + +{ 38 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** DISTORTED SPEAKER 0 *** + // AMP gain vthresh distmix vfeed + { AMP 100.0 0.005 1.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT HP 1000 0 LO 1.0} + { FLT LP 2000 0 LO 1.0} + { FLT LP 2000 0 LO 0.8} +} + +{ 39 LINEAR 0.2 0.7 1.0 -0.2 80 0.5 // *** STRIDER PRE-FIRE *** + + // LFO wavtype rate foneshot gain + { LFO SQR 50.0 0.0 0.1} +} + + // *** PLAYER SPATIAL (WALL) DELAY *** +{ 40 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // MDY dtype delay feedback gain ftype cutoff qwidth qual modrate moddepth modglide mix + { MDY LINEAR 100.0 0.0 1.0 0 0 0 0 0 0.0 50 1.0 } + +} + // *** 41-43 RESERVED for spatial delays *** + +{ 41 LINEAR 0.2 0.7 0.0 0.0 80 0.5 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 42 LINEAR 0.2 0.7 0.0 0.0 80 0.5 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 43 LINEAR 0.2 0.7 0.0 0.0 80 0.5 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +// ************************************************* +// presets 44-49 are slots reserved for test presets +// ************************************************* +// # ptype mixrng dur fade dbmin mixdrop + + // PTC pitch timeslice xfade +{ 44 LINEAR 0.2 0.7 0 0 0 0{ PTC 1.1 100.0 20.0 } } // pitch up 10% +{ 45 LINEAR 0.2 0.7 0 0 0 0{ PTC 0.9 100.0 20.0 } } // pitch down 10% + + // EFO thresh attackms decayms +{ 46 LINEAR 0.2 0.7 0 0 0 0 { EFO -20.0 100.0 200.0 } } + + // CRS lfowav rate depth mix +{ 47 LINEAR 0.2 0.7 0 0 0 0 { CRS SIN 10 1.0 0.5 } } + + // EFO thresh attackms decayms +{ 48 LINEAR 0.2 0.7 0 0 0 0 { EFO -30 20.0 200.0 } } +{ 49 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +// ************************************************* +// presets 50-59 are slots reserved for dsp_speaker presets +// ************************************************* +// # ptype mixrng dur fade dbmin mixdrop +{ 50 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 51 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 52 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 53 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 54 LINEAR 0.2 0.7 0 0 0 0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +{ 55 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** SPEAKER, LOUDER *** + // AMP gain vthresh distmix vfeed + { AMP 10.0 0.01 0.65 0.0} + { AMP 0.65 1.0 0.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT BP 2500 4000 HI 1.8} +} + +{ 56 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** SPEAKER VERY SMALL *** + // AMP gain vthresh distmix vfeed + { AMP 10.0 0.01 0.65 0.0} + { AMP 0.65 1.0 0.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT BP 2500 3800 HI 1.0} + { FLT BP 2500 3800 HI 2.5} +} + +{ 57 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** LOUDSPEAKER *** + // AMP gain vthresh distmix vfeed + { AMP 10.0 0.01 0.65 0.0} + { AMP 0.65 1.0 0.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT BP 2500 1000 HI 1.0} + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY PLAIN 180.0 0.28 1.7 LP 3000 0 LO 0 0 0} +} + +{ 58 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** SPEAKER SMALL *** + // AMP gain vthresh distmix vfeed + { AMP 10.0 0.01 0.65 0.0} + { AMP 0.65 1.0 0.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT BP 2500 4000 HI 1.0} +} + +{ 59 LINEAR 0.2 0.7 0.0 0.0 80 0.5 // *** SPEAKER VERY SMALL *** + // AMP gain vthresh distmix vfeed + { AMP 10.0 0.01 0.65 0.0} + { AMP 0.65 1.0 0.0 0.0} + + // FLT ftype cutoff qwidth quality gain + { FLT BP 2500 3800 HI 1.0} + { FLT BP 2500 3800 HI 2.0} +} + +// ************************************************************ +// presets 60-100 are memory slots reserved for auto dsp create +// ************************************************************ +// # ptype mix + +{ 60 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 61 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 62 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 63 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 64 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 65 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 66 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 67 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 68 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 69 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +{ 70 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 71 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 72 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 73 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 74 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 75 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 76 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 77 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 78 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 79 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +{ 80 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 81 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 82 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 83 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 84 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 85 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 86 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 87 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 88 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 89 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +{ 90 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 91 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 92 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 93 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 94 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 95 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 96 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 97 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 98 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } +{ 99 LINEAR 0.2 0.7 0.0 0.0 0.0 0.0 { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} } + +// ********************************************************* +// *** presets 100+ are templates for automatic dsp creation +// ********************************************************* + +// these convars store the index to the first preset for each shape type in dsp_presets.txt + +//ConVar adsp_room_min("adsp_room_min", 102); +//ConVar adsp_duct_min("adsp_duct_min", 106); +//ConVar adsp_hall_min("adsp_hall_min", 110); +//ConVar adsp_tunnel_min("adsp_tunnel_min", 114); +//ConVar adsp_street_min("adsp_street_min", 118); +//ConVar adsp_alley_min("adsp_alley_min", 122); +//ConVar adsp_courtyard_min("adsp_courtyard_min", 126); +//ConVar adsp_openspace_min("adsp_openspace_min", 130); +//ConVar adsp_openwall_min("adsp_openwall_min", 130); +//ConVar adsp_openstreet_min("adsp_openstreet_min", 118); +//ConVar adsp_opencourtyard_min("adsp_opencourtyard_min", 126); + +// Automatic dsp parameter notes: + +// setting dsp_room to 1 invokes the automatic dsp creator. It stays active until +// dsp_room is set to some other value. + +// The dsp interpolator blends between two presetes. For instance, a new preset is created +// between ROOM EMPTY SMALL BRIGHT and ROOM EMPTY HUGE DULL +// based on size of room and reflectivity. ROOM EMPTY vs ROOM FULL is chosen based on room diffusion - +// ie: how full of objects the room is. Room type, such as ROOM, HALL, TUNNEL is chosen based on +// shape of space. + +// For RVA: +// if w, d or h param is -1 then parameters are set using room size +// if w, d or h is non-zero, then size and size_min are ignored +// if fw, fd and fh are zero, then feedbk is used for w, d, h and normalized for constant fade time +// if fw, fd or fh is < 0, the corresponding delay param w,d,h is used as a predelay + +// For DLY: +// if delay is -1, delay is set directly from room size * 2 + +// NOTE: all presets have processor gains set such that signal in db = signal out db (0 db gain). + +////////////////////////////////// +// DO NOT MODIFY THESE PRESETS!!!! +////////////////////////////////// + + # type mix min dur fade dbmin dbdrop +{ 100 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 80.0 30.0 4 0.9 1.4 4000 1 0 0 0 0 0 0 0 0 0} +} + +{ 101 LINEAR 0.2 0.7 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 300.0 150.0 2 0.6 1.0 6000 0 0 1.141 0 0 0 0 0 0 0.23861 } + + // EFO thresh attackms decayms + { EFO -30 20.0 200.0 } +} + +// ROOM EMPTY SMALL BRIGHT - min parameters +{ 102 LINEAR 0.3 0.8 0.0 0.0 80 0.5 + // 0.9 0.9 0.5 + // -1 -1 -1 0.0 0.0 0.0 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 80.0 30.0 2 0.78 1.1 6000 1 0 0 0 0 0 0 0 0 0 } +} + +// ROOM EMPTY HUGE DULL - max parameters +{ 103 LINEAR 0.32 0.8 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 240.0 50.0 10 0.97 2.4 1800 1 0 0 0 0 0 0 0 0 0 } +} + +// ROOM DIFFUSE SMALL BRIGHT - min parameters +{ 104 LINEAR 0.63 0.8 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 80.0 30.0 3 0.78 1.4 5000 1 4 2.0 0 0 0 0 0 0 0 } +} + +// ROOM DIFFUSE HUGE DULL - max parameters +{ 105 LINEAR 0.32 0.8 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 240.0 50.0 12 0.97 2.4 1600 1 6 2.0 0 0 0 0 0 0 0 } +} + +// DUCT EMPTY SMALL BRIGHT - min parameters +{ 106 LINEAR 0.4 0.9 0.0 0.0 80 0.5 + // 6 12 4 0.95 -0.8 0.3 0 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 150.0 10.0 2 0.90 2.0 6000 1 0 0 0 0 0 0 0 0 0} +} +// DUCT EMPTY HUGE DULL - max parameters +{ 107 LINEAR 0.4 0.9 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.1483 } + // 96 192 64 0.95 -0.8 0.3 0 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 300.0 12.0 3 0.95 2.0 2000 1 0 0 0 0 0 0 0 0 0} +} +// DUCT DIFFUSE SMALL BRIGHT - min parameters +{ 108 LINEAR 0.4 0.9 0.0 0.0 80 0.5 + // 6 12 4 0.95 -0.8 0.3 0 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 150.0 10.0 2 0.90 2.0 6000 1 0 0 0 0 0 0 0 0 0} +} +// DUCT DIFFUSE HUGE DULL - max parameters +{ 109 LINEAR 0.4 0.9 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.1483 } + // 96 192 64 0.95 -0.8 0.3 0 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 300.0 12.0 3 0.95 2.0 2000 1 0 0 0 0 0 0 0 0 0} +} + + +// HALL EMPTY SMALL BRIGHT - min parameters +{ 110 LINEAR 0.3 0.8 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 3 0.0 2.0 6000 1 0 0 7 20 10 0.85 -0.9 0.3 0} +} +// HALL EMPTY HUGE DULL - max parameters +{ 111 LINEAR 0.3 0.8 0.0 0.0 80 0.5 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 6 0.0 1.8 4000 1 0 0 9 192 64 0.85 -0.3 0.3 0} +} +// HALL DIFFUSE SMALL BRIGHT - min parameters +{ 112 LINEAR 0.3 0.8 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.1483 } + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 3 0.0 2.0 6000 1 0 0 7 20 10 0.85 -0.9 0.3 0} +} +// HALL DIFFUSE HUGE DULL - max parameters +{ 113 LINEAR 0.3 0.8 0.0 0.0 80 0.5 + // DFR size #dly feedbk + { DFR 1.0 2 0.1483 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 6 0.0 1.8 4000 1 0 0 9 192 64 0.58 -0.3 0.3 0} +} + +// TUNNEL EMPTY SMALL BRIGHT - min parameters +{ 114 LINEAR 0.4 0.9 0.0 0.0 80 0.7 + // DFR size #dly feedbk + { DFR 1.0 2 0.1483 } + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 6 0.0 2.0 6000 1 0 0 8 32 10 0.94 -0.9 0.4 0} +} +// TUNNEL EMPTY HUGE DULL - max parameters +{ 115 LINEAR 0.4 0.9 0.0 0.0 80 0.7 + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 9 0.0 2.0 4000 1 0 0 48 192 64 0.97 -0.4 0.5 0} +} +// TUNNEL DIFFUSE SMALL BRIGHT - min parameters +{ 116 LINEAR 0.4 0.9 0.0 0.0 80 0.7 + // DFR size #dly feedbk gain + { DFR 1.0 3 0.15 1.0} + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 9 0.0 2.0 6000 1 0 0.0 8 32 10 0.96 -0.9 0.4 0} +} +// TUNNEL DIFFUSE HUGE DULL - max parameters +{ 117 LINEAR 0.4 0.9 0.0 0.0 80 0.7 + // DFR size #dly feedbk gain + { DFR 1.0 4 0.15 1.0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 12 0.0 2.0 4000 1 0 0.0 48 192 64 0.97 -0.4 0.4 0} +} + +// STREET EMPTY SMALL BRIGHT - min parameters +{ 118 LINEAR 0.3 0.8 0.0 0.0 75 0.3 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 4000 1 0 0.0 50 200 120 0.48 -0.16 -0.3 0} +} +// STREET EMPTY HUGE DULL - max parameters +{ 119 LINEAR 0.3 0.8 0.0 0.0 75 0.3 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 1000 1 0 0.0 100 500 120 0.4 -0.12 -0.2 0} +} +// STREET DIFFUSE SMALL BRIGHT - min parameters +{ 120 LINEAR 0.3 0.8 0.0 0.0 75 0.3 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 4000 1 0 0.0 50 200 120 0.48 -0.16 -0.3 0} +} +// STREET DIFFUSE HUGE DULL - max parameters +{ 121 LINEAR 0.3 0.8 0.0 0.0 75 0.3 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 1000 1 0 0.0 100 500 120 0.4 -0.12 -0.2 0} +} + +// ALLEY EMPTY SMALL BRIGHT - min parameters +{ 122 LINEAR 0.32 0.8 0.0 0.0 60 0.3 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 5000 1 0 0.0 50 100 70 0.5 -0.3 -0.3 0} +} +// ALLEY EMPTY HUGE DULL - max parameters +{ 123 LINEAR 0.32 0.8 0.0 0.0 60 0.3 + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 3000 1 0 0.0 50 200 70 0.5 -0.26 -0.2 0} +} +// ALLEY DIFFUSE SMALL BRIGHT - min parameters +{ 124 LINEAR 0.32 0.8 0.0 0.0 60 0.3 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 5000 1 0 0.0 50 100 70 0.5 -0.29 -0.3 0} +} +// ALLEY DIFFUSE HUGE DULL - max parameters +{ 125 LINEAR 0.32 0.8 0.0 0.0 60 0.3 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fd fh ftap + { RVA 0.0 0.0 1 0.0 2.7 3000 1 0 0.0 50 200 70 0.5 -0.26 -0.2 0} +} + +// COURTYARD EMPTY SMALL BRIGHT - min parameters +{ 126 LINEAR 0.21 0.8 0.0 0.0 95 0.1 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS -1.0 0.5 1.2 LP 4000 0 LO -1 -1 -1} +} +// COURTYARD EMPTY HUGE DULL - max parameters +{ 127 LINEAR 0.21 0.8 0.0 0.0 95 0.1 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS -1.0 0.4 1.2 LP 900 0 LO -1 -1 -1} +} +// COURTYARD DIFFUSE SMALL BRIGHT - min parameters +{ 128 LINEAR 0.21 0.8 0.0 0.0 95 0.1 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS -1.0 0.5 1.2 LP 4000 0 LO -1 -1 -1} +} +// COURTYARD DIFFUSE HUGE DULL - max parameters +{ 129 LINEAR 0.21 0.8 0.0 0.0 95 0.1 + // DFR size #dly feedbk + { DFR 1.0 2 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LOWPASS -1.0 0.2 1.2 LP 900 0 LO -1 -1 -1} +} + +// OPENSPACE EMPTY SMALL BRIGHT - min parameters +{ 130 LINEAR 0.22 0.6 0.0 0.0 95 0.1 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LINEAR 300.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY PLAIN 180.0 0.15 1.0 LP 3000 0 LO 0 0 0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 340.0 220.0 6 0.8 1.0 1500 0 10 2.0 0 0 0 0 0 0 0 } +} +// OPENSPACE EMPTY HUGE DULL - max parameters +{ 131 LINEAR 0.22 0.6 0.0 0.0 95 0.1 + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LINEAR 500.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 4 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY PLAIN 500.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 340.0 200.0 6 0.9 1.5 900 0 10 2.0 0 0 0 0 0 0 0 } +} +// OPENSPACE DIFFUSE SMALL BRIGHT - min parameters +{ 132 LINEAR 0.2 0.7 0.0 0.0 95 0.1 + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LINEAR 300.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 3 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY PLAIN 180.0 0.15 1.0 LP 3000 0 LO 0 0 0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 340.0 220.0 6 0.8 1.0 1500 0 10 2.0 0 0 0 0 0 0 0 } +} +// OPENSPACE DIFFUSE HUGE DULL - max parameters +{ 133 LINEAR 0.2 0.7 0.0 0.0 95 0.1 + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY LINEAR 500.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // DFR size #dly feedbk + { DFR 1.0 4 0.15 } + + // DLY dtype delay feedbk gain ftype cutoff qwidth quality tap1 tap2 tap3 + { DLY PLAIN 500.0 0.2 1.0 LP 3000 0 LO 0 0 0} + + // RVA size min #dly feedbk gain cutoff fpar fmod rate w d h fw fw fh ftap + { RVA 340.0 200.0 6 0.9 1.5 900 0 10 2.0 0 0 0 0 0 0 0 } +} + +///////////////////////////////////////////////////// +// description of parameters for all processor types: +///////////////////////////////////////////////////// + +/////////// +// Filters +/////////// + + // ftype: filter type FLT_LP, FLT_HP, FLT_BP + // cutoff: cutoff frequency in hz at -3db gain + // qwidth: width of BP (if qwidth > 0 then cutin = cutoff and cutoff = cutoff + qwidth) + // quality: QUA_LO, _MED, _HI _VHI 0,1,2,3 = # of series filters + // gain: 0-10.0 output gain + +////////// +// Delays +////////// + + // dtype: delay type DLY_PLAIN, DLY_LOWPASS, DLY_ALLPASS + // delay: delay in milliseconds (room max size in feet) + // feedback: feedback 0-1.0 + // gain: final gain of output stage, 0-10.0 + + +/////////// +// Reverbs +/////////// + + // size_max: 0-1000.0 millisec (room width in feet) - delay max + // size_min: 0-1000.0 millisec (room width in feet) - delay min + // #dly: controls # of parallel or series delays + // feedbk: 0-1.0 scales feedback parameters + // gain: final gain of output stage, 0-1.0 + // fparallel: if true, filters are built into delays, otherwise filter output only + // cutoff: if > 0, feedback loop is Lowpass filtered to cutoff in Hz + // fmoddly: if > 0 all delays are modulating delays, param controls depth in milliseconds of modulation + // rate: if fmoddly > 0, controls mod rate - ie: # of delay passes that occur between delay modulations + + // width: 0-1000.0 millisec (room width in feet) - used instead of size if non-zero + // depth: 0-1000.0 room depth in feet - used instead of size if non-zero + // height: 0-1000.0 room height in feet - used instead of size if non-zero + + // fbwidth: -1.0-1.0 material reflectivity - used as feedback param instead of decay if non-zero + // fbdepth: -1.0-1.0 material reflectivity - used as feedback param instead of decay if non-zero + // fbheight:-1.0-1.0 material reflectivity - used as feedback param instead of decay if non-zero + // if < 0, a predelay is allocated, then feedback is -1*param given + // ftaps: if > 0, scales all tap delays as D ( 1 - N * tap) n = 0,1,2,3 + + +///////////// +// Diffusors +///////////// + + // size: 0-1.0 scales all delays (13ms to 41ms * scale = delay) + // #dly : 0-4.0 controls # of series delays + // feedbk: 0-1.0 scales all feedback parameters + +////////////// +// Amplifiers +////////////// + // {amp_gain, 0.0, 10.0}, // amplification + // {amp_vthresh, 0.0, 1.0}, // threshold for distortion (1.0 = no distortion) + // {amp_distmix, 0.0, 1.0}, // mix of clean and distortion (1.0 = full distortion, 0.0 = full clean) + // {amp_vfeed, 0.0, 1.0}, // distortion feedback + // modrate, 0.01, 200.0}, // frequency at which amplitude values change to new random value. 0 is no self-modulation + // moddepth, 0.0, 1.0}, // how much amplitude changes (decreases) from current value (0-1.0) + // modglide, 0.01, 100.0}, // glide time between mapcur and ampnew in milliseconds + // rand 0, 1 // if 1, modulate randomly between gain & g*(1-depth). otherwise alternate gain/gainmin + +//////// +// LFOs +//////// + // wavtype: lfo type to use (LFO_SIN, LFO_RND...) + // rate: modulation rate in hz. for MDY, 1/rate = 'glide' time in seconds + // foneshot: 1.0 if lfo is oneshot + // gain: scale output amplitude by gain 0-1.0 + + +///////// +// Pitch +///////// + + // pitch: 0-n.0 where 1.0 = 1 octave up and 0.5 is one octave down + // timeslice: in milliseconds - size of sound chunk to analyze and cut/duplicate - 100ms nominal + // xfade: in milliseconds - size of crossfade region between spliced chunks - 20ms nominal + + +///////////// +// Envelopes +///////////// + + // etype: ENV_LINEAR, ENV_LOG - currently ignored + // amp1: attack peak amplitude 0-1.0 + // amp2: decay target amplitued 0-1.0 + // amp3: sustain target amplitude 0-1.0 + // attack time in milliseconds + // envelope decay time in milliseconds + // sustain time in milliseconds + // release time in milliseconds + // exp: if 1, use exponential curves + +////////////// +// Mod delays +////////////// + + // dtype: delay type DLY_PLAIN, DLY_LOWPASS, DLY_ALLPASS + // delay: delay in milliseconds + // feedback: feedback 0-1.0 + // gain: final gain of output stage, 0-1.0 + + // modrate: frequency at which delay values change to new random value. 0 is no self-modulation + // moddepth: how much delay changes (decreases) from current value (0-1.0) + // modglide: glide time between dcur and dnew in milliseconds + + +////////// +// Chorus +////////// + + // lfowav: lfotype is LFO_SIN, LFO_RND, LFO_TRI etc (LFO_RND for chorus, LFO_SIN for flange) + // rate: rate is modulation frequency in Hz + // depth: depth is modulation depth, 0-1.0 + // mix: mix is mix of chorus and clean signal + + +////////////////////////// +// Envelope follower/ Gate +////////////////////////// + + // threshold, 0.0, -140.0 // gate threshold in db. if 0.0 then no gate. + // attack, 0.0, 20000.0 // attack time in milliseconds + // decay, 0.0, 20000.0 // envelope decay time in milliseconds + // exp, 0.0, 1.0 // if 1.0 use exponential decay + +// UNDONE: stock reverb presets: + +// carpet hallway +// tile hallway +// wood hallway +// metal hallway + +// train tunnel +// sewer main tunnel +// concrete access tunnel +// cave tunnel +// sand floor cave tunnel + +// metal duct shaft +// elevator shaft +// large elevator shaft + +// parking garage +// aircraft hangar +// cathedral +// train station + +// small cavern +// large cavern +// huge cavern +// watery cavern +// long, low cavern + +// wood warehouse +// metal warehouse +// concrete warehouse + +// small closet room +// medium drywall room +// medium wood room +// medium metal room + +// elevator +// small metal room +// medium metal room +// large metal room +// huge metal room + +// small metal room dense +// medium metal room dense +// large metal room dense +// huge metal room dense + +// small concrete room +// medium concrete room +// large concrete room +// huge concrete room + +// small concrete room dense +// medium concrete room dense +// large concrete room dense +// huge concrete room dense + +// soundproof room +// carpet lobby +// swimming pool +// open park +// open courtyard +// wide parkinglot +// narrow street +// wide street, short buildings +// wide street, tall buildings +// narrow canyon +// wide canyon +// huge canyon +// small valley +// wide valley +// wreckage & rubble +// small building cluster +// wide open plain +// high vista + +// alien interior small +// alien interior medium +// alien interior large +// alien interior huge + +// special fx presets: + +// alien citadel + +// teleport aftershock (these presets all ADSR timeout and reset the dsp_* to 0) +// on target teleport +// off target teleport +// death fade +// beam stasis +// scatterbrain +// pulse only +// slomo +// hypersensitive +// supershocker +// physwhacked +// forcefieldfry +// juiced +// zoomed in +// crabbed +// barnacle gut +// bad transmission + + +// pst prm gn p1 p1 p3 p4 p5 p6 p7 p8.... +//dsp_parm 10 1 1.8 1.0 1.0 0.9 0 1000 500 1 1 0 0 0 0 0 0 0 // diffuse medium room, metal +//dsp_parm 10 1 1.3 1.0 1.0 0.8 0 1000 500 1 1 0 0 0 0 0 0 0 // diffuse medium room dull +//dsp_parm 10 1 1.3 1.0 1.0 0.8 0 4000 2000 1 1 0 0 0 0 0 0 0 // diffuse medium room +//dsp_parm 10 1 1.3 1.0 1.0 0.8 0 8000 2000 1 1 0 0 0 0 0 0 0 // diffuse medium room bright +//dsp_parm 10 1 1.4 1.5 1.0 0.84 0 8000 2000 1 1 0 0 0 0 0 0 0 // diffuse larger room bright + + diff --git a/scripts/ff_grenade_caltrop.txt b/scripts/ff_grenade_caltrop.txt new file mode 100644 index 0000000..dabc478 --- /dev/null +++ b/scripts/ff_grenade_caltrop.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "R" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "R" + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "R" + } + } + "printname" "#FF_WPNHUD_CALTROP" +} diff --git a/scripts/ff_grenade_concussion.txt b/scripts/ff_grenade_concussion.txt new file mode 100644 index 0000000..484e4b2 --- /dev/null +++ b/scripts/ff_grenade_concussion.txt @@ -0,0 +1,26 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "U" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "U" + } + + // yeah admittedly this is unlikely + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "U" + } + } + "printname" "#FF_WPNHUD_CONC" +} diff --git a/scripts/ff_grenade_emp.txt b/scripts/ff_grenade_emp.txt new file mode 100644 index 0000000..3884a3e --- /dev/null +++ b/scripts/ff_grenade_emp.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "." + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "." + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "." + } + } + "printname" "#FF_WPNHUD_EMP" +} diff --git a/scripts/ff_grenade_gas.txt b/scripts/ff_grenade_gas.txt new file mode 100644 index 0000000..39ded17 --- /dev/null +++ b/scripts/ff_grenade_gas.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "S" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "S" + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "S" + } + } + "printname" "#FF_WPNHUD_GASGREN" +} diff --git a/scripts/ff_grenade_laser.txt b/scripts/ff_grenade_laser.txt new file mode 100644 index 0000000..5dc2726 --- /dev/null +++ b/scripts/ff_grenade_laser.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "," + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "," + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "," + } + } + "printname" "#FF_WPNHUD_LASERGREN" +} diff --git a/scripts/ff_grenade_mirv.txt b/scripts/ff_grenade_mirv.txt new file mode 100644 index 0000000..2c992c6 --- /dev/null +++ b/scripts/ff_grenade_mirv.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "/" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "/" + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "/" + } + } + "printname" "#FF_WPNHUD_MIRV" +} diff --git a/scripts/ff_grenade_nail.txt b/scripts/ff_grenade_nail.txt new file mode 100644 index 0000000..8a5ac18 --- /dev/null +++ b/scripts/ff_grenade_nail.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "," + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "," + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "," + } + } + "printname" "#FF_WPNHUD_NAILGREN" +} diff --git a/scripts/ff_grenade_napalm.txt b/scripts/ff_grenade_napalm.txt new file mode 100644 index 0000000..cd9dca5 --- /dev/null +++ b/scripts/ff_grenade_napalm.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "T" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "T" + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "T" + } + } + "printname" "#FF_WPNHUD_NAPALM" +} diff --git a/scripts/ff_grenade_normal.txt b/scripts/ff_grenade_normal.txt new file mode 100644 index 0000000..38f8146 --- /dev/null +++ b/scripts/ff_grenade_normal.txt @@ -0,0 +1,25 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "\" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "\" + } + + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "\" + } + } + "printname" "#FF_WPNHUD_FRAG" +} diff --git a/scripts/ff_grenade_slowfield.txt b/scripts/ff_grenade_slowfield.txt new file mode 100644 index 0000000..76f846a --- /dev/null +++ b/scripts/ff_grenade_slowfield.txt @@ -0,0 +1,26 @@ +WeaponData +{ + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "grenade" + { + "font" "GrenadeIcons" + "character" "S" + } + + "ammo" + { + "font" "GrenadeAmmoIcons" + "character" "S" + } + + // yeah admittedly this is unlikely + "deathnotice" + { + "font" "StatusGlyphsSmall" + "character" "S" + } + } + "printname" "#FF_WPNHUD_SLOWFIELD" +} diff --git a/scripts/ff_hud_genericammo.txt b/scripts/ff_hud_genericammo.txt new file mode 100644 index 0000000..d2e98f6 --- /dev/null +++ b/scripts/ff_hud_genericammo.txt @@ -0,0 +1,48 @@ +StatusIconData +{ + TextureData + { + "AMMO_NAILS" + { + "font" "WeaponIconsSmall" + "character" "5" + } + + "AMMO_SHELLS" + { + "font" "WeaponIconsSmall" + "character" "1" + } + + "AMMO_ROCKETS" + { + "font" "WeaponIconsSmall" + "character" "8" + } + + "AMMO_CELLS" + { + "font" "WeaponIconsSmall" + "character" "6" + } + + "AMMO_DETPACK" + { + "font" "WeaponIconsSmall" + "character" "9" + } + + "AMMO_MANCANNON" + { + "font" "WeaponIconsSmall" + "character" "9" + } + + "AMMO_RADIOTAG" + { + "font" "WeaponIconsSmall" + "character" "3" + } + } + +} diff --git a/scripts/ff_hud_statusicons.txt b/scripts/ff_hud_statusicons.txt new file mode 100644 index 0000000..9bab636 --- /dev/null +++ b/scripts/ff_hud_statusicons.txt @@ -0,0 +1,106 @@ +StatusIconData +{ + TextureData + { + "concussion" + { + "font" "StatusGlyphs" + "character" "1" + } + + "infection" + { + "font" "StatusGlyphs" + "character" "2" + } + + "leginjury" + { + "font" "StatusGlyphs" + "character" "3" + } + + "caltropped" + { + "font" "StatusGlyphs" + "character" "4" + } + + "tranquilized" + { + "font" "StatusGlyphs" + "character" "5" + } + + "hallucinations" + { + "font" "StatusGlyphs" + "character" "6" + } + + "burning" + { + "font" "StatusGlyphs" + "character" "7" + } + + "drowning" + { + "font" "StatusGlyphs" + "character" "8" + } + + "radiation" + { + "font" "StatusGlyphs" + "character" "9" + } + + "cold" + { + "font" "StatusGlyphs" + "character" "0" + } + "immune" + { + "font" "StatusGlyphs" + "character" "-" + } + "radiotag" + { + "font" "StatusGlyphs" + "character" "=" + } + "burning1" + { + "font" "StatusGlyphs" + "character" "@" + } + "burning2" + { + "font" "StatusGlyphs" + "character" "#" + } + "burning3" + { + "font" "StatusGlyphs" + "character" "$" + } + "lockedon" + { + "font" "StatusGlyphs" + "character" "&" + } + "sliding" + { + "font" "StatusGlyphs" + "character" "*" + } + "slowmotion" + { + "font" "StatusGlyphs" + "character" "(" + } + } + +} diff --git a/scripts/ff_hud_textures.txt b/scripts/ff_hud_textures.txt new file mode 100644 index 0000000..adf058a --- /dev/null +++ b/scripts/ff_hud_textures.txt @@ -0,0 +1,428 @@ +HudData +{ + TextureData + { + /////////////// BACKGROUND LAYER /////////////// + + "playerScoreBoxBG1" + { + "font" "HUD_BackGround" + "character" "c" + } + "locationBoxBG1" + { + "font" "HUD_BackGround" + "character" "a" + } + "locationBoxBG2" + { + "font" "HUD_BackGround" + "character" "y" + } + "healthBoxBG" + { + "font" "HUD_BackGround" + "character" "c" + } + "armourBoxBG" + { + "font" "HUD_BackGround" + "character" "e" + } + "weaponBoxBG1" + { + "font" "HUD_BackGround" + "character" "g" + } + "weaponBoxBG2" + { + "font" "HUD_BackGround" + "character" "w" + } + "ammoCarriedBoxBG" + { + "font" "HUD_BackGround" + "character" "i" + } + "ammoLoadedBoxBG" + { + "font" "HUD_BackGround" + "character" "k" + } + "grenPrimaryBoxBG" + { + "font" "HUD_BackGround" + "character" "m" + } + "grenSecondaryBoxBG" + { + "font" "HUD_BackGround" + "character" "o" + } + "CellCountBoxBG" + { + "font" "HUD_BackGround" + "character" "m" + } + "CooldownBoxBG" + { + "font" "HUD_BackGround" + "character" "s" + } + "SpyDisguiseBoxBG" + { + "font" "HUD_BackGround" + "character" ">" + } + "SpyDisguiseBoxBG2" + { + "font" "HUD_BackGround" + "character" "]" + } + "SpyDisguiseBoxBG3" + { + "font" "HUD_BackGround" + "character" "," + } + "RoundInfoBoxBG" + { + "font" "HUD_BackGround" + "character" "q" + } + "Gren1TimerBGBox" + { + "font" "HUD_BackGround" + "character" "u" + } + "Gren2TimerBGBox" + { + "font" "HUD_BackGround" + "character" "u" + } + + /////////////// FOREGROUND LAYER /////////////// + + "playerScoreBoxFG1" + { + "font" "HUD_ForeGround" + "character" "d" + } + "locationBoxFG1" + { + "font" "HUD_ForeGround" + "character" "b" + } + "locationBoxFG2" + { + "font" "HUD_BackGround" + "character" "z" + } + "healthBoxFG" + { + "font" "HUD_ForeGround" + "character" "K" + } + "armourBoxFG" + { + "font" "HUD_ForeGround" + "character" "L" + } + "weaponBoxFG1" + { + "font" "HUD_ForeGround" + "character" "h" + } + "weaponBoxFG2" + { + "font" "HUD_BackGround" + "character" "x" + } + "ammoCarriedBoxFG" + { + "font" "HUD_ForeGround" + "character" "j" + } + "ammoLoadedBoxFG" + { + "font" "HUD_ForeGround" + "character" "l" + } + "grenPrimaryBoxFG" + { + "font" "HUD_ForeGround" + "character" "n" + } + "grenSecondaryBoxFG" + { + "font" "HUD_ForeGround" + "character" "p" + } + "CellCountBoxFG" + { + "font" "HUD_ForeGround" + "character" "n" + } + "CooldownBoxFG" + { + "font" "HUD_ForeGround" + "character" "t" + } + "SpyDisguiseBoxFG" + { + "font" "HUD_ForeGround" + "character" "<" + } + "SpyDisguiseBoxFG2" + { + "font" "HUD_ForeGround" + "character" "[" + } + "SpyDisguiseBoxFG3" + { + "font" "HUD_ForeGround" + "character" ";" + } + "RoundInfoBoxFG" + { + "font" "HUD_ForeGround" + "character" "r" + } + "Gren1TimerFGBox" + { + "font" "HUD_ForeGround" + "character" "v" + } + "Gren2TimerFGBox" + { + "font" "HUD_ForeGround" + "character" "v" + } + + /////////////// OLD STUFF /////////////// + "Health" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "Armor" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "Location" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "Gren1" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "Gren2" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "Ammo" + { + "font" "WeaponIconsSelected" + "character" "f" + } + "BuildTimer" + { + "font" "WeaponIconSelected" + "character" "f" + } + "Gren1Timer" + { + "font" "WeaponIconSelected" + "character" "f" + } + "Gren2Timer" + { + "font" "WeaponIconSelected" + "character" "f" + } + + /////////// Temporarily here until a home found for it + + "death_worldspawn" + { + "font" "StatusGlyphsSmall" + "character" "M" + } + "death_door" + { + "font" "StatusGlyphsSmall" + "character" "N" + } + "death_world" + { + "font" "StatusGlyphsSmall" + "character" "O" + } + "death_miniturret" + { + "font" "StatusGlyphsSmall" + "character" "P" + } + + "death_trigger_hurt" + { + "font" "StatusGlyphsSmall" + "character" "O" + } + "d_skull" + { + "font" "StatusGlyphs" + "character" "R" + } + + /////////// Special trigger_hurt death notices. To add a new type, just match the postfix (e.g. _fall) to the DMG_ type + /////////// the trigger hurt uses and then update the string appending code in CHudDeathNotice::FireGameEvent() -> Defrag + "death_trigger_hurt_fall" + { + "font" "StatusGlyphsSmall" + "character" "M" + } + "death_trigger_hurt_drown" + { + "font" "StatusGlyphsSmall" + "character" "8" + } + "death_trigger_hurt_shock" + { + "font" "StatusGlyphsSmall" + "character" "Q" + } + "voice_player" + { + "file" "voice/icntlk_sv" + "x" "0" + "y" "0" + "width" "32" + "height" "32" + } + "voice_self" + { + "file" "voice/icntlk_local" + "x" "0" + "y" "0" + "width" "32" + "height" "32" + } + "death_burndeath_level1" + { + "font" "StatusGlyphsSmall" + "character" "@" + } + "death_burndeath_level2" + { + "font" "StatusGlyphsSmall" + "character" "#" + } + "death_burndeath_level3" + { + "font" "StatusGlyphsSmall" + "character" "$" + } + "death_sentrygun_level1" + { + "font" "StatusGlyphsSmall" + "character" "Z" + } + "death_sentrygun_level2" + { + "font" "StatusGlyphsSmall" + "character" "A" + } + "death_sentrygun_level3" + { + "font" "StatusGlyphsSmall" + "character" "B" + } + "death_sentrygun_level1_det" + { + "font" "StatusGlyphsSmall" + "character" "C" + } + "death_sentrygun_level2_det" + { + "font" "StatusGlyphsSmall" + "character" "D" + } + "death_sentrygun_level3_det" + { + "font" "StatusGlyphsSmall" + "character" "E" + } + "death_objective" + { + "font" "StatusGlyphsSmall" + "character" "+" + } + "death_objective2" + { + "font" "StatusGlyphsSmall" + "character" "_" + } + "death_headcrush" + { + "font" "StatusGlyphsSmall" + "character" "L" + } + "death_flag" + { + "font" "StatusGlyphsSmall" + "character" "F" + } + "death_railgun_bounce1" + { + "font" "StatusGlyphsSmall" + "character" "w" + } + "death_railgun_bounce2" + { + "font" "StatusGlyphsSmall" + "character" "x" + } + "death_airshot" + { + "font" "StatusGlyphsSmall" + "character" "G" + } + "build_sentrygun" + { + "file" "vgui/hud_buildable_sentry" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + "build_dispenser" + { + "file" "vgui/hud_buildable_dispenser" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + "build_detpack" + { + "file" "vgui/hud_buildable_detpack" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + "build_jumppad" + { + "file" "vgui/hud_buildable_jumppad" + "x" "0" + "y" "0" + "width" "64" + "height" "64" + } + } +} diff --git a/scripts/ff_playerclass_civilian.ctx b/scripts/ff_playerclass_civilian.ctx new file mode 100644 index 0000000..cb49305 Binary files /dev/null and b/scripts/ff_playerclass_civilian.ctx differ diff --git a/scripts/ff_playerclass_demoman.ctx b/scripts/ff_playerclass_demoman.ctx new file mode 100644 index 0000000..99127e3 Binary files /dev/null and b/scripts/ff_playerclass_demoman.ctx differ diff --git a/scripts/ff_playerclass_engineer.ctx b/scripts/ff_playerclass_engineer.ctx new file mode 100644 index 0000000..159474f Binary files /dev/null and b/scripts/ff_playerclass_engineer.ctx differ diff --git a/scripts/ff_playerclass_hwguy.ctx b/scripts/ff_playerclass_hwguy.ctx new file mode 100644 index 0000000..be695dd Binary files /dev/null and b/scripts/ff_playerclass_hwguy.ctx differ diff --git a/scripts/ff_playerclass_medic.ctx b/scripts/ff_playerclass_medic.ctx new file mode 100644 index 0000000..86ab9b9 Binary files /dev/null and b/scripts/ff_playerclass_medic.ctx differ diff --git a/scripts/ff_playerclass_pyro.ctx b/scripts/ff_playerclass_pyro.ctx new file mode 100644 index 0000000..1fb13d4 Binary files /dev/null and b/scripts/ff_playerclass_pyro.ctx differ diff --git a/scripts/ff_playerclass_scout.ctx b/scripts/ff_playerclass_scout.ctx new file mode 100644 index 0000000..fa75a96 Binary files /dev/null and b/scripts/ff_playerclass_scout.ctx differ diff --git a/scripts/ff_playerclass_sniper.ctx b/scripts/ff_playerclass_sniper.ctx new file mode 100644 index 0000000..ac24e27 Binary files /dev/null and b/scripts/ff_playerclass_sniper.ctx differ diff --git a/scripts/ff_playerclass_soldier.ctx b/scripts/ff_playerclass_soldier.ctx new file mode 100644 index 0000000..10cd716 Binary files /dev/null and b/scripts/ff_playerclass_soldier.ctx differ diff --git a/scripts/ff_playerclass_spy.ctx b/scripts/ff_playerclass_spy.ctx new file mode 100644 index 0000000..eb2b762 Binary files /dev/null and b/scripts/ff_playerclass_spy.ctx differ diff --git a/scripts/ff_weapon_assaultcannon.ctx b/scripts/ff_weapon_assaultcannon.ctx new file mode 100644 index 0000000..ad4bab2 Binary files /dev/null and b/scripts/ff_weapon_assaultcannon.ctx differ diff --git a/scripts/ff_weapon_autorifle.ctx b/scripts/ff_weapon_autorifle.ctx new file mode 100644 index 0000000..f333c31 Binary files /dev/null and b/scripts/ff_weapon_autorifle.ctx differ diff --git a/scripts/ff_weapon_crowbar.ctx b/scripts/ff_weapon_crowbar.ctx new file mode 100644 index 0000000..b53c8a8 Binary files /dev/null and b/scripts/ff_weapon_crowbar.ctx differ diff --git a/scripts/ff_weapon_deploydetpack.ctx b/scripts/ff_weapon_deploydetpack.ctx new file mode 100644 index 0000000..7c2807b Binary files /dev/null and b/scripts/ff_weapon_deploydetpack.ctx differ diff --git a/scripts/ff_weapon_deploydispenser.ctx b/scripts/ff_weapon_deploydispenser.ctx new file mode 100644 index 0000000..db1fbeb Binary files /dev/null and b/scripts/ff_weapon_deploydispenser.ctx differ diff --git a/scripts/ff_weapon_deploymancannon.ctx b/scripts/ff_weapon_deploymancannon.ctx new file mode 100644 index 0000000..fd467fe Binary files /dev/null and b/scripts/ff_weapon_deploymancannon.ctx differ diff --git a/scripts/ff_weapon_deploysentrygun.ctx b/scripts/ff_weapon_deploysentrygun.ctx new file mode 100644 index 0000000..43e364a Binary files /dev/null and b/scripts/ff_weapon_deploysentrygun.ctx differ diff --git a/scripts/ff_weapon_flamethrower.ctx b/scripts/ff_weapon_flamethrower.ctx new file mode 100644 index 0000000..f443a48 Binary files /dev/null and b/scripts/ff_weapon_flamethrower.ctx differ diff --git a/scripts/ff_weapon_grenadelauncher.ctx b/scripts/ff_weapon_grenadelauncher.ctx new file mode 100644 index 0000000..852456f Binary files /dev/null and b/scripts/ff_weapon_grenadelauncher.ctx differ diff --git a/scripts/ff_weapon_ic.ctx b/scripts/ff_weapon_ic.ctx new file mode 100644 index 0000000..a44aca3 Binary files /dev/null and b/scripts/ff_weapon_ic.ctx differ diff --git a/scripts/ff_weapon_knife.ctx b/scripts/ff_weapon_knife.ctx new file mode 100644 index 0000000..1d05800 Binary files /dev/null and b/scripts/ff_weapon_knife.ctx differ diff --git a/scripts/ff_weapon_medkit.ctx b/scripts/ff_weapon_medkit.ctx new file mode 100644 index 0000000..f13bd7c Binary files /dev/null and b/scripts/ff_weapon_medkit.ctx differ diff --git a/scripts/ff_weapon_nailgun.ctx b/scripts/ff_weapon_nailgun.ctx new file mode 100644 index 0000000..5dcab44 Binary files /dev/null and b/scripts/ff_weapon_nailgun.ctx differ diff --git a/scripts/ff_weapon_pipelauncher.ctx b/scripts/ff_weapon_pipelauncher.ctx new file mode 100644 index 0000000..9a3121d Binary files /dev/null and b/scripts/ff_weapon_pipelauncher.ctx differ diff --git a/scripts/ff_weapon_railgun.ctx b/scripts/ff_weapon_railgun.ctx new file mode 100644 index 0000000..bb076ef Binary files /dev/null and b/scripts/ff_weapon_railgun.ctx differ diff --git a/scripts/ff_weapon_rpg.ctx b/scripts/ff_weapon_rpg.ctx new file mode 100644 index 0000000..e673708 Binary files /dev/null and b/scripts/ff_weapon_rpg.ctx differ diff --git a/scripts/ff_weapon_shotgun.ctx b/scripts/ff_weapon_shotgun.ctx new file mode 100644 index 0000000..fbdacd4 Binary files /dev/null and b/scripts/ff_weapon_shotgun.ctx differ diff --git a/scripts/ff_weapon_sniperrifle.ctx b/scripts/ff_weapon_sniperrifle.ctx new file mode 100644 index 0000000..17700fb Binary files /dev/null and b/scripts/ff_weapon_sniperrifle.ctx differ diff --git a/scripts/ff_weapon_spanner.ctx b/scripts/ff_weapon_spanner.ctx new file mode 100644 index 0000000..c8e4f85 Binary files /dev/null and b/scripts/ff_weapon_spanner.ctx differ diff --git a/scripts/ff_weapon_supernailgun.ctx b/scripts/ff_weapon_supernailgun.ctx new file mode 100644 index 0000000..3911da4 Binary files /dev/null and b/scripts/ff_weapon_supernailgun.ctx differ diff --git a/scripts/ff_weapon_supershotgun.ctx b/scripts/ff_weapon_supershotgun.ctx new file mode 100644 index 0000000..724eb53 Binary files /dev/null and b/scripts/ff_weapon_supershotgun.ctx differ diff --git a/scripts/ff_weapon_tommygun.ctx b/scripts/ff_weapon_tommygun.ctx new file mode 100644 index 0000000..639430c Binary files /dev/null and b/scripts/ff_weapon_tommygun.ctx differ diff --git a/scripts/ff_weapon_tranq.ctx b/scripts/ff_weapon_tranq.ctx new file mode 100644 index 0000000..8d76ae2 Binary files /dev/null and b/scripts/ff_weapon_tranq.ctx differ diff --git a/scripts/ff_weapon_umbrella.ctx b/scripts/ff_weapon_umbrella.ctx new file mode 100644 index 0000000..616d90c Binary files /dev/null and b/scripts/ff_weapon_umbrella.ctx differ diff --git a/scripts/game.txt b/scripts/game.txt new file mode 100644 index 0000000..f945c84 --- /dev/null +++ b/scripts/game.txt @@ -0,0 +1,2 @@ +// Game specific definitions +"$game" "Fortress Forever Biotches" diff --git a/scripts/game_sounds_ff.txt b/scripts/game_sounds_ff.txt new file mode 100644 index 0000000..1e062ef --- /dev/null +++ b/scripts/game_sounds_ff.txt @@ -0,0 +1,111 @@ +// +//game sound definitions +// + +"General.BurningObjectNoLoop" +{ + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + "soundlevel" "SNDLVL_NORM" + "wave" "^ambient/fire/fire_small_noloop.wav" +} + +"ingame.screenshot" +{ + "channel" "CHAN_ITEM" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "volume" "VOL_NORM" + "wave" "screenshot/camerashutter.wav" +} + +"HudChat.TeamMessage" +{ + "channel" "CHAN_ITEM" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "PITCH_NORM" + "wave" "common/teamtalk.wav" +} + +"Player.Hint" +{ + "channel" "CHAN_ITEM" + "volume" "0.32" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "common/hint.wav" +} + + +// +//menue button definitions +// + +"VGUI_button.click" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "ui/buttonclick.wav" +} + +"VGUI_button.release" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "ui/buttonclickrelease.wav" +} + +"VGUI_button.rollover" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "ui/buttonrollover.wav" +} + +// +// Context Menu sounds +// + +"ContextMenu.Open" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "common/null.wav" +} + +"ContextMenu.Close" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "common/null.wav" +} + +"ContextMenu.NextMenu" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "ui/buttonclick.wav" +} + +"ContextMenu.Select" +{ + "channel" "CHAN_ITEM" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "PITCH_NORM" + "wave" "ui/buttonclick.wav" +} \ No newline at end of file diff --git a/scripts/game_sounds_ff_buildable.txt b/scripts/game_sounds_ff_buildable.txt new file mode 100644 index 0000000..4a475dd --- /dev/null +++ b/scripts/game_sounds_ff_buildable.txt @@ -0,0 +1,293 @@ +//================================== +//Buildable sounds for Fortress Forever +//================================== + +//---------------- +//Sentry Gun +//---------------- + + "Sentry.Fire" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "pitch" "95,105" + + "rndwave" + { + "wave" "buildable/sentry/sg_fire1.wav" + "wave" "buildable/sentry/sg_fire2.wav" + "wave" "buildable/sentry/sg_fire3.wav" + } + } + "Sentry.RocketFire" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + "wave" "buildable/sentry/sg_rpg1.wav" + } + "Sentry.eject" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_eject1.wav" + } + "Sentry.scan" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + + "rndwave" + { + "wave" "buildable/sentry/sg_scan1.wav" + "wave" "buildable/sentry/sg_scan2.wav" + } + } + "Sentry.spot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "wave" "buildable/sentry/sg_spot.wav" + } + "Sentry.unbuild" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_unbuild.wav" + } + "sentry.aim" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_aim.wav" + } + "Sentry.explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_140dB" + "pitch" "PITCH_NORM" + "wave" "^buildable/sentry/sg_explode.wav" + } + "Sentry.One" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/sentry/sg_build1.wav" + } + "Sentry.two" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_build2.wav" + } + "Sentry.three" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_build3.wav" + } + "Sentry.SabotageActivate" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "wave" "buildable/sentry/sg_sabotageactivate.wav" + } + "Sentry.SabotageFinish" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "wave" "buildable/sentry/sg_sabotagefinish.wav" + } + "Sentry.CloakDetection" + { + "channel" "CHAN_AUTO" + "volume" "1.0" + "soundlevel" "SNDLVL_GUNFIRE" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/sentry/sg_cloakdetection.wav" + } + "Sentry.CloakSonar" + { + "channel" "CHAN_AUTO" + "volume" "1.0" + "soundlevel" "SNDLVL_GUNFIRE" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/sentry/sg_cloaksonar.wav" + } +//---------------- +//Respawn Turret +//---------------- + + "RespawnTurret.Fire" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "pitch" "95,105" + + "rndwave" + { + "wave" "^buildable/respawnturret/rt_fire1.wav" + } + } + "RespawnTurret.Alert" + { + "channel" "CHAN_WEAPON" + "volume" "0.8" + "CompatibilityAttenuation" "0.8" + "pitch" "95,105" + "wave" "buildable/respawnturret/rt_alert1.wav" + } + "RespawnTurret.Ping" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "buildable/respawnturret/rt_ping1.wav" + } + "RespawnTurret.Deploy" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "pitch" "95,105" + "wave" "buildable/respawnturret/rt_deploy1.wav" + } + "RespawnTurret.Retire" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "buildable/respawnturret/rt_retire1.wav" + } + +//---------------- +//Dispenser +//---------------- + + "Dispenser.build" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/dispenser/disp_build.wav" + } + "Dispenser.unbuild" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/dispenser/disp_unbuild.wav" + } + "Dispenser.explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_140dB" + "pitch" "PITCH_NORM" + "wave" "^buildable/dispenser/disp_explode.wav" + } + "Dispenser.omnomnom" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/dispenser/disp_omnomnom.wav" + } + +//---------------- +//Detpack, BOOOM +//---------------- + + "Detpack.Build" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/detpack/detpack_drop.wav" + } + "Detpack.Defuse" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/detpack/detpack_defuse.wav" + } + "Detpack.Timer" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/detpack/detpack_timer1.wav" + } + "Detpack.FiveSeconds" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/detpack/detpack_timer1.wav" + } + "Detpack.TimerTwo" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/detpack/detpack_timer2.wav" + } + "Detpack.Explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_180dB" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "1.0" + "wave" "^buildable/detpack/detpack_Explode1.wav" + } + + + +//---------------- +//Jump Pad, BOING? +//---------------- + "JumpPad.WarmUp" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/jumppad/jumppad_warmup.wav" + } + "JumpPad.PowerDown" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "buildable/jumppad/jumppad_powerdown.wav" + } + "JumpPad.Fire" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/jumppad/jumppad_fire.wav" + } + + "JumpPad.Heal" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")buildable/jumppad/jumppad_heal.wav" + } diff --git a/scripts/game_sounds_ff_grenades.txt b/scripts/game_sounds_ff_grenades.txt new file mode 100644 index 0000000..68f1b84 --- /dev/null +++ b/scripts/game_sounds_ff_grenades.txt @@ -0,0 +1,217 @@ +//================================== +//Grenade sounds for Fortress Forever +//================================== + +//---------------- +//Generic Grenade +//---------------- + + "Grenade.Prime" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/ax1.wav" + } + + +//---------------- +//Fragmentation Grenade, your basic death in a ball +//---------------- + + "NormalGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/bounce.wav" + } + +//---------------- +//Hover Turret +//---------------- + + "HoverTurret.Shoot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/HoverTurret/hoverturret_laser.wav" + } + "HoverTurret.Scan" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/HoverTurret/hoverturret_scan.wav" + } + +//---------------- +//MIRV Grenade +//---------------- + + "MirvGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/mirv/mirv_bounce.wav" + } + "MirvletGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/mirv/mirvlet_bounce.wav" + } + + +//---------------- +//Concussion Grenade, how far can you go?! +//---------------- + + "ConcussionGrenade.Explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_85dB" + "pitch" "PITCH_NORM" + "rndwave" + { + "wave" "^grenades/concussion/conc1.wav" + "wave" "^grenades/concussion/conc2.wav" + } + } + "ConcussionGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/bounce.wav" + } + +//---------------- +//EMP Grenade +//---------------- + + "empGrenade.Explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_140dB" + "pitch" "PITCH_NORM" + "wave" "^grenades/emp/emp_explosion.wav" + } + "empGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/bounce.wav" + } + +//---------------- +//Nail Grenade +//---------------- + + "NailGrenade.Shoot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/nail/nail_shoot1.wav" + + } + "NailGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/bounce.wav" + } + "NailGrenade.LaserLoop" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/nail/nail_laserloop.wav" + } + "NailGrenade.LaserDeploy" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/nail/laser_deploy.wav" + } + +//---------------- +//Slowfield +//---------------- + + "Slowfield.LaserLoop" + { + "channel" "CHAN_AUTO" + "volume" "1" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/slowfield/slowfield_laserloop.wav" + } + "Slowfield.SlowLoop" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/slowfield/slowfield_loop.wav" + } + "Slowfield.Explode" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/slowfield/slowfield_explode.wav" + } + +//---------------- +//Napalm Grenade +//---------------- + + "Napalm.Explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_140dB" + "pitch" "PITCH_NORM" + "wave" "^grenades/napalm/napalm_explode.wav" + } + "NapalmGrenade.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/napalm/napalm_bounce.wav" + } + +//---------------- +//Gas Grenade, insert pun here +//---------------- + + "GasGrenade.Explode" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "PITCH_NORM" + "wave" "grenades/gas/gas_explode.wav" + } + "GasGrenade.bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "wave" "grenades/bounce.wav" + } \ No newline at end of file diff --git a/scripts/game_sounds_ff_items.txt b/scripts/game_sounds_ff_items.txt new file mode 100644 index 0000000..74df68e --- /dev/null +++ b/scripts/game_sounds_ff_items.txt @@ -0,0 +1,55 @@ +//================================== +//Basic Items, For Fortress Forever!!!111oneoneoneone +//================================== + +//---------------- +//Pick Me up! +//---------------- + + "Armorkit.touch" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "player/Objects/armor1.wav" + } + "Backpack.touch" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "player/Objects/ammo1.wav" + } + +//---------------- +//Toss me! (Don't tell the Elf) +//---------------- + + "Item.toss" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "player/Objects/itemtoss1.wav" + } + "Flag.toss" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "misc/flagdrop.wav" + } + "Flag.FloatDeploy" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/assaultcannon/overheat.wav" + } + "Flag.FloatBubbles" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "Items/bubbles.wav" + } diff --git a/scripts/game_sounds_ff_misc.txt b/scripts/game_sounds_ff_misc.txt new file mode 100644 index 0000000..0f73ce7 --- /dev/null +++ b/scripts/game_sounds_ff_misc.txt @@ -0,0 +1,545 @@ +//================================== +//Misc Sounds, mostly Flags +//================================== + +//---------------- +//Flag Related +//---------------- + + "yourteam.flagcap" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/flagcap.wav" + } + "yourteam.flagreturn" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/flagreturn.wav" + } + "yourteam.flagstolen" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/flagstolen.wav" + } + "yourteam.drop" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/flagdrop.wav" + } + "otherteam.flagcap" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/enemyflagcap.wav" + } + "otherteam.flagreturn" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/enemyflagreturn.wav" + } + "otherteam.flagstolen" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/buzwarn.wav" + } + "otherteam.drop" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "@)misc/enemyflagdrop.wav" + } + +//---------------- +// useful vox sounds from HL that need to be remade +//---------------- + + "misc.bizwarn" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/bizwarn.wav" + } + "misc.bloop" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/bloop.wav" + } + "misc.buzwarn" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/buzwarn.wav" + } + "misc.dadeda" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/dadeda.wav" + } + "misc.deeoo" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/deeoo.wav" + } + "misc.doop" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/doop.wav" + } + "misc.woop" + { + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/woop.wav" + } + +//---------------- +// Unagi Power! +//---------------- + + "misc.unagi" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "*misc/unagi.wav" + } + + "misc.unagi_spatial" + { + "channel" "CHAN_AUTO" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" ")misc/unagi.wav" + } + +//---------------- +// thunder +//---------------- + + "misc.thunder" + { + "channel" "CHAN_STATIC" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NONE" + "wave" "*ambient/levels/labs/teleport_postblast_thunder1.wav" + } + +//---------------- +// cz2 +//---------------- + + "ff_cz2.cc_alarm" + { + "channel" "CHAN_AUTO" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + "soundlevel" "SNDLVL_180dB" + "CompatibilityAttenuation" "1.0" + + "wave" "ambient/alarms/city_siren_loop2.wav" + } + + "ff_cz2.teleport_enter" + { + "channel" "CHAN_AUTO" + "volume" "VOL_NORM" + "pitch" "96,112" + "soundlevel" "SNDLVL_GUNFIRE" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" ")ambient/machines/teleport1.wav" + "wave" ")ambient/machines/teleport3.wav" + "wave" ")ambient/machines/teleport4.wav" + } + } + + "ff_cz2.teleport_exit" + { + "channel" "CHAN_AUTO" + "volume" "VOL_NORM" + "pitch" "176,192" + "soundlevel" "SNDLVL_GUNFIRE" + "CompatibilityAttenuation" "1.0" + + "wave" ")ambient/explosions/explode_9.wav" + } + + "ff_cz2.blue_cap_loop" + { + "channel" "CHAN_AUTO" + "volume" "VOL_NORM" + "pitch" "90" + "soundlevel" "SNDLVL_65dB" + + "wave" "ambient/machines/machine_whine1.wav" + } + + + "ff_cz2.red_cap_loop" + { + "channel" "CHAN_AUTO" + "volume" "VOL_NORM" + "pitch" "110" + "soundlevel" "SNDLVL_65dB" + + "wave" "ambient/machines/machine_whine1.wav" + } + +//-------------------------------- +// begin game sounds for ff_hunted +//-------------------------------- + +"ff_hunted.thunder" +{ + "channel" "CHAN_STATIC" + "volume" "0.3" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ambient/levels/labs/teleport_postblast_thunder1.wav" +} + +"ff_hunted.cheer" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted/CrowdCheer.wav" +} + +"ff_hunted.dying_bird" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "rndwave" + { + "wave" "@ff_hunted\dying_bird_1.wav" + "wave" "@ff_hunted\dying_bird_2.wav" + "wave" "@ff_hunted\dying_bird_3.wav" + } +} + +"ff_hunted.dying_bird_full" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\dying_bird_full.wav" +} + +"ff_hunted.i_am_the_werewolf" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\i_am_the_werewolf.wav" +} + +"ff_hunted.i_fight_vampires" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\i_fight_vampires.wav" +} + +"ff_hunted.werewolf_howling" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolf_howling.wav" +} + +"ff_hunted.werewolf_movies" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolf_movies.wav" +} + +"ff_hunted.werewolves_howling" +{ + "channel" "CHAN_STATIC" + "volume" "0.6" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@ff_hunted\werewolves_howling.wav" +} + +//-------------------- +// UNAGI POWER, UNAGI! +//-------------------- + +"ff_hunted.unagi" +{ + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" "@misc/unagi.wav" +} + +"ff_hunted.unagi_spatial" +{ + "channel" "CHAN_AUTO" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "95,105" + "wave" ")misc/unagi.wav" +} + + +//------------------------------ +// end game sounds for ff_hunted +//------------------------------ + +//------------------------------ +// waterpolo +//------------------------------ + + +"ff_waterpolo.psychotic_goalie" +{ + "channel" "CHAN_AUTO" + "volume" "0.25" + "pitch" "PITCH_NORM" + "soundlevel" "SNDLVL_45dB" + + "wave" "npc/zombie_poison/pz_breathe_loop2.wav" +} + +//---------------- +// gridiron... here until valve fixes map-specific sound scripting +//---------------- + + +"gridiron.pass" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/pass.wav" +} + +"gridiron.recovered" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/recovered.wav" +} + +"gridiron.whistle" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/whistle.wav" +} + +"gridiron.fumble" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/fumble.wav" +} + +"gridiron.intercepted" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/intercepted.wav" +} + +"gridiron.tdred" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/tdred.wav" +} + +"gridiron.tdredx" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/tdredx.wav" +} + +"gridiron.tdblue" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/tdblue.wav" +} + +"gridiron.tdbluex" +{ +"channel""CHAN_VOICE" +"volume""VOL_NORM" +"soundlevel" "SNDLVL_NONE" +"wave""@#gridiron/tdbluex.wav" +} + + +// anticitizen sounds from HL2 copypasta + +"ff_anticitizen.warningbell1" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" ")ff_anticitizen/warningbell1.wav" +} + +"ff_anticitizen.beam_shoot" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/portal_beam_shoot6.wav" +} + +"ff_anticitizen.explode_4" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/explode_4.wav" +} + +"ff_anticitizen.explode_3" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/explode_3.wav" +} + +"ff_anticitizen.shutdown" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/thumper_shutdown1.wav" +} + +"ff_anticitizen.winddown" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/teleport_postblast_winddown1.wav" +} + +"ff_anticitizen.suckin" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/teleport_preblast_suckin1.wav" +} + +"ff_anticitizen.3minutestosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_3minutestosingularity.wav" +} + +"ff_anticitizen.2minutestosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_2minutestosingularity.wav" +} + +"ff_anticitizen.1minutetosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_1minutetosingularity.wav" +} + +"ff_anticitizen.45sectosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_45sectosingularity.wav" +} + +"ff_anticitizen.30sectosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_30sectosingularity.wav" +} + +"ff_anticitizen.15sectosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_15sectosingularity.wav" +} + +"ff_anticitizen.10sectosingularity" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_100dB" + "wave" "*ff_anticitizen/fcitadel_10sectosingularity.wav" +} + +"ff_palermo_bell" +{ + "channel" "CHAN_AUTO" + "volume" "1.0" + "soundlevel" "SNDLVL_120dB" + "wave" "ambient/churchbell.wav" +} diff --git a/scripts/game_sounds_ff_player.txt b/scripts/game_sounds_ff_player.txt new file mode 100644 index 0000000..d65a0d8 --- /dev/null +++ b/scripts/game_sounds_ff_player.txt @@ -0,0 +1,230 @@ +//================================== +//Player Sounds, for Fortress Forever +//================================== + +//---------------- +//Player +//---------------- + + "Player.Jump" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" "player/footsteps/movement/jump1.wav" + "wave" "player/footsteps/movement/jump2.wav" + "wave" "player/footsteps/movement/jump3.wav" + } + } + "Player.ClientJump" + { + "channel" "CHAN_BODY" + "volume" "0.5" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" "player/footsteps/movement/jump1.wav" + "wave" "player/footsteps/movement/jump2.wav" + "wave" "player/footsteps/movement/jump3.wav" + } + } + "Player.FallDamage" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "rndwave" + { + "wave" "player/footsteps/movement/fallpain1.wav" + "wave" "player/footsteps/movement/fallpain2.wav" + } + } + "Player.SpyFall" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + + "wave" "player/footsteps/movement/spyland.wav" + } + "Player.Pain" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" "player/pain1.wav" + "wave" "player/pain2.wav" + "wave" "player/pain3.wav" + "wave" "player/pain4.wav" + "wave" "player/pain5.wav" + "wave" "player/pain6.wav" + "wave" "player/pain7.wav" + "wave" "player/pain8.wav" + } + } + "Player.Scream" + { + "channel" "CHAN_AUTO" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + + "rndwave" + { + "wave" "player/scream1.wav" + } + } + "Player.Death" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" "player/death1.wav" + "wave" "player/death2.wav" + "wave" "player/death3.wav" + } + } + "Player.Deathbeep" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "pitch" "92,108" + "CompatibilityAttenuation" "1.0" + + "wave" "@player/deathbeep/deathbeep1.wav" + } + "Player.Cough" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + + "rndwave" + { + "wave" "player/cough1.wav" + "wave" "player/cough2.wav" + "wave" "player/cough3.wav" + "wave" "player/cough4.wav" + "wave" "player/cough5.wav" + "wave" "player/cough6.wav" + "wave" "player/cough7.wav" + } + } + "Player.OutofAmmo" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/outofammo.wav" + } + "Player.AmmoToss" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/Objects/ammotoss1.wav" + } + "Player.Gib" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/gibs.wav" + } + "Player.break" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/break.wav" + } + "Player.bodysplat" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/bodysplat.wav" + } + "Player.blood" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/blood.wav" + } + "Player.armor" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/Objects/armor.wav" + } + "Player.health" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/health.wav" + } + "Player.fall" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" +// "wave" "player/bodysplat.wav" + "rndwave" + { + "wave" "player/footsteps/movement/fallpain1.wav" + "wave" "player/footsteps/movement/fallpain2.wav" + } + } + "Player.FallGib" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/bodysplat.wav" + } + "Player.Flameout" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player/flameout.wav" + } + + "Player.Whoosh" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_75dB" + "pitch" "100" + "wave" ")player/whoosh.wav" + } + + "Player.Sabotage" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "88" + "wave" "@player/suitchargeok1.wav" + } + "Player.SabotageTimedOut" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "pitch" "72" + "wave" "@player/suitchargeok1.wav" + } diff --git a/scripts/game_sounds_ff_radio.txt b/scripts/game_sounds_ff_radio.txt new file mode 100644 index 0000000..473de86 --- /dev/null +++ b/scripts/game_sounds_ff_radio.txt @@ -0,0 +1,237 @@ +//================================== +//Radio, For Fortress Forever +//================================== + +//---------------- +//Flag Announcer +//---------------- + + "vox.enemycap" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/enemycap.wav" + } + "vox.enemystole" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/enemystolenflag.wav" + } + "vox.enemyflagret" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/enemyflagreturn.wav" + } + "vox.yourcap" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/yourcap.wav" + } + "vox.yourstole" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/yourstolenflag.wav" + } + "vox.yourflagret" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/yourflagreturn.wav" + } + +// Security for shutdown maps + + "vox.bluedown" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/blue_down.wav" + } + "vox.blueup" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/blue_up.wav" + } + "vox.reddown" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/red_down.wav" + } + "vox.redup" + { + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NONE" + "wave" "@radio/red_up.wav" + } +//---------------- +//Call for Help, MEDIC! Engie! Saveeee meee +//---------------- + + "medical.saveme" + { + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NORM" + + "rndwave" + { + "wave" "*radio/medic/medic1.wav" + "wave" "*radio/medic/medic2.wav" + "wave" "*radio/medic/medic3.wav" + "wave" "*radio/medic/medic4.wav" + "wave" "*radio/medic/medic5.wav" + "wave" "*radio/medic/medic6.wav" + "wave" "*radio/medic/medic7.wav" + "wave" "*radio/medic/medic8.wav" + "wave" "*radio/medic/medic9.wav" + "wave" "*radio/medic/medic10.wav" + "wave" "*radio/medic/medic11.wav" + } + } + "maintenance.saveme" + { + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NORM" + + "rndwave" + { + "wave" "*radio/medic/eng1.wav" + "wave" "*radio/medic/eng2.wav" + "wave" "*radio/medic/eng3.wav" + "wave" "*radio/medic/eng4.wav" + "wave" "*radio/medic/eng5.wav" + "wave" "*radio/medic/eng6.wav" + "wave" "*radio/medic/eng7.wav" + } + } + "infected.saveme" + { + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NORM" + + "rndwave" + { + "wave" "*radio/medic/unclean1.wav" + "wave" "*radio/medic/unclean2.wav" + "wave" "*radio/medic/unclean3.wav" + "wave" "*radio/medic/unclean4.wav" + "wave" "*radio/medic/unclean5.wav" + "wave" "*radio/medic/unclean6.wav" + "wave" "*radio/medic/unclean7.wav" + } + } + "ammo.saveme" + { + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NORM" + + "rndwave" + { + "wave" "*radio/medic/ammo1.wav" + "wave" "*radio/medic/ammo2.wav" + "wave" "*radio/medic/ammo3.wav" + "wave" "*radio/medic/ammo4.wav" + "wave" "*radio/medic/ammo5.wav" + "wave" "*radio/medic/ammo6.wav" + "wave" "*radio/medic/ammo7.wav" + "wave" "*radio/medic/ammo8.wav" + "wave" "*radio/medic/ammo9.wav" + "wave" "*radio/medic/ammo10.wav" + "wave" "*radio/medic/ammo11.wav" + "wave" "*radio/medic/ammo12.wav" + } + } + +//---------------- +//Class Based Calls for Help +//---------------- + + "scout.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/scout_saveme_01.wav" + } + "sniper.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/sniper_saveme_01.wav" + } + "soldier.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/soldier_saveme_01.wav" + } + "demoman.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/demoman_saveme_01.wav" + } + "medic.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/medic_saveme_01.wav" + } + "engineer.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/eng_saveme_01.wav" + } + "pyro.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/pyro_saveme_01.wav" + } + "spy.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/spy_saveme_01.wav" + } + "hwguy.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/hwguy_saveme_01.wav" + } + "civilian.saveme" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "*radio/medic/civ_saveme_01.wav" + } \ No newline at end of file diff --git a/scripts/game_sounds_ff_training.txt b/scripts/game_sounds_ff_training.txt new file mode 100644 index 0000000..a87fbca --- /dev/null +++ b/scripts/game_sounds_ff_training.txt @@ -0,0 +1,520 @@ +//================================== +// Training Map Sounds +//================================== + + "training.intro" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/intro.wav" + } + + "training.stage_complete" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/stage_complete.wav" + } + + "training.all_complete" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/all_complete.wav" + } + +//================= +// VERTICAL JUMP +//================= + + "training.v_conc01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_conc01.wav" + } + + "training.v_conc02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_conc02.wav" + } + + "training.v_conc_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_conc_timeout.wav" + } + + "training.a_conc01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_conc01.wav" + } + + "training.a_conc02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_conc02.wav" + } + + "training.a_conc_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_conc_timeout.wav" + } + + "training.m_waterconc_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/m_waterconc_start.wav" + } + + "training.m_waterconc01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/m_waterconc01.wav" + } + + "training.m_waterconc02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/m_waterconc02.wav" + } + + "training.m_waterconc_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/m_waterconc_timeout.wav" + } + + "training.v_hhconc01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_hhconc01.wav" + } + + "training.v_hhconc02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_hhconc02.wav" + } + + "training.v_hhconc_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_hhconc_timeout.wav" + } + + "training.a_hhconc01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_hhconc01.wav" + } + + "training.a_hhconc02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_hhconc02.wav" + } + + "training.a_hhconc_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_hhconc_timeout.wav" + } + + "training.v_rj01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_rj01.wav" + } + + "training.v_rj02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_rj02.wav" + } + + "training.v_rj_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_rj_timeout.wav" + } + + "training.a_rj01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_rj01.wav" + } + + "training.a_rj02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_rj02.wav" + } + + "training.a_rj_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_rj_timeout.wav" + } + + "training.v_pipe01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_pipe01.wav" + } + + "training.v_pipe02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_pipe02.wav" + } + + "training.v_pipe_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/v_pipe_timeout.wav" + } + + "training.a_pipe01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_pipe01.wav" + } + + "training.a_pipe02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_pipe02.wav" + } + + "training.a_pipe_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_pipe_timeout.wav" + } + + "training.a_ft01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_ft01.wav" + } + + "training.a_ft02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_ft02.wav" + } + + "training.a_ft_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/a_ft_timeout.wav" + } + + + "training.move_doublejump01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_doublejump01.wav" + } + + "training.move_doublejump02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_doublejump02.wav" + } + + "training.move_doublejump_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_doublejump_timeout.wav" + } + + "training.move_aircontrol_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrol_start.wav" + } + + "training.move_aircontrol02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrol02.wav" + } + + "training.move_aircontrol_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrol_timeout.wav" + } + + "training.move_aircontrolpush01" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolpush01.wav" + } + + "training.move_aircontrolpush02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolpush02.wav" + } + + "training.move_aircontrolpush_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolpush_timeout.wav" + } + + "training.move_aircontrolspeed_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolspeed_start.wav" + } + + "training.move_aircontrolspeed02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolspeed02.wav" + } + + "training.move_aircontrolspeed_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolspeed_timeout.wav" + } + + "training.move_aircontrolbhop_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolbhop_start.wav" + } + + "training.move_aircontrolbhop02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolbhop02.wav" + } + + "training.move_aircontrolbhop_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_aircontrolbhop_timeout.wav" + } + + "training.move_bhop1_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_bhop1_start.wav" + } + + "training.move_bhop2_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_bhop2_start.wav" + } + + "training.move_bhop3_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_bhop3_start.wav" + } + + "training.move_bhop02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_bhop02.wav" + } + + "training.move_bhop_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_bhop_timeout.wav" + } + + "training.move_rampslide_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_rampslide_start.wav" + } + + "training.move_rampslide02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_rampslide02.wav" + } + + "training.move_rampslide_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_rampslide_timeout.wav" + } + + "training.move_trimp_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_trimp_start.wav" + } + + "training.move_trimp02" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_trimp02.wav" + } + + "training.move_trimp_timeout" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/move_trimp_timeout.wav" + } + + "training.all_scout_start" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/all_scout_start.wav" + } + + "training.all_scout_bronze" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/all_scout_bronze.wav" + } + + "training.all_scout_silver" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/all_scout_silver.wav" + } + + "training.all_scout_gold" + { + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_NONE" + "wave" "#*ff_training/all_scout_gold.wav" + } \ No newline at end of file diff --git a/scripts/game_sounds_ff_weapons.txt b/scripts/game_sounds_ff_weapons.txt new file mode 100644 index 0000000..b10e7aa --- /dev/null +++ b/scripts/game_sounds_ff_weapons.txt @@ -0,0 +1,807 @@ +//---------------- +//Stuff I shouldn't be fiddling with... +//---------------- +// ATTN_NONE 0.0f +// ATTN_NORM 0.8f +// ATTN_IDLE 2.0f +// ATTN_STATIC 1.25f +// ATTN_RICOCHET 1.5f +// ATTN_GUNFIRE 0.27f +// +// Most Guns: ~0.6 +// Silenced: ~1.6 +// Sniper Rifle: ~0.3 + +//================================== +//Sounds that go BOOM! Fortress Forever ;D Whoa! Was that a Gazelle?... +//================================== + +//---------------- +//Generic +//---------------- + + "Weapon.Empty" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\weapon_empty.wav" + } + "generic.Empty" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "player\outofammo.wav" + } + "Weapon.StopSound" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "common/null.wav" + } + +//---------------- +//Projectiles, things that go whizzzzzzzzzz-THUDszzz! +//---------------- + "sniper.hit" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\sniper_hit3.wav" + + } + "sniper.gib" + { + "channel" "CHAN_BODY" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "rndwave" + { + "wave" "weapons\fx\bullets\sniper_gib1.wav" + "wave" "weapons\fx\bullets\sniper_gib2.wav" + } + } + "rocket.fly" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "rndwave" + { + "wave" "weapons\fx\bullets\rpg_away1.wav" + "wave" "weapons\fx\bullets\rpg_away2.wav" + "wave" "weapons\fx\bullets\rpg_away3.wav" + "wave" "weapons\fx\bullets\rpg_away4.wav" + } + } + "nail.fly" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\nail_fly.wav" + } + "dart.fly" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\dart_fly.wav" + } + "Rail.Fly" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "158,162" + "wave" "npc/scanner/combat_scan_loop2.wav" + } + "Rail.hitworld" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\rail_hit.wav" + } + "Rail.hitbody" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\rail_body.wav" + } + "Rail.Bounce1" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "144" + "wave" "weapons/crossbow/bolt_fly4.wav" + } + "Rail.Bounce2" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "160" + "wave" "weapons/crossbow/bolt_fly4.wav" + } + "Nail.hitworld" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "rndwave" + { + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + } + } + "Nail.hitbody" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "rndwave" + { + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + "wave" "common/null.wav" + } + } + "Dart.hitworld" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\dart_hit.wav" + } + "Dart.hitbody" + { + "channel" "CHAN_STATIC" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons\fx\bullets\dart_body.wav" + } +//---------------- +//Assault Cannon +//---------------- + "assaultcannon.overheat" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" ")weapons/assaultcannon/overheat.wav" + } + "assaultcannon.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "pitch" "95,105" + "wave" "weapons/assaultcannon/assaultcannon_fire.wav" + } + "assaultcannon.rotate" + { + "channel" "CHAN_AUTO" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "wave" ")weapons/assaultcannon/assaultcannon_rotate.wav" + } + "assaultcannon.winddown" + { + "channel" "CHAN_WEAPON" + "volume" "0.5" + "CompatibilityAttenuation" "0.7" + "wave" ")weapons/assaultcannon/assaultcannon_winddown.wav" + } + "assaultcannon.windup" + { + "channel" "CHAN_WEAPON" + "volume" "0.5" + "CompatibilityAttenuation" "0.7" + "wave" ")weapons/assaultcannon/assaultcannon_windup.wav" + } +//---------------- +//Crowbar, when hope is forgotten the crowbar is there. +//---------------- + "crowbar.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/crowbar/crowbar_miss1.wav" + "wave" "weapons/crowbar/crowbar_miss2.wav" + } + } +//---------------- +//Flamethrower, whooooosshhhhh +//---------------- + "flamethrower.loop_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "pitch" "95,105" + "wave" "weapons/flamethrower/flamethrower_fire3.wav" + } + "flamethrower.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "pitch" "95,105" + "wave" "weapons/flamethrower/flamethrower_fire3.wav" + } + "flamethrower.start" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "pitch" "95,105" + "wave" "weapons/flamethrower/flamethrower_start.wav" + } + "flamethrower.deploy" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/flamethrower/flamethrower_deploy.wav" + } +//---------------- +//Knife, don't turn your back on me... +//---------------- + "knife.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/knife/swing1.wav" + "wave" "weapons/knife/swing2.wav" + } + } + "knife.deploy" + { + "channel" "CHAN_ITEM" + "volume" "0.7" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/knife/deploy.wav" + } + "knife.slash" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/fx/impacts/flesh/knife_slash1.wav" + "wave" "weapons/fx/impacts/flesh/knife_slash2.wav" + "wave" "weapons/fx/impacts/flesh/knife_slash3.wav" + } + } +//---------------- +//Medkit, Go get em' Medic +//---------------- + "medkit.hit" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/medkit/medkit_hit1.wav" + "wave" "weapons/medkit/medkit_hit2.wav" + } + } + "medkit.infect" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.8" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/medkit/medkit_infect1.wav" + "wave" "weapons/medkit/medkit_infect2.wav" + } + } + "medkit.button1" + { + "channel" "CHAN_ITEM" + "volume" "0.4" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/medkit/medkit_button1.wav" + } + "medkit.button2" + { + "channel" "CHAN_ITEM" + "volume" "0.4" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/medkit/medkit_button2.wav" + } + "medkit.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "0.7" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/medkit/medkit_single1.wav" + "wave" "weapons/medkit/medkit_single2.wav" + } + } +//---------------- +//Nailgun +//---------------- + "nailgun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/nailgun/nailgun_fire1.wav" + } +//---------------- +//SuperNailGun, oooo. +//---------------- + "SuperNailgun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/supernailgun/supernailgun_fire.wav" + } + "SuperNailgun.barrel_spin" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "common/null.wav" + } +//---------------- +//Pipelauncher, You call THAT a six-shooter? THIS is a six-shooter... +//---------------- + "Pipelauncher.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + "wave" "weapons/pipelauncher/pipe_fire1.wav" + } + "Grenadelauncher.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + "wave" "weapons/pipelauncher/pipe_fire1.wav" + } + "GLPL.reload" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/pipelauncher/pipe_reload.wav" + } + "GLPL.reload_open" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/pipelauncher/pipe_reload_open.wav" + } + "GLPL.reload_close" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/pipelauncher/pipe_reload_close.wav" + } + "GrenadeProjectile.Bounce" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/pipelauncher/pipe_bounce1.wav" + } +//---------------- +//Railgun, poor thing, you kicked arse in Quake 3 +//---------------- + "railgun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/railgun/railgun_fire1.wav" + } + "railgun.charged_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/railgun/railgun_chargedfire1.wav" + } + "railgun.chargeloop" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/railgun/railgun_chargeloop.wav" + } + "railgun.halfcharge" + { + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "1.0" + "wave" "ambient/energy/zap8.wav" + } + "railgun.fullcharge" + { + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "1.0" + "wave" "ambient/energy/zap9.wav" + } + "railgun.overcharge" + { + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + "CompatibilityAttenuation" "1.0" + "wave" "ambient/energy/zap5.wav" + } +//---------------- +//Rocket Launcher, you exist in every single game. Ever. +//---------------- + "rpg.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/rpg/rpg_fire_01.wav" + "wave" "weapons/rpg/rpg_fire_02.wav" + "wave" "weapons/rpg/rpg_fire_03.wav" + } + } + "rpg.empty" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "common/null.wav" + } + "rpg.reload" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.reload1" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.reload2" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.reload3" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.reload4" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.slide1" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.slide2" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.slide3" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } + "rpg.slide4" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "PITCH_NORM" + "wave" "weapons/rpg/rpg_reload.wav" + } +//---------------- +//Incendiary Cannon, I love the smell of Napalm in the morning +//---------------- + "ic.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" +// "pitch" "95,105" + "wave" "weapons/incendiarycannon/ic_fire02.wav" + } + "ic.cocky" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + "wave" "weapons/incendiarycannon/ic_reload01.wav" + } + "ic.empty" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "common/null.wav" + } +//---------------- +//Scout Radar, uh no lookout! He has a raaaddaarrrrr +//---------------- + "radar.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.3" + "pitch" "95,105" + "wave" "weapons/scout/scout_radar.wav" + } +//---------------- +//HWGuy Overpressure +//---------------- + "overpressure.explode" + { + "channel" "CHAN_AUTO" + "volume" "1.0" + "CompatibilityAttenuation" "1.3" + "pitch" "95,105" + "wave" "weapons/physcannon/energy_sing_explosion2.wav" + } +//---------------- +//Shotgun, proving your worth again and again since the west was won. +//---------------- + "shotgun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/shotgun/shotgun_fire.wav" + } + "shotgun.reload" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/shotgun/shotgun_reload.wav" + } + "shotgun.cock" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/supershotgun/supershotgun_cock.wav" + } +//---------------- +//SuperShotgun, to the rescue +//---------------- + "SuperShotgun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "pitch" "95,105" + "wave" "weapons/supershotgun/supershotgun_fire.wav" + } + "SuperShotgun.reload" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/supershotgun/supershotgun_reload.wav" + } + "SuperShotgun.cock" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/shotgun/shotgun_cock.wav" + } +//---------------- +//Sniper Rifle, Let's see some Pink Mist. +//---------------- + "SniperRifle.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + "wave" "weapons/sniperrifle/sniperrifle_fire1.wav" + } + "SniperRifle.charged_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.4" + "pitch" "95,105" + "wave" "weapons/sniperrifle/sniperrifle_chargedfire1.wav" + } + "SniperRifle.zoom_in" + { + "channel" "CHAN_ITEM" + "volume" "0.2" + "CompatibilityAttenuation" "2.0" + "wave" "weapons/sniperrifle/sniperrifle_zoomin.wav" + } + "SniperRifle.zoom_out" + { + "channel" "CHAN_ITEM" + "volume" "0.2" + "CompatibilityAttenuation" "2.0" + "wave" "weapons/sniperrifle/sniperrifle_zoomout.wav" + } +//---------------- +//Auto Rifle, trying to make the snipers feel like they have a viable cq weapon. +//---------------- + "autorifle.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.5" + "pitch" "95,105" + "wave" "weapons/autorifle/autorifle_fire.wav" + } +//---------------- +//Tommy Gun, rocking and rolling since the 19th century. +//---------------- + "tommygun.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.6" + "pitch" "95,105" + "wave" "weapons/tommygun/tommygun_fire.wav" + } +//---------------- +//Spanner +//---------------- + "Spanner.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + + "rndwave" + { + "wave" "weapons/spanner/spanner_swing1.wav" + "wave" "weapons/spanner/spanner_swing2.wav" + } + } + "Spanner.HitSG" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "pitch" "95,105" + "wave" "weapons/spanner/spanner_sg1.wav" + + } + "Spanner.HitDispenser" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "0.7" + "pitch" "95,105" + "wave" "weapons/spanner/spanner_sg1.wav" + } + "Spanner.idle" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/spanner/spanner_idle.wav" + } + "Spanner.specialhit" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/spanner/spanner_specialhit.wav" + } +//---------------- +//Tranquilizer, go most useless Team Fortress gun! +//---------------- + "Tranq.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.3" + "pitch" "95,105" + "wave" "weapons/tranq/tranq_fire1.wav" + } + + "Tranq.cock" + { + "channel" "CHAN_ITEM" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "wave" "weapons/tranq/tranq_cock.wav" + } +//---------------- +//Umbrella, take the fight back to them Winston! +//---------------- + "umbrella.single_shot" + { + "channel" "CHAN_WEAPON" + "volume" "1.0" + "CompatibilityAttenuation" "1.0" + "pitch" "95,105" + "wave" "weapons/umbrella/umbrella_miss.wav" + } \ No newline at end of file diff --git a/scripts/game_sounds_items.txt b/scripts/game_sounds_items.txt new file mode 100644 index 0000000..e94bad8 --- /dev/null +++ b/scripts/game_sounds_items.txt @@ -0,0 +1,227 @@ +//********************************************************* +// HL2 Item sounds + +"ItemBattery.Touch" +{ + "channel" "CHAN_ITEM" + "volume" "1" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/battery_pickup.wav" +} + +"HealthKit.Touch" +{ + "channel" "CHAN_ITEM" + "volume" "1" + "soundlevel" "SNDLVL_75dB" + + "wave" "player/smallmedkit1.wav" +} + +"HealthVial.Touch" +{ + "channel" "CHAN_ITEM" + "volume" "1" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/smallmedkit1.wav" +} + +"WallHealth.Deny" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/medshotno1.wav" +} + +"WallHealth.Start" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/medshot4.wav" +} + +"WallHealth.LoopingContinueCharge" +{ + "channel" "CHAN_STATIC" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/medcharge4.wav" +} + +"WallHealth.Recharge" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/medshot4.wav" +} + +"SuitRecharge.Deny" +{ + "channel" "CHAN_ITEM" + "volume" "0.75" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/suitchargeno1.wav" +} + +"SuitRecharge.Start" +{ + "channel" "CHAN_ITEM" + "volume" "0.75" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/suitchargeok1.wav" +} + +"SuitRecharge.ChargingLoop" +{ + "channel" "CHAN_STATIC" + "volume" "0.75" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/suitcharge1.wav" +} + +"AmmoCrate.Open" +{ + "channel" "CHAN_STATIC" + "volume" "0.45" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/ammocrate_open.wav" +} + +"AmmoCrate.Close" +{ + "channel" "CHAN_STATIC" + "volume" "0.45" + "soundlevel" "SNDLVL_75dB" + + "wave" "items/ammocrate_close.wav" +} + +"ExtinguisherCharger.Use" +{ + "channel" "CHAN_ITEM" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_NORM" + + "wave" "items/medshot4.wav" +} + + +"SprayCan.Paint" +{ + "channel" "CHAN_VOICE" + "volume" "1" + "soundlevel" "SNDLVL_75dB" + + "wave" "player/sprayer.wav" +} + +"Flare.Touch" +{ + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_NORM" + + "wave" "weapons/flaregun/impact.wav" +} + +"Item.Materialize" +{ + "channel" "CHAN_WEAPON" + "volume" "1" + "soundlevel" "SNDLVL_75dB" + "pitch" "150" + + "wave" "player/suitchargeok1.wav" +} + +"Doll.Squeak" +{ + "channel" "CHAN_STATIC" + "volume" ".5" + "soundlevel" "SNDLVL_75dB" + "pitch" "PITCH_NORM" + + "wave" "ambient/creatures/teddy.wav" +} +// ********************************** +// OBSOLETE: player viewpoint missile + +"Missile.Accelerate" +{ + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_NORM" + + "wave" "weapons/rpg/rocket1.wav" +} + +"Missile.Ignite" +{ + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_90dB" + + "wave" "weapons/rpg/rocket1.wav" +} + +"Missile.ShotDown" +{ + "channel" "CHAN_VOICE" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_90dB" + + "wave" "weapons/rpg/shotdown.wav" +} + +// ************************** +// OBSOLETE: portable thumper + +"PortableThumper.ThumpSound" +{ + "channel" "CHAN_WEAPON" + "volume" "VOL_NORM" + "pitch" "PITCH_NORM" + + "soundlevel" "SNDLVL_NORM" + + "wave" "ambient/machines/thumper_dust.wav" +} + +"Combine_Console.Detach" +{ + "channel" "CHAN_STATIC" + "volume" "VOL_NORM" + "pitch" "95, 105" + + "soundlevel" "SNDLVL_105dB" + + "rndwave" + { + "wave" "physics/metal/metal_box_break1.wav" + "wave" "physics/metal/metal_box_break2.wav" + } +} + diff --git a/scripts/game_sounds_manifest.txt b/scripts/game_sounds_manifest.txt new file mode 100644 index 0000000..9eda068 --- /dev/null +++ b/scripts/game_sounds_manifest.txt @@ -0,0 +1,104 @@ +game_sounds_manifest +{ + // FF game sounds + // remember the "_ff_" when adding new game_sounds*.txt files + "precache_file" "scripts/game_sounds_ff.txt" + "precache_file" "scripts/game_sounds_ff_misc.txt" + "precache_file" "scripts/game_sounds_ff_buildable.txt" + "precache_file" "scripts/game_sounds_ff_grenades.txt" + "precache_file" "scripts/game_sounds_ff_player.txt" + "precache_file" "scripts/game_sounds_ff_weapons.txt" + "precache_file" "scripts/game_sounds_ff_radio.txt" + "precache_file" "scripts/game_sounds_ff_items.txt" + "precache_file" "scripts/game_sounds_ff_training.txt" + + // Map-specific FF game sounds + // Place in "maps" folder with the filename as _level_sounds.txt + // Let's leave these map ones commented so we can kinda + // force ourselves to make the autoloading map-specific level_sounds system + //"precache_file" "maps/ff_dev_test_sounds_level_sounds.txt" + //"precache_file" "maps/ff_hunted_level_sounds.txt" + + // Put your map's level_sounds txt file in "FortressForever\maps" and give it the + // EXACT SAME NAME AS YOUR MAP's FILENAME followed by _level_sounds.txt + // IE: FortressForever\maps\_level_sounds.txt + // IE: FortressForever\maps\ff_2fort_level_sounds.txt + + ////////////////////////////////////////////////////// + // HL2 game sounds (located in "source engine.gcf") // + ////////////////////////////////////////////////////// + + "precache_file" "scripts/game_sounds.txt" + "precache_file" "scripts/game_sounds_ui.txt" + "precache_file" "scripts/game_sounds_player.txt" + + // Weapon sounds + "precache_file" "scripts/game_sounds_weapons.txt" + + // HL2 World, Ambient Generic, Items, Physics, Vehicles + "precache_file" "scripts/game_sounds_world.txt" + "precache_file" "scripts/game_sounds_ambient_generic.txt" + "precache_file" "scripts/game_sounds_items.txt" + "precache_file" "scripts/game_sounds_physics.txt" + "precache_file" "scripts/game_sounds_vehicles.txt" + + // E3 level sounds + "precache_file" "scripts/level_sounds_e3_c17.txt" + "precache_file" "scripts/level_sounds_e3_town.txt" + "precache_file" "scripts/level_sounds_e3_bugbait.txt" + + // Game level sounds + "precache_file" "scripts/level_sounds_eli_lab.txt" + "precache_file" "scripts/level_sounds_trainyard.txt" + "precache_file" "scripts/level_sounds_k_lab.txt" + "precache_file" "scripts/level_sounds_k_lab2.txt" + "precache_file" "scripts/level_sounds_coast.txt" + "precache_file" "scripts/level_sounds_novaprospekt.txt" + "precache_file" "scripts/level_sounds_streetwar.txt" + "precache_file" "scripts/level_sounds_streetwar2.txt" + "precache_file" "scripts/level_sounds_breencast.txt" + "precache_file" "scripts/level_sounds_citadel.txt" + "precache_file" "scripts/level_sounds_canals.txt" + "precache_file" "scripts/level_sounds_ravenholm.txt" + "precache_file" "scripts/level_sounds_ravenholm2.txt" + "precache_file" "scripts/level_sounds_canals2.txt" + //Music Tracks + "precache_file" "scripts/level_sounds_music.txt" + + + // NPC Sounds + "precache_file" "scripts/npc_sounds_eli.txt" + "precache_file" "scripts/npc_sounds_alyx.txt" + "precache_file" "scripts/npc_sounds_dog.txt" + "precache_file" "scripts/npc_sounds_citizen.txt" + "precache_file" "scripts/npc_sounds_barney.txt" + "precache_file" "scripts/npc_sounds_soldier.txt" + "precache_file" "scripts/npc_sounds_strider.txt" + "precache_file" "scripts/npc_sounds_zombie.txt" + "precache_file" "scripts/npc_sounds_vortigaunt.txt" + "precache_file" "scripts/npc_sounds_turret.txt" + "precache_file" "scripts/npc_sounds_scanner.txt" + "precache_file" "scripts/npc_sounds_rollermine.txt" + "precache_file" "scripts/npc_sounds_poisonzombie.txt" + "precache_file" "scripts/npc_sounds_metropolice.txt" + "precache_file" "scripts/npc_sounds_combinecamera.txt" + "precache_file" "scripts/npc_sounds_manhack.txt" + "precache_file" "scripts/npc_sounds_ichthyosaur.txt" + "precache_file" "scripts/npc_sounds_blackheadcrab.txt" + "precache_file" "scripts/npc_sounds_fastheadcrab.txt" + "precache_file" "scripts/npc_sounds_headcrab.txt" + "precache_file" "scripts/npc_sounds_fastzombie.txt" + "precache_file" "scripts/npc_sounds_birds.txt" + "precache_file" "scripts/npc_sounds_gunship.txt" + "precache_file" "scripts/npc_sounds_dropship.txt" + "precache_file" "scripts/npc_sounds_barnacle.txt" + "precache_file" "scripts/npc_sounds_attackheli.txt" + "precache_file" "scripts/npc_sounds_antlionguard.txt" + "precache_file" "scripts/npc_sounds_antlion.txt" + "precache_file" "scripts/npc_sounds_env_headcrabcanister.txt" + "precache_file" "scripts/npc_sounds_combine_ball.txt" + "precache_file" "scripts/npc_sounds_combine_mine.txt" + "precache_file" "scripts/npc_sounds_sniper.txt" + "precache_file" "scripts/npc_sounds_stalker.txt" + "precache_file" "scripts/npc_sounds_gman.txt" +} diff --git a/scripts/game_sounds_weapons.txt b/scripts/game_sounds_weapons.txt new file mode 100644 index 0000000..a83689d --- /dev/null +++ b/scripts/game_sounds_weapons.txt @@ -0,0 +1,1476 @@ +// +// HL2 Weapons +// + + +// ******* +// BULLETS +// + +"Bullets.DefaultNearmiss" +{ + "channel" "CHAN_STATIC" + "volume" "0.7" + "soundlevel" "SNDLVL_140dB" + "pitch" "PITCH_NORM" + +"rndwave" + { + "wave" ">weapons/fx/nearmiss/bulletLtoR03.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR04.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR06.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR07.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR09.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR10.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR13.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR14.wav" + } +} + +"Bullets.GunshipNearmiss" +{ + "channel" "CHAN_STATIC" + "volume" "0.7" + "soundlevel" "SNDLVL_140dB" + "pitch" "50" + +"rndwave" + { + "wave" ">weapons/fx/nearmiss/bulletLtoR03.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR04.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR05.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR06.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR11.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR12.wav" + } +} + +"Bullets.StriderNearmiss" +{ + "channel" "CHAN_STATIC" + "volume" "0.7" + "soundlevel" "SNDLVL_120dB" + "pitch" "75" + +"rndwave" + { + "wave" ">weapons/fx/nearmiss/bulletLtoR11.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR13.wav" + "wave" ">weapons/fx/nearmiss/bulletLtoR14.wav" + } +} + +"FX_RicochetSound.Ricochet" +{ + "channel" "CHAN_STATIC" + "volume" "0.5, 0.6" + "soundlevel" "SNDLVL_80dB" + "pitch" "90, 110" + +"rndwave" + { + "wave" "weapons/fx/rics/ric1.wav" + "wave" "weapons/fx/rics/ric2.wav" + "wave" "weapons/fx/rics/ric3.wav" + "wave" "weapons/fx/rics/ric4.wav" + "wave" "weapons/fx/rics/ric5.wav" + } +} + +"FuncTank.Fire" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_130dB" + "pitch" "100, 120" + +"rndwave" + { + "wave" "weapons/ar1/ar1_1.wav" + "wave" "weapons/ar1/ar1_2.wav" + } +} + +// ******* +// WEAPONS +// weapon_ar2.txt + +"Weapon_AR2.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_empty.wav" +} + +"Weapon_AR2.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_reload.wav" +} + +"Weapon_AR2.Reload_Rotate" +{ + "channel" "CHAN_ITEM" + "volume" "0.9" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_reload_rotate.wav" +} + +"Weapon_AR2.Reload_Push" +{ + "channel" "CHAN_ITEM" + "volume" "0.9" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_reload_push.wav" +} +"Weapon_AR2.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.8" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "85,95" + +"rndwave" + { + "wave" "weapons/ar2/fire1.wav" + } +} + +"Weapon_AR2.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomin.wav" +} + +"Weapon_AR2.Special2" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomout.wav" +} + +"Weapon_AR2.Double" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/ar2/ar2_altfire.wav" +} + +"Weapon_AR2.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/npc_ar2_reload.wav" +} + +"Weapon_AR2.NPC_Double" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/ar2/npc_ar2_altfire.wav" +} + +"Weapon_AR2.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "95,105" + //"wave" "^weapons/ar2/npc_ar2_fire1.wav" + "wave" "^weapons/ar1/ar1_dist1.wav" +} + +"Weapon_functank.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "95,105" + "wave" "^weapons/ar1/ar1_dist1.wav" + +} + +// +// weapon_binoculars.txt +// + +"Weapon_Binoculars.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/binoculars/binoculars_zoomin.wav" +} + +"Weapon_Binoculars.Special2" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/binoculars/binoculars_zoomout.wav" +} + +"Weapon_Binoculars.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/binoculars/binoculars_zoommax.wav" +} + +// +// weapon_brickbat.txt +// + +"Weapon_Brickbat.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "physics/wood/wood_box_impact_hard1.wav" +} + +"Weapon_Bugbait.Splat" +{ + "channel" "CHAN_WEAPON" + "volume" "0.75" + "soundlevel" "SNDLVL_75dB" + "pitch" "90,115" + +"rndwave" + { + "wave" "weapons/bugbait/bugbait_squeeze1.wav" + "wave" "weapons/bugbait/bugbait_squeeze2.wav" + "wave" "weapons/bugbait/bugbait_squeeze3.wav" + } +} + +"Weapon_CombineGuard.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/cguard/charging.wav" +} + +// +// weapon_crowbar.txt +// + +"Weapon_Crowbar.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_105dB" + "pitch" "95,100" + + "wave" "weapons/iceaxe/iceaxe_swing1.wav" +} + +"Weapon_Crowbar.Melee_Hit" +{ + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_105dB" + "pitch" "98,102" + +"rndwave" + { + "wave" "weapons\fx\impacts\flesh\crowbar_hit1.wav" + "wave" "weapons\fx\impacts\flesh\crowbar_hit2.wav" + "wave" "weapons\fx\impacts\flesh\crowbar_hit3.wav" + } +} + +"Weapon_Crowbar.Melee_HitWorld" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_90dB" + "pitch" "90,120" + +"rndwave" + { + "wave" "weapons/crowbar/crowbar_impact1.wav" + "wave" "weapons/crowbar/crowbar_impact2.wav" + } +} + +// +// weapon_extinguisher.txt +// + +"Weapon_Extinguisher.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_empty.wav" +} + +"Weapon_Extinguisher.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_reload.wav" +} + +"Weapon_Extinguisher.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/extinguisher/fire1.wav" +} + +"Weapon_Extinguisher.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/extinguisher/release1.wav" +} + +"Weapon_Extinguisher.Double" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/ar2/ar2_altfire.wav" +} + +"Weapon_Extinguisher.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "pitch" "95,105" + "wave" "weapons/ar2/npc_ar2_fire1.wav" +} + + +"Weapon_Extinguisher.NPC_Double" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/ar2/npc_ar2_altfire.wav" +} + +"Weapon_Extinguisher.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/npc_ar2_reload.wav" +} + +// +// weapon_flaregun.txt +// + +"Weapon_FlareGun.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/flaregun/fire.wav" +} + +"Weapon_FlareGun.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/flaregun/reload.wav" +} + +"Weapon_FlareGun.Burn" +{ + "channel" "CHAN_WEAPON" + "soundlevel" "SNDLVL_NORM" + "volume" "0.65" + "wave" "weapons/flaregun/burn.wav" +} + +// +// weapon_gauss.txt +// + +"Weapon_Gauss.ChargeLoop" +{ + "channel" "CHAN_STATIC" + "volume" "VOL_NORM" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/gauss/chargeloop.wav" +} + +// +// weapon_irifle.txt +// + +"Weapon_IRifle.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/ar2/ar2_empty.wav" +} + +"Weapon_IRifle.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/irifle/irifle_fire2.wav" +} + +// +// weapon_physcannon.txt +// + +"Weapon_PhysCannon.Launch" +{ + "channel" "CHAN_WEAPON" + "volume" "0.57" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "110,120" + +"rndwave" + { + "wave" "weapons/physcannon/superphys_launch1.wav" + "wave" "weapons/physcannon/superphys_launch2.wav" + "wave" "weapons/physcannon/superphys_launch4.wav" + } +} + +"Weapon_MegaPhysCannon.Launch" +{ + "channel" "CHAN_WEAPON" + "volume" "0.6" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "130,140" + +"rndwave" + { + "wave" "weapons/physcannon/superphys_launch1.wav" + "wave" "weapons/physcannon/superphys_launch2.wav" + "wave" "weapons/physcannon/superphys_launch3.wav" + "wave" "weapons/physcannon/superphys_launch4.wav" + } +} + +"Weapon_PhysCannon.Charge" +{ + "channel" "CHAN_ITEM" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physcannon/physcannon_charge.wav" +} + +"Weapon_MegaPhysCannon.Charge" +{ + "channel" "CHAN_ITEM" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "pitch" "70,80" + "wave" "weapons/physcannon/physcannon_charge.wav" +} + +"Weapon_PhysCannon.DryFire" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physcannon/physcannon_dryfire.wav" +} + +"Weapon_MegaPhysCannon.DryFire" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "pitch" "70,80" + "wave" "weapons/physcannon/physcannon_dryfire.wav" +} + +"Weapon_PhysCannon.Pickup" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/physcannon/physcannon_pickup.wav" +} + +"Weapon_MegaPhysCannon.Pickup" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_105dB" + "pitch" "70,80" + "wave" "weapons/physcannon/physcannon_pickup.wav" +} + +"Weapon_PhysCannon.OpenClaws" +{ + "channel" "CHAN_VOICE" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physcannon/physcannon_claws_open.wav" +} + +"Weapon_PhysCannon.CloseClaws" +{ + "channel" "CHAN_VOICE" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physcannon/physcannon_claws_close.wav" +} + +"Weapon_PhysCannon.Drop" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_105dB" + "wave" "weapons/physcannon/physcannon_drop.wav" +} + +"Weapon_MegaPhysCannon.Drop" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_105dB" + "pitch" "50,60" + "wave" "weapons/physcannon/physcannon_drop.wav" +} + +"Weapon_PhysCannon.HoldSound" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physcannon/hold_loop.wav" +} + +"Weapon_MegaPhysCannon.HoldSound" +{ + "channel" "CHAN_STATIC" + "volume" "0.8" + "soundlevel" "SNDLVL_NORM" + "pitch" "100" + "wave" "weapons/physcannon/superphys_hold_loop.wav" +} + +"Weapon_MegaPhysCannon.ChargeZap" +{ + "channel" "CHAN_VOICE" + "volume" "0.1" + "soundlevel" "SNDLVL_NORM" + "pitch" "90,110" + +"rndwave" + { + "wave" "weapons/physcannon/superphys_small_zap1.wav" + "wave" "weapons/physcannon/superphys_small_zap2.wav" + "wave" "weapons/physcannon/superphys_small_zap3.wav" + "wave" "weapons/physcannon/superphys_small_zap4.wav" + } +} + +"Weapon_PhysCannon.TooHeavy" +{ + "channel" "CHAN_WEAPON" + "volume" "0.8" + "soundlevel" "SNDLVL_NORM" + "pitch" "100" + "wave" "weapons/physcannon/physcannon_tooheavy.wav" +} + +// +// weapon_physgun.txt +// + +"Weapon_Physgun.On" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physgun_on.wav" +} + +"Weapon_Physgun.Off" +{ + "channel" "CHAN_ITEM" + "volume" "0.42" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physgun_off.wav" +} + +"Weapon_Physgun.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.42" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/flaregun/impact.wav" +} + + +"Weapon_Physgun.LockedOn" +{ + "channel" "CHAN_STATIC" + "volume" "0.5" + "soundlevel" "SNDLVL_NORM" + "pitch" "90" + "wave" "weapons/physgun_loop1.wav" +} + +"Weapon_Physgun.Scanning" +{ + "channel" "CHAN_STATIC" + "volume" "0.5" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physgun_loop2.wav" +} + +"Weapon_Physgun.LightObject" +{ + "channel" "CHAN_STATIC" + "volume" "0.1" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physgun_loop3.wav" +} + +"Weapon_Physgun.HeavyObject" +{ + "channel" "CHAN_STATIC" + "volume" "0.1" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/physgun_loop4.wav" +} + +// +// weapon_pistol.txt +// + +"Weapon_Pistol.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/pistol/pistol_reload1.wav" +} + +"Weapon_Pistol.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/smg1_reload.wav" +} + +"Weapon_Pistol.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/pistol/pistol_empty.wav" +} + +"Weapon_Pistol.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,102" + "wave" "weapons/pistol/pistol_fire2.wav" +} + +"Weapon_Pistol.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "90,120" + "wave" "^weapons/pistol/pistol_fire3.wav" +} + +"Weapon_Pistol.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/switch_single.wav" +} + +"Weapon_Pistol.Special2" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/switch_burst.wav" +} + +"Weapon_Pistol.Burst" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,105" + "wave" "^weapons/smg1/smg1_fireburst1.wav" +} + +// +// weapon_rpg.txt +// + +"Weapon_RPG.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/rpg/rocketfire1.wav" +} + +"Weapon_RPG.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/rpg/rocketfire1.wav" +} + +"Weapon_RPG.LaserOn" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomin.wav" +} + +"Weapon_RPG.LaserOff" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomout.wav" +} + +// +// weapon_shotgun.txt +// + +"Weapon_Shotgun.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "pitch" "95,100" + "wave" "weapons/shotgun/shotgun_empty.wav" +} + +"Weapon_Shotgun.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + +"rndwave" + { + "wave" "weapons/shotgun/shotgun_reload1.wav" + "wave" "weapons/shotgun/shotgun_reload2.wav" + "wave" "weapons/shotgun/shotgun_reload3.wav" + } +} + +"Weapon_Shotgun.Special1" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/shotgun/shotgun_cock.wav" +} + +"Weapon_Shotgun.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.86" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,101" + +"rndwave" + { + //"wave" "weapons/shotgun/shotgun_fire2.wav" + //"wave" "weapons/shotgun/shotgun_fire6.wav" + "wave" "weapons/shotgun/shotgun_fire7.wav" + } +} + +"Weapon_Shotgun.Double" +{ + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "90,95" + "wave" "weapons/shotgun/shotgun_dbl_fire7.wav" +} + +"Weapon_Shotgun.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + +"rndwave" + { + "wave" "weapons/shotgun/shotgun_reload1.wav" + "wave" "weapons/shotgun/shotgun_reload2.wav" + "wave" "weapons/shotgun/shotgun_reload3.wav" + } +} + +"Weapon_Shotgun.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.95" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,101" + "wave" "weapons/shotgun/shotgun_fire6.wav" +} + +// +// weapon_smg1.txt +// + +"Weapon_SMG1.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/smg1_reload.wav" +} + +"Weapon_SMG1.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/smg1_reload.wav" +} + +"Weapon_SMG1.Empty" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/pistol/pistol_empty.wav" +} + +"Weapon_SMG1.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.55" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "95,105" + "wave" "weapons/smg1/smg1_fire1.wav" +} + +"Weapon_SMG1.Double" +{ + "channel" "CHAN_WEAPON" + "volume" "0.61" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "weapons/ar2/ar2_altfire.wav" +} + + +"Weapon_SMG1.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "95,105" + "wave" "^weapons/smg1/npc_smg1_fire1.wav" +} + +"Weapon_SMG1.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/switch_single.wav" +} + +"Weapon_SMG1.Special2" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/smg1/switch_burst.wav" +} + +"Weapon_SMG1.Burst" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,105" + "wave" "^weapons/smg1/smg1_fire1.wav" +} + +// +// weapon_sniperrifle.txt +// + +"Weapon_SniperRifle.Special1" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomin.wav" +} + +"Weapon_SniperRifle.Special2" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_zoomout.wav" +} + +"Weapon_SniperRifle.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_reload.wav" +} + +"Weapon_SniperRifle.NPC_Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/sniper/sniper_reload.wav" +} + +"Weapon_SniperRifle.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,102" + "wave" "weapons/sniper/sniper_fire.wav" +} + +"Weapon_SniperRifle.NPC_Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "98,102" + "wave" "weapons/sniper/sniper_fire.wav" +} + +"Weapon_StunStick.Swing" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "pitch" "95,102" + +"rndwave" + { + "wave" "weapons/stunstick/stunstick_swing1.wav" + "wave" "weapons/stunstick/stunstick_swing2.wav" + } +} + +"Weapon_StunStick.Melee_Miss" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + +"rndwave" + { + "wave" "weapons/stunstick/stunstick_swing1.wav" + "wave" "weapons/stunstick/stunstick_swing2.wav" + } +} + +"Weapon_StunStick.Melee_Hit" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "pitch" "98,102" + +"rndwave" + { + "wave" "weapons/stunstick/stunstick_fleshhit1.wav" + "wave" "weapons/stunstick/stunstick_fleshhit2.wav" + } +} + +"Weapon_StunStick.Melee_HitWorld" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_105dB" + "pitch" "98,102" + +"rndwave" + { + "wave" "weapons/stunstick/stunstick_impact1.wav" + "wave" "weapons/stunstick/stunstick_impact2.wav" + } +} + +"Weapon_StunStick.Activate" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "pitch" "98,102" + +"rndwave" + { + "wave" "weapons/stunstick/spark1.wav" + "wave" "weapons/stunstick/spark2.wav" + "wave" "weapons/stunstick/spark3.wav" + } +} + +"Weapon_StunStick.Deactivate" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "pitch" "98,102" + +"rndwave" + { + "wave" "weapons/stunstick/spark1.wav" + "wave" "weapons/stunstick/spark2.wav" + "wave" "weapons/stunstick/spark3.wav" + } +} + +"WeaponFrag.Throw" +{ + "channel" "CHAN_VOICE" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "weapons/slam/throw.wav" +} + +"WeaponFrag.Roll" +{ + "channel" "CHAN_VOICE" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + + "wave" "weapons/slam/throw.wav" +} + +"Weapon_Mortar.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "1.0" + "pitch" "90,110" + "soundlevel" "SNDLVL_GUNFIRE" + "wave" "^weapons/mortar/mortar_fire1.wav" +} + +"Weapon_Mortar.Incomming" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "pitch" "90,110" + "soundlevel" "SNDLVL_120dB" + "wave" "weapons/mortar/mortar_shell_incomming1.wav" +} + +"Weapon_Mortar.Impact" +{ + "channel" "CHAN_WEAPON" + "volume" "1.0" + "soundlevel" "SNDLVL_GUNFIRE" + +"rndwave" + { + "wave" "weapons/mortar/mortar_explode1.wav" + "wave" "weapons/mortar/mortar_explode2.wav" + "wave" "weapons/mortar/mortar_explode3.wav" + } +} + + +"Func_Tank.BeginUse" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/shotgun/shotgun_cock.wav" +} + +// +// weapon_357 +// + +"Weapon_357.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.93" + "soundlevel" "SNDLVL_GUNFIRE" + "pitch" "88,93" + +"rndwave" + { + "wave" "weapons/357/357_fire2.wav" + "wave" "weapons/357/357_fire3.wav" + } +} + +"Weapon_357.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/357/reload1.wav" +} + +"Weapon_357.OpenLoader" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/357/357_reload1.wav" +} + +"Weapon_357.RemoveLoader" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/357/357_reload4.wav" +} + +"Weapon_357.ReplaceLoader" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/357/357_reload3.wav" +} + +"Weapon_357.Spin" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/357/357_spin1.wav" +} + +// +// weapon_crossbow +// + +"Weapon_Crossbow.Single" +{ + "channel" "CHAN_WEAPON" + "volume" "0.61" + "soundlevel" "SNDLVL_NORM" + "pitch" "93,108" + "wave" "weapons/crossbow/fire1.wav" +} + +"Weapon_Crossbow.Reload" +{ + "channel" "CHAN_ITEM" + "volume" "0.7" + "pitch" "93,108" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/crossbow/reload1.wav" +} + +"Weapon_Crossbow.BoltFly" +{ + "channel" "CHAN_VOICE" + "volume" "0.6" + "pitch" "90,110" + "soundlevel" "SNDLVL_NORM" + "wave" "weapons/crossbow/bolt_fly4.wav" +} + +"Weapon_Crossbow.BoltElectrify" +{ + "channel" "CHAN_WEAPON" + "volume" "0.6" + "pitch" "93,108" + "soundlevel" "SNDLVL_NORM" + +"rndwave" + { + "wave" "weapons/crossbow/bolt_load1.wav" + "wave" "weapons/crossbow/bolt_load2.wav" + } +} + +"Weapon_Crossbow.BoltHitBody" +{ + "channel" "CHAN_BODY" + "volume" "0.7" + "pitch" "93,108" + "soundlevel" "SNDLVL_80db" + +"rndwave" + { + "wave" "weapons/crossbow/hitbod1.wav" + "wave" "weapons/crossbow/hitbod2.wav" + } +} + +"Weapon_Crossbow.BoltHitWorld" +{ + "channel" "CHAN_BODY" + "volume" ".95,1.0" + "pitch" "110,130" + "soundlevel" "SNDLVL_80db" + "wave" "weapons/crossbow/hit1.wav" +} + +"Weapon_Crossbow.BoltSkewer" +{ + "channel" "CHAN_STATIC" + "volume" "0.9" + "soundlevel" "SNDLVL_90db" + "pitch" "90,110" + "wave" "weapons/crossbow/bolt_skewer1.wav" + +} + +// ************* +// BASE GRENADES +// + +"BaseExplosionEffect.Sound" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_135dB" + "pitch" "PITCH_NORM" + +"rndwave" + { + "wave" "^grenades/Frag/explosion1.wav" + "wave" "^grenades/Frag/explosion2.wav" + "wave" "^grenades/Frag/explosion3.wav" + "wave" "^grenades/Frag/explosion4.wav" + } +} + +"WaterExplosionEffect.Sound" +{ + "channel" "CHAN_STATIC" + "volume" "1.0" + "soundlevel" "SNDLVL_140dB" + "pitch" "80,130" + +"rndwave" + { + "wave" "^weapons/underwater_explode3.wav" + "wave" "^weapons/underwater_explode4.wav" + } +} + +"BaseGrenade.Explode" +{ + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_85dB" + +"rndwave" + { + "wave" "^grenades/Frag/Debris1.wav" + "wave" "^grenades/Frag/Debris2.wav" + "wave" "^grenades/Frag/Debris3.wav" + } +} + +"BaseGrenade.StopSounds" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + "wave" "common/null.wav" +} + +"BaseGrenade.BounceSound" +{ + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_80dB" + "pitch" "90,110" + "wave" ")grenades/bounce.wav" +} + +"GrenadeBeam.HitSound" +{ + "channel" "CHAN_VOICE" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + +"rndwave" + { + "wave" "weapons/fx/rics/laser_ric1.wav" + "wave" "weapons/fx/rics/laser_ric2.wav" + "wave" "weapons/fx/rics/laser_ric3.wav" + } +} + +"GrenadeBottle.Detonate" +{ + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_75dB" + +"rndwave" + { + "wave" "physics/glass/glass_bottle_break2.wav" + } +} + +"GrenadeBugBait.Splat" +{ + "channel" "CHAN_WEAPON" + "volume" "0.9" + "soundlevel" "SNDLVL_80dB" + "pitch" "95,105" + +"rndwave" + { + "wave" "weapons/bugbait/bugbait_impact1.wav" + "wave" "weapons/bugbait/bugbait_impact3.wav" + } +} + +"GrenadeHomer.StopSounds" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + "wave" "common/null.wav" +} + +"Grenade_Molotov.Detonate" +{ + "channel" "CHAN_VOICE" + "volume" "1.0" + "soundlevel" "SNDLVL_75dB" + +"rndwave" + { + "wave" "physics/glass/glass_bottle_break2.wav" + } +} + +"GrenadePathfollower.StopSounds" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + "wave" "common/null.wav" +} + +"GrenadeScanner.StopSound" +{ + "channel" "CHAN_WEAPON" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + "wave" "common/null.wav" +} + +"TripwireGrenade.ShootRope" +{ + "channel" "CHAN_BODY" + "volume" "0.7" + "soundlevel" "SNDLVL_75dB" + "pitch" "100" + "wave" "weapons/tripwire/ropeshoot.wav" +} + +// +// Alyx's EMP effect +// + +"AlyxEMP.Charge" +{ + "channel" "CHAN_WEAPON" + "volume" "0.65" + "soundlevel" "SNDLVL_90dB" + "pitch" "100,120" + //"wave" "weapons/stunstick/alyx_stunner_charge2.wav" + "wave" "weapons/stunstick/alyx_stunner2.wav" +} + +"AlyxEMP.Discharge" +{ + "channel" "CHAN_WEAPON" + "volume" "0.65" + "soundlevel" "SNDLVL_90dB" + "pitch" "100,120" + +"rndwave" + { + "wave" "weapons/stunstick/alyx_stunner1.wav" + "wave" "weapons/stunstick/alyx_stunner2.wav" + } +} + +"AlyxEMP.Stop" +{ + "channel" "CHAN_WEAPON" + "volume" "0.8" + "soundlevel" "SNDLVL_75dB" + "wave" "common/null.wav" +} + +// ************** +// BASE CHARACTER +// + +"GenericNPC.GunSound" +{ + "channel" "CHAN_WEAPON" + "soundlevel" "SNDLVL_75dB" + "pitch" "95,105" + +"rndwave" + { + "wave" "^weapons/ar1/ar1_dist1.wav" + "wave" "^weapons/ar1/ar1_dist1.wav" + "wave" "^weapons/ar1/ar1_dist2.wav" + } +} + +"Grenade.Blip" +{ + "channel" "CHAN_WEAPON" + "volume" "0.95" + "soundlevel" "SNDLVL_70dB" + "wave" "weapons/grenade/tick1.wav" +} + + diff --git a/scripts/gameinfo.txt b/scripts/gameinfo.txt new file mode 100644 index 0000000..d82f5f7 --- /dev/null +++ b/scripts/gameinfo.txt @@ -0,0 +1,13 @@ +// Valve Game Info file +// These are key/value pairs. Certain mods will use different settings. +// +GameInfo +{ + game "Fortress Forever" + //title "COUNTER-STRIKE'" + //title2 "source" + type multiplayer_only + nomodels 1 + nohimodel 1 + nocrosshair 0 +} diff --git a/scripts/hl2_scripts.dsp b/scripts/hl2_scripts.dsp new file mode 100644 index 0000000..eb3a169 --- /dev/null +++ b/scripts/hl2_scripts.dsp @@ -0,0 +1,304 @@ +# Microsoft Developer Studio Project File - Name="hl2_scripts" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 60000 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=hl2_scripts - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "hl2_scripts.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "hl2_scripts.mak" CFG="hl2_scripts - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "hl2_scripts - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "hl2_scripts - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName ""$/HL2/release/dev/hl2/scripts", ACAAAAAA" +# PROP Scc_LocalPath "." +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "hl2_scripts - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "hl2_scripts - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "hl2_scripts - Win32 Release" +# Name "hl2_scripts - Win32 Debug" +# Begin Group "AI Schedules" + +# PROP Default_Filter "*.sch" +# Begin Source File + +SOURCE=.\barney.sch +# End Source File +# Begin Source File + +SOURCE=.\citizen.sch +# End Source File +# Begin Source File + +SOURCE=.\default.sch +# End Source File +# Begin Source File + +SOURCE=.\kungfu_owen.sch +# End Source File +# Begin Source File + +SOURCE=.\lead_monster.sch +# End Source File +# Begin Source File + +SOURCE=.\metro_police.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_assassin.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_barnacle.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_barney.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_bullsquid.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_combine.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_conscript.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_headcrab.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_manhack.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_mortarsynth.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_odell.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_stalker.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_vortigaunt.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_wscanner.sch +# End Source File +# Begin Source File + +SOURCE=.\npc_zombie.sch +# End Source File +# Begin Source File + +SOURCE=.\odell.sch +# End Source File +# Begin Source File + +SOURCE=.\proto_sniper.sch +# End Source File +# Begin Source File + +SOURCE=.\sacktick.sch +# End Source File +# Begin Source File + +SOURCE=.\scanner.sch +# End Source File +# Begin Source File + +SOURCE=.\talk_monster.sch +# End Source File +# End Group +# Begin Group "Weapon Scripts" + +# PROP Default_Filter "*.txt" +# Begin Source File + +SOURCE=.\weapon_ar1.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_ar2.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_binoculars.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_brickbat.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_flaregun.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_hmg1.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_iceaxe.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_ml.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_molotov.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_physgun.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_shotgun.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_slam.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_smg1.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_smg2.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_sniperrifle.txt +# End Source File +# Begin Source File + +SOURCE=.\weapon_stunstick.txt +# End Source File +# End Group +# Begin Group "Misc Scripts" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\640_hud.txt +# End Source File +# Begin Source File + +SOURCE=.\kb_act.lst +# End Source File +# Begin Source File + +SOURCE=.\kb_def.lst +# End Source File +# Begin Source File + +SOURCE=.\kb_keys.lst +# End Source File +# Begin Source File + +SOURCE=.\liblist.gam +# End Source File +# Begin Source File + +SOURCE=.\materials.txt +# End Source File +# Begin Source File + +SOURCE=.\rooms.lst +# End Source File +# Begin Source File + +SOURCE=.\sentences.txt +# End Source File +# Begin Source File + +SOURCE=.\settings.scr +# End Source File +# Begin Source File + +SOURCE=.\titles.txt +# End Source File +# Begin Source File + +SOURCE=.\woncomm.lst +# End Source File +# End Group +# End Target +# End Project diff --git a/scripts/kb_act.lst b/scripts/kb_act.lst new file mode 100644 index 0000000..a2c15aa --- /dev/null +++ b/scripts/kb_act.lst @@ -0,0 +1,62 @@ +"blank" "==========================" +"blank" "#Valve_Movement_Title" +"blank" "==========================" +"+forward" "#Valve_Move_Forward" +"+back" "#Valve_Move_Back" +"+moveleft" "#Valve_Move_Left" +"+moveright" "#Valve_Move_Right" +"+speed" "#Valve_Walk" +"+jump" "#Valve_Jump" +"+duck" "#Valve_Duck" +"blank" "==========================" +"blank" "#FF_Combat_Title" +"blank" "==========================" +"+attack" "#FF_Attack1" +"+attack2" "#FF_Attack2" +"+reload" "#Valve_Reload_Weapon" +"+gren1" "#FF_Gren1" +"+gren2" "#FF_Gren2" +"toggleone" "#FF_ToggleGren1" +"toggletwo" "#FF_ToggleGren2" +"invprev" "#Valve_Previous_Weapon" +"invnext" "#Valve_Next_Weapon" +"lastinv" "#Valve_Last_Weapon_Used" +"blank" "==========================" +"blank" "#Valve_Communication_Title" +"blank" "==========================" +"+voicerecord" "#Valve_Use_Voice_Communication" +"say" "#Valve_Chat_Message" +"say_team" "#Valve_Team_Message" +"+medengymenu" "#FF_MedEngyMenu" +"blank" "==========================" +"blank" "#Valve_Miscellaneous_Title" +"blank" "==========================" +"+showscores" "#Valve_Display_Scores" +"+hintcenter" "#FF_HintCenter" +"+mapshot" "#FF_MapShot" +"+use" "#Valve_Use_Items" +"discard" "#FF_DiscardAmmo" +"dropitems" "#FF_DropItems" +"flaginfo" "#FF_FlagInfo" +"impulse 100" "#Valve_Flashlight" +"impulse 201" "#Valve_Spray_Logo" +"jpeg" "#Valve_Take_Screen_Shot" +"quit" "#Valve_Quit_Game" +"blank" "==========================" +"blank" "#Valve_Miscellaneous_Keyboard_Keys_Title" +"blank" "==========================" +"+left" "#Valve_Turn_Left" +"+right" "#Valve_Turn_Right" +"+moveup" "#Valve_Swim_Up" +"+movedown" "#Valve_Swim_Down" +"+lookup" "#Valve_Look_Up" +"+lookdown" "#Valve_Look_Down" +"centerview" "#FF_Reset_View" +"+strafe" "#Valve_Strafe_Modifier" +"+mlook" "#FF_Mouse_Look" +"+klook" "#FF_Keyboard_Look" +"blank" "==========================" +"blank" "#FF_TeamOptions" +"blank" "==========================" +"changeteam" "#FF_ChangeTeam" +"changeclass" "#FF_ChangeClass" diff --git a/scripts/kb_def.lst b/scripts/kb_def.lst new file mode 100644 index 0000000..de42478 --- /dev/null +++ b/scripts/kb_def.lst @@ -0,0 +1,63 @@ +"h" "+hintcenter" +"k" "+voicerecord" +"c" "dropitems" +"x" "discard" +"z" "+medengymenu" +"w" "+forward" +"UPARROW" "+forward" +"s" "+back" +"DOWNARROW" "+back" +"LEFTARROW" "+left" +"RIGHTARROW" "+right" +"a" "+moveleft" +"d" "+moveright" +"SPACE" "+jump" +"CTRL" "+duck" +"TAB" "+showscores" +"e" "+use" +"'" "+moveup" +"/" "+movedown" +"PGUP" "+lookup" +"PGDN" "+lookdown" +"END" "centerview" +"ALT" "+strafe" +"INS" "+klook" +";" "+mlook" +"r" "+reload" +"SHIFT" "+speed" +"MOUSE1" "+attack" +"ENTER" "+attack" +"MOUSE2" "+attack2" +"\\" "+attack2" +"l" "impulse 100" +"t" "impulse 201" +"f" "+gren1" +"g" "+gren2" +"1" "slot1" +"2" "slot2" +"3" "slot3" +"4" "slot4" +"5" "slot5" +"6" "slot6" +"7" "slot7" +"8" "slot8" +"9" "slot9" +"0" "slot10" +"MWHEELUP" "invprev" +"[" "invprev" +"MWHEELDOWN" "invnext" +"]" "invnext" +"q" "lastinv" +"F5" "jpeg" +"F10" "quit prompt" +"PAUSE" "pause" +"ESCAPE" "escape" +"~" "toggleconsole" +"`" "toggleconsole" +"+" "sizeup" +"=" "sizeup" +"-" "sizedown" +"y" "say" +"u" "say_team" +"b" "changeclass" +"n" "changeteam" \ No newline at end of file diff --git a/scripts/kb_keys.lst b/scripts/kb_keys.lst new file mode 100644 index 0000000..079fa39 --- /dev/null +++ b/scripts/kb_keys.lst @@ -0,0 +1,256 @@ +0 "" "" DEFAULTCOLOR +1 "" "" DEFAULTCOLOR +2 "" "" DEFAULTCOLOR +3 "" "" DEFAULTCOLOR +4 "" "" DEFAULTCOLOR +5 "" "" DEFAULTCOLOR +6 "" "" DEFAULTCOLOR +7 "" "" DEFAULTCOLOR +8 "" "" DEFAULTCOLOR +9 "TAB" "TAB" DEFAULTCOLOR +10 "" "" DEFAULTCOLOR +11 "" "" DEFAULTCOLOR +12 "" "" DEFAULTCOLOR +13 "ENTER" "ENTER" DEFAULTCOLOR +14 "" "" DEFAULTCOLOR +15 "" "" DEFAULTCOLOR +16 "" "" DEFAULTCOLOR +17 "" "" DEFAULTCOLOR +18 "" "" DEFAULTCOLOR +19 "" "" DEFAULTCOLOR +20 "" "" DEFAULTCOLOR +21 "" "" DEFAULTCOLOR +22 "" "" DEFAULTCOLOR +23 "" "" DEFAULTCOLOR +24 "" "" DEFAULTCOLOR +25 "" "" DEFAULTCOLOR +26 "" "" DEFAULTCOLOR +27 "ESCAPE" "ESCAPE" DEFAULTCOLOR +28 "" "" DEFAULTCOLOR +29 "" "" DEFAULTCOLOR +30 "" "" DEFAULTCOLOR +31 "" "" DEFAULTCOLOR +32 "SPACE" "SPACE" DEFAULTCOLOR +33 "!" "!" DEFAULTCOLOR +34 """ """ DEFAULTCOLOR +35 "#" "#" DEFAULTCOLOR +36 "$" "$" DEFAULTCOLOR +37 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR +38 "&" "&" DEFAULTCOLOR +39 "'" "'" DEFAULTCOLOR +40 "(" "(" DEFAULTCOLOR +41 ")" ")" DEFAULTCOLOR +42 "*" "*" DEFAULTCOLOR +43 "+" "+" DEFAULTCOLOR +44 "," "," DEFAULTCOLOR +45 "-" "-" DEFAULTCOLOR +46 "." "." DEFAULTCOLOR +47 "/" "/" DEFAULTCOLOR +48 "0" "0" DEFAULTCOLOR +49 "1" "1" DEFAULTCOLOR +50 "2" "2" DEFAULTCOLOR +51 "3" "3" DEFAULTCOLOR +52 "4" "4" DEFAULTCOLOR +53 "5" "5" DEFAULTCOLOR +54 "6" "6" DEFAULTCOLOR +55 "7" "7" DEFAULTCOLOR +56 "8" "8" DEFAULTCOLOR +57 "9" "9" DEFAULTCOLOR +58 ":" ":" DEFAULTCOLOR +59 ";" ";" DEFAULTCOLOR +60 "<" "<" DEFAULTCOLOR +61 "=" "=" DEFAULTCOLOR +62 ">" ">" DEFAULTCOLOR +63 "?" "?" DEFAULTCOLOR +64 "@" "@" DEFAULTCOLOR +65 "A" "A" DEFAULTCOLOR +66 "B" "B" DEFAULTCOLOR +67 "C" "C" DEFAULTCOLOR +68 "D" "D" DEFAULTCOLOR +69 "E" "E" DEFAULTCOLOR +70 "F" "F" DEFAULTCOLOR +71 "G" "G" DEFAULTCOLOR +72 "H" "H" DEFAULTCOLOR +73 "I" "I" DEFAULTCOLOR +74 "J" "J" DEFAULTCOLOR +75 "K" "K" DEFAULTCOLOR +76 "L" "L" DEFAULTCOLOR +77 "M" "M" DEFAULTCOLOR +78 "N" "N" DEFAULTCOLOR +79 "O" "O" DEFAULTCOLOR +80 "P" "P" DEFAULTCOLOR +81 "Q" "Q" DEFAULTCOLOR +82 "R" "R" DEFAULTCOLOR +83 "S" "S" DEFAULTCOLOR +84 "T" "T" DEFAULTCOLOR +85 "U" "U" DEFAULTCOLOR +86 "V" "V" DEFAULTCOLOR +87 "W" "W" DEFAULTCOLOR +88 "X" "X" DEFAULTCOLOR +89 "Y" "Y" DEFAULTCOLOR +90 "Z" "Z" DEFAULTCOLOR +91 "[" "[" DEFAULTCOLOR +92 "\" "\" DEFAULTCOLOR +93 "]" "]" DEFAULTCOLOR +94 "^" "^" DEFAULTCOLOR +95 "_" "_" DEFAULTCOLOR +96 "`" "`" DEFAULTCOLOR +97 "a" "a" DEFAULTCOLOR +98 "b" "b" DEFAULTCOLOR +99 "c" "c" DEFAULTCOLOR +100 "d" "d" DEFAULTCOLOR +101 "e" "e" DEFAULTCOLOR +102 "f" "f" DEFAULTCOLOR +103 "g" "g" DEFAULTCOLOR +104 "h" "h" DEFAULTCOLOR +105 "i" "i" DEFAULTCOLOR +106 "j" "j" DEFAULTCOLOR +107 "k" "k" DEFAULTCOLOR +108 "l" "l" DEFAULTCOLOR +109 "m" "m" DEFAULTCOLOR +110 "n" "n" DEFAULTCOLOR +111 "o" "o" DEFAULTCOLOR +112 "p" "p" DEFAULTCOLOR +113 "q" "q" DEFAULTCOLOR +114 "r" "r" DEFAULTCOLOR +115 "s" "s" DEFAULTCOLOR +116 "t" "t" DEFAULTCOLOR +117 "u" "u" DEFAULTCOLOR +118 "v" "v" DEFAULTCOLOR +119 "w" "w" DEFAULTCOLOR +120 "x" "x" DEFAULTCOLOR +121 "y" "y" DEFAULTCOLOR +122 "z" "z" DEFAULTCOLOR +123 "{" "{" DEFAULTCOLOR +124 "|" "|" DEFAULTCOLOR +125 "}" "}" DEFAULTCOLOR +126 "~" "~" DEFAULTCOLOR +127 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR +128 "UPARROW" "UPARROW" DEFAULTCOLOR +129 "DOWNARROW" "DOWNARROW" DEFAULTCOLOR +130 "LEFTARROW" "LEFTARROW" DEFAULTCOLOR +131 "RIGHTARROW" "RIGHTARROW" DEFAULTCOLOR +132 "ALT" "ALT" DEFAULTCOLOR +133 "CTRL" "CTRL" DEFAULTCOLOR +134 "SHIFT" "SHIFT" DEFAULTCOLOR +135 "F1" "F1" DEFAULTCOLOR +136 "F2" "F2" DEFAULTCOLOR +137 "F3" "F3" DEFAULTCOLOR +138 "F4" "F4" DEFAULTCOLOR +139 "F5" "F5" DEFAULTCOLOR +140 "F6" "F6" DEFAULTCOLOR +141 "F7" "F7" DEFAULTCOLOR +142 "F8" "F8" DEFAULTCOLOR +143 "F9" "F9" DEFAULTCOLOR +144 "F10" "F10" DEFAULTCOLOR +145 "F11" "F11" DEFAULTCOLOR +146 "F12" "F12" DEFAULTCOLOR +147 "INS" "INS" DEFAULTCOLOR +148 "DEL" "DEL" DEFAULTCOLOR +149 "PGDN" "PGDN" DEFAULTCOLOR +150 "PGUP" "PGUP" DEFAULTCOLOR +151 "HOME" "HOME" DEFAULTCOLOR +152 "END" "END" DEFAULTCOLOR +153 "" "" DEFAULTCOLOR +154 "" "" DEFAULTCOLOR +155 "" "" DEFAULTCOLOR +156 "" "" DEFAULTCOLOR +157 "" "" DEFAULTCOLOR +158 "" "" DEFAULTCOLOR +159 "" "" DEFAULTCOLOR +160 "" "" DEFAULTCOLOR +161 "" "" DEFAULTCOLOR +162 "" "" DEFAULTCOLOR +163 "" "" DEFAULTCOLOR +164 "" "" DEFAULTCOLOR +165 "" "" DEFAULTCOLOR +166 "" "" DEFAULTCOLOR +167 "" "" DEFAULTCOLOR +168 "" "" DEFAULTCOLOR +169 "" "" DEFAULTCOLOR +170 "" "" DEFAULTCOLOR +171 "" "" DEFAULTCOLOR +172 "" "" DEFAULTCOLOR +173 "" "" DEFAULTCOLOR +174 "" "" DEFAULTCOLOR +175 "" "" DEFAULTCOLOR +176 "" "" DEFAULTCOLOR +177 "" "" DEFAULTCOLOR +178 "" "" DEFAULTCOLOR +179 "" "" DEFAULTCOLOR +180 "" "" DEFAULTCOLOR +181 "" "" DEFAULTCOLOR +182 "" "" DEFAULTCOLOR +183 "" "" DEFAULTCOLOR +184 "" "" DEFAULTCOLOR +185 "" "" DEFAULTCOLOR +186 "" "" DEFAULTCOLOR +187 "" "" DEFAULTCOLOR +188 "" "" DEFAULTCOLOR +189 "" "" DEFAULTCOLOR +190 "" "" DEFAULTCOLOR +191 "" "" DEFAULTCOLOR +192 "" "" DEFAULTCOLOR +193 "" "" DEFAULTCOLOR +194 "" "" DEFAULTCOLOR +195 "" "" DEFAULTCOLOR +196 "" "" DEFAULTCOLOR +197 "" "" DEFAULTCOLOR +198 "" "" DEFAULTCOLOR +199 "" "" DEFAULTCOLOR +200 "MOUSE1" "MOUSE1" COLOR 0 255 255 +201 "MOUSE2" "MOUSE2" COLOR 0 255 255 +202 "MOUSE3" "MOUSE3" COLOR 0 255 255 +203 "JOY1" "JOY1" COLOR 255 0 0 +204 "JOY2" "JOY2" COLOR 255 0 0 +205 "JOY3" "JOY3" COLOR 255 0 0 +206 "JOY4" "JOY4" COLOR 255 0 0 +207 "AUX1" "AUX1" DEFAULTCOLOR +208 "AUX2" "AUX2" DEFAULTCOLOR +209 "AUX3" "AUX3" DEFAULTCOLOR +210 "AUX4" "AUX4" DEFAULTCOLOR +211 "AUX5" "AUX5" DEFAULTCOLOR +212 "AUX6" "AUX6" DEFAULTCOLOR +213 "AUX7" "AUX7" DEFAULTCOLOR +214 "AUX8" "AUX8" DEFAULTCOLOR +215 "AUX9" "AUX9" DEFAULTCOLOR +216 "AUX10" "AUX10" DEFAULTCOLOR +217 "AUX11" "AUX11" DEFAULTCOLOR +218 "AUX12" "AUX12" DEFAULTCOLOR +219 "AUX13" "AUX13" DEFAULTCOLOR +220 "AUX14" "AUX14" DEFAULTCOLOR +221 "AUX15" "AUX15" DEFAULTCOLOR +222 "AUX16" "AUX16" DEFAULTCOLOR +223 "AUX17" "AUX17" DEFAULTCOLOR +224 "AUX18" "AUX18" DEFAULTCOLOR +225 "AUX19" "AUX19" DEFAULTCOLOR +226 "AUX20" "AUX20" DEFAULTCOLOR +227 "AUX21" "AUX21" DEFAULTCOLOR +228 "AUX22" "AUX22" DEFAULTCOLOR +229 "AUX23" "AUX23" DEFAULTCOLOR +230 "AUX24" "AUX24" DEFAULTCOLOR +231 "AUX25" "AUX25" DEFAULTCOLOR +232 "AUX26" "AUX26" DEFAULTCOLOR +233 "AUX27" "AUX27" DEFAULTCOLOR +234 "AUX28" "AUX28" DEFAULTCOLOR +235 "AUX29" "AUX29" DEFAULTCOLOR +236 "AUX30" "AUX30" DEFAULTCOLOR +237 "AUX31" "AUX31" DEFAULTCOLOR +238 "AUX32" "AUX32" DEFAULTCOLOR +239 "MWHEELDOWN" "MWHEELDOWN" DEFAULTCOLOR +240 "MWHEELUP" "MWHEELUP" DEFAULTCOLOR +241 "" "" DEFAULTCOLOR +242 "" "" DEFAULTCOLOR +243 "" "" DEFAULTCOLOR +244 "" "" DEFAULTCOLOR +245 "" "" DEFAULTCOLOR +246 "" "" DEFAULTCOLOR +247 "" "" DEFAULTCOLOR +248 "" "" DEFAULTCOLOR +249 "" "" DEFAULTCOLOR +250 "" "" DEFAULTCOLOR +251 "" "" DEFAULTCOLOR +252 "" "" DEFAULTCOLOR +253 "" "" DEFAULTCOLOR +254 "" "" DEFAULTCOLOR +255 "PAUSE" "PAUSE" DEFAULTCOLOR diff --git a/scripts/liblist.gam b/scripts/liblist.gam new file mode 100644 index 0000000..4991c7c --- /dev/null +++ b/scripts/liblist.gam @@ -0,0 +1,9 @@ +// Valve Game Info file +// These are key/value pairs. Certain mods will use different settings. +// +game "Fortress Forever Biotches" +startmap "mulch_test" +trainingmap "t0a0" +hlversion "1000" +mpentity "info_player_start" +gamedll "dlls\server.dll" diff --git a/scripts/sentences.txt b/scripts/sentences.txt new file mode 100644 index 0000000..86882c3 --- /dev/null +++ b/scripts/sentences.txt @@ -0,0 +1,102 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + +// --------- Canal Zone --------- // +CZ_GOTCP1 bully/CZ_GOTCP1 +CZ_LOSTCP1 bully/CZ_LOSTCP1 +CZ_GOTCP2 bully/CZ_GOTCP2 +CZ_LOSTCP2 bully/CZ_LOSTCP2 +CZ_GOTCP3 bully/CZ_GOTCP3 +CZ_LOSTCP3 bully/CZ_LOSTCP3 +CZ_GOTCP4 bully/CZ_GOTCP4 +CZ_LOSTCP4 bully/CZ_LOSTCP4 +CZ_GOTCP5 bully/CZ_GOTCP5 +CZ_LOSTCP5 bully/CZ_LOSTCP5 +CZ_GOTALL bully/CZ_GOTALL _comma _comma _comma _comma CZ_POINTSRESET +CZ_THEYGOTALL bully/CZ_THEYGOTALL _comma _comma _comma _comma CZ_POINTSRESET +CZ_BCC_DET bully/CZ_BCC_DET +CZ_RCC_DET bully/CZ_RCC_DET + +// --------- Capture the Flag --------- // +CTF_YOUCAP bully/CTF_YOUCAP +CTF_TEAMCAP bully/CTF_TEAMCAP +CTF_THEYCAP bully/CTF_THEYCAP +CTF_YOUGOTFLAG bully/CTF_YOUGOTFLAG +CTF_YOUGOTFLAG2 bully/CTF_YOUGOTFLAG2 +CTF_YOUGOTFLAG3 bully/CTF_YOUGOTFLAG3 +CTF_YOUGOTFLAG4 bully/CTF_YOUGOTFLAG4 +CTF_GOTFLAG bully/CTF_GOTFLAG +CTF_GOTFLAG2 bully/CTF_GOTFLAG2 +CTF_GOTFLAG3 bully/CTF_GOTFLAG3 +CTF_GOTFLAG4 bully/CTF_GOTFLAG4 +CTF_LOSTFLAG bully/CTF_LOSTFLAG +CTF_LOSTFLAG2 bully/CTF_LOSTFLAG2 +CTF_LOSTFLAG3 bully/CTF_LOSTFLAG3 +CTF_LOSTFLAG4 bully/CTF_LOSTFLAG4 +CTF_FLAGBACK bully/CTF_FLAGBACK +CTF_EFLAGBACK bully/CTF_EFLAGBACK + +// --------- Hunted --------- // +HTD_DOORS bully/HTD_DOORS + +// --------- The Rock --------- // +RK_BYARDOPEN bully/RK_BYARDOPEN +RK_RYARDOPEN bully/RK_RYARDOPEN +RK_KEYBACK vox/female/your key has returned +RK_EKEYBACK vox/female/enemy key has returned +RK_GOTKEY vox/female/your team has the enemy key +RK_LOSTKEY vox/female/the enemy has your key +RK_BSCORE vox/female/blue team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_RSCORE vox/female/red team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_TAKEKEY vox/female/take key to enemy gas chamber +FBALL_BSCORE vox/female/blue team scores +FBALL_RSCORE vox/female/red team scores + +// --------- Attack/Defend --------- // +AD_600SEC bully/AD_600SEC +AD_300SEC bully/AD_300SEC +AD_120SEC bully/AD_120SEC +AD_60SEC bully/AD_60SEC +AD_30SEC bully/AD_30SEC +AD_10SEC bully/AD_10SEC +AD_9SEC bully/AD_9SEC +AD_8SEC bully/AD_8SEC +AD_7SEC bully/AD_7SEC +AD_6SEC bully/AD_6SEC +AD_5SEC bully/AD_5SEC +AD_4SEC bully/AD_4SEC +AD_3SEC bully/AD_3SEC +AD_2SEC bully/AD_2SEC +AD_1SEC bully/AD_1SEC +AD_CP1 bully/AD_CP1 +AD_CP2 bully/AD_CP2 +AD_HOLD bully/AD_HOLD +AD_CAP bully/AD_CAP +AD_GATESOPEN bully/AD_GATESOPEN +AD_ATTACK bully/AD_ATTACK +AD_DEFEND bully/AD_DEFEND + +// --------- Shutdown2 --------- // +SD_REDDOWN bully/SD_REDDOWN +SD_REDUP bully/SD_REDUP +SD_BLUEDOWN bully/SD_BLUEDOWN +SD_BLUEUP bully/SD_BLUEUP + +// --------- Push --------- // +CTF_YOUSCORE bully/CTF_YOUSCORE +CTF_TEAMSCORE bully/CTF_TEAMSCORE +CTF_THEYSCORE bully/CTF_THEYSCORE +CTF_YOUHAVEBALL bully/CTF_YOUHAVEBALL +CTF_TEAMHASBALL bully/CTF_TEAMHASBALL +CTF_ENEMYHASBALL bully/CTF_ENEMYHASBALL +CTF_BALLRETURN bully/CTF_BALLRETURN + +// --------- Win --------- // +WIN_BLUE bully/WIN_BLUE +WIN_RED bully/WIN_RED +WIN_YELLOW bully/WIN_YELLOW +WIN_GREEN bully/WIN_GREEN +WINNING_YOURTEAM bully/WINNING_YOURTEAM +WINNING_ENEMYTEAM bully/WINNING_ENEMYTEAM + +CZ_POINTSRESET bully/CZ_POINTSRESET diff --git a/scripts/sentences_bully.txt b/scripts/sentences_bully.txt new file mode 100644 index 0000000..a142580 --- /dev/null +++ b/scripts/sentences_bully.txt @@ -0,0 +1,100 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + +// --------- Canal Zone --------- // +CZ_GOTCP1 bully/CZ_GOTCP1 +CZ_LOSTCP1 bully/CZ_LOSTCP1 +CZ_GOTCP2 bully/CZ_GOTCP2 +CZ_LOSTCP2 bully/CZ_LOSTCP2 +CZ_GOTCP3 bully/CZ_GOTCP3 +CZ_LOSTCP3 bully/CZ_LOSTCP3 +CZ_GOTCP4 bully/CZ_GOTCP4 +CZ_LOSTCP4 bully/CZ_LOSTCP4 +CZ_GOTCP5 bully/CZ_GOTCP5 +CZ_LOSTCP5 bully/CZ_LOSTCP5 +CZ_GOTALL bully/CZ_GOTALL _comma _comma _comma _comma CZ_POINTSRESET +CZ_THEYGOTALL bully/CZ_THEYGOTALL _comma _comma _comma _comma CZ_POINTSRESET +CZ_BCC_DET bully/CZ_BCC_DET +CZ_RCC_DET bully/CZ_RCC_DET + +// --------- Capture the Flag --------- // +CTF_YOUCAP bully/CTF_YOUCAP +CTF_TEAMCAP bully/CTF_TEAMCAP +CTF_THEYCAP bully/CTF_THEYCAP +CTF_YOUGOTFLAG bully/CTF_YOUGOTFLAG +CTF_YOUGOTFLAG2 bully/CTF_YOUGOTFLAG2 +CTF_YOUGOTFLAG3 bully/CTF_YOUGOTFLAG3 +CTF_YOUGOTFLAG4 bully/CTF_YOUGOTFLAG4 +CTF_GOTFLAG bully/CTF_GOTFLAG +CTF_GOTFLAG2 bully/CTF_GOTFLAG2 +CTF_GOTFLAG3 bully/CTF_GOTFLAG3 +CTF_GOTFLAG4 bully/CTF_GOTFLAG4 +CTF_LOSTFLAG bully/CTF_LOSTFLAG +CTF_LOSTFLAG2 bully/CTF_LOSTFLAG2 +CTF_LOSTFLAG3 bully/CTF_LOSTFLAG3 +CTF_LOSTFLAG4 bully/CTF_LOSTFLAG4 +CTF_FLAGBACK bully/CTF_FLAGBACK +CTF_EFLAGBACK bully/CTF_EFLAGBACK + +// --------- Hunted --------- // +HTD_DOORS bully/HTD_DOORS + +// --------- The Rock --------- // +RK_BYARDOPEN bully/RK_BYARDOPEN +RK_RYARDOPEN bully/RK_RYARDOPEN +RK_KEYBACK vox/female/your key has returned +RK_EKEYBACK vox/female/enemy key has returned +RK_GOTKEY vox/female/your team has the enemy key +RK_LOSTKEY vox/female/the enemy has your key +RK_BSCORE vox/female/blue team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_RSCORE vox/female/red team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_TAKEKEY vox/female/take key to enemy gas chamber +FBALL_BSCORE vox/female/blue team scores +FBALL_RSCORE vox/female/red team scores + +// --------- Attack/Defend --------- // +AD_600SEC bully/AD_600SEC +AD_300SEC bully/AD_300SEC +AD_120SEC bully/AD_120SEC +AD_60SEC bully/AD_60SEC +AD_30SEC bully/AD_30SEC +AD_10SEC bully/AD_10SEC +AD_9SEC bully/AD_9SEC +AD_8SEC bully/AD_8SEC +AD_7SEC bully/AD_7SEC +AD_6SEC bully/AD_6SEC +AD_5SEC bully/AD_5SEC +AD_4SEC bully/AD_4SEC +AD_3SEC bully/AD_3SEC +AD_2SEC bully/AD_2SEC +AD_1SEC bully/AD_1SEC +AD_CP1 bully/AD_CP1 +AD_CP2 bully/AD_CP2 +AD_HOLD bully/AD_HOLD +AD_CAP bully/AD_CAP +AD_GATESOPEN bully/AD_GATESOPEN +AD_ATTACK bully/AD_ATTACK +AD_DEFEND bully/AD_DEFEND + +// --------- Shutdown2 --------- // +SD_REDDOWN bully/SD_REDDOWN +SD_REDUP bully/SD_REDUP +SD_BLUEDOWN bully/SD_BLUEDOWN +SD_BLUEUP bully/SD_BLUEUP + +// --------- Push --------- // +CTF_YOUSCORE bully/CTF_YOUSCORE +CTF_TEAMSCORE bully/CTF_TEAMSCORE +CTF_THEYSCORE bully/CTF_THEYSCORE +CTF_YOUHAVEBALL bully/CTF_YOUHAVEBALL +CTF_TEAMHASBALL bully/CTF_TEAMHASBALL +CTF_ENEMYHASBALL bully/CTF_ENEMYHASBALL +CTF_BALLRETURN bully/CTF_BALLRETURN + +// --------- Win --------- // +WIN_BLUE bully/WIN_BLUE +WIN_RED bully/WIN_RED +WIN_YELLOW bully/WIN_YELLOW +WIN_GREEN bully/WIN_GREEN +WINNING_YOURTEAM bully/WINNING_YOURTEAM +WINNING_ENEMYTEAM bully/WINNING_ENEMYTEAM diff --git a/scripts/sentences_common.txt b/scripts/sentences_common.txt new file mode 100644 index 0000000..ba71ba7 --- /dev/null +++ b/scripts/sentences_common.txt @@ -0,0 +1,22 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + + +//////////// +// Test // +//////////// +VOX_TEST_COMMON vox/female/t e s t c o m m o n + + +/////////////////////////////////////// +// ff_anticitizen common sentences // +/////////////////////////////////////// +AD_AC_CP1 vox/female/yellow team secured command point one +AD_AC_CP2 vox/female/yellow team secured command point two +AD_AC_HOLD vox/female/blue team holds blue base +AD_AC_CAP vox/female/yellow team captured blue base + +AD_RADIO_1 npc/overwatch/radiovoice/on1 riot404 yellow citizen infection isnow inprogress on3 allunitsapplyforwardpressure off2 +AD_RADIO_2 npc/overwatch/radiovoice/on1 assault243 isnow inprogress on3 isolate cauterize level5anticivilactivity off2 +AD_RADIO_3 npc/overwatch/radiovoice/on1 highpriorityregion isnow infestedzone on3 preparetoinnoculate off2 + diff --git a/scripts/sentences_female.txt b/scripts/sentences_female.txt new file mode 100644 index 0000000..9933b2a --- /dev/null +++ b/scripts/sentences_female.txt @@ -0,0 +1,100 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + +// --------- Canal Zone --------- // +CZ_GOTCP1 vox/female/command point one secured +CZ_LOSTCP1 vox/female/command point one is now hostile +CZ_GOTCP2 vox/female/command point two secured +CZ_LOSTCP2 vox/female/command point two is now hostile +CZ_GOTCP3 vox/female/command point three secured +CZ_LOSTCP3 vox/female/command point three is now hostile +CZ_GOTCP4 vox/female/command point four secured +CZ_LOSTCP4 vox/female/command point four is now hostile +CZ_GOTCP5 vox/female/command point five secured +CZ_LOSTCP5 vox/female/command point five is now hostile +CZ_GOTALL vox/female/all command points secured _comma _comma _comma command points reset +CZ_THEYGOTALL vox/female/enemy captured all command points _comma _comma _comma command points reset +CZ_BCC_DET vox/female/blue command center detonation +CZ_RCC_DET vox/female/red command center detonation + +// --------- Capture the Flag --------- // +CTF_YOUCAP vox/female/you captured the enemy flag +CTF_TEAMCAP vox/female/your team captured the flag +CTF_THEYCAP vox/female/the enemy team captured the flag +CTF_YOUGOTFLAG vox/female/you have the enemy flag +CTF_YOUGOTFLAG2 vox/female/you have the enemy flag +CTF_YOUGOTFLAG3 vox/female/you have the enemy flag +CTF_YOUGOTFLAG4 vox/female/you have the enemy flag +CTF_GOTFLAG vox/female/your team has the enemy flag +CTF_GOTFLAG2 vox/female/your team has the enemy flag +CTF_GOTFLAG3 vox/female/your team has the enemy flag +CTF_GOTFLAG4 vox/female/your team has the enemy flag +CTF_LOSTFLAG vox/female/the enemy has your flag +CTF_LOSTFLAG2 vox/female/the enemy has your flag +CTF_LOSTFLAG3 vox/female/the enemy has your flag +CTF_LOSTFLAG4 vox/female/the enemy has your flag +CTF_FLAGBACK vox/female/your flag has returned +CTF_EFLAGBACK vox/female/the enemy flag has returned + +// --------- Hunted --------- // +HTD_DOORS vox/female/escape door open + +// --------- The Rock --------- // +RK_BYARDOPEN vox/female/blue yard has been breached +RK_RYARDOPEN vox/female/red yard has been breached +RK_KEYBACK vox/female/your key has returned +RK_EKEYBACK vox/female/enemy key has returned +RK_GOTKEY vox/female/your team has the enemy key +RK_LOSTKEY vox/female/the enemy has your key +RK_BSCORE vox/female/blue team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_RSCORE vox/female/red team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_TAKEKEY vox/female/take key to enemy gas chamber +FBALL_BSCORE vox/female/blue team scores +FBALL_RSCORE vox/female/red team scores + +// --------- Attack/Defend --------- // +AD_600SEC vox/female/ten minutes remaining +AD_300SEC vox/female/five minutes remaining +AD_120SEC vox/female/two minutes remaining +AD_60SEC vox/female/sixty seconds remaining +AD_30SEC vox/female/thirty seconds remaining +AD_10SEC vox/female/ten +AD_9SEC vox/female/nine +AD_8SEC vox/female/eight +AD_7SEC vox/female/seven +AD_6SEC vox/female/six +AD_5SEC vox/female/five +AD_4SEC vox/female/four +AD_3SEC vox/female/three +AD_2SEC vox/female/two +AD_1SEC vox/female/one +AD_CP1 vox/female/blue team secured command point one +AD_CP2 vox/female/blue team secured command point two +AD_HOLD vox/female/red team holds red base +AD_CAP vox/female/blue team captured red base +AD_GATESOPEN vox/female/_comma +AD_ATTACK vox/female/_comma +AD_DEFEND vox/female/_comma + +// --------- Shutdown2 --------- // +SD_REDDOWN vox/female/red security has been deactivated +SD_REDUP vox/female/red security has been reactivated +SD_BLUEDOWN vox/female/blue security has been deactivated +SD_BLUEUP vox/female/blue security has been reactivated + +// --------- Push --------- // +CTF_YOUSCORE vox/female/you captured the ball +CTF_TEAMSCORE vox/female/your team captured the ball +CTF_THEYSCORE vox/female/the enemy team captured the ball +CTF_YOUHAVEBALL vox/female/you have the ball +CTF_TEAMHASBALL vox/female/your team has the ball +CTF_ENEMYHASBALL vox/female/the enemy has the ball +CTF_BALLRETURN vox/female/the ball has returned + +// --------- Win --------- // +WIN_BLUE vox/female/blue team wins +WIN_RED vox/female/red team wins +WIN_YELLOW vox/female/yellow team wins +WIN_GREEN vox/female/green team wins +WINNING_YOURTEAM vox/female/_comma +WINNING_ENEMYTEAM vox/female/_comma diff --git a/scripts/sentences_robot.txt b/scripts/sentences_robot.txt new file mode 100644 index 0000000..2d48ae6 --- /dev/null +++ b/scripts/sentences_robot.txt @@ -0,0 +1,100 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + +// --------- Canal Zone --------- // +CZ_GOTCP1 vox/robot/command point one secured +CZ_LOSTCP1 vox/robot/command point one is now hostile +CZ_GOTCP2 vox/robot/command point two secured +CZ_LOSTCP2 vox/robot/command point two is now hostile +CZ_GOTCP3 vox/robot/command point three secured +CZ_LOSTCP3 vox/robot/command point three is now hostile +CZ_GOTCP4 vox/robot/command point four secured +CZ_LOSTCP4 vox/robot/command point four is now hostile +CZ_GOTCP5 vox/robot/command point five secured +CZ_LOSTCP5 vox/robot/command point five is now hostile +CZ_GOTALL vox/robot/all command points secured _comma _comma _comma command points reset +CZ_THEYGOTALL vox/robot/enemy captured all command points _comma _comma _comma command points reset +CZ_BCC_DET vox/robot/blue command center detonation +CZ_RCC_DET vox/robot/red command center detonation + +// --------- Capture the Flag --------- // +CTF_YOUCAP vox/robot/you captured the enemy flag +CTF_TEAMCAP vox/robot/your team captured the flag +CTF_THEYCAP vox/robot/the enemy team captured the flag +CTF_YOUGOTFLAG vox/robot/you have the enemy flag +CTF_YOUGOTFLAG2 vox/robot/you have the enemy flag +CTF_YOUGOTFLAG3 vox/robot/you have the enemy flag +CTF_YOUGOTFLAG4 vox/robot/you have the enemy flag +CTF_GOTFLAG vox/robot/your team has the enemy flag +CTF_GOTFLAG2 vox/robot/your team has the enemy flag +CTF_GOTFLAG3 vox/robot/your team has the enemy flag +CTF_GOTFLAG4 vox/robot/your team has the enemy flag +CTF_LOSTFLAG vox/robot/the enemy has your flag +CTF_LOSTFLAG2 vox/robot/the enemy has your flag +CTF_LOSTFLAG3 vox/robot/the enemy has your flag +CTF_LOSTFLAG4 vox/robot/the enemy has your flag +CTF_FLAGBACK vox/robot/your flag has returned +CTF_EFLAGBACK vox/robot/the enemy flag has returned + +// --------- Hunted --------- // +HTD_DOORS vox/robot/escape door open + +// --------- The Rock --------- // +RK_BYARDOPEN vox/robot/blue yard has been breached +RK_RYARDOPEN vox/robot/red yard has been breached +RK_KEYBACK vox/robot/your key has returned +RK_EKEYBACK vox/robot/enemy key has returned +RK_GOTKEY vox/robot/your team has the enemy key +RK_LOSTKEY vox/robot/the enemy has your key +RK_BSCORE vox/robot/blue team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_RSCORE vox/robot/red team scores _comma _comma _comma nerve gas released _comma _comma _comma secure protective suit immediately +RK_TAKEKEY vox/robot/take key to enemy gas chamber +FBALL_BSCORE vox/robot/blue team scores +FBALL_RSCORE vox/robot/red team scores + +// --------- Attack/Defend --------- // +AD_600SEC vox/robot/ten minutes remaining +AD_300SEC vox/robot/five minutes remaining +AD_120SEC vox/robot/two minutes remaining +AD_60SEC vox/robot/sixty seconds remaining +AD_30SEC vox/robot/thirty seconds remaining +AD_10SEC vox/robot/ten +AD_9SEC vox/robot/nine +AD_8SEC vox/robot/eight +AD_7SEC vox/robot/seven +AD_6SEC vox/robot/six +AD_5SEC vox/robot/five +AD_4SEC vox/robot/four +AD_3SEC vox/robot/three +AD_2SEC vox/robot/two +AD_1SEC vox/robot/one +AD_CP1 vox/robot/blue team secured command point one +AD_CP2 vox/robot/blue team secured command point two +AD_HOLD vox/robot/red team holds red base +AD_CAP vox/robot/blue team captured red base +AD_GATESOPEN vox/robot/_comma +AD_ATTACK vox/robot/_comma +AD_DEFEND vox/robot/_comma + +// --------- Shutdown2 --------- // +SD_REDDOWN vox/robot/red security has been deactivated +SD_REDUP vox/robot/red security has been reactivated +SD_BLUEDOWN vox/robot/blue security has been deactivated +SD_BLUEUP vox/robot/blue security has been reactivated + +// --------- Push --------- // +CTF_YOUSCORE vox/robot/you captured the ball +CTF_TEAMSCORE vox/robot/your team captured the ball +CTF_THEYSCORE vox/robot/the enemy team captured the ball +CTF_YOUHAVEBALL vox/robot/you have the ball +CTF_TEAMHASBALL vox/robot/your team has the ball +CTF_ENEMYHASBALL vox/robot/the enemy has the ball +CTF_BALLRETURN vox/robot/the ball has returned + +// --------- Win --------- // +WIN_BLUE vox/robot/blue team wins +WIN_RED vox/robot/red team wins +WIN_YELLOW vox/robot/yellow team wins +WIN_GREEN vox/robot/green team wins +WINNING_YOURTEAM vox/robot/_comma +WINNING_ENEMYTEAM vox/robot/_comma diff --git a/scripts/sentences_tfc.txt b/scripts/sentences_tfc.txt new file mode 100644 index 0000000..34a5616 --- /dev/null +++ b/scripts/sentences_tfc.txt @@ -0,0 +1,100 @@ +// Fortress Forever SPEECH SYSTEM SENTENCES. +// Do not use TABS. Separate sentence-names from wave definitions with single spaces only. + +// --------- Canal Zone --------- // +CZ_GOTCP1 vox/tfc/command point one secured +CZ_LOSTCP1 vox/tfc/command point one is now hostile +CZ_GOTCP2 vox/tfc/command point two secured +CZ_LOSTCP2 vox/tfc/command point two is now hostile +CZ_GOTCP3 vox/tfc/command point three secured +CZ_LOSTCP3 vox/tfc/command point three is now hostile +CZ_GOTCP4 vox/tfc/command point four secured +CZ_LOSTCP4 vox/tfc/command point four is now hostile +CZ_GOTCP5 vox/tfc/command point five secured +CZ_LOSTCP5 vox/tfc/command point five is now hostile +CZ_GOTALL vox/tfc/all command point secured _comma _comma _comma command point reset +CZ_THEYGOTALL vox/tfc/enemy captured all command points _comma _comma _comma command points reset +CZ_BCC_DET vox/tfc/blue command center detonation +CZ_RCC_DET vox/tfc/red command center detonation + +// --------- Capture the Flag --------- // +CTF_YOUCAP vox/tfc/you captured the enemy flag +CTF_TEAMCAP vox/tfc/your team captured the flag +CTF_THEYCAP vox/tfc/the enemy team captured the flag +CTF_YOUGOTFLAG vox/tfc/you have the enemy flag +CTF_YOUGOTFLAG2 vox/tfc/you have the enemy flag +CTF_YOUGOTFLAG3 vox/tfc/you have the enemy flag +CTF_YOUGOTFLAG4 vox/tfc/you have the enemy flag +CTF_GOTFLAG vox/tfc/your team has the enemy flag +CTF_GOTFLAG2 vox/tfc/your team has the enemy flag +CTF_GOTFLAG3 vox/tfc/your team has the enemy flag +CTF_GOTFLAG4 vox/tfc/your team has the enemy flag +CTF_LOSTFLAG vox/tfc/the enemy has your flag +CTF_LOSTFLAG2 vox/tfc/the enemy has your flag +CTF_LOSTFLAG3 vox/tfc/the enemy has your flag +CTF_LOSTFLAG4 vox/tfc/the enemy has your flag +CTF_FLAGBACK vox/tfc/your flag has returned +CTF_EFLAGBACK vox/tfc/the enemy flag has returned + +// --------- Hunted --------- // +HTD_DOORS vox/tfc/escape door open + +// --------- The Rock --------- // +RK_BYARDOPEN vox/tfc/blue yards has been breached +RK_RYARDOPEN vox/tfc/red yards has been breached +RK_KEYBACK vox/tfc/your key has returned +RK_EKEYBACK vox/tfc/enemy key has returned +RK_GOTKEY vox/tfc/your team has the enemy key +RK_LOSTKEY vox/tfc/the enemy has your key +RK_BSCORE vox/tfc/blue team scores _comma _comma _comma nerve_gas_released _comma _comma _comma secure protective suit immediately +RK_RSCORE vox/tfc/red team scores _comma _comma _comma nerve_gas_released _comma _comma _comma secure protective suit immediately +RK_TAKEKEY vox/tfc/take key to enemy gas chamber +FBALL_BSCORE vox/tfc/blue team scores +FBALL_RSCORE vox/tfc/red team scores + +// --------- Attack/Defend --------- // +AD_600SEC vox/tfc/ten minutes remaining +AD_300SEC vox/tfc/five minutes remaining +AD_120SEC vox/tfc/two minutes remaining +AD_60SEC vox/tfc/sixty seconds remaining +AD_30SEC vox/tfc/thirty seconds remaining +AD_10SEC vox/tfc/ten +AD_9SEC vox/tfc/nine +AD_8SEC vox/tfc/eight +AD_7SEC vox/tfc/seven +AD_6SEC vox/tfc/six +AD_5SEC vox/tfc/five +AD_4SEC vox/tfc/four +AD_3SEC vox/tfc/three +AD_2SEC vox/tfc/two +AD_1SEC vox/tfc/one +AD_CP1 vox/tfc/blue team secured command point one +AD_CP2 vox/tfc/blue team secured command point two +AD_HOLD vox/tfc/red team holds red base +AD_CAP vox/tfc/blue team captured red base +AD_GATESOPEN vox/tfc/_comma +AD_ATTACK vox/tfc/_comma +AD_DEFEND vox/tfc/_comma + +// --------- Shutdown2 --------- // +SD_REDDOWN vox/tfc/red security has been deactivated +SD_REDUP vox/tfc/red security is now operating +SD_BLUEDOWN vox/tfc/blue security has been deactivated +SD_BLUEUP vox/tfc/blue security is now operating + +// --------- Push --------- // +CTF_YOUSCORE vox/tfc/you captured the flag +CTF_TEAMSCORE vox/tfc/your team captured the flag +CTF_THEYSCORE vox/tfc/the enemy team captured the flag +CTF_YOUHAVEBALL vox/tfc/you have the flag +CTF_TEAMHASBALL vox/tfc/your team has the flag +CTF_ENEMYHASBALL vox/tfc/the enemy has the flag +CTF_BALLRETURN vox/tfc/the flag has returned + +// --------- Win --------- // +WIN_BLUE vox/tfc/blue team wins +WIN_RED vox/tfc/red team wins +WIN_YELLOW vox/tfc/yellow team wins +WIN_GREEN vox/tfc/green team wins +WINNING_YOURTEAM vox/tfc/_comma +WINNING_ENEMYTEAM vox/tfc/_comma diff --git a/scripts/soundmixers.txt b/scripts/soundmixers.txt new file mode 100644 index 0000000..29ba060 --- /dev/null +++ b/scripts/soundmixers.txt @@ -0,0 +1,236 @@ +// Halflife 2 custom sound mixers. +// These Sound Mixers are referenced by name from Soundscapes, and are used to provide +// custom volume control over various sound categories, called 'mix groups' + +// "GROUPRULES" specifies the rules for inclusion of a sound in a mix group. +// Rules are checked sequentially (from top to bottom). All fields must match +// in a row in order for a sound to match the group. A sound my be included +// in up to 8 mix groups. + +// LIMITS: +// up to 64 unique mix groups +// up to 76 group rules entries +// up to 32 sound mixers +// all strings are limited to 31 characters! + +// NOTE2: at runtime, you can display the classname of the sound source by +// setting snd_showclassname 1 in the console. + +// NOTE3: main character dialog during critical scenes is ducked using a separate code path which, when +// active, temporarilly disables mixer ducking (prevent double ducking). +// Lower priority sounds are ducked by higher priority sounds, if "is ducked" is enabled. +// Only sounds with "causes ducking" enabled can cause a lower priority sound to be ducked. + +"GROUPRULES" +{ +// NOTE: order these from least general to most general + +// directory or .wav classname Causes Duck to Ducker +// group name name substring substring chan sndlvl_min sndlvl_max priority Is Ducked Ducking Percent Threshold +// ---------- -------------- --------- ---- ---------- ---------- -------- --------- ------- ------- --------- + + "Vort_Dialog" "/vort" "" "" "" "" "60" "0" "1" "100" "20" + "Alyx_Dialog" "/alyx" "" "" "" "" "60" "0" "1" "100" "20" + "Alyx_Dialog" "/al_" "" "" "" "" "60" "0" "1" "100" "20" + "Citizen_Dialog" "/citizen" "" "" "" "" "60" "0" "1" "100" "20" + "Citizen_Dialog" "/female" "" "" "" "" "60" "0" "1" "100" "20" + "Citizen_Dialog" "/male" "" "" "" "" "60" "0" "1" "100" "20" + "Monk_Dialog" "/monk" "" "" "" "" "60" "0" "1" "100" "20" + "Eli_Dialog" "/eli_" "" "" "" "" "60" "0" "1" "100" "20" + "Kleiner_Dialog" "/kl_" "" "" "" "" "60" "0" "1" "100" "20" + "Breen_Dialog" "/br_" "" "" "" "" "60" "0" "1" "100" "20" + "Mossman_Dialog" "/mo_" "" "" "" "" "60" "0" "1" "100" "20" + "Barney_Dialog" "/ba_" "" "" "" "" "60" "0" "1" "100" "20" + "Gman_Dialog" "/gman_" "" "" "" "" "60" "0" "1" "100" "20" + "Metrocop_Dialog" "/mcop" "" "" "" "" "60" "0" "1" "100" "20" + "Soldier_Dialog" "/cs_" "" "" "" "" "60" "0" "1" "100" "20" + + "bullethit" "impact_bullet" "" "" "" "" "50" "0" "0" "100" "40" + "bulletmiss" "nearmiss" "" "" "" "" "50" "0" "0" "100" "40" + "Explosions" "explo" "" "" "120" "" "50" "0" "1" "100" "40" + + "Player_Suit" "fvox/" "Player" "" "" "" "50" "0" "0" "100" "40" + "Player_Weapons_Loud" "weapon" "Player" "" "140" "" "50" "0" "1" "100" "40" + "Player_Weapons" "weapon" "Player" "" "" "" "50" "0" "1" "100" "40" + "Player" "player/" "Player" "" "" "" "50" "0" "0" "100" "40" + "Player" "physics/" "Player" "" "" "" "50" "0" "0" "100" "40" + + "NPC_Voice" "" "NPC" "CHAN_VOICE" "" "" "50" "0" "1" "100" "40" + "NPC_Weapons_Loud" "" "NPC" "CHAN_WEAPON" "140" "" "50" "0" "1" "100" "40" + "NPC_Weapons" "" "NPC" "CHAN_WEAPON" "" "" "50" "0" "1" "100" "40" + "NPC_Body" "" "NPC" "CHAN_BODY" "" "" "50" "0" "0" "100" "40" + "NPC_Looping" "" "NPC" "CHAN_STATIC" "" "" "50" "0" "0" "100" "40" + "NPC" "" "NPC" "" "" "" "50" "0" "0" "100" "40" + + "AHELI_WEAPON" "aheli_weapon" "" "" "140" "" "50" "0" "1" "100" "40" + "GUNSHIP_WEAPON" "gunship_weapon" "" "" "140" "" "50" "0" "1" "100" "40" + "STRIDER_WEAPON" "strider_weapon" "" "" "140" "" "50" "0" "1" "100" "40" + + "Ambient_Alarms" "ambient/alarms" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Atmosphere" "ambient/atmos" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Wind" "ambient/wind" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Water" "ambient/water" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Fire" "ambient/fire" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Gas" "ambient/gas" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Levels" "ambient/levels" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Creatures" "ambient/creatures" "" "" "" "" "20" "1" "0" "60" "40" + "Ambient_Machines" "ambient/machines" "" "" "" "" "50" "1" "0" "60" "40" + + "Trains" "plats/" "" "" "" "" "50" "0" "0" "100" "40" + "Doors" "doors/" "" "" "" "" "50" "0" "0" "100" "40" + "Buttons" "buttons/" "" "" "" "" "50" "0" "0" "100" "40" + "Items" "items/" "" "" "" "" "50" "0" "0" "100" "40" + "Beams" "beams/" "" "" "" "" "50" "0" "0" "100" "40" + "Vehicles" "vehicles/" "" "" "" "" "20" "1" "0" "68" "40" + "Vehicles_Looping" "vehicles/" "" "CHAN_STATIC" "" "" "20" "1" "0" "68" "40" + + "UI" "common/" "" "" "" "" "50" "0" "0" "100" "40" + "UI" "ui/" "" "" "" "" "50" "0" "0" "100" "40" + + "Physics" "physics/" "" "" "" "" "50" "0" "0" "100" "40" + "Ambient" "ambien" "" "" "" "" "50" "0" "0" "100" "40" + "Music" "music/" "" "" "" "" "25" "1" "1" "75" "40" + "Dialog" "vo/" "" "" "" "" "60" "0" "1" "100" "20" + "Dialog" "combined/" "" "" "" "" "60" "0" "1" "100" "20" + "Combat" "weapon" "" "" "110" "" "50" "0" "0" "100" "40" + "Combat" "explo" "" "" "110" "" "50" "0" "0" "100" "40" + "Weapons" "weapon" "" "" "120" "" "50" "0" "0" "100" "40" + + "Quiet" "" "" "" "0" "70" "50" "0" "0" "100" "40" + "Medium" "" "" "" "71" "90" "50" "0" "0" "100" "40" + "Loud" "" "" "" "91" "100" "50" "0" "0" "100" "40" + "VeryLoud" "" "" "" "101" "149" "50" "0" "0" "100" "40" + "SuperLoud" "" "" "" "150" "" "50" "0" "0" "100" "40" + + "All" "" "" "" "" "" "50" "0" "0" "100" "40" +} + + +//---------------------------------------------------------------- +// Sound Mixers, referenced in Soundscapes via "SOUNDMIXER" "name" +// New Sound Mixers may be created by level designers or sound engineer. +//---------------------------------------------------------------- + +// This is the default mix for the game. +// The mix value of a sound will be set to the value referenced by the +// least general group found that includes the sound. (top to bottom search of grouprules) + +"Default_Mix" +{ + +// group name mix value +// ---------- --------- + "Explosions" "0.90" + "Player_Weapons_Loud" "1.0" + "Player_Suit" "0.56" + "Weapons" "0.79" + + "AHELI_WEAPON" "0.85" + "GUNSHIP_WEAPON" "0.85" + "STRIDER_WEAPON" "0.85" + "bullethit" "0.67" + + "Music" "0.81" + + "All" "0.72" +} + + +"Display_Mix" +{ +// group name mix value +// ---------- --------- + "Explosions" "1.0" + "Physics" "0.7" + "Ambient" "0.7" + "Music" "0.7" + "Vehicles" "0.7" + "Vehicles_Looping" "0.7" + "Ambient_Alarms" "0.7" + "Trains" "0.7" + "Doors" "0.7" + "Buttons" "0.7" + "Items" "0.7" + "Beams" "0.7" + "UI" "0.7" + "bullethit" "0.7" + "bulletmiss" "0.7" + "Player_Suit" "0.7" + "Player_Weapons_Loud" "0.7" + "Player_Weapons" "0.7" + "Player" "0.7" + "NPC_Voice" "0.7" + "NPC_Weapons" "0.7" + "NPC_Weapons_Loud" "0.7" + "NPC_Body" "0.7" + "NPC_Looping" "0.7" + "AHELI_WEAPON" "1.0" + "GUNSHIP_WEAPON" "1.0" + "STRIDER_WEAPON" "1.0" + "NPC" "0.7" + "Dialog" "0.7" + "Weapons" "0.8" + "Alyx_Dialog" "0.7" + "Citizen_Dialog" "0.7" + "Barney_Dialog" "0.7" + "Metrocop_Dialog" "0.7" + "Soldier_Dialog" "0.7" + "All" "0.7" +} + +"Voicetest_Mix" +{ +// group name mix value +// ---------- --------- + + "NPC_Voice" "1.0" + "Dialog" "1.0" + "Alyx_Dialog" "1.0" + "Citizen_Dialog" "1.0" + "Barney_Dialog" "1.0" + "Metrocop_Dialog" "1.0" + "Soldier_Dialog" "1.0" + "All" "0.1" +} + +"Citadel_Dialog_Only" +{ +// group name mix value +// ---------- --------- + + "NPC_Voice" "0.72" + "Dialog" "0.72" + "Alyx_Dialog" "0.72" + "Gman_Dialog" "0.72" + "Music" "0.81" + "All" "0.01" +} + +// add new sound mixers here...ALWAYS use Default_Mix as a template. + +// +//Soundmixer for hunted sewers ghroth experiment +// + +"huntedsewers_mix" +{ +// group name mix value +// ---------- --------- + "Explosions" "0.90" + "bullethit" "0.67" + "bulletmiss" "0.7" + "Player" "0.7" + "Player_Weapons_Loud" "1.0" + "Player_Weapons" "0.7" + "Weapons" "0.79" + "Ambient" "0.7" + "Ambient_Water" "0.7" + "Ambient_Atmosphere" "0.7" + "Physics" "0.7" + "Doors" "0.7" + "Buttons" "0.7" + "Items" "0.7" + "Music" "0.81" + "UI" "0.7" + "All" "0.72" +} \ No newline at end of file diff --git a/scripts/soundscapes_ff.txt b/scripts/soundscapes_ff.txt new file mode 100644 index 0000000..4856dd6 --- /dev/null +++ b/scripts/soundscapes_ff.txt @@ -0,0 +1,197 @@ +// DSP Effects +// 0 : "Normal (off)" +// 1 : "Generic" +// 2 : "Metal Small" +// 3 : "Metal Medium" +// 4 : "Metal Large" +// 5 : "Tunnel Small" +// 6 : "Tunnel Medium" +// 7 : "Tunnel Large" +// 8 : "Chamber Small" +// 9 : "Chamber Medium" +// 10: "Chamber Large" +// 11: "Bright Small" +// 12: "Bright Medium" +// 13: "Bright Large" +// 14: "Water 1" +// 15: "Water 2" +// 16: "Water 3" +// 17: "Concrete Small" +// 18: "Concrete Medium" +// 19: "Concrete Large" +// 20: "Big 1" +// 21: "Big 2" +// 22: "Big 3" +// 23: "Cavern Small" +// 24: "Cavern Medium" +// 25: "Cavern Large" +// 26: "Weirdo 1" +// 27: "Weirdo 2" +// 28: "Weirdo 3" + +// General soundscapes + +// This soundscape enables automatic dsp + +"ff_automatic" +{ + "dsp" "1" + "dsp_volume" "1.0" + "SOUNDMIXER" "Display_Mix" +} + +// This soundscape enables automatic dsp at 50% mix - good if you have +// a lot of dialog that must be understood at any distance + +"ff_automatic_dialog" +{ + "dsp" "1" + "dsp_volume" "0.5" + "SOUNDMIXER" "Voicetest_Mix" +} + +// +//Ghroths soundscape and soundmixer experiment, if the soundscapes below are worthy, then they can be moved to the _soundscape.txt +// + +//---------------------------------------------------------------- +// soundmixers.txt, referenced in soundscapes_ff via "SOUNDMIXER" "name" +//---------------------------------------------------------------- + +"ff_huntedsewers" +{ + "dsp" "1" + "dsp_volume" "1.0" + "SOUNDMIXER" "huntedsewers_mix" + + "playsoundscape" + { + "name" "ff_huntedsewers.water" + "volume" "1.0" + } + + "playsoundscape" + { + "name" "ff_huntedsewers.air" + "volume" "1.0" + } +} + +"ff_huntedsewers.water" +{ + "dsp" "15" + "dsp_volume" "1.0" + "SOUNDMIXER" "huntedsewers_mix" + + "playlooping" + { + "volume" "0.5" + "pitch" "95" + "soundlevel" "SNDLVL_NORM" + "position" "0" + "wave" "ambient/water/water_run1.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "soundlevel" "SNDLVL_NORM" + "position" "1" + "wave" "ambient/water/water_run1.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "105" + "soundlevel" "SNDLVL_NORM" + "position" "2" + "wave" "ambient/water/water_run1.wav" + } +} + +"ff_huntedsewers.air" +{ + "dsp" "18" + "dsp_volume" "1.0" + "SOUNDMIXER" "huntedsewers_mix" + + "playlooping" + { + "volume" "0.5" + "pitch" "95" + "soundlevel" "SNDLVL_NORM" + "position" "3" + "wave" "ambient/atmosphere/ambience_base.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "soundlevel" "SNDLVL_NORM" + "position" "4" + "wave" "ambient/atmosphere/ambience_base.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "105" + "soundlevel" "SNDLVL_NORM" + "position" "5" + "wave" "ambient/atmosphere/ambience_base.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "soundlevel" "SNDLVL_NORM" + "position" "6" + "wave" "ambient/atmosphere/ambience_base.wav" + } + + "playlooping" + { + "volume" "0.5" + "pitch" "95" + "soundlevel" "SNDLVL_NORM" + "position" "7" + "wave" "ambient/atmosphere/ambience_base.wav" + } +} + +"ff_huntedsewers.distant" +{ + "dsp" "15" + "dsp_volume" "1.0" + "SOUNDMIXER" "huntedsewers_mix" + + "playrandom" + { + "volume" "0.5,1.0" + "time" "0.1,3.0" + "pitch" "95,105" + "position" "1" + + "rndwave" + { + "wave" "ambient/water/distant_drip1.wav" + "wave" "ambient/water/distant_drip2.wav" + "wave" "ambient/water/distant_drip3.wav" + "wave" "ambient/water/distant_drip4.wav" + } + } + + "playlooping" + { + "volume" "0.5" + "pitch" "95" + "soundlevel" "SNDLVL_NORM" + "position" "0" + "wave" "ambient/atmosphere/quiet_cellblock_amb.wav" + } + +} diff --git a/scripts/soundscapes_ff_anticitizen.txt b/scripts/soundscapes_ff_anticitizen.txt new file mode 100644 index 0000000..bfffc10 --- /dev/null +++ b/scripts/soundscapes_ff_anticitizen.txt @@ -0,0 +1,241 @@ +//Soundscapes for ff_anticitizen. +//Created by Nezumi + +//p1_off_spawn +//p1_outside +//p1_inside +//p1_def_spawn +//p2_generic +//p2_tech +//p2_tunnel +//p3_outside + +"p1_off_spawn" +{ + "dsp" "1" + + "playlooping" + { + "volume" ".3" + "pitch" "60" + "wave" "ambient/atmosphere/plaza_amb.wav" + } +} + +"p1_outside" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "wave" "ambient/atmosphere/town_ambience.wav" + } + + "playrandom" + { + "time" "8, 16" + "volume" "0.2, 0.5" + "pitch" "70, 90" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } + + "playrandom" + { + "time" "35, 50" + "volume" "0.8, 0.9" + "pitch" "100" + "rndwave" + { + "wave" "npc/overwatch/cityvoice/f_confirmcivilstatus_1_spkr.wav" + "wave" "npc/overwatch/cityvoice/fprison_restrictorsdisengaged.wav" + "wave" "npc/overwatch/cityvoice/f_anticivil1_5_spkr.wav" + } + } +} + +"p1_inside" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/town_ambience.wav" + } + + "playrandom" + { + "time" "35, 50" + "volume" "0.6, 0.7" + "pitch" "100" + "rndwave" + { + "wave" "npc/overwatch/cityvoice/f_confirmcivilstatus_1_spkr.wav" + "wave" "npc/overwatch/cityvoice/fprison_restrictorsdisengaged.wav" + "wave" "npc/overwatch/cityvoice/f_anticivil1_5_spkr.wav" + } + } +} + +"p1_def_spawn" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.1" + "pitch" "100" + "wave" "ambient/atmosphere/quiet_cellblock_amb.wav" + } +} + + +"p2_generic" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/engine_room.wav" + } + + "playrandom" + { + "time" "35, 50" + "pitch" "100" + "volume" "0.6, 0.9" + "rndwave" + { + "wave" "npc/overwatch/cityvoice/f_evasionbehavior_1_spkr.wav" + "wave" "npc/overwatch/cityvoice/f_protectionresponse_4_spkr.wav" + "wave" "npc/overwatch/cityvoice/fprison_detectionsystemsout.wav" + } + } +} + +"p2_tech" +{ + "dsp" "1" + + "playsoundscape" + { + "name" "p2_generic" + "volume" "1" + } + + "playrandom" + { + "time" "4, 10" + "volume" "0.2, 0.6" + "pitch" "100" + "rndwave" + { + "wave" "ambient/machines/combine_terminal_idle1.wav" + "wave" "ambient/machines/combine_terminal_idle2.wav" + "wave" "ambient/machines/combine_terminal_idle3.wav" + "wave" "ambient/machines/combine_terminal_idle4.wav" + } + } + + "playrandom" + { + "time" "35, 50" + "volume" "0.6, 0.9" + "pitch" "100" + "rndwave" + { + "wave" "npc/overwatch/cityvoice/f_evasionbehavior_1_spkr.wav" + "wave" "npc/overwatch/cityvoice/f_protectionresponse_4_spkr.wav" + "wave" "npc/overwatch/cityvoice/fprison_detectionsystemsout.wav" + } + } +} + +"p2_tunnel" +{ + "dsp" "1" + + "playsoundscape" + { + "name" "p2_generic" + "volume" "1" + "pitch" ".8" + } + + "playrandom" + { + "time" "6, 16" + "volume" "0.2, 0.4" + "pitch" "90, 110" + "rndwave" + { + "wave" "ambient/materials/rock1.wav" + "wave" "ambient/materials/rock2.wav" + "wave" "ambient/materials/rock3.wav" + "wave" "ambient/materials/rock4.wav" + } + } +} + +"p3_outside" +{ + "dsp" "1" + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/wind/wasteland_wind.wav" + } + + "playrandom" + { + "time" "4, 10" + "volume" "0.3, 0.6" + "pitch" "90, 110" + "rndwave" + { + "wave" "ambient/materials/rock1.wav" + "wave" "ambient/materials/rock2.wav" + "wave" "ambient/materials/rock3.wav" + "wave" "ambient/materials/rock4.wav" + "wave" "ambient/materials/rock5.wav" + } + } + + "playrandom" + { + "time" "8, 16" + "volume" "0.2, 0.3" + "pitch" "70, 90" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } + + "playrandom" + { + "time" "50, 80" + "volume" "0.6, 0.9" + "pitch" "100" + "rndwave" + { + "wave" "npc/overwatch/cityvoice/fprison_airwatchdispatched.wav" + "wave" "npc/overwatch/cityvoice/fprison_dropforcesixandeight.wav" + "wave" "npc/overwatch/cityvoice/f_protectionresponse_5_spkr.wav" + } + } +} \ No newline at end of file diff --git a/scripts/soundscapes_ff_tiger.txt b/scripts/soundscapes_ff_tiger.txt new file mode 100644 index 0000000..9381d33 --- /dev/null +++ b/scripts/soundscapes_ff_tiger.txt @@ -0,0 +1,272 @@ +//soundscapes for ff_tiger +//written by Nezumi. + +//outside +"outside" +{ + "dsp" "1" + "playlooping" + { + "volume" ".4" + "pitch" "100" + "wave" "ambient/atmosphere/town_ambience.wav" + } + + "playrandom" + { + "time" "4.0, 4.2" + "volume" "0.3, 0.5" + "pitch" "80, 120" + "rndwave" + { + "wave" "ambient/water/distant_wave1.wav" + "wave" "ambient/water/distant_wave2.wav" + "wave" "ambient/water/distant_wave3.wav" + } + } + + "playrandom" + { + "time" "8.0, 15.0" + "volume" "0.2, 0.4" + "pitch" "80, 100" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } +} + +//light house +"lhouse" +{ + "dsp" "1" + "playlooping" + { + "volume" ".3" + "pitch" "100" + "wave" "ambient/wind/wasteland_wind.wav" + } + + "playrandom" + { + "time" "4.0, 4.2" + "volume" "0.1, 0.3" + "pitch" "60, 100" + "rndwave" + { + "wave" "ambient/water/distant_wave1.wav" + "wave" "ambient/water/distant_wave2.wav" + "wave" "ambient/water/distant_wave3.wav" + } + } + + "playrandom" + { + "time" "12.0, 20.0" + "volume" "0.1, 0.2" + "pitch" "80, 100" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } +} + +//red base tunnels. +"rtun" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/undercity_loop1.wav" + } + + "playlooping" + { + "volume" "1" + "pitch" "80" + "position" "1" + "wave" "ambient/water/lake_water.wav" + } + + "playrandom" + { + "time" "1.0, 5.0" + "volume" "0.3, 0.6" + "pitch" "80, 110" + "rndwave" + { + "wave" "ambient/water/distant_drip1.wav" + "wave" "ambient/water/distant_drip2.wav" + "wave" "ambient/water/distant_drip3.wav" + "wave" "ambient/water/distant_drip4.wav" + } + } +} + +//red spawn room +"rspawn" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.6" + "pitch" "100" + "wave" "ambient/atmosphere/undercity_loop1.wav" + } + + "playlooping" + { + "volume" ".3" + "pitch" "100" + "position" "0" + "wave" "ambient/levels/canals/dam_water_loop2.wav" + } + + "playlooping" + { + "volume" "0.6" + "pitch" "100" + "position" "1" + "wave" "ambient/atmosphere/pipe1.wav" + } + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "position" "2" + "wave" "ambient/atmosphere/pipe1.wav" + } + + "playlooping" + { + "volume" "0.6" + "pitch" "100" + "position" "3" + "wave" "ambient/levels/canals/generator_ambience_loop1.wav" + } +} + +//warehouses +"whouse" +{ + "dsp" "1" + "playlooping" + { + "volume" ".2" + "pitch" "100" + "wave" "ambient/atmosphere/indoor2.wav" + } + + "playrandom" + { + "time" "4.0, 4.2" + "volume" "0.1, 0.2" + "pitch" "60, 100" + "rndwave" + { + "wave" "ambient/water/distant_wave1.wav" + "wave" "ambient/water/distant_wave2.wav" + "wave" "ambient/water/distant_wave3.wav" + } + } + + "playrandom" + { + "time" "12.0, 20.0" + "volume" "0.1, 0.2" + "pitch" "80, 100" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } +} + +//laundry tunnels +"ltun" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.5" + "pitch" "100" + "wave" "ambient/atmosphere/laundry_amb.wav" + } + + "playrandom" + { + "time" "4.0, 4.2" + "volume" "0.1, 0.2" + "pitch" "60, 100" + "rndwave" + { + "wave" "ambient/water/distant_wave1.wav" + "wave" "ambient/water/distant_wave2.wav" + "wave" "ambient/water/distant_wave3.wav" + } + } + + "playrandom" + { + "time" "12.0, 20.0" + "volume" "0.1, 0.2" + "pitch" "80, 100" + "rndwave" + { + "wave" "ambient/wind/wind_hit1.wav" + "wave" "ambient/wind/wind_hit2.wav" + "wave" "ambient/wind/wind_hit3.wav" + } + } +} + +//blue tunnels +"btun" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/tunnel1.wav" + } + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/underground.wav" + } + +} + +//blue spawn +"bspawn" +{ + "dsp" "1" + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "wave" "ambient/atmosphere/ambience_base.wav" + } + + "playlooping" + { + "volume" "0.3" + "pitch" "100" + "position" "1" + "wave" "ambient/atmosphere/pipe1.wav" + } +} \ No newline at end of file diff --git a/scripts/soundscapes_manifest.txt b/scripts/soundscapes_manifest.txt new file mode 100644 index 0000000..a83b519 --- /dev/null +++ b/scripts/soundscapes_manifest.txt @@ -0,0 +1,31 @@ +soundscapes_manifest +{ + // Generic FF soundscapes + "file" "scripts/soundscapes_ff.txt" + + // Map-specific FF soundscapes (no need to list map soundscapes here anymore) + // Place in "maps" folder with the filename as _soundscapes.txt + //"file" "maps/ff_dev_test_sounds_soundscapes.txt" + //"file" "maps/ff_hunted_soundscapes.txt" + + // Put your map's soundscape txt file in "FortressForever\maps" and give it the + // EXACT SAME NAME AS YOUR MAP's FILENAME followed by _soundscapes.txt + // IE: FortressForever\maps\_soundscapes.txt + // IE: FortressForever\maps\ff_2fort_soundscapes.txt + + + ////////////////////////////////////////////////////// + // HL2 soundscapes (located in "source engine.gcf") // + ////////////////////////////////////////////////////// + + "file" "scripts/soundscapes.txt" + "file" "scripts/soundscapes_canals.txt" + "file" "scripts/soundscapes_klab.txt" + "file" "scripts/soundscapes_elab.txt" + "file" "scripts/soundscapes_streetwar.txt" + "file" "scripts/soundscapes_citadel.txt" + "file" "scripts/soundscapes_town.txt" + "file" "scripts/soundscapes_coast.txt" + "file" "scripts/soundscapes_prison.txt" + "file" "scripts/soundscapes_trainyard.txt" +} diff --git a/scripts/vehicles/jeep_test.txt b/scripts/vehicles/jeep_test.txt new file mode 100644 index 0000000..d471534 --- /dev/null +++ b/scripts/vehicles/jeep_test.txt @@ -0,0 +1,269 @@ +// This is a test jeep type vehicle for the wasteland + +"vehicle" +{ + "wheelsperaxle" "2" + "body" + { + "countertorquefactor" "1" + "massCenterOverride" "0 0 0" + "massoverride" "800" // kg + "addgravity" "0.33" + } + "engine" + { + "horsepower" "350" + "maxrpm" "3000" + "maxspeed" "35" // mph + "maxReverseSpeed" "20" // mph + "autotransmission" "1" + "axleratio" "4.56" + "gear" "1.86" // 1st gear + "gear" "1.59" // 2nd gear + "gear" "1.17" // 3rd gear + "gear" "1.0" // 4th gear + "gear" "0.84" // 5th gear + "shiftuprpm" "1500" + "shiftdownrpm" "300" + + "boost" + { +// "force" "1.5" // 1.5 car body mass * gravity * inches / second ^ 2 + "duration" "1.0" // 1 second of boost + "delay" "15" // 15 seconds before you can use it again + "torqueboost" "1" // enable "sprint" mode of vehicle, not force type booster + "maxspeed" "50" // maximum turbo speed + "force" "2.5" // use for value as a boost factor + } + } + "steering" + { + "degrees" "26" + "fastdampen" "0.35" + "slowcarspeed" "0" + "fastcarspeed" "40" + "slowsteeringrate" "4" + "faststeeringrate" "2" + "steeringRestFactor" "1.5" + "turnbrake" "0.25" + + "skidallowed" "1" + "dustcloud" "1" + } + + // front axle + "axle" + { + "wheel" + { + "radius" "18" + "mass" "100" + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" + "rotdamping" "0.0" + "material" "jeeptire" + "skidmaterial" "slidingrubbertire" + "brakematerial" "brakingrubbertire" + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + + "torquefactor" "0.8" + "brakefactor" "0.5" + } + + // rear axle + "axle" + { + "wheel" + { + "radius" "20" + "mass" "100" + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" + "rotdamping" "0.0" + "material" "jeeptire" + "skidmaterial" "slidingrubbertire" + "brakematerial" "brakingrubbertire" + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + "torquefactor" "0.2" + "brakefactor" "0.5" + } +} + +"vehicle_sounds" +{ + // List gears in order from lowest speed to highest speed + + "gear" + { + "max_speed" "0.3" + "speed_approach_factor" "1.0" + } + + "gear" + { + "max_speed" "0.5" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.75" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.90" + "speed_approach_factor" "0.035" + } + "gear" + { + "max_speed" "0.95" + "speed_approach_factor" "0.015" + } + "gear" + { + "max_speed" "2.0" + "speed_approach_factor" "0.03" + } + "state" + { + "name" "SS_START_WATER" + "sound" "ATV_start_in_water" + } + + "state" + { + "name" "SS_START_IDLE" + "sound" "ATV_engine_start" + } + "state" + { + "name" "SS_SHUTDOWN_WATER" + "sound" "ATV_stall_in_water" + } + "state" + { + "name" "SS_IDLE" + "sound" "ATV_engine_idle" + } + "state" + { + "name" "SS_REVERSE" + "sound" "ATV_reverse" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_0" + "sound" "ATV_rev" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_0_RESUME" + "sound" "ATV_engine_idle" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_1" + "sound" "ATV_firstgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_1_RESUME" + "sound" "ATV_firstgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2" + "sound" "ATV_secondgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2_RESUME" + "sound" "ATV_secondgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3" + "sound" "ATV_thirdgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3_RESUME" + "sound" "ATV_thirdgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4" + "sound" "ATV_fourthgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4_RESUME" + "sound" "ATV_fourthgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_SLOWDOWN_HIGHSPEED" + "sound" "ATV_throttleoff_fastspeed" + } + "state" + { + "name" "SS_SLOWDOWN" + "sound" "ATV_throttleoff_slowspeed" + } + "state" + { + "name" "SS_TURBO" + "sound" "ATV_turbo_on" + "min_time" "2.5" + } + "state" + { + "name" "SS_SHUTDOWN" + "sound" "ATV_engine_stop" + } + "crashsound" + { + "min_speed" "350" + "min_speed_change" "250" + "sound" "ATV_impact_medium" + "gear_limit" "1" + } + "crashsound" + { + "min_speed" "450" + "min_speed_change" "350" + "sound" "ATV_impact_heavy" + } + + + "skid_lowfriction" "ATV_skid_lowfriction" + "skid_normalfriction" "ATV_skid_normalfriction" + "skid_highfriction" "ATV_skid_highfriction" +} diff --git a/scripts/vehicles/jeep_test_hl2.txt b/scripts/vehicles/jeep_test_hl2.txt new file mode 100644 index 0000000..d471534 --- /dev/null +++ b/scripts/vehicles/jeep_test_hl2.txt @@ -0,0 +1,269 @@ +// This is a test jeep type vehicle for the wasteland + +"vehicle" +{ + "wheelsperaxle" "2" + "body" + { + "countertorquefactor" "1" + "massCenterOverride" "0 0 0" + "massoverride" "800" // kg + "addgravity" "0.33" + } + "engine" + { + "horsepower" "350" + "maxrpm" "3000" + "maxspeed" "35" // mph + "maxReverseSpeed" "20" // mph + "autotransmission" "1" + "axleratio" "4.56" + "gear" "1.86" // 1st gear + "gear" "1.59" // 2nd gear + "gear" "1.17" // 3rd gear + "gear" "1.0" // 4th gear + "gear" "0.84" // 5th gear + "shiftuprpm" "1500" + "shiftdownrpm" "300" + + "boost" + { +// "force" "1.5" // 1.5 car body mass * gravity * inches / second ^ 2 + "duration" "1.0" // 1 second of boost + "delay" "15" // 15 seconds before you can use it again + "torqueboost" "1" // enable "sprint" mode of vehicle, not force type booster + "maxspeed" "50" // maximum turbo speed + "force" "2.5" // use for value as a boost factor + } + } + "steering" + { + "degrees" "26" + "fastdampen" "0.35" + "slowcarspeed" "0" + "fastcarspeed" "40" + "slowsteeringrate" "4" + "faststeeringrate" "2" + "steeringRestFactor" "1.5" + "turnbrake" "0.25" + + "skidallowed" "1" + "dustcloud" "1" + } + + // front axle + "axle" + { + "wheel" + { + "radius" "18" + "mass" "100" + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" + "rotdamping" "0.0" + "material" "jeeptire" + "skidmaterial" "slidingrubbertire" + "brakematerial" "brakingrubbertire" + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + + "torquefactor" "0.8" + "brakefactor" "0.5" + } + + // rear axle + "axle" + { + "wheel" + { + "radius" "20" + "mass" "100" + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" + "rotdamping" "0.0" + "material" "jeeptire" + "skidmaterial" "slidingrubbertire" + "brakematerial" "brakingrubbertire" + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + "torquefactor" "0.2" + "brakefactor" "0.5" + } +} + +"vehicle_sounds" +{ + // List gears in order from lowest speed to highest speed + + "gear" + { + "max_speed" "0.3" + "speed_approach_factor" "1.0" + } + + "gear" + { + "max_speed" "0.5" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.75" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.90" + "speed_approach_factor" "0.035" + } + "gear" + { + "max_speed" "0.95" + "speed_approach_factor" "0.015" + } + "gear" + { + "max_speed" "2.0" + "speed_approach_factor" "0.03" + } + "state" + { + "name" "SS_START_WATER" + "sound" "ATV_start_in_water" + } + + "state" + { + "name" "SS_START_IDLE" + "sound" "ATV_engine_start" + } + "state" + { + "name" "SS_SHUTDOWN_WATER" + "sound" "ATV_stall_in_water" + } + "state" + { + "name" "SS_IDLE" + "sound" "ATV_engine_idle" + } + "state" + { + "name" "SS_REVERSE" + "sound" "ATV_reverse" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_0" + "sound" "ATV_rev" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_0_RESUME" + "sound" "ATV_engine_idle" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_1" + "sound" "ATV_firstgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_1_RESUME" + "sound" "ATV_firstgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2" + "sound" "ATV_secondgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2_RESUME" + "sound" "ATV_secondgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3" + "sound" "ATV_thirdgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3_RESUME" + "sound" "ATV_thirdgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4" + "sound" "ATV_fourthgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4_RESUME" + "sound" "ATV_fourthgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_SLOWDOWN_HIGHSPEED" + "sound" "ATV_throttleoff_fastspeed" + } + "state" + { + "name" "SS_SLOWDOWN" + "sound" "ATV_throttleoff_slowspeed" + } + "state" + { + "name" "SS_TURBO" + "sound" "ATV_turbo_on" + "min_time" "2.5" + } + "state" + { + "name" "SS_SHUTDOWN" + "sound" "ATV_engine_stop" + } + "crashsound" + { + "min_speed" "350" + "min_speed_change" "250" + "sound" "ATV_impact_medium" + "gear_limit" "1" + } + "crashsound" + { + "min_speed" "450" + "min_speed_change" "350" + "sound" "ATV_impact_heavy" + } + + + "skid_lowfriction" "ATV_skid_lowfriction" + "skid_normalfriction" "ATV_skid_normalfriction" + "skid_highfriction" "ATV_skid_highfriction" +} diff --git a/scripts/vehicles/jeep_test_old.txt b/scripts/vehicles/jeep_test_old.txt new file mode 100644 index 0000000..8a4546a --- /dev/null +++ b/scripts/vehicles/jeep_test_old.txt @@ -0,0 +1,269 @@ +// This is a test jeep type vehicle for the wasteland + +"vehicle" +{ + "wheelsperaxle" "2" // wheels per axle + "body" + { + + "massCenterOverride" "0 0 0" // leave at vec3_origin for no override + "massoverride" "800" // in kg, leave at 0 for no override (kg) + "addgravity" "0.33" // keeps car down + } + "engine" + { + "horsepower" "350" // engine power + "maxrpm" "3000" // max rounds per minute + "maxspeed" "35" // forward mph + "maxReverseSpeed" "20" // backward mph + "autotransmission" "1" // true for auto, false for manual + "axleratio" "4.56" // ratio of engine rev to axle rev + "gear" "1.86" // 1st gear (max 6 gears) + "gear" "1.59" // 2nd gear + "gear" "1.17" // 3rd gear + "gear" "1.0" // 4th gear + "gear" "0.84" // 5th gear + "shiftuprpm" "1500" // max RPMs to switch to a higher gear + "shiftdownrpm" "300" // min RPMs to switch to a lower gear + + "boost" + { +// "force" "1.5" // 1.5 car body mass * gravity * inches / second ^ 2 + "duration" "1.0" // 1 second of boost + "delay" "15" // 15 seconds before you can use it again + "torqueboost" "1" // enable "sprint" mode of vehicle, not force type booster + "maxspeed" "50" // maximum turbo speed + "force" "2.5" // use for value as a boost factor + } + } + "steering" + { + "degrees" "60" // angle in degrees of steering + + "slowcarspeed" "0" // this is the max speed of "slow" + "fastcarspeed" "40" // this is the min speed of "fast" + "slowsteeringrate" "4" // this is the speed the wheels are steered when the vehicle is "slow" + "faststeeringrate" "2" // this is the speed the wheels are steered when the vehicle is "fast" + "steeringRestFactor" "1.5" // this is the speed at which the wheels move toward their resting state (straight ahead) + + + "skidallowed" "1" // true/false skid flag + "dustcloud" "1" // flag for creating a dustcloud behind vehicle + } + + // front axle + "axle" + { + "wheel" + { + "radius" "18" + "mass" "100" // in kg + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" // usually 0 + "rotdamping" "0.0" // usually 0 + "material" "jeeptire" // tire surface properties + "skidmaterial" "slidingrubbertire" // surface properties when sliding + "brakematerial" "brakingrubbertire" // surface properties wen breaking + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + + "torquefactor" "0.8" // normalized to 1 across all axles + "brakefactor" "0.5" // normalized to 1 across all axles + } + + // rear axle + "axle" + { + "wheel" + { + "radius" "20" + "mass" "100" + "inertia" "0.5" // steady the car (fixes the oscillation of the axles about z) + "damping" "0" + "rotdamping" "0.0" + "material" "jeeptire" + "skidmaterial" "slidingrubbertire" + "brakematerial" "brakingrubbertire" + } + "suspension" + { + "springConstant" "80" + "springDamping" "4" + "stabilizerConstant" "110" + "springDampingCompression" "4" + "maxBodyForce" "250" + } + "torquefactor" "0.2" + "brakefactor" "0.5" + } +} + +"vehicle_sounds" +{ + // List gears in order from lowest speed to highest speed + + "gear" + { + "max_speed" "0.3" + "speed_approach_factor" "1.0" + } + + "gear" + { + "max_speed" "0.5" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.75" + "speed_approach_factor" "0.07" + } + "gear" + { + "max_speed" "0.90" + "speed_approach_factor" "0.035" + } + "gear" + { + "max_speed" "0.95" + "speed_approach_factor" "0.015" + } + "gear" + { + "max_speed" "2.0" + "speed_approach_factor" "0.03" + } + "state" + { + "name" "SS_START_WATER" + "sound" "ATV_start_in_water" + } + + "state" + { + "name" "SS_START_IDLE" + "sound" "ATV_engine_start" + } + "state" + { + "name" "SS_SHUTDOWN_WATER" + "sound" "ATV_stall_in_water" + } + "state" + { + "name" "SS_IDLE" + "sound" "ATV_engine_idle" + } + "state" + { + "name" "SS_REVERSE" + "sound" "ATV_reverse" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_0" + "sound" "ATV_rev" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_0_RESUME" + "sound" "ATV_engine_idle" + "min_time" "0.75" + } + "state" + { + "name" "SS_GEAR_1" + "sound" "ATV_firstgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_1_RESUME" + "sound" "ATV_firstgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2" + "sound" "ATV_secondgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_2_RESUME" + "sound" "ATV_secondgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3" + "sound" "ATV_thirdgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_3_RESUME" + "sound" "ATV_thirdgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4" + "sound" "ATV_fourthgear" + "min_time" "0.5" + } + "state" + { + "name" "SS_GEAR_4_RESUME" + "sound" "ATV_fourthgear_noshift" + "min_time" "0.5" + } + "state" + { + "name" "SS_SLOWDOWN_HIGHSPEED" + "sound" "ATV_throttleoff_fastspeed" + } + "state" + { + "name" "SS_SLOWDOWN" + "sound" "ATV_throttleoff_slowspeed" + } + "state" + { + "name" "SS_TURBO" + "sound" "ATV_turbo_on" + "min_time" "2.5" + } + "state" + { + "name" "SS_SHUTDOWN" + "sound" "ATV_engine_stop" + } + "crashsound" + { + "min_speed" "350" + "min_speed_change" "250" + "sound" "ATV_impact_medium" + "gear_limit" "1" + } + "crashsound" + { + "min_speed" "450" + "min_speed_change" "350" + "sound" "ATV_impact_heavy" + } + + + "skid_lowfriction" "ATV_skid_lowfriction" + "skid_normalfriction" "ATV_skid_normalfriction" + "skid_highfriction" "ATV_skid_highfriction" +} diff --git a/scripts/weapon_cubemap.txt b/scripts/weapon_cubemap.txt new file mode 100644 index 0000000..1882edd --- /dev/null +++ b/scripts/weapon_cubemap.txt @@ -0,0 +1,72 @@ +// Cubemap visualization tool + +// This weapon script was taken from "source engine.gcf" so we can +// use different "bucket" and "bucket_position" settings in FF. + +WeaponData +{ + // Weapon data is loaded by both the Game and Client DLLs. + "printname" "#HL2_Cubemap" + "viewmodel" "models/shadertest/envballs.mdl" + "playermodel" "models/shadertest/envballs.mdl" + "anim_prefix" "envballs" + "bucket" "0" + "bucket_position" "2" + + "clip_size" "-1" + "clip2_size" "-1" + + "default_clip" "-1" + "default_clip2" "-1" + + "primary_ammo" "None" + "secondary_ammo" "None" + + "weight" "0" + "item_flags" "0" + + // Weapon Sprite data is loaded by the Client DLL. + TextureData + { + "weapon" + { + "file" "sprites/w_icons1" + "x" "128" + "y" "128" + "width" "128" + "height" "64" + } + "weapon_s" + { + "file" "sprites/w_icons1b" + "x" "128" + "y" "128" + "width" "128" + "height" "64" + } + "ammo" + { + "file" "sprites/a_icons1" + "x" "55" + "y" "60" + "width" "73" + "height" "15" + } + "crosshair" + { + "file" "sprites/crosshairs" + "x" "0" + "y" "48" + "width" "24" + "height" "24" + } + "autoaim" + { + "file" "sprites/crosshairs" + "x" "0" + "y" "48" + "width" "24" + "height" "24" + } + } +} \ No newline at end of file diff --git a/sprays/FF_logo.tga b/sprays/FF_logo.tga new file mode 100644 index 0000000..1e103ef Binary files /dev/null and b/sprays/FF_logo.tga differ diff --git a/sprays/blue_logo_no_sign.tga b/sprays/blue_logo_no_sign.tga new file mode 100644 index 0000000..1c206b3 Binary files /dev/null and b/sprays/blue_logo_no_sign.tga differ diff --git a/sprays/blue_logo_sign.tga b/sprays/blue_logo_sign.tga new file mode 100644 index 0000000..0a1641b Binary files /dev/null and b/sprays/blue_logo_sign.tga differ diff --git a/sprays/green_logo_no_sign.tga b/sprays/green_logo_no_sign.tga new file mode 100644 index 0000000..71c9d0a Binary files /dev/null and b/sprays/green_logo_no_sign.tga differ diff --git a/sprays/green_logo_sign.tga b/sprays/green_logo_sign.tga new file mode 100644 index 0000000..5cbf524 Binary files /dev/null and b/sprays/green_logo_sign.tga differ diff --git a/sprays/mulch_face.tga b/sprays/mulch_face.tga new file mode 100644 index 0000000..549a871 Binary files /dev/null and b/sprays/mulch_face.tga differ diff --git a/sprays/red_logo_no_sign.tga b/sprays/red_logo_no_sign.tga new file mode 100644 index 0000000..328d0fb Binary files /dev/null and b/sprays/red_logo_no_sign.tga differ diff --git a/sprays/red_logo_sign.tga b/sprays/red_logo_sign.tga new file mode 100644 index 0000000..520f576 Binary files /dev/null and b/sprays/red_logo_sign.tga differ diff --git a/sprays/yellow_logo_no_sign.tga b/sprays/yellow_logo_no_sign.tga new file mode 100644 index 0000000..84a777d Binary files /dev/null and b/sprays/yellow_logo_no_sign.tga differ diff --git a/sprays/yellow_logo_sign.tga b/sprays/yellow_logo_sign.tga new file mode 100644 index 0000000..5d12125 Binary files /dev/null and b/sprays/yellow_logo_sign.tga differ diff --git a/stats.txt b/stats.txt new file mode 100644 index 0000000..e69de29 diff --git a/steam.inf b/steam.inf new file mode 100644 index 0000000..642bd08 --- /dev/null +++ b/steam.inf @@ -0,0 +1,2 @@ +ProductName=FortressForever +appID=253530 \ No newline at end of file diff --git a/tfcxhairs.vdf b/tfcxhairs.vdf new file mode 100644 index 0000000..9ae8ed4 --- /dev/null +++ b/tfcxhairs.vdf @@ -0,0 +1,378 @@ +"Crosshairs" +{ + "globalCrosshairs" "0" + "none" + { + "innerChar" "6" + "InnerScale" "2" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "200" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "crowbar" + { + "innerChar" "^" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "200" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "knife" + { + "innerChar" "^" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "200" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "1" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "medkit" + { + "innerChar" "4" + "InnerScale" "2" + "innerR" "180" + "innerG" "0" + "innerB" "0" + "innerA" "203" + "InnerUseGlobal" "0" + "outerChar" "C" + "outerScale" "1" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "146" + "outerUseGlobal" "0" + } + "spanner" + { + "innerChar" "^" + "InnerScale" "1" + "innerR" "255" + "innerG" "153" + "innerB" "0" + "innerA" "200" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "umbrella" + { + "innerChar" "^" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "200" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "flag" + { + "innerChar" "1" + "InnerScale" "5" + "innerR" "255" + "innerG" "255" + "innerB" "255" + "innerA" "255" + "InnerUseGlobal" "1" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "255" + "outerUseGlobal" "1" + } + "shotgun" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "supershotgun" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "nailgun" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "1" + "outerChar" "Z" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "255" + "outerUseGlobal" "1" + } + "supernailgun" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "173" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "grenadelauncher" + { + "innerChar" "4" + "InnerScale" "1" + "innerR" "0" + "innerG" "98" + "innerB" "255" + "innerA" "255" + "InnerUseGlobal" "0" + "outerChar" "h" + "outerScale" "2" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "155" + "outerUseGlobal" "0" + } + "pipelauncher" + { + "innerChar" "4" + "InnerScale" "1" + "innerR" "112" + "innerG" "168" + "innerB" "0" + "innerA" "214" + "InnerUseGlobal" "0" + "outerChar" "h" + "outerScale" "2" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "153" + "outerUseGlobal" "0" + } + "autorifle" + { + "innerChar" "1" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "R" + "outerScale" "1" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "235" + "outerUseGlobal" "0" + } + "sniperrifle" + { + "innerChar" "1" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "N" + "outerScale" "1" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "140" + "outerUseGlobal" "0" + } + "radiotagrifle" + { + "innerChar" "1" + "InnerScale" "5" + "innerR" "255" + "innerG" "255" + "innerB" "255" + "innerA" "255" + "InnerUseGlobal" "1" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "255" + "outerUseGlobal" "1" + } + "flamethrower" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "incendiarycannon" + { + "innerChar" "4" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "214" + "InnerUseGlobal" "0" + "outerChar" "h" + "outerScale" "2" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "155" + "outerUseGlobal" "0" + } + "railgun" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "tranq" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "assaultcannon" + { + "innerChar" "!" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "175" + "InnerUseGlobal" "0" + "outerChar" "a" + "outerScale" "5" + "outerR" "255" + "outerG" "255" + "outerB" "255" + "outerA" "0" + "outerUseGlobal" "0" + } + "rpg" + { + "innerChar" "4" + "InnerScale" "1" + "innerR" "255" + "innerG" "150" + "innerB" "0" + "innerA" "214" + "InnerUseGlobal" "0" + "outerChar" "h" + "outerScale" "2" + "outerR" "255" + "outerG" "150" + "outerB" "0" + "outerA" "155" + "outerUseGlobal" "0" + } +}