Add game files and server configs

This commit is contained in:
Ahrimdon 2024-02-27 01:39:05 -05:00
parent 13dee3c02b
commit 88402b1781
29 changed files with 22111 additions and 0 deletions

14
cfg/!start_client.bat Normal file
View File

@ -0,0 +1,14 @@
@echo off
:: Either put the batch in the Ghosts install dir, or change the value below to the Ghosts install dir
set GHOSTS_INSTALL=%~dp0
:: Remove this line if automatic updates on start should be disabled
start /W alterware-launcher.exe --update
::///////////////////////////////////////////////////////////////////////
:://You're done!! WARNING!!! Don't mess with anything below this line //
::///////////////////////////////////////////////////////////////////////
set GAME_EXE=iw6-mod.exe
start %GAME_EXE%

22
cfg/!start_mp_server.bat Normal file
View File

@ -0,0 +1,22 @@
@echo off
set ServerFilename=server.cfg
:://///////////////////////////////////////////////////////////////////////////
::// What port do you want the server to run on? //
::// You must port forward this port & allow it through your firewall //
:://///////////////////////////////////////////////////////////////////////////
set port=27016
:: Either put the batch in the Ghosts install dir, or change the value below to the Ghost install dir
set GHOSTS_INSTALL=%~dp0
:: Remove this line if automatic updates on start should be disabled
start /W alterware-launcher.exe --update
::///////////////////////////////////////////////////////////////////////
:://You're done!! WARNING!!! Don't mess with anything below this line //
::///////////////////////////////////////////////////////////////////////
set GAME_EXE=iw6-mod.exe
start %GAME_EXE% -dedicated +set net_port "%port%" +exec %ServerFilename% +map_rotate

22
cfg/!start_zm_server.bat Normal file
View File

@ -0,0 +1,22 @@
@echo off
set ServerFilename=server_zm.cfg
:://///////////////////////////////////////////////////////////////////////////
::// What port do you want the server to run on? //
::// You must port forward this port & allow it through your firewall //
:://///////////////////////////////////////////////////////////////////////////
set port=27016
:: Either put the batch in the Ghosts install dir, or change the value below to the Ghost install dir
set GHOSTS_INSTALL=%~dp0
:: Remove this line if automatic updates on start should be disabled
start /W alterware-launcher.exe --update
::///////////////////////////////////////////////////////////////////////
:://You're done!! WARNING!!! Don't mess with anything below this line //
::///////////////////////////////////////////////////////////////////////
set GAME_EXE=iw6-mod.exe
start %GAME_EXE% -dedicated +set zombiesMode 1 +set net_port "%port%" +exec %ServerFilename% +map_rotate

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,228 @@
version 7
// Entitlement ID Ranges
// 0 - 299 ???
// 300 - 399 Clan Entitlements
// 400 - 599 ???
// 600 - 699 Clan War Entitlements
// 700 - 799 Generic Elite Entitlements
// Number of keys to read from the key archive
keys_to_read 16
// unlocks in game - type, key index, bit, name, payload...
unlock 0 0 600 //clan wars demon_skull_p
unlock 0 1 601 //clan wars dead_ninja_p
unlock 0 2 602 //clan wars mummy_p
unlock 0 3 603 //clan wars skull_bow_p
unlock 0 4 604 //clan wars cyclops_skull_p
unlock 0 5 605 //clan wars dead_gnome_p
unlock 0 6 606 //clan wars gold_grill_p
unlock 0 7 607 //clan wars pirate_skull_p
unlock 0 8 608 //clan wars gargoyle_p
unlock 0 9 609 //clan wars vulture_p
unlock 0 10 610 //clan wars warrior_mask_p
unlock 0 11 611 //clan wars yeti_p
unlock 0 12 612 //clan wars dead_owl_p
unlock 0 13 613 //clan wars money_bags_p
unlock 0 14 614 //clan wars injured_octopus_p
unlock 0 15 615 //clan wars hotdog_p
unlock 0 16 616 //clan wars crab_p
unlock 0 17 617 //clan wars angry_robot_p
unlock 0 18 618 //clan wars triangle_dot_ret
unlock 0 19 619 //clan wars gold_chain_emb
unlock 0 20 620 //clan wars wing_emb
unlock 0 21 621 //clan wars brass_knuck_emb
unlock 0 22 622 //clan wars ninja_emb
unlock 0 25 623 //clan wars reaper head
unlock 0 26 624 //clan wars merc head
unlock 0 27 625 //clan wars body
unlock 0 28 460 //clan wars diamond division reticle
unlock 0 29 401 //clan wars diamond division camo
unlock 0 30 627 //clan wars diamond division assassin head
unlock 0 31 626 //clan wars diamond division savage head
unlock 0 32 628 //clan wars diamond division body
unlock 3 0 700 //Download the mobile app
unlock 3 1 701 //Founder Skull
unlock 3 4 500 //NEVERSOFT
unlock 3 3 501 //IW
unlock 3 5 502 //RAVEN
unlock 3 7 503 //HIGH_MOON
unlock 3 6 504 //BEACHHEAD
unlock 13 0 209 //monster beast patch
unlock 13 2 210 //monster beast playercard
unlock 13 1 211 //monster viper patch
unlock 13 3 212 //monster viper playercard
unlock 13 4 216 //riley / classic ghost head
unlock 13 30 217 //watcher patch
unlock 13 31 213 //federation patch
unlock 13 32 215 //into the deep patch
unlock 13 33 214 //no man's land patch
//Platform Unlocks
platform 200 255161 //team leader head
platform 201 255161 //team leader playercard
platform 202 255161 //team leader patch
platform 403 255161 //team leader camo
platform 451 255161 //team leader reticle
platform 200 255160 //team leader head
platform 201 255160 //team leader playercard
platform 202 255160 //team leader patch
platform 403 255160 //team leader camo
platform 451 255160 //team leader reticle
platform 206 255162 //insignia playercard
platform 205 255162 //insignia patch
platform 216 255165 //classic ghost character
platform 213 255167 //federation patch
platform 214 255168 //no mans land patch
platform 215 255169 //into the deep patch
platform 207 255163 //digital hardened patch
platform 208 255163 //digital hardened playercard
platform 217 255166 //Steam Patch - The Watcher
platform 222 268100 //festive playercard
platform 221 268100 //festive patch
platform 410 268100 //festive camo
platform 453 268100 //festive reticle
platform 550 268101 //wolf
platform 551 277670 //extra slots
platform 552 277671 // hero character - elias
platform 553 277672 // hero character - hesh
platform 554 277673 // hero character - merrick
platform 555 277674 // hero character - keegan
platform 556 277675 // hero character - price
platform 557 281343 // Hazmat character
platform 558 281340 // Makarov Legend Pack
platform 559 281342 // Rorke Character
platform 560 281341 // Zakhaev Character
platform 561 286632 // Soap Legend Pack
platform 562 286633 // Extinction Squad
platform 563 286634 // TF141
platform 490 277676 // Personalization pack 1 - Ducky
platform 491 277677 // Personalization pack 2 - Blood
platform 492 277678 // Personalization pack 3 - Inferno
platform 493 277679 // Personalization pack 4 - Kittens
platform 494 281344 // Personalization pack 5
platform 495 281345 // Personalization pack 6
platform 496 281346 // Personalization pack 7
platform 497 281347 // Personalization pack 8
platform 498 286630 // Personalization pack 9
platform 499 286631 // Personalization pack 10
platform 510 295430 // Personalization pack 11
platform 511 295431 // Personalization pack 12
platform 512 295432 // Personalization pack 13
platform 513 295433 // Personalization pack 14
platform 515 295434 // Personalization pack 15
platform 516 295435 // Personalization pack 16
platform 517 295439 // Personalization pack 17
platform 518 295440 // Personalization pack 18
platform 519 301111 // Personalization pack 19
platform 520 301112 // Personalization pack 20
platform 521 301113 // Personalization pack 21
platform 522 301114 // Personalization pack 22
platform 523 301110 // Personalization pack Flags
platform 564 295436 // Spectrum Character
platform 565 295437 // Astronaut Character
platform 566 295438 // Resistance Squad
platform 567 309870 // Bluntforce Character
platform 568 309871 // Inferno Character
platform 569 309872 // Bling Character
platform 480 259250 //dlc gun 1
platform 480 301116 //dlc gun 1
platform 481 259250 //dlc gun 1
platform 481 301116 //dlc gun 1
platform 482 259251 //Ripper from Devastation
platform 482 255161 //Ripper from Season Pass
platform 482 301115 //Ripper from mDLC
//Clan Entitlements - ID 300 - 399 - type, bit, entitlement id
clan 0 300
clan 0 301
clan 1 302
clan 2 303
clan 3 304
clan 3 305
clan 3 306
clan 4 307
clan 4 308
clan 4 309
clan 5 310
clan 5 311
clan 6 312
clan 7 313
clan 8 314
clan 8 315
clan 8 316
clan 9 317
clan 10 318
clan 10 319
clan 10 320
clan 10 321
clan 10 322
clan 11 323
clan 12 324
clan 13 325
clan 13 326
clan 13 327
clan 13 328
clan 13 329
clan 14 330
clan 15 331
clan 15 332
clan 15 333
clan 16 334
clan 16 335
clan 16 336
clan 16 337
clan 16 338
clan 17 339
clan 18 340
clan 19 341
clan 19 342
clan 19 343
clan 19 344
clan 20 345
clan 20 346
clan 21 347
clan 21 348
clan 21 349
clan 22 350
clan 23 351
clan 24 352
clan 25 353
clan 26 354
clan 26 355
clan 26 356
clan 26 357
clan 27 358
//Clan Level Challenges - type, required level, challenge id
clanlevelchallenge 23 ch_cam_clan_02 // Kiss of Death Camo
//Clan War Challenges - type, key index, bit offset, challenge id
entitlementchallenge 0 18 ch_ret_clan // clan wars reticle - Triad
entitlementchallenge 0 24 ch_cam_clan_01 // clan wars camo - Body Count

2
data/dw/mm.cfg Normal file
View File

@ -0,0 +1,2 @@
VERSION 5
XX 0 D100 0 P50 0 G5 4 F 6 H 8 P75 16 P100 16 S 24 P120 32 P150 40 P-1 10 M192 20 M48

162
data/dw/newsfeed.txt Normal file
View File

@ -0,0 +1,162 @@
article 1
header "FLAGS OF THE WORLD PACK"
body "Show your national pride with individual patches, playercards, and backgrounds for England, France, Germany, Italy, Spain, Mexico, USA, Brazil, Australia, Japan, UK, Russia, Netherlands, Portugal, Colombia, Argentina, Canada, Ireland, and Sweden.
Plus, go international in any firefight with a unique reticle and flags of the world weapon camo.
Available now.
Visit the in-game store to find out more."
type item
image ui_mp/ingamestore/img_store_pers_pack_flags.jpg
imagewidth 320
imageheight 160
data mdlc_pack40
localJPEGImage
article 2
header "CALL OF DUTY APP"
body "The Call of Duty App is everything you need to keep track of your Ghosts experience on the go.
Get unique info on Clan Wars: A brand new game mode that connects directly to Call of Duty®: Ghosts multiplayer, where clans compete against each other for additional XP and in-game content.
Communicate via the Rally Up and Clan Chat features, to keep in touch with your friends and Clan members."
type news
image img_sf_generic_news2
imagewidth 320
imageheight 320
article 3
header "PLAY HOW YOU WANT WITH EXTRA LOADOUT SLOTS"
body "You can increase the number of loadout slots from 6 to 10, so you can take even more options into battle. Never get caught with the wrong gear and give yourself great flexibility by creating different loadouts for different situations.
Top Tip - Set up different characters for different game modes, that way you can select the right man for the job.
Another Top Tip - With all the extra loadouts, set up variations of your favorite loadout so youre always ready for the unexpected.
Visit the in-game store to find out more."
type item
image ui_mp/ingamestore/img_store_extra_slots.jpg
imagewidth 320
imageheight 160
data mdlc_pack2
localJPEGImage
article 4
header "DROP ZONE IS BACK!"
body "We are bringing this fan favorite mode from Call of Duty: Modern Warfare 3 to Call of Duty: Ghosts Multiplayer.
Fight to take control of the Drop Zone marked with a red smoke grenade, a location where Care Packages are regularly delivered by air drops.
This mode gives you multiple chances to change the game with awesome killstreaks like the Gryphon, Juggernaut, or the earth shattering Loki.
Control the Drop Zone, collect killstreaks, and wreak havoc on the opposing team!"
type news
image img_squadmode_03
imagewidth 320
imageheight 176
article 5
header "THE REAL ORIGINS OF EXTINCTION"
body "Find out the origins of the Extinction story by collecting hidden intel items in Episode 1: Nightfall.
Find out the real story of Dr. Cross, Archer and discover more secrets from Project Nightfall.
Episode 1: Nightfall is part of DLC 1: Onslaught, available now.
Visit the in-game store to find out more."
type item
image bg_large_073
imagewidth 320
imageheight 320
data dlc3
article 6
header "NEW CUSTOMIZATION CONTENT"
body "New content is being released all the time. Personalize your look and your loadout with customization items.
- Special Characters: Customize your look head-to-toe in Multiplayer, Squads and Extinction.
- Personalization Packs: Uniquely themed weapon camo, reticle, patch, playercard and background.
- Legend Packs: A Special Character and themed Personalization Pack for a legendary figure in Call of Duty lore.
Visit the in-game store to find out more."
type item
image ui_mp/ingamestore/img_store_pers_pack_07.jpg
imagewidth 320
imageheight 160
data mdlc_pack17
localJPEGImage
article 7
header "NEW TO EXTINCTION - THE ARMORY"
body "Spend Teeth in the Armory to purchase upgrades for classes and equipment.
Earn Teeth by completing Extinction missions. Bonus Teeth are awarded for completing with a relic, completing in Hardcore mode, or helping other players complete a mission for the first time.
You can also earn teeth by killing aliens in both Extinction and Chaos Mode.
Upgrades include the Weapon Specialist's Infinite Ammo Ability and the Medic's Energy Field, instantly heal and revive anyone within its perimeter!"
type news
image img_sf_extinction_armory
imagewidth 320
imageheight 320
article 8
header "CAN YOU SURVIVE THE CHAOS?"
body "Extinction's Chaos Mode is an all-new, adrenaline pumping game type that pits 1-4 players against a never ending alien onslaught.
Keep the combo meter filled by damaging aliens, collecting weaponry or upgrades, and making use of your abilities. Combos provide players with an ever-expanding set of perks such as Fast Health Regen, Gas Mask, and Stopping Power.
Special bonus drops provide new ability upgrades including the Tank Class Skill and the Venom-X that further your arsenal and overall score potential.
The aliens are ready, are you?"
type news
image img_sf_extinction_chaos
imagewidth 320
imageheight 320
article 9
header "WHAT'S GOING ON WITH YOUR CLAN?"
body "Check out what your Clan is up to in-game via Clan Details inside the Barracks. See what's going on with other players' Clans by checking out View Clan when you select them in the lobby.
Get even more details on your Clan via the Call of Duty App, available now on the App Store, Google Play and Windows Store.
Not in a Clan? Create one now via the Barracks and invite your friends straight from the game."
type news
image img_squadmode_02
imagewidth 320
imageheight 176
article 10
header "DRILL INSTRUCTOR VOICE PACK"
body "Multiplayer returns to boot camp with the all-new Drill Instructor Voice Pack voiced by the one and only R. Lee Ermey, aka The Gunny.
Swap out your in-game alerts with ones that will get you back into top combat shape.
Now, drop down and give me twenty!
Available now.
Visit the in-game store to find out more."
type item
image ui_mp/ingamestore/img_store_drill_sergeant.jpg
imagewidth 320
imageheight 160
data dlc10
localJPEGImage
article 11
header "TRY REINFORCE"
body "Reinforce is a new game mode where you annihilate the enemy team or capture points to win a match.
You only respawn if a teammate captures a point, so be careful out there!
This new game mode is now live in our Multiplayer playlist.
Enjoy!"
type news
image bg_large_045
imagewidth 320
imageheight 320

BIN
data/dw/playlists_tu14.aggr Normal file

Binary file not shown.

139
data/dw/social_tu14.cfg Normal file
View File

