Factions¶
Make your own independent factions, like the game's Inferno or Hades. These are not playable factions but rather the ones that inhabit terrain and react on events.
A faction is newfaction, followed by the commands on this page that shape the faction. factionlike clones one of the game's vanilla factions. Limits has how many factions all enabled mods can add, and the caps on these commands and their texts.
| To find | Look in |
|---|---|
| Monster names | "Monster Data" in the CoE5 Data thread |
| Terrain numbers and groups | ctrl+i on a square in the game; "Terrain Data" in the CoE5 Data thread |
| Group strings | sitepop in "Terrain Modding" of the official modding manual |
The faction¶
newfaction "<name>" New¶
Creates a faction. Its name shows wherever the game names a player.
- name: In double quotes. It must differ from every other faction's name, the vanilla factions' included ("Inferno", "Kingdom").
newfaction "Host of Mordor"
#!@newfaction "Host of Mordor"
factionlike "<faction>" New¶
Clones a vanilla faction's rules, so each line your block leaves out keeps the vanilla faction's setting. Your faction stays a faction of its own, apart from the faction it clones.
- faction: A vanilla faction by string: "Independents", "Special Monsters", "Horrors", "Hades", "Inferno", "Celestial" or "Empire" ("Kingdom"). Without
factionlike, the faction clones the Independents.
factionlike "Inferno"
#!@factionlike "Inferno"
factioncolor <red> <green> <blue> New¶
Sets the faction's colour.
- red, green, blue: 0 to 255 each.
factioncolor 150 30 10
#!@factioncolor 150 30 10
factionhome "<plane>" New¶
Sets the faction's home plane: where its citadel spawns, its gateway's exit and its waiting wanderers are.
- plane: A vanilla plane or one of your planes, by string.
factionpopulateneeds one of your planes here, since a vanilla plane's independents stay owned by the vanilla faction.
factionhome "Mordor"
#!@factionhome "Mordor"
World generation¶
factionpopulate on|off New¶
Makes the independents owned by the faction. You usually want this.
factionpopulate on
#!@factionpopulate on
factionunits "<monster>" <count> <chance> [<terrain>] ["<plane>"] New¶
The faction places owned units on a plane at world generation, and owns each square it places them on.
- monster: The units' monster. A monster with
watergoes on water squares, and one withnolandnever goes on land. - count: 1 to 1000, doubled with Wilder.
- chance: In 100 for each free square, 1 to 100. A free square has no army and no owner but the Independents.
- terrain: A terrain number or group. Without it, any.
- plane: Without it, every plane.
factionunits "Ghost" 1 3 -1 "Elysium"
#!@factionunits "Ghost" 1 3 -1 "Elysium"
factionpopulateterrain <terrain> ["<plane>"] New¶
Independents already placed during world generation (a previous step) are then owned by the faction, along with their squares.
- terrain: A terrain number or group.
- plane: Without it, every plane.
factionpopulateterrain 38 "Elysium"
#!@factionpopulateterrain 38 "Elysium"
Spawns¶
factionactive always|never|portals <n> New¶
Sets when the faction is active, which its citadel spawns and waiting wanderers need: always, never, or by the Inferno's rule (portals). By that rule the faction is active while that many gateways to its home are open. It is also active while a player's army or a citadel someone else owns stands on its home.
- n: The open gateways the faction waits for, 1 to 1000. The Inferno waits for 1, the Celestial for 2.
factionactive portals 1
#!@factionactive portals 1
factionspawnsite owncitadel|monument ["<plane>"]|none New¶
Sets where the faction spawns its units: at a citadel it owns on its home, as the Inferno does; at its monuments, as Hades does; or nowhere.
- plane: The plane of the faction's monuments, by string. Without it, Elysium.
factionspawnsite owncitadel
#!@factionspawnsite owncitadel
factionfuel "<monster>" New¶
Sets the monster the faction uses up to spawn units, as the Inferno uses Sinners.
factionfuel "Sinner"
#!@factionfuel "Sinner"
factionspawn <min> <use> <chance> "<group>" [magma|ice|waste] New¶
Adds a spawn the faction tries on its turn. At each site the faction sends out only the first spawn whose fuel, terrain and chance pass, so declare the biggest first. The block's first factionspawn replaces the cloned faction's spawns.
- min: The fuel the site needs, 0 to 10000.
- use: The fuel the spawn uses up, 0 to
min. - chance: In 100, 1 to 100.
- group: The units, as a
sitepopgroup string. - magma, ice or waste: The terrain the spawn needs within 2 squares of the site, as the Inferno's spawns do.
factionspawn 20 10 50 "10*Goblin"
#!@factionspawn 20 10 50 "10*Goblin"
Wanderers¶
factionwander "<word>" New¶
Sets the wander command the faction's commanders follow.
- word: "wander", "indwander", "infwander", "hadeswander" or "celwander".
factionwander "infwander"
#!@factionwander "infwander"
factionwandergate on|off New¶
Makes the faction's wanderers wait on its home until the faction is active, as the Inferno's wanderers do. It works with factionwander "infwander" or "celwander"; with "indwander" the Independents' own gate rule applies instead.
factionwandergate on
#!@factionwandergate on
Monuments, like Hades¶
factionmonument "<monster>"|none New¶
Sets the monster the faction uses as its monument, like Hades' Monument of Hades.
factionmonument "Monument of Hades"
#!@factionmonument "Monument of Hades"
factionmonumentrule on|off New¶
Lets the faction's monument on Elysium stop a player from ruling Elysium, as the Monument of Hades does.
factionmonumentrule on
#!@factionmonumentrule on
factionmonumentevent <month> <chance> "<plane>" <terrain> "<monster>" ["<news>"]|none New¶
Lets the faction found its monument on a square the Independents own, as Hades founds the Monument of Hades. The Independents' units on the square become owned by the faction.
- month: The turn the founding can start after.
- chance: In 1000, each turn.
- terrain: A terrain number or group. The square needs one of the Independents' commanders on it.
- monster: The unfinished monument the faction summons on the square.
- news: The World News,
%sonce for the commander,%%for a percent sign.
factionmonumentevent 24 8 "Elysium" 38 "Unfinished Monument" "%s has raised the Stone of Erech. The Dead gather to it."
#!@factionmonumentevent 24 8 "Elysium" 38 "Unfinished Monument" "%s has raised the Stone of Erech. The Dead gather to it."
factionplaneshift "<monster>" <percent> <each>|none New¶
Moves the monster from the faction's home to the matching square on Elysium while the faction's monument stands, as Hades moves Dispossessed Spirits.
- percent: The chance each square of the home holding an army is picked, 1 to 100.
- each: The chance each of the monster's units on a picked square moves, 1 to 100.
factionplaneshift "Dispossessed Spirit" 8 50
#!@factionplaneshift "Dispossessed Spirit" 8 50
factionloyalty "<monster>"|none New¶
Makes every unit of the monster on the monument's plane owned by the faction while its monument stands, as Hades does with Dispossessed Spirits.
factionloyalty "Dispossessed Spirit"
#!@factionloyalty "Dispossessed Spirit"
Gateways, like the Inferno¶
factiongather <ability>|none New¶
Makes the faction's units with the ability gather its fuel from Elysium's settlements and bring it home.
- ability: An ability number. The Inferno's carriers have 1224.
factiongather 1224
#!@factiongather 1224
factiongateway <fuel> <ruin> <gate> <exit> ["<news>"]|none New¶
Sets the ruined gateway on Elysium the faction's carriers restore, and where it leads on the faction's home.
- fuel: The fuel on the ruin that restores it, 1 to 10000. The Inferno's takes 99 Sinners.
- ruin, gate, exit: Terrain numbers: the ruin, the restored gateway, and its exit.
- news: The World News, with no
%s;%%for a percent sign.
factiongateway 99 200 201 203 "The Black Gate opens."
#!@factiongateway 99 200 201 203 "The Black Gate opens."
The faction in the world¶
factiontithe on|off New¶
Sends the gold of the faction's squares to the Tithe of El. You usually want this.
factiontithe on
#!@factiontithe on
factionworldevents on|off New¶
Lets the world events that act on the Independents' squares and armies, like the Bandit King and the brigands' lair, act on the faction's squares and armies too.
factionworldevents off
#!@factionworldevents off
factionconquest independent|normal New¶
Sets how players conquer the faction's squares: independent as they conquer the Independents' squares, normal as they conquer any other faction's.
factionconquest normal
#!@factionconquest normal
factionstatue on|off New¶
Makes the faction a faction of cities like the Empire: the Imperial Statue and the wanderers that seek cities count its squares.
factionstatue off
#!@factionstatue off
factionhorrors on|off New¶
Gives the faction a share of the Horrors' spawns, making it a second Horrors.
factionhorrors off
#!@factionhorrors off
factionavoid "<faction>" <percent>|none New¶
Makes the faction's armies avoid another faction's armies. The block's first factionavoid replaces the cloned faction's list.
- faction: A faction by string, yours or a vanilla one. A vanilla name also covers every faction cloned from it.
- percent: The chance the faction's armies step onto that faction's armies, 0 to 100. The Independents step onto the Empire's at 25.
factionavoid "Empire" 25
#!@factionavoid "Empire" 25
factioncaravan <month> <chance> "<plane>" <terrain> ["<group>"] ["<news>"]|none New¶
Gives the faction a caravan, beside the vanilla game's caravan.
- month: The turn the caravan can start after.
- chance: In 350, each turn, 1 to 350.
- terrain: The terrain the caravan arrives beside, a terrain number or group. The game's caravan uses
-93. - group: The units, as a
sitepopgroup string. Without it, the Merchants' crew. - news: The World News,
%sonce for the square,%%for a percent sign.
factioncaravan 12 2 "Elysium" -93 "4*Goblin" "Orc traders reach %s."
#!@factioncaravan 12 2 "Elysium" -93 "4*Goblin" "Orc traders reach %s."
Faction names in commands¶
The game's commands whose first number is a player also take a faction by string, yours or a vanilla one. CoE5SE hands out each faction's player number when a game starts, so the name is how your events, rituals and monsters reach your faction.
- Rituals:
setplayer,failplayer,promplayer. - Monsters:
wanderattack,revertowner. - Event triggers, with
+or-:squareowner,armyowner,player,class,humanplayer,aiplayer,hascom,hascomhere,ownsloc,ownsloctarg,hasunit,hasunithere,hasitem,hasitemhere,hasaffunithere,minunits,minunitshere. - Event actions:
newunits,playercolor,addresources,message,promoteunits,reveal,changeowner.
setplayer "Host of Mordor"
setplayer "Host of Mordor"
Saves
Keep your faction's newfaction block, under the same name, in every later version of your mod. A save holding your faction loads only while an enabled mod still declares it, so removing the block leaves your players unable to load those saves.
Example factions¶
newfaction "Host of Mordor"
factionlike "Inferno"
factioncolor 150 30 10
factionhome "Mordor"
factionactive portals 1
factionpopulate on
factionwander "infwander"
factionwandergate on
factiontithe on
factionworldevents off
factionconquest normal
factionstatue off
factionspawnsite owncitadel
factionfuel "Sinner"
factionspawn 20 10 50 "10*Goblin"
factiongather 1224
factiongateway 99 200 201 203 "The Black Gate opens."
factioncaravan 12 2 "Elysium" -93 "4*Goblin" "Orc traders reach %s."
factionhorrors off
factionavoid "Empire" 25
newfaction "Dead of Dunharrow"
factionlike "Hades"
factioncolor 90 120 90
factionspawnsite monument
factionmonument "Monument of Hades"
factionmonumentrule on
factionmonumentevent 24 8 "Elysium" 38 "Unfinished Monument" "%s has raised the Stone of Erech. The Dead gather to it."
factionplaneshift "Dispossessed Spirit" 8 50
factionloyalty "Dispossessed Spirit"
factionunits "Ghost" 1 3 -1 "Elysium"
factionpopulateterrain 38 "Elysium"
#!@newfaction "Host of Mordor"
#!@factionlike "Inferno"
#!@factioncolor 150 30 10
#!@factionhome "Mordor"
#!@factionactive portals 1
#!@factionpopulate on
#!@factionwander "infwander"
#!@factionwandergate on
#!@factiontithe on
#!@factionworldevents off
#!@factionconquest normal
#!@factionstatue off
#!@factionspawnsite owncitadel
#!@factionfuel "Sinner"
#!@factionspawn 20 10 50 "10*Goblin"
#!@factiongather 1224
#!@factiongateway 99 200 201 203 "The Black Gate opens."
#!@factioncaravan 12 2 "Elysium" -93 "4*Goblin" "Orc traders reach %s."
#!@factionhorrors off
#!@factionavoid "Empire" 25
#!@newfaction "Dead of Dunharrow"
#!@factionlike "Hades"
#!@factioncolor 90 120 90
#!@factionspawnsite monument
#!@factionmonument "Monument of Hades"
#!@factionmonumentrule on
#!@factionmonumentevent 24 8 "Elysium" 38 "Unfinished Monument" "%s has raised the Stone of Erech. The Dead gather to it."
#!@factionplaneshift "Dispossessed Spirit" 8 50
#!@factionloyalty "Dispossessed Spirit"
#!@factionunits "Ghost" 1 3 -1 "Elysium"
#!@factionpopulateterrain 38 "Elysium"