Content packs: species, weapons, maps, prices and rules

The game keeps every species, weapon and map, and every price and hunt rule, in a content registry. Each entry has a string id. The game's own content comes first (the built-ins); then every enabled mod adds entries or changes them with small JSON files. Mods can:

No code is needed: content packs are JSON files. Scripts can do the same at run time with the content table. Examples using only files the game already has are in examples/mods/ (copy a folder into mods/):

Mod Shows
alpha-trex a new species: a bigger, tougher T-Rex (the T-Rex's tirex.cat and AI), its own name, card, licence, score, tinted icon
raptor-fjords a new map: the Vengar Fjords terrain under a new name, dawn / night only, raptors that always live there, its own ambient creatures and licensable species
elephant-gun a new weapon in the rifle's slot, with its own .cat (the rifle's model, the double-barrel shotgun's blast)
cheap-hunting rules: half-price licences, cheaper supplies, more dinosaurs per hunt, ten species per hunt

Files

A mod is a folder (or zip) in mods/ (see the Mods screen; mods/modlist.txt is the load order). Its content JSON:

mods/<mod>/content/species/*.json
mods/<mod>/content/weapons/*.json
mods/<mod>/content/maps/*.json
mods/<mod>/content/rules.json

Ids

Lowercase; spaces become _. Built-ins:

Common fields

Field Type Meaning
id string required
copy id template of a new entry (see above)
name text menu / HUD name
info text the menu card (species: %d = the score)
price int licence price in credits (0 = free, unlocked)
hidden bool not in the hunt menu (built-ins too)
order int sort key of the added entries on the extra menu pages
icon sprite / .tga the menu cell picture (unlocked)
iconLocked sprite / .tga the locked picture (silhouette); default: icon
iconColor [r, g, b] or [r, g, b, a] tint of the menu cell (0-255)

Texts are a string ("Alpha T-Rex"), an object by language ({"en": "...", "de": "...", "fr": "...", "es": "..."}: the game's language, else English, else any), or a key of the game's strings.csv ("STR_T_REX"). The game's fonts are Latin-1: other characters show as ?. \n breaks lines (the cards are right-aligned, about 45 characters wide).

Icons: the name of a sprite the game has (button_dino_active_9 is the T-Rex's cell, button_weapon_active_5 the rifle's, button_area_active_3 the third map; the _inactive_ ones are the locked pictures), a sprite from a sprite file of the mod (list it in rules.json "sprites", the game's .cfg format: sprite name { texture = "file" tc_x = 0 tc_y = 0 tc_width = 90 tc_height = 100 }, textures are .tga), or a .tga file name (the whole texture becomes the picture: 90 x 100 pixels, like every cell picture of the game).

Species (content/species/*.json)

Field Type Meaning (CharacterInfo field)
ai species id, or "scripted" whose AI drives it. It also decides the game's per-type rules (T-Rex shot / noise reactions, Brachiosaurus water places, the death camera of big predators, sound radii). The .cat must have the animations in that species' order (a copy of its .cat is the safe start)
scripted bool a script drives it (content.drive); the base AI runs while no script takes it
file string characters/<file>.cat: model, animations, sounds ("tirex" reuses the T-Rex's)
health number health (health0; T-Rex 1024: only a shot in the eye kills it)
score number trophy points (m_unk1640)
mass number tons (m_unk1634): trophy and binoculars weight x scale², world-API fight damage
size number metres (m_unk1638): trophy length x scale
radius number body radius the hunter collides with (m_unk163C)
smell, hearing, sight number senses (m_unk1644[0..2], about 0.3-1): higher notices the hunter from farther; the card's bars
carryHeight number drop ship carry height (m_unk1644[3])
scale [min, max] or number body scale range (scale0, scaleA); scaleMin / scaleRange set them apart
flags int 1 huntable (trophy), 2 dangerous (predator), 4 flying; or huntable / dangerous / flying booleans
calls list of .wav names its decoy calls (up to 3); without: the game's call<N>_a/b/c of its AI species
callVariants int how many of the game's calls it has (1-3, m_unk1660)
hunt bool a hunt species: in the hunt menu, with licence, call and trophy (new species: true)
card object composes the card when there is no info: length, weight, diet, danger texts; score and the senses' bars are added
maps list of map ids the maps it lives on (empty = every map); on other maps it cannot be picked
spawnWeight number chance to be picked among the hunt's species (1)
skipChance number a pick is dropped with this chance (T-Rex, Spinosaurus, Ceratosaurus 0.5)
group [min, max] group size (Coelophysis 3-5)
groupChance number a group spawns with this chance (Coelophysis 0.7)
trophyPriority int which trophy a new one replaces first when the trophy room is full (higher is kept; Parasaurolophus 0 .. T-Rex 17)

A new species gets a free CharacterInfo slot (36 and up, not 41); the log names it. It is loaded when a hunt needs it (and unloaded after), or when the world API / a script spawns it.

Weapons (content/weapons/*.json)

The hunter has 8 weapon slots, one per built-in weapon. A new weapon takes the slot of its base weapon and its behaviour: the sniper's scope, the crossbow's falling arrows, the revolver's muzzle flash, the reload pattern, the recoil. In the menu it is an entry of its own (licence, ammo price, card); in a hunt it replaces its base weapon (the menu lets you pick one weapon per slot).

Field Type Meaning (CharacterInfo field)
base weapon id the slot and behaviour (new weapons)
file string <file>.cat: model, 4 animations (take, idle/fire, put away, reload), sounds per animation
power number damage per hit (m_unk1664; pistol 2, rifle 4, sniper 7, revolver 8)
precision number spread = 2 - precision (m_unk1668)
pellets int traces per shot (m_unk166C; shotguns 6)
loudness number how far shots are heard, x 14592 units (m_unk1670)
rate number shots per second (m_unk1674)
ammo int shots per hunt (m_unk1678)
magazine int shots before a reload (m_unk167C)
aimFov number field of view while aiming (m_unk1680)
aimTime number aiming zoom time (m_unk1684)
ammoPrice int credits per hunt for its ammunition

Maps (content/maps/*.json)

Field Type Meaning
terrain string the files: <terrain>.man, <terrain>.rst, <terrain>_dawn/_day/_night_shadowmap.tga, <terrain>_dawn/_day/_night_map.tga (map screen). "area3" reuses the Vengar Fjords
difficulty text a line after the card
times list "dawn", "day", "night" it can be played at (empty = all; another choice falls back to the first)
species list residents that live there in every hunt, whatever the hunter licensed: [{"id": "velociraptor", "count": [4, 7]}, ...] or {"velociraptor": [4, 7]}. Built-in maps: 5 Brachiosaurus
huntable list of ids only these species can be picked for this map (empty = any that lives there)
hunt object hunt rules for this map (as rules.json hunt)

Rules (content/rules.json)

Field Type Meaning
priceScale object multipliers: species, weapons, maps (licences), ammo
prices object per entry: {"species": {"trex": 500}, "weapons": {...}, "ammo": {"rifle": 10}, "maps": {...}}
startCredits int credits of a new profile (DEFAULT_CREDITS)
resupplyPrice, relocatePrice int the in-hunt supply drop / relocation (RESUPPLIES_COST, RELOCATIONS_COST)
runSpeed number PLAYER_FORWARD_SPEED_SCALE
score.multiplier number every trophy's credits (1)
score.unlicensed number multiplier for a species shot without its licence (0.5)
score.combo number + per trophy already taken in the hunt (0.1)
score.flyer int credits per shot flyer (1)
score.bonus object percent bonuses: tranquilizer 25, noRadar 30, coverScent -20, camouflage -15
maxSpecies int species per hunt (the game: 9; at most 10)
hunt object hunt rules (below)
balance object any of the game's balance values by name, e.g. "DINO_T_REX_HEALTH": 2048, "WEAPON_RIFLE_POWER": 5, "WATCH_VIDEO_CREDITS": 25, "IAP_SMALL_PACK_CREDITS": 1000 (the full list: src/Sources/Game/BalanceManager.cpp)
sprites list sprite .cfg files of the mod, loaded with the game's

Hunt rules (rules.json hunt, or a map's hunt, which wins for that map):

Field Type Default (the game's)
ambientCount [min, max] [370, 420] ambient creatures
ambient {"id": weight} or list moschops, gallimimus, dimorphodon, pteranodon, dimetrodon, 1 each
dinoCount [min, max] [16, 24] picks among the hunt's species (bonus spawns included)
bonus.count int 2 random bonus species per hunt (they need no licence; they give half score)
bonus.spawns int 2 of each
bonus.pool list of ids parasaurolophus ... spinosaurus (the first 7)
nearPlayer bool true: the first pick after the bonus spawns starts near the hunter

Without any hunt rule, map species or species spawn fields in play, the game's own placement code runs unchanged.

The hunt menu

The game's hexagon grid has 7 map cells, 18 dinosaur cells and 7 weapon cells. Added entries go on extra pages of the same grid: small hexagon arrows (< >, with the page number) appear left of the dinosaur grid and above the map / weapon grids. Selections stay across pages. Hidden built-ins leave an empty cell. Up to 128 entries per grid.

Saves

The game's save (carnivores.st) keeps licences of the built-ins and a trophy's character type. For added content a side file carnivores.content.json next to it keeps the licences (by id), the id of each trophy of an added species and the mod weapon each new trophy was taken with. When a mod is removed, its trophies leave the trophy room into the side file's orphans (the save still loads); when the species is back, they return to free places. Licences of removed entries stay in the side file.

From scripts

The content table reads and changes the registry at run time, with the same fields as the JSON: content.define("species", {id = "night_raptor", copy = "velociraptor", name = "Night Raptor", price = 300}), content.setPrice("weapon", "rifle", 50), content.species("trex"), content.rules(). Entries defined while the menus are open appear at once. content.drive(species, fn) replaces a species' AI with a script function (with "ai": "scripted" in the JSON the species uses its base AI until a script drives it).

When changes apply: content packs are read at start and again when you press Apply in the Mods screen (outside a hunt). print(content.report()) in the console lists every entry and which mod set it.

Limits