@ -0,0 +1,139 @@
// Demonware offline additions.
set netinfo_logging 0
set theater_active 1
set prestige_shop_active 1
set elite_clan_delay -1
set elite_clan_division_icon_active 1
set dw_presence_coop_join_active 1
set dw_shared_presence_active 1
set splitscreen_online_enabled 1
set dw_leaderboard_write_active 1
set matchdata_active 1
set pm_gamesetup_mode_altmodes 1
set pm_gamesetup_mode_altmodes_dropzone 1
set pm_gamesetup_mode_altmodes_teamjug 1
set pm_gamesetup_mode_altmodes_jug 1
set pm_gamesetup_mode_altmodes_infected 1
set pm_gamesetup_mode_altmodes_oneinthechamber 1
set pm_gamesetup_mode_altmodes_mugger 1
set pm_gamesetup_options_createdefaultclass 1
set pm_gamesetup_options_customclassrestrictions 1
set motd_store_link 0
set livestreaming_active 0
set screenshots_active 1
set ca_intra_only 0
set dc_lobbymerge 1
// DW Delay values
set facebook_active 0
set facebook_friends_active 0
set facebook_upload_video_active 0
set facebook_upload_photo_active 0
set facebook_delay -1
set facebook_max_retry_time 30000
set facebook_retry_step 1000
set facebook_friends_max_retry_time 30000
set facebook_friends_retry_step 1000
set entitlements_active 1
set entitlements_delay -1
set entitlements_config_file_max_retry_time 30000
set entitlements_config_file_retry_step 1000
set entitlements_key_archive_max_retry_time 30000
set entitlements_key_archive_retry_step 1000
set enable_eliteCACDownload 0
set elite_edl 0
set elite_edl_xl 0
set elite_clan_set_private_member_profile_max_retry_time 30000
set userGroup_active 1
set elite_clan_active 0
set elite_clan_remote_view_active 0
set allow_online_squads 1
set allow_cod_anywhere 0
set allow_secondscreen 1
set allow_secondscreen_ingame_send 1
set allow_secondscreen_ingame_recv 1
set dw_presence_active 1
set dw_presence_put_delay 5000
set dw_presence_put_rate 60000
set dw_presence_get_delay 5000
set dw_presence_get_rate 120000
set dw_shared_presence_put_rate 300000
set iotd_active 1
set igs_swp 1
set igs_shp 1
set igs_svp 1
set igs_sve 1
set igs_svs 1
set igs_svr 1
set igs_fo 1
set igs_s1 1
set igs_td 1
set igs_sosp 1
set igs_swap 1
set igs_crossgame 1
set igs_announcer 3
set igs_smappacks 1
set extendedLoadoutsEnable 1
set extinction_map_selection_enabled 1
set igs_sripper 1
set num_available_map_packs 4
set mm_skill_enforcement 0
// set dsping_dc_0 "101,New,40.54,-74.47,108.61.88.37:10000,108.61.89.108:40000"
// set dsping_dc_1 "102,Chi,41.88,-87.63,108.61.238.217:40000,108.61.238.138:40000"
// set dsping_dc_2 "103,Dal,32.78,-96.8,108.61.239.113:40000,108.61.239.173:40000"
// set dsping_dc_3 "104,Sea,47.61,-122.33,108.61.233.100:40000,108.61.233.106:40000"
// set dsping_dc_4 "105,Los,34.05,-118.24,108.61.234.129:40000,108.61.234.204:40000"
// set dsping_dc_5 "106,Atl,33.75,-84.39,108.61.236.152:40000,108.61.236.112:40000"
// set dsping_dc_6 "107,Ams,52.37,4.9,173.199.64.6:40000,173.199.109.10:40000"
// set dsping_dc_7 "108,Lon,51.51,-0.12,108.61.230.152:40000,108.61.230.145:40000"
// set dsping_dc_8 "109,Fra,50.11,8.68,195.122.135.238:40000,195.122.135.97:40000"
// set dsping_dc_9 "111,Tam,27.7,-82.58,4.79.145.189:40000,4.79.145.108:40000"
// set dsping_dc_10 "112,San,37.34,-121.89,108.61.235.100:40000,108.61.235.179:40000"
// set dsping_dc_11 "113,St.,38.63,-90.2,108.61.232.122:40000,108.61.232.110:40000"
// set dsping_dc_12 "115,Mon,45.51,-73.55,108.61.231.117:40000,108.61.231.106:40000"
// set dsping_dc_13 "119,Syd,-33.87,151.21,108.61.227.109:40000,108.61.227.115:40000"
// set dsping_dc_14 "121,Den,56.04,9.93,108.61.106.31:40000,108.61.106.30:40000"
// set dsping_dc_15 "124,Par,48.86,2.35,108.61.237.152:40000,108.61.237.150:40000"
// set dsping_dc_16 "125,Tok,35.69,139.69,173.199.82.235:40000,173.199.82.237:40000"
// set dsping_dc_17 "126,Mos,55.76,37.62,173.199.67.27:40000,173.199.67.29:40000"
// set dsping_dc_18 "127,War,52.23,21.01,173.199.83.227:40000,173.199.83.236:40000"
// set dsping_dc_19 "129,Mad,40.42,-3.7,93.93.65.202:40000,93.93.65.203:40000"
// set dsping_dc_20 "130,Sao,-23.55,-46.64,189.1.174.20:40000,189.1.174.184:40000"
// set dsping_dc_21 "131,Cap,-33.92,18.42,197.84.209.11:40000,197.84.209.12:40000"
// set dsping_dc_22 "132,Joh,-26.2,28.05,197.80.212.5:40000,197.80.212.7:40000"
// set dsping_dc_23 "133,Mil,45.47,9.19,95.141.40.109:40000,95.141.40.105:40000"
set ds_serverConnectTimeout 2000
set ds_serverAcquireTimeout 2000
set ds_introRequestTimeout 2000
set ds_serverListExpiryPeriod 60000
set ds_serverAcquisitionPeriod 7000
// Social Feed Controls
set social_feed_news_active 1
set social_feed_clans_active 1
set social_feed_squads_active 1
set social_feed_social_active 1
set social_feed_motd_active 1
set extinction_cac_enabled 1
set extinction_hardcore_enabled 1
set extinction_intel_enabled 1
set extinction_tokens_enabled 1
set past_title_data_active 1
set past_title_data_read_failure_interval_hours 24
set past_title_data_read_success_interval_hours 72
set live_voting_active 1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,727 @@
// IW6 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
if ( !isdefined( game["gamestarted"] ) )
{
game["menu_team"] = "team_marinesopfor";
if ( level.multiteambased )
game["menu_team"] = "team_mt_options";
if ( maps\mp\_utility::bot_is_fireteam_mode() )
{
level.fireteam_menu = "class_commander_" + level.gametype;
game["menu_class"] = level.fireteam_menu;
game["menu_class_allies"] = level.fireteam_menu;
game["menu_class_axis"] = level.fireteam_menu;
}
else
{
game["menu_class"] = "class";
game["menu_class_allies"] = "class_marines";
game["menu_class_axis"] = "class_opfor";
}
game["menu_changeclass_allies"] = "changeclass_marines";
game["menu_changeclass_axis"] = "changeclass_opfor";
if ( level.multiteambased )
{
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
{
var_1 = "menu_class_" + level.teamnamelist[var_0];
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
game[var_1] = game["menu_class_allies"];
game[var_2] = "changeclass_marines";
}
}
game["menu_changeclass"] = "changeclass";
if ( level.console )
{
game["menu_controls"] = "ingame_controls";
if ( level.splitscreen )
{
if ( level.multiteambased )
{
for ( var_0 = 0; var_0 < level.teamnamelist.size; var_0++ )
{
var_1 = "menu_class_" + level.teamnamelist[var_0];
var_2 = "menu_changeclass_" + level.teamnamelist[var_0];
game[var_1] += "_splitscreen";
game[var_2] += "_splitscreen";
}
}
game["menu_team"] += "_splitscreen";
game["menu_class_allies"] += "_splitscreen";
game["menu_class_axis"] += "_splitscreen";
game["menu_changeclass_allies"] += "_splitscreen";
game["menu_changeclass_axis"] += "_splitscreen";
game["menu_controls"] += "_splitscreen";
game["menu_changeclass_defaults_splitscreen"] = "changeclass_splitscreen_defaults";
game["menu_changeclass_custom_splitscreen"] = "changeclass_splitscreen_custom";
precachemenu( game["menu_changeclass_defaults_splitscreen"] );
precachemenu( game["menu_changeclass_custom_splitscreen"] );
}
precachemenu( game["menu_controls"] );
}
precachemenu( game["menu_team"] );
precachemenu( game["menu_class_allies"] );
precachemenu( game["menu_class_axis"] );
precachemenu( game["menu_changeclass"] );
precachemenu( game["menu_changeclass_allies"] );
precachemenu( game["menu_changeclass_axis"] );
precachemenu( game["menu_class"] );
precachestring( &"MP_HOST_ENDED_GAME" );
precachestring( &"MP_HOST_ENDGAME_RESPONSE" );
}
level thread onplayerconnect();
}
onplayerconnect()
{
for (;;)
{
level waittill( "connected", var_0 );
var_0 thread watchforclasschange();
var_0 thread watchforteamchange();
var_0 thread watchforleavegame();
var_0 thread connectedmenus();
}
}
connectedmenus()
{
}
getclasschoice( var_0 )
{
if ( var_0 > 10 )
{
if ( var_0 > 10 && var_0 < 17 )
{
var_0 -= 10;
var_0 = "axis_recipe" + var_0;
}
else if ( var_0 > 16 && var_0 < 23 )
{
var_0 -= 16;
var_0 = "allies_recipe" + var_0;
}
}
else
var_0 = "custom" + var_0;
return var_0;
}
watchforclasschange()
{
self endon( "disconnect" );
level endon( "game_ended" );
for (;;)
{
self waittill( "luinotifyserver", var_0, var_1 );
if ( var_0 != "class_select" )
continue;
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) && self ismlgspectator() )
{
self setclientomnvar( "ui_options_menu", 0 );
continue;
}
var_2 = isai( self ) || issubstr( self.name, "tcBot" );
if ( !var_2 )
{
if ( !isai( self ) && "" + var_1 != "callback" )
self setclientomnvar( "ui_loadout_selected", var_1 );
}
if ( isdefined( self.waitingtoselectclass ) && self.waitingtoselectclass )
continue;
if ( !maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() )
continue;
if ( "" + var_1 != "callback" )
{
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
{
self.pers["class"] = var_1;
self.class = var_1;
}
else
{
var_3 = var_1 + 1;
var_3 = getclasschoice( var_3 );
if ( !isdefined( self.pers["class"] ) || var_3 == self.pers["class"] )
continue;
self.pers["class"] = var_3;
self.class = var_3;
if ( level.ingraceperiod && !self.hasdonecombat )
{
maps\mp\gametypes\_class::setclass( self.pers["class"] );
self.tag_stowed_back = undefined;
self._id_7E62 = undefined;
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
}
else if ( isalive( self ) )
self iprintlnbold( game["strings"]["change_class"] );
}
continue;
}
menuclass( "callback" );
}
}
watchforleavegame()
{
self endon( "disconnect" );
level endon( "game_ended" );
for (;;)
{
self waittill( "luinotifyserver", var_0, var_1 );
if ( var_0 != "end_game" )
continue;
if ( maps\mp\_utility::is_aliens() )
{
[[ level.forceendgame_alien ]]();
continue;
}
level thread maps\mp\gametypes\_gamelogic::forceend( var_1 );
}
}
watchforteamchange()
{
self endon( "disconnect" );
level endon( "game_ended" );
for (;;)
{
self waittill( "luinotifyserver", var_0, var_1 );
if ( var_0 != "team_select" )
continue;
if ( maps\mp\_utility::matchmakinggame() && !getdvarint( "force_ranking" ) )
continue;
if ( var_1 != 3 )
thread showloadoutmenu();
if ( var_1 == 3 )
{
self setclientomnvar( "ui_spectator_selected", 1 );
self setclientomnvar( "ui_loadout_selected", -1 );
self.spectating_actively = 1;
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
{
self setmlgspectator( 1 );
self.pers["mlgSpectator"] = 1;
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 1 );
thread maps\mp\gametypes\_spectating::setspectatepermissions();
self setclientomnvar( "ui_options_menu", 2 );
}
}
else
{
self setclientomnvar( "ui_spectator_selected", -1 );
self.spectating_actively = 0;
if ( getdvarint( "systemlink" ) && getdvarint( "xblive_competitionmatch" ) )
{
self setmlgspectator( 0 );
self.pers["mlgSpectator"] = 0;
thread maps\mp\gametypes\_spectating::setmlgcamvisibility( 0 );
}
}
self setclientomnvar( "ui_team_selected", var_1 );
if ( var_1 == 0 )
var_1 = "axis";
else if ( var_1 == 1 )
var_1 = "allies";
else if ( var_1 == 2 )
var_1 = "random";
else
var_1 = "spectator";
if ( isdefined( self.pers["team"] ) && var_1 == self.pers["team"] )
{
self notify( "selected_same_team" );
continue;
}
self setclientomnvar( "ui_loadout_selected", -1 );
if ( var_1 == "axis" )
{
thread setteam( "axis" );
continue;
}
if ( var_1 == "allies" )
{
thread setteam( "allies" );
continue;
}
if ( var_1 == "random" )
{
thread autoassign();
continue;
}
if ( var_1 == "spectator" )
thread setspectator();
}
}
showloadoutmenu()
{
self endon( "disconnect" );
level endon( "game_ended" );
common_scripts\utility::waittill_any( "joined_team", "selected_same_team" );
self setclientomnvar( "ui_options_menu", 2 );
}
autoassign()
{
if ( maps\mp\_utility::is_aliens() || level.gametype == "infect" )
thread setteam( "allies" );
else if ( ( getdvarint( "squad_match" ) == 1 || getdvarint( "squad_vs_squad" ) == 1 || getdvarint( "squad_use_hosts_squad" ) == 1 ) && isdefined( self.bot_team ) )
thread setteam( self.bot_team );
else if ( !isdefined( self.team ) )
{
if ( self ismlgspectator() )
thread setspectator();
else if ( level.teamcount["axis"] < level.teamcount["allies"] )
thread setteam( "axis" );
else if ( level.teamcount["allies"] < level.teamcount["axis"] )
thread setteam( "allies" );
else if ( getteamscore( "allies" ) > getteamscore( "axis" ) )
thread setteam( "axis" );
else
thread setteam( "allies" );
}
else
{
if ( self ismlgspectator() )
{
thread setspectator();
return;
}
if ( level.teamcount["axis"] < level.teamcount["allies"] && self.team != "axis" )
{
thread setteam( "axis" );
return;
}
if ( level.teamcount["allies"] < level.teamcount["axis"] && self.team != "allies" )
{
thread setteam( "allies" );
return;
}
if ( level.teamcount["allies"] == level.teamcount["axis"] )
{
if ( getteamscore( "allies" ) > getteamscore( "axis" ) && self.team != "axis" )
thread setteam( "axis" );
else if ( self.team != "allies" )
thread setteam( "allies" );
}
}
}
setteam( var_0 )
{
self endon( "disconnect" );
if ( !isai( self ) && level.teambased && !maps\mp\gametypes\_teams::getjointeampermissions( var_0 ) )
return;
if ( level.ingraceperiod && !self.hasdonecombat )
self.hasspawned = 0;
if ( self.sessionstate == "playing" )
{
self.switching_teams = 1;
self.joining_team = var_0;
self.leaving_team = self.pers["team"];
}
addtoteam( var_0 );
if ( self.sessionstate == "playing" )
self suicide();
waitforclassselect();
endrespawnnotify();
if ( self.sessionstate == "spectator" )
{
if ( game["state"] == "postgame" )
return;
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
{
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
return;
thread maps\mp\gametypes\_playerlogic::spawnclient();
}
thread maps\mp\gametypes\_spectating::setspectatepermissions();
}
self notify( "okToSpawn" );
}
setspectator()
{
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
return;
if ( isalive( self ) )
{
self.switching_teams = 1;
self.joining_team = "spectator";
self.leaving_team = self.pers["team"];
self suicide();
}
self notify( "becameSpectator" );
addtoteam( "spectator" );
self.pers["class"] = undefined;
self.class = undefined;
thread maps\mp\gametypes\_playerlogic::spawnspectator();
}
waitforclassselect()
{
self endon( "disconnect" );
level endon( "game_ended" );
self.waitingtoselectclass = 1;
for (;;)
{
if ( level.gametype == "infect" )
{
bypassclasschoice();
break;
}
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
self waittill( "luinotifyserver", var_0, var_1 );
else
{
bypassclasschoice();
break;
}
if ( var_0 != "class_select" )
continue;
if ( self.team == "spectator" )
continue;
if ( "" + var_1 != "callback" )
{
if ( isdefined( self.pers["isBot"] ) && self.pers["isBot"] )
{
self.pers["class"] = var_1;
self.class = var_1;
}
else
{
var_1 += 1;
self.pers["class"] = getclasschoice( var_1 );
self.class = getclasschoice( var_1 );
}
self.waitingtoselectclass = 0;
}
else
{
self.waitingtoselectclass = 0;
menuclass( "callback" );
}
break;
}
}
beginclasschoice( var_0 )
{
var_1 = self.pers["team"];
if ( maps\mp\_utility::allowclasschoice() || maps\mp\_utility::showfakeloadout() && !isai( self ) )
{
self setclientomnvar( "ui_options_menu", 2 );
if ( !self ismlgspectator() )
waitforclassselect();
endrespawnnotify();
if ( self.sessionstate == "spectator" )
{
if ( game["state"] == "postgame" )
return;
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
{
if ( isdefined( self.waitingtospawnamortize ) && self.waitingtospawnamortize )
return;
thread maps\mp\gametypes\_playerlogic::spawnclient();
}
thread maps\mp\gametypes\_spectating::setspectatepermissions();
}
self.connecttime = gettime();
self notify( "okToSpawn" );
}
else
thread bypassclasschoice();
if ( !isalive( self ) )
thread maps\mp\gametypes\_playerlogic::predictabouttospawnplayerovertime( 0.1 );
}
bypassclasschoice()
{
self.selectedclass = 1;
self.waitingtoselectclass = 0;
if ( isdefined( level.bypassclasschoicefunc ) )
{
var_0 = self [[ level.bypassclasschoicefunc ]]();
self.class = var_0;
}
else
self.class = "class0";
}
beginteamchoice()
{
self setclientomnvar( "ui_options_menu", 1 );
}
showmainmenuforteam()
{
var_0 = self.pers["team"];
self openpopupmenu( game["menu_class_" + var_0] );
}
menuspectator()
{
if ( isdefined( self.pers["team"] ) && self.pers["team"] == "spectator" )
return;
if ( isalive( self ) )
{
self.switching_teams = 1;
self.joining_team = "spectator";
self.leaving_team = self.pers["team"];
self suicide();
}
addtoteam( "spectator" );
self.pers["class"] = undefined;
self.class = undefined;
thread maps\mp\gametypes\_playerlogic::spawnspectator();
}
menuclass( var_0 )
{
if ( var_0 == "demolitions_mp,0" && self getrankedplayerdata( "featureNew", "demolitions" ) )
self setrankedplayerdata( "featureNew", "demolitions", 0 );
if ( var_0 == "sniper_mp,0" && self getrankedplayerdata( "featureNew", "sniper" ) )
self setrankedplayerdata( "featureNew", "sniper", 0 );
var_1 = self.pers["team"];
var_2 = maps\mp\gametypes\_class::getclasschoice( var_0 );
var_3 = maps\mp\gametypes\_class::getweaponchoice( var_0 );
if ( var_2 == "restricted" )
{
beginclasschoice();
return;
}
if ( isdefined( self.pers["class"] ) && self.pers["class"] == var_2 && ( isdefined( self.pers["primary"] ) && self.pers["primary"] == var_3 ) )
return;
if ( self.sessionstate == "playing" )
{
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
{
self.pers["lastClass"] = self.pers["class"];
self.lastclass = self.pers["lastClass"];
}
self.pers["class"] = var_2;
self.class = var_2;
self.pers["primary"] = var_3;
if ( game["state"] == "postgame" )
return;
if ( level.ingraceperiod && !self.hasdonecombat )
{
maps\mp\gametypes\_class::setclass( self.pers["class"] );
self.tag_stowed_back = undefined;
self._id_7E62 = undefined;
maps\mp\gametypes\_class::giveloadout( self.pers["team"], self.pers["class"] );
}
else
self iprintlnbold( game["strings"]["change_class"] );
}
else
{
if ( isdefined( self.pers["lastClass"] ) && isdefined( self.pers["class"] ) )
{
self.pers["lastClass"] = self.pers["class"];
self.lastclass = self.pers["lastClass"];
}
self.pers["class"] = var_2;
self.class = var_2;
self.pers["primary"] = var_3;
if ( game["state"] == "postgame" )
return;
if ( game["state"] == "playing" && !maps\mp\_utility::isinkillcam() )
thread maps\mp\gametypes\_playerlogic::spawnclient();
}
thread maps\mp\gametypes\_spectating::setspectatepermissions();
}
update_wargame_after_migration()
{
foreach ( var_1 in level.players )
{
if ( !isai( var_1 ) && var_1 ishost() )
level.wargame_client = var_1;
}
}
addtoteam( var_0, var_1, var_2 )
{
if ( isdefined( self.team ) )
{
maps\mp\gametypes\_playerlogic::removefromteamcount();
if ( isdefined( var_2 ) && var_2 )
maps\mp\gametypes\_playerlogic::decrementalivecount( self.team );
}
self.pers["team"] = var_0;
self.team = var_0;
if ( getdvar( "squad_vs_squad" ) == "1" )
{
if ( !isai( self ) )
{
if ( var_0 == "allies" )
{
if ( !isdefined( level.squad_vs_squad_allies_client ) )
level.squad_vs_squad_allies_client = self;
}
else if ( var_0 == "axis" )
{
if ( !isdefined( level.squad_vs_squad_axis_client ) )
level.squad_vs_squad_axis_client = self;
}
}
}
if ( getdvar( "squad_match" ) == "1" )
{
if ( !isai( self ) && self ishost() )
{
if ( !isdefined( level.squad_match_client ) )
level.squad_match_client = self;
}
}
if ( getdvar( "squad_use_hosts_squad" ) == "1" )
{
if ( !isai( self ) && self ishost() )
{
if ( !isdefined( level.wargame_client ) )
level.wargame_client = self;
}
}
// session team is readonly in ranked matches if "teambased" is set on the playlist
if ( level.teambased )
self.sessionteam = var_0;
else if ( var_0 == "spectator" )
self.sessionteam = "spectator";
else
self.sessionteam = "none";
if ( game["state"] != "postgame" )
{
maps\mp\gametypes\_playerlogic::addtoteamcount();
if ( isdefined( var_2 ) && var_2 )
maps\mp\gametypes\_playerlogic::incrementalivecount( self.team );
}
maps\mp\_utility::updateobjectivetext();
if ( isdefined( var_1 ) && var_1 )
waittillframeend;
maps\mp\_utility::updatemainmenu();
if ( var_0 == "spectator" )
{
self notify( "joined_spectators" );
level notify( "joined_team", self );
}
else
{
self notify( "joined_team" );
level notify( "joined_team", self );
}
}
endrespawnnotify()
{
self.waitingtospawn = 0;
self notify( "end_respawn" );
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
init()
{
if (maps\mp\_utility::is_aliens())
{
return;
}
if (isdefined(level.ishorde) && level.ishorde)
{
return;
}
// define onteamselection callback function used in balanceteams()
level.onteamselection = ::set_team;
}
set_team(team)
{
if (team != self.pers["team"])
{
self.switching_teams = true;
self.joining_team = team;
self.leaving_team = self.pers["team"];
}
if (self.sessionstate == "playing")
{
self suicide();
}
maps\mp\gametypes\_menus::addtoteam(team);
maps\mp\gametypes\_menus::endrespawnnotify();
}

Binary file not shown.

View File

@ -0,0 +1,228 @@
if (game:issingleplayer() or Engine.InFrontend()) then
return
end
f0_local0 = function ( f1_arg0, f1_arg1 )
LUI.FlowManager.RequestLeaveMenu( f1_arg0 )
end
f0_local1 = function ( f2_arg0, f2_arg1 )
f2_arg0:setText( f2_arg1.message_text )
f2_arg0:dispatchEventToRoot( {
name = "resize_popup"
} )
end
f0_local2 = function ( f3_arg0 )
Engine.ExecFirstClient( "xpartybackout" )
Engine.ExecFirstClient( "disconnect" )
end
local f0_local3 = function ( f4_arg0 )
Engine.ExecFirstClient( "xpartydisbandafterround" )
Engine.ExecFirstClient( "disconnect" )
end
local f0_local4 = function ( f5_arg0 )
return Engine.GetDvarBool( "onlinegame" )
end
local f0_local5 = function ( f6_arg0 )
if f0_local4( f6_arg0 ) then
Engine.ExecFirstClient( "xstopprivateparty" )
Engine.ExecFirstClient( "disconnect" )
Engine.ExecFirstClient( "xblive_privatematch 0" )
Engine.ExecFirstClient( "onlinegame 1" )
Engine.ExecFirstClient( "xstartprivateparty" )
else
Engine.ExecFirstClient( "disconnect" )
end
end
local f0_local6 = function ( f7_arg0 )
Engine.ExecFirstClient( "xstopprivateparty" )
Engine.ExecFirstClient( "xpartydisbandafterround" )
if Engine.GetDvarBool( "sv_running" ) then
Engine.NotifyServer( "end_game", 1 )
Engine.ExecFirstClient( "xblive_privatematch 0" )
Engine.ExecFirstClient( "onlinegame 1" )
Engine.ExecFirstClient( "xstartprivateparty" )
else
f0_local5( f7_arg0 )
end
end
local f0_local7 = function ( f8_arg0, f8_arg1 )
if Engine.GetDvarBool( "sv_running" ) then
Engine.NotifyServer( "end_game", 1 )
else
f0_local5( f8_arg0 )
end
LUI.FlowManager.RequestCloseAllMenus( f8_arg0 )
end
local f0_local8 = function ( f9_arg0, f9_arg1 )
LUI.FlowManager.RequestLeaveMenu( f9_arg0 )
Engine.Exec( "onPlayerQuit" )
if Engine.GetDvarBool( "sv_running" ) then
f0_local3( f9_arg0 )
else
f0_local2( f9_arg0 )
end
LUI.FlowManager.RequestCloseAllMenus( f9_arg0 )
end
local f0_local9 = function ( f10_arg0, f10_arg1 )
LUI.FlowManager.RequestLeaveMenu( f10_arg0 )
Engine.Exec( "onPlayerQuit" )
if Engine.GetDvarBool( "sv_running" ) then
f0_local6( f10_arg0 )
else
f0_local5( f10_arg0 )
end
LUI.FlowManager.RequestCloseAllMenus( f10_arg0 )
end
local f0_local10 = function ( f11_arg0 )
local f11_local0 = Lobby.IsInPrivateParty()
if f11_local0 then
f11_local0 = Lobby.IsPrivatePartyHost()
if f11_local0 then
f11_local0 = not Lobby.IsAloneInPrivateParty()
end
end
return f11_local0
end
local f0_local11 = function ( f12_arg0, f12_arg1 )
local f12_local0 = Engine.GetDvarBool( "squad_match" )
local f12_local1 = Engine.GetDvarBool( "squad_use_hosts_squad" )
if f12_local0 and Lobby.IsInPrivateParty() and Lobby.IsPrivatePartyHost() then
Engine.NotifyServer( "end_game", 1 )
elseif f12_local1 and Lobby.IsPrivatePartyHost() and Lobby.IsAloneInPrivateParty() and Lobby.IsAlone() then
Engine.NotifyServer( "end_game", 1 )
elseif f0_local10( f12_arg0 ) then
LUI.FlowManager.RequestLeaveMenu( f12_arg0, true )
LUI.FlowManager.RequestPopupMenu( f12_arg0, "popup_pull_party", false )
else
Engine.Exec( "onPlayerQuit" )
if Engine.GetDvarBool( "sv_running" ) then
f0_local6( f12_arg0 )
else
f0_local5( f12_arg0 )
end
LUI.FlowManager.RequestCloseAllMenus( f12_arg0 )
end
end
local f0_local12 = function ()
local self = LUI.UIElement.new()
self.id = "end_game_id"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
top = -50,
left = 0,
bottom = 0,
right = 0,
alpha = 1
} )
self:animateToState( "default", 0 )
local f13_local1 = Engine.Localize( "@LUA_MENU_END_GAME_DESC" )
local f13_local2 = Engine.Localize( "@LUA_MENU_LEAVE_GAME_TITLE" )
if Engine.IsAliensMode() and Game.GetOmnvar( "ui_alien_is_solo" ) then
f13_local1 = Engine.Localize( "@ALIENS_LEAVE_GAME_DESC" )
f13_local2 = Engine.Localize( "@MENU_NOTICE" )
end
LUI.MenuBuilder.BuildAddChild( self, {
type = "generic_yesno_popup",
id = "privateGame_options_list_id",
properties = {
message_text_alignment = LUI.Alignment.Center,
message_text = f13_local1,
popup_title = f13_local2,
padding_top = 12,
yes_action = f0_local7
}
} )
local f13_local3 = LUI.UIBindButton.new()
f13_local3.id = "endBackToGameStartButton"
f13_local3:registerEventHandler( "button_start", f0_local0 )
self:addElement( f13_local3 )
return self
end
local f0_local13 = function ()
local self = LUI.UIElement.new()
self.id = "leave_game_id"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
top = -50,
left = 0,
bottom = 0,
right = 0,
alpha = 1
} )
self:animateToState( "default", 0 )
LUI.MenuBuilder.BuildAddChild( self, {
type = "generic_yesno_popup",
id = "publicGame_options_list_id",
properties = {
message_text_alignment = LUI.Alignment.Center,
message_text = Engine.IsAliensMode() and Engine.Localize( "@ALIENS_LEAVE_GAME_DESC" ) or Engine.Localize( "@LUA_MENU_LEAVE_GAME_DESC" ),
popup_title = Engine.IsAliensMode() and Engine.Localize( "@MENU_NOTICE" ) or Engine.Localize( "@LUA_MENU_LEAVE_GAME_TITLE" ),
padding_top = 12,
yes_action = f0_local11
}
} )
local f14_local1 = LUI.UIBindButton.new()
f14_local1.id = "leaveBackToGameStartButton"
f14_local1:registerEventHandler( "button_start", f0_local0 )
self:addElement( f14_local1 )
return self
end
local f0_local14 = function ()
local self = LUI.UIElement.new()
self.id = "pull_party_out_id"
self:registerAnimationState( "default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = true,
rightAnchor = true,
top = -50,
left = 0,
bottom = 0,
right = 0,
alpha = 1
} )
self:animateToState( "default", 0 )
LUI.MenuBuilder.BuildAddChild( self, {
type = "generic_yesno_popup",
id = "party_pullout_list_id",
properties = {
message_text_alignment = LUI.Alignment.Center,
message_text = Engine.Localize( "@LUA_MENU_PULL_PARTY_DESC" ),
popup_title = Engine.Localize( "@LUA_MENU_LEAVE_GAME_TITLE" ),
padding_top = 12,
yes_action = f0_local8,
no_action = f0_local9,
cancel_means_no = false
}
} )
local f15_local1 = LUI.UIBindButton.new()
f15_local1.id = "leavePullPartyButton"
f15_local1:registerEventHandler( "button_start", f0_local0 )
self:addElement( f15_local1 )
return self
end
LUI.MenuBuilder.m_types["popup_end_game"] = f0_local12
LUI.MenuBuilder.m_types["popup_leave_game"] = f0_local13
LUI.MenuBuilder.m_types["popup_pull_party"] = f0_local14

