Posting rules
1. provide screenshot, link to thread to original (base) mod and description.
2. provide:
- download link
- instructions to install your modification
- provide a screenshot
- provide license
3. specify if your work is "compatible" or "ported" mod:
"compatible" means: original mod internal structure was enhanced with ability to run with MineClone 2 (MCL2), in addition to original game (typically MineTest Game, MTG).
At the bottom of this post, you will find instructions how to make mod capable.
"ported" means: original mod was modified to run with MineClone 2. It will not work with original game (typically MineTest Game). This is usually achieved by replacing the item strings directly, its faster, but its a worse solution than "compatible".
- "capable" mods are preferred to "ported" mods.
- in case mod was "made compatible" with MCL2, its recommended that you post a message in original mod thread
- mod should be preferably hosted on a version control hoster, like github or similar; so that your changes can be merged to upstream.
4. you might want to modify mod readme with version bump (like "P": 1.0 -> 1.0P) to:
- distinguish between your version and original
- specify which version your actual port/compatibility enhancement is based on: "1.0P" would imply that its based on "1.0" of base mod.
How to make mod compatible
1) depends.txt
both mcl_ and default should be an optional dependency (?) in depends.txt. If both mcl_ and default are absent, then it means user is running notMCL and notMineTestGame, so game will fail on loading during variable calls (either-either) anyway and return to menu with error (safe).
typical depends.txt:
- Code: Select all
default?
mcl_core?
mcl_sounds?
2) switcher in init.lua and other mod code.
Important - place the block after "local S, NS = dofile(MP.."/intllib.lua")" call!:
- Code: Select all
...
local moditems = {} -- declare a var, somewhere at beginning but below intlib.lua call.
...
if core.get_modpath("mcl_core") and mcl_core then -- means MineClone 2 is loaded, this is its core mod
moditems.IRON_ITEM = "mcl_core:iron_ingot" -- example, MCL version of iron ingot
moditems.STRING_ITEM = S("MineClone 2 string") -- item description if mod is loaded in MPL
moditems.WOOD_SOUNDS = mcl_sounds.node_sound_wood_defaults()
else -- fallback, assume default (MineTest Game) is loaded, otherwise it will error anyway here.
moditems.IRON_ITEM = "default:steel_ingot" -- iron ingot in stock MT
moditems.STRING_ITEM = S("MineTest Game string") -- item description if mod is loaded in MT
moditems.WOOD_SOUNDS = default.node_sound_wood_defaults()
end
...
-- actual use in the code down somewhere.
material = moditems.IRON_ITEM
sounds = moditems.WOOD_SOUNDS
_doc_items_longdesc = moditems.STRING_ITEM
3. expanding sound check in some mods:
if similar block already exists (as it should be), and equivalent of "sounds" var exist - use that and change "sounds" in this block to however the var is called!
If similar block does not exist or game plays no sounds, you don't need this.
- Code: Select all
local sounds
if mcl_sounds then
sounds = mcl_sounds.node_sound_metal_defaults()
else
if default.node_sound_metal_defaults then
sounds = default.node_sound_metal_defaults()
else
sounds = default.node_sound_stone_defaults()
end
end
May the code be with you!