Factions are a core element of Extensions.
Description[]
Factions are basically sets of actions that are always active but have a requirement to be executed.
There are two types of requirements:
- Rank
- Flags
Once the requirements have been met, the actions will execute. They cannot be executed again.
Instructions[]
Defining a faction[]
All factions must be defined in the ExtensionInfo.xml
file:
<Faction>Factions/ExampleFaction.xml</Faction>
Creating a faction file[]
Once the faction has been defined, one must create an .xml
file in the target folder.
The file should contain these tags:
<CustomFaction name="Example Faction" id="ExampleFaction" playerVal="0"> </CustomFaction>
id
is needed to assign a faction to the player.playerVal
can be set to any number.
Assigning the faction to the player[]
A faction is assigned to the player with the setFaction:FACTION_ID
function:
- Mission functions:
<missionStart>setFaction:ExampleFaction</missionStart>
<missionEnd>setFaction:ExampleFaction</missionEnd>
- Actions:
<RunFunction FunctionName="setFaction:ExampleFaction" />
Creating actions[]
Once the player has the faction assigned, the actions will become available once the player has met requirements.
<Action ValueRequired="10" Flags="testFlag"> <!-- Actions here --> </Action>
Actions can have one requirement if necessary:
<Action ValueRequired="20"> <!-- Actions here --> </Action>
<Action Flags="anotherFlag"> <!-- Actions here --> </Action>
Note: only one flag is allowed per action set.
Example Faction[]
<CustomFaction name="Example Faction" id="ExampleFaction" playerVal="0"> <Action ValueRequired="20"> <AddAsset FileName="ThemeChanger.exe" FileContents="#THEMECHANGER_EXE#" TargetComp="Faction_DropServer" TargetFolderpath="bin" /> </Action> </CustomFaction>
In this example, once the player's rank has been increased by 20 via addRank
function, the ThemeChanger.exe
executable will be uploaded to the faction drop server.
External links[]
Extensions |
---|
ExtensionInfo.xml Actions • Factions • Hacker Scripts • Missions • Nodes |