Mod loader?

So in the newest experimental, creating a new char will start with you generating a world first. Alright, but then the first thing it pops up to is: “Mod loader” and “Mod load order”.

It’s a pretty good assumption to think this is for mods. Now how does one obtain a mod and play it with Cata?

Items, where they spawn, monster, even mapgen and much more can be modded, therefor it’s necessarily to specify which mods should be used for a new world. This can not be changed later. Technically one could add more mods, but removing mods from an existing world is dangerous as items might change into the dreaded none as their definition (part of a mod) is removed.

Even the new character screen depends on the mods data (profession, profession items, skills). Therefor the world must be selected first, so that the game knows all the available stuff.
So instead of
"New Game -> select character -> select world -> play" it’s now
"New Game -> select world -> select character -> play"
The list of mods is saved for each world and loaded with that world.

A mod must have an entry in a modinfo.json file, located in the data folder, any files of that name are loaded. Each mod has a data path. The game considers all files with the json ending in that path (recursive) as part of the mod.
A simple example mod definition looks like this:
[pre]
{
“type”: “MOD_INFO”,
“ident”: “foo-mod”,
“name”: “foo”,
“description”: “adds foo and bar”,
“dependencies”: [],
“path”: “foo-data”
}
[/pre]
Everything except the ident and the type is optional. Dependencies contains a list of mods that this mod depends upon. The game makes sure that those mods get include if one selects this mod and that dependencies are loaded before the mod itself.

The path of a mod is defined like this:
If the mod info contains a path member, this is used and prefixed with the path of the modinfo.json that it is taken from (if read from a “data/mods/modinfo.json” and path is "my-mod-data, the path becomes “data/mods/my-mod-data/”).
If the mod info does not contain a path member, the path becomes “<path-of-modinfo.json>/data” (if read from a “data/mods/my-mod/modinfo.json”, it will be “data/mods/my-mod/data/”).

Path can refer to a folder or to the modinfo.json file itself. This allows self-contained mods, that consists of only one file.

Loading order is not really important right now (except for mods with dependencies, thos are automaticly ordered), but mods can override the things from previously loaded mods.
The screen uses the arrow keys to navigate the lists (up/down) and to switch between the lists (left/right), enter selects / deselects a mod. ‘+’ and ‘-’ in the right list change the loading order of the selected mod (still restricted by dependencies).

This is an example mod. Save the text as “data/mods/modinfo.json”, than create a new world, select the gardener mod and start a new character with the gardener profession.

[
    {
        "type": "MOD_INFO",
        "ident": "gardener",
        "name": "gardener",
        "path": "modinfo.json"
    },
    {
        "type" : "skill",
        "ident" : "gardener",
        "name" : "gardener",
        "description" : "Your skill with plants."
    },
    {
        "type": "profession",
        "ident": "gardener",
        "name": "Gardener",
        "description": "A gardener",
        "points": 0,
        "items": {
            "both": [ "shorts", "sneakers", "tank_top", "shovel", "flower_pot" ],
            "male": [ "briefs" ],
            "female": [ "bra", "panties" ]
        },
        "skills": [ { "level": 4, "name": "gardener" } ]
    },
    {
        "type" : "recipe",
        "result": "flower_pot",
        "category": "CC_OTHER",
        "subcategory": "CSC_OTHER_OTHER",
        "skill_used": "gardener",
        "difficulty": 3,
        "time": 200,
        "reversible": true,
        "autolearn": true,
        "tools": [ [ [ "shovel", -1 ] ] ],
        "components": [ [ [ "pot", 1] ] ]
    },
    {
        "type":"GENERIC",
        "id": "flower_pot",
        "symbol": "t",
        "color": "light_green",
        "name": "flower pot",
        "description": "A flower pot, complete with a small flower.",
        "price": 1,
        "material": "stone",
        "weight": 500,
        "volume": 4,
        "bashing": -8,
        "cutting": 0,
        "to_hit": -2
    }
]

Does not compute
Does not compute
Does not compute
Does not compute
Does not compute
Fish’s brain explodes!

[quote=“FunsizeNinja123, post:1, topic:4766”]So in the newest experimental, creating a new char will start with you generating a world first. Alright, but then the first thing it pops up to is: “Mod loader” and “Mod load order”.

It’s a pretty good assumption to think this is for mods. Now how does one obtain a mod and play it with Cata?[/quote]

There are mod packs located in the lab. To apply them to your game you need to edit the json files using notepad or whatever. Files are in the data folder.