IMIsle Modkit
Pages in this area

Roster: adding species

The roster is the list of species a player can pick on the select screen. modkit.roster lets a server script add entries to that list or hide entries.

What you need

The roster only lists a species. The game still has to be able to load the blueprint class behind the entry. For a species that the shipped game does not offer, that means a content mod with the blueprint and its assets. Put the mod into server-mods\ and client-mods\. See How resources reach the clients.

Adding a species

modkit.roster.add(
  "Camarasaurus",
  "/Game/TheIsle/Core/Characters/Dinosaurs/Camarasaurus/BP_Camarasaurus.BP_Camarasaurus_C",
  "herbivore"
)
Argument Meaning
name display name on the select screen
classPath blueprint class path. The part before the dot is the package, the part after it is the class name with _C.
diet "carnivore", "herbivore" or "omnivore". Anything else counts as omnivore.

Call it once when the script loads. The server plugin applies the list to the game mode every three seconds, so the entry survives when the game rebuilds its own list.

Hiding a species

modkit.roster.remove("Troodon")

The name is compared without case. remove works for species of the base game and for your own entries.

Listing

for _, name in ipairs(modkit.roster.list()) do print(name) end

list returns only the names you added with add. It does not return the species of the base game.

How it works

The plugin reads CookedClasses and AvailableClasses from the game mode, drops the removed names, appends your entries and calls the game's own SetNewAvailableClasses. The roster is global for the server. Two resources that add the same name overwrite each other.

Reference: roster natives.