View File

@ -0,0 +1,250 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
local SquadsModeButtonAction = function( f4_arg1 , f4_arg0)
controller = f4_arg0.controller
Engine.ExecNow( "forcenosplitscreencontrol main_XBOXLIVE_1", controller )
local f4_local0, f4_local1 = Engine.UserCanPlayOnline( controller )
if not f4_local0 then
Engine.Exec( "xrequirelivesignin", controller )
Engine.Exec( "forcenosplitscreencontrol main_XBOXLIVE_2", controller )
else
if SvS.IsSvS() then
Engine.Exec( "profile_SetHasEverPlayed_SP", controller )
end
Engine.ExecNow( "resetSplitscreenSignIn", controller )
Engine.ExecNow( "forcenosplitscreencontrol main_XBOXLIVE_3", controller )
Engine.SetDvarBool( "systemlink", false )
Engine.SetDvarBool( "splitscreen", false )
Engine.SetDvarBool( "onlinegame", true )
Engine.SetDvarBool( "xblive_privatematch", false )
Engine.SetDvarBool( "ui_opensummary", false )
Engine.SetDvarBool( "squad_match", false )
Engine.SetDvarInt( "allow_online_squads", 1 )
if Engine.GetDvarBool( "xblive_competitionmatch" ) then
Engine.SetDvarBool( "xblive_competitionmatch", false )
Engine.Exec( "set remove_mlg_rules 1" )
end
Engine.ExecNow( MPConfig.default_xboxlive, controller )
if not SvS.IsSvS() then
Engine.ExecNow( "xstartprivateparty", controller )
end
Engine.Exec( "startentitlements", controller )
Engine.CacheUserDataForController( controller )
if SvS.IsSvS() then
LUI.FlowManager.RequestAddMenu( nil, "squads_mode_select_menu", false, controller, false )
else
LUI.FlowManager.RequestAddMenu( nil, "menu_xboxlive", false, controller, false )
end
end
end
local main_menu_options_feeder = function( f17_arg0 )
local f17_local0 = Engine.IsAliensMode()
local f17_local1 = SvS.IsSvS()
local f17_local2 = false
if Engine.GetDvarInt( "allow_online_squads" ) == 1 or not Engine.IsConsoleGame() then
f17_local2 = true
end
local f17_local3 = Engine.DoWeNeedCompatibilityPacks()
if f17_local1 then
local f17_local4 = f17_local2
end
local f17_local5 = f17_local4 or not f17_local1
local f17_local6 = {}
if Engine.AllowOnline() and f17_local5 then
local f17_local7, f17_local8 = nil
if f17_local1 then
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_SQUADS_CAPS" )
f17_local7 = Engine.Localize( "@LUA_MENU_SQUADS_INTRO" )
elseif f17_local0 then
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
f17_local7 = Engine.Localize( "@LUA_MENU_PLAY_EXTINCTION_ONLINE_DESC" )
else
f17_local8 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_CAPS" )
f17_local7 = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
end
f17_local6[#f17_local6 + 1] = {
type = "UIGenericButton",
id = "btn_MPMain_0",
disabled = f17_local3,
disabledFunc = Engine.DoWeNeedCompatibilityPacks,
properties = {
button_text = f17_local8,
button_action_func = LUI.mp_menus.MPMainMenu.xboxLiveButtonAction,
desc_text = f17_local7,
button_over_func = function ( f18_arg0, f18_arg1 )
PersistentBackground.SetToDefault()
end
}
}
end
if SvS.IsSvS() then
local f17_local7 = "@PLATFORM_PLAY_ONLINE_SQUADS_CAPS"
local f17_local8 = #f17_local6 + 1
local f17_local9 = {
type = "UIGenericButton",
id = "btn_MPMain_1",
disabled = f17_local3,
disabledFunc = Engine.DoWeNeedCompatibilityPacks
}
local f17_local10 = {
button_text = Engine.Localize( f17_local7 ),
button_action_func = SquadsModeButtonAction
}
local f17_local11
if f17_local1 then
f17_local11 = Engine.Localize( "@LUA_MENU_SQUADS_INTRO" )
if not f17_local11 then
else
f17_local10.desc_text = f17_local11
f17_local10.button_over_func = function ( f19_arg0, f19_arg1 )
PersistentBackground.SetToDefault()
end
f17_local9.properties = f17_local10
f17_local6[f17_local8] = f17_local9
end
end
f17_local11 = Engine.Localize( "@LUA_MENU_SPLITSCREEN_DESC" )
end
f17_local6[#f17_local6 + 1] = {
type = "UIGenericButton",
id = "btn_MPMain_6",
properties = {
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
button_action_func = LUI.mp_menus.MPMainMenu.optionsButtonAction,
desc_text = Engine.Localize( "@LUA_MENU_OPTIONS_DESC" ),
button_over_func = function ( f22_arg0, f22_arg1 )
PersistentBackground.SetToDefault()
end
}
}
f17_local6[#f17_local6 + 1] = {
type = "generic_separator",
id = "main_menu_spacer_id"
}
if not Engine.IsCoreMode() then
f17_local6[#f17_local6 + 1] = {
type = "UIGenericButton",
id = "btn_MPMain_7",
properties = {
text = Engine.Localize( "@LUA_MENU_MULTIPLAYER_CAPS" ),
button_action_func = function ( f23_arg0, f23_arg1 )
Engine.StopMusic( 200 )
Engine.SwitchToCoreMode()
Engine.PlayMusic( CoD.Music.MainMPMusic )
Engine.SetActiveMenu( ActiveMenus.None )
Engine.SetActiveMenu( ActiveMenus.Main )
end,
button_over_func = function ( f24_arg0, f24_arg1 )
PersistentBackground.Set( PersistentBackground.Variants.MPBackground )
end,
desc_text = Engine.Localize( "@PLATFORM_PLAY_ONLINE_DESC" )
}
}
end
if not SvS.IsSvS() then
f17_local6[#f17_local6 + 1] = {
type = "UIGenericButton",
id = "btn_MPMain_8",
properties = {
button_text = Engine.Localize( "@LUA_MENU_SQUAD_MODE_CAP" ),
button_action_func = function ( f25_arg0, f25_arg1 )
Engine.StopMusic( 200 )
Engine.SwitchToSquadVsSquadMode()
Engine.PlayMusic( CoD.Music.MainSquadMusic )
Engine.SetActiveMenu( ActiveMenus.None )
Engine.SetActiveMenu( ActiveMenus.Main )
end,
button_over_func = function ( f26_arg0, f26_arg1 )
PersistentBackground.Set( PersistentBackground.Variants.SvSBackground )
end,
desc_text = Engine.Localize( "@LUA_MENU_SVS_MAIN_MENU_DESC" )
}
}
end
if not Engine.IsAliensMode() and Engine.UnlockedAliens() then
f17_local6[#f17_local6 + 1] = {
type = "UIGenericButton",
id = "btn_MPMain_9",
properties = {
button_text = Engine.Localize( "@LUA_MENU_ALIENS_CAPS" ),
button_action_func = function ( f27_arg0, f27_arg1 )
Engine.StopMusic( 200 )
Engine.SwitchToAliensMode()
Engine.PlayMusic( CoD.Music.MainExtinctMusic )
Engine.SetActiveMenu( ActiveMenus.None )
Engine.SetActiveMenu( ActiveMenus.Main )
end,
button_over_func = function ( f28_arg0, f28_arg1 )
PersistentBackground.Set( PersistentBackground.Variants.AliensBackground )
end,
desc_text = Engine.Localize( "@LUA_MENU_ALIENS_MAIN_MENU_DESC" ),
additional_handlers = {
menu_create = LUI.mp_menus.MPMainMenu.AddExtinctionGlowBackground
}
}
}
end
f17_local6[#f17_local6 + 1] = {
type = "button_desc_text",
id = "mp_menu_button_description_id",
properties = {
lines = SvS.IsSvS() and 8 or nil
}
}
return f17_local6
end
-- Remove social button
LUI.MenuBuilder.m_definitions["online_friends_widget"] = function()
return {
type = "UIElement"
}
end
f0_local0 = function ()
return {
type = "UIVerticalList",
id = "mp_main_menu_id",
childrenFeeder = main_menu_options_feeder,
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = false,
top = GenericMenuDims.menu_top,
bottom = GenericMenuDims.menu_bottom,
left = GenericMenuDims.menu_left,
right = GenericMenuDims.menu_right,
alignment = LUI.Alignment.Top
}
},
handlers = {
dlc_mount_complete = function ( f30_arg0, f30_arg1 )
f30_arg0:processEvent( {
name = "menu_refresh"
} )
end
,
dlc_mount_fail = function ( f31_arg0, f31_arg1 )
f31_arg0:processEvent( {
name = "menu_refresh"
} )
end
,
dlc_download_fail = function ( f32_arg0, f32_arg1 )
f32_arg0:processEvent( {
name = "menu_refresh"
} )
end
}
}
end
LUI.MenuBuilder.m_definitions[ "main_mp_menu_options"] = f0_local0

