Easy, Hard, Insane - one pack, any number of modes.
Tycoon Modes lets a modpack offer game modes that are picked once, when a world is created. A mode can change everything: the config values of any mod in the pack, recipes, loot and every other data file, and the difficulty. Cheaper land and more starting money in Easy, dearer recipes in Insane - without a second pack and without touching a single config file.
This is a framework for pack makers. On its own the mod does nothing: it brings no modes. The modes come from the pack, one folder each.
/mode shows which mode the world plays in./mode set <mode> confirm: settings, recipes and difficulty change at once,
money and land stay. Without cheats the choice made at creation is final.config/tycoonmodes/modes/
easy/
mode.json name, description, order, difficulty
settings.json config values of any mod
pack.mcmeta optional: the folder is a data pack too ...
data/... ... with this mode's recipes, loot, tags and data files
hard/
insane/
The folder name is the mode's id. mode.json - names and descriptions per language (en_us is the
fallback, a plain string works too), the position on the screen and a vanilla difficulty (peaceful,
easy, normal, hard):
{
"order": 1,
"difficulty": "easy",
"name": { "en_us": "Easy", "de_de": "Easy" },
"description": { "en_us": "To relax: cheap chunks, good prices, $200 to start." }
}
settings.json - config values of any mod, by config file name and the value's path in it (sections
joined with a dot):
{
"chunkmarket-common.toml": { "basePrice": 50.0, "priceIncreasePercent": 5.0 },
"tycoonmarket-common.toml": { "prices.multiplier": 4.0, "starter.giveTerminal": true },
"money-common.toml": { "startingBalanceDollars": 200 }
}
pack.mcmeta becomes the data pack
tycoonmodes/<id>; a world switches on its own mode's pack and leaves the others off. Use it to replace
recipes, loot tables, tags, or the data files of other mods - a skill tree or a price list per mode.server.properties would otherwise put its own back.The config tycoonmodes-common.toml has newWorldMode - the mode a dedicated server's new world
starts in - and askOnCreate to switch the question in singleplayer off. The world's mode is kept in
tycoonmodes.json next to level.dat.
ModesAPI.mode() tells which mode the running world plays in, ModesAPI.modes() lists the modes of the
pack. Numbers belong in settings.json; the API is for mods that have to behave differently.
Works in singleplayer and multiplayer; the mode belongs to the world.
This mod was built with substantial help from AI. The design decisions, the playtesting and the direction are mine; a large share of the code, the textures and this text was written with an AI assistant. I would rather say that plainly than have you wonder.
Questions, bug reports, ideas, or just want to show what you built? Join the Discord - that is where I answer fastest, and where the next version gets shaped.