Awesome, thanks dude. I tested out all of the messages under both Player and GameObject and took some notes. Most of these are obvious but I figured I may as well include them.
Code: Select all
msg={
Player={
CBoxSlideEnd={freq='once', info='after cbox slide end'},
CalcFultonPercent={freq='continuous', info='on player next to fultonable object'},
CallMenuMessage_HideCallMenu={freq='once', info='on call menu close'},
CallMenuMessage_ShowCallMenu={freq='once', info='on call menu open'},
EnableCQC={freq='once', info='on CQC icon popup'},
FinishOpeningDemoOnHeli={freq='once', info='on control given back to player after init heli door open'},
IconCrawlStealthShown={freq='once', info='on prone stealth icon popup'},
IconFultonShown={freq='once', info='on fulton icon popup'},
IconMBCBoxShown={freq='once', info='on player next to supply drop box'},
IconTBoxOnShown={freq='once', info='on trash box icon popup'},
IconToiletOnShown={freq='once', info='on toilet icon popup'},
LandingFromHeli={freq='once', info='on player exit heli'},
OnAmmoLessInMagazine={freq='once', info='on trigger pull on empty mag'},
OnBehind={freq='once', info='on player start press against cover'},
OnBinocularsMode={freq='varies', info='fires once while using binos or continuous while in first-person vehicle primary turret'},
OnComeOutSupplyCbox={freq='once', info='on finish supply box'},
OnCrawl={freq='once', info='on entering prone stance'},
OnElude={freq='once', info='on hang ledge'},
OnEquipHudClosed={freq='once', info='on closing equipment slot ui'},
OnEquipItem={freq='once', info='on active item change'},
OnEquipWeapon={freq='once', info='on weapon/support slot change'},
OnPickUpCollection={freq='once', info='on player picked plant, small container, etc.'},
OnPickUpSupplyCbox={freq='once', info='on start supply box'},
OnPlayerElude={freq='once', info='on player hang ledge'},
OnPlayerGatling={freq='once', info='on player enter stationary AA gun'},--didn't test
OnPlayerHeliHatchOpen={freq='once', info='on control given back to player after init heli door open'},
OnPlayerMachineGun={freq='once', info='on player enter stationary MG'},--does not include vehicle MG
OnPlayerMortar={freq='once', info='on player enter statonary mortar'},
OnPlayerSearchlight={freq='once', info='on player use searchlight'},
OnPlayerToilet={freq='once', info='player in toilet'},
OnVehicleDrive={freq='once', info='fires after getting in vehicles'},
OnVehicleRide_Start={freq='once', info='on player in/out vehicle or pilotable object'},
PlayerDamaged={freq='once', args={'playerIndex','attackId','attackerId'}, info='on player damage'},
PlayerHeliGetOff={freq='once', info='on player exit heli'},
PlayerHoldWeapon={freq='once', info='on player weapon aim'},
PressedCarryIcon={freq='once', info='player start/stop carry or left ene veh'},
PutMarkerWithBinocle={freq='once', info='manual marker placement with binos'},
SetMarkerBySearch={freq='once', info='marker autoplacement via binos or zoom'},
StartPlayerBrainFilter={freq='once', info='on heavy damage that obscures vision with blood'},
SuppressorIsBroken={freq='once', info='on suprressor break'},
WarpEnd={freq='once', info='on control given back to player after init heli door open'}
},
Object={
BreakGimmick={freq='once', info='stationary enemy equip destroy (weapons, guard tower}'},
ChangePhase={freq='varies', args={'gameObjectId','newPhase','oldPhase'}, info='once on phase change or multiple if patrol truck passes from alert base to another'},
CommandPostAnnihilated={freq='once', info='on base or guard post capture'},--use with TppEnemy.IsBaseCp(arg0) & TppEnemy.IsOuterBaseCp(arg0)
Concious={freq='once', info='transition from unconcious -> concious'},
ConversationEnd={freq='once', info='conversation stopped naturally or interrupted by player or prevented from starting'},
Damage={freq='once', args={'gameId','attackId','attackerId'}, info='AI recieved damage'},--apparently needs to be something that can "report" damage to engine, not empty vehicle or random object
Down={freq='once', info='AI knocked to ground (bleed out, CQC, etc)'},
EndInvestigate={freq='once', info='on AI player search end'},
Fulton={freq='once', info='on object fultoned'},
HeadShot={freq='once', info='on neutralize with headshot'},
HeadShotDistance={freq='once', info='on neutralize with headshot'},
Holdup={freq='once', info='player heldup AI'},
InAnimalLocator={freq='once', info='entered spawn area of animal pack/herd'},
Interrogate={freq='once', info='on player interrogate soldier'},
InterrogateEnd={freq='once', info='interrogation failure'},
InterrogateSetMarker={freq='once', info='interrogation success, enemy gave asset position'},
InterrogateUpHero={freq='once', info='interrogation earned heroism'},
MapUpdate={freq='once', info='on map update announce'},
Neutralize={freq='once', info='on dead, unconcious, destroyed, or held up'},
PlayerHideHorse={freq='once', info='on player start horse hide'},
RadioEnd={freq='once', info='on AI radio end'},
Restraint={freq='once', info='object is being restrained (player CQC hold)'},
RouteEventFaild={freq='once', info='apparently error feedback if AI route fails'},
SpecialActionEnd={freq='once', info='triggers every few seconds in ACC'},
TapCqc={freq='once', info='on neutralize with CQC in valid way for tactical action point.'},
TapHoldup={freq='once', info='holdup qualifies for mission tactical action point bonus'},
TapRocketArm={freq='once', info='on neutralize with rocket arm in valid way for tactical action point'},
Unconcious={freq='once', info='AI knocked unconcious'},
VehicleAction={freq='once', info='on misc AI actions with vehicle including in/out'},
VehicleBroken={freq='once', info='vehicle engine fire start (blowup countdown) and after second explosion'}
}
}
Messages like OnPlayerMortar only fire once but I guess player status and the message IconFultonShown could be monitored easily enough to check if the player left a stationary weapon. SpecialActionEnd is a weird one. It just kind of triggers every few seconds if you're in the ACC. I'm not sure exactly what triggers RouteEventFaild but that might be a useful debug message for anyone toying with AI routes.
I got around to messing with vars.playerPlayFlag. It only updates on mission completion or new flag activation. Meaning you can reset it to 256 or 0 to keep track of when stealth camo is used again but the flag doesn't update while the item is active, only at the start of each use.
Things that apparently don't negate the No Traces bonus based on that: killing/CQCing animals and driving into exploding barrels.
edit: here's how I ended up checking cbox and stealth camo items in case anyone was curious:
Code: Select all
function e.isCboxCamo(cbox)
local t={TppEquip.EQP_IT_CBox_WR,TppEquip.EQP_IT_CBox_SMK}
for i=1,#t do
if cbox==t[i] then
return false
end
end
return true
end
function e.cboxCamoType(cbox)
local boxType={
desert={TppEquip.EQP_IT_CBox_DSR,TppEquip.EQP_IT_CBox_DSR_G01,TppEquip.EQP_IT_CBox_DSR_G02},
green={TppEquip.EQP_IT_CBox_FRST,TppEquip.EQP_IT_CBox_FRST_G01},
red={TppEquip.EQP_IT_CBox_BOLE,TppEquip.EQP_IT_CBox_BOLE_G01},
urban={TppEquip.EQP_IT_CBox_CITY,TppEquip.EQP_IT_CBox_CITY_G01},
mix={TppEquip.EQP_IT_CBox_CLB_A,TppEquip.EQP_IT_CBox_CLB_A_G01},
rock={TppEquip.EQP_IT_CBox_CLB_B,TppEquip.EQP_IT_CBox_CLB_B_G01},
wet={TppEquip.EQP_IT_CBox_CLB_C,TppEquip.EQP_IT_CBox_CLB_C_G01}
}
local s={'desert','green','red','urban','mix','rock','wet'}
for i=1,#s do
for _,v in ipairs(boxType[s[i]]) do
if cbox==v then
return s[i]
end
end
end
return false
end
function e.isStealthItem(item)
local t={TppEquip.EQP_IT_InstantStealth,TppEquip.EQP_IT_Stealth,TppEquip.EQP_IT_ParasiteCamouf}
for i=1,#t do
if item==t[i] then
return true
end
end
return false
end
function e.stealthItemType(item)
local t={
limited=TppEquip.EQP_IT_InstantStealth,
battery=TppEquip.EQP_IT_Stealth,
parasite=TppEquip.EQP_IT_ParasiteCamouf
}
for k,v in pairs(t) do
if item==v then
return k
end
end
return false
end
function e.Messages()
return Tpp.StrCode32Table{
Player={
{msg='PlayerDamaged',func=e.OnPlayerDamaged},
{msg='OnEquipItem',func=e.OnEquipItem}
}
}
end
function e.Init(missionTable)
e.messageExecTable=Tpp.MakeMessageExecTable(e.Messages())
end
function e.OnReload(missionTable)
e.messageExecTable=Tpp.MakeMessageExecTable(e.Messages())
end
function e.OnMessage(sender,messageId,arg0,arg1,arg2,arg3,strLogText)
Tpp.DoMessage(e.messageExecTable,TppMission.CheckMessageOption,sender,messageId,arg0,arg1,arg2,arg3,strLogText)
end
function e.OnPlayerDamaged()
e.var.stealthCamo=false
e.var.keepTime.parasiteStealth=false
end
function e.OnEquipItem()
local itemIndex=vars.items[vars.currentItemIndex]
if e.var.stealthCamo~='parasite' then
e.var.stealthCamo=false
elseif e.isStealthItem(itemIndex) then
e.var.keepTime.parasiteStealth=false
end
if Player.IsVarsCurrentItemCBox() then
e.var.ride='cbox'
if e.isCboxCamo(itemIndex) then
e.var.cboxCamo=e.cboxCamoType(itemIndex)
return
end
e.var.cboxCamo=false
return
elseif e.var.ride=='cbox' then
e.var.ride='none'
end
e.var.cboxCamo=false
if e.isStealthItem(itemIndex) then
e.var.stealthCamo=e.stealthItemType(itemIndex)
if e.var.stealthCamo=='parasite' then
e.var.keepTime.parasiteStealth=(Time.GetRawElapsedTimeSinceStartUp()+30)--need to get actual time based on suit grade
end
return
end
end
function e.checkStealthItem(guardPhase)
if not guardPhase or not e.var.stealthCamo then return 0 end
if guardPhase==_.PHASE_ALERT then
e.var.keepTime.parasiteStealth=false
e.var.stealthCamo=false
return 0
end
local n=e.index.points.item
if e.var.stealthCamo~='parasite' then
return n.stealthCamo
else
if e.var.keepTime.parasiteStealth then
if e.buttonHold<e.var.keepTime.parasiteStealth then
return n.parasiteCamo
end
end
end
return 0
end