View File

@ -0,0 +1,275 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
local Lobby = luiglobals.Lobby
local FindMatchAfterThrottleEvent = function( f4_arg0, f4_arg1 )
local f4_local0 = false
local f4_local1 = -1
for f4_local2 = 0, Engine.GetMaxControllerCount() - 1, 1 do
if Engine.HasActiveLocalClient( f4_local2 ) and IsFirstTimeFlowRequired( f4_local2 ) then
f4_local0 = true
if f4_local1 < 0 then
f4_local1 = f4_local2
end
end
end
if f4_local0 then
LUI.FlowManager.RequestAddMenu( f4_arg0, "cac_member_select_main", true, f4_local1, false, {
next_screen = "cac_edit_main",
squad_location = "squadMembers",
class_location = "loadouts",
findMatch = true
} )
elseif not LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons() then
Engine.Exec( "xblive_privatematch 0" )
if Engine.IsAliensMode() then
LUI.mp_menus.Aliens.AliensRunConfig( f4_arg1.controller )
end
if LUI.mp_menus.MPXboxLiveMenu.CheckHasRequiredDLC( f4_arg0 ) then
if LUI.mp_menus.MPXboxLiveMenu.DisplayLowRepWarning( f4_arg0, f4_arg1 ) then
return
elseif SvS.IsSvS() then
local f4_local3 = SvS.GetCurrentSquadModeInfo()
local f4_local4, f4_local5 = SvS.GetPlaylistFromSquadMode( f4_local3 )
local f4_local6 = false
if f4_arg1.squadsPlayNow then
f4_local6 = true
end
if not f4_arg1.squadsPlayNow and f4_local3.DynamicMatchmaking then
Playlist.DoAction( f4_local4, f4_local5, true, f4_local6 )
else
Playlist.DoAction( f4_local4, f4_local5, false, f4_local6 )
end
if Engine.GetDvarBool( "squad_match" ) then
Squad.StartMatch( f4_arg1.controller, true )
Engine.SetDvarBool( "squad_find_match", true )
end
LUI.FlowManager.RequestAddMenu( f4_arg0, "menu_xboxlive_lobby", false, f4_arg1.controller, false )
else
LUI.FlowManager.RequestPopupMenu( f4_arg0, "menu_systemlink_join" ) -- open server list instead of playlist_main
end
end
end
end
local FindMatchAction = function( f5_arg0, f5_arg1 )
if Lobby.EnteringLobby() == true then
LUI.FlowManager.RequestPopupMenu( f5_arg0, "popup_throttling", true, f5_arg1.controller, false, {
eventData = f5_arg1
} )
else
FindMatchAfterThrottleEvent( f5_arg0, f5_arg1 )
end
end
local BarracksAction = function( f9_arg0, f9_arg1 )
LUI.FlowManager.RequestAddMenu( f9_arg0, "menu_stats", true, f9_arg1.controller ) -- custom stats menu
end
package.loaded["LUI.mp_menus.MPXboxLiveMenu"].XboxLiveOptionsFeeder = function( f29_arg0 )
local f29_local0 = Engine.IsAliensMode()
local f29_local1 = SvS.IsSvS()
local f29_local2 = SvS.IsSvS()
if f29_local2 then
f29_local2 = SvS.GetCurrentSquadModeInfo()
end
local f29_local3 = {}
local f29_local4 = nil
if f29_local0 then
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @LUA_MENU_PUBLIC_MATCH_CAPS but we need to use @LUA_MENU_STORE_CAPS
elseif f29_local1 then
f29_local4 = Engine.Localize( "@PLATFORM_FIND_GAME_CAPS" )
else
f29_local4 = Engine.Localize( "@LUA_MENU_STORE_CAPS" ) -- Orginally @PLATFORM_FIND_GAME_CAPS but we need to use @LUA_MENU_STORE_CAPS
end
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "find_match_button_id",
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
properties = {
button_text = f29_local4,
button_action_func = FindMatchAction,
desc_text = SvS.IsSvS() and Engine.Localize( "@LUA_MENU_SQUADS_FIND_MATCH_DESC" ) or Engine.Localize( "@LUA_MENU_STORE_DESC" ), -- Orginally @PLATFORM_DESC_FIND_GAME but we need to use @LUA_MENU_STORE_DESC
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
if f29_local0 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "solo_match_button_id",
disabled = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch(),
properties = {
button_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_CAPS" ),
button_action_func = LUI.mp_menus.MPXboxLiveMenu.SoloMatchAction,
desc_text = Engine.Localize( "@LUA_MENU_SOLO_MATCH_DESC" ),
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.shouldDisableSoloMatch,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "private_match_button_id",
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
properties = {
button_text = Engine.Localize( "@LUA_MENU_CUSTOM_MATCH_CAPS" ),
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
end
if not f29_local0 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "create_squad_button_id",
disabled = false,
properties = {
button_text = Engine.Localize( "@LUA_MENU_CREATE_A_CLASS_CAPS" ),
button_action_func = LUI.mp_menus.MPXboxLiveMenu.CreateSquadAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_CREATE_A_CLASS" ),
additional_handlers = {
refresh_new_icons = function ( f30_arg0, f30_arg1 )
if Cac.AnyUnseenMDLCItems( Engine.GetFirstActiveController(), NewIconsTable.CACItemTypes ) then
f30_arg0:processEvent( {
name = "show_new_icon"
} )
end
end
}
}
}
else
f29_local3[#f29_local3 + 1] = LUI.mp_menus.AliensLoadout.GetAliensLoadoutButton()
end
-- Disable Leaderboard (Code Removed)
-- Disable Squad Reports (Code Removed)
if not f29_local0 and not f29_local1 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "operations_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_OPERATIONS_TITLE" ),
button_action_func = LUI.mp_menus.MPBarracks.BarrackOperationsAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_CHALLENGES" )
}
}
end
if not f29_local0 then
if not f29_local1 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "barracks_button_id",
disabled = false,
properties = {
button_text = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" ),
button_action_func = BarracksAction,
desc_text = Clan.IsEnabled() and Engine.Localize( "@LUA_MENU_DESC_BARRACKS" ) or Engine.Localize( "@LUA_MENU_DESC_BARRACKS_PRIVATE" )
}
}
end
if not f29_local1 or f29_local2 ~= SvS.SquadModes.SquadVsSquad then
f29_local3[#f29_local3 + 1] = {
type = "generic_separator"
}
end
if not f29_local1 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "private_match_button_id",
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
properties = {
button_text = Engine.Localize( "@LUA_MENU_PRIVATE_MATCH_CAPS" ),
button_action_func = LUI.mp_menus.MPXboxLiveMenu.PrivateMatchAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_PRIVATE_MATCH" ),
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
end
-- Add Combat Training Button
if not f29_local0 and not f29_local1 then
game:addlocalizedstring("LUA_MENU_COMBAT", "COMBAT TRAINING");
game:addlocalizedstring("LUA_MENU_COMBAT_DESC", "Rank up offline with bots.");
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "find_match_button_id2",
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
properties = {
button_text = Engine.Localize("@LUA_MENU_COMBAT"), -- Engine.Localize( "@PLATFORM_FIND_GAME_CAPS" ),
button_action_func = LUI.mp_menus.MPXboxLiveMenu.FindMatchAction,
desc_text = Engine.Localize( "@LUA_MENU_COMBAT_DESC" ), -- Engine.Localize( "@LUA_MENU_SQUADS_FIND_MATCH_DESC" )
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
end
if f29_local1 then
-- Disable Challenge Friend Button (Code Removed)
if f29_local2 then
f29_local3[#f29_local3 + 1] = {
type = "UIGenericButton",
id = "play_now_button_id",
disabled = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons(),
properties = {
button_text = Engine.Localize( "LUA_MENU_PLAY_NOW_CAPS" ),
button_action_func = function ( f36_arg0, f36_arg1 )
f36_arg1.squadsPlayNow = true
FindMatchAction( f36_arg0, f36_arg1 )
end,
desc_text = Engine.Localize( "LUA_MENU_PLAY_NOW_DESC" ),
disabledFunc = LUI.mp_menus.MPXboxLiveMenu.disableCreateGameButtons,
additional_handlers = {
check_buttons = LUI.mp_menus.MPLivePrivateLobby.RefreshButtonDisable
}
}
}
end
end
end
local f29_local6 = #f29_local3 + 1
local f29_local7 = {
type = "button_desc_text",
id = "prelobby_description_id"
}
local f29_local8 = {}
local f29_local9
if (SvS.IsSvS() or f29_local2 ~= SvS.SquadModes.SquadAssault) or Engine.IsAliensMode() or Engine.IsCoreMode() then
f29_local9 = 1
if f29_local9 then
f29_local8.lines = f29_local9
f29_local7.properties = f29_local8
f29_local3[f29_local6] = f29_local7
f29_local3[#f29_local3 + 1] = {
type = "UITimer",
id = "bnt_lock_tmr",
properties = {
event = "check_buttons",
interval = 500,
disposable = false,
broadcastToRoot = true
}
}
return f29_local3
end
end
f29_local9 = nil
end

View File

@ -0,0 +1,305 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
package.loaded["LUI.mp_menus.MPLivePublicLobby"].LivePublicLobbyOptionsFeeder = function( f18_arg0 )
local f18_local0 = Lobby.GetVoteMapName( MapVoting.MapA.refNum )
local f18_local1 = Lobby.GetVoteMapName( MapVoting.MapB.refNum )
local f18_local2 = Lobby.GetVoteMapImage( MapVoting.MapA.refNum )
local f18_local3 = Lobby.GetVoteMapImage( MapVoting.MapB.refNum )
local f18_local4 = LUI.mp_menus.Aliens.FixGameModeTextForChaos( Lobby.GetVoteMapGametype( MapVoting.MapA.refNum ) )
local f18_local5 = LUI.mp_menus.Aliens.FixGameModeTextForChaos( Lobby.GetVoteMapGametype( MapVoting.MapB.refNum ) )
local f18_local6 = LUI.mp_menus.MPLivePublicLobby.IsVotingFinished()
local f18_local7 = not LUI.mp_menus.MPLivePublicLobby.GetLobbyLeaderboardStatus()
local f18_local8 = Engine.IsAliensMode()
local f18_local9 = SvS.IsSvS()
if not f18_local9 then
f18_local9 = Engine.GetDvarBool( "squad_match" )
end
local f18_local10 = 14
local f18_local11 = {}
if not f18_arg0.slot then
DebugPrint( "[WARNING] CAC: using cac slot index 0, this is only ok if you are editing a menu" )
local f18_local12 = 0
end
local f18_local13 = Cac.GetCustomClassLoc( f18_arg0.classLocation )
-- Add Start Button to Public Match Menu
function ReadyUpAction( f11_arg0, f11_arg1 )
Engine.SetDvarInt( "party_minplayers", 1)
end
if not f18_local9 then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "ready_up_button_id",
disabledFunc = false,
properties = {
disabledFunc = false,
button_text = Engine.Localize( "@LUA_MENU_START_GAME_CAPS" ),
button_action_func = ReadyUpAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_READY_UP" ),
}
}
end
if f18_local8 then
local f18_local14 = Engine.GetDvarInt( "pt_AliensReadyUpPublicInUse" )
if f18_local14 ~= nil and f18_local14 ~= 0 then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "ready_up_button_id",
disabledFunc = LUI.mp_menus.MPLivePublicLobby.GetReadyUpDisableValue,
properties = {
disabledFunc = LUI.mp_menus.MPLivePublicLobby.GetReadyUpDisableValue,
button_text = "",
button_action_func = LUI.mp_menus.MPLivePublicLobby.ReadyUpAction,
desc_text = LUI.mp_menus.MPLivePublicLobby.GetReadyUpDescText,
additional_handlers = {
recheck_start_button_lock = LUI.mp_menus.MPLivePublicLobby.RefreshButtonDisable,
element_refresh = LUI.mp_menus.MPLivePublicLobby.UpdateReadyUpText,
menu_create = LUI.mp_menus.MPLivePublicLobby.UpdateReadyUpText,
ready_up_button_refresh = LUI.mp_menus.MPLivePublicLobby.UpdateReadyUpText
}
},
children = {
{
type = "UITimer",
id = "ready_up_button_refresh_timer_id",
properties = {
event = "ready_up_button_refresh",
interval = 100,
disposable = false,
broadcastToRoot = false
}
}
}
}
end
end
if not f18_local8 then
if not SvS.IsSvS() or SvS.GetCurrentSquadModeInfo() ~= SvS.SquadModes.SquadAssault then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "create_squad_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_CREATE_A_CLASS_CAPS" ),
button_action_func = LUI.mp_menus.MPLivePublicLobby.CreateSquadAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_CREATE_A_CLASS" )
}
}
end
else
f18_local11[#f18_local11 + 1] = LUI.mp_menus.AliensLoadout.GetAliensLoadoutButton()
end
if not f18_local8 and not f18_local9 then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "operations_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_OPERATIONS_TITLE" ),
button_action_func = LUI.mp_menus.MPBarracks.BarrackOperationsAction,
desc_text = Engine.Localize( "@LUA_MENU_DESC_CHALLENGES" )
}
}
end
if not f18_local9 and not f18_local8 then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "barracks_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" ),
button_action_func = LUI.mp_menus.MPLivePublicLobby.BarracksAction,
desc_text = Clan.IsEnabled() and Engine.Localize( "@LUA_MENU_DESC_BARRACKS" ) or Engine.Localize( "@LUA_MENU_DESC_BARRACKS_PRIVATE" )
}
}
end
-- Disable Leaderboard (Code Removed)
if f18_local9 then
local f18_local14 = SvS.GetCurrentSquadModeInfo()
if f18_local14 and f18_local14.HasReports then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "squad_reports_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS" ),
desc_text = Engine.Localize( "@LUA_MENU_SQUAD_REPORTS_DESC" ),
button_action_func = function ( f19_arg0, f19_arg1 )
LUI.FlowManager.RequestAddMenu( f19_arg0, "squad_reports_menu", false, f19_arg1.controller, false, {
controller = f19_arg1.controller,
fromLiveLobby = true
} )
end
}
}
end
if f18_local14 and f18_local14.HasCompare then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "squad_compare_button_id",
disabled = LUI.mp_menus.MPLivePublicLobby.CheckSquadCompareDisabled(),
properties = {
button_text = Engine.Localize( "@LUA_MENU_SQUAD_COMPARE" ),
desc_text = Engine.Localize( "@LUA_MENU_SQUAD_COMPARE_DESC" ),
button_action_func = function ( f20_arg0, f20_arg1 )
if Squad.FoundMatch() then
local f20_local0 = SvS.BuildSquadCompareData( f20_arg1.controller )
if f20_local0 then
LUI.FlowManager.RequestAddMenu( f20_arg0, "squad_report_detail_menu", false, f20_arg1.controller, false, {
reportData = f20_local0,
controller = f20_arg1.controller,
isCompare = true
} )
end
end
end
},
handlers = {
check_button_disable_status = function ( f21_arg0, f21_arg1 )
local f21_local0 = f21_arg0
local f21_local1 = f21_arg0.processEvent
local f21_local2 = {}
local f21_local3
if not LUI.mp_menus.MPLivePublicLobby.CheckSquadCompareDisabled() then
f21_local3 = "enable"
if not f21_local3 then
else
f21_local2.name = f21_local3
f21_local1( f21_local0, f21_local2 )
end
end
f21_local3 = "disable"
end
}
}
end
end
if f18_local9 then
local f18_local14 = SvS.GetCurrentSquadModeInfo()
if not f18_local14.HasLeaderboard then
else
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "leaderboards_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_LEADERBOARDS_CAPS" ),
desc_text = Engine.Localize( "@LUA_MENU_DESC_LEADERBOARDS" ),
button_action_func = function ( f22_arg0, f22_arg1 )
if Engine.IsUserAGuest( f22_arg1.controller ) then
LUI.FlowManager.RequestPopupMenu( f22_arg0, "popup_no_guest", true, f22_arg1.controller )
else
LUI.FlowManager.RequestAddMenu( f22_arg0, "leaderboards", true, f22_arg1.controller )
end
end
}
}
end
end
if f18_local8 then
f18_local11[#f18_local11 + 1] = {
type = "UIGenericButton",
id = "leaderboards_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_LEADERBOARDS_CAPS" ),
desc_text = Engine.Localize( "@LUA_MENU_DESC_LEADERBOARDS" ),
button_action_func = function ( f22_arg0, f22_arg1 )
if Engine.IsUserAGuest( f22_arg1.controller ) then
LUI.FlowManager.RequestPopupMenu( f22_arg0, "popup_no_guest", true, f22_arg1.controller )
else
LUI.FlowManager.RequestAddMenu( f22_arg0, "leaderboards", true, f22_arg1.controller )
end
end
}
}
end
if f18_local8 and LUI.mp_menus.Aliens.CanAccessIntelMenu() then
f18_local11[#f18_local11 + 1] = LUI.mp_menus.AliensIntel.GetAliensIntelButton()
end
f18_local11[#f18_local11 + 1] = {
type = "button_desc_text",
id = "public_lobby_description_id",
properties = {
lines = 1
}
}
f18_local11[#f18_local11 + 1] = {
type = "UIElement",
id = "just_a_spacer_id",
focusable = false,
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = false,
left = 0,
right = 0,
top = 0,
bottom = f18_local10
}
}
}
f18_local11[#f18_local11 + 1] = {
type = "UITimer",
id = "check_status_tmr",
properties = {
event = "check_button_disable_status",
interval = 500,
disposable = false,
broadcastToRoot = true
}
}
if not f18_local9 and not f18_local6 then
f18_local11[#f18_local11 + 1] = {
type = "map_button",
id = "map_button_1",
properties = {
mapVoteIndex = MapVoting.MapA.refNum,
mapImage = RegisterMaterial( f18_local2 ),
mapName = f18_local0,
gamemode = f18_local4,
votesText = Engine.GetDvarString( "party_nextMapVoteStatus" ),
votesDvarName = "party_nextMapVoteStatus",
action = function ( f23_arg0, f23_arg1 )
LUI.mp_menus.MPLivePublicLobby.VoteForMap( f23_arg0, f23_arg1.controller, MapVoting.MapA.voteIndex )
end
}
}
f18_local11[#f18_local11 + 1] = {
type = "UIElement",
id = "just_another_spacer_id",
focusable = false,
states = {
default = {
leftAnchor = true,
rightAnchor = true,
topAnchor = true,
bottomAnchor = false,
left = 0,
right = 0,
top = 0,
bottom = 40
}
}
}
f18_local11[#f18_local11 + 1] = {
type = "map_button",
id = "map_button_2",
properties = {
mapVoteIndex = MapVoting.MapB.refNum,
mapImage = RegisterMaterial( f18_local3 ),
mapName = f18_local1,
gamemode = f18_local5,
votesText = Engine.GetDvarString( "party_alternateMapVoteStatus" ),
votesDvarName = "party_alternateMapVoteStatus",
action = function ( f24_arg0, f24_arg1 )
LUI.mp_menus.MPLivePublicLobby.VoteForMap( f24_arg0, f24_arg1.controller, MapVoting.MapB.voteIndex )
end
}
}
end
return f18_local11
end

