Forked from eur0pa/mgsv_tpp_nuclear_disarmament_dump.lua
Created
May 2, 2016 13:36
-
-
Save JohnnyWalkerDigital/5e8b7ad1ff87f4518ff249e83cb6a968 to your computer and use it in GitHub Desktop.
MGSV:TPP nuclear disarmament LUA scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- -------------------------------------------------------------------------- -- | |
-- in: TppDefine.lua | |
-- -------------------------------------------------------------------------- -- | |
-- list of cutscenes available upon returning to mother base | |
-- ordered by priority | |
_.MB_FREEPLAY_DEMO_PRIORITY_LIST={ | |
"GoToMotherBaseAfterQuietBattle", -- quiet's heli fight | |
"ArrivedMotherBaseAfterQuietBattle", -- quiet's arrival | |
"ArrivedMotherBaseFromDeathFactory", | |
"ArrivedMotherBaseLiquid", | |
"QuietReceivesPersecution", -- quiet's fight with soldiers | |
"TheGreatEscapeLiquid", | |
"ParasiticWormCarrierKill", | |
"AnableDevBattleGear", | |
"DevelopedBattleGear1", | |
"QuietHasFriendshipWithChild", -- quiet's cutscene: shabani's necklace | |
"QuietOnHeliInRain", -- quiet's rain cutscene | |
"InterrogateQuiet", -- quiet's salt water torture | |
"DecisionHuey", -- huey's interrogation | |
"EntrustDdog", | |
"DdogComeToGet", | |
"DdogGoWithMe", | |
"HappyBirthDayWithQuiet", -- snake's bday w/ quiet | |
"HappyBirthDay", -- snake's bday w/o quiet | |
"AttackedFromOtherPlayer_KnowWhereFrom", | |
"AttackedFromOtherPlayer_UnknowWhereFrom", | |
"QuietWishGoMission", -- quiet's first mission | |
"NuclearEliminationCeremony", -- <<< NUCLEAR | |
"ForKeepNuclearElimination", -- <<< NUCLEAR | |
"SacrificeOfNuclearElimination", -- <<< NUCLEAR | |
"MoraleOfMBIsLow", | |
"EliLookSnake", | |
"LiquidAndChildSoldier", | |
"OcelotIsPupilOfSnake", | |
"CodeTalkerSunBath", | |
"LongTimeNoSee_DdogSuperHighLikability", | |
"LongTimeNoSee_DdogHighLikability", | |
"LongTimeNoSee_DdogLowLikability", | |
"LongTimeNoSee_DdogPup", | |
"LongTimeNoSee_DDSoldier", | |
"SnakeHasBadSmell_000", -- quiet's shower scene (arrival) | |
"SnakeHasBadSmell_001", -- quiet's shower scene (her cell) | |
"SnakeHasBadSmell_WithoutQuiet", | |
"PazPhantomPain1", | |
"PazPhantomPain2", | |
"PazPhantomPain4", | |
"PazPhantomPain4_jp", -- paz's censored (jp) cutscene | |
"DetailsNuclearDevelop", -- <<< NUCLEAR | |
"EndingSacrificeOfNuclear", -- <<< NUCLEAR | |
"DevelopedBattleGear2", | |
"DevelopedBattleGear4", | |
"DevelopedBattleGear5", | |
"ArrivedMotherBaseChildren" | |
} | |
-- list of radio calls inviting (forcing) the player to return to mother base | |
-- in order to watch these cutscenes: | |
_.FORCE_MB_RETURN_RADIO_LIST={ | |
"OpenDecisionHuey", -- huey's interrogation | |
"EliImprisonment", | |
"PermitParasiticWormCarrierKill", | |
"InterrogateQuietRadio", -- quiet's interrogation | |
"QuietHasFriendshipWithChildRadio", -- shabani's necklace | |
"AnableDevBattleGearRadio", | |
"ParasiticWormCarrierQuarantine", | |
"CompliteDevelopBattleGearRadio", | |
"DevelopedBattleGear_1Radio", | |
"EliLookSnakeRadio", | |
"EntrustDdogRadio", | |
"DdogComeToGetRadio", | |
"DdogGoWithMeRadio", | |
"HappyBirthDayRadio", -- snake's bday | |
"AttackedFromOtherPlayerRadio", | |
"NuclearEliminationCeremonyRadio", -- <<< NUCLEAR | |
"MoraleOfMBIsLowRadio", | |
"GeneralPurposeRadio", | |
"QuietReceivesPersecutionRadio" -- quiet's fight with soldiers | |
} | |
-- ??? | |
_.MB_FREEPLAY_LARGEDEMO={ | |
"GoToMotherBaseAfterQuietBattle", | |
"NuclearEliminationCeremony", -- <<< NUCLEAR | |
"DecisionHuey", | |
"InterrogateQuiet", | |
"TheGreatEscapeLiquid" | |
} | |
-- player stats enum | |
_.RANKING_ENUM=Tpp.Enum{ | |
"TotalTacticalTakeDownCount", | |
"XPersonMarkingTime", | |
"FirstHeadShotTime", | |
"FirstHeadShotTimeTranq", | |
"FirstCommandPostAnnihilateTime", | |
"CboxGlidingDistance", | |
"MechaNeutralizeCount", | |
"LongestBirdShotDistance", | |
"XPersonPerfectStealthCQCNeutralizeTime", | |
"XRocketArmNeutralizeTime", | |
"FobSneakingGoalCount", | |
"FobDefenceSucceedCount", | |
"NuclearDisposeCount", -- <<< [12] | |
"mtbs_q42010", | |
"mtbs_q42020", | |
"mtbs_q42030", | |
"mtbs_q42040", | |
"mtbs_q42050", | |
"mtbs_q42060", | |
"mtbs_q42070" | |
} | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppDemo.lua (cutscenes) | |
-- -------------------------------------------------------------------------- -- | |
e.mtbsPriorityFuncList={ | |
-- ... snip ... | |
NuclearEliminationCeremony=function() | |
if not gvars.f30050_isInitNuclearAbolitionCount then | |
return false | |
end | |
local n=TppStory.GetCurrentStorySequence() >= TppDefine.STORY_SEQUENCE.CLEARD_OKB_ZERO | |
local e=TppServerManager.GetNuclearAbolitionCount() | |
local a=e >= 0 | |
local e=gvars.f30050_NuclearAbolitionCount < e | |
if (a and n) and e then | |
if vars.mbmIsNuclearDeveloping == 0 and TppMotherBaseManagement.GetResourceUsableCount{resource="NuclearWeapon"} == 0 then | |
return true | |
else | |
gvars.f30050_needUpdateNuclearFlag=true | |
return false | |
end | |
end | |
return false | |
end, | |
ForKeepNuclearElimination=function() | |
return false | |
end, | |
SacrificeOfNuclearElimination=function() | |
return false | |
end | |
DetailsNuclearDevelop=function() | |
return false | |
end, | |
EndingSacrificeOfNuclear=function() | |
return false | |
end | |
} -- e.mtbsPriorityFuncList{} | |
function e.UpdateNuclearAbolitionFlag() | |
if gvars.f30050_needUpdateNuclearFlag then | |
gvars.f30050_NuclearAbolitionCount=TppServerManager.GetNuclearAbolitionCount() | |
gvars.f30050_discardNuclearCountFromLastAbolition=TppMotherBaseManagement.GetResourceUsableCount{resource="NuclearWaste"} | |
gvars.f30050_needUpdateNuclearFlag=false | |
end | |
end | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppGVars.lua (globals) | |
-- -------------------------------------------------------------------------- -- | |
-- seen in TppDemo.lua:e.UpdateNuclearAbolitionFlag() | |
-- will update the other 'f30050' vars if asked to | |
{name="f30050_needUpdateNuclearFlag",type=TppScriptVars.TYPE_BOOL,value=false,save=false} | |
-- seen in TppDemo.lua:NuclearEliminationCeremony() | |
{name="f30050_NuclearAbolitionCount",type=TppScriptVars.TYPE_UINT32,value=0,save=true,category=TppScriptVars.CATEGORY_MISSION}, | |
{name="f30050_isInitNuclearAbolitionCount",type=TppScriptVars.TYPE_BOOL,value=false,save=true,category=TppScriptVars.CATEGORY_MISSION}, | |
{name="f30050_discardNuclearCountFromLastAbolition",type=TppScriptVars.TYPE_UINT32,value=0,save=true,category=TppScriptVars.CATEGORY_MISSION} | |
-- should just be stats | |
{name="rnk_NuclearDisposeCount",type=TppScriptVars.TYPE_UINT32,value=0,save=true,category=TppScriptVars.CATEGORY_GAME_GLOBAL} | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppHero.lua (hero / demon points) | |
-- -------------------------------------------------------------------------- -- | |
-- +1508 hero points, -1509 demon points for each nuclear disarmament | |
e.NuclearAbolition={heroicPoint=5e4,ogrePoint=-5e5} | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppMain.lua | |
-- -------------------------------------------------------------------------- -- | |
-- line 232: calls the function in TppDemo.lua | |
TppDemo.UpdateNuclearAbolitionFlag() | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppMbFreeDemo.lua | |
-- -------------------------------------------------------------------------- -- | |
NuclearEliminationCeremony="p51_020010_000_final", | |
DetailsNuclearDevelop="p51_020030_01movie", | |
ForKeepNuclearElimination="p51_020020_000_final", | |
SacrificeOfNuclearElimination="p51_020040_000_final", | |
EndingSacrificeOfNuclear="p51_020030_02movie" | |
-- ... | |
NuclearEliminationCeremony={"/Assets/tpp/pack/mission2/free/f30050/f30050_d1000.fpk"}, | |
DetailsNuclearDevelop={"/Assets/tpp/pack/mission2/free/f30050/f30050_m20030.fpk"}, | |
ForKeepNuclearElimination={"/Assets/tpp/pack/mission2/free/f30050/f30050_d1010.fpk"}, | |
SacrificeOfNuclearElimination={"/Assets/tpp/pack/mission2/free/f30050/f30050_d1020.fpk"}, | |
EndingSacrificeOfNuclear={"/Assets/tpp/pack/mission2/free/f30050/f30050_m20031.fpk"} | |
-- ... | |
NuclearEliminationCeremony={ | |
weather=TppDefine.WEATHER.SUNNY, | |
time="17:20:00", | |
GetNextDemoNameOrNil=function() | |
if TppMotherBaseManagement.IsNuclearDeveloped() then | |
return"DetailsNuclearDevelop" | |
elseif TppMotherBaseManagement.IsNuclearDiscarded() then | |
return"ForKeepNuclearElimination" | |
else | |
return"SacrificeOfNuclearElimination" | |
end | |
end, | |
OnEnter=function() | |
TppPlayer.Refresh() | |
PlatformConfiguration.SetShareScreenEnabled(false) | |
function f30050_sequence.FinishNuclearAbolitionEndint() | |
TppUiStatusManager.UnsetStatus("AnnounceLog","INVALID_LOG") | |
PlatformConfiguration.SetShareScreenEnabled(true) | |
TppSoundDaemon.ResetMute"Result" | |
f30050_sequence.ReserveMissionClear() | |
local e=TppMotherBaseManagement.GetResourceUsableCount{resource="NuclearWaste"} | |
if gvars.f30050_discardNuclearCountFromLastAbolition < e then | |
TppHero.SetAndAnnounceHeroicOgrePoint(TppHero.NuclearAbolition,nil,"announce_nuclear_zero") | |
end | |
gvars.f30050_discardNuclearCountFromLastAbolition=e | |
end | |
end, | |
telopLangIdList={"area_demo_mb","platform_main"} | |
}, | |
ForKeepNuclearElimination={ | |
weather=TppDefine.WEATHER.SUNNY, | |
time="17:45:00", | |
GetNextDemoNameOrNil=function() | |
return"SacrificeOfNuclearElimination" | |
end, | |
clusterName="Medical", | |
OnEnter=function() | |
TppDataUtility.SetVisibleDataFromIdentifier("uq_0040_AssetIdentifier","mtbs_antn001_0001",false,false) | |
end, | |
OnEnd=function() | |
TppDataUtility.SetVisibleDataFromIdentifier("uq_0040_AssetIdentifier","mtbs_antn001_0001",true,false) | |
end | |
}, | |
SacrificeOfNuclearElimination={ | |
weather=TppDefine.WEATHER.SUNNY,time="10:00:00", | |
clusterName="Develop", | |
GetNextDemoNameOrNil=function() | |
return"EndingSacrificeOfNuclear" | |
end, | |
OnEnter=function() | |
Player.SetPause() | |
TppDataUtility.SetVisibleDataFromIdentifier("MtbsCommon","sahelan_spl",false,false) | |
end, | |
OnEnd=function() | |
TppSoundDaemon.SetMute"Result" | |
end | |
}, | |
DetailsNuclearDevelop={ | |
isMovie=true, | |
OnEnter=function() | |
TppSoundDaemon.SetMute"Result" | |
end, | |
GetNextDemoNameOrNil=function() | |
if TppMotherBaseManagement.IsNuclearDiscarded() then | |
return"ForKeepNuclearElimination" | |
else | |
return"SacrificeOfNuclearElimination" | |
end | |
end}, | |
EndingSacrificeOfNuclear={ | |
isMovie=true, | |
OnEnter=function() | |
TppSound.SetSceneBGM"bgm_nuclear_ending" | |
TppUiCommand.NukeCountDownText("set","cmmn_nuclear_weapon_num",5,166666,15) | |
end, | |
OnEnd=function() | |
local e=TppServerManager.GetNuclearAbolitionCount() | |
if e > 0 then | |
gvars.f30050_NuclearAbolitionCount=e | |
end | |
TppUiCommand.NukeCountDownText"reset" | |
end | |
}, | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppMission.lua | |
-- -------------------------------------------------------------------------- -- | |
UI={ | |
{msg="EndTelopCast", | |
func=function() | |
if mvars.f30050_demoName == "NuclearEliminationCeremony" then | |
return | |
end | |
--- ... | |
-- line 1938: | |
local n=TppMotherBaseManagement.GetResourceUsableCount{resource="NuclearWaste"} | |
TppRanking.UpdateScore("NuclearDisposeCount",n) | |
TppRanking.SendCurrentRankingScore() | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppStory.lua | |
-- -------------------------------------------------------------------------- -- | |
NuclearEliminationCeremony={ | |
storyCondition=function() | |
return true | |
end, | |
detailCondition=function() | |
return TppDemo.mtbsPriorityFuncList.NuclearEliminationCeremony() | |
end, | |
demoName="NuclearEliminationCeremony" | |
}, | |
NuclearEliminationCeremonyRadio={ | |
storyCondition=function(e) | |
return e.demoName == "NuclearEliminationCeremony" | |
end, | |
detailCondition=function() | |
return true | |
end | |
NuclearWorld={ | |
storyCondition=function() | |
local t=TppServerManager.GetNuclearAbolitionCount() | |
local n=TppServerManager.GetNuclearNum() | |
local e=TppDemo.IsPlayedMBEventDemo"NuclearEliminationCeremony" | |
if (t ~= -1) then | |
if (e) and (n > 0) then | |
return true | |
end | |
end | |
return false | |
end, | |
detailCondition=function() | |
return TppMission.IsHelicopterSpace(TppMission.GetMissionID()) | |
end, | |
radioList={"f2000_rtrg1525"} | |
}, | |
-- -------------------------------------------------------------------------- -- | |
-- in: TppTerminal.lua | |
-- -------------------------------------------------------------------------- -- | |
function e.InitNuclearAbolitionCount() | |
if not gvars.f30050_isInitNuclearAbolitionCount then | |
if TppStory.GetCurrentStorySequence() >= TppDefine.STORY_SEQUENCE.CLEARD_OKB_ZERO then | |
local e=TppServerManager.GetNuclearAbolitionCount() | |
if e >= 0 then | |
gvars.f30050_NuclearAbolitionCount=e | |
gvars.f30050_isInitNuclearAbolitionCount=true | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment