Skip to content

Other Commands

maxdata <megabytes>

Sets the room for the data files your mod's Lua script saves. Goes in the .c5se or on a #!@ line, once.

  • megabytes: The room your script's data files may take, 1 to 100. Without the line, 10. A save that would go past it fails, and CoE5SE deletes nothing to make room.
maxdata 20
#!@maxdata 20

include "<file>" New

Lets you arrange your mod in as many .c5se files and folders as you wish, for your own organization: by faction, by region, or by units, spells, and events. Put the include lines only in your mod's ROOT files: its .c5se, or #!@ lines of its .c5m.

LOTROverhaulMod/
├── LOTROverhaulMod.c5m     ◀── ROOT: include lines go here
├── LOTROverhaulMod.c5se    ◀── ROOT: include lines go here
├── ring_quest.c5se         ◀── included: no include lines
└── rohan/
    └── riders.c5se         ◀── included: no include lines
  • file: The path from the folder that holds your .c5m, with / between folders, ending in .c5se. Any number of folders deep. Letters, digits, _, - and . only, no folder or file name starting with a dot (so no ..), capitals as on disk.

Write anything in those files you'd write in your .c5se, events and settings included.

The game reads your mod top to bottom, each included file at its include line.

Edits take effect the next time the game reads the mods, such as leaving the Mods screen or loading a game, with no restart.

Keep each block, such as a newmonster or an event, inside one file. An event still open at a file's end stops the game with "Missing endevent".

Ship the folders with your mod. In a network or hotseat game, changing a file after the game started ends the game.

Including a missing file, or one twice, stops the game with the Mod Error. An include inside an event, an included file, or a .c5m line without #!@ does too. For a mistake inside an included file, the Mod Error gives its path and line.

include "rohan/riders.c5se"
include "mordor/orcs.c5se"
#!@include "rohan/riders.c5se"
#!@include "mordor/orcs.c5se"
rohan/riders.c5se
# Rohan's riders and their spell
newmonster "Rider of Rohan"
copystats "Knight"
copyspr "Knight"

newmonster "Marshal of the Mark"
copystats "Knight"
copyspr "Knight"

newspell "Leechcraft of the Mark"
path "White Magic"
level 1
weapon 4 "Heal"

selectclass "<class>" New

Picks a class by string, as a mod's class number changes with the mods a player has on, since CoE5SE gives mods 50 more class slots.

  • class: The class's name in double quotes, as setclassname gave it, capitals included. When two classes share a name, the game's class comes first, then the earliest mod's.

A name no class has stops the game with its Mod Error at that line, naming the class. Turn on the mod with the class, and make it load before yours.

selectclass "Stewards of Gondor"
#!@selectclass "Stewards of Gondor"

aiclass 2 New

Takes the class away from every player, human and AI: Choose Class leaves it out, and no Random player gets it. Goes after newclass or selectclass. Clear the game's classes out of a total rework with it, so no Baron or Senator turns up in Middle-earth.

Leave enough classes for every Random player. With "unique random players" on and more AIs than classes left to them, the extra AIs get your aiclass 2 classes. The game can't start a Random player with no class to pick.

aiclass 2
aiclass 2

For players without CoE5SE

Their game reads aiclass 2 as aiclass 1: only AI players get the class.

More in the game's manual

aiclass and the game's other class commands are in Illwinter's official modding manual, under "Class Modding".

Example

maxdata 20
include "ring_quest.c5se"
include "rohan/riders.c5se"
include "rohan/edoras/spells.c5se"
include "gondor/minas_tirith/guard.c5se"
include "mordor/orcs.c5se"
include "mordor/barad_dur/rituals.c5se"

selectclass "Baron"
aiclass 2
selectclass "Senator"
aiclass 2
selectclass "Monkey Maharaja"
aiclass 2
#!@maxdata 20
#!@include "ring_quest.c5se"
#!@include "rohan/riders.c5se"
#!@include "rohan/edoras/spells.c5se"
#!@include "gondor/minas_tirith/guard.c5se"
#!@include "mordor/orcs.c5se"
#!@include "mordor/barad_dur/rituals.c5se"

#!@selectclass "Baron"
aiclass 2
#!@selectclass "Senator"
aiclass 2
#!@selectclass "Monkey Maharaja"
aiclass 2

Your mod's folder with those files:

LOTROverhaulMod/
├── LOTROverhaulMod.c5m     ◀── ROOT: include lines go here
├── LOTROverhaulMod.c5se    ◀── ROOT: include lines go here
├── ring_quest.c5se
├── rohan/
│   ├── riders.c5se
│   └── edoras/
│       └── spells.c5se
├── gondor/
│   └── minas_tirith/
│       └── guard.c5se
└── mordor/
    ├── orcs.c5se
    └── barad_dur/
        └── rituals.c5se