10 [
Attribute(
desc:
"Holds all the set identity values of the entity")]
16 [
Attribute(
"18",
"When randomizing character age. This is the min age the character can be. Age is randomized between min(included) and max(included)",
params:
"18 inf 1")]
19 [
Attribute(
"26",
"When randomizing character age. This is the max age the character can be. Age is randomized between min(included) and max(included)",
params:
"18 inf 1")]
22 [
Attribute(
"1",
desc:
"If true will randomize any identity varriables that are not yet filled in")]
54 int seed =
Math.RandomInt(0, 0x7FFF);
89 Print(
"SCR_ExtendedIdentityComponent cannot randomize Identity as seed was not set!",
LogLevel.DEBUG);
95 Print(
"SCR_ExtendedIdentityComponent cannot randomize Identity as m_ExtendedIdentity is null!",
LogLevel.DEBUG);
173 if (newExtendedIdentity.
GetAge() > -1)
197 FactionAffiliationComponent factionAffiliation = FactionAffiliationComponent.Cast(owner.
FindComponent(FactionAffiliationComponent));
198 if (!factionAffiliation || (!factionAffiliation.GetAffiliatedFaction() && !factionAffiliation.GetDefaultAffiliatedFaction()))
201 FactionManager factionManager =
GetGame().GetFactionManager();
205 if (factionAffiliation.GetDefaultAffiliatedFaction())
206 m_ExtendedIdentity.SetFactionOfOrigin(factionManager.GetFactionIndex(factionAffiliation.GetDefaultAffiliatedFaction()));
208 m_ExtendedIdentity.SetFactionOfOrigin(factionManager.GetFactionIndex(factionAffiliation.GetAffiliatedFaction()));
243 if (!identityManager)
277 if (!identityManager)
293 if (!advanceOverwrite)
337 BaseGameMode gameMode =
GetGame().GetGameMode();
354 while (timeManager.CheckValidDate(1990, month, maxDay +1))
370 if (factionOfOrigin <= -1)
373 FactionManager factionManager =
GetGame().GetFactionManager();
400 if (!identityManager)
412 int seed, combinedBioIndex;
413 reader.ReadInt(seed);
414 reader.ReadInt(combinedBioIndex);
426 Print(
"'SCR_ExtendedIdentityComponent' Identity is null",
LogLevel.ERROR);
431 if (!gameMode || !gameMode.
IsMaster())
435 if (owner.
GetWorld() != gameMode.GetWorld())
ArmaReforgerScripted GetGame()
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_BaseGameMode GetGameMode()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external int SetEventMask(notnull IEntity owner, int mask)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
proto external Managed FindComponent(typename typeName)
proto external BaseWorld GetWorld()
SCR_EIdentityType GetIdentityType()
void RandomizeIdentityServer()
void AssignRandomBioServer()
Assign random bio (Server Only).
ref SCR_ExtendedIdentity m_ExtendedIdentity
bool m_bDelayedInitCalled
void RandomizeAge()
Set controlled random age of entity in years.
SCR_EIdentityType m_eIdentityType
ref SCR_IdentityBio m_IdentityBio
void SetRandomMonthOfCreation()
void OverwriteExtendedIdentity(SCR_ExtendedIdentity newExtendedIdentity)
void DelayedRandomizeIdentity()
void AssignBio(SCR_IdentityBio identityBio)
void DelayedInit(IEntity owner)
SCR_IdentityBio GetIdentityBio()
void RandomizePlaceOfOrigin()
void SetRandomDayOfCreation(int month=-1)
override void EOnInit(IEntity owner)
override bool RplLoad(ScriptBitReader reader)
void GetBioIndexes(out int bioGroupIndex, out int bioIndex)
void InitFactionOfOrigin()
void RandomizeIdentityBroadcast(int seed, int combinedBioIndex)
bool m_bRandomizeIdentityOnInit
override void OnPostInit(IEntity owner)
SCR_ExtendedIdentity GetExtendedIdentity()
override bool RplSave(ScriptBitWriter writer)
void RandomizeIdentity(int combinedBioIndex)
ref RandomGenerator m_Randomizer
void AssignBio(int combinedBioIndex)
int GetFactionOfOriginIndex()
int GetPlaceOfOriginIndex()
SCR_UIInfo GetPlaceOfOriginUIInfo()
int GetRandomHomeTerritoryIndex(RandomGenerator randomizer=null, bool useWeightedRandom=true)
SCR_FactionHomeTerritoryConfig GetFactionHomeTerritoryConfig()
SCR_ExtendedIdentity GetOverwriteExtendedIdentity()
int m_DebugBioIndexOverwrite
static SCR_IdentityManagerComponent GetInstance()
SCR_IdentityBio GetBioFromIndexes(IEntity entity, SCR_EIdentityType identityType, int bioGroupIndex, int bioIndex)
SCR_IdentityBio AssignRandomAvailableBio(RandomGenerator randomizer, IEntity entity, SCR_EIdentityType identityType, int factionIndex, out int bioGroupIndex, out int bioIndex, bool useRandomWeighted=true)
int m_DebugRandomizeSeedOverwrite
int CombineBioIndexes(int bioGroupIndex, int bioIndex)
int m_DebugBioGroupIndexOverwrite
void GetBioIndexesFromCombined(int combinedIndexes, out int bioGroupIndex, out int bioIndex)
proto external GenericEntity GetOwner()
Get owner entity.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.