View File

@ -0,0 +1,436 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
local Lobby = luiglobals.Lobby
game:addlocalizedstring("LUA_MENU_SERVER_FILTER_POPUP_INSTR", "Change how the servers are filtered")
function FiltersPopupClose(f1_arg0, f1_arg1)
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
local f1_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName("mp_leaderboard_main")
local f1_local2 = f1_local1.leaderboardType
if f1_local2 and f1_local2 ~= "" then
Leaderboards.OpenLeaderboard(f1_arg0, f1_local2, f1_local0.filterKey, f1_local1.filterDurationKey, f1_local1.isHardcore)
end
end
function mp_server_filters_popup()
return {
type = "UIElement",
id = "mp_leaderboard_filters_popup_container_id",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0
}
},
children = {
{
type = "UIImage",
id = "darken_bg",
states = {
default = CoD.ColorizeState(Swatches.Overlay.Color, {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0,
material = RegisterMaterial("white"),
alpha = Swatches.Overlay.AlphaMore
})
}
},
{
type = "UIElement",
id = "mp_server_filters_popup_id",
states = {
default = {
topAnchor = false,
bottomAnchor = false,
leftAnchor = false,
rightAnchor = false,
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
width = Leaderboards.Layout.FilterWidth,
height = 170
}
},
children = {
{
type = "generic_drop_shadow",
properties = {
offset_shadow = 0
}
},
{
type = "generic_menu_titlebar",
id = "server_filters_popup_title_bar_id",
properties = {
title_bar_text = Engine.Localize("@LUA_MENU_FILTER_CAPS"),
fill_alpha = 1
}
},
{
type = "generic_menu_background",
id = "server_filters_popup_background",
properties = {
fill_alpha = 1
}
},
{
type = "mp_server_filters_popup_page"
},
{
type = "UIBindButton",
id = "filters_popup_back_button",
handlers = {
button_secondary = MBh.DoMultiple({
MBh.LeaveMenu(),
FiltersPopupClose,
ForceRefreshServers
})
}
}
}
}
}
}
end
function ForceRefreshServers(f4_arg0, f4_arg1)
local f4_local0 = LUI.FlowManager.GetMenuScopedDataByMenuName("menu_systemlink_join")
f4_local0.serverCount = 0
if f4_local0.serverList then
local f4_local1 = Lobby.RefreshServerList
local f4_local2 = f4_arg1.controller
if not f4_local2 then
f4_local2 = Engine.GetFirstActiveController()
end
f4_local1(f4_local2)
f4_local0.serverList:processEvent({
name = "lose_focus",
immediate = true
})
f4_local0.serverList:clearSavedState()
f4_local0.serverList:processEvent({
name = "menu_refresh",
dispatchChildren = true
})
end
end
function OpenFiltersMenu(f36_arg0, f36_arg1)
LUI.FlowManager.RequestPopupMenu(f36_arg0, "mp_server_filters_popup", true, f36_arg1.controller, false, {})
end
LUI.MenuBuilder.registerDef("mp_server_filters_popup", mp_server_filters_popup)
GameTypeRefCol = 0
GameTypeNameCol = 1
GameTypeDescCol = 2
GameTypeImageCol = 3
function GetGametypes()
if Engine.IsCoreMode() then
return { "any", "dm", "war", "sd", "dom", "conf", "sr", "infect", "blitz", "grind", "cranked", "sotf", "sotf_ffa",
"horde", "gun", "grnd", "siege" }
end
return { "aliens" }
end
function GetLocalizedStringFromGametype(gametype)
if gametype == "any" then
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
end
local gametype_name = Engine.TableLookup("mp/gameTypesTable.csv", GameTypeRefCol, gametype, GameTypeNameCol)
if gametype_name ~= "" then
local token = "@"
local caps_token = "_CAPS"
localized = Engine.Localize(token .. gametype_name .. caps_token)
return localized
end
return "UNKNOWN"
end
function GetMapnameFromID(id)
if id == "any" then
return string.upper(Engine.Localize("LUA_MENU_LB_FILTER_GROUP_ALL"))
end
if id == "mp_descent_new" then
return Engine.Localize("@LUA_MENU_MAPNAME_DESCENT_CAPS")
elseif id == "mp_favela_iw6" then
return string.upper(Engine.Localize("@PRESENCE_MP_FAVELA_IW6"))
elseif id == "mp_conflict" then
return string.upper(Engine.Localize("@PRESENCE_MP_CONFLICT"))
elseif id == "mp_mine" then
return string.upper(Engine.Localize("@PRESENCE_MP_MINE"))
elseif id == "mp_shipment_ns" then
return string.upper(Engine.Localize("@PRESENCE_MP_SHIPMENT_NS"))
elseif id == "mp_zerosub" then
return string.upper(Engine.Localize("@PRESENCE_MP_ZEROSUB"))
elseif id == "mp_ca_red_river" then
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RED_RIVER"))
elseif id == "mp_ca_rumble" then
return string.upper(Engine.Localize("@PRESENCE_MP_CA_RUMBLE"))
end
if id == "mp_alien_town" then
return string.upper(Engine.Localize("@MPUI_ALIEN_TOWN"))
elseif id == "mp_alien_armory" then
return string.upper(Engine.Localize("@MPUI_ALIEN_ARMORY"))
elseif id == "mp_alien_beacon" then
return string.upper(Engine.Localize("@MPUI_ALIEN_BEACON"))
elseif id == "mp_alien_dlc3" then
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_DLC3"))
elseif id == "mp_alien_last" then
return string.upper(Engine.Localize("@PRESENCE_MP_ALIEN_LAST"))
end
return Engine.Localize("@LUA_MENU_MAPNAME_" .. id:sub(4) .. "_CAPS")
end
function GetMaps()
if Engine.IsCoreMode() then
return {
"any",
"mp_prisonbreak",
"mp_dart",
"mp_lonestar",
"mp_frag",
"mp_snow",
"mp_fahrenheit",
"mp_hashima",
"mp_warhawk",
"mp_sovereign",
"mp_zebra",
"mp_skeleton",
"mp_chasm",
"mp_flooded",
"mp_strikezone",
"mp_descent_new",
"mp_ca_red_river",
"mp_ca_rumble",
"mp_swamp",
"mp_boneyard_ns",
"mp_dome_ns",
"mp_battery3",
"mp_ca_impact",
"mp_ca_behemoth",
"mp_dig",
"mp_zulu",
"mp_pirate",
"mp_favela_iw6",
"mp_zerosub",
"mp_conflict",
"mp_mine",
"mp_shipment_ns",
}
elseif Engine.IsAliensMode() then
return {
"any",
"mp_alien_town",
"mp_alien_armory",
"mp_alien_beacon",
"mp_alien_dlc3",
"mp_alien_last"
}
end
return { "any" }
end
function ServerFiltersPopupItems(f7_arg0)
local rules = {}
if Engine.IsCoreMode() then
local gametype = {
type = "UIGenericButton",
id = "server_filters_gametype",
properties = {
style = GenericButtonSettings.Styles.GlassButton,
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
variant = GenericButtonSettings.Variants.Select,
content_width = 258,
side = "left",
button_text = Engine.Localize("@LUA_MENU_MODE_CAPS"),
button_display_func = function(f8_arg0, f8_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
if focusedElement.filterGametypeKey == nil then
focusedElement.filterGametypeKey = Engine.GetDvarString("ui_mapvote_entrya_gametype")
end
Engine.SetDvarString("ui_mapvote_entrya_gametype", focusedElement.filterGametypeKey)
return Engine.Localize(GetLocalizedStringFromGametype(focusedElement.filterGametypeKey))
end,
button_left_func = function(f9_arg0, f9_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
local keys = GetGametypes()
local defaultKeysI = 1
for i = 1, #keys, 1 do
if keys[i] == focusedElement.filterGametypeKey then
defaultKeysI = i
break
end
end
defaultKeysI = defaultKeysI - 1
if defaultKeysI < 1 then
focusedElement.filterGametypeKey = keys[#keys]
else
focusedElement.filterGametypeKey = keys[defaultKeysI]
end
end,
button_right_func = function(f10_arg0, f10_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
local keys = GetGametypes()
local defaultKeysI = 1
for i = 1, #keys, 1 do
if keys[i] == focusedElement.filterGametypeKey then
defaultKeysI = i
break
end
end
defaultKeysI = defaultKeysI + 1
if #keys < defaultKeysI then
focusedElement.filterGametypeKey = keys[1]
else
focusedElement.filterGametypeKey = keys[defaultKeysI]
end
end
}
}
table.insert(rules, gametype)
end
local maps = {
type = "UIGenericButton",
id = "server_filters_map",
properties = {
style = GenericButtonSettings.Styles.GlassButton,
substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.SubMenu,
variant = GenericButtonSettings.Variants.Select,
content_width = 258,
side = "left",
button_text = Engine.Localize("@LUA_MENU_MAPS_CAPS"),
button_display_func = function(f8_arg0, f8_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f8_arg0)
if focusedElement.filterMapnameKey == nil then
focusedElement.filterMapnameKey = Engine.GetDvarString("ui_mapvote_entrya_mapname")
end
Engine.SetDvarString("ui_mapvote_entrya_mapname", focusedElement.filterMapnameKey)
return GetMapnameFromID(focusedElement.filterMapnameKey)
end,
button_left_func = function(f9_arg0, f9_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f9_arg0)
local keys = GetMaps()
local defaultKeysI = 1
for i = 1, #keys, 1 do
if keys[i] == focusedElement.filterMapnameKey then
defaultKeysI = i
break
end
end
defaultKeysI = defaultKeysI - 1
if defaultKeysI < 1 then
focusedElement.filterMapnameKey = keys[#keys]
else
focusedElement.filterMapnameKey = keys[defaultKeysI]
end
end,
button_right_func = function(f10_arg0, f10_arg1)
local focusedElement = LUI.FlowManager.GetMenuScopedDataFromElement(f10_arg0)
local keys = GetMaps()
local defaultKeysI = 1
for i = 1, #keys, 1 do
if keys[i] == focusedElement.filterMapnameKey then
defaultKeysI = i
break
end
end
defaultKeysI = defaultKeysI + 1
if #keys < defaultKeysI then
focusedElement.filterMapnameKey = keys[1]
else
focusedElement.filterMapnameKey = keys[defaultKeysI]
end
end
}
}
table.insert(rules, maps)
return rules
end
function mp_server_filters_popup_page()
return {
type = "UIElement",
id = "mp_server_filters_popup_page_id",
properties = {},
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = AAR.Layout.TitleBarHeight + 1,
bottom = -1,
left = 1,
right = -1,
}
},
children = {
{
type = "UIText",
id = "leaderboard_filters_instruction",
properties = {
text = Engine.Localize("@LUA_MENU_SERVER_FILTER_POPUP_INSTR")
},
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = true,
top = 10,
bottom = 10 + CoD.TextSettings.NormalFont.Height,
left = 75,
right = -75,
alignment = LUI.Alignment.Center,
font = CoD.TextSettings.NormalFont.Font,
red = Colors.white.r,
green = Colors.white.g,
blue = Colors.white.b
}
}
},
{
type = "UIVerticalList",
id = "server_filters_popup_vlist",
states = {
default = {
topAnchor = false,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = -75,
bottom = 0,
left = 2,
right = -2,
spacing = 5
}
},
childrenFeeder = ServerFiltersPopupItems
}
}
}
end
LUI.MenuBuilder.registerDef("mp_server_filters_popup_page", mp_server_filters_popup_page)

View File

@ -0,0 +1,636 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
local Lobby = luiglobals.Lobby
local SystemLinkJoinMenu = LUI.mp_menus.SystemLinkJoinMenu
local controller = nil
local server = nil
COLUMN_0 = 0
COLUMN_1 = 460
COLUMN_2 = 660
COLUMN_3 = 800
COLUMN_4 = 985
COLUMN_5 = 500
SystemLinkJoinMenu.UpdateGameList = function(f3_arg0, f3_arg1)
local f3_local0 = f3_arg1.controller
if not f3_local0 then
f3_local0 = Engine.GetFirstActiveController()
end
local f3_local1 = LUI.FlowManager.GetMenuScopedDataFromElement(f3_arg0)
Lobby.UpdateServerDisplayList(f3_local0)
local f3_local2 = Lobby.GetServerCount(f3_local0)
if f3_local2 ~= f3_local1.serverCount then
f3_local1.serverCount = f3_local2
f3_arg0:processEvent({
name = "menu_refresh",
immediate = true
})
f3_arg0:processEvent({
name = "gain_focus",
immediate = true
})
end
end
SystemLinkJoinMenu.RefreshServers = function(f4_arg0, f4_arg1)
local f4_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f4_arg0)
f4_local0.serverCount = 0
if f4_local0.serverList then
local f4_local1 = Lobby.RefreshServerList
local f4_local2 = f4_arg1.controller
if not f4_local2 then
f4_local2 = Engine.GetFirstActiveController()
end
f4_local1(f4_local2)
f4_local0.serverList:processEvent({
name = "lose_focus",
immediate = true
})
f4_local0.serverList:clearSavedState()
f4_local0.serverList:processEvent({
name = "menu_refresh",
dispatchChildren = true
})
end
end
function CreateColumnImage(id, shader, leftAnchor, rightAnchor, left, alpha)
return {
type = "UIImage",
id = id,
states = {
default = {
font = CoD.TextSettings.NormalFont.Font,
alignment = LUI.Alignment.right,
height = 20,
width = 20,
left = left,
red = Colors.cac_label_text.r,
green = Colors.cac_label_text.g,
blue = Colors.cac_label_text.b,
alpha = alpha,
material = RegisterMaterial(shader)
},
},
handlers = {
button_over = MBh.AnimateToState("over"),
button_up = MBh.AnimateToState("default"),
button_disable = MBh.AnimateToState("disabled")
}
}
end
SystemLinkJoinMenu.CreateHeaderDef = function()
local header = {
type = "UIElement",
id = "header_row_id",
states = {
default = CoD.ColorizeState(Swatches.Overlay.Color, {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = true,
top = 2,
left = 2,
right = -2,
height = GenericTitleBarDims.TitleBarHeight,
material = RegisterMaterial("white"),
alpha = Swatches.Overlay.AlphaMore
})
},
}
local columns = {}
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(SystemLinkJoinMenu.Colors.generic_menu_bg_color))
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1))
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("host_header", Engine.Localize("@MENU_HOST_NAME"), true, false, COLUMN_0, COLUMN_1))
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("map_header", Engine.Localize("@MENU_MAP"), true, false, COLUMN_1, COLUMN_2))
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("players_header", Engine.Localize("@MENU_NUMPLAYERS"), true, false, COLUMN_2, COLUMN_3))
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("type_header", Engine.Localize("@MENU_TYPE1"), true, true, COLUMN_3, COLUMN_4))
table.insert(columns, SystemLinkJoinMenu.CreateColumnText("ping_header", Engine.Localize("@MENU_PING"), true, true, COLUMN_4, COLUMN_5))
table.insert(columns, SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, 1))
header.children = columns
return header
end
SystemLinkJoinMenu.CreateRowDef = function(f6_arg0, f6_arg1, f6_arg2, f6_arg3)
local option = {
type = "UIButton",
id = "row_" .. f6_arg1,
disabled = f6_arg2,
focusable = not f6_arg2,
properties = {
button_height = GenericButtonDims.button_height
},
states = {
default = {
topAnchor = true,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = MBh.Property("button_height"),
left = 0,
right = 0
}
},
handlers = {
button_action = MBh.EmitEventToRoot({
name = "select_game",
idx = f6_arg1
})
}
}
local columns = {}
table.insert(columns, SystemLinkJoinMenu.CreateRowBackground(f6_arg3))
table.insert(columns, SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_id", false, COLUMN_1, COLUMN_2))
local shade = SystemLinkJoinMenu.CreateColumnShade("column_shade_rect_2_id", true, COLUMN_3, -1)
table.insert(columns, shade)
local hostname = SystemLinkJoinMenu.CreateColumnText("host_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Host), true, false, COLUMN_0, COLUMN_1)
table.insert(columns, hostname)
local mapname = SystemLinkJoinMenu.CreateColumnText("map_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Map), true, false, COLUMN_1, COLUMN_2)
table.insert(columns, mapname)
local players = SystemLinkJoinMenu.CreateColumnText("players_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Clients), true, false, COLUMN_2, COLUMN_3)
table.insert(columns, players)
local gametype = SystemLinkJoinMenu.CreateColumnText("type_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Game), true, true, COLUMN_3, COLUMN_4)
table.insert(columns, gametype)
local ping = SystemLinkJoinMenu.CreateColumnText("ping_text", Lobby.GetServerData(f6_arg0, f6_arg1, SystemLinkJoinMenu.GameDataColumn.Ping), true, true, COLUMN_4, COLUMN_5)
table.insert(columns, ping)
local is_private = SystemLinkJoinMenu.CreateColumnImage("protected_header", "icon_lock", true, true, COLUMN_5, Lobby.GetServerData(f6_arg0, f6_arg1, 5) == "1" and 1 or 0)
table.insert(columns, is_private)
option.children = columns
return option
end
SystemLinkJoinMenu.OnCreate = function(f1_arg0, f1_arg1)
local f1_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f1_arg0)
f1_local0.serverCount = 0
f1_arg0:processEvent(LUI.ButtonHelperText.CommonEvents.addBackButton)
f1_arg0:processEvent({
name = "add_button_helper_text",
button_ref = "button_action",
helper_text = Engine.Localize("@MENU_JOIN_GAME1"),
side = "left",
clickable = true
})
f1_arg0:processEvent({
name = "add_button_helper_text",
button_ref = "button_alt1",
helper_text = Engine.Localize("@MENU_SB_TOOLTIP_BTN_REFRESH"),
side = "left",
clickable = true
})
f1_arg0:processEvent({
name = "add_button_helper_text",
button_ref = "button_alt2",
helper_text = Engine.Localize("@LUA_MENU_FILTER"),
side = "right",
clickable = true
})
local f1_local1 = Lobby.BuildServerList
local f1_local2 = f1_arg1.controller
if not f1_local2 then
f1_local2 = Engine.GetFirstActiveController()
end
f1_local1(f1_local2)
end
function ServerListBackground()
if Engine.IsAliensMode() then
return {
image = "frontend_aliens_art",
fill_color = {
r = 1,
g = 1,
b = 1
},
fill_alpha = 1
}
end
if Engine.IsCoreMode() then
return {
image = "white",
fill_color = {
r = 0.07,
g = 0.1,
b = 0.11
},
fill_alpha = 1
}
end
end
function JoinGame(f2_arg0, f2_arg1)
server = f2_arg1
controller = server.controller
if not f2_local1 then
controller = Engine.GetFirstActiveController()
end
local is_private = Lobby.GetServerData(controller, server.idx, 5)
if is_private == "1" then
LUI.FlowManager.RequestPopupMenu(server, "server_password_field", false, controller, false)
else
Lobby.JoinServer(controller, server.idx)
end
end
SystemLinkJoinMenu.menu_systemlink_join = function()
if Engine.IsCoreMode() then
Engine.SetDvarString("ui_customModeName", "mp")
elseif Engine.IsAliensMode() then
Engine.SetDvarString("ui_customModeName", "aliens")
end
if Engine.GetDvarString("ui_mapvote_entrya_gametype") == nil
or Engine.GetDvarString("ui_mapvote_entrya_gametype") then
Engine.SetDvarString("ui_mapvote_entrya_gametype", "any")
end
if Engine.GetDvarString("ui_mapvote_entrya_mapname") == nil
or Engine.GetDvarString("ui_mapvote_entrya_mapname") == ""
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == nil and Engine.IsAliensMode())
or (string.match(Engine.GetDvarString("ui_mapvote_entrya_mapname"), "alien") == "alien" and Engine.IsCoreMode()) then
Engine.SetDvarString("ui_mapvote_entrya_mapname", "any")
end
return {
type = "UIElement",
id = "menu_systemlink_join_root",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0
}
},
handlers = {
menu_create = SystemLinkJoinMenu.OnCreate,
select_game = JoinGame
},
children = {
{
type = "UIImage",
states = {
default = CoD.ColorizeState(Swatches.Overlay.Color, {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0,
material = RegisterMaterial("white"),
alpha = Swatches.Overlay.AlphaMore,
})
}
},
{
type = "UIElement",
states = {
default = {
topAnchor = false,
bottomAnchor = false,
leftAnchor = true,
rightAnchor = true,
left = 200,
right = -200,
height = 550
}
},
children = {
{
type = "generic_drop_shadow",
properties = {
offset_shadow = 0
}
},
{
type = "generic_menu_titlebar",
id = "menu_systemlink_join_title_id",
properties = {
fill_alpha = 1,
font = CoD.TextSettings.BoldFont,
title_bar_text = Engine.Localize("@PLATFORM_SYSTEM_LINK_TITLE"),
title_bar_text_indent = GenericTitleBarDims.TitleBarLCapWidth,
title_bar_alignment = LUI.Alignment.Left
}
},
{
type = "generic_menu_background",
id = "menu_systemlink_join_bg_id",
properties = {
fill_alpha = Swatches.Overlay.AlphaMore,
},
children = {
SystemLinkJoinMenu.CreateHeaderDef(),
{
type = "UIVerticalList",
id = "menu_systemlink_join_game_list_id",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = GenericTitleBarDims.TitleBarHeight + 4,
bottom = 600,
left = 2,
right = -2
}
},
childrenFeeder = SystemLinkJoinMenu.LinkGamesFeeder,
handlers = {
update_game_list = SystemLinkJoinMenu.UpdateGameList,
menu_create = function(f12_arg0, f12_arg1)
local f12_local0 = LUI.FlowManager.GetMenuScopedDataFromElement(f12_arg0)
f12_local0.serverList = f12_arg0
SystemLinkJoinMenu.RefreshServers(f12_arg0, f12_arg1)
end
}
},
{
type = "button_helper_text_main",
id = "online_vault_helper_text_id",
properties = {
left_inset = 10,
right_inset = -10,
top_margin = GenericFooterDims.TopMargin_WithoutBackground,
height = 42,
spacing = 12,
background_alpha = 0
}
}
}
}
}
},
{
type = "UITimer",
id = "menu_systemlink_join_update_timer",
properties = {
event = "update_game_list",
interval = 250,
disposable = false,
broadcastToRoot = true
}
},
{
type = "UIBindButton",
id = "menu_systemlink_join_bind_button_id",
handlers = {
button_secondary = MBh.LeaveMenu(),
button_alt1 = SystemLinkJoinMenu.RefreshServers,
button_alt2 = OpenFiltersMenu
}
},
}
}
end
LUI.MenuBuilder.m_definitions["menu_systemlink_join"] = function()
local menu = SystemLinkJoinMenu.menu_systemlink_join()
local rows = menu.children[2].children[3].children
local header = rows[1]
-- Increase server list width
menu.children[2].states.default.left = 100
menu.children[2].states.default.right = -100
menu.children[3].properties.interval = 10 -- 250
return menu
end
ServerPasswordListFeeder = function()
return {
{
type = "UIVerticalList",
id = "password_field_items",
states = {
default = {
topAnchor = true,
leftAnchor = true,
bottomAnchor = false,
rightAnchor = true,
}
},
children = {
{
type = "UIGenericButton",
id = "password_button_id",
properties = {
variant = GenericButtonSettings.Variants.Plain,
button_text = Engine.Localize("PATCH_MENU_CHANGE_PASSWORD_CAPS"),
button_display_func = function()
local f31_local0 = Engine.GetDvarString("password")
if f31_local0 then
f31_local0 = Engine.GetDvarString("password") ~= ""
end
local f31_local1
if f31_local0 then
f31_local1 = Engine.Localize("PATCH_MENU_PASSWORD_SET")
if not f31_local1 then
else
return f31_local1
end
end
f31_local1 = Engine.Localize("MENU_NONE")
end,
button_action_func = function(f32_arg0, f32_arg1)
Engine.ExecNow("setfromdvar ui_password password")
Engine.OpenScreenKeyboard(f32_arg1.controller, Engine.Localize("MENU_PASSWORD"), Engine.GetDvarString("ui_password") or "", Lobby.PasswordLength, false, false, CoD.KeyboardInputTypes.Password)
end
},
handlers = {
text_input_complete = function(f33_arg0, f33_arg1)
if f33_arg1.text then
Engine.SetDvarString("password", f33_arg1.text)
f33_arg0:processEvent({
name = "content_refresh"
})
end
end
}
},
{
type = "UIGenericButton",
id = "connect_button_id",
properties = {
variant = GenericButtonSettings.Variants.Plain,
button_text = Engine.Localize("MENU_JOIN_GAME"), button_action_func = function()
Lobby.JoinServer(controller, server.idx)
end
}
}
}
}
}
end
password_field = function(f50_arg0, f50_arg1)
return {
type = "UIElement",
id = "server_popup_container_id",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0
}
},
children = {
{
type = "UIImage",
id = "darken_bg",
states = {
default = CoD.ColorizeState(Swatches.Overlay.Color, {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
left = 0,
right = 0,
top = 0,
bottom = 0,
material = RegisterMaterial("white"),
alpha = Swatches.Overlay.AlphaMore
})
}
},
{
type = "UIElement",
id = "mp_server_filters_popup_id",
states = {
default = {
topAnchor = false,
bottomAnchor = false,
leftAnchor = false,
rightAnchor = false,
top = -1 * Leaderboards.Layout.FilterHeight * 0.6,
width = Leaderboards.Layout.FilterWidth,
height = 145
}
},
children = {
{
type = "generic_drop_shadow",
properties = {
offset_shadow = 0
}
},
{
type = "generic_menu_titlebar",
id = "server_filters_popup_title_bar_id",
properties = {
title_bar_text = Engine.Localize("@LUA_MENU_LOBBY_JOINING"),
fill_alpha = 1
}
},
{
type = "generic_menu_background",
id = "server_filters_popup_background",
properties = {
fill_alpha = 1
}
},
{
type = "UIElement",
id = "mp_server_password_popup_page_id",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = AAR.Layout.TitleBarHeight + 1,
bottom = -1,
left = 1,
right = -1,
}
},
children = {
{
type = "generic_border",
properties = {
thickness = 2,
border_red = Colors.generic_menu_frame_color.r,
border_green = Colors.generic_menu_frame_color.g,
border_blue = Colors.generic_menu_frame_color.b
},
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0,
alpha = 0.6
}
}
},
{
type = "UIVerticalList",
id = "server_filters_popup_vlist",
states = {
default = {
topAnchor = false,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = -90,
bottom = 0,
left = 0,
right = 0,
spacing = 5
}
},
childrenFeeder = ServerPasswordListFeeder
}
}
},
{
type = "UIBindButton",
id = "filters_popup_back_button",
handlers = {
button_secondary = MBh.DoMultiple({
MBh.LeaveMenu(),
FiltersPopupClose,
ForceRefreshServers
})
}
}
}
}
}
}
end
LUI.MenuBuilder.registerDef("server_password_field", password_field)

