Modding General

From Mashinky
Jump to: navigation, search

Mods are placed in the folder DriveLetter:\...\Steam\steamapps\common\Mashinky\mods

Inside a mod, different files can be added for alternate gameplay in the game of Mashinky according to your desires.

You can find finished mods for Mashinky in the Steam Workshop [1].

The mods for Mashinky are classified under the following types:

  • Engines Or Wagons
  • Maps
  • Buildings
  • Stamps
  • Texts (and other)
  • Particles
  • Tracks
  • Landscapes
  • Cargo Types Or Tokens
  • Music
  • Icons

You can create and publish Mashinky mods in the Steam Workshop under the following conditions:

  • Mashinky mods may not contain material from other games. Permission or ownership to use the material is needed.
  • Mashinky mods can contain (edited) material from Mashinky itself, as long as the material is only used within Mashinky.
  • For use of other authors' mod items, contact the author(s) and wait for their permission before releasing your mod. Such permission must be written in the mod's description otherwise the mod might be removed for copyright violation.

All files of the mod should be placed inside a folder in \Mashinky\mods\(your_mod_name)\

Required files in a mod

  • (your_mod_name)/meta.xml

content:

<?xml version="1.0"?>

<name value="Your_Unique_Mod_Name" />

<description value="Your description. This may be multiple lines.

Your_Unique_Mod_Name version description. "/>

  • (your_mod_name)/preview.jpg

200x200 jpeg preview image

  • (your_mod_name)/config/texts.xml

(empty text file, or text definitions)


Optional files in a mod

In optional files, you can add to, or override, some of the original game definitions and add new items (locomotives, wagons, trucks, planes, buildings, graphics).

Mod folder structure

There is a strict directory structure in Mashinky's mod to allow the engine to merge all content on startup (or mod load). It is the same structure as in "/media/" directory, and all folders are optional in mods.

  • config/ - here all XML config files are stored
    • accessories_types.xml - accesories are some decorative objects in the game like track or road or stop endings, semafores etc.
    • building_types.xml - config file for all indutry and town buildings
    • cargo_types.xml - config file for all cargo types and tokens
    • colors.xml - config file for player colors
    • face_types.xml - config for recombinable faces in the game
    • fonts.xml - config file for font characters with texture coords and spacing
    • headquarter_types.xml - config file for player headquarter
    • hints.xml - config file with list of hint ids (from texts.xml)
    • landscape_types.xml - config file with different landscape types
    • particle_types.xml - config file for particle effects in game
    • plant_types.xml - config file for all vegetation types in game
    • quest_types.xml - config file for quests (using scripts in script folder)
    • shortcuts.xml - config file for key shortcuts in game (all gui IDs WBD)
    • tcoords.xml - all texture coordinates for GUI
    • texts.xml - localized texts with specific referenceable ids
    • town_names.xml - sets of town names
    • track_types.xml - config file for all track/road parts
    • wagon_types.xml - config file for all engines / wagons or other vehicles
  • map/ - folder for all 2D assets (can be optionally stored together with models in model folder)
  • model/ - folder for all 3D assets
  • music/ - music track in game (supported format *.ogg)
  • scenario/ - all *.mss scenario files created in Mashinky's editor are stored here
  • script/ - all LUA scripts used in the game (config/quest_types.xml references these scripts)
  • shader/ - binary compiled shaders used in game
  • sku/ - optional folder where per language xmls are downloaded and combined together to config/texts.xml when reloading all ingame (using content creators window).
  • sound/ - all sounds used in game

Mod tips

  • You may combine multiple mods into one by merging these folders and xmls together. This way your mod can add for example one engine, two wagons and 3 cargo types at once
  • All config xmls support multiple sections (like for example multiple <WagonType> section in config/wagon_types.xml)
  • In all "id" attributes, use unique generated hash (8x([0-9]/[A-F]) identifier like for example "108FA1C3"). When using existing hash (from other mod or base game content) you may overwrite any attribute of this item by your mod. When overwriting, use only attributes in your mod xml you want to change, everything else stays unchanged.
  • Some features may not be supported yet (like multiple landscape type). Check with our wiki pages or contact me (SunCZu) on info@mashinky.com
  • In /model/ folder, you may store 3D assets (locomotives & wagons) as well as 2D assets (textures used by these models) needed for your mod.