@Wetter42
In regard to your general area of current ped/seating research, probably worth taking a look in 'scenarios.meta at some point, if you haven't already:
...\Grand Theft Auto V\mods\update\update.rpf\common\data\ai\scenarios.meta
That's where 'PROP_HUMAN_SEAT_CHAIR' & other such archetype extension '<spawnType>'s are located.
In the 'PROP_HUMAN_SEAT_CHAIR' 'CScenarioPlayAnimsInfo' you'll find lines to control what peds/ped groups can spawn & what restrictions/conditions/reactions the seat places on peds that spawn on it (like making it so that only females/males from a given ped group can spawn there, or what direction they move in when threatened etc). Also, there are '<Flags>' lines that you may want to have a look at too.
Example:
<Item type="CScenarioPlayAnimsInfo"> <Name>PROP_HUMAN_SEAT_CHAIR</Name> <PropName /> <Models ref="NULL" /> <!-- you can enter 'CAmbientModelSet's from 'ambientpedmodelsets.meta' here --> <BlockedModels ref="CANT_SIT_DOWN" /> <!-- if enter '<BlockedModels ref="NULL" />' here, likely remove 'CANT_SIT_DOWN' ped restriction --> <SpawnProbability value="1.000000" /> <SpawnInterval value="0" /> <SpawnHistoryRange value="50.000000" /> <MaxNoInRange value="0" /> <PropEndOfLifeTimeoutMS value="60000" /> <Range value="0.000000" /> <SpawnPropIntroDict /> <SpawnPropIntroAnim /> <StationaryReactHash>CODE_HUMAN_COWER</StationaryReactHash> <!-- maybe worth investigating/test removing etc --> <SpawnPropOffset x="0.000000" y="0.000000" z="0.000000" /> <SpawnPropRotation x="0.000000" y="0.000000" z="0.000000" w="0.000000" /> <TimeTilPedLeaves value="-1.000000" /> <ChanceOfRunningTowards value="0.000000" /> <Flags>AllowConversations AttachPed DontActivateRagdollForCollisionWithPlayerBumpImpact DontSpawnInRain DontTimeoutUntilIdleFinishes IgnoreLowShockingEvents NavmeshBlocking NoBulkyItems NoMeleeTakedowns PreferMeleeRagdoll SeatedScenario ValidateExitsWithProbeChecks</Flags> <Condition type="CScenarioConditionRaining"> <Result>False</Result> </Condition> ...Note:
That's just the top section of the 'PROP_HUMAN_SEAT_CHAIR' entry. It has much more to it than just that (over 2500 lines in total, mostly conditions).
Maybe setting this:
<Item type="CScenarioConditionAmbientEventDirection"> <Result>True</Result> <Direction x="0.000000" y="0.000000" z="0.000000" /> <!-- all zero etc --> <Threshold value="0.707000" /> <FlattenZ value="true" /> </Item>might stop running away (if that's an issue. No vanilla entries have xyz all set to zero anyway). Might just make direction random tho, only testing would answer.
The 'CODE_HUMAN_COWER' in the '<StationaryReactHash>' is also located further down in 'scenarios.meta' & probably also worth looking at, given it at least somewhat relates to the peds reaction to a threat etc.
Lots of other interesting stuff in 'scenarios.meta' as well, well worth a look
Some Additional Threat/Flee etc Info:
taskdata.meta
Has flags like 'DisableCower' (Note: 'cower', not cover), 'DisableHandsUp', 'DisablePotentialBlastResponse' & 'DisableReactAndFleeAnimation' (don't think 'DisableReactAndFleeAnimation' will stop runnng away, just disable flailing arm animation or something most likely. Is set on animals in vanilla, they still flee etc)
peds.ymt:
<TargetingThreatModifier value="0.00000000"/>Used only by birds in vanilla file (presume they don't flee when aimed at etc, but never checked). All other peds set to 1.000000 anyway.
pedpersonality.ymt:
Has different bravery types that can be utilised in the '<PedPersonalities>' section of the same file. Say, if you ever want peds to fight back rather than flee or be less cowardly when shocking events happen etc.
Example:
<BraveryTypes> <Item> <Name>default</Name> <Flags>BF_GET_PISSED_WHEN_HIT_BY_CAR BF_PLAY_CAR_HORN BF_PURSUE_WHEN_HIT_BY_CAR BF_COWARDLY_FOR_SHOCKING_EVENTS BF_BOOST_BRAVERY_IN_GROUP BF_CAN_ACCELERATE_IN_CAR BF_ALLOW_CONFRONT_FOR_TERRITORY_REACTIONS</Flags> <TakedownProbability value="0.900000" /> <ThreatResponseUnarmed> <Action> <Weights> <Fight value="0.300000" /> <Flee value="0.700000" /> </Weights> </Action> <Fight> <Weights> <KeepWeapon value="0.000000" /> <MatchTargetWeapon value="0.500000" /> <EquipBestWeapon value="0.500000" /> </Weights> <ProbabilityDrawWeaponWhenLosing value="0.500000" /> </Fight> </ThreatResponseUnarmed> <ThreatResponseMelee> <Action> <Weights> <Fight value="0.150000" /> <Flee value="0.850000" /> </Weights> </Action> <Fight> <Weights> <KeepWeapon value="0.000000" /> <MatchTargetWeapon value="0.500000" /> <EquipBestWeapon value="0.500000" /> </Weights> <ProbabilityDrawWeaponWhenLosing value="0.500000" /> </Fight> </ThreatResponseMelee> <ThreatResponseArmed> <Action> <Weights> <Fight value="0.000000" /> <Flee value="1.000000" /> </Weights> </Action> <Fight> <Weights> <KeepWeapon value="0.000000" /> <MatchTargetWeapon value="0.500000" /> <EquipBestWeapon value="0.500000" /> </Weights> <ProbabilityDrawWeaponWhenLosing value="0.500000" /> </Fight> </ThreatResponseArmed> <FleeDuringCombat> <Enabled value="false" /> <ChancesWhenBuddyKilledWithScaryWeapon value="0.000000" /> </FleeDuringCombat> </Item>There are plenty more files with threat/response/flee/react etc in them too. If you don't already use it, the best way to find stuff is with a binary search in CodeWalker ('[Tools...]' button > 'Binary search...') & search for any related keywords you can think of, & take a look in the files etc