View File

@ -0,0 +1,167 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
game:addlocalizedstring("LUA_MENU_UNLOCKALL", "UNLOCK ALL")
game:addlocalizedstring("LUA_MENU_UNLOCKALL_DESC",
"Whether all items should be unlocked.")
function UnlockAllAction( f1_arg0, f1_arg1 )
Engine.Exec("unlockstats")
end
function StatsButtonHelper( f2_arg0, f2_arg1 )
f2_arg0:processEvent( LUI.ButtonHelperText.CommonEvents.addBackButton )
end
function BarrackPrestigeResetStatsAction( f3_arg0, f3_arg1 )
LUI.FlowManager.RequestAddMenu( f3_arg0, "prestige_reset", true, f3_arg1.controller )
end
function menu_stats()
return {
type = "UIElement",
id = "menu_stats_root",
states = {
default = {
topAnchor = true,
bottomAnchor = true,
leftAnchor = true,
rightAnchor = true,
top = 0,
bottom = 0,
left = 0,
right = 0
}
},
handlers = {
menu_create = StatsButtonHelper,
},
children = {
{
type = "generic_menu_title",
id = "stats_title_text_id",
properties = {
menu_title = Engine.Localize( "@LUA_MENU_BARRACKS_CAPS" )
}
},
{
type = "UIVerticalList",
id = "stats_options_vlist_id",
states = {
default = {
alignment = LUI.Alignment.Top,
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false,
left = GenericMenuDims.menu_left,
right = GenericMenuDims.menu_right,
top = GenericMenuDims.menu_top,
bottom = GenericMenuDims.menu_bottom
}
},
childrenFeeder = StatsOptionsFeeder
},
{
type = "button_helper_text_main",
id = "stats_button_helper_text_id"
},
{
type = "UIBindButton",
id = "stats_bind_buttons_id",
handlers = {
button_secondary = MBh.LeaveMenu()
}
},
}
}
end
function StatsOptionsFeeder( f8_arg0 )
local f8_local4 = {}
local f8_local0 = Engine.IsAliensMode()
local f8_local2 = Engine.InLobby()
local f8_local3 = f8_arg0.exclusiveController
f8_local4[#f8_local4 + 1] = {
type = "UIGenericButton",
id = "unlockall_items_button_id",
properties = {
button_text = Engine.Localize( "@LUA_MENU_UNLOCKALL" ),
button_action_func = UnlockAllAction,
desc_text = Engine.Localize( "@LUA_MENU_UNLOCKALL_DESC" )
}
}
if not f8_local2 then
local f8_local5 = #f8_local4 + 1
local f8_local6 = {
type = "UIGenericButton",
id = "reset_stats_button_id"
}
local f8_local7
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
f8_local7 = Engine.IsUserAGuest( f8_local3 )
else
f8_local7 = true
end
f8_local6.disabled = f8_local7
f8_local6.properties = {
button_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_CAPS" ),
button_action_func = BarrackPrestigeResetStatsAction,
desc_text = Engine.Localize( "@LUA_MENU_MP_RESET_STATS_DESC" )
}
f8_local6.handlers = {
element_refresh = function ( f12_arg0, f12_arg1 )
local f12_local0
if Cac.GetPrestigeLevel( f8_local3, Cac.GetSquadLoc() ) == 10 then
f12_local0 = Engine.IsUserAGuest( f8_local3 )
else
f12_local0 = true
end
local f12_local1 = f12_arg0
local f12_local2 = f12_arg0.processEvent
local f12_local3 = {}
local f12_local4
if f12_local0 then
f12_local4 = "disable"
if not f12_local4 then
else
f12_local3.name = f12_local4
f12_local2( f12_local1, f12_local3 )
end
end
f12_local4 = "enable"
end
}
f8_local4[f8_local5] = f8_local6
end
f8_local4[#f8_local4 + 1] = {
type = "button_desc_text",
id = "stats_button_description_id"
}
return f8_local4
end
function stats_options_vlist()
return {
type = "UIVerticalList",
focusable = true,
states = {
default = {
alignment = LUI.Alignment.Top,
leftAnchor = true,
rightAnchor = false,
topAnchor = true,
bottomAnchor = false,
left = GenericMenuDims.menu_left,
right = GenericMenuDims.menu_right,
top = GenericMenuDims.menu_top,
bottom = GenericMenuDims.menu_bottom
}
}
}
end
LUI.MenuBuilder.registerDef( "menu_stats", menu_stats )
LUI.MenuBuilder.registerDef( "stats_options_vlist", stats_options_vlist )

