From a79d47d6c6401297843deb505a25f5af61fbf391 Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Fri, 26 Apr 2024 01:36:52 -0600 Subject: [PATCH 01/10] 1. re-enabled code console. 2. Pass data from shell -> ingame via Load/SaveMissionSetup() 3. moved documentation around a little. --- 0/hud-options/docs/README.txt | 31 + 0/hud-options/docs/munge_hud.bat | 2 + 0/hud-options/docs/zri6jc.hud | 3050 +++++++++++++++++ .../docs}/README_OPTIONS.txt | 0 .../docs}/un_modded_mp_lobby.jpg | Bin ...user_script_ifs_mp_lobby_extra_buttons.jpg | Bin 0/load-options/docs/README.txt | 12 + src/scripts/addme.lua | 47 +- src/scripts/fakeconsole_functions.lua | 38 +- src/scripts/patch_ingame.lua | 26 + 10 files changed, 3183 insertions(+), 23 deletions(-) create mode 100644 0/hud-options/docs/README.txt create mode 100644 0/hud-options/docs/munge_hud.bat create mode 100644 0/hud-options/docs/zri6jc.hud rename 0/{docs/options => in-game-options/docs}/README_OPTIONS.txt (100%) rename 0/{docs/options => in-game-options/docs}/un_modded_mp_lobby.jpg (100%) rename 0/{docs/options => in-game-options/docs}/user_script_ifs_mp_lobby_extra_buttons.jpg (100%) create mode 100644 0/load-options/docs/README.txt diff --git a/0/hud-options/docs/README.txt b/0/hud-options/docs/README.txt new file mode 100644 index 0000000..71f2b14 --- /dev/null +++ b/0/hud-options/docs/README.txt @@ -0,0 +1,31 @@ + +** Note Process in this file is for targeting BF2 Classic Collection. A similar process could be used for the + base game, but the hud filename '0xDC27B03D.hud_' won't work for the base game (unless replacing manually + through the LVLTool GUI). + +The pattern for delivering a hud for BF2 Classic Collection is to deliver a well-named-folder +with the following files: + preview_images -- Include a few preview images so that users can see why your hud is so nice. + 0xDC27B03D.hud_ -- The munged Hud file. Special build instructions below. + apply_hud.bat -- Should be ok to just copy one from the default aspyr hud folder since your + hud folder is to be deployed next to all the other huds (inside '0\hud-options\') + hud_texture_pack.lvl -- If you don't use any special textures just copy the one from the default aspyr + folder and deploy it with your hud. + +You can use the munge_hud.bat file in this folder to munge your .hud file. +(BF2 Modtools required, adjust batch file if your modtools aren't stored at C:\BF2_ModTools\) + +============================ String hashing special-ness ============================ +The BF2 build often runs a special hash operation on filenames (and other strings) to compress strings into 4 bytes. + +We don't know the real filename for the Aspyr 1 player Hud. +The name was translated to the hash '0xdc27b03d' +Which has a matching un-hash of 'zri6jc'; surely Not the name aspyr chose, +but since the hash matches it'll work. + +After you've crafted a beautiful hud and tested with the ModTools debugger (or whatever your process is), +name your HUD file 'zri6jc.hud' +Then run the included batch file. + +The output file in the MUNGED folder will/may be named 'zri6jc.config'; re-name it to '0xdc27b03d.hud_' +to get it to replace the existing one using the apply_hud.bat (which uses LVLTool). diff --git a/0/hud-options/docs/munge_hud.bat b/0/hud-options/docs/munge_hud.bat new file mode 100644 index 0000000..5a6984c --- /dev/null +++ b/0/hud-options/docs/munge_hud.bat @@ -0,0 +1,2 @@ +MD MUNGED +C:\BF2_ModTools\ToolsFL\bin\ConfigMunge.exe -inputfile $*.hud -continue -platform PC -sourcedir . -outputdir MUNGED \ No newline at end of file diff --git a/0/hud-options/docs/zri6jc.hud b/0/hud-options/docs/zri6jc.hud new file mode 100644 index 0000000..7323c11 --- /dev/null +++ b/0/hud-options/docs/zri6jc.hud @@ -0,0 +1,3050 @@ +FileInfo("1playerhud") +{ + Viewports(1) +} + + + +Group("player1weaponinformation") +{ + PropagateAlpha(1) + Viewport(1) + Position(0.020000, 0.90000, 0.000000, "Viewport") + ZOrder(255) + EventEnable("player1.weaponsEnable") + EventDisable("player1.weaponsDisable") + Text("player1weapon1ammo") + { + TextBreak("Word") + TextFont("gamefont_large") + EventNumber("player1.weapon1.totalAmmoBullets") + InfiniteDashes(0) + Viewport(1) + Position(0.020000, -0.125000, 0.000000, "Viewport") + TextStyle("Shadow") + ZOrder(6) + Color(255, 255, 255) + EventEnable("player1.weapon1.totalAmmoBullets") + EventDisable("player1.weapon1.disable") + } + + Model3D("player1weapon1ammoInfinite") + { + Mesh("hud_infinite_ammo_icon") + Viewport(1) + Position(0.026323, -0.095274, 0.000000, "Viewport") + Scale(0.600000, 0.600000, 0.600000) + ZOrder(0) + EventEnable("player1.weapon1.ammoInfinite") + EventDisable("player1.weapon1.disable") + } + + Text("player1weapon1name") + { + TextBox(0.328125, 0.000000) + TextBreak("Word") + TextFont("gamefont_small") + TextStyle("Shadow") + EventText("player1.weapon1.name") + Viewport(1) + Position(0.08500, -0.238389, 0.000000, "Viewport") + ZOrder(5) + Alpha(0.750000) + FadeInTime(0.250000) + FadeHoldTime(2.500000) + FadeOutTime(1.000000) + EventEnable("player1.weapon1.change") + EventDisable("player1.weapon1.disable") + } + + Text("player1weapon2ammo") + { + TextBreak("Word") + TextFont("gamefont_large") + EventNumber("player1.weapon2.totalAmmoBullets") + InfiniteDashes(0) + Viewport(1) + Position(0.020000, -0.195000, 0.000000, "Viewport") + TextStyle("Shadow") + ZOrder(5) + Color(255, 255, 255) + EventEnable("player1.weapon2.totalAmmoBullets") + EventDisable("player1.weapon2.disable") + } + + Model3D("player1weapon2ammoInfinite") + { + Mesh("hud_infinite_ammo_icon") + Viewport(1) + Position(0.026323, -0.163877, 0.000000, "Viewport") + Scale(0.600000, 0.600000, 0.600000) + ZOrder(0) + EventEnable("player1.weapon2.ammoInfinite") + EventDisable("player1.weapon2.disable") + } + + Text("player1weapon2name") + { + TextBox(0.400391, 0.000000) + TextBreak("Word") + TextFont("gamefont_small") + TextStyle("Shadow") + EventText("player1.weapon2.name") + Viewport(1) + Position(0.085000, -0.264822, 0.000000, "Viewport") + ZOrder(5) + Alpha(0.750000) + FadeInTime(0.250000) + FadeHoldTime(2.500000) + FadeOutTime(1.000000) + EventEnable("player1.weapon2.change") + EventDisable("player1.weapon2.disable") + } + + Model3D("player1weapon1backdrop") + { + Mesh("hud_weapon_backdrop") + Viewport(1) + Position(0.152284, -0.098922, -0.002803, "Viewport") + Scale(0.210000, 0.210000, 0.210000) + ZOrder(8) + Alpha(0.980000) + FadeOutTime(0.250001) + EventEnable("player1.weapon1.mesh") + EventDisable("player1.weapon1.disable") + } + + Model3D("player1weapon2backdrop") + { + Mesh("hud_weapon2_backdrop") + Viewport(1) + Position(0.152284, -0.166659, -0.025075, "Viewport") + Scale(0.210001, 0.210001, 0.210001) + ZOrder(8) + Alpha(0.980000) + FadeOutTime(0.250001) + EventEnable("player1.weapon2.mesh") + EventDisable("player1.weapon2.disable") + } + + Group("player1weapon1group") + { + Viewport(1) + Position(0.346161, -0.450412, 0.000000, "Viewport") + EventEnable("initialize") + Model3D("player1weapon1mesh") + { + EventMesh("player1.weapon1.mesh") + Viewport(1) + ZOrder(5) + EventEnable("player1.weapon1.mesh") + EventDisable("player1.weapon1.disable") + MeshInfo("hud_vehicle_lasers") + { + Position(-0.185992, 0.354928, -0.000509, "Viewport") + Rotation(0.804269, 359.994110, 359.999695) + Scale(1.200000, 1.200000, 1.200000) + } + + MeshInfo("hud_stealth") + { + Position(-0.269501, 0.352591, 1.800601, "Viewport") + Rotation(0.002055, 90.580322, 0.000000) + Scale(0.270001, 0.270001, 0.270001) + } + + MeshInfo("hud_vehicle_beam_cannon") + { + Position(-0.217103, 0.354157, 0.006280, "Viewport") + Scale(1.200000, 1.200000, 1.200000) + } + + MeshInfo("hud_vehicle_chaingun") + { + Position(-0.201828, 0.356458, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_guided_rocket") + { + Position(-0.228913, 0.354333, 0.006280, "Viewport") + Scale(1.2500000, 1.250000, 1.250000) + } + + MeshInfo("hud_geo_turret") + { + Position(-0.203592, 0.354333, 0.006280, "Viewport") + Scale(1.909999, 1.909999, 1.909999) + } + + MeshInfo("hud_vehicle_stingers") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_torpedo") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_missile") + { + Position(-0.240880, 0.356816, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_mortar") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_recoiless") + { + Position(-0.232116, 0.355484, 0.006280, "Viewport") + Scale(1.280000, 1.280000, 1.280000) + } + + MeshInfo("hud_vehicle_flak") + { + Position(-0.270610, 0.353623, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_bombs") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("cis_weap_inf_pistol") + { + Position(-0.260316, 0.356366, -0.002834, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.800000, 0.800000, 0.800000) + } + + MeshInfo("cis_weap_inf_sniperrifle") + { + Position(-0.230193, 0.361898, -0.003271, "Viewport") + Rotation(359.802399, 90.747269, 359.999695) + } + + MeshInfo("cis_weap_inf_rifle") + { + Position(-0.236938, 0.359879, 0.001903, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("cis_weap_inf_fusioncutter") + { + Position(-0.237654, 0.359785, -0.003261, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("cis_weap_inf_launcher") + { + Position(-0.206654, 0.362510, 0.003622, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.660000, 0.660000, 0.660000) + } + + MeshInfo("hud_cis_wristblaster") + { + Position(-0.264100, 0.350311, 1.022745, "Viewport") + Rotation(0.000000, 0.000000, 120.000000) + Scale(0.653289, 0.653289, 0.653289) + } + + MeshInfo("hud_cis_trishot") + { + Position(-0.268002, 0.352302, 0.734317, "Viewport") + Rotation(359.967194, 359.763428, 119.966087) + Scale(0.653289, 0.653289, 0.653289) + } + + MeshInfo("hud_lightsaber") + { + Position(-0.232567, 0.355873, -0.087683, "Viewport") + Rotation(359.967194, 359.763428, 0.003998) + Scale(1.170000, 1.170000, 1.170000) + } + + MeshInfo("rep_weap_inf_pistol") + { + Position(-0.249442, 0.359076, 0.007261, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(1.140000, 1.140000, 1.140000) + } + + MeshInfo("rep_weap_inf_fusioncutter") + { + Position(-0.247656, 0.353992, -0.002562, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("rep_weap_inf_launcher") + { + Position(-0.207665, 0.361767, 0.007124, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.670000, 0.670000, 0.670000) + } + + MeshInfo("rep_weap_inf_chaingun") + { + Position(-0.193610, 0.368393, 0.007124, "Viewport") + Rotation(354.177856, 99.922020, 359.610596) + Scale(0.700000, 0.700000, 0.700000) + } + + MeshInfo("com_weap_inf_torpedo") + { + Position(-0.229334, 0.360748, 0.009504, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.810000, 0.810000, 0.810000) + } + + MeshInfo("rep_weap_inf_sniperrifle") + { + Position(-0.228348, 0.367230, -0.007488, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.820000, 0.820000, 0.820000) + } + + MeshInfo("rep_weap_inf_rifle") + { + Position(-0.219723, 0.364485, 0.003263, "Viewport") + Rotation(1.538445, 95.690582, 4.455857) + Scale(0.800000, 0.800000, 0.800000) + } + + MeshInfo("hud_imp_flamethrower") + { + Position(-0.173776, 0.358333, 0.205979, "Viewport") + Rotation(0.013809, 0.000000, 359.991669) + Scale(0.250001, 0.250001, 0.250001) + } + + MeshInfo("imp_weap_inf_rifle") + { + Position(-0.242922, 0.360546, 0.003365, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("imp_weap_inf_pistol") + { + Position(-0.264184, 0.356163, -0.003873, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(1.240000, 1.240000, 1.240000) + } + + MeshInfo("imp_weap_inf_launcher") + { + Position(-0.206202, 0.374467, 0.011042, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.640000, 0.640000, 0.640000) + } + + MeshInfo("imp_weap_inf_fusioncutter") + { + Position(-0.239710, 0.356673, -0.000329, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("imp_weap_inf_sniperrifle") + { + Position(-0.211808, 0.367069, 0.001418, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.810000, 0.810000, 0.810000) + } + + MeshInfo("all_weap_inf_pistol") + { + Position(-0.264115, 0.358155, 0.013887, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.720000, 0.720000, 0.720000) + } + + MeshInfo("all_weap_inf_lightsabre") + { + Position(-0.399193, 0.415118, -49.262363, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("all_weap_inf_rifle") + { + Position(-0.222677, 0.361293, 0.014590, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("all_weap_inf_launcher") + { + Position(-0.213354, 0.367216, 0.000847, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.560000, 0.560000, 0.560000) + } + + MeshInfo("all_weap_inf_fusioncutter") + { + Position(-0.240446, 0.358461, 0.001095, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("all_weap_inf_sniperrifle") + { + Position(-0.231335, 0.355448, 0.003653, "Viewport") + Rotation(0.804269, 90.573097, 359.999695) + } + + MeshInfo("all_weap_inf_bowcaster") + { + Position(-0.241302, 0.357451, -0.001890, "Viewport") + Rotation(353.358673, 99.140221, 1.132509) + Scale(0.630000, 0.630000, 0.630000) + } + + MeshInfo("all_weap_inf_seeker") + { + Position(-0.235594, 0.360432, 0.000240, "Viewport") + Rotation(347.354980, 117.284363, 1.132509) + Scale(0.950000, 0.950000, 0.950000) + } + + MeshInfo("ewk_spear") + { + Position(-0.086126, 0.206732, 199.969666, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + Scale(0.590000, 0.590000, 0.590000) + } + + MeshInfo("des_weap_inf_fusioncutter") + { + Position(-0.240446, 0.358461, 0.001095, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("tat_weap_tuskrifle") + { + Position(-0.214412, 0.355448, 0.003653, "Viewport") + Rotation(0.804269, 90.573097, 359.999695) + } + + MeshInfo("wok_weap_inf_bowcaster") + { + Position(-0.197062, 0.357451, -0.001890, "Viewport") + Rotation(353.358673, 99.140221, 1.132509) + Scale(0.830000, 0.830000, 0.830000) + } + + MeshInfo("wok_weap_inf_fusioncutter") + { + Position(-0.240446, 0.358461, 0.001095, "Viewport") + Rotation(355.836060, 135.827820, 69.479843) + } + + MeshInfo("geo_weap_inf_blunderbuss") + { + Position(-0.253835, 0.363164, -0.002834, "Viewport") + Rotation(325.134644, 90.232857, 342.582642) + } + + MeshInfo("gun_weap_inf_fusioncutter") + { + Position(-0.254565, 0.357203, -0.002834, "Viewport") + Rotation(124.471199, 68.442780, 177.787216) + Scale(0.872851, 0.872851, 0.872851) + } + + } + + } + + Group("player1weapon2group") + { + Viewport(1) + Position(0.353928, -0.414382, 0.000000, "Viewport") + EventEnable("initialize") + Model3D("player1weapon2mesh") + { + EventMesh("player1.weapon2.mesh") + Viewport(1) + ZOrder(5) + EventEnable("player1.weapon2.mesh") + EventDisable("player1.weapon2.disable") + + MeshInfo("hud_thermaldetonator") + { + Position(-0.284209, 0.250243, 0.006280, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.610000, 0.610000, 0.610000) + } + + MeshInfo("wok_weap_inf_thermaldetonator") + { + Position(-0.281954, 0.240963, 0.006280, "Viewport") + Rotation(51.626522, 352.026947, 0.000000) + Scale(1.653860, 1.653860, 1.653860) + } + + MeshInfo("gun_weap_inf_grenadethermal") + { + Position(-0.256918, 0.236531, 0.000000, "Viewport") + Rotation(0.804269, 90.747269, 359.999695) + } + + + MeshInfo("hud_droideka_shield") + { + Position(-0.254297, 0.247155, 0.013074, "Viewport") + Scale(0.640000, 0.640000, 0.640000) + } + + MeshInfo("hud_detpack_plunger") + { + Position(-0.276081, 0.242515, 0.039169, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.440000, 0.440000, 0.440000) + } + + MeshInfo("hud_vehicle_beam_cannon") + { + Position(-0.221990, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_chaingun") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_guided_rocket") + { + Position(-0.229027, 0.251896, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_stingers") + { + Position(-0.227707, 0.251667, 0.006280, "Viewport") + Scale(1.430000, 1.430000, 1.430000) + } + + MeshInfo("hud_vehicle_torpedo") + { + Position(-0.229027, 0.251896, 0.006280, "Viewport") + Scale(1.260000, 1.260000, 1.260000) + } + + MeshInfo("hud_vehicle_missile") + { + Position(-0.240880, 0.250430, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_mortar") + { + Position(-0.233111, 0.250243, 0.006280, "Viewport") + Scale(2.039999, 2.039999, 2.039999) + } + + MeshInfo("hud_vehicle_recoiless") + { + Position(-0.230713, 0.251495, 0.006280, "Viewport") + Scale(1.280000, 1.280000, 1.280000) + } + + MeshInfo("hud_vehicle_flak") + { + Position(-0.278276, 0.250243, 0.006280, "Viewport") + } + + MeshInfo("hud_vehicle_bombs") + { + Position(-0.265339, 0.250243, 0.006280, "Viewport") + Scale(0.630000, 0.630000, 0.630000) + } + + MeshInfo("com_weap_inf_torpedo") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("com_weap_inf_grenadethermal") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("com_weap_inf_thermaldetonator") + { + Rotation(353.358673, 99.140221, 1.132509) + } + + MeshInfo("com_weap_inf_seismic_mine") + { + Position(-0.266703, 0.248956, 0.000000, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.810000, 0.810000, 0.810000) + } + + MeshInfo("com_weap_inf_detpack") + { + Position(-0.265352, 0.243674, 0.000000, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.810000, 0.810000, 0.810000) + } + + MeshInfo("com_weap_inf_torpedo") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("com_weap_inf_landmine") + { + Position(-0.273909, 0.229540, 0.000000, "Viewport") + Rotation(302.401611, 288.247955, 359.707031) + Scale(0.790000, 0.790000, 0.790000) + } + + MeshInfo("all_weap_inf_powerup_dispenser") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("all_weap_inf_thermaldetonator") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("all_weap_inf_grenadethermal") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("cis_weap_walk_droideka_shield") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("cis_weap_inf_mine_dispenser") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("hud_cis_wristrocket") + { + Position(-0.258918, 0.249950, 0.000000, "Viewport") + Rotation(0.067146, 0.027435, 0.869930) + } + + MeshInfo("hud_imp_wristrocket") + { + Position(-0.235938, 0.252083, 0.000000, "Viewport") + Rotation(0.067146, 0.027435, 0.869930) + Scale(1.220000, 1.220000, 1.220000) + } + + MeshInfo("rep_weap_inf_grenadethermal") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("rep_weap_inf_landmine") + { + Rotation(106.459229, 90.747269, 359.999695) + } + + MeshInfo("rep_weap_inf_powerup_dispenser") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("hud_rep_weap_defense_buff_icon") + { + Position(-0.235665, 0.230309, 0.013074, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.340001, 0.340001, 0.340001) + } + + MeshInfo("hud_rep_defense_buff") + { + Position(-0.259348, 0.250207, 0.013074, "Viewport") + Scale(0.500001, 0.500001, 0.500001) + } + + MeshInfo("hud_health_regen") + { + Position(-0.295264, 0.249070, 0.000000, "Viewport") + Rotation(4.668793, 7.205190, 0.869930) + Scale(0.530001, 0.530001, 0.530001) + } + + MeshInfo("imp_weap_inf_powerup_dispenser") + { + Rotation(0.804269, 90.747269, 359.999695) + } + + MeshInfo("com_item_powerup_dual") + { + Position(-0.281854, 0.276486, 0.000000, "Viewport") + Rotation(358.137604, 304.921997, 0.000000) + Scale(0.540000, 0.540000, 0.540000) + } + + MeshInfo("ewk_rock") + { + Position(-0.060943, 0.076415, 276.444824, "Viewport") + Rotation(0.056783, 359.996582, 359.999695) + Scale(0.780000, 0.780000, 0.780000) + } + + MeshInfo("com_weap_probedroid") + { + Position(-0.275655, 0.258602, 0.000000, "Viewport") + Rotation(346.000000, 202.460000, 6.200000) + Scale(1.180000, 1.180000, 1.180000) + } + + MeshInfo("com_weap_inf_dropturret") + { + Position(-0.282107, 0.373784, 0.000000, "Viewport") + Rotation(10.050000, 26.660000, 7.010000) + Scale(0.540187, 0.540187, 0.540187) + } + + MeshInfo("hud_poison") + { + Position(-0.251899, 0.248431, 0.000000, "Viewport") + Scale(0.330001, 0.330001, 0.330001) + } + + MeshInfo("hud_rage") + { + Position(-0.251899, 0.248431, -0.010000, "Viewport") + Scale(0.330001, 0.330001, 0.330001) + } + + MeshInfo("hud_invun_buff") + { + Position(-0.259348, 0.250207, 0.013074, "Viewport") + Scale(0.500001, 0.500001, 0.500001) + } + + MeshInfo("hud_defencebuff") + { + Position(-0.259348, 0.250207, 0.013074, "Viewport") + Scale(0.500001, 0.500001, 0.500001) + } + + MeshInfo("hud_force_choke") + { + Position(-0.277730, 0.250243, 0.060000, "Viewport") + Rotation(0.020765, 359.925140, 359.999695) + } + + MeshInfo("hud_force_saberthrow") + { + Position(-0.272903, 0.241462, 5.214769, "Viewport") + Rotation(0.020765, 359.925140, 359.999695) + Scale(0.180001, 0.180001, 0.180001) + } + + MeshInfo("hud_force_pull") + { + Position(-0.258612, 0.253261, 0.060000, "Viewport") + Rotation(0.020765, 359.925140, 359.999695) + } + + MeshInfo("hud_force_push") + { + Position(-0.260633, 0.250827, 0.060000, "Viewport") + Rotation(0.020765, 359.925140, 359.999695) + } + + MeshInfo("hud_force_lightning") + { + Position(-0.259680, 0.251856, 0.060000, "Viewport") + Rotation(0.020765, 359.925140, 359.999695) + Scale(0.490000, 0.490000, 0.490000) + } + + } + + } +} + +Group("player1energybar") +{ + PropagateAlpha(1) + Viewport(1) + Position(0.035000, 0.910000, 0.000000, "Viewport") + Alpha(0.600000) + EventEnable("player1.energyFraction") + EventDisable("player1.energyDisable") + BarBitmap("player1energy_fill") + { + FlashyScale(1.000000) + EventValue("player1.energyFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.201996, 0.007658, "Left", "Top", "Viewport") + Viewport(1) + Position(0.000031, -0.000900, 0.000000, "Viewport") + ZOrder(253) + Alpha(0.920000) + Color(209, 168, 41) + EventEnable("player1.energyFraction") + EventDisable("player1.energyDisable") + EventColor("player1.energyColor") + EventPulseRate("player1.energyRegenPulseRate") + } + + BarBitmap("player1energy_empty") + { + FlashyScale(1.000000) + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.212315, 0.016690, "Left", "Top", "Viewport") + Viewport(1) + Position(-0.005518, -0.003194, 0.000000, "Viewport") + ZOrder(255) + Alpha(0.750000) + Color(0, 0, 0) + EventEnable("player1.energyFraction") + EventDisable("player1.energyDisable") + } +} + +Group("player1jetpackbar") +{ + PropagateAlpha(1) + Viewport(1) + Position(-0.000000, 0.425000, 0.000000, "Viewport") + Rotation(359.988129, 359.970917, 270.005432) + Scale(0.146068, 0.146068, 0.146068) + FadeInTime(0.1000000) + FadeHoldTime(999999999.000000000) + FadeOutTime(1.000001) + EventEnable("player1.jetFuelFraction") + EventDisable("player1.jetDisable") + Model3D("player1jetpack_interiorfield") + { + Mesh("hud_jetpackbar_frame_front") + Viewport(1) + Position(-0.001175, 0.006385, 0.000000, "Viewport") + Alpha(0.750000) + Color(49, 66, 53) + EventEnable("initialize") + } + + Model3D("player1jetpack_whiteoutsideborder") + { + Mesh("hud_jetpackbar_frame_back") + Viewport(1) + Position(0.000000, -0.000816, 0.000000, "Viewport") + Alpha(0.500000) + Color(205, 236, 234) + EventEnable("initialize") + } + + BarBitmap("player1jetpack_fill") + { + EventValue("player1.jetFuelFraction") + Bitmap("hud_jetpack_and_energybar_blankfill") + BitmapRect(1.189230, 0.181946, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.518232, 1.000000, 1.000000) + Viewport(1) + Position(-0.400000, 0.117000, 0.000000, "Viewport") + Scale(0.6500000, 0.400000, 1.000000) + ZOrder(38) + Color(200, 200, 200) + EventEnable("player1.jetFuelFraction") + EventDisable("player1.jetDisable") + EventColor("player1.jetFuelColor") + } + + BarBitmap("player1jetpack_threshold") + { + EventValue("player1.jetFuelThreshold") + Bitmap("hud_jetpack_and_energybar_blankfill") + BitmapRect(1.189230, 0.181946, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.534073, 0.490000, 1.000000) + Viewport(1) + Position(-0.410000, 0.080000, 0.000000, "Viewport") + Scale(1.047654, 0.740389, 1.000000) + ZOrder(252) + Color(132, 0, 0) + ColorPulseRate(0.000000) + UseChangeColor(1) + EventEnable("player1.jetFuelThreshold") + EventDisable("player1.jetDisable") + EventPulseRate("player1.jetFuelWarning") + } + +} + +Group("player1healthbar") +{ + PropagateAlpha(1) + Viewport(1) + Position(0.035000, 0.890000, 0.000000, "Viewport") + Alpha(0.600000) + Color(255, 231, 255) + FadeInTime(1.000000) + FadeOutTime(0.200000) + EventEnable("player1.health") + EventDisable("player1.healthDisable") + BarBitmap("player1health_fill") + { + FlashyIncFadeOutTime(1.000000) + FlashyDecFadeOutTime(1.000000) + EventValue("player1.healthFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.201996, 0.014658, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + Position(0.000000, -0.940352, 0.000000, "Pixels") + ZOrder(2) + Color(0, 150, 213) + ColorChange(0, 0, 0) + ColorChangeRate(0.200000) + EventEnable("player1.healthFraction") + EventDisable("player1.healthDisable") + EventColor("player1.healthColor") + EventPulseRate("player1.healthRegenPulseRate") + } + + BarBitmap("player1health_empty") + { + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.211292, 0.029295, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + Position(-0.004992, -0.007543, 0.000000, "Viewport") + ZOrder(3) + Alpha(0.750000) + Color(0, 0, 0) + EventEnable("player1.health") + EventDisable("player1.healthDisable") + } + + BarBitmap("player1bonushealth_fill") + { + EventValue("player1.bonusHealthFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.201996, 0.014658, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + ZOrder(1) + Color(0, 150, 240) + ColorChangeRate(0.400000) + ColorPulseRate(0.750000) + EventEnable("player1.bonusHealthFraction") + EventDisable("player1.healthDisable") + } + +} + +Group("player1targethealthbar") +{ + PropagateAlpha(1) + Viewport(1) + Position(0.500000, 0.015000, 0.000000, "Viewport") + Scale(0.263237, 0.230000, 0.230000) + Alpha(0.800000) + Color(192, 224, 224) + EventEnable("initialize") + BarBitmap("player1targethealth_blankfill") + { + FlashyScale(1.000000) + Value(1.000000) + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(1.189230, 0.181946, "Center", "Center", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + Position(0.000000, 0.253896, 0.000000, "Viewport") + Scale(0.924622, 0.498552, 0.540316) + ZOrder(103) + Color(39, 40, 46) + ColorChange(0, 0, 0) + ColorChangeRate(0.000000) + FadeInTime(0.100000) + FadeOutTime(1.000000) + EventEnable("player1.weapon1.target.healthFraction") + EventDisable("player1.weapon1.target.disable") + } + + BarBitmap("player1targethealth_fill") + { + FlashyScale(1.000000) + FlashyIncFadeOutTime(1.000000) + FlashyDecFadeOutTime(1.000000) + EventValue("player1.weapon1.target.healthFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(1.189230, 0.181946, "Center", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + Position(0.000000, 0.231774, 0.000000, "Viewport") + Scale(0.890714, 0.222995, 0.900000) + ZOrder(1) + ColorChange(0, 0, 0) + ColorChangeRate(0.010000) + FadeOutTime(1.000000) + EventEnable("player1.weapon1.target.healthFraction") + EventDisable("player1.weapon1.target.disable") + EventColor("player1.weapon1.target.teamColor") + } + +} + +Group("player1vehiclehealthbar") +{ + PropagateAlpha(1) + Viewport(1) + Position(0.035000, 0.890000, 0.000000, "Viewport") + Alpha(0.500000) + ColorChangeRate(0.000000) + FadeInTime(0.500000) + FadeOutTime(0.500001) + EventEnable("player1.vehicle.health") + EventDisable("player1.vehicle.healthDisable") + BarBitmap("player1vehiclehealth_fill") + { + FlashyIncFadeOutTime(1.000000) + FlashyDecFadeOutTime(1.000000) + EventValue("player1.vehicle.healthFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.200801, 0.014658, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + ZOrder(1) + Color(0, 200, 0) + ColorChange(0, 0, 0) + ColorChangeRate(0.000000) + EventEnable("player1.vehicle.healthFraction") + EventDisable("player1.vehicle.healthDisable") + EventColor("player1.vehicle.healthColor") + } + + BarBitmap("player1vehiclehealth_empty") + { + EventValue("player1.vehicle.health") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.211387, 0.029295, "Left", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Viewport(1) + Position(-0.004992, -0.007543, 0.000000, "Viewport") + ZOrder(1) + Alpha(0.750000) + Color(0, 0, 0) + EventEnable("player1.vehicle.health") + EventDisable("player1.vehicle.healthDisable") + } + +} + +Group("player1targetnamegroup") +{ + Viewport(1) + Position(0.500000, 0.020000, 0.000000, "Viewport") + EventEnable("initialize") + Text("player1targetinfo_classNameNEW") + { + TextBreak("Word") + TextStyle("Shadow") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + EventText("player1.weapon1.target.className") + Viewport(1) + Position(0.000000, 0.065248, 0.000000, "Viewport") + Alpha(0.600000) + FadeOutTime(1.000000) + EventEnable("player1.weapon1.target.className") + EventDisable("player1.weapon1.target.disable") + } + + Text("player1targetinfo_shieldName") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.weapon1.target.shieldName") + Viewport(1) + Position(0.000000, 0.085000, 0.000000, "Viewport") + Alpha(0.600000) + Color(40, 255, 255) + FadeOutTime(1.000000) + EventEnable("player1.weapon1.target.shieldName") + EventDisable("player1.weapon1.target.disableShieldName") + } + +} + +ObjectiveList("player1objectives") +{ + Rect(0.650000, 0.850000, "Right", "Top", "Viewport") + PropagateAlpha(1) + Position(1.111000, 0.050000, 0.000000, "Viewport") + FadeInTime(0.250000) + FadeOutTime(0.250000) + EventEnable("player1.objectivelist.enable") + EventDisable("player1.objectivelist.disable") + Bitmap("player1objectives_background") + { + Bitmap("opaque_black") + BitmapRect(2.000000, 1.200000, "Left", "Top", "Viewport") + Position(-0.876552, -0.164966, 0.000000, "Viewport") + ZOrder(250) + Color(0, 0, 0) + EventEnable("player1.objectivelist.enable") + EventDisable("player1.objectivelist.disable") + } +} + +Group("objectivetimerGROUP") +{ + Position(0.725000, 0.065000, 0.000000, "Viewport") + EventEnable("objectivetimer") + EventDisable("objectivetimer.disable") + Text("objectivetimer") + { + TextBox(0.296875, 0.093750) + TextBreak("Word") + TextScale(1.254636, 1.246966) + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("objectivetimer") + NumberToTime("%m:%02s") + Position(-0.361608, 0.441139, 0.000000, "Pixels") + ZOrder(0) + Alpha(0.750000) + Color(255, 255, 0) + EventEnable("objectivetimer") + EventDisable("objectivetimer.disable") + } +} + +Group("VictoryTimerGroup") +{ + Position(0.90000, 0.550000, 0.000000, "Viewport") + EventEnable("victorytimer") + EventDisable("victorytimer.disable") + Text("victorytext") + { + TextBreak("Word") + Text("common.victoryin") + TextStyle("Shadow") + TextAlignment("Center", "Top") + Position(0.000139, 0.040171, 0.000000, "Viewport") + ZOrder(0) + EventEnable("victorytimer") + EventDisable("victorytimer.disable") + } + + Text("victorytimer") + { + TextBox(0.296875, 0.093750) + TextBreak("Word") + TextScale(1.250000, 1.250000) + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("victorytimer") + NumberToTime("%m:%02s") + Position(-0.019694, 0.057038, 0.000000, "Viewport") + ZOrder(0) + Color(0, 87, 213) + EventEnable("victorytimer") + EventDisable("victorytimer.disable") + } +} +Group("DefeatTimerGroup") +{ + Position(0.90000, 0.650000, 0.000000, "Viewport") + EventEnable("defeattimer") + EventDisable("defeattimer.disable") + Text("defeattext") + { + TextBreak("Word") + Text("common.defeatin") + TextAlignment("Center", "Top") + TextStyle("Shadow") + Position(0.000139, 0.040171, 0.000000, "Viewport") + ZOrder(0) + EventEnable("defeattimer") + EventDisable("defeattimer.disable") + } + + Text("defeattimer") + { + TextBox(0.296875, 0.093750) + TextBreak("Word") + TextScale(1.250000, 1.250000) + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("defeattimer") + NumberToTime("%m:%02s") + Position(-0.019694, 0.057038, 0.000000, "Viewport") + ZOrder(0) + Alpha(0.400001) + Color(230, 10, 0) + EventEnable("defeattimer") + EventDisable("defeattimer.disable") + } +} + +Map("player1map") +{ + + PositionSmall(0.880000, 0.170000, 0.250000, "Viewport") + PositionLarge(0.230000, 0.600000, -30.000000, "Viewport") + PositionSpawn(0.230000, 0.525000, -30.000000, "Viewport") + EventToggleMapMode("player1.map.modeToggle") + EventChangeMapMode("player1.map.mode") + EventPostHide("player1.map.hideCPs") + EventRefreshTarget("player1.map.refreshTarget") + EventRefreshPost("player1.map.refreshPost") + EventRefreshMarker("player1.map.refreshMarker") + EventPlayerIndex("player1.index") + PropagateAlpha(1) + Position(0.917484, 0.110884, 0.004111, "Viewport") + Scale(1.100000, 1.100000, 1.100000) + ZOrder(127) + Alpha(0.850000) + EventEnable("player1.map.enable") + EventDisable("player1.map.disable") + + BackdropSmall("BackdropSmall") + { + Mask("map_mask") + TexCoords(0.248419, 0.564873, 0.470641, 0.787095) + ZOrder(255) + Alpha(0.500000) + } + + PlayerFOVSmall("PlayerFOVSmall") + { + Mesh("") + ZOrder(123) + } + + PlayerDirectionSmall("PlayerDirectionSmall") + { + Mesh("") + ZOrder(124) + Alpha(0.200000) + Color(255, 255, 0) + } + + TargetSmall("TargetSmall") + { + BitmapStyle("Shadow") + ZOrder(126) + Color(0, 0, 0) + } + + PostSmall("PostSmall") + { + BitmapStyle("Shadow") + } + + PostTextSmall("PostTextSmall") + { + TextBreak("Word") + TextAlignment("Center", "Bottom") + ZOrder(127) + } + + PostSelectSmall("PostSelectSmall") + { + Bitmap("hud_icon_flash") + BitmapStyle("Shadow") + } + + MarkerSmall("MarkerSmall") + { + BitmapStyle("Shadow") + ZOrder(0) + } + + NorthSmall("NorthSmall") + { + Bitmap("hud_map_northpointer") + BitmapStyle("Shadow") + Position(0.000000, -0.110000, 0.000000, "Viewport") + Scale(2.000000, 2.000000, 2.000000) + ZOrder(127) + } + + BackdropLarge("BackdropLarge") + { + Mask("map_mask") + ZOrder(255) + Alpha(0.500000) + } + + PlayerFOVLarge("PlayerFOVLarge") + { + Mesh("") + ZOrder(0) + Alpha(0.500000) + } + + PlayerDirectionLarge("PlayerDirectionLarge") + { + Mesh("") + ZOrder(124) + Alpha(0.200000) + Color(255, 255, 0) + } + + TargetLarge("TargetLarge") + { + BitmapStyle("Shadow") + ZOrder(254) + Color(0, 0, 0) + } + + PostLarge("PostLarge") + { + BitmapStyle("Shadow") + ZOrder(0) + } + + PostTextLarge("PostTextLarge") + { + TextBreak("Word") + TextAlignment("Center", "Bottom") + ZOrder(127) + } + + PostSelectLarge("PostSelectLarge") + { + Bitmap("hud_icon_flash") + BitmapStyle("Shadow") + } + + MarkerLarge("MarkerLarge") + { + BitmapStyle("Shadow") + ZOrder(0) + } + + NorthLarge("NorthLarge") + { + Bitmap("hud_map_northpointer") + BitmapStyle("Shadow") + Position(0.000000, -0.375000, 0.000000, "Viewport") + Scale(5.000000, 5.000000, 5.000000) + ZOrder(127) + } + + BackdropSpawn("BackdropSpawn") + { + Mask("map_mask") + ZOrder(255) + Alpha(0.500000) + } + + PlayerFOVSpawn("PlayerFOVSpawn") + { + ZOrder(123) + } + + PlayerDirectionSpawn("PlayerDirectionSpawn") + { + ZOrder(124) + } + + TargetSpawn("TargetSpawn") + { + BitmapStyle("Shadow") + ZOrder(126) + Color(0, 0, 0) + } + + PostSpawn("PostSpawn") + { + BitmapStyle("Shadow") + } + + PostTextSpawn("PostTextSpawn") + { + TextBreak("Word") + TextAlignment("Center", "Bottom") + ZOrder(127) + } + + PostSelectSpawn("PostSelectSpawn") + { + Bitmap("hud_icon_flash") + BitmapStyle("Shadow") + } + + MarkerSpawn("MarkerSpawn") + { + BitmapStyle("Shadow") + ZOrder(0) + } + + NorthSpawn("NorthSpawn") + { + Bitmap("hud_map_northpointer") + BitmapStyle("Shadow") + Position(0.000000, -0.325000, 0.000000, "Viewport") + Scale(5.000000, 5.000000, 5.000000) + ZOrder(127) + } + +} + +Target("player1target") +{ + EventResetTargetCommon("targetResetCommon") + EventResetTargetPlayer("player1.targetResetPlayer") + FourSegmentLockOn(1) + EventPlayerIndex("player1.index") + EventEnable("player1.spawn") + EventDisable("player1.die") + + ObjectiveOnScreen("ObjectiveOnScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + } + + ObjectiveOnScreenBehind("ObjectiveOnScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon_hidden") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Alpha(0.900000) + } + + ObjectiveOffScreen("ObjectiveOffScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + } + + ObjectiveOffScreenBehind("ObjectiveOffScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Alpha(0.500000) + } + + FlagOnScreen("FlagOnScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_flag_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Alpha(0.900000) + } + + FlagOnScreenBehind("FlagOnScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_flag_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Alpha(0.200000) + } + + FlagOffScreen("FlagOffScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + } + + FlagOffScreenBehind("FlagOffScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Alpha(0.500000) + } + + AttackerOnScreen("AttackerOnScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.250000) + Bitmap("hud_target_hint_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + } + + AttackerOnScreenBehind("AttackerOnScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_hint_hidden") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + } + + AttackerOffScreen("AttackerOffScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_hint_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Alpha(0.500000) + } + + AttackerOffScreenBehind("AttackerOffScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_hint_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Alpha(0.500000) + } + + LockedOnScreen("LockedOnScreen") + { + ColorFriendly(0, 0, 255) + MinScale(3.000000) + MaxScale(0.000000) + Bitmap("hud_target_onscreen") + BitmapRect(0.025000, 0.030000, "Right", "Bottom", "Viewport") + TexCoords(0.000000, 0.000000, 0.500000, 0.500000) + Color(255, 50, 50) + } + + LockedOnScreenBehind("LockedOnScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(3.000000) + MaxScale(0.000000) + Bitmap("hud_target_hidden") + BitmapRect(0.025000, 0.030000, "Right", "Bottom", "Viewport") + TexCoords(0.000000, 0.000000, 0.500000, 0.500000) + Alpha(0.600000) + Color(200, 90, 90) + } + + LockedOffScreen("LockedOffScreen") + { + ColorFriendly(0, 0, 255) + MinScale(1.600000) + MaxScale(1.400000) + Bitmap("hud_target_pointer_solid") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Color(255, 50, 50) + } + + LockedOffScreenBehind("LockedOffScreenBehind") + { + ColorFriendly(0, 0, 255) + MinScale(1.600000) + MaxScale(1.400000) + Bitmap("hud_target_pointer") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Color(200, 90, 90) + } + + HintOnScreen("HintOnScreen") + { + ColorFriendly(0, 86, 213) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_hint_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + Color(175, 0, 0) + } + + HintOnScreenBehind("HintOnScreenBehind") + { + ColorFriendly(0, 86, 213) + MinScale(1.000000) + MaxScale(0.500000) + Bitmap("hud_target_hint_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + Alpha(0.400000) + Color(175, 0, 0) + } + + HintOffScreen("HintOffScreen") + { + ColorFriendly(0, 0, 255) + Alpha(0.000000) + } + + HintOffScreenBehind("HintOffScreenBehind") + { + ColorFriendly(0, 0, 255) + Alpha(0.000000) + } + + HintFlagOnScreen("HintFlagOnScreen") + { + ColorFriendly(0, 86, 213) + MinScale(1.500000) + MaxScale(0.750000) + Bitmap("hud_target_flag_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + Color(175, 0, 0) + } + + HintFlagOnScreenBehind("HintFlagOnScreenBehind") + { + ColorFriendly(0, 86, 213) + MinScale(1.500000) + MaxScale(0.750000) + Bitmap("hud_target_flag_onscreen") + BitmapRect(0.050000, 0.060000, "Center", "Bottom", "Viewport") + Position(0.000000, -0.050000, 0.000000, "Viewport") + Alpha(0.400000) + Color(175, 0, 0) + } + + HintFlagOffScreen("HintFlagOffScreen") + { + ColorFriendly(0, 86, 213) + MinScale(1.200000) + MaxScale(0.900000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Color(175, 0, 0) + } + + HintFlagOffScreenBehind("HintFlagOffScreenBehind") + { + ColorFriendly(0, 86, 213) + MinScale(1.200000) + MaxScale(0.900000) + Bitmap("hud_objective_icon_offscreen") + BitmapRect(0.050000, 0.060000, "Center", "Center", "Viewport") + Alpha(0.500000) + Color(175, 0, 0) + } + +} + +Group("player1reticule") +{ + EventPosition("player1.weapon1.reticule.position") + Position(0.500000, 0.5000, 0.000000, "Viewport") + Scale(0.7500, 0.7500, 0.7500) + PropagateAlpha(1) + Alpha(1.0000) + EventEnable("player1.weapon1.reticule.position") + EventDisable("player1.weapon1.reticule.disable") + EventAlpha("player1.reticule.alpha") + + Model3D("player1reticule_shape") + { + Mesh("hud_main_reticule") + Scale(0.260000, 0.260000, 0.260000) + Alpha(0.520000) + ColorChangeRate(0.001000) + EventEnable("initialize") + EventColor("player1.weapon1.target.teamColor") + } + + Group("player1bullseye") + { + EventEnable("initialize") + PropagateAlpha(0) + Model3D("player1reticule_bullseye") + { + Mesh("hud_main_reticule_bullseye") + Scale(0.35, 0.35, 0.35) + Alpha(0.80000) + EventEnable("initialize") + ColorChangeRate(0.001000) + EventColor("player1.weapon1.target.teamColorBright") + } + } + + Model3D("player1reticule_outline") + { + Mesh("hud_main_reticule_outline") + Scale(0.260000, 0.260000, 0.260000) + Alpha(0.500000) + Color(0, 0, 0) + EventEnable("initialize") + } + + Model3D("player1reticule_hit") + { + Mesh("hud_main_reticule_hit") + Lighting(0) + Scale(0.260000, 0.260000, 0.260000) + ZOrder(0) + Alpha(0.900000) + Color(1, 86, 213) + ColorChangeRate(0.010000) + FadeHoldTime(0.330000) + EventEnable("player1.weapon1.target.hit") + EventColor("player1.weapon1.target.hitColor") + } + + Model3D("player1reticule_criticalhit") + { + Mesh("hud_main_reticule_criticalhit") + Scale(0.260000, 0.260000, 0.260000) + Alpha(0.900000) + Color(1, 86, 213) + ColorChangeRate(0.010000) + FadeHoldTime(0.600000) + FadeSustainTime(0.500000) + FadeOutTime(0.010000) + EventEnable("player1.weapon1.target.hitCritical") + EventColor("player1.weapon1.target.hitColor") + } + + BarSegmented("player1weapon1clipbar") + { + AngleStart(-135.296936) + AngleEnd(144.795883) + NumSegments(30) + Value(1.000000) + EventValue("player1.weapon1.totalClipFraction") + Rect(0.050000, 0.100000, "Center", "Center", "Viewport") + PropagateAlpha(1) + Position(-0.000581, -0.001564, 0.000000, "Viewport") + ColorChangeRate(0.100000) + FadeHoldTime(6.030002) + FadeSustainTime(1.020000) + FadeOutTime(0.500000) + EventEnable("player1.weapon1.totalClipFraction") + EventDisable("player1.weapon1.target.disable") + Segment("Segment") + { + Bitmap("hud_clipbar_segment") + BitmapStyle("Shadow") + BitmapRect(0.003122, 0.014606, "Center", "Center", "Viewport") + Alpha(0.750000) + Color(160, 160, 224) + FadeInTime(0.100000) + FadeOutTime(0.250000) + } + + } + + BarSegmented("player1weapon2refirebar") + { + AngleStart(-119.999985) + AngleEnd(240.095596) + NumSegments(3) + Value(1.000000) + EventValue("player1.weapon2.refire") + Rect(0.050000, 0.100000, "Center", "Center", "Viewport") + PropagateAlpha(1) + Position(-0.008000, -0.017000, 0.000000, "Viewport") + Scale(1.280000, 1.280000, 1.280000) + ZOrder(0) + Color(177, 50, 0) + ColorChangeRate(0.100000) + FadeHoldTime(0.600000) + FadeOutTime(0.320000) + EventEnable("player1.weapon2.refire") + EventDisable("player1.weapon2.disable") + Segment("Segment") + { + Bitmap("hud_secondary_refire_segment") + BitmapStyle("Shadow") + BitmapRect(0.006262, 0.008351, "Center", "Center", "Viewport") + FadeInTime(0.100000) + FadeOutTime(0.250000) + } + + } + + BarSegmented("player1weapon1heatbar") + { + AngleStart(-149.999832) + AngleEnd(149.999832) + NumSegments(30) + Value(1.000000) + EventValue("player1.weapon1.heat") + Rect(0.050000, 0.100000, "Center", "Center", "Viewport") + PropagateAlpha(1) + Alpha(0.600000) + Color(239, 255, 41) + EventEnable("player1.weapon1.heat") + EventDisable("player1.weapon1.disable") + EventColor("player1.weapon1.heatcolor") + Segment("Segment") + { + Bitmap("white") + BitmapStyle("Shadow") + BitmapRect(0.016252, 0.012504, "Center", "Center", "Viewport") + Alpha(0.750000) + FadeInTime(0.100000) + FadeOutTime(0.300000) + } + + } + + BarSegmented("player1weapon1refire_leftbit") + { + AngleStart(-179.999893) + AngleEnd(-139.999939) + NumSegments(3) + Value(1.000000) + EventValue("player1.weapon1.refire") + Rect(0.092845, 0.120721, "Center", "Center", "Viewport") + PropagateAlpha(1) + Alpha(0.600000) + Color(255, 0, 0) + EventEnable("player1.weapon1.refire") + EventDisable("player1.weapon1.disable") + Segment("Segment") + { + Bitmap("white") + BitmapStyle("Shadow") + BitmapRect(0.007862, 0.012504, "Center", "Center", "Viewport") + FadeInTime(0.050000) + FadeOutTime(0.100000) + } + + } + + BarSegmented("player1weapon1refire_rightbit") + { + AngleStart(-179.999893) + AngleEnd(-139.999939) + NumSegments(3) + Value(1.000000) + EventValue("player1.weapon1.refire") + Rect(0.092845, 0.120721, "Center", "Center", "Viewport") + PropagateAlpha(1) + Position(0.092858, 0.001168, 0.000000, "Viewport") + Rotation(0.000000, 180.000000, 0.000000) + Alpha(0.600000) + Color(255, 0, 0) + EventEnable("player1.weapon1.refire") + EventDisable("player1.weapon1.disable") + Segment("Segment") + { + Bitmap("white") + BitmapStyle("Shadow") + BitmapRect(0.007862, 0.012504, "Center", "Center", "Viewport") + FadeInTime(0.050000) + FadeOutTime(0.100000) + } + + } + +} + +Text("player1weapon1overheat") +{ + TextBreak("Word") + TextStyle("Shadow") + Text("game.weaponOverheat") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + Position(0.500000, 0.750000, 0.000000, "Viewport") + ZOrder(5) + Color(230, 70, 0) + ColorPulseRate(0.750000) + FadeInTime(0.250000) + FadeHoldTime(0.100000) + FadeOutTime(1.000000) + EventEnable("player1.weaponsOverheat") + EventDisable("player1.weaponsDisable") +} + +Group("player1weapon1lockon") +{ + EventPosition("player1.weapon1.lockOnPosition") + EventRotation("player1.weapon1.chargeRotate") + EventScale("player1.weapon1.chargeScale") + Position(0.461625, 0.459230, 0.000000, "Viewport") + EventEnable("player1.weapon1.lockOnPosition") + EventDisable("player1.weapon1.lockOnDisable") + Model3D("player1reticule_backdrop") + { + Mesh("hud_main_reticule_rocketlockon_active") + Scale(0.260000, 0.260000, 0.260000) + ColorChangeRate(0.000000) + EventEnable("initialize") + EventColor("player1.weapon1.chargeColor") + } + +} + +Group("player1weapon2lockon") +{ + EventPosition("player1.weapon2.lockOnPosition") + EventRotation("player1.weapon2.chargeRotate") + EventScale("player1.weapon2.chargeScale") + Position(0.589291, 0.795639, 0.000000, "Viewport") + EventEnable("player1.weapon2.lockOnPosition") + EventDisable("player1.weapon2.lockOnDisable") + Model3D("player1reticule_backdrop") + { + Mesh("hud_main_reticule_rocketlockon_active") + Scale(0.260000, 0.260000, 0.260000) + ColorChangeRate(0.000000) + EventEnable("initialize") + EventColor("player1.weapon2.chargeColor") + } + +} + +Text("player1spawnvehicle") +{ + TextBox(0.384766, 0.500000) + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.spawnDisplay.vehicle") + Position(0.497674, 0.338058, 0.000000, "Viewport") + ZOrder(0) + EventEnable("player1.spawnDisplay.enable") + EventDisable("player1.spawnDisplay.disable") +} + +Text("player1spawninfo") +{ + TextBox(0.500000, 0.500000) + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.spawnDisplay.spawninfo") + Position(0.498295, 0.192691, 0.000000, "Viewport") + ZOrder(0) + EventEnable("player1.spawnDisplay.enable") + EventDisable("player1.spawnDisplay.disable") +} + +MultilineText("player1systemMessages") +{ + + + EventText("player1.message") + EventColor("player1.message.color") + NumLines(8) + DisplayTime(5.0) + AlwaysScroll(1) + ScrollSpeed(5.0) + AddToTop(1) + Rect(1.000000, 0.90000, "Left", "Top", "Viewport") + PropagateAlpha(1) + Position(0.04, 0.13, 0.000000, "Viewport") + ZOrder(0) + EventEnable("player1.message") + EventDisable("player1.message.disable") + Format("Format") + { + TextBox(0.500000, 0.250000) + TextBreak("Word") + TextStyle("Shadow") + TextAlignment("Left", "Center") + TextFont("gamefont_tiny") + ZOrder(0) + Color(223, 32, 32) + FadeInTime(0.250000) + FadeOutTime(0.250000) + } +} + +Group("player1teams") +{ + PropagateAlpha(1) + Position(0.500000, 0.089000, 0.000000, "Viewport") + Scale(1.0000, 1.0000, 1.0000) + Alpha(0.800000) + FadeInTime(3.000000) + FadeOutTime(2.000000) + EventEnable("initialize") + Group("player1team1_group") + { + Position(-0.174945, 0.030501, 0.000000, "Viewport") + EventEnable("initialize") + Group("player1teams_team1icongroup") + { + Position(-0.012502, -0.024102, 0.000000, "Viewport") + Scale(0.0, 0.0, 0.0) + EventEnable("initialize") + Bitmap("player1teams_team1icon") + { + BitmapRect(0.070000, 0.090000, "Center", "Center", "Viewport") + BitmapStyle("Shadow") + EventBitmap("player1.team1.texture") + Scale(0.650000, 0.650000, 0.650000) + ZOrder(6) + Alpha(0.750000) + Color(1, 86, 213) + EventEnable("player1.team1.texture") + EventDisable("player1.team1.textureDisable") + } + } + + Group("player1teams_team1pointsgroup") + { + Position(-0.010948, -0.060000, 0.000000, "Viewport") + + EventEnable("initialize") + Text("player1teams_team1points") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.team1.pointsText") + Color(1, 86, 213) + EventEnable("player1.team1.pointsText") + EventDisable("player1.team1.pointsDisable") + } + } + + Group("player1teams_team1reinforcementsgroup") + { + Position(0.004654, -0.060000, 0.000000, "Viewport") + EventEnable("initialize") + Text("player1teams_team1reinforcements") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("player1.team1.reinforcements") + ZOrder(5) + Color(1, 86, 213) + EventEnable("player1.team1.reinforcements") + EventDisable("player1.team1.reinforcementsDisable") + EventPulseRate("player1.team1.bleedRate") + } + } + + } + + Group("player1team2_group") + { + Position(0.174945, 0.030501, 0.000000, "Viewport") + EventEnable("initialize") + Group("player1teams_team2icongroup") + { + Position(0.012502, -0.024102, 0.000000, "Viewport") + Scale(0.0, 0.0, 0.0) + EventEnable("initialize") + Bitmap("player1teams_team2icon") + { + BitmapRect(0.070000, 0.090000, "Center", "Center", "Viewport") + BitmapStyle("Shadow") + EventBitmap("player1.team2.texture") + Scale(0.650000, 0.650000, 0.650000) + ZOrder(6) + Alpha(0.750000) + Color(150, 15, 25) + EventEnable("player1.team2.texture") + EventDisable("player1.team2.textureDisable") + } + } + + Group("player1teams_team2pointsgroup") + { + Position(0.014120, -0.060000, 0.000000, "Viewport") + + EventEnable("initialize") + Text("player1teams_team2points") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.team2.pointsText") + Color(133, 32, 32) + EventEnable("player1.team2.points") + EventDisable("player1.team2.pointsDisable") + } + } + + Group("player1teams_team2reinforcementsgroup") + { + Position(0.001109, -0.060000, 0.000000, "Viewport") + EventEnable("initialize") + Text("player1teams_team2reinforcements") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("player1.team2.reinforcements") + ZOrder(5) + Color(150, 30, 30) + EventEnable("player1.team2.reinforcements") + EventDisable("player1.team2.reinforcementsDisable") + EventPulseRate("player1.team2.bleedRate") + } + } + + } + +} + +Group("player1herobar") +{ + Position(0.035000, 0.860000, 0.000000, "Viewport") + EventEnable("player1.hero.healthFraction") + EventDisable("player1.hero.healthDisable") + BarBitmap("player1herobar_COLOR") + { + ScaleTexture(0) + EventValue("player1.hero.healthFraction") + Bitmap("hud_herobar_saberglow") + BitmapRect(0.300000, 0.030000, "Left", "Top", "Viewport") + Position(0.111500, -0.009900, 0.000000, "Viewport") + Scale(1.901000, 1.450000, 1.000000) + ZOrder(7) + Alpha(0.800000) + Color(40, 126, 255) + EventEnable("initialize") + } + BarBitmap("player1herobar_INNERWHITE") + { + ScaleTexture(0) + FlashyScale(0.000000) + EventValue("player1.hero.healthFraction") + Bitmap("hud_herobar_saberglow") + BitmapRect(0.300000, 0.030000, "Left", "Top", "Viewport") + Position(0.111000, 0.004000, 0.000000, "Viewport") + Scale(1.901000, 0.450000, 1.000000) + ZOrder(6) + Alpha(0.800000) + EventEnable("initialize") + } + ProceduralBarBitmap("player1herobar_PULSE") + { + ScaleTexture(0) + EventValue("player1.hero.healthFraction") + Bitmap("hud_herobar_saberglow") + BitmapRect(0.300000, 0.000052, "Left", "Top", "Viewport") + Position(0.111500, 0.001000, 0.000000, "Viewport") + Scale(1.450000, 1.000000, 1.000000) + ZOrder(0) + Alpha(0.096829) + Color(167, 255, 0) + BlendMode("Additive") + EventEnable("initialize") + } + Bitmap("player1herobar_herobarsaberhilt") + { + Bitmap("hud_herobar_saberhilt") + BitmapRect(0.400000, 0.133000, "Left", "Top", "Viewport") + Position(0.000034, -0.013004, 0.000000, "Viewport") + Scale(0.280000, 0.280000, 0.280000) + Alpha(0.500000) + EventEnable("player1.hero.health") + EventDisable("player1.hero.healthDisable") + } +} + +Group("player1vehicleseatinggroup") +{ + PropagateAlpha(1) + Position(0.045645, 0.705077, 0.000000, "Viewport") + Scale(0.600000, 0.600000, 0.600000) + FadeInTime(0.250000) + FadeHoldTime(4.000000) + FadeOutTime(0.250000) + EventEnable("player1.vehicle.seatingMesh") + EventDisable("player1.vehicle.healthDisable") + VehicleSeating("player1vehicleseating") + { + EventPlayerIndex("player1.index") + PropagateAlpha(1) + EventEnable("initialize") + Backdrop("Backdrop") + { + } + + Empty("Empty") + { + Mesh("hud_vehicle_seatingchart_empty_icon") + Position(-0.017477, 0.000000, 0.000000, "Viewport") + Scale(0.300000, 0.300000, 0.300000) + Alpha(0.500000) + } + + EmptyText("EmptyText") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Alpha(0.500000) + } + + Self("Self") + { + Mesh("hud_vehicle_seatingchart_player1_icon") + Position(-0.017477, 0.000000, 0.000000, "Viewport") + Scale(0.300000, 0.300000, 0.300000) + } + + SelfText("SelfText") + { + TextBreak("Word") + TextFont("gamefont_small") + TextStyle("Shadow") + } + + Player("Player") + { + Mesh("hud_vehicle_seatingchart_player1_icon") + Position(-0.017477, 0.000000, 0.000000, "Viewport") + Scale(0.300000, 0.300000, 0.300000) + Alpha(0.500000) + } + + PlayerText("PlayerText") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Alpha(0.500000) + } + + AI("AI") + { + Mesh("hud_vehicle_seatingchart_ai_icon") + Position(-0.017477, 0.000000, 0.000000, "Viewport") + Scale(0.300000, 0.300000, 0.300000) + Alpha(0.750000) + } + + AIText("AIText") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Alpha(0.500000) + } + + } + +} + +BorderedBox("player1HintPopupText.BorderBox") +{ + Background("border_3_pieces") + Border(2.000000, 2.000000) + Rect(1.098883, 1.095483, "Left", "Top", "Viewport") + PropagateAlpha(1) + Position(-0.056699, -0.053812, 0.000000, "Viewport") + ZOrder(0) + Color(192, 224, 224) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + Text("player1HintPopupText.popup_title") + { + TextBreak("Word") + Text("game.popup.hintTitle") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Position(0.541136, 0.167189, 0.000000, "Viewport") + ZOrder(0) + Color(115, 115, 255) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Text("player1HintPopupText.myText") + { + TextBox(0.447266, 0.343750) + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("hintPopup") + Position(0.317333, 0.255543, 0.000000, "Viewport") + ZOrder(123) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Text("player1HintPopupText.press_to_continue") + { + TextBreak("Word") + Text("game.popup.pressToContinue") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Position(0.554724, 0.729572, 0.000000, "Viewport") + ZOrder(127) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Text("player1HintPopupText.pageNumber") + { + TextBreak("Word") + Text("game.popup.pressToContinue") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("hintPopup.pageNumber") + Position(0.539965, 0.208581, 0.000000, "Viewport") + ZOrder(127) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Model3D("player1HintPopupText") + { + Mesh("hud_hint_backdrop") + Position(0.516398, 0.431267, -3.572391, "Viewport") + Rotation(0.013153, 0.000000, 0.000000) + Scale(2.509999, 2.509999, 2.509999) + ZOrder(255) + Alpha(0.900000) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Bitmap("player1HintPopupText.LeftArrow") + { + Bitmap("OptionL") + BitmapRect(0.050000, 0.050000, "Center", "Center", "Viewport") + Position(0.269701, 0.500000, 0.000000, "Viewport") + ColorChange(150, 150, 0) + ColorPulseRate(0.500000) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + + Bitmap("player1HintPopupText.RightArrow") + { + Bitmap("OptionR") + BitmapRect(0.050000, 0.050000, "Center", "Center", "Viewport") + Position(0.800000, 0.500000, 0.000000, "Viewport") + ColorChange(150, 150, 0) + ColorPulseRate(0.500000) + EventEnable("hintPopup") + EventDisable("hintPopup.disable") + } + +} + +Group("player1ObjectivePopupText.Group") +{ + Rect(1.000000, 1.000000, "Center", "Top", "Viewport") + PropagateAlpha(1) + Position(0.500000, 0.000000, 0.000000, "Viewport") + ZOrder(0) + EventEnable("objectivePopup") + EventDisable("objectivePopup.disable") + Bitmap("ObjectivePopupText.Backdrop") + { + Bitmap("hud_white") + BitmapRect(2.000000, 2.000000, "Center", "Center", "Viewport") + Position(0.000000, 0.000000, 0.000000, "Viewport") + Alpha(0.750000) + Color(0, 0, 0) + EventEnable("objectivePopup") + EventDisable("objectivePopup.disable") + } + + Text("player1ObjectivePopupText.popup_title") + { + TextBreak("Word") + Text("game.popup.objectiveTitle") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Position(0.500000, 0.192183, 0.000000, "Viewport") + ZOrder(127) + Color(241, 235, 35) + EventEnable("objectivePopup") + EventDisable("objectivePopup.disable") + } + + Text("player1ObjectivePopupText.myText") + { + TextBox(0.750000, 0.559896) + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("objectivePopup") + Position(0.133711, 0.261700, 0.000000, "Viewport") + ZOrder(127) + ColorChange(150, 150, 255) + EventEnable("objectivePopup") + EventDisable("objectivePopup.disable") + } + + Text("player1ObjectivePopupText.press_to_continue") + { + TextBreak("Word") + Text("game.popup.pressToContinue") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Position(0.513249, 0.701385, 0.000000, "Viewport") + ZOrder(127) + EventEnable("objectivePopup") + EventDisable("objectivePopup.disable") + } + +} + +Text("player1ObjectivesUpdatedReminder") +{ + TextBox(0.416250, 0.355000) + TextBreak("Word") + TextStyle("Shadow") + Text("game.objectives.updated") + TextAlignment("Right", "Top") + TextCharacterSpacing(-1) + TextFont("gamefont_tiny") + Position(0.525000, 0.300000, 0.000000, "Viewport") + ZOrder(0) + ColorChange(150, 150, 0) + ColorPulseRate(0.304004) + FadeInTime(0.200000) + FadeOutTime(10.000000) + EventEnable("player1.objectivesUpdated") + EventDisable("player1.objectivesUpdated.disable") +} + +Text("player1ShowObjectiveDetails") +{ + TextBox(0.346680, 0.355469) + TextBreak("Word") + TextStyle("Shadow") + Text("game.objectives.showdetails") + TextCharacterSpacing(-1) + TextFont("gamefont_tiny") + Position(0.275000, 0.100000, 0.000000, "Viewport") + ZOrder(0) + ColorChange(150, 150, 0) + ColorPulseRate(0.750000) + EventEnable("player1.objectiveDetails") + EventDisable("player1.objectiveDetails.disable") +} + +Text("player1ShowHints") +{ + TextBox(0.265625, 0.355469) + TextBreak("Word") + TextStyle("Shadow") + Text("game.objectives.showhints") + TextCharacterSpacing(-1) + TextFont("gamefont_tiny") + Position(0.275000, 0.1250000, 0.000000, "Viewport") + ZOrder(0) + ColorChange(150, 150, 0) + ColorPulseRate(0.750000) + EventEnable("player1.hintsAvailable") + EventDisable("player1.hintsAvailable.disable") +} + + + +Group("player1flags") +{ + PropagateAlpha(1) + Position(0.917500, 0.450000, 0.000000, "Viewport") + EventEnable("initialize") + Bitmap("player1_1stperson_hastheflag") + { + Bitmap("hud_player_captured_flag") + BitmapRect(0.052442, 0.070000, "Left", "Top", "Viewport") + Position(0.000000, 0.185644, 0.000000, "Viewport") + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.player.carried") + EventDisable("player1.flag.player.disable") + } + + Bitmap("player1.flag.friend.carried") + { + Bitmap("flag_carried") + BitmapRect(0.040000, 0.070000, "Left", "Top", "Viewport") + Color(150, 10, 10) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.friend.carried") + EventDisable("player1.flag.friend.carried.disable") + } + + Bitmap("player1.flag.friend.team.carried") + { + Bitmap("flag_team_carried") + BitmapRect(0.040000, 0.070000, "Left", "Top", "Viewport") + Position(0.017312, -0.033098, 0.000000, "Viewport") + Scale(0.700000, 0.700000, 0.700000) + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.friend.carried") + EventDisable("player1.flag.friend.carried.disable") + } + + Text("player1.flag.friend.carried.number") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_tiny") + EventNumber("player1.flag.friend.carried.number") + Position(0.045156, 0.009000, 0.000000, "Viewport") + Color(150, 0, 0) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.friend.carried.number") + EventDisable("player1.flag.friend.carried.number.disable") + } + + Bitmap("player1.flag.friend.dropped") + { + Bitmap("flag_dropped") + BitmapRect(0.050026, 0.056726, "Left", "Top", "Viewport") + Position(-0.007348, -0.007380, 0.000000, "Viewport") + Scale(1.300000, 1.299803, 1.300000) + Alpha(0.750000) + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.friend.dropped") + EventDisable("player1.flag.friend.dropped.disable") + } + + Text("player1.flag.friend.dropped.number") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_tiny") + EventNumber("player1.flag.friend.dropped.number") + Position(0.045156, 0.089000, 0.000000, "Viewport") + Color(150, 0, 0) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.friend.dropped.number") + EventDisable("player1.flag.friend.dropped.number.disable") + } + + Bitmap("player1.flag.enemy.carried") + { + Bitmap("flag_carried") + BitmapRect(0.040000, 0.070000, "Left", "Top", "Viewport") + Position(0.002930, 0.116245, 0.000000, "Viewport") + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.enemy.carried") + EventDisable("player1.flag.enemy.carried.disable") + } + + Bitmap("player1.flag.enemy.team.carried") + { + Bitmap("flag_team_carried") + BitmapRect(0.040000, 0.070000, "Left", "Top", "Viewport") + Position(0.019844, 0.076532, 0.000000, "Viewport") + Scale(0.700000, 0.700000, 0.700000) + Color(150, 0, 0) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.enemy.carried") + EventDisable("player1.flag.enemy.carried.disable") + } + + Text("player1.flag.enemy.carried.number") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_tiny") + EventNumber("player1.flag.enemy.carried.number") + Position(0.045156, 0.169000, 0.000000, "Viewport") + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.enemy.carried.number") + EventDisable("player1.flag.enemy.carried.number.disable") + } + + Bitmap("player1.flag.enemy.dropped") + { + Bitmap("flag_dropped") + BitmapRect(0.050000, 0.056335, "Left", "Top", "Viewport") + Position(-0.006854, 0.103979, 0.000000, "Viewport") + Scale(1.300000, 1.300000, 1.300000) + Alpha(0.750000) + Color(150, 0, 0) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.enemy.dropped") + EventDisable("player1.flag.enemy.dropped.disable") + } + + Text("player1.flag.enemy.dropped.number") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_tiny") + EventNumber("player1.flag.enemy.dropped.number") + Position(0.045156, 0.249000, 0.000000, "Viewport") + Color(0, 86, 213) + FadeInTime(0.500000) + FadeOutTime(0.200000) + EventEnable("player1.flag.enemy.dropped.number") + EventDisable("player1.flag.enemy.dropped.number.disable") + } + +} + +Text("player1.vehicle.hackingTime") +{ + TextBreak("Word") + TextStyle("Shadow") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + EventText("player1.vehicle.hackingTimeFraction") + Viewport(1) + Position(0.500000, 0.400000, 0.000000, "Viewport") + Color(0, 240, 0) + EventEnable("player1.vehicle.hackingTimeFraction") + EventDisable("player1.vehicle.hackingTimeDisable") +} + +Text("player1.vehicle.hackedTime") +{ + TextBreak("Word") + TextStyle("Shadow") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + EventText("player1.vehicle.hackedTimeFraction") + Viewport(1) + Position(0.500000, 0.400000, 0.000000, "Viewport") + Color(200, 0, 0) + ColorPulseRate(0.750000) + EventEnable("player1.vehicle.hackedTimeFraction") + EventDisable("player1.vehicle.hackedTimeDisable") +} + +Group("player1.heroSelect") +{ + Position(0.500542, 0.850000, 0.000000, "Viewport") + EventEnable("player1.heroSelect.message") + EventDisable("player1.heroSelect.disable") + Text("player1.heroSelectMessage") + { + TextBreak("Word") + TextStyle("Shadow") + TextAlignment("Center", "Top") + TextFont("gamefont_small") + EventText("player1.heroSelect.message") + EventEnable("initialize") + } + + Text("player1.heroSelectTimer") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_small") + EventNumber("player1.heroSelect.timer") + NumberToTime("%s") + Position(-0.01, 0.080000, 0.000000, "Viewport") + Color(255, 255, 0) + ColorChangeRate(0.100000) + UseChangeColor(1) + EventEnable("initialize") + } + + Bitmap("player1.heroAcceptDecline") + { + Bitmap("ns_btn_directional_pad_LR") + BitmapRect(0.039840, 0.053168, "Left", "Top", "Viewport") + Position(-0.021993, 0.035093, 0.000000, "Viewport") + EventEnable("initialize") + } + + Text("player1.heroAccept") + { + TextBreak("Word") + TextStyle("Shadow") + Text("common.yes") + TextFont("gamefont_small") + Position(-0.051000, 0.044118, 0.000000, "Viewport") + EventEnable("initialize") + } + + Text("player1.heroDecline") + { + TextBreak("Word") + TextStyle("Shadow") + Text("common.no") + TextFont("gamefont_small") + Position(0.025000, 0.044118, 0.000000, "Viewport") + EventEnable("initialize") + } + +} + +Group("player1SelectionPopupGroup") +{ + Position(0.343786, 0.746624, 0.000000, "Viewport") + EventEnable("selectionPopup") + EventDisable("selectionPopup.disable") + Text("player1SelectionPopupText.popup_text") + { + TextBreak("Word") + TextStyle("Shadow") + TextFont("gamefont_small") + EventText("selectionPopup") + Position(0.082000, 0.000000, 0.000000, "Viewport") + EventEnable("selectionPopup") + EventDisable("selectionPopup.disable") + } + + Bitmap("player1SelectionPopupText.configAcceptDecline") + { + Bitmap("ns_btn_directional_pad_LR") + BitmapRect(0.039840, 0.053168, "Left", "Top", "Viewport") + Position(0.130928, 0.035322, 0.000000, "Viewport") + EventEnable("selectionPopup") + EventDisable("selectionPopup.disable") + } + + Text("player1SelectionPopupText.configAccept") + { + TextBreak("Word") + TextStyle("Shadow") + Text("ifs.controls.presets.A") + TextFont("gamefont_small") + Position(0.320000, 0.042472, 0.000000, "Viewport") + EventEnable("selectionPopup") + EventDisable("selectionPopup.disable") + } + + Text("player1SelectionPopupText.configDecline") + { + TextBreak("Word") + TextStyle("Shadow") + Text("ifs.controls.presets.B") + TextFont("gamefont_small") + Position(0.182248, 0.042472, 0.000000, "Viewport") + EventEnable("selectionPopup") + EventDisable("selectionPopup.disable") + } + +} + +Group("player1stats") +{ + Rect(1.000000, 1.000000, "Left", "Center", "Viewport") + PropagateAlpha(1) + Position(0.030000, 1.0750000, 0.000000, "Viewport") + Scale(1.0000, 1.0000, 1.0000) + Alpha(0.990000) + FadeHoldTime(999999.000000) + FadeOutTime(999999.000000) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + Group("player1pointsgroup") + { + PropagateAlpha(1) + Position(0.002237, -0.005473, 0.000000, "Viewport") + Alpha(0.500000) + EventEnable("initialize") + Text("player1statspoints") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("player1.statistic.points") + Position(0.049872, -0.121851, 0.000000, "Viewport") + ZOrder(5) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + } + + Bitmap("player1statspoints.icon") + { + Bitmap("points") + BitmapRect(0.039840, 0.053168, "Left", "Top", "Viewport") + Position(0.000000, -0.130000, 0.000000, "Viewport") + Scale(0.7000, 0.7000, 0.7000) + Alpha(0.500000) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + + Group("player1pointsdeltagroup") + { + PropagateAlpha(1) + Position(0.084261, -0.127866, 0.000000, "Viewport") + Alpha(0.500000) + EventEnable("initialize") + Text("player1statspointsDelta") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.statistic.pointsDelta") + Position(0.000045, 0.000094, 0.000000, "Viewport") + ZOrder(5) + Color(190, 190, 190) + ColorPulseRate(0.750000) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + } + + Group("player1statskillsgroup") + { + PropagateAlpha(1) + Position(0.001862, 0.002454, 0.000000, "Viewport") + Alpha(0.500000) + EventEnable("initialize") + Text("player1statskills") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("player1.statistic.kills") + Position(0.048524, -0.201660, 0.000000, "Viewport") + ZOrder(5) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + } + + Bitmap("player1statskills.icon") + { + Bitmap("stats_kills") + BitmapRect(0.039840, 0.053168, "Left", "Top", "Viewport") + Position(-0.000000, -0.200000, 0.000000, "Viewport") + Scale(0.7000, 0.7000, 0.7000) + Alpha(0.500000) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + + Group("player1statskillsdeltagroup") + { + PropagateAlpha(1) + Position(0.084904, -0.199495, 0.000000, "Viewport") + Alpha(0.500000) + EventEnable("initialize") + Text("player1statskillsDelta") + { + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.statistic.killsDelta") + Position(0.000017, -0.000793, 0.000000, "Viewport") + ZOrder(5) + Color(190, 190, 190) + ColorPulseRate(0.750000) + EventEnable("player1.statistic.changed") + EventDisable("player1.statistic.disable") + } + } + +} + +Group("player1lockoninfo") +{ + PropagateAlpha(1) + Position(0.787504, 0.828324, 0.000000, "Viewport") + Alpha(0.500000) + FadeOutTime(1.000000) + EventEnable("player1.lockOnClassName") + EventDisable("player1.lockOnDisable") + Text("player1lockon.className") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.lockOnClassName") + Position(0.006355, 0.015880, 0.000000, "Viewport") + ZOrder(127) + EventEnable("initialize") + } + + Text("player1lockon.name") + { + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventText("player1.lockOnName") + Position(0.007546, 0.057666, 0.000000, "Viewport") + ZOrder(127) + EventEnable("player1.lockOnName") + EventDisable("player1.lockOnDisable") + } + + Text("player1lockon.distance") + { + TextBox(0.136719, 0.000000) + TextBreak("Word") + TextFont("gamefont_tiny") + TextStyle("Shadow") + TextAlignment("Center", "Top") + EventNumber("player1.lockOnDistance") + FloatFormat("%.0f") + Position(-0.059591, 0.082852, 0.000000, "Viewport") + ZOrder(127) + EventEnable("initialize") + } + + Bitmap("player1lockon.flag") + { + Bitmap("flag_team_carried") + BitmapRect(64.000000, 64.000000, "Left", "Top", "Screen") + BitmapStyle("Shadow") + Position(-0.093732, 0.086974, 0.000000, "Viewport") + Scale(0.300000, 0.300000, 0.300000) + Color(175, 0, 0) + EventEnable("player1.lockOnFlagCarrier") + EventDisable("player1.lockOnFlagCarrierDisable") + } + + Group("player1lockon.directionIconGroup") + { + PropagateAlpha(1) + EventRotation("player1.lockOnDirection") + Position(-0.024274, 0.095270, 0.000000, "Viewport") + ZOrder(127) + Color(223, 60, 60) + ColorPulseRate(0.750000) + EventEnable("player1.lockOnDirection") + EventDisable("player1.lockOnDirectionDisable") + EventColor("player1.lockOnTeamColor") + Bitmap("player1lockon.directionIcon") + { + Bitmap("player_icon") + BitmapRect(0.050000, 0.050000, "Center", "Center", "Viewport") + Scale(0.590000, 0.590000, 0.590000) + EventEnable("initialize") + } + + } + + BarBitmap("player1lockon.health") + { + FlashyIncFadeOutTime(1.000000) + FlashyDecFadeOutTime(1.000000) + EventValue("player1.lockOnHealthFraction") + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.275464, 0.020224, "Center", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Position(0.000000, 0.041337, 0.000000, "Viewport") + Scale(1.000000, 0.474493, 1.000000) + ZOrder(1) + Color(223, 60, 60) + ColorChange(0, 0, 0) + ColorChangeRate(0.000000) + EventEnable("player1.lockOnHealthFraction") + EventDisable("player1.lockOnDisable") + EventColor("player1.lockOnTeamColor") + } + + Bitmap("player1lockon.healthBackdrop") + { + Bitmap("hud_jetpack_and_energybar_fill") + BitmapRect(0.293620, 0.042034, "Center", "Top", "Viewport") + TexCoords(0.000000, 0.500000, 1.000000, 1.000000) + Position(0.000000, 0.036624, 0.000000, "Viewport") + Scale(1.000000, 0.474493, 1.000000) + ZOrder(10) + Color(0, 0, 0) + EventEnable("initialize") + } + +} + +Group("player1spaceassaultgroup") +{ + Rect(0.200751, 0.201064, "Left", "Top", "Viewport") + Position(0.800000, 0.050000, 0.000000, "Viewport") + Scale(0.997739, 1.000000, 1.000000) + ZOrder(250) + EventEnable("player1.spaceAssaultStatus") + EventDisable("player1.spaceAssaultStatus.disable") +} + +Text("player1missilelock") +{ + TextBox(0.000000, 0.500000) + TextBreak("Word") + Text("game.missilelock") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + Position(0.500000, 0.60, 0.000000, "Viewport") + Color(255, 0, 0) + ColorPulseRate(0.700000) + FadeInTime(0.500000) + FadeOutTime(1.000000) + EventEnable("player1.missileLock") + EventDisable("player1.missileLockDisable") +} + +Text("player1missilelockdistance") +{ + TextBox(0.000000, 0.500000) + TextBreak("Word") + TextAlignment("Center", "Top") + TextFont("gamefont_tiny") + TextStyle("Shadow") + EventNumber("player1.missileLockDistance") + Position(0.500000, 0.55, 0.000000, "Viewport") + Color(255, 0, 0) + ColorPulseRate(0.700000) + FadeInTime(0.500000) + FadeOutTime(1.000000) + EventEnable("player1.missileLockDistance") + EventDisable("player1.missileLockDisable") +} + +Group("player1mapkey") +{ + Position(0.145555, 0.811111, 0.000000, "Viewport") + ZOrder(125) + EventEnable("initialize") + Group("player1mapkey_spawnonly") + { + Position(0.000000, 0.069934, 0.000000, "Viewport") + EventEnable("player1.map.spawn") + EventDisable("player1.map.spawnLargeDisable") + Bitmap("player1mapkey_CPIcon") + { + Bitmap("hud_flag_icon") + BitmapRect(0.031117, 0.046218, "Left", "Top", "Viewport") + Position(0.009730, 0.000002, 0.000000, "Viewport") + Color(1, 86, 213) + EventEnable("initialize") + } + + Text("player1mapkey_CPText") + { + TextBreak("Word") + Text("game.spawndisplay.commandpost") + TextStyle("Shadow") + Position(0.052833, 0.006737, 0.000000, "Viewport") + Alpha(0.590000) + EventEnable("initialize") + } + + } + +} + diff --git a/0/docs/options/README_OPTIONS.txt b/0/in-game-options/docs/README_OPTIONS.txt similarity index 100% rename from 0/docs/options/README_OPTIONS.txt rename to 0/in-game-options/docs/README_OPTIONS.txt diff --git a/0/docs/options/un_modded_mp_lobby.jpg b/0/in-game-options/docs/un_modded_mp_lobby.jpg similarity index 100% rename from 0/docs/options/un_modded_mp_lobby.jpg rename to 0/in-game-options/docs/un_modded_mp_lobby.jpg diff --git a/0/docs/options/user_script_ifs_mp_lobby_extra_buttons.jpg b/0/in-game-options/docs/user_script_ifs_mp_lobby_extra_buttons.jpg similarity index 100% rename from 0/docs/options/user_script_ifs_mp_lobby_extra_buttons.jpg rename to 0/in-game-options/docs/user_script_ifs_mp_lobby_extra_buttons.jpg diff --git a/0/load-options/docs/README.txt b/0/load-options/docs/README.txt new file mode 100644 index 0000000..02f7fc7 --- /dev/null +++ b/0/load-options/docs/README.txt @@ -0,0 +1,12 @@ + +A 'load-options' will consist of the following files: + + preview images -- Show the user why your load textures are neat. + apply_load.bat -- Simple batch file that copies the common.lvl and load.lvl + to the game's _lvl_common\load folder. If you are making a new + load-options' package just copy the one from the default + aspyr folder. + common.lvl -- .lvl file conatining the default loading texture. + load.lvl -- .lvl file containing the 'load' bubbles and tips border + texture (and a configuration file that tells the game which + background image to use for which map) \ No newline at end of file diff --git a/src/scripts/addme.lua b/src/scripts/addme.lua index 4024195..f1f609a 100644 --- a/src/scripts/addme.lua +++ b/src/scripts/addme.lua @@ -238,7 +238,7 @@ else end -- A place to attach settings to. --- TODO: Implement Save Settings +-- TODO: Implement Save Settings to .gc file zero_patch_data = { greeting = "Hello"} ScriptCB_DoFile("ifs_missionselect_console") @@ -284,14 +284,14 @@ if( custom_gc_count > 0 ) then print("info: try to localize " .. value.string) display_text = ScriptCB_ununicode( ScriptCB_getlocalizestr(display_text)) if(display_text) then - display_text = "Custom GC: " .. display_text + display_text = display_text end else - display_text = "Custom GC: " .. value.string + display_text = value.string end AddModMenuItem(value.tag, display_text, HandleCustomGC, gc_menu) end - AddModMenuItem("gc_menu", string.format("Custom GC Mods %d", custom_gc_count), gc_menu) + AddModMenuItem("gc_menu", "Custom GC Mods ", gc_menu) end AddModMenuItem( "IA", "Instant Action (alt)", "ifs_missionselect_console") @@ -305,6 +305,7 @@ ifs_mod_menu_tree.SaveSettings = function(this) print("TODO: Implement Save Settings") end +-- keep track of the addon missions, for fun. zero_patch_addon_mission_list = {} -- keep track of mission count @@ -316,5 +317,43 @@ AddDownloadableContent = function(mapLuaFile, missionName, defaultMemoryModelPlu return oldAddDownloadableContent(mapLuaFile, missionName, defaultMemoryModelPlus) end +-- stringify a table into "key:value;" pairs. +-- Won't truncate a key/value pair but will stop serializing key-value pairs +-- when the limit is reached. +local function stringify(data, maxSize) + local retVal = "" + for key, value in data do + retVal = retVal .. string.format("%s:%s;", key,value) + if( maxSize ~= nil and string.len(retVal) > maxSize)then + print("stringify maxSize reached.") + break + end + end + return retVal +end + +-- Plumb through 'zero_patch_data' to ingame +local zeroPatch_original_ScriptCB_EnterMission = ScriptCB_EnterMission +ScriptCB_EnterMission = function() + print("ScriptCB_EnterMission ") + local missionSetup = { } + if ScriptCB_IsMissionSetupSaved() then + missionSetup = ScriptCB_LoadMissionSetup() + end + -- attach the data + missionSetup.zero_patch_data = stringify(zero_patch_data, 200) + ScriptCB_SaveMissionSetup(missionSetup) + print("ScriptCB_EnterMission calling orig ScriptCB_EnterMission ...") + zeroPatch_original_ScriptCB_EnterMission() +end + +local orig_ScriptCB_SaveMissionSetup = ScriptCB_SaveMissionSetup +ScriptCB_SaveMissionSetup = function(missionSetup) + if( missionSetup~= nil and missionSetup.zero_patch_data == nil and zero_patch_data ~= nil) then + missionSetup.zero_patch_data = stringify(zero_patch_data) + end + return orig_ScriptCB_SaveMissionSetup(missionSetup) +end + print("info: platform> " .. ScriptCB_GetPlatform() ) print("zero_patch: End 0/addme.script") diff --git a/src/scripts/fakeconsole_functions.lua b/src/scripts/fakeconsole_functions.lua index ee485cf..211de9f 100644 --- a/src/scripts/fakeconsole_functions.lua +++ b/src/scripts/fakeconsole_functions.lua @@ -281,25 +281,25 @@ function ff_rebuildFakeConsoleList() end, nil ) - -- ff_AddCommand( - -- "Code Console", - -- "", -- no desc because I'm too lazy to adjust the location of the code box so it doesn't overlap - -- function() - -- local temp = function(value) - -- if not value then - -- return - -- end - -- local userFunction = loadstring(value) - -- local result = pcall(userFunction) - -- end - -- ff_AskUser( - -- "Type some valid Lua code for SWBFII and press enter.", - -- temp, - -- ifs_fakeconsole - -- ) - -- end, - -- nil - -- ) + ff_AddCommand( + "Code Console", + "Enter some code", -- no desc because I'm too lazy to adjust the location of the code box so it doesn't overlap + function() + local temp = function(value) + if not value then + return + end + local userFunction = loadstring(value) + local result = pcall(userFunction) + end + ff_AskUser( + "Type some valid Lua code for SWBFII and press enter.", + temp, + ifs_fakeconsole + ) + end, + nil + ) -- ff_AddCommand( -- "Change Your Online Name", -- "This lets you change your multiplayer name. Must rejoin current session, do not use Gamespy login. Does not work on Steam or GOG.", diff --git a/src/scripts/patch_ingame.lua b/src/scripts/patch_ingame.lua index cc595ba..3a02b83 100644 --- a/src/scripts/patch_ingame.lua +++ b/src/scripts/patch_ingame.lua @@ -121,6 +121,32 @@ function trimToFileName(filePath) return fileName end +zero_patch_data ={} + + +function LoadZeroPatchSettings() + print("info: LoadZeroPatchSettings begin") + if ScriptCB_IsMissionSetupSaved() then + local missionSetup = ScriptCB_LoadMissionSetup() + if (missionSetup ~= nil ) then + --print("Mission Setup:"); tprint(missionSetup) + if(missionSetup.zero_patch_data ~= nil) then + for key, value in string.gfind(missionSetup.zero_patch_data, "([A-Za-z0-9_]+):([A-Za-z0-9_]+);") do + print(string.format("info:zero_patch setting: %s:%s",key, tostring(value))) + addIngameMessage(string.format("info:zero_patch setting: %s:%s",key, tostring(value))) + zero_patch_data[key] = tonumber(value) or value + end + end + end + else + print("info: LoadZeroPatchSettings: no mission setup saved") + end + print("info: LoadZeroPatchSettings end") +end + +LoadZeroPatchSettings() + + function Run_uop_UserScripts() local scriptName = "" local files = zero_patch_fs.getFiles("user_script_", {".lvl", ".script"}) From b0b2d58c9b05c6203bbc782c11a9879820de0de7 Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Fri, 26 Apr 2024 19:07:13 -0600 Subject: [PATCH 02/10] batch file fix --- 0/run_after_making_changes_switch.bat | 4 ++-- 0/run_after_making_changes_windows.bat | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/0/run_after_making_changes_switch.bat b/0/run_after_making_changes_switch.bat index f2a42a0..50513ba 100644 --- a/0/run_after_making_changes_switch.bat +++ b/0/run_after_making_changes_switch.bat @@ -19,8 +19,8 @@ if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( ) ) -if /i "%CurrentFolderName%" eq "%ExpectedFolderName2%" ( - echo Checking folders to _lvl_common for Classic Collection... +if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( + echo changing folders to _lvl_common for Classic Collection... :: Set the root directory to start searching from set "root_directory=." diff --git a/0/run_after_making_changes_windows.bat b/0/run_after_making_changes_windows.bat index f5e9b3f..40b977c 100644 --- a/0/run_after_making_changes_windows.bat +++ b/0/run_after_making_changes_windows.bat @@ -18,8 +18,8 @@ if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( ) ) -if /i "%CurrentFolderName%" eq "%ExpectedFolderName2%" ( - echo Checking folders to _lvl_common for Classic Collection... +if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( + echo changing folders to _lvl_common for Classic Collection... :: Set the root directory to start searching from set "root_directory=." From ab964490292c04146bbd2d47fce4f9a3c6a3589f Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sat, 27 Apr 2024 13:01:35 -0600 Subject: [PATCH 03/10] more batch file fixes --- 0/run_after_making_changes_switch.bat | 3 +-- 0/run_after_making_changes_windows.bat | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/0/run_after_making_changes_switch.bat b/0/run_after_making_changes_switch.bat index 50513ba..da8083f 100644 --- a/0/run_after_making_changes_switch.bat +++ b/0/run_after_making_changes_switch.bat @@ -22,10 +22,9 @@ if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( echo changing folders to _lvl_common for Classic Collection... :: Set the root directory to start searching from - set "root_directory=." :: Use dir /b /s /ad to list directories case-insensitively - for /f "delims=" %%D in ('dir /b /s /ad "%root_directory%\*LVL_PC*"') do ( + for /f "delims=" %%D in ('dir /b /s /ad ".\*LVL_PC*"') do ( set "dirName=%%~nxD" set "dirPath=%%~dpD" set "fullPath=%%D" diff --git a/0/run_after_making_changes_windows.bat b/0/run_after_making_changes_windows.bat index 40b977c..8548507 100644 --- a/0/run_after_making_changes_windows.bat +++ b/0/run_after_making_changes_windows.bat @@ -21,10 +21,9 @@ if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( echo changing folders to _lvl_common for Classic Collection... :: Set the root directory to start searching from - set "root_directory=." :: Use dir /b /s /ad to list directories case-insensitively - for /f "delims=" %%D in ('dir /b /s /ad "%root_directory%\*LVL_PC*"') do ( + for /f "delims=" %%D in ('dir /b /s /ad ".\*LVL_PC*"') do ( set "dirName=%%~nxD" set "dirPath=%%~dpD" set "fullPath=%%D" From 387f5eb762c5ce771ba054747e9b4cf7475e730a Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sat, 27 Apr 2024 20:03:02 -0600 Subject: [PATCH 04/10] switching from batch to Windows Script Host (for majority of scripting) --- 0/bin/LowerCaseAllFiles.cs | 94 ------------ 0/bin/LowerCaseAllFiles.exe | Bin 6656 -> 0 bytes 0/bin/about_these_programs.txt | 1 - 0/bin/run_after_changes.js | 191 +++++++++++++++++++++++++ 0/run_after_making_changes_switch.bat | 69 +-------- 0/run_after_making_changes_windows.bat | 54 +------ 6 files changed, 197 insertions(+), 212 deletions(-) delete mode 100644 0/bin/LowerCaseAllFiles.cs delete mode 100644 0/bin/LowerCaseAllFiles.exe create mode 100644 0/bin/run_after_changes.js diff --git a/0/bin/LowerCaseAllFiles.cs b/0/bin/LowerCaseAllFiles.cs deleted file mode 100644 index 747d391..0000000 --- a/0/bin/LowerCaseAllFiles.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace LowerCaseAllFiles -{ - class LowerCaseAllFiles - { - static void Main(string[] args) - { - if (args.Length > 0) - { - PrintHelp(); - return; - } - - DirectoryInfo currentDir = new DirectoryInfo("."); - Console.WriteLine("CurrentDir: "+ currentDir.Name); - if (currentDir.Name != "addon2") - { - //Console.WriteLine("This should only be used from the Battlefront CC addon2 folder, exiting..."); - PrintHelp(); - return; - } - - var allSubDirs = currentDir.GetDirectories("*", SearchOption.TopDirectoryOnly); - foreach (DirectoryInfo di in allSubDirs) - { - if(di.Name != "0") - LowerCaseDirectories(di); - } - } - - private static void PrintHelp() - { - string msg = -@"This program is a companion to the Battlefront Classic Collection mod patch. -Source = https://github.com/Gametoast/ClassicCollectionModPatch - -This program will rename all addon files and folders to lower case. -This should only be necessary for the Nintendo Switch game version. - -It is only to be run from the 'addon2' folder of Battlefront Classic Collection with 0 arguments. -If the current folder is not called 'addon2', no action is taken. -If any arguments are passed, then this help message is printed and no other actions are taken. -"; - Console.WriteLine(msg); - } - - private static void LowerCaseFiles(DirectoryInfo di) - { - var files = di.GetFiles(); - string tmp = ""; - string oldName = ""; - string newName = ""; - string lowerName = ""; - foreach (FileInfo fi in files) - { - lowerName = fi.Name.ToLower(); - if (fi.Name != lowerName) - { - oldName = fi.FullName; - newName = fi.FullName.ToLower(); - tmp = oldName + "_tmp_"; - File.Move(oldName, tmp); - File.Move(tmp, newName); - Console.WriteLine("Renamed to: {0}", newName); - } - } - } - - private static void LowerCaseDirectories(DirectoryInfo di) - { - LowerCaseFiles(di); - string lowerName = ""; - string tmp = ""; - string oldName = di.FullName; - string newName = di.FullName.ToLower(); - lowerName = di.Name.ToLower(); - if (lowerName != di.Name) - { - tmp = di.FullName + "__tmp__"; - Directory.Move(oldName, tmp); - Directory.Move(tmp, newName); - Console.WriteLine("Renamed to: {0}", newName); - } - var allSubDirs = new DirectoryInfo(newName).GetDirectories("*", SearchOption.TopDirectoryOnly); - foreach (DirectoryInfo child in allSubDirs) - LowerCaseDirectories(child); - } - } -} diff --git a/0/bin/LowerCaseAllFiles.exe b/0/bin/LowerCaseAllFiles.exe deleted file mode 100644 index 645bea41e4b75bd5850158af586ddf9153b3e4f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6656 zcmeHLZ)_Y#6@R-v-<_TK+Vize)28X>99lQ2&u1qlP8v6Md`WuX*lz5kf0WAE+Z&&^ z+1tJD?m0Gvk`JY{UrK>|pp}49wJHUqA{0bv1*nJ*R8_wrBt9TTAR&a1nlFIFhlJmo zx%Hjxv<*V4`hhv^+nM*?y!V^;W@cyZ_#@9#8xh6uT)j&4Cf;1eB>iY|9^%v;Z>8vB z$NM|p)F$8GF}G+3M$PvszF9Ra({;VjC<()_yN2x=h3Q$N>Xk*VtE+Qo!}QD%qDifd z3Qyj&5P7>qy0%G665R+6UR=I20Ak=7!^6bDOINs2llb{f=kb8grH#hEB8{*eHYVSz zFJ@8!b|2)*7`nD|WnDQ#v>B}5<%qVe6MbaUScNXtl4#%G(jga$n@pm8~p&<=$j_}IlJeI-g8Ck>geB0eSj3Fk*`7OLtG1xj?PXW zL9fNVH0pgAS7%=agcQTS1G2uGz)&_i8a8%M#r=MWdc2z<+eC>>tS8gH`<`?x-TvZc zN=j?~;M&fKWFICu!k2E}@=&Hd-JXs;XJ3f{+HZFeW%3$vDu6Lf{xG_B#ub!Zkm>XW zWQYmI zcsuAlcCuK&`!d=iFx`9D@k*?W0u$P?n|12o#=o^agv_&d71mVq_1huXmNU5(sw22Pm*@)SG7ZQ zCt$?sq&}?2sV?a^b@uW@ojv|s(mzPfKP27O#?m`MxhR|}qBoL(Upsgj%@{2GIu$Xs zG)nGJttrGyr=5*fjc!8gQls@{wA$#EENeb}%LTf%5sMem*66zpx|J@_cG@B7-I5MU zx?j?9NsE#`AnC)Py=2O|E$QQuu7LK@v!FSkWN&H7e}P`s_t5v~C;C2mo!-$$QGZWA z4C!C=`$4bhWpEO0d*}ta0rVZ((e{|stkJu&-XX2!XcK)4wli4uIl4{KUP*UL{vP@% z`1eZA=Ovw`_rbB~U!Z3xrsXK0F3=~aM|*(I&=P%>V&|iXBOJ0ApgfPFqR~)PB|3QA zE7u)yA5D7agg;>hV%%|#+KvcvVp(kDQZ=wV-?2+HyAp(=O4FssgcZ_p({^bFYaqN| zIJJf_SDdDT?L+SQD@Av~Yub}8n$1Yd76Ij0olGCAscc7l`HQ21VLR`^S{g^)~m)l+t0ms-brtZtV# zT0SNG;F=@nfNu~s+!k!J;(9@7TLBeBsa~m=Yg{QF_BTuxpjihN;A$}Lx1t3@hWLbV z%w<^%nphj7e1Y-}ejfN(V{Q20x8;eRnx3OYC28miO#k(VZgWtNr>J8@57LV_&I1TNIUG_pb2nHSP#(8l5Gzh*0LavY*k^a3@LjE zAz8#G(uJ*e7JMF#C4G!SBl;~uFNA)8!42S7fi1>T$47>@A;vpE$6&9DzKoSogy5}3 zGy%zaJjcN+)66OsM#9gBN9r8BvlRnaIq=G>fw$r|LvJ8DtSf+q<*pp}f<#dU*Oz=1 zTL;{8lE)cf{Gt(;CXxVS<`_BB4ky>46<97o*FcNo%)SEj_oak=`H)4Kn*tur731dV zVIb-}9+d|Jk&Q;P1RchwvZgY`aVbJKnk`KPY77d84}>ms)Xd+7Qd#^rg?CAx0olo;{>##^}rr@ zR`7Q81ak2uq8sL+6=_3%>#G;MU9Y9bzJEmfnOpR|bAi+ajOhOaK3_e6=Q2JImvP`f zFnv$!Xl7 zx&9p24X$l0=Ueoe()kI`Ke8<3IZdA7gvga0zRTbrna_|hCTpJz(dC`Uz%`2hIvBxw ztzUIlnE4R?;x+i(f1MF3_td6FwQ_yLCtQhMcHv0VP!@hf<&!gp!pD(v52k}&& zJC=W(&m8(KbM!&hnhZG~MXO zTQggWMj36S{~fl1#5Mz)e5|R6T5$bH!+OMFiPH_jPq1 zG#eK%0|wk+G+X!G1A(=OyH3zwwJqNZyoIpe@~Q{Spqg76%oYm7|fzq^tE!V0u;z_Y29K&Hcnl*!>yX2h} ze%7el;}))X2;+k31fnr0X=LCUXd>tXYp@?2SPcRc4h}>aLIV^2(@+fcU)oF2M)_&L L^nVPWSOoq92~J;h diff --git a/0/bin/about_these_programs.txt b/0/bin/about_these_programs.txt index d8f6804..087fce1 100644 --- a/0/bin/about_these_programs.txt +++ b/0/bin/about_these_programs.txt @@ -1,7 +1,6 @@ ====== only used for the switch 0 patch ======= -LowerCaseAllFiles.exe -- source code included (LowerCaseAllFiles.cs) luac.exe -- Lua compiler from the BF2 modtools package; used by ScriptMunge.exe ScriptMunge.exe -- Creates .script files (from .lua files) that can be read by BF2. =============================================== diff --git a/0/bin/run_after_changes.js b/0/bin/run_after_changes.js new file mode 100644 index 0000000..346b94a --- /dev/null +++ b/0/bin/run_after_changes.js @@ -0,0 +1,191 @@ +// uses Windows Script Host jScript (.js) support +// cmd> cscript path\to\your\script.js + +// debug with Visual Studio: +// C:\Windows\System32\cscript.exe /x run_after_changes.js +// more about debugging wscript (.vbs, .js) files: +// https://stackoverflow.com/questions/23210905/can-you-debug-vbscript-in-visual-studio/24693127#24693127 + + +var forSwitch = false; +var shell = WScript.CreateObject("WScript.Shell"); +var fso = new ActiveXObject("Scripting.FileSystemObject"); +var currentDir = shell.CurrentDirectory; +var folderNameToFind = "_lvl_pc"; +var folderNameToReplace = "lvl_common"; +var expectedFolder1 = "addon" +var expectedFolder2 = "addon2" + +function print(arg){ + WScript.Echo(arg); +} + +function showMessageBox(message, title){ + // shell.Popup: https://www.vbsedit.com/html/f482c739-3cf9-4139-a6af-3bde299b8009.asp + // WScript.Shell.Popup(strText, [nSecondsToWait], [strTitle], [nType]); + shell.Popup(message, 0, title, 0x0 + 0x40); +} + +function showErrorBox(message, title){ + shell.Popup(message, 0, title, 0x0 + 0x10); +} + +function runProgram(programPath, arguments){ + var command = programPath +" "+ arguments ; + try{ + print("Running: " + command); + shell.run(command, 1, true); + } catch( exception){ + showErrorBox("Error running command:\r\n" + command + + exception + "\r\n" , "Error!"); + } +} + +function endsWith(str, suffix) { + return str.substr(str.length - suffix.length,suffix.length) === suffix; +} + +function writeFile(filePath, contents) { + var file = fso.OpenTextFile(filePath,2, true); + file.Write(contents); + file.Close(); + WScript.Echo("File written successfully: " + filePath); +} + +// rename folders + child folders +function renameFolders(folderToLookUnder) { + var folder = fso.GetFolder(folderToLookUnder); + var subFolders = new Enumerator(folder.SubFolders); + + for (; !subFolders.atEnd(); subFolders.moveNext()) { + var subFolder = subFolders.item(); + if (subFolder.Name.toLowerCase() === folderNameToFind.toLowerCase()) { + var newPath = subFolder.Path.replace(folderNameToFind, folderNameToReplace); + fso.MoveFolder(subFolder.Path, newPath); + print("Renamed: to " + newPath); + } + renameFolders(subFolder.Path); + } +} + +// Gets all the files under the given folder, populates the fileList array. +// folder: a folder file system object (fso.GetFolder(path)) +// fileList: a JavaScript array, initially should be empty. +function getAllFiles(folder, fileList) { + var file, files = new Enumerator(folder.files); + for (; !files.atEnd(); files.moveNext()) { + file = files.item(); + fileList.push(file.Path); + } + var subFolders = new Enumerator(folder.SubFolders); + for (; !subFolders.atEnd(); subFolders.moveNext()) { + getAllFiles(subFolders.item(), fileList); + } +} + +function writeFakeFileSystem(){ + var folder = fso.GetFolder("."), + allFiles = []; + + getAllFiles(folder, allFiles); + var luaFileContent = "zero_patch_files_string = [[\r\n"; + for(var i =0; i < allFiles.length; i++){ + luaFileContent += allFiles[i] +"\r\n"; + } + luaFileContent += "]]\r\n"; + writeFile("0\\patch_scripts\\fs.lua", luaFileContent); +} + +// ===================== used for switch ============================== +function lowerCaseFiles(strDirectory) { + var fso = new ActiveXObject("Scripting.FileSystemObject"); + var folder = fso.GetFolder(strDirectory); + var files = new Enumerator(folder.Files); + var file, tmp, oldName, newName, lowerName; + + for (; !files.atEnd(); files.moveNext()) { + file = files.item(); + lowerName = file.Name.toLowerCase(); + if (file.Name != lowerName) { + oldName = file.Path; + newName = fso.BuildPath(file.ParentFolder, lowerName); + tmp = oldName + "_tmp_"; + fso.MoveFile(oldName, tmp); + fso.MoveFile(tmp, newName); + print("Renamed to: " + newName); + } + } +} + +function lowerCaseDirectories(strDirectory) { + var fso = new ActiveXObject("Scripting.FileSystemObject"); + var folder = fso.GetFolder(strDirectory); + var subFolders = new Enumerator(folder.SubFolders); + var lowerName = folder.Name.toLowerCase(); + var oldName = folder.Path; + var newName = fso.BuildPath(folder.ParentFolder, lowerName); + var tmp; + + lowerCaseFiles(strDirectory); + + if (folder.Name != lowerName) { + tmp = oldName + "__tmp__"; + fso.MoveFolder(oldName, tmp); + fso.MoveFolder(tmp, newName); + print("Renamed to: " + newName); + } + + folder = fso.GetFolder(newName); + subFolders = new Enumerator(folder.SubFolders); + for (; !subFolders.atEnd(); subFolders.moveNext()) { + lowerCaseDirectories(subFolders.item().Path); + } +} +// ===================== used for switch end ============================== + +// start of script functionality + +print("Current Dir> " + currentDir); + +// make sure we're in a good folder. +if(endsWith(currentDir,"addon") || endsWith(currentDir,"addon2")){ + print("Current folder is an addon folder, nice."); +} else { + showErrorBox("Current folder is NOT an addon folder! Exiting!!", "Error!"); + WScript.Quit(1); +} + +// running for the switch version? +for(var i = 0; i < WScript.Arguments.length; i++){ + if(WScript.Arguments(i).toLowerCase() === "-switch" ){ + forSwitch = true; + print("will do switch specific lower-case operation"); + } +} + +// Start the renaming process from the current directory +if(endsWith(currentDir,"addon2")){ + print("Check for folders to rename..."); + renameFolders(currentDir); + + if(forSwitch){ + print("Lower-case the files for switch.") + lowerCaseDirectories(currentDir); + } +} + +print("Create the fake file system") +writeFakeFileSystem(); + +if(forSwitch){ + print("Creating fs.script for the switch version") + runProgram("0\\bin\\ScriptMunge.exe", + " -sourcedir 0\\patch_scripts\\ -inputfile fs.lua -outputdir 0\\patch_scripts\\ "); + // verify file exists "0\\patch_scripts\\fs.script" + if(!fso.FileExists("0\\patch_scripts\\fs.script")){ + showErrorBox("'0\\patch_scripts\\fs.script' was not created by scriptmunge", "Error!"); + WScript.Quit(1); + } +} + +print("Done") diff --git a/0/run_after_making_changes_switch.bat b/0/run_after_making_changes_switch.bat index da8083f..10acc62 100644 --- a/0/run_after_making_changes_switch.bat +++ b/0/run_after_making_changes_switch.bat @@ -1,66 +1,3 @@ -@echo off -setlocal EnableDelayedExpansion - - -set "ExpectedFolderName=addon" -set "ExpectedFolderName2=addon2" - -:: Extract the name of the directory where the batch file is located -for %%I in ("%~dp0.") do set "CurrentFolderName=%%~nxI" - -:: Compare the current folder name to the expected one -if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( - if /i "%CurrentFolderName%" neq "%ExpectedFolderName2%" ( - :: If not matching, display a message box using VBScript - >"%temp%\tempmessage.vbs" echo MsgBox "This batch file needs to run from a folder called '%ExpectedFolderName%'. Please ensure it is located in the correct folder and try again.", 0 + 48, "Incorrect Folder" - wscript.exe "%temp%\tempmessage.vbs" - del "%temp%\tempmessage.vbs" - exit /b - ) -) - -if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( - echo changing folders to _lvl_common for Classic Collection... - :: Set the root directory to start searching from - - :: Use dir /b /s /ad to list directories case-insensitively - for /f "delims=" %%D in ('dir /b /s /ad ".\*LVL_PC*"') do ( - set "dirName=%%~nxD" - set "dirPath=%%~dpD" - set "fullPath=%%D" - - :: Check if the directory name matches _LVL_PC - if /i "!dirName!"=="_LVL_PC" ( - :: Attempt to rename _LVL_PC to _LVL_COMMON - ren "!fullPath!" "_lvl_common" - if !ERRORLEVEL! equ 0 ( - echo Renamed: !dirName! to _lvl_common - ) else ( - echo Failed to rename: !dirName! - ) - ) - ) -) - -REM ====================ONLY FOR SWITCH START ================= -REM ====================ONLY FOR SWITCH START ================= -REM ====================ONLY FOR SWITCH START ================= - -REM This will take all files under this folder to lower-case -"0\bin\LowerCaseAllFiles.exe" - -REM ====================ONLY FOR SWITCH END =================== -REM ====================ONLY FOR SWITCH END =================== -REM ====================ONLY FOR SWITCH END =================== - - -echo zero_patch_files_string = [[ > "0\\patch_scripts\\fs.lua" - -dir /b /s * >> "0\\patch_scripts\\fs.lua" - -echo ]] >> "0\\patch_scripts\\fs.lua" - -REM gotta munge fs.lua for switch -0\bin\ScriptMunge.exe -sourcedir 0\patch_scripts\ -inputfile fs.lua -outputdir 0\patch_scripts\ -checkdate -continue -move ScriptMunge.log 0\patch_scripts\ -endlocal +:: to debug with visual studio do: +:: cscript /x "0\\bin\\run_after_changes.js" -switch +cscript "0\\bin\\run_after_changes.js" -switch diff --git a/0/run_after_making_changes_windows.bat b/0/run_after_making_changes_windows.bat index 8548507..a083589 100644 --- a/0/run_after_making_changes_windows.bat +++ b/0/run_after_making_changes_windows.bat @@ -1,52 +1,4 @@ -@echo off -setlocal EnableDelayedExpansion - -set "ExpectedFolderName=addon" -set "ExpectedFolderName2=addon2" - -:: Extract the name of the directory where the batch file is located -for %%I in ("%~dp0.") do set "CurrentFolderName=%%~nxI" - -:: Compare the current folder name to the expected one -if /i "%CurrentFolderName%" neq "%ExpectedFolderName%" ( - if /i "%CurrentFolderName%" neq "%ExpectedFolderName2%" ( - :: If not matching, display a message box using VBScript - >"%temp%\tempmessage.vbs" echo MsgBox "This batch file needs to run from a folder called '%ExpectedFolderName%'. Please ensure it is located in the correct folder and try again.", 0 + 48, "Incorrect Folder" - wscript.exe "%temp%\tempmessage.vbs" - del "%temp%\tempmessage.vbs" - exit /b - ) -) - -if /i "%CurrentFolderName%" equ "%ExpectedFolderName2%" ( - echo changing folders to _lvl_common for Classic Collection... - :: Set the root directory to start searching from - - :: Use dir /b /s /ad to list directories case-insensitively - for /f "delims=" %%D in ('dir /b /s /ad ".\*LVL_PC*"') do ( - set "dirName=%%~nxD" - set "dirPath=%%~dpD" - set "fullPath=%%D" - - :: Check if the directory name matches _LVL_PC - if /i "!dirName!"=="_LVL_PC" ( - :: Attempt to rename _LVL_PC to _LVL_COMMON - ren "!fullPath!" "_lvl_common" - if !ERRORLEVEL! equ 0 ( - echo Renamed: !dirName! to _lvl_common - ) else ( - echo Failed to rename: !dirName! - ) - ) - ) -) - -echo zero_patch_files_string = [[ > "0\\patch_scripts\\fs.lua" - - -dir /b /s * >> "0\\patch_scripts\\fs.lua" - -echo ]] >> "0\\patch_scripts\\fs.lua" - -endlocal +:: to debug with visual studio do: +:: cscript /x "0\\bin\\run_after_changes.js" +cscript "0\\bin\\run_after_changes.js" From ed734d7a29001381fc44994e9844ff2f2637f44a Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sat, 27 Apr 2024 23:23:05 -0600 Subject: [PATCH 05/10] Get mouse hotspots and sliders showing --- src/scripts/ifs_fakeconsole_zero_patch.lua | 33 +++++++++++++--------- src/scripts/ifs_ingame_log.lua | 9 ++++-- src/scripts/ifs_missionselect_console.lua | 19 ++++++++++++- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/scripts/ifs_fakeconsole_zero_patch.lua b/src/scripts/ifs_fakeconsole_zero_patch.lua index 9c8a5e6..95bf3a8 100644 --- a/src/scripts/ifs_fakeconsole_zero_patch.lua +++ b/src/scripts/ifs_fakeconsole_zero_patch.lua @@ -18,7 +18,10 @@ function Fakeconsole_Listbox_CreateItem(layout) NewIFContainer { x = layout.x - 0.5 * insidewidth, y = layout.y + 2, - bInertPos = 1 + bInertPos = 1, + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, } local FontHeight = fakeconsole_listbox_layout.fontheight Temp.showstr = @@ -459,15 +462,16 @@ end -- } -- end fakeconsole_listbox_layout = { -yHeight = 330, -- 22 -ySpacing = 0, -showcount = 22, -- 13 -font = "gamefont_small", -width = 400, -- 208 -x = 0, -slider = 1, -CreateFn = Fakeconsole_Listbox_CreateItem, -PopulateFn = Fakeconsole_Listbox_PopulateItem, + bCreateSlider = true, + yHeight = 330, -- 22 + ySpacing = 0, + showcount = 22, -- 13 + font = "gamefont_small", + width = 400, -- 208 + x = 0, + slider = 1, + CreateFn = Fakeconsole_Listbox_CreateItem, + PopulateFn = Fakeconsole_Listbox_PopulateItem, } gConsoleCmdList = {} @@ -539,11 +543,14 @@ ifs_fakeconsole = end, Input_KeyDown = function(this, iKey) if (iKey == 27) then -- handle Escape - this:Input_Back() + if(ScriptCB_CheckProfanity == nil) then + -- do not do this for Aspyr's game version + this:Input_Back() + end -- AnthonyBF2 3/17/2024 -- Asypr's game doesn't know how to unpause from console so we have to hand hold it - ScriptCB_PopScreen() - ScriptCB_Unpause() + --ScriptCB_PopScreen() + --ScriptCB_Unpause() end --[[ Keys that are handled in the ifs scripts: diff --git a/src/scripts/ifs_ingame_log.lua b/src/scripts/ifs_ingame_log.lua index 6824e90..9bf470f 100644 --- a/src/scripts/ifs_ingame_log.lua +++ b/src/scripts/ifs_ingame_log.lua @@ -97,15 +97,17 @@ function ingamekeys_Listbox_PopulateItem(Dest, Data, bSelected, iColorR, iColorG IFObj_fnSetVis(Dest,Data) -- Show if there are contents end +local scrnW, scrnH = ScriptCB_GetScreenInfo() ingamekeys_listbox_layout = { -- Height is calculated from yHeight, Spacing, showcount. yHeight = 22, ySpacing = 0, showcount = 20, - --font = gListboxItemFont, + bCreateSlider = true, font = "gamefont_tiny", - width = 900,--320, + --width = 900,--320, + width = scrnW *0.7, x = 0, slider = 1, CreateFn = ingamekeys_Listbox_CreateItem, @@ -315,7 +317,8 @@ if gPlatformStr == "PC" then elseif ifs_ingame_log.fromPauseMenu then -- from pause menu - if iKey == 27 then + if iKey == 27 and ScriptCB_CheckProfanity == nil then + -- do not do this for Aspyr's game version --pressed ESC, exit the screen -- go back to pause menu ScriptCB_SndPlaySound("shell_menu_exit"); diff --git a/src/scripts/ifs_missionselect_console.lua b/src/scripts/ifs_missionselect_console.lua index b63425b..2c6264c 100644 --- a/src/scripts/ifs_missionselect_console.lua +++ b/src/scripts/ifs_missionselect_console.lua @@ -51,7 +51,11 @@ function ifs_ms_MapList_CreateItem_console(layout) local Temp = NewIFContainer { x = layout.x - 0.5 * layout.width, y = layout.y, + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, } + Temp.map = NewIFText { x = 8, @@ -72,6 +76,9 @@ function ifs_ms_ModeList_CreateItem_console(layout) local Temp = NewIFContainer { x = layout.x - 0.5 * layout.width, y = layout.y, + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, } local IconHeight = layout.height * 0.75 @@ -95,7 +102,6 @@ function ifs_ms_ModeList_CreateItem_console(layout) localpos_t = (IconHeight * -0.5) + 2, localpos_b = (IconHeight * 0.5) + 2, } - return Temp end @@ -106,6 +112,9 @@ function ifs_ms_EraList_CreateItem_console(layout) local Temp = NewIFContainer { x = layout.x - 0.5 * layout.width, y = layout.y, + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, } local IconHeight = layout.height * 0.375 @@ -342,6 +351,7 @@ end ifs_ms_MapList_layout_console = { name = "ifs_ms_MapList_layout_console", + bCreateSlider = true, showcount = 10, -- yTop = -130 + 13, -- auto-calc'd now yHeight = 20, @@ -355,6 +365,7 @@ ifs_ms_MapList_layout_console = { ifs_ms_ModeList_layout_console = { name="ifs_ms_ModeList_layout_console", + bCreateSlider = true, showcount = 10, -- yTop = -130 + 13, -- auto-calc'd now yHeight = 20, @@ -368,6 +379,7 @@ ifs_ms_ModeList_layout_console = { ifs_ms_EraList_layout_console = { name = "ifs_ms_EraList_layout_console", + bCreateSlider = true, showcount = 10, -- showcount = 3, -- yTop = -130 + 13, -- auto-calc'd now @@ -382,6 +394,7 @@ ifs_ms_EraList_layout_console = { ifs_ms_PlayList_layout_console = { name ="ifs_ms_PlayList_layout_console", + bCreateSlider = true, showcount = 7, -- yTop = -130 + 13, -- auto-calc'd now yHeight = 22, @@ -1113,6 +1126,10 @@ ifs_missionselect_console = NewIFShellScreen { ----------------------------------- end, -- end of Input_Accept + HandleMouse = function(this, x, y) + gHandleMouse(this,x,y) + ifs_missionselect_console_fnUpdateInfoBoxes(this) + end, Input_Back = function(this) print("ifs_missionselect_console.Input_Back: iState=".. tostring(this.iState)) From ef826ad132e8804377b285d44735f3c32fb23596 Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sun, 28 Apr 2024 00:17:09 -0600 Subject: [PATCH 06/10] mouse working a little better. --- src/scripts/ifs_missionselect_console.lua | 53 +++++++++++++++-------- src/scripts/ifs_mod_menu_tree.lua | 41 +++++++++++++++--- src/scripts/patch_paths.lua | 17 ++++++-- 3 files changed, 82 insertions(+), 29 deletions(-) diff --git a/src/scripts/ifs_missionselect_console.lua b/src/scripts/ifs_missionselect_console.lua index 2c6264c..83f09fd 100644 --- a/src/scripts/ifs_missionselect_console.lua +++ b/src/scripts/ifs_missionselect_console.lua @@ -1049,26 +1049,43 @@ ifs_missionselect_console = NewIFShellScreen { return end - -- Mouse Support + -- Mouse Support code + -- (from ifs_missionselect_pcmulti) if(gMouseListBox) then - print("ifs_missionselect_console: Got Mouse click") - --tprint(gMouseListBox.Layout) - if(gMouseListBox and gMouseListBox.Layout and gMouseListBox.Layout.name) then - print("Clicked list box: ",gMouseListBox.Layout.name) + if( ( gMouseListBox == this.ModeListbox ) or + ( gMouseListBox == this.MapListbox ) or + ( gMouseListBox == this.EraListbox ) ) then + --this.bClicked = 1 + if( ( gMouseListBox.Layout.SelectedIdx == gMouseListBox.Layout.CursorIdx ) and + ( this.lastDoubleClickTime ) and + ( ScriptCB_GetMissionTime() " .. arg[1] - msg = "info: redirect -> " .. arg[1] + msg = " redirect -> " .. arg[1] end -- We'll re-direct calls to the _lvl_common folder when the asset exists in _lvl_common @@ -73,8 +72,7 @@ function redirectBF2Path(func) local commonTest = string.gsub(arg_1, "\\_lvl_pc\\", "\\_lvl_common\\") if( THE_ORIGINAL_ScriptCB_IsFileExist(arg_1) == 0 and THE_ORIGINAL_ScriptCB_IsFileExist(commonTest) == 1) then arg[1] = commonTest - --msg = "info: " .. __scriptName__ .. " Redirecting to " .. arg[1] - msg = "info: redirect -> " .. arg[1] + msg = "redirect -> " .. arg[1] end end if(msg) then @@ -150,6 +148,17 @@ end -- return old_ReadDataFile(unpack(arg)) --end +--local old_ScriptCB_PushScreen = ScriptCB_PushScreen +--ScriptCB_PushScreen = function(screenName) +-- print("ScriptCB_PushScreen: " .. screenName) +-- old_ScriptCB_PushScreen(screenName) +--end +--local old_ScriptCB_SetIFScreen = ScriptCB_SetIFScreen +--ScriptCB_SetIFScreen = function(screenName) +-- print("ScriptCB_SetIFScreen: ".. screenName) +-- return old_ScriptCB_SetIFScreen(screenName) +--end + -- This does not work. Find a better solution asap. --[[ load core again for custom localization if ScriptCB_IsFileExist("dc:core.lvl") == 1 then From 17f0a852744526d55c3995a6afa73c13125137ce Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sun, 28 Apr 2024 08:56:09 -0600 Subject: [PATCH 07/10] added debug log command to fake console --- src/scripts/fakeconsole_functions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scripts/fakeconsole_functions.lua b/src/scripts/fakeconsole_functions.lua index 211de9f..e76cad3 100644 --- a/src/scripts/fakeconsole_functions.lua +++ b/src/scripts/fakeconsole_functions.lua @@ -300,6 +300,14 @@ function ff_rebuildFakeConsoleList() end, nil ) + ff_AddCommand( + "Debug Log", + "View Debug Log", + function() + ScriptCB_PushScreen("ifs_ingame_log") + end, + nil + ) -- ff_AddCommand( -- "Change Your Online Name", -- "This lets you change your multiplayer name. Must rejoin current session, do not use Gamespy login. Does not work on Steam or GOG.", From c430303dd97d905ceca96cbdffbaef5c9911f96a Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sun, 28 Apr 2024 12:39:49 -0600 Subject: [PATCH 08/10] mod menu mouse interaction ==> fixed --- src/scripts/ifs_mod_menu_tree.lua | 56 +++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/src/scripts/ifs_mod_menu_tree.lua b/src/scripts/ifs_mod_menu_tree.lua index 9eb3a2b..4277e52 100644 --- a/src/scripts/ifs_mod_menu_tree.lua +++ b/src/scripts/ifs_mod_menu_tree.lua @@ -15,8 +15,10 @@ function ifs_mod_menu_tree_listbox_CreateItem(layout) x = layout.x - 0.5 * layout.width, y=layout.y - 10, bHotspot = true, - fHotspotH = layout.yHeight, + fHotspotH = layout.height, fHotspotW = layout.width, + fHotspotX = 0, + fHotspotY = -layout.height /2, } Temp.NameStr = NewIFText{ @@ -286,34 +288,52 @@ ifs_mod_menu_tree = NewIFShellScreen { Input_Accept = function(this) - print("ifs_mod_menu_tree.Accept CurButton", tostring(this.CurButton) ) - -- we want to 'debounce' menu selection; if you hold down the button while going into a menu you - -- get another 'accept' - local theTime = ScriptCB_GetMissionTime() - if( (theTime - this.timeOfLastAction) < 0.700 ) then - --print("ifs_mod_menu_tree: debounce selection") + -- If base class handled this work, then we're done + if(gShellScreen_fnDefaultInputAccept(this,1)) then + -- this code chunk helps/makes slider function return end - this.timeOfLastAction = theTime - if(gMouseListBoxSlider) then - ListManager_fnScrollbarClick(gMouseListBoxSlider) - return 1 -- note we did all the work - end + print("ifs_mod_menu_tree.Accept CurButton", tostring(this.CurButton) ) if(gMouseListBox) then - -- Mouse Support; works on normal BF2; CC changed mouse stuff print( string.format("ifs_mod_menu_tree: Got Mouse click, update selected idx from %s to %s", tostring(gMouseListBox.Layout.SelectedIdx) , tostring(gMouseListBox.Layout.CursorIdx) ) ) - -- set the selection - if(gMouseListBox.Layout.SelectedIdx ~= gMouseListBox.Layout.CursorIdx) then + --gMouseListBox.Layout.SelectedIdx = gMouseListBox.Layout.CursorIdx + if( ( gMouseListBox.Layout.SelectedIdx == gMouseListBox.Layout.CursorIdx ) and + ( this.lastDoubleClickTime ) and + ( ScriptCB_GetMissionTime() Date: Sun, 28 Apr 2024 13:06:24 -0600 Subject: [PATCH 09/10] mouse working better, but mouse curser dissapears on ingame log and missionselect console. --- src/scripts/ifs_ingame_log.lua | 28 +++++++++++++++++++++-- src/scripts/ifs_missionselect_console.lua | 23 ++++++++++++------- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/src/scripts/ifs_ingame_log.lua b/src/scripts/ifs_ingame_log.lua index 9bf470f..a682929 100644 --- a/src/scripts/ifs_ingame_log.lua +++ b/src/scripts/ifs_ingame_log.lua @@ -61,7 +61,12 @@ function ingamekeys_Listbox_CreateItem(layout) local Temp = NewIFContainer { x = layout.x - 0.5 * insidewidth, y = layout.y + 2, - bInertPos = 1, + --bInertPos = 1, --- what's this do ??? + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, + fHotspotX = 0, + fHotspotY = -layout.height /2, } local FontHeight = ingamekeys_listbox_layout.fontheight Temp.showstr = NewIFText{ @@ -237,6 +242,25 @@ ifs_ingame_log = NewIFShellScreen { ListManager_fnFillContents(ifs_ingame_log.listbox,gInGameDebugList, ingamekeys_listbox_layout) end, + HandleMouse = function(this, x, y) + gHandleMouse(this,x,y) + end, + + Input_Accept = function(this) + -- If base class handled this work, then we're done + if(gShellScreen_fnDefaultInputAccept(this,1)) then + -- this code chunk helps/makes slider function + return + end + + if(gMouseListBox) then + if(gMouseListBox.Layout.SelectedIdx ~= gMouseListBox.Layout.CursorIdx) then + gMouseListBox.Layout.SelectedIdx = gMouseListBox.Layout.CursorIdx + ListManager_fnMoveCursor(this.listbox,ifs_mod_menu_tree_listbox_layout) + end + end + end, + --Back button quits this screen Input_Back = function(this) --TODO this doesn't seem to trigger on PC @@ -333,7 +357,7 @@ end function ifs_ingamekeys_fnBuildScreen(this) ingamekeys_listbox_layout.fontheight = ScriptCB_GetFontHeight(ingamekeys_listbox_layout.font) ingamekeys_listbox_layout.yHeight = ingamekeys_listbox_layout.fontheight - + this.listbox = NewButtonWindow { ZPos = 200, x = 0, y = 0, --ScreenRelativeX = 0.9, -- mostly right diff --git a/src/scripts/ifs_missionselect_console.lua b/src/scripts/ifs_missionselect_console.lua index 83f09fd..bcf4911 100644 --- a/src/scripts/ifs_missionselect_console.lua +++ b/src/scripts/ifs_missionselect_console.lua @@ -54,6 +54,8 @@ function ifs_ms_MapList_CreateItem_console(layout) bHotspot = true, fHotspotH = layout.height, fHotspotW = layout.width, + fHotspotX = 0, + fHotspotY = -layout.height /2, } @@ -78,7 +80,9 @@ function ifs_ms_ModeList_CreateItem_console(layout) y = layout.y, bHotspot = true, fHotspotH = layout.height, + fHotspotX = 0, fHotspotW = layout.width, + fHotspotY = -layout.height /2, } local IconHeight = layout.height * 0.75 @@ -115,6 +119,8 @@ function ifs_ms_EraList_CreateItem_console(layout) bHotspot = true, fHotspotH = layout.height, fHotspotW = layout.width, + fHotspotX = 0, + fHotspotY = -layout.height /2, } local IconHeight = layout.height * 0.375 @@ -149,6 +155,11 @@ function ifs_ms_PlayList_CreateItem_console(layout) local Temp = NewIFContainer { x = layout.x - 0.5 * layout.width, y = layout.y, + bHotspot = true, + fHotspotH = layout.height, + fHotspotW = layout.width, + fHotspotX = 0, + fHotspotY = -layout.height /2, } local HAlign = "left" @@ -1035,17 +1046,11 @@ ifs_missionselect_console = NewIFShellScreen { Input_Accept = function(this) print("ifs_missionselect_console.Input_Accept: this.CurButton:" .. tostring(this.CurButton)) - print("ifs_missionselect_console.Input_Accept: iState: " .. this.iState) - - local debug1 = nil - if( gMouseListBox and gMouseListBox.Layout and gMouseListBox.Layout.name ~= nil) then - debug1 = gMouseListBox.Layout.name - end - print("ifs_missionselect_console.Input_Accept: Listbox: " .. tostring(debug1) ) + --print("ifs_missionselect_console.Input_Accept: iState: " .. this.iState) -- If base class handled this work, then we're done if(gShellScreen_fnDefaultInputAccept(this,1)) then - print("ifs_missionselect_console: handled, early return") + -- this code chunk helps/makes slider function return end @@ -1067,6 +1072,7 @@ ifs_missionselect_console = NewIFShellScreen { -- single clicked this.iLastClickTime = ScriptCB_GetMissionTime() gMouseListBox.Layout.SelectedIdx = gMouseListBox.Layout.CursorIdx + ListManager_fnMoveCursor(gMouseListBox,gMouseListBox.Layout) end end @@ -1082,6 +1088,7 @@ ifs_missionselect_console = NewIFShellScreen { else this.lastDoubleClickTime = ScriptCB_GetMissionTime() gMouseListBox.Layout.SelectedIdx = gMouseListBox.Layout.CursorIdx + ListManager_fnMoveCursor(gMouseListBox,gMouseListBox.Layout) --ListManager_fnFillContents(gMouseListBox,gMouseListBox.Contents,gMouseListBox.Layout) --start to play the movie --ifs_missionselect_pcMulti_fnSetMapPreview(this) From ee915147b592cd78f5ae196252dea65f62a3c139 Mon Sep 17 00:00:00 2001 From: BAD-AL Date: Sun, 28 Apr 2024 14:49:17 -0600 Subject: [PATCH 10/10] load/save not working; for inspection purposes currently --- src/patch_shell.req | 1 + src/scripts/addme.lua | 5 +- src/scripts/load_save.lua | 545 ++++++++++++++++++++++++++++++++++++ src/scripts/patch_shell.lua | 2 + 4 files changed, 552 insertions(+), 1 deletion(-) create mode 100644 src/scripts/load_save.lua diff --git a/src/patch_shell.req b/src/patch_shell.req index 907db6e..2245dcc 100644 --- a/src/patch_shell.req +++ b/src/patch_shell.req @@ -6,6 +6,7 @@ ucft "patch_shell" "zero_patch_fs" "ifs_ingame_log" + "load_save" } REQN diff --git a/src/scripts/addme.lua b/src/scripts/addme.lua index f1f609a..80dbfaf 100644 --- a/src/scripts/addme.lua +++ b/src/scripts/addme.lua @@ -302,7 +302,10 @@ AddModMenuItem("spacetraining", "Space Training", "ifs_spacetraining") -- add ba AddModMenuItem("ifs_ingame_log", "Debug Log", "ifs_ingame_log") ifs_mod_menu_tree.SaveSettings = function(this) - print("TODO: Implement Save Settings") + print("ifs_mod_menu_tree.SaveSettings called") + rema_database.data = zero_patch_data + -- from load_save.lua + SaveSettings() end -- keep track of the addon missions, for fun. diff --git a/src/scripts/load_save.lua b/src/scripts/load_save.lua new file mode 100644 index 0000000..37b63e2 --- /dev/null +++ b/src/scripts/load_save.lua @@ -0,0 +1,545 @@ +------------------------------------------------------------------ + +-- SWBF 2 Remaster by Anakin (<-- original author) +-- sourced from: https://github.com/Gametoast/data_Remaster/blob/main/CustomLVL/scripts/interface/load_save.lua +-- modified by (BAD_AL) for zero patch settings +------------------------------------------------------------------ + +-- Note: 'ifs_saveop' binary equal in GOG game +-- CC ifs_saveop.ifs_saveop_SaveProfileDone, ifs_saveop.ifs_saveop_StartPromptSave are gutted + +local remaIOfilename = "RemasterGlobalSettings" +local remaInstFilename = "RemasterInstOpt" +rema_database = {} +------------------------------------------------------------------ +-- wrap AddIFScreen +-- install backdoor in ifs_saveop.Exit +local remaIO_AddIFScreen = AddIFScreen +AddIFScreen = function(table, name,...) + + -- instal backdoor to avoid errors + if name == "ifs_saveop" then + + -- backup old function + local remaIO_saveopExit = ifs_saveop.Exit + + -- wrap ifs_saveop.Exit + ifs_saveop.Exit = function(this, bFwd) + + --rema_pauseHook = false + --rema_SaveSettingState() + + -- instal backdoor + if this.beSneaky then + + local b1 = this.NoPromptSave + local b2 = this.profile1 + local b3 = this.profile2 + local b4 = this.profile3 + local b5 = this.profile4 + local b6 = this.filename1 + local b7 = this.bFromCancel + local b8 = this.FromOverwrite + local b9 = this.ForceSaveFailedMessage + local b10 = this.saveProfileNum + local b11 = this.saveName + local b12 = this.OnSuccess + local b13 = this.OnCancel + local b14 = this.doOp + + -- let the original function happen.. + local remaIO_return = {remaIO_saveopExit(this, bFwd)} + + this.NoPromptSave = b1 + this.profile1 = b2 + this.profile2 = b3 + this.profile3 = b4 + this.profile4 = b5 + this.filename1 = b6 + this.bFromCancel = b7 + this.FromOverwrite = b8 + this.ForceSaveFailedMessage = b9 + this.saveProfileNum = b10 + this.saveName = b11 + this.OnSuccess = b12 + this.OnCancel = b13 + this.doOp = b14 + + -- ..but restore the data before return + return unpack(remaIO_return) + end + + -- let the original function happen + return remaIO_saveopExit(this, bFwd) + end + + -- overwrite ifs_saveop_StartPromptMetagameOverwrite() + function ifs_saveop_StartPromptMetagameOverwrite() + + local this = ifs_saveop + + -- is there a current metagame filename? + local metagame_exist = nil + if( this.filename1 ) then + metagame_exist = ScriptCB_DoesMetagameExistOnCard(this.filename1) + end + + if( (not this.filename1) or (not metagame_exist) or ifs_saveop.beSneaky) then + -- nope, just skip the confirmation + ifs_saveop_MetagameOverwritePromptDone(1) + return + end + + -- show the yes/no popup + Popup_YesNo.CurButton = "no" -- default + Popup_YesNo.fnDone = ifs_saveop_MetagameOverwritePromptDone + Popup_YesNo:fnActivate(1) + gPopup_fnSetTitleStr(Popup_YesNo, ifs_saveop.PlatformBaseStr .. ".save25") + end + end + + -- let the original function happen + return remaIO_AddIFScreen(table, name, unpack(arg)) +end + +------------------------------------------------------------------ +-- wrap ScriptCB_PushScreen +-- load settings before ifs_boot +-- refresh instant options +local remaIO_PushScreen = ScriptCB_PushScreen +ScriptCB_PushScreen = function(name,...) + + if name == "ifs_boot" then + print("info: Start Load process") + swbf2Remaster_settingsManager("load", + function(failure) + swbf2Remaster_dataIntegrityTest(failure) + print("remaster load_save: tried to load settings got message: " .. tostring(failure)) + --if( failure ~= nil) then + -- SaveSettings() + --end + remaIO_PushScreen("ifs_boot") + end) + else + remaIO_PushScreen(name, unpack(arg)) + end +end + + +------------------------------------------------------------------ +-- wrap SetState +-- put database on the pipe +if SetState then + + local remaIO_setState = SetState + + SetState = function(...) + + -- we only need this data + local lite_databse = { + isRemaDatabase = true, + data = rema_database.data, + } + + if ScriptCB_IsMetagameStateSaved() then + -- there is old data + local temp = {ScriptCB_LoadMetagameState()} + + ScriptCB_SaveMetagameState( + lite_databse, + temp[1], + temp[2], + temp[3], + temp[4], + temp[5], + temp[6], + temp[7], + temp[8], + temp[9], + temp[10], + temp[11], + temp[12], + temp[13], + temp[14], + temp[15], + temp[16], + temp[17], + temp[18], + temp[19], + temp[20], + temp[21], + temp[22], + temp[23], + temp[24], + temp[25], + temp[26] + ) + + else + -- there is no old data + ScriptCB_SaveMetagameState(lite_databse) + end + + return remaIO_setState(unpack(arg)) + end +else + print("Remaster: Error") + print(" : SetState not found") +end + + +------------------------------------------------------------------ +-- new functions + +function swbf2Remaster_dataIntegrityTest(failure) + + -- if there were any errors while loading, print them + if failure then + print("Remaster: settings error, ", failure) + end + + -- check if all data is there + if rema_database.data == nil then + print("Remaster: data integrity test failed, loading default..") + rema_database = swbf2Remaster_getDefaultSettings() + end +end + + +function swbf2Remaster_getDefaultSettings() + + return { data = {}, } +end + +function swbf2Remaster_loadSettings(nameIO, nameInst, funcDone, loadInstOpt) + print(string.format("swbf2Remaster_loadSettings: nameIO: %s ; nameInst: %s loadInstOpt: %s", + tostring(nameIO), tostring(nameInst), tostring(loadInstOpt))) + ifs_saveop.doOp = "LoadMetagame" + ifs_saveop.NoPromptSave = 1 + ifs_saveop.beSneaky = 1 + + if loadInstOpt == nil then + + ifs_saveop.filename1 = nameIO + + ifs_saveop.OnSuccess = function() + + ScriptCB_PopScreen() + + rema_database = ScriptCB_LoadMetagameState() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + swbf2Remaster_loadSettings(nameIO, nameInst, funcDone, true) + end + + ifs_saveop.OnCancel = function() + print("Remaster: loading settings failed, loading default..") + ScriptCB_PopScreen() + + rema_database = swbf2Remaster_getDefaultSettings() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone("loading failed, loading default instead") + end + + else + + if nameInst == nil then + print("Remaster: missing instant options, loading defaults..") + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone(nil) + return + else + + ifs_saveop.filename1 = nameInst + + ifs_saveop.OnSuccess = function() + + ScriptCB_PopScreen() + rema_database.instOp = ScriptCB_LoadMetagameState() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone(nil) + end + + ifs_saveop.OnCancel = function() + print("Remaster: loading instant options failed, loading defaults..") + ScriptCB_PopScreen() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone(nil) + end + end + end + + ScriptCB_PushScreen("ifs_saveop") +end +--local remaIOfilename = "RemasterGlobalSettings" +--local remaInstFilename = "RemasterInstOpt" + +function swbf2Remaster_saveSettings(nameIO, nameInst, funcDone, skipInst) + + if not rema_database then + print("Remaster: saving settings failed, no settings found..") + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone("settings do not exist") + return + end + print("swbf2Remaster_saveSettings rema_database: ") + tprint(rema_database) + + -- save instant options? + local saveInstOpt = false + + if rema_database.data.saveSpOptions == 2 and rema_database.instOp.GamePrefs ~= nil and skipInst == nil then + saveInstOpt = true + end + + -- splitt instant options from database + local temp = rema_database.instOp + rema_database.instOp = {} + + ifs_saveop.doOp = "SaveMetagame" + ifs_saveop.NoPromptSave = 1 + ifs_saveop.beSneaky = 1 + + print("swbf2Remaster_saveSettings doOp: " .. tostring(ifs_saveop.doOp)) + if saveInstOpt then + print("swbf2Remaster_saveSettings: saveInstOpt") + ScriptCB_SaveMetagameState(temp) + + ifs_saveop.filename1 = nameInst + ifs_saveop.filename2 = ScriptCB_tounicode(remaInstFilename) + + ifs_saveop.OnSuccess = function() + ScriptCB_PopScreen() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + swbf2Remaster_saveSettings(nameIO, nameInst, funcDone, true) + end + + ifs_saveop.OnCancel = function() + print("Remaster: saving instant options failed..") + print(" : trying to save database anyway..") + ScriptCB_PopScreen() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + swbf2Remaster_saveSettings(nameIO, nameInst, funcDone, true) + end + else + print("swbf2Remaster_saveSettings: save database") + ScriptCB_SaveMetagameState(rema_database) + + ifs_saveop.filename1 = nameIO + ifs_saveop.filename2 = ScriptCB_tounicode(remaIOfilename) + --if(nameIO == nil) then + -- ifs_saveop.filename1 = ifs_saveop.filename2 + --end + + printf("filename1: %s; filename2: %s", tostring(ifs_saveop.filename1), tostring(ifs_saveop.filename2)) + printf("filename1: %s; filename2: %s", ScriptCB_ununicode(ifs_saveop.filename1), ScriptCB_ununicode(ifs_saveop.filename2)) + + ifs_saveop.OnSuccess = function() + ScriptCB_PopScreen() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone(nil) + end + + ifs_saveop.OnCancel = function() + print("Remaster: saving settings failed..") + ScriptCB_PopScreen() + ScriptCB_ClearMetagameState() + + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone("saving failed") + end + end + + -- merge instant options and database + rema_database.instOp = temp + temp = nil + + -- let the magic happen + ScriptCB_PushScreen("ifs_saveop") + +end + +function swbf2Remaster_getFilename(filelist, name1, name2) + if not filelist then + return nil, nil + end + + local i, currentFilename + local foundFilenames = { nil, nil} + + for i = 1, table.getn(filelist) do + currentFilename = ScriptCB_ununicode(filelist[i].filename) + + if string.find(currentFilename, name1) == 1 then + foundFilenames[1] = filelist[i].filename + elseif string.find(currentFilename, name2) == 1 then + foundFilenames[2] = filelist[i].filename + end + end + + return unpack(foundFilenames) +end + +-- operation = "save" or "load" +-- settings loaded into rema_database +-- settings saved from rema_database +-- funcDone(failure)) +-- failure = nil if successfull or error string +function swbf2Remaster_settingsManager(operation, funcDone) + + ifs_saveop.doOp = "LoadFileList" + ifs_saveop.OnSuccess = nil --ifs_saveop_Success + ifs_saveop.OnCancel = nil --ifs_saveop_Cancel + ifs_saveop.beSneaky = 1 + + print("swbf2Remaster_settingsManager: " .. tostring(operation)) + printf("swbf2Remaster_settingsManager: doOp %s", tostring(ifs_saveop.doOp)) + + if operation == "load" then + print("swbf2Remaster_settingsManager: perform load operation") + ifs_saveop.OnSuccess = function() + print("swbf2Remaster_settingsManager: load ifs_saveop.OnSuccess") + ScriptCB_PopScreen() + + -- find the filename + local filelist, maxSaves = ScriptCB_GetSavedMetagameList(false) + printf("maxSaves: %s", tostring(maxSaves)) + printFileList(filelist) + local filenameIO, filenameInst = swbf2Remaster_getFilename(filelist, remaIOfilename, remaInstFilename) + + if not filenameIO then + print("cant load, bad filename!") + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + rema_database = swbf2Remaster_getDefaultSettings() + funcDone("unable to find settings file, loading default settings") + return + end + + -- now load the data + swbf2Remaster_loadSettings(filenameIO, filenameInst, funcDone) + end + + ifs_saveop.OnCancel = function() + print("Remaster: loading filelist failed..") + ScriptCB_PopScreen() + + -- cannot load the data. Load default instead(?) + rema_database = swbf2Remaster_getDefaultSettings() + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone("unable to load filelist, loading default settings") + end + + elseif operation == "save" then + print("swbf2Remaster_settingsManager: perform save operation") + ifs_saveop.OnSuccess = function() + print("swbf2Remaster_settingsManager: ifs_saveop.OnSuccess") + + ScriptCB_PopScreen() + + -- clean up first manuel to avoid pop ups + local filelist, maxSaves = ScriptCB_GetSavedMetagameList(false) + printf("maxSaves: %s", tostring(maxSaves)) + print("filelist:") + printFileList(filelist) + local filenameIO, filenameInst = swbf2Remaster_getFilename(filelist, remaIOfilename, remaInstFilename) + -- now save the data + swbf2Remaster_saveSettings(filenameIO, filenameInst, funcDone) + end + + ifs_saveop.OnCancel = function() + print("swbf2Remaster_settingsManager: ifs_saveop.OnCancel") + print("Remaster: loading filelist failed, try to save anyway..") + ScriptCB_PopScreen() + + -- we failed, but try to save the data anyway + swbf2Remaster_saveSettings(nil, nil, funcDone) + end + else + print("Remaster: undefined settings operation..") + ifs_saveop.doOp = nil + ifs_saveop.OnSuccess = ifs_saveop_Success + ifs_saveop.OnCancel = ifs_saveop_Cancel + ifs_saveop.beSneaky = nil + funcDone("undefined settings operation") + return + end + + printf("swbf2Remaster_settingsManager: doOp %s ; push it", tostring(ifs_saveop.doOp)) + ScriptCB_PushScreen("ifs_saveop"); +end + +local function stringify(data) + local retVal = "" + for key, value in data do + retVal = retVal .. string.format("%s:%s;", key,ScriptCB_ununicode(value)) + end + return retVal +end + +function printFileList(fileList) + --printf("%s'%s',", formatting, tostring(ScriptCB_ununicode(value))) + print("printFileList:") + for k,v in fileList do + print(string.format(" %s: %s", k,stringify(v) )) + end + +end +-- load is automatically done whrn ifs_boot is pushed (shell space) + + +-- data loaded to 'rema_database' after calling this +function LoadSettings() + local doneFunc = function(msg) + print("LoadSettings: msg = ".. tostring(msg)) + if(tprint ~= nil) then + print("rema_database:") + tprint(rema_database) + end + end + swbf2Remaster_settingsManager("load", doneFunc) +end + +-- put data on 'rema_database' before calling this +-- i.e. rema_database.data = zero_patch_data +function SaveSettings() + local doneFunc = function(msg) + print("SaveSettings: msg = ".. tostring(msg)) + end + swbf2Remaster_settingsManager("save", doneFunc) +end + diff --git a/src/scripts/patch_shell.lua b/src/scripts/patch_shell.lua index 1af1ace..eb5e44a 100644 --- a/src/scripts/patch_shell.lua +++ b/src/scripts/patch_shell.lua @@ -180,5 +180,7 @@ function SetupZeroPatchDebugLog() end print("info: SetupZeroPatchDebugLog end") end +-- load/save settings setup +ScriptCB_DoFile("load_save") print("patch_shell end")