From e352b4f24e8b6abf13954b2555aae43c871105c7 Mon Sep 17 00:00:00 2001 From: JerryALT Date: Mon, 17 Jun 2024 23:34:09 +0300 Subject: [PATCH] [Mod FF]: Added 'F.N.G.' logic from MWR --- .../localizedstrings/iw3sp_mod_loc.str | 6 + .../french/localizedstrings/iw3sp_mod_loc.str | 6 + .../german/localizedstrings/iw3sp_mod_loc.str | 6 + .../localizedstrings/iw3sp_mod_loc.str | 6 + .../localizedstrings/iw3sp_mod_loc.str | 6 + .../iw3sp_mod_loc_subtitles.str | 2 +- .../{killhouse.gsc => best_squad_record.gsc} | 82 ++- .../raw/scripts/killhouse/h1_killhouse.gsc | 695 ++++++++++++++++++ .../raw/scripts/killhouse/hint.gsc | 218 ++++++ .../raw/scripts/override_vars.gsc | 13 + .../localizedstrings/iw3sp_mod_loc.str | 6 + .../zone_source/english_iw3sp_mod_patch.csv | 11 +- iw3sp_mod_ff_src/zone_source/iw3sp_mod.csv | 5 +- .../portuguese_iw3sp_mod_patch.csv | 1 - .../zone_source/slovak_iw3sp_mod_patch.csv | 1 - src/Components/Modules/GSC/GSC.cpp | 18 + 16 files changed, 1074 insertions(+), 8 deletions(-) rename iw3sp_mod_ff_src/raw/scripts/killhouse/{killhouse.gsc => best_squad_record.gsc} (80%) create mode 100644 iw3sp_mod_ff_src/raw/scripts/killhouse/h1_killhouse.gsc create mode 100644 iw3sp_mod_ff_src/raw/scripts/killhouse/hint.gsc create mode 100644 iw3sp_mod_ff_src/raw/scripts/override_vars.gsc diff --git a/iw3sp_mod_ff_src/raw/english/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/english/localizedstrings/iw3sp_mod_loc.str index 39eaa39..1a1fbe0 100644 --- a/iw3sp_mod_ff_src/raw/english/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/english/localizedstrings/iw3sp_mod_loc.str @@ -349,4 +349,10 @@ LANG_ENGLISH "Paintball" REFERENCE MENU_CHEATS_DESC9 LANG_ENGLISH "Can't handle the brutality of war? Try paintball guns." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_ENGLISH "(Optional) Complete the explosives weapons evaluation." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_ENGLISH "(Optional) Complete the obstacle course." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/french/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/french/localizedstrings/iw3sp_mod_loc.str index a989664..6eb2a35 100644 --- a/iw3sp_mod_ff_src/raw/french/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/french/localizedstrings/iw3sp_mod_loc.str @@ -352,4 +352,10 @@ LANG_FRENCH "Paintball" REFERENCE MENU_CHEATS_DESC9 LANG_FRENCH "Vous ne supportez pas la brutalité de la guerre ? Essayez les pistolets de paintball." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_FRENCH "(facultatif) Terminez l'évaluation des armes explosivees." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_FRENCH "(facultatif) Terminez le parcours d'obstacles." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/german/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/german/localizedstrings/iw3sp_mod_loc.str index 5d6f2d4..98d49ae 100644 --- a/iw3sp_mod_ff_src/raw/german/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/german/localizedstrings/iw3sp_mod_loc.str @@ -355,4 +355,10 @@ LANG_GERMAN "Paintball" REFERENCE MENU_CHEATS_DESC9 LANG_GERMAN "Kannst du die Brutalität des Krieges nicht ertragen? Versuche es mit Paintball-Waffen." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_GERMAN "(Optional) Beenden Sie die Übung mit den Sprengstoffen." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_GERMAN "(Optional) Beenden Sie den Hindernisparcours." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/italian/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/italian/localizedstrings/iw3sp_mod_loc.str index b8fc946..89bb705 100644 --- a/iw3sp_mod_ff_src/raw/italian/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/italian/localizedstrings/iw3sp_mod_loc.str @@ -349,4 +349,10 @@ LANG_ITALIAN "Paintball" REFERENCE MENU_CHEATS_DESC9 LANG_ITALIAN "Non riesci a gestire la brutalità della guerra? Prova i fucili da paintball." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_ITALIAN "(Facoltativo) Completa l'addestramento sulle armi esplosive." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_ITALIAN "(Facoltativo) Completa il percorso a ostacoli." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc.str index 725d00a..7f42400 100644 --- a/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc.str @@ -346,4 +346,10 @@ LANG_RUSSIAN " REFERENCE MENU_CHEATS_DESC9 LANG_RUSSIAN "Íå ïåðåíîñèòå æåñòîêîñòü âîéíû? Ïîïðîáóéòå ìàðêåðû äëÿ ïåéíòáîëà." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_RUSSIAN "(Äîïîëíèòåëüíî) Ñäàéòå çà÷¸ò ïî îáðàùåíèþ ñî âçðûâ÷àòêîé." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_RUSSIAN "(Äîïîëíèòåëüíî) Ïðîéäèòå ïîëîñó ïðåïÿòñòâèé." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc_subtitles.str b/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc_subtitles.str index 4d1bd88..9e02ea6 100644 --- a/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc_subtitles.str +++ b/iw3sp_mod_ff_src/raw/russian/localizedstrings/iw3sp_mod_loc_subtitles.str @@ -656,7 +656,7 @@ REFERENCE KILLHOUSE_GAZ_GOODTOSEE21 LANG_RUSSIAN "^2Ãàñ: ^7Ðàä òåáÿ âèäåòü, äðóæèùå." REFERENCE KILLHOUSE_SAS4_FNG1211 -LANG_RUSSIAN "^2ÑÀÑ: ^7Îí íîâè÷îê, ñýð" +LANG_RUSSIAN "^2ÑÀÑ: ^7Îí íîâè÷îê, ñýð." REFERENCE KILLHOUSE_SAS4_GOEASY1213 LANG_RUSSIAN "^2ÑÀÑ: ^7Ïîëåã÷å ñ íèì, ñýð. Îí ïåðâûé äåíü íà ñëóæáå." diff --git a/iw3sp_mod_ff_src/raw/scripts/killhouse/killhouse.gsc b/iw3sp_mod_ff_src/raw/scripts/killhouse/best_squad_record.gsc similarity index 80% rename from iw3sp_mod_ff_src/raw/scripts/killhouse/killhouse.gsc rename to iw3sp_mod_ff_src/raw/scripts/killhouse/best_squad_record.gsc index 922493f..30ce2d2 100644 --- a/iw3sp_mod_ff_src/raw/scripts/killhouse/killhouse.gsc +++ b/iw3sp_mod_ff_src/raw/scripts/killhouse/best_squad_record.gsc @@ -12,7 +12,10 @@ main() replace_hint_size() { waittillframeend; - level.hint_text_size = 1.6; + if(getDvarInt("console_menu_style")) + level.hint_text_size = 1.6; + else + level.hint_text_size = 1.2; } cargoship_training() @@ -121,6 +124,12 @@ cargoship_training() level.price maps\killhouse_code::execDialog( "hit3and4" ); //Then hit position 3 and 4 following my precise instructions at each position. } + if( first_time ) + { + if( !flag("obstacle_course_end") ) + level.player_skipped_obstacle_course = true; + } + //"Grab the rope when your ready." level.price thread maps\killhouse_code::execDialog( "grabrope" ); @@ -231,7 +240,7 @@ cargoship_training() player_reach_record_gaz = true; } else - selection = maps\killhouse::dialog_end_of_course( first_time, final_time, previous_time, previous_selection ); + selection = dialog_end_of_course( first_time, final_time, previous_time, previous_selection ); } else if ( final_time < ( player_bestrecord ) && player_reach_record_gaz == true ) { @@ -239,7 +248,7 @@ cargoship_training() selection = "newrecord"; } else - selection = maps\killhouse::dialog_end_of_course( first_time, final_time, previous_time, previous_selection ); + selection = dialog_end_of_course( first_time, final_time, previous_time, previous_selection ); level.price maps\killhouse_code::execDialog( selection ); @@ -259,4 +268,71 @@ cargoship_training() flag_wait( "at_top_of_ladder" ); //top_of_ladder_trigger waittill ( "trigger" ); } +} + +dialog_end_of_course( first_time, final_time, previous_time, previous_selection ) +{ + if ( ! first_time ) + { + if ( ( previous_time + 2 ) < final_time ) + { + if ( ( randomint ( 2 ) ) > 0 ) + { + //Don't waste our time Soap. The idea is to take less time, not more. + selection = ( "lesstime" ); + return selection; + } + else + { + if(level.player_skipped_obstacle_course) + selection = ( "lesstime" ); //Don't waste our time Soap. The idea is to take less time, not more + else + selection = ( "letyouskip" ); //You're getting' slower. Perhaps it was a mistake to let you skip the obstacle course. + return selection; + } + } + + if ( previous_time > ( final_time + 3 ) ) + { + if ( ( randomint ( 2 ) ) > 0 ) + { + //That was an improvement, but it's not hard to improve on garbage. Try it again. + selection = ( "tryitagain" ); + return selection; + } + else + { + //That was better. Not great. But better. + selection = ( "notgreat" ); + return selection; + } + } + + if ( ( level.bonus_time < 1.8 ) && ( previous_selection != "sloppy" ) ) + { + //Fast, but sloppy. You need to work on your accuracy. + selection = ( "sloppy" ); + return selection; + } + } + + num = randomint ( 2 ); + if ( num == 0 ) + { + //All right Soap, that's enough. You'll do. + selection = ( "youlldo" ); + return selection; + } + //else if ( num == 1 ) + //{ + //I've seen better, but that'll do. + // selection = ( "seenbetter2" ); + // return selection; + //} + else + { + //"Pretty good, Soap. But I've seen better." ); + selection = "seenbetter"; + return selection; + } } \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/scripts/killhouse/h1_killhouse.gsc b/iw3sp_mod_ff_src/raw/scripts/killhouse/h1_killhouse.gsc new file mode 100644 index 0000000..786cd1d --- /dev/null +++ b/iw3sp_mod_ff_src/raw/scripts/killhouse/h1_killhouse.gsc @@ -0,0 +1,695 @@ +/**************************************************************************** +Changes: +Added training logic from Call of Duty: Modern Warfare Remastered. It means that you can run other courses or just running to the Captain Price. +Changed objective logic for Sgt. Newcastle and Mac: one visible objective. +If player skip the Mac course then add line if player have bad time 'letyouskip' +Change the M203 and C4 hint for PC. +****************************************************************************/ + + +#include common_scripts\utility; +#include maps\_utility; + +main() +{ + precachestring( &"IW3SP_MOD_LOC_KILLHOUSE_DEMOLITIONS_TRAINING" ); + precachestring( &"IW3SP_MOD_LOC_KILLHOUSE_RUN_THE_OBSTACLE_COURSE" ); + + flag_init("cargoshipTutoDone"); + + level.player_completed_demolitions_training = false; + level.player_completed_obstacle_course_training = false; + level.player_skipped_obstacle_course = false; + car = getent ( "destructible", "targetname" ); + car thread do_in_order( ::waittill_msg, "destroyed", ::flag_set, "car_destroyed" ); + car destructible_disable_explosion(); + + ReplaceFunc(maps\killhouse::melee_training, ::melee_training); +} + +melee_training() +{ + //while( !flag( "melee_entered" ) ) + // wait ( 0.05 ); + level notify ( "melee_training" ); + + maps\killhouse_code::registerObjective( "obj_melee", &"KILLHOUSE_MELEE_THE_WATERMELON", getEnt( "scr_watermelon", "targetname" ) ); + maps\killhouse_code::setObjectiveState( "obj_melee", "current" ); + + if ( !flag ( "melee_complete" ) ) + thread maps\killhouse_code::generic_compass_hint_reminder( "melee_complete", 12 ); + + //level.waters thread walk_to ( getnode ( "melon_node", "script_noteworthy" ) ); + + if ( !flag ( "near_melee" ) && !flag ( "melee_complete" ) ) + { + thread maps\killhouse_code::hint( &"KILLHOUSE_HINT_APPROACH_MELEE", 9999 ); + + //All right Soap, come this way. + level.waters maps\killhouse_code::execDialog( "comethisway" ); + } + + thread maps\killhouse::melee_run_dialog(); + + if ( !flag ( "melee_complete" ) ) + flag_wait ( "near_melee" ); + + while ( !flag ( "melee_complete" ) ) + maps\killhouse_code::keyHint( "melee" ); + + flag_wait ( "melee_complete" ); + + maps\killhouse_code::clear_hints(); + thread maps\killhouse::open_firing_range_door(); + + + flag_wait ( "melee_run_dialog" ); + + wait .5; + + + flag_set ( "spawn_frags" ); + + + //Lovely. Your fruit killing skills are remarkable. + thread maps\killhouse_code::gaz_animation( "killhouse_gaz_talk_side" ); + level.waters maps\killhouse_code::execDialog( "fruitkilling" ); + + maps\killhouse_code::setObjectiveState( "obj_melee", "done" ); + + level notify ( "meleeTraining_end" ); + flag_clear ( "aa_sidearm_melee" ); + autosave_by_name( "melee_complete" ); + + if ( level.short_training ) + { + level.waters maps\killhouse_code::execDialog( "wantstosee" ); + //thread add_dialogue_line( "GAZ", "Captain Price wants to see you." ); + thread player_skipped_the_optional_objectives(); + thread maps\killhouse::report_to_price(); + wait 1; + thread frag_training(); + thread obstacle_training(); + + //KILLHOUSE_DEMOLITIONS_TRAINING + //KILLHOUSE_RUN_THE_OBSTACLE_COURSE + + if(AssetIsExisting(22, "IW3SP_MOD_LOC_KILLHOUSE_DEMOLITIONS_TRAINING")) + objectiveText = &"IW3SP_MOD_LOC_KILLHOUSE_DEMOLITIONS_TRAINING"; + else + objectiveText = &"KILLHOUSE_GO_OUTSIDE_AND_REPORT"; + + if(AssetIsExisting(22, "IW3SP_MOD_LOC_KILLHOUSE_RUN_THE_OBSTACLE_COURSE")) + objectiveCourse = &"IW3SP_MOD_LOC_KILLHOUSE_RUN_THE_OBSTACLE_COURSE"; + else + objectiveCourse = &"KILLHOUSE_RUN_THE_OBSTACLE_COURSE"; + + maps\killhouse_code::registerobjective( "obj_demolitions", objectiveText, getent( "obj_frag_ammo", "targetname" ) ); + maps\killhouse_code::setobjectivestate( "obj_demolitions", "active" ); + maps\killhouse_code::registerobjective( "obj_obstacle", objectiveCourse, getent( "obstacleTraining_objective", "targetname" ) ); + maps\killhouse_code::setobjectivestate( "obj_obstacle", "active" ); + } + else + { + level.waters maps\killhouse_code::execDialog( "allgoodhere" ); + //level.waters thread walk_to ( getnode ( "door_node", "script_noteworthy" ) ); + + thread maps\killhouse::frag_Training(); + } +} + +frag_Training() +{ + level endon ( "PlayerSkipTheOptionalCourses" ); + + if( flag( "cargoshipTutoDone" ) ) + return; + + flag_set ( "aa_frag" ); + level notify ( "fragTraining_begin" ); + + autosave_by_name( "frag_training" ); + + flag_set ( "start_frag_training" ); + + //thread generic_compass_hint_reminder( "got_frags", 7 ); + + // maps\killhouse_code::registerObjective( "obj_demolitions", &"KILLHOUSE_GO_OUTSIDE_AND_REPORT", getEnt( "obj_frag_ammo", "targetname" ) ); + // maps\killhouse_code::setObjectiveState( "obj_demolitions", "current" ); + + flag_wait ( "near_grenade_area" ); + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_PICK_UP_THE_FRAG_GRENADES" ); + maps\killhouse_code::setObjectiveState( "obj_demolitions", "current" ); + + //It's time for some fun mate. Let's blow some shit up... + level.newcastle maps\killhouse_code::execDialog( "timeforfun" ); + + if ( !( level.player GetWeaponAmmoStock( "fraggrenade" ) ) && (!( maps\killhouse_code::in_pit() ) ) ) + { + //Pick up those frag grenades and get in the safety pit. + level.newcastle maps\killhouse_code::execDialog( "pickupfrag" ); + } + + while ( level.player GetWeaponAmmoStock( "fraggrenade" ) < 3 ) + wait ( 0.05 ); + + flag_set ( "got_frags" ); + + getEnt( "grenade_too_low", "targetname" ) thread maps\killhouse_code::frag_too_low_hint(); + + thread maps\killhouse_code::frag_trigger_think( "frag_target_1", getEnt( "grenade_damage_trigger1", "targetname" ) ); + thread maps\killhouse_code::frag_trigger_think( "frag_target_2", getEnt( "grenade_damage_trigger2", "targetname" ) ); + thread maps\killhouse_code::frag_trigger_think( "frag_target_3", getEnt( "grenade_damage_trigger3", "targetname" ) ); + + + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "safety_pit", "targetname" ) ); + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_ENTER_THE_SAFETY_PIT" ); + + thread maps\killhouse_code::dialog_nag_till_in_pit(); + + getEnt( "safety_pit", "targetname" ) waittill ( "trigger" ); + flag_set ( "in_pit_with_frags" ); + + //level.newcastle thread walk_to( getnode ( "watch_pit_node", "script_noteworthy" ) ); + level.newcastle setgoalnode ( getnode ( "watch_pit_node", "script_noteworthy" ) ); + + //Now throw a grenade into windows two, three and four. + level.newcastle thread maps\killhouse_code::execDialog( "throwgrenade" ); + thread maps\killhouse_code::keyHint( "frag" ); + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_THROW_A_GRENADE_INTO" ); + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "safety_pit", "targetname" ) ); + + wait ( 0.1 ); + + numRemaining = 0; + for ( index = 1; index < 4; index++ ) + { + if ( flag( "frag_target_" + index ) ) + continue; + + numRemaining++; + } + + + //level.marine4 execDialog( "firstwindow" ); + + //level.marine4.lastNagTime = getTime(); + while( numRemaining ) + { + curRemaining = 0; + + nextTarget = ""; + if ( !flag( "frag_target_1" ) ) + { + curRemaining++; + nextTarget = "firstwindow"; + } + if ( !flag( "frag_target_2" ) ) + { + curRemaining++; + if ( nextTarget == "" ) + nextTarget = "secondwindow"; + } + if ( !flag( "frag_target_3" ) ) + { + curRemaining++; + if ( nextTarget == "" ) + nextTarget = "dumpster"; + } + + if ( !curRemaining ) + break; + + if ( curRemaining != numRemaining ) + { + //level.marine4 execDialog( nextTarget ); + //level.marine4.lastNagTime = getTime(); + } + else + { + //level.marine4 nagPlayer( nextTarget + "again", 10.0 ); + } + + numRemaining = curRemaining; + + wait ( 0.05 ); + } + + //maps\killhouse_code::setObjectiveState( "obj_demolitions", "done" ); + + wait ( 1.0 ); + //level.marine4 thread execDialog( "gotorange" ); + + flag_set ( "fragTraining_end" ); + thread launcherTraining(); + flag_clear ( "aa_frag" ); +} + +launcherTraining() +{ + level endon ( "PlayerSkipTheOptionalCourses" ); + + if( flag( "cargoshipTutoDone" ) ) + return; + + flag_set ( "aa_launcher" ); + level notify ( "launcherTraining_begin" ); + + autosave_by_name( "launcher_training" ); + + flag_set ( "spawn_launcher" ); + + level.newcastle setgoalnode ( getnode ( "watch_table_node", "script_noteworthy" ) ); + //level.newcastle thread walk_to ( getnode ( "watch_table_node", "script_noteworthy" ) ); + + //Now let's try something with a little more 'mojo'. I don't know how much experience you've got with demolitions, so just do as I say, all right? + //level.newcastle execDialog( "moremojo" ); + + if ( !level.player hasWeapon( "m203_m4" ) ) + { + //Come back here and pick up this grenade launcher. + level.newcastle maps\killhouse_code::execDialog( "pickuplauncher" ); + } + + flag_trigger_init( "launcher_wall_target", getEnt( "launcher_wall_trigger", "script_noteworthy" ) ); + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_PICK_UP_THE_RIFLE_WITH" ); + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "obj_frag_ammo", "targetname" ) ); + + thread maps\killhouse_code::keyHint( "swap_launcher" ); + + while ( !level.player hasWeapon( "m203_m4" ) ) + wait ( 0.05 ); + maps\killhouse_code::clear_hints(); + thread scripts\killhouse\hint::M203_icon_hint(); + RefreshHudAmmoCounter(); + + + level.player giveMaxAmmo( "m203_m4" ); + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_RETURN_TO_THE_SAFETY" ); + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "safety_pit", "targetname" ) ); + + //Notice you now have an icon of a grenade launcher on your HUD. + //level.newcastle execDialog( "icononhud" ); + + if ( !( level.player istouching( getEnt( "safety_pit", "targetname" ) ) ) ) + { + //Now get back into the safety pit. + level.newcastle maps\killhouse_code::execDialog( "nowbacktopit" ); + } + getEnt( "safety_pit", "targetname" ) waittill ( "trigger" ); + + //level.newcastle thread walk_to( getnode ( "watch_pit_node", "script_noteworthy" ) ); + level.newcastle setgoalnode ( getnode ( "watch_pit_node", "script_noteworthy" ) ); + + if ( !(level.player getCurrentWeapon() == "m203_m4") ) + { + //Equip the grenade launcher. + level.newcastle maps\killhouse_code::execDialog( "equiplauncher" ); + thread maps\killhouse_code::keyHint( "firemode" ); + RefreshHudAmmoCounter(); + } + + while ( !(level.player getCurrentWeapon() == "m203_m4") ) + { + thread maps\killhouse_code::keyHint( "firemode" ); + wait ( 1.0 ); + } + + maps\killhouse_code::clear_hints(); + + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_FIRE_AT_THE_WALL_WITH" ); + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "safety_pit", "targetname" ) ); + wait ( 0.1 ); + + //Fire at the wall with the number one on it. + level.newcastle maps\killhouse_code::execDialog( "firewall1" ); + + if ( level.xenon ) + thread maps\killhouse_code::keyHint( "attack" ); + else + thread maps\killhouse_code::keyHint( "pc_attack" );//PC and PS3 are both press + + while ( !flag( "launcher_wall_target" ) ) + { + //level.player giveMaxAmmo( "m203_m4" ); + wait ( 0.05 ); + } + maps\killhouse_code::clear_hints(); + wait ( 0.1 ); + + //Notice it didn't explode. + level.newcastle maps\killhouse_code::execDialog( "didntexplode" ); + + //As you know, all grenade launchers have a minimum safe arming distance. + level.newcastle maps\killhouse_code::execDialog( "safearming" ); + + //The grenade wont explode unless it travels that distance. + //level.newcastle execDialog( "wontexplode" ); + + //Right. Now pop a grenade in each window, five, six and seven. + level.newcastle thread maps\killhouse_code::execDialog( "56and7" ); + + + array_thread ( getEntArray( "gl_too_low", "targetname" ), maps\killhouse::gl_too_low_hint ); + + thread maps\killhouse::launcher_trigger_think( "launcher_target_1", getEnt( "launcher_damage_trigger1", "targetname" ) ); + thread maps\killhouse::launcher_trigger_think( "launcher_target_2", getEnt( "launcher_damage_trigger2", "targetname" ) ); + thread maps\killhouse::launcher_trigger_think( "launcher_target_3", getEnt( "launcher_damage_trigger3", "targetname" ) ); + + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_FIRE_YOUR_GRENADE_LAUNCHER" ); + + numRemaining = 0; + for ( index = 1; index < 4; index++ ) + { + if ( flag( "launcher_target_" + index ) ) + continue; + + numRemaining++; + } + + + //level.marine5.lastNagTime = getTime(); + while( numRemaining ) + { + curRemaining = 0; + + nextTarget = ""; + if ( !flag( "launcher_target_1" ) ) + { + curRemaining++; + nextTarget = "hittwo"; + } + if ( !flag( "launcher_target_2" ) ) + { + curRemaining++; + if ( nextTarget == "" ) + nextTarget = "hitthree"; + } + if ( !flag( "launcher_target_3" ) ) + { + curRemaining++; + if ( nextTarget == "" ) + nextTarget = "hitfour"; + } + + if ( !curRemaining ) + break; + + //level.player giveMaxAmmo( "m203_m4" ); + + if ( curRemaining != numRemaining ) + { + //level.marine5.lastNagTime = getTime(); + } + else + { + //level.marine5 nagPlayer( nextTarget, 8.0 ); + } + + numRemaining = curRemaining; + + wait ( 0.05 ); + } + + level notify ( "launcherTraining_end" ); + //maps\killhouse_code::setObjectiveState( "obj_demolitions", "done" ); + + wait ( 1.0 ); + //level.marine5 execDialog( "oorah" ); + wait ( 1.0 ); + + flag_clear ( "aa_launcher" ); + thread c4_Training(); +} + +c4_Training() +{ + level endon ( "PlayerSkipTheOptionalCourses" ); + + if( flag( "cargoshipTutoDone" ) ) + return; + + flag_set ( "aa_c4" ); + level notify ( "explosivesTraining_begin" ); + + autosave_by_name( "c4_training" ); + + pickupTrigger = flag_trigger_init( "explosives_pickup", getEnt( "c4_pickup", "targetname" ) ); + C4_models = getEntArray( pickupTrigger.target, "targetname" ); + + pickupTrigger setHintString (&"KILLHOUSE_C4_PICKUP"); + pickupTrigger trigger_on(); + for ( i = 0; i < C4_models.size; i++ ) + C4_models[ i ] show(); + + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", pickupTrigger ); + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_PICK_UP_THE_C4_EXPLOSIVE" ); + + //Come back around and pick up some C4 off the table. + level.newcastle thread maps\killhouse_code::execDialog( "c4offtable" ); + + //level.newcastle thread walk_to ( getnode ( "watch_c4_node", "script_noteworthy" ) ); + level.newcastle setgoalnode ( getnode ( "watch_c4_node", "script_noteworthy" ) ); + + thread maps\killhouse_code::keyHint( "swap_explosives" ); + + while ( !flag( "explosives_pickup" ) ) + wait ( 0.05 ); + + level.player playsound ( "detpack_pickup" ); + for ( i = 0; i < C4_models.size; i++ ) + C4_models[ i ] hide(); + pickupTrigger trigger_off(); + old_weapon = level.player GetCurrentWeapon (); + level.player giveWeapon("c4"); + level.player SetWeaponAmmoClip( "c4", 1 ); + level.player SetActionSlot( 2, "weapon" , "c4" ); + + thread scripts\killhouse\hint::C4_icon_hint(); + RefreshHudAmmoCounter(); + thread maps\killhouse::flag_when_c4_thrown(); + + wait .5; + + if ( !(level.player getCurrentWeapon() == "c4") ) + { + level.newcastle maps\killhouse_code::execDialog( "equipc4" ); //Equip the C4, Soap. + //thread keyHint( "equip_C4" ); + level notify ( "c4_equiped" ); + level.hintElem setText( &"KILLHOUSE_HINT_EQUIP_C4" ); + RefreshHudAmmoCounter(); + } + + while ( !(level.player getCurrentWeapon() == "c4") ) + { + wait ( 1.0 ); + } + + + flag_set ( "c4_equiped" ); + level.hintbackground destroy(); + double_line = true; + maps\killhouse_code::add_hint_background( double_line ); + level.hintElem setText( &"KILLHOUSE_HINT_HUD_CHANGES" ); + RefreshHudAmmoCounter(); + //thread hint( &"KILLHOUSE_HINT_HUD_CHANGES", 9999 ); + + //It seems my ex-wife was kind enough to donate her car to furthering your education Soap. + level.newcastle maps\killhouse_code::execDialog( "exwifecar" ); + + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", getEnt( "c4_target", "targetname" ) ); + + level notify ( "C4_the_car" ); + + if ( !flag ( "c4_thrown" ) ) + level.newcastle maps\killhouse_code::execDialog( "throwc4car" ); //Throw some C4 on the car. + + if ( ( !flag ( "near_car" ) ) && ( !flag ( "c4_thrown" ) ) ) + { + //thread hint( &"KILLHOUSE_HINT_APPROACH_C4_THROW", 9999 ); + level.hintbackground destroy(); + maps\killhouse_code::add_hint_background(); + level.hintElem setText( &"KILLHOUSE_HINT_APPROACH_C4_THROW" ); + flag_wait ( "near_car" ); + } + + + if ( !flag ( "c4_thrown" ) ) + maps\killhouse_code::keyHint( "throw_C4" ); + + flag_wait ( "c4_thrown" ); + + wait .5; + + //Sgt Newcastle - When planting C4 is your objective, you will see a glowing marker in the world that indicates where to plant it. + //thread add_dialogue_line( "newcastle", "When planting C4 is your objective, you will see a glowing marker in the world that indicates where to plant it." ); + double_line = true; + thread maps\killhouse_code::hint( &"KILLHOUSE_C4_OBJECTIVE", 9999, double_line ); + wait 4; + + //Place the C4 on the indicated spot. + level.newcastle thread maps\killhouse_code::execDialog( "placec4" ); + + c4_target = getent( "c4_target", "targetname" ); + c4_target maps\_c4::c4_location( undefined, undefined, undefined, c4_target.origin ); + level thread do_in_order( ::waittill_msg, "c4_in_place", ::flag_set, "C4_planted" ); + + wait ( 1.0 ); + + maps\killhouse_code::setObjectiveString( "obj_demolitions", &"KILLHOUSE_PLANT_THE_C4_EXPLOSIVE" ); + maps\killhouse_code::setObjectiveLocation( "obj_demolitions", c4_target ); + + thread maps\killhouse_code::keyhint( "plant_explosives", 9999, 1 ); + + flag_wait ( "C4_planted" ); + + c4_target thread maps\killhouse::force_detonation(); + + maps\killhouse_code::clear_hints(); + + // maps\killhouse_code::setObjectiveState( "obj_demolitions", "done" ); + + //level.newcastle execDialog( "morec4" ); //Go get some more C4 from the table. + //level.newcastle execDialog( "behindwall" ); //Now come over here behind the safety wall. + + if( !flag( "car_destroyed" ) ) + level.newcastle maps\killhouse_code::execDialog( "safedistance" ); //Now get to a safe distance from the explosives. + + + while ( ( distance( c4_target.origin, level.player.origin ) <= 256 ) && !flag( "car_destroyed" ) ) + wait 0.05; + + if( !flag( "car_destroyed" ) ) + { + level.newcastle maps\killhouse_code::execDialog( "fireinhole" ); //Fire in the hole! + thread maps\killhouse_code::keyHint( "detonate_C4", 9999 ); + } + + flag_wait ( "car_destroyed" ); + thread maps\killhouse::switch_in_two( old_weapon ); + + maps\killhouse_code::clear_hints(); + + if(AssetIsExisting(22, "IW3SP_MOD_LOC_KILLHOUSE_DEMOLITIONS_TRAINING")) + objectiveText = &"IW3SP_MOD_LOC_KILLHOUSE_DEMOLITIONS_TRAINING"; + else + objectiveText = &"KILLHOUSE_GO_OUTSIDE_AND_REPORT"; + + maps\killhouse_code::setObjectiveString( "obj_demolitions", objectiveText ); + maps\killhouse_code::setObjectiveState( "obj_demolitions", "done" ); + + level.player_completed_demolitions_training = true; + + thread C4_complete_dialog(); + + level notify ( "explosivesTraining_end" ); + flag_clear ( "aa_c4" ); +} + +C4_complete_dialog() +{ + level.newcastle maps\killhouse_code::execDialog( "chuckle" ); //< satisfied chuckling > + level.newcastle maps\killhouse_code::execDialog( "muchimproved" ); //Much improved. + + if ( !flag( "start_obstacle" ) ) + level.newcastle maps\killhouse_code::execDialog( "passedeval" ); //All right Soap, you passed the weapons evaluation. +} + +obstacle_Training() +{ + level endon ( "PlayerSkipTheOptionalCourses" ); + + if( flag( "cargoshipTutoDone" ) ) + return; + + flag_set ( "aa_obstacle" ); + level notify ( "obstacleTraining_start" ); + + // maps\killhouse_code::registerObjective( "obj_obstacle", &"KILLHOUSE_RUN_THE_OBSTACLE_COURSE", getEnt( "obstacleTraining_objective", "targetname" ) ); + // maps\killhouse_code::setObjectiveState( "obj_obstacle", "current" ); + + //thread generic_compass_hint_reminder( "start_obstacle", 7 ); + + getEnt( "obstacle_course_start", "targetname" ) waittill ( "trigger" ); + + flag_set ( "start_obstacle" ); + + flag_trigger_init( "prone_entered", getEnt( "obstacleTraining_prone", "targetname" ) ); + thread maps\killhouse_code::obstacleTraining_buddies(); + + thread maps\killhouse::obstacleTraining_dialog(); + + flag_wait( "start_course" ); + + maps\killhouse_code::setObjectiveLocation( "obj_obstacle", getEnt( "obj_course_end", "targetname" ) ); + + move_mac_triggers = getentarray( "move_mac", "targetname" ); + array_thread( move_mac_triggers, maps\killhouse_code::move_mac ); + + getEnt( "obstacleTraining_mantle", "targetname" ) waittill ( "trigger" ); + thread maps\killhouse_code::keyHint( "mantle", 5.0 ); + + flag_wait( "obstacleTraining_crouch" ); + thread maps\killhouse_code::keyHint( "crouch" ); + + flag_wait( "obstacleTraining_mantle2" ); + thread maps\killhouse_code::keyHint( "mantle", 5.0 ); + + flag_wait( "prone_entered" ); + thread maps\killhouse_code::keyHint( "prone" ); + + getEnt( "obstacleTraining_Standup", "targetname" ) waittill ( "trigger" ); + thread maps\killhouse_code::keyHint( "stand", 5.0 ); + maps\killhouse_code::clear_hints_on_stand(); + + wait .1; + + //player must sprint + if ( level.xenon )// ghetto but PS3 requires "Press X" and 360 requires "Click X" + maps\killhouse_code::keyHint( "sprint" ); + else + maps\killhouse_code::keyHint( "sprint_pc" ); + + flag_set ( "player_sprinted" ); + + if( !flag( "obstacle_course_end" ) ) + thread maps\killhouse_code::second_sprint_hint(); + + flag_wait( "obstacle_course_end" ); + level notify ( "kill_sprint_hint" ); + maps\killhouse_code::clear_hints(); + maps\killhouse_code::setObjectiveState( "obj_obstacle", "done" ); + level.player_completed_obstacle_course_training = true; + flag_clear ( "aa_obstacle" ); +} + +player_skipped_the_optional_objectives() +{ + while( true ) + { + if(flag( "open_ship_hanger" ) ) + { + if(!level.player_completed_demolitions_training) + maps\killhouse_code::setObjectiveState( "obj_demolitions", "empty" ); + + if(!level.player_completed_obstacle_course_training) + { + level.player_skipped_obstacle_course = true; + maps\killhouse_code::setObjectiveState( "obj_obstacle", "empty" ); + } + + flag_set( "cargoshipTutoDone" ); + level notify("in_pit_with_frags"); + level notify("PlayerSkipTheOptionalCourses"); + level notify("obstacleTraining_end"); //for skip the Mac dialog + break; + } + wait (0.05); + } +} \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/scripts/killhouse/hint.gsc b/iw3sp_mod_ff_src/raw/scripts/killhouse/hint.gsc new file mode 100644 index 0000000..ecc6e24 --- /dev/null +++ b/iw3sp_mod_ff_src/raw/scripts/killhouse/hint.gsc @@ -0,0 +1,218 @@ +#include common_scripts\utility; +#include maps\_utility; + +main() +{ + precacheShader( "hud_dpad_ps3" ); + ReplaceFunc(maps\killhouse_code::auto_aim, ::auto_aim); + ReplaceFunc(maps\killhouse_code::objective_hints, ::objective_hints); +} + +objective_hints( completion_flag ) +{ + level endon ( "mission failed" ); + level endon ( "navigationTraining_end" ); + level endon ( "reveal_dialog_starting" ); + + maps\killhouse_code::compass_hint(); + + wait 2; + + if ( level.console ) + { + if ( level.xenon ) + maps\killhouse_code::keyHint( "objectives", 6.0); + else + maps\killhouse_code::hint( &"KILLHOUSE_HINT_CHECK_OBJECTIVES_SCORES_PS3", 6 ); + } + else + { + maps\killhouse_code::keyHint( "objectives_pc", 6.0); + } + + //level.marine1.lastNagTime = getTime(); + timePassed = 16; + for ( ;; ) + { + //if( distance( level.player.origin, level.marine1.origin ) < 512 ) + // level.marine1 nagPlayer( "squadwaiting", 15.0 ); + + if ( !flag( completion_flag ) && timePassed > 20.0 ) + { + //hint( &"KILLHOUSE_HINT_OBJECTIVE_REMINDER", 6.0 ); + thread maps\killhouse_code::compass_reminder(); + RefreshHudCompass(); + //wait( 0.5 ); + //thread hint( &"KILLHOUSE_HINT_OBJECTIVE_REMINDER2", 10.0 ); + timePassed = 0; + } + + if( flag("near_grenade_area") || flag("start_obstacle") ) + timePassed = 0; + else + timePassed += 0.05; + + wait ( 0.05 ); + } +} + +M203_icon_hint() +{ + if ( getdvar( "chaplincheat" ) == "1" ) + return; + + maps\killhouse_code::clear_hints(); + //level endon ( "clearing_hints" ); + + maps\killhouse_code::add_hint_background(); + //Notice you now have an icon of a grenade launcher on your HUD. + level.hintElem = maps\_hud_util::createFontString( "objective", level.hint_text_size ); + level.hintElem.hidewheninmenu = true; + level.hintElem maps\_hud_util::setPoint( "TOP", undefined, 0, 110 ); //35 + level.hintElem.sort = 0.5; + + level.hintElem setText( &"KILLHOUSE_HINT_LAUNCHER_ICON" ); + + posY = 145; + iconElem = undefined; + + if(getdvarint("gpad_in_use")) + { + if(getdvarint("gpad_style") == 0 ) + iconElem = maps\_hud_util::createIcon( "hud_dpad", 32, 32 ); + else + iconElem = maps\_hud_util::createIcon( "hud_dpad_ps3", 32, 32 ); + iconElem.hidewheninmenu = true; + iconElem maps\_hud_util::setPoint( "TOP", undefined, 0, posY ); + posY += 30; + } + + iconElem2 = maps\_hud_util::createIcon( "hud_icon_40mm_grenade", 64, 32 ); + iconElem2.hidewheninmenu = true; + iconElem2 maps\_hud_util::setPoint( "TOP", undefined, 0, posY ); + + level waittill ( "clearing_hints" ); + + if(getdvarint("gpad_in_use")) + iconElem maps\_hud_util::setPoint( "CENTER", "BOTTOM", -320, -20, 1.0 ); + + iconElem2 maps\_hud_util::setPoint( "CENTER", "BOTTOM", -320, -20, 1.0 ); + + if(getdvarint("gpad_in_use")) + iconElem scaleovertime(1, 20, 20); + + iconElem2 scaleovertime(1, 20, 20); + + wait .70; + if(getdvarint("gpad_in_use")) + { + iconElem fadeovertime(.15); + iconElem.alpha = 0; + } + + iconElem2 fadeovertime(.15); + iconElem2.alpha = 0; + wait .5; + + //clear_hints(); +} + +C4_icon_hint() +{ + if ( getdvar( "chaplincheat" ) == "1" ) + return; + + maps\killhouse_code::clear_hints(); + level endon ( "clearing_hints" ); + + maps\killhouse_code::add_hint_background(); + level.hintElem = maps\_hud_util::createFontString( "objective", level.hint_text_size ); + level.hintElem.hidewheninmenu = true; + level.hintElem maps\_hud_util::setPoint( "TOP", undefined, 0, 110 ); + level.hintElem.sort = 0.5; + + level.hintElem setText( &"KILLHOUSE_HINT_C4_ICON" ); + //level.hintElem endon ( "death" ); + + posX = -16; + + if(getdvarint("gpad_in_use")) + { + if(getdvarint("gpad_style") == 0 ) + level.iconElem = maps\_hud_util::createIcon( "hud_dpad", 32, 32 ); + else + level.iconElem = maps\_hud_util::createIcon( "hud_dpad_ps3", 32, 32 ); + level.iconElem.hidewheninmenu = true; + level.iconElem maps\_hud_util::setPoint( "TOP", undefined, posX, 155 ); + posX += 32; + } + + level.iconElem2 = maps\_hud_util::createIcon( "hud_icon_c4", 32, 32 ); + level.iconElem2.hidewheninmenu = true; + level.iconElem2 maps\_hud_util::setPoint( "TOP", undefined, posX, 155 ); + + + level waittill ( "c4_equiped" ); + + if(getdvarint("gpad_in_use")) + { + level.iconElem3 = maps\_hud_util::createIcon( "hud_arrow_down", 24, 24 ); + level.iconElem3.hidewheninmenu = true; + level.iconElem3 maps\_hud_util::setPoint( "TOP", undefined, -16, 159 ); + level.iconElem3.sort = 1; + level.iconElem3.color = (1,1,0); + level.iconElem3.alpha = .7; + } + + + level waittill ( "C4_the_car" ); + + if(getdvarint("gpad_in_use")) + { + level.iconElem maps\_hud_util::setPoint( "CENTER", "BOTTOM", -320, -20, 1.0 ); + level.iconElem3 maps\_hud_util::setPoint( "CENTER", "BOTTOM", -320, -20, 1.0 ); + } + + level.iconElem2 maps\_hud_util::setPoint( "CENTER", "BOTTOM", -320, -20, 1.0 ); + + if(getdvarint("gpad_in_use")) + { + level.iconElem scaleovertime(1, 20, 20); + level.iconElem3 scaleovertime(1, 15, 15); + } + + level.iconElem2 scaleovertime(1, 20, 20); + + wait .85; + if(getdvarint("gpad_in_use")) + { + level.iconElem fadeovertime(.15); + level.iconElem.alpha = 0; + + level.iconElem3 fadeovertime(.15); + level.iconElem3.alpha = 0; + } + + + level.iconElem2 fadeovertime(.15); + level.iconElem2.alpha = 0; + + if(getdvarint("gpad_in_use")) + { + level.iconElem destroy(); + level.iconElem3 destroy(); + } + + level.iconElem2 destroy(); +} + +auto_aim() +{ + if ( level.console ) + { + if(isdefined( getdvar("input_autoaim") ) || isdefined( getdvar("gpad_aimassist") ) ) + if ( getdvar("input_autoaim") == "1" || getdvar( "gpad_aimassist") == "1" ) + return true; + } + return false; +} \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/scripts/override_vars.gsc b/iw3sp_mod_ff_src/raw/scripts/override_vars.gsc new file mode 100644 index 0000000..c35a5aa --- /dev/null +++ b/iw3sp_mod_ff_src/raw/scripts/override_vars.gsc @@ -0,0 +1,13 @@ +main() +{ + waittillframeend; + level.xenon = (getDvarInt("gpad_in_use") && getDvarInt("gpad_style") == 0 ); + level.ps3 = (getDvarInt("gpad_in_use") && getDvarInt("gpad_style") == 1 ); + level.console = (getDvarInt("gpad_in_use")); + + // for text font scale and fontname. + if(level.script == "ac130" && getdvar( "credits_load" ) == "1") + { + level.console = (getDvarInt("console_menu_style")); + } +} \ No newline at end of file diff --git a/iw3sp_mod_ff_src/raw/spanish/localizedstrings/iw3sp_mod_loc.str b/iw3sp_mod_ff_src/raw/spanish/localizedstrings/iw3sp_mod_loc.str index 3966a5e..2b6ff70 100644 --- a/iw3sp_mod_ff_src/raw/spanish/localizedstrings/iw3sp_mod_loc.str +++ b/iw3sp_mod_ff_src/raw/spanish/localizedstrings/iw3sp_mod_loc.str @@ -350,4 +350,10 @@ LANG_SPANISH "Paintball" REFERENCE MENU_CHEATS_DESC9 LANG_SPANISH "¿No puedes manejar la brutalidad de la guerra? Prueba las pistolas de paintball." +REFERENCE KILLHOUSE_DEMOLITIONS_TRAINING +LANG_SPANISH "(Opcional) Completa la evaluación de armas explosivas." + +REFERENCE KILLHOUSE_RUN_THE_OBSTACLE_COURSE +LANG_SPANISH "(Opcional) Completa el circuito de obstáculos." + ENDMARKER \ No newline at end of file diff --git a/iw3sp_mod_ff_src/zone_source/english_iw3sp_mod_patch.csv b/iw3sp_mod_ff_src/zone_source/english_iw3sp_mod_patch.csv index bc55c4f..0b5c754 100644 --- a/iw3sp_mod_ff_src/zone_source/english_iw3sp_mod_patch.csv +++ b/iw3sp_mod_ff_src/zone_source/english_iw3sp_mod_patch.csv @@ -52,4 +52,13 @@ font,fonts/smallfontxenon,, font,fonts/boldfontxenon,, font,fonts/normalfontxenon,, font,fonts/extrabigfontxenon,, -font,fonts/objectivefontxenon,, \ No newline at end of file +font,fonts/objectivefontxenon,, + +rawfile,buttons_default.cfg +rawfile,buttons_default_alt.cfg +rawfile,buttons_lefty.cfg +rawfile,buttons_lefty_alt.cfg +rawfile,buttons_tactical.cfg +rawfile,buttons_tactical_alt.cfg +rawfile,options_iw3sp_mod.cfg +rawfile,options_iw3sp_mod_set.cfg \ No newline at end of file diff --git a/iw3sp_mod_ff_src/zone_source/iw3sp_mod.csv b/iw3sp_mod_ff_src/zone_source/iw3sp_mod.csv index 915cf47..0e16f9a 100644 --- a/iw3sp_mod_ff_src/zone_source/iw3sp_mod.csv +++ b/iw3sp_mod_ff_src/zone_source/iw3sp_mod.csv @@ -9,7 +9,9 @@ rawfile,scripts/ac130/credits.gsc rawfile,scripts/airlift/dialogue_nuke.gsc rawfile,scripts/blackout/gaz_tango_down_fix.gsc rawfile,scripts/bog_a/three_coming_out.gsc -rawfile,scripts/killhouse/killhouse.gsc +rawfile,scripts/killhouse/best_squad_record.gsc +rawfile,scripts/killhouse/h1_killhouse.gsc +rawfile,scripts/killhouse/hint.gsc rawfile,scripts/launchfacility_a/loudspeaker.gsc rawfile,scripts/launchfacility_b/loudspeaker.gsc rawfile,scripts/simplecredits/credits.gsc @@ -26,6 +28,7 @@ rawfile,scripts/_names_ru.gsc rawfile,scripts/_player_stats.gsc rawfile,scripts/battlechatter.gsc +rawfile,scripts/override_vars.gsc rawfile,scripts/paintball.gsc material,trophy_0 diff --git a/iw3sp_mod_ff_src/zone_source/portuguese_iw3sp_mod_patch.csv b/iw3sp_mod_ff_src/zone_source/portuguese_iw3sp_mod_patch.csv index 87d3a8c..4a91ae3 100644 --- a/iw3sp_mod_ff_src/zone_source/portuguese_iw3sp_mod_patch.csv +++ b/iw3sp_mod_ff_src/zone_source/portuguese_iw3sp_mod_patch.csv @@ -3,7 +3,6 @@ ignore,common localize,iw3sp_mod_loc localize,iw3sp_mod_loc_discord localize,achievement -stringtable,video/pt/vidsubtitles.csv material,button_xbox_01 material,button_xbox_02 material,button_xbox_03 diff --git a/iw3sp_mod_ff_src/zone_source/slovak_iw3sp_mod_patch.csv b/iw3sp_mod_ff_src/zone_source/slovak_iw3sp_mod_patch.csv index 418e7e7..4a91ae3 100644 --- a/iw3sp_mod_ff_src/zone_source/slovak_iw3sp_mod_patch.csv +++ b/iw3sp_mod_ff_src/zone_source/slovak_iw3sp_mod_patch.csv @@ -3,7 +3,6 @@ ignore,common localize,iw3sp_mod_loc localize,iw3sp_mod_loc_discord localize,achievement -stringtable,video/sk/vidsubtitles.csv material,button_xbox_01 material,button_xbox_02 material,button_xbox_03 diff --git a/src/Components/Modules/GSC/GSC.cpp b/src/Components/Modules/GSC/GSC.cpp index 9d985c3..a8cc55e 100644 --- a/src/Components/Modules/GSC/GSC.cpp +++ b/src/Components/Modules/GSC/GSC.cpp @@ -118,6 +118,24 @@ namespace Components return Game::Scr_AddString(Utils::String::ToUpper(str).c_str()); }, false); + + //Should create the function for all asset type? :thinking: + GSC::AddFunction("AssetIsExisting", [] + { + const auto asset_type = Game::Scr_GetInt(0); + const auto asset_name = Game::Scr_GetString(1); + + if (asset_type < 0 || asset_type >= Game::XAssetType::ASSET_TYPE_COUNT) + { + Game::Scr_Error(Utils::String::VA("Invalid pool passed must be between [0, %d]\n", Game::XAssetType::ASSET_TYPE_COUNT - 1)); + return; + } + + Game::XAssetType xasset_type = static_cast(asset_type); + + const auto asset = Game::DB_FindXAssetHeader(xasset_type, asset_name).data; + return Game::Scr_AddInt(asset != nullptr ? 1 : 0); + }, false); } Game::xmethod_t GSC::Player_GetMethod_Stub(const char** name)