View File

@ -0,0 +1,6 @@
if (game:issingleplayer() or not Engine.InFrontend()) then
return
end
game:addlocalizedstring("LUA_MENU_MP_SQUADS_DLC_CATEGORY_4_CAPS", "^3SAFEGUARD - BOTS^7");
game:addlocalizedstring("LUA_MENU_MP_SQUADS_DLC_DESC_4", "Play Safeguard alongside AI teammates.");

View File

@ -0,0 +1,101 @@
if (game:issingleplayer()) then
return
end
if (package.loaded["LUI.mp_hud.OptionsMenu"] == nil) then
return
end
package.loaded["LUI.mp_hud.OptionsMenu"].options_def = function()
local f14_local0 = GameX.GetGameMode()
local f14_local1 = Engine.TableLookup( GameTypesTable.File, GameTypesTable.Cols.Ref, f14_local0, GameTypesTable.Cols.ClassChoice ) == "1"
if not f14_local1 then
f14_local1 = GameX.UsesFakeLoadout()
end
local f14_local2 = LUI.mp_hud.OptionsMenu.checkTeamChoice( f14_local0 )
local f14_local3 = GameX.IsRankedMatch()
local f14_local4 = Engine.GetDvarBool( "splitscreen_ingame" )
local f14_local5 = Game.GetOmnvar( "ui_team_selected" )
local f14_local6 = Game.GetOmnvar( "ui_loadout_selected" )
local f14_local7 = LUI.mp_hud.OptionsMenu.chooseClassCheck( f14_local3, f14_local5, f14_local2 )
local self = LUI.UIVerticalList.new()
self.id = "pause_selections_Id"
self:registerAnimationState("default", {
topAnchor = true,
leftAnchor = true,
bottomAnchor = false,
rightAnchor = false,
top = GenericMenuDims.menu_top,
left = GenericMenuDims.menu_left,
bottom = GenericMenuDims.menu_bottom,
right = GenericMenuDims.menu_right,
alignment = LUI.Alignment.Top
})
self:animateToState( "default", 0 )
self:makeFocusable()
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and GameX.IsSpectatingNotOnTeam() == false and f14_local1 == true and f14_local7 == true and not MLG.IsMLGSpectator() then
LUI.MenuBuilder.BuildAddChild(self, {
type = "UIGenericButton",
id = "btn_MPPause_0",
properties = {
childNum = 1,
button_text = Engine.Localize( "@LUA_MENU_CHOOSE_CLASS_CAPS" ),
button_action_func = LUI.mp_hud.OptionsMenu.chooseClassButtonAction
}
})
end
if f14_local0 ~= "aliens" and false == CoD.IsFireTeamMode() and f14_local2 == true and not MLG.IsMLGSpectator() then
LUI.MenuBuilder.BuildAddChild(self, {
type = "UIGenericButton",
id = "btn_MPPause_1",
properties = {
childNum = 2,
button_text = Engine.Localize( "@LUA_MENU_CHANGE_TEAM_CAPS" ),
button_action_func = LUI.mp_hud.OptionsMenu.changeTeamButtonAction
}
})
end
LUI.MenuBuilder.BuildAddChild(self, {
type = "UIGenericButton",
id = "btn_MPPause_2",
disabledFunc = LUI.mp_hud.OptionsMenu.optionsLockedUpdate,
properties = {
childNum = 3,
button_text = Engine.Localize( "@LUA_MENU_OPTIONS_CAPS" ),
button_action_func = LUI.mp_hud.OptionsMenu.optionsButtonAction
},
handlers = {
refresh_options_button = LUI.mp_hud.OptionsMenu.refreshOptionDisable
}
})
if GameX.IsOnlineMatch() and (not Engine.IsAliensMode() or not Game.GetOmnvar( "ui_alien_is_solo" )) and not MLG.IsMLGSpectator() then
LUI.MenuBuilder.BuildAddChild(self, {
type = "UIGenericButton",
id = "btn_MPPause_3",
properties = {
childNum = 4,
button_text = Engine.Localize( "@LUA_MENU_MUTE_PLAYERS_CAPS" ),
button_action_func = LUI.mp_hud.OptionsMenu.mutePlayersButtonAction
}
})
end
LUI.MenuBuilder.BuildAddChild(self, {
type = "UIGenericButton",
id = "btn_MPPause_5",
properties = {
childNum = 6,
button_text = Engine.Localize( "@LUA_MENU_END_GAME_CAPS" ),
button_action_func = LUI.mp_hud.OptionsMenu.endGameButtonAction
}
})
return self
end

366
iw6/server.cfg Normal file
View File

