Skip to main content

Important Variables to Know

This isn't all of the variables that are present but are some that are very important to the APooledCharacter's functionality:

int64 SoulID: A unique identifier for an NPC. This number is used to find the correct data associated with that NPC, so if you give the APooledCharacter a SoulID number, you will always get that "soul" (if it exists). Think of it like the equivalent of an American Social Security Number.

TEnumAsByte<EVE_ObjectType> objectType: The type of object that the NPC is. When using a pooled instance of APooledCharacter, objectType helps determine which definition database to reference. This works in tandem with the DefinitionID variable to get the correct "species" of the APooledCharacter.

int32 DefinitionID: The order that the DefinitionData is in its corresponding database. It refers to general information about an NPC type, but not to a specific instance of that type (that would be SoulID). Think about this as the "species" that the APooledCharacter will become. Keep in mind that DefinitionData assets from different databases can have the same value, so it is important to use the objectType variable along with this so that the correct database is referenced.

bool bIsUsed: Is this instance of APooledCharacter currently in use? Unused instances can be given the data needed to become an NPC while not overriding an instance that's already in use. Used APooledCharacters are added to a list of objects whose data will be saved by the Saving Subsystem.

bool bUsingPooledMethod: Determines whether or not this instance of APooledCharacter is actually part of a pool. Instances that are in a pool are re-used so that we don't have to constantly create and destroy APooledCharacter instances, which can boggle down performance if left unchecked. Non-pooled instances are still monitored for saving and function normally; the only difference is that they are destroyed when they are no longer in use.

bool saveableInstance: Can this instance of APooledCharacter be saved? This is used to exclude any ambient APooledCharacters that do not need to be saved.