Comment on page
Game Module "Lists"
v4.0
Most Game Module types (Stat, Condition, Quest, etc) have "List" objects, such as
GameStatList
, GameConditionList
, and so on. Some will have unique methods, but all will have common methods that handle the same operations, but specific to their type.Each subsection of this topic shows the common methods that each Game Module List has, such as
Get()
or Count()
, along with all of the variations of those shared methods.Each subsection will then show the methods that are unique to each Game Module type.
The common methods can be found in GameModuleListExtensions.cs
Some methods which all Game Module Lists have, such as
SetOwner
, require a different type, depending on the list. For example, in GameStatList
and GameItemObjectList
, the method SetOwner()
takes in a IHaveStats value
.However, the same method in
GameConditionsList
takes in a IHaveConditions
value
, and the same method in GameQuestList
takes in a IHaveQuests value
.You can cast your
Actor
or other class which implements various "IHave
" interfaces like this:// Assumes this is run on the Actor who implements IHaveStats etc
public void SetOwner()
{
partyStats.SetOwner((IHaveStats)this);
quests.SetOwner((IHaveQuests)this);
}
Last modified 5mo ago