@ -0,0 +1,366 @@
///////////////////////////////////////////////////
/// IW6 Server Configuration //
///////////////////////////////////////////////////
///////////////////////////////////////////////////
// SERVER NAME & COLORS TIPS //
///////////////////////////////////////////////////
// //
// ^1 Red //
// ^2 Green //
// ^3 yellow //
// ^4 Blue //
// ^5 Cyan //
// ^6 Pink //
// ^7 White //
// ^8 Depends on the team colors playing. //
// ^9 grey //
// ^0 Black //
// ^: Rainbow colors //
// //
///////////////////////////////////////////////////
set sv_hostname "IW6 Default Server" // Sets the server hostname.
name "[IW6] server" // Currently sets the say name
//////////////////////////////////////////////////
// ADMIN INFO (Optional) //
//////////////////////////////////////////////////
set _Admin "" // Your username.
set _Email "" // E-mail address. you can leave blank
set _Website "" // Website. (IW4MAdmin uses this.)
set _Location "Earth" // Location
//////////////////////////////////////////////////
// NON-GAMEPLAY CONFIGURATION //
//////////////////////////////////////////////////
set sv_maxclients "18" // Max players in your server.
set rcon_password "" // Access to your server to change stuff remotely or ingame. (Empty = disabled)
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
set g_deadChat "0" // Toggle allowing dead players to chat with living players. (0 (default) or 1)
set g_inactivity "420" // Time in seconds before the server will kick a user for inactivity. (range 0 - 10000)
set sv_kickBanTime "3600" // Time in seconds for a player temporary ban. (on kick/tempban) (range 0 - 3600)
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands.
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions.
set sv_reconnectlimit "3" // How many times you can try to reconnect.
//////////////////////////////////////////////////
// BASE GAME CONFIGURATION //
//////////////////////////////////////////////////
// //
// blitz - Blitz //
// conf - Kill Confirmed //
// cranked - Cranked //
// dm - Free-for-all //
// dom - Domination //
// grind - Grind //
// grnd - Drop Zone //
// gun - Gun Game //
// horde - Safeguard //
// infect - Infected //
// sd - Search and Destroy //
// siege - Reinforce //
// sotf - Hunted //
// sotf_ffa - Hunted FFA //
// sr - Search and Rescue //
// war - Team Deathmatch //
// //
//////////////////////////////////////////////////
//GAMETYPE CURRENTLY HAS TO BE SET VIA THE MAP ROTATION
set scr_game_allowkillcam "1" // Allow Killcam.
set team_rebalance "1" // Auto Balance teams?
set scr_teambalance "1" // Enable or Disable auto balance.
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
set sv_checkMinPlayers "0"
set scr_game_graceperiod "0"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "1"
set scr_game_perks "1"
set scr_game_forceuav "0"
set scr_game_hardpoints "1"
set scr_nukeTimer "10"
set scr_nukeCancelMode "0"
set scr_default_maxagents "5"
set scr_disableClientSpawnTraces "0"
set scr_hardpoint_allowartillery "1"
set scr_hardpoint_allowuav "1"
set scr_hardpoint_allowhelicopter "1"
set scr_team_respawntime "0"
set scr_player_numlives "0"
set scr_player_respawndelay "0"
set scr_player_suicidespawndelay "0"
set scr_player_forcerespawn "1"
set scr_player_sprinttime "4"
set scr_explBulletMod "1"
set scr_maxPerPlayerExplosives "2"
//////////////////////////////////////////////////
// HARDCORE CONFIGURATION //
//////////////////////////////////////////////////
// uncomment below commands for some hardcore //
// by removing the // before each set dvar. //
//////////////////////////////////////////////////
// set g_hardcore "1" // Enable hardcore mode.
// set scr_hardcore "1" // Enable hardcore mode again...
// set ui_hud_hardcore "1" // Removes Heads up display which can be used both regular and HC.
// set scr_player_maxhealth "30" // Percent of Health players will have on Respawn. (100 is normal. 30 is hardcore)
// set scr_team_fftype "1" // Enable or Disable Friendly Fire. (1 on, 2 reflect, 3 shared)
// set scr_player_healthregentime "0" // Time it takes you to recover damage. (5 is normal, 0 is hardcore)
// set scr_team_teamkillspawndelay "20"
// set scr_team_kickteamkillers "0"
//////////////////////////////////////////////////
// TEAM DEATHMATCH GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_war_scorelimit "75" // Score limit to win the game.
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
set scr_war_roundlimit "1" // Rounds per game.
set scr_war_winlimit "1" // Amount of wins needed to win a round-based game
set scr_war_promode "0"
//////////////////////////////////////////////////
// FREE FOR ALL GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_dm_scorelimit "30" // Score limit to win the game.
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
set scr_dm_numlives "0" // Number of lives per player. 0 for unlimited.
set scr_dm_roundlimit "1" // Rounds per game.
set scr_dm_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_dm_promode "0"
//////////////////////////////////////////////////
// DOMINATION GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_dom_scorelimit "200" // Score limit to win the game.
set scr_dom_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
set scr_dom_roundlimit "1" // Rounds per game.
set scr_dom_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_dom_promode "0"
//////////////////////////////////////////////////
// SEARCH AND DESTROY GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_sd_scorelimit "1" // Score limit required to win the game.
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_sd_numlives "1" // Number of lives per player per game.
set scr_sd_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
set scr_sd_winlimit "4" // Amount of wins needed to win a round-based game.
set scr_sd_roundswitch "3" // After X rounds, switch sides.
set scr_sd_bombtimer "45" // Time taken for the bomb to detonate.
set scr_sd_defusetime "5" // Time taken to defuse the bomb.
set scr_sd_multibomb "0" // Allow multiple people to 'have the bomb'.
set scr_sd_planttime "5" // How long will it take player to 'plant the bomb'.
set scr_sd_promode "0"
//////////////////////////////////////////////////
// SEARCH AND RESCUE GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_sr_scorelimit "1" // Score limit required to win the game.
set scr_sr_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_sr_playerrespawndelay "0" // How long player will wait until respawn.
set scr_sr_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_sr_numlives "1" // Number of lives per player per game.
set scr_sr_roundlimit "0" // Rounds the game is limited to 0 for unlimited.
set scr_sr_winlimit "4" // amount of wins needed to win a round-based game.
set scr_sr_roundswitch "3" // After X rounds, switch sides.
set scr_sr_bombtimer "45" // Time taken for the bomb to detonate.
set scr_sr_defusetime "5" // Time taken to defuse the bomb.
set scr_sr_multibomb "0" // allow multiple people to 'have the bomb'.
set scr_sr_planttime "5" // How long will it take player to 'plant the bomb'.
set scr_sr_promode "0"
//////////////////////////////////////////////////
// KILL CONFIRMED GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_conf_scorelimit "65" // Score limit to win the game.
set scr_conf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_conf_playerrespawndelay "0" // How long player will wait until respawn.
set scr_conf_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_conf_numlives "0" // Number of lives per player 0 for unlimited.
set scr_conf_roundlimit "1" // Rounds per game.
set scr_conf_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_conf_promode "0"
//////////////////////////////////////////////////
// INFECTED DRAFT GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_infect_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_infect_playerrespawndelay "0" // How long player will wait until respawn.
set scr_infect_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_infect_numlives "0" // Number of lives per player 0 for unlimited.
set scr_infect_roundlimit "1" // Rounds per game.
set scr_infect_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_infect_promode "0"
//////////////////////////////////////////////////
// GRIND GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_grind_scorelimit "65" // Score limit to win the game.
set scr_grind_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_grind_playerrespawndelay "0" // How long player will wait until respawn.
set scr_grind_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_grind_numlives "0" // Number of lives per player 0 for unlimited.
set scr_grind_roundlimit "1" // Rounds per game.
set scr_grind_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_grind_promode "0"
//////////////////////////////////////////////////
// DROP ZONE GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_grnd_scorelimit "7500" // Score limit to win the game.
set scr_grnd_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_grnd_dropTime "15" // Time it takes for the care packages to drop.
set scr_grnd_numlives "0" // Number of lives per player 0 for unlimited.
set scr_grnd_playerrespawndelay "0" // How long player will wait until respawn.
set scr_grnd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_grnd_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_grnd_zoneSwitchTime "60" // Amount of time before the zone switches.
set scr_grnd_promode "0"
//////////////////////////////////////////////////
// BLITZ GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_blitz_scorelimit "16" // Score limit to win the game.
set scr_blitz_timelimit "5" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_blitz_playerrespawndelay "0" // How long player will wait until respawn.
set scr_blitz_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_blitz_numlives "0" // Number of lives per player 0 for unlimited.
set scr_blitz_roundlimit "2" // Rounds per game.
set scr_blitz_roundswitch "1" // Switching sides.
set scr_blitz_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_blitz_scoredelay "10"
set scr_blitz_promode "0"
//////////////////////////////////////////////////
// CRANKED GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_cranked_scorelimit "100" // Score limit to win the game.
set scr_cranked_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_cranked_playerrespawndelay "0" // How long player will wait until respawn.
set scr_cranked_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_cranked_numlives "0" // Number of lives per player 0 for unlimited.
set scr_cranked_roundlimit "1" // Rounds per game.
set scr_cranked_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_cranked_teambased "1" // Cranked in Team mode instead of Free-for-all.
set scr_cranked_scorelimit_ffa "60" // Score limit to win the game on FFA mode if teambased is set to 0.
set scr_cranked_promode "0"
//////////////////////////////////////////////////
// SAFEGUARD GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_horde_scorelimit "0" // Score limit to win the game.
set scr_horde_timelimit "0" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_horde_roundlimit "1" // Rounds per game.
set scr_horde_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_horde_numlives "1" // Number of lives per player 0 for unlimited.
set scr_horde_playerrespawndelay "0" // How long player will wait until respawn.
set scr_horde_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_horde_promode "0"
set scr_horde_maxagents "24"
set scr_horde_difficulty "3"
//////////////////////////////////////////////////
// HUNTED GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_sotf_scorelimit "65" // Score limit to win the game.
set scr_sotf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_sotf_roundlimit "1" // Rounds per game.
set scr_sotf_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_sotf_numlives "0" // Number of lives per player 0 for unlimited.
set scr_sotf_playerrespawndelay "0" // How long player will wait until respawn.
set scr_sotf_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_sotf_promode "0"
//////////////////////////////////////////////////
// HUNTED (FFA) GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_sotf_ffa_scorelimit "25" // Score limit to win the game.
set scr_sotf_ffa_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
set scr_sotf_ffa_roundlimit "1" // Rounds per game.
set scr_sotf_ffa_winlimit "1" // Amount of wins needed to win a round-based game.
set scr_sotf_ffa_numlives "0" // Number of lives per player 0 for unlimited.
set scr_sotf_ffa_playerrespawndelay "0" // How long player will wait until respawn.
set scr_sotf_ffa_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
set scr_sotf_ffa_promode "0"
////////////////////////////////////////////////////////
// MAP SHORT NAMES ROTATION LIST //
////////////////////////////////////////////////////////
// //
// Prision Break - mp_prisonbreak //
// Octane - mp_dart //
// Tremor - mp_lonestar //
// Freight - mp_frag //
// Whiteout - mp_snow //
// Stormfront - mp_fahrenheit //
// Siege - mp_hashima //
// Warhawk - mp_warhawk //
// Sovereign - mp_sovereign //
// Overload - mp_zebra //
// Stonehaven - mp_skeleton //
// Chasm - mp_chasm //
// Flooded - mp_flooded //
// Strikezone - mp_strikezone //
// Free Fall - mp_descent_new //
// //
/// DEVASTATION DLC ////////////////////////////////////
// //
// Unearthed - mp_dome_ns //
// Collision - mp_ca_impact //
// Behemoth - mp_ca_behemoth //
// Ruins - mp_battery3 //
// //
/// INVASION DLC ///////////////////////////////////////
// //
// Pharaoh - mp_dig //
// Favela - mp_favela_iw6 //
// Mutiny - mp_pirate //
// Departed - mp_zulu //
// //
/// NEMESIS DLC ////////////////////////////////////////
// //
// Dynasty - mp_conflict //
// Goldrush - mp_mine //
// Showtime - mp_shipment_ns //
// Subzero - mp_zerosub //
// //
/// ONSLAUGHT DLC //////////////////////////////////////
// //
// Ignition - mp_boneyard_ns //
// Containment - mp_ca_red_river //
// Bayview - mp_ca_rumble //
// Fog - mp_swamp //
// //
////////////////////////////////////////////////////////
set sv_maprotation "gametype war map mp_prisonbreak map mp_dart map mp_lonestar map mp_frag map mp_snow map mp_fahrenheit map mp_hashima map mp_warhawk map mp_sovereign map mp_zebra map mp_skeleton map mp_chasm map mp_flooded map mp_strikezone map mp_descent_new map mp_dome_ns map mp_ca_impact map mp_ca_behemoth map mp_battery3 map mp_dig map mp_favela_iw6 map mp_pirate map mp_conflict map mp_mine map mp_shipment_ns map mp_zerosub map mp_boneyard_ns map mp_ca_red_river map mp_ca_rumble map mp_swamp"

130
iw6/server_zm.cfg Normal file
View File

@ -0,0 +1,130 @@
///////////////////////////////////////////////////
/// IW6 Server Configuration //
///////////////////////////////////////////////////
///////////////////////////////////////////////////
// SERVER NAME & COLORS TIPS //
///////////////////////////////////////////////////
// //
// ^1 Red //
// ^2 Green //
// ^3 yellow //
// ^4 Blue //
// ^5 Cyan //
// ^6 Pink //
// ^7 White //
// ^8 Depends on the team colors playing. //
// ^9 grey //
// ^0 Black //
// ^: Rainbow colors //
// //
///////////////////////////////////////////////////
set sv_hostname "IW6 Default Server" // Sets the server hostname.
name "[IW6] server" // Currently sets the say name
//////////////////////////////////////////////////
// ADMIN INFO (Optional) //
//////////////////////////////////////////////////
set _Admin "" // Your username.
set _Email "" // E-mail address. you can leave blank
set _Website "" // Website. (IW4MAdmin uses this.)
set _Location "Earth" // Location
//////////////////////////////////////////////////
// NON-GAMEPLAY CONFIGURATION //
//////////////////////////////////////////////////
set sv_maxclients "4" // Max players in your server.
set rcon_password "" // Access to your server to change stuff remotely or ingame. (Empty = disabled)
set g_password "" // Password Protected Server. Leave blank if you want players to join or set password if you want to keep public out.
set g_deadChat "0" // Toggle allowing dead players to chat with living players. (0 (default) or 1)
set g_inactivity "420" // Time in seconds before the server will kick a user for inactivity. (range 0 - 10000)
set sv_kickBanTime "3600" // Time in seconds for a player temporary ban. (on kick/tempban) (range 0 - 3600)
set sv_allowClientConsole "1" // Enable or Disable players ability to access server commands.
set sv_timeout "20" // Timeout time period. You will timeout after (20) seconds when attempting to connect or if you are getting connection interruptions.
set sv_reconnectlimit "3" // How many times you can try to reconnect.
//////////////////////////////////////////////////
// BASE GAME CONFIGURATION //
//////////////////////////////////////////////////
// //
// aliens - Extinction (CO-OP MODE) //
// //
//////////////////////////////////////////////////
//GAMETYPE CURRENTLY HAS TO BE SET VIA THE MAP ROTATION
set scr_game_allowkillcam "1" // Allow Killcam.
set team_rebalance "1" // Auto Balance teams?
set scr_teambalance "1" // Enable or Disable auto balance.
set scr_game_spectatetype "2" // Allow Spectators. 0 Disabled, 1 Team/Player only, 2 Free
set sv_checkMinPlayers "0"
set scr_game_graceperiod "0"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "1"
set scr_game_perks "1"
set scr_game_forceuav "0"
set scr_game_hardpoints "1"
set scr_nukeTimer "10"
set scr_nukeCancelMode "0"
set scr_default_maxagents "5"
set scr_disableClientSpawnTraces "0"
set scr_hardpoint_allowartillery "1"
set scr_hardpoint_allowuav "1"
set scr_hardpoint_allowhelicopter "1"
set scr_team_respawntime "0"
set scr_player_numlives "0"
set scr_player_respawndelay "0"
set scr_player_suicidespawndelay "0"
set scr_player_forcerespawn "1"
set scr_player_sprinttime "4"
set scr_explBulletMod "1"
set scr_maxPerPlayerExplosives "2"
//////////////////////////////////////////////////
// EXTINCTION GAMETYPE SETTINGS //
//////////////////////////////////////////////////
set scr_aliens_scorelimit "2500"
set scr_aliens_timelimit "0"
set scr_aliens_roundlimit "1"
set scr_aliens_winlimit "1"
set scr_aliens_numlives "0"
set scr_aliens_playerrespawndelay "0"
set scr_aliens_waverespawndelay "0"
set scr_aliens_promode "0"
set scr_aliens_maxagents "24"
set scr_alien_intro "0"
set scr_chaos_mode "0" // Extinction chaos game mode.
////////////////////////////////////////////////////////
// MAP SHORT NAMES ROTATION LIST //
////////////////////////////////////////////////////////
/// Maps only work with Aliens Game Mode Set //
////////////////////////////////////////////////////////
// //
// Point of Contact - mp_alien_town //
// //
// ONSLAUGHT DLC ///////////////////////////////////////
// //
// Nightfall - mp_alien_armory //
// //
// DEVASTATION DLC /////////////////////////////////////
// //
// Mayday - mp_alien_beacon //
// //
// INVASION DLC ////////////////////////////////////////
// //
// Awakening - mp_alien_dlc3 //
// //
// NEMESIS DLC /////////////////////////////////////////
// //
// Exodus - mp_alien_last //
// //
////////////////////////////////////////////////////////
set sv_maprotation "gametype aliens map mp_alien_town map mp_alien_armory map mp_alien_beacon map mp_alien_dlc3 map mp_alien_last"