Difference between revisions of "Modding General"

From Mashinky
Jump to: navigation, search
(Edited more description for making a mod)
(a few language and formating errors fixed)
Line 1: Line 1:
 
Mods are placed in the folder <code>DriveLetter:\...\Steam\steamapps\common\Mashinky\mods</code>
 
Mods are placed in the folder <code>DriveLetter:\...\Steam\steamapps\common\Mashinky\mods</code>
  
Inside a mod, many files can be added for alternate gameplay in the game Mashinky to your desires.
+
Inside a mod, different files can be added for alternate gameplay in the game of Mashinky according to your desires.
  
The items in the Steam Workshop [https://steamcommunity.com/app/598960/workshop/] are mods for Mashinky.
+
You can find finished mods for Mashinky in the Steam Workshop [https://steamcommunity.com/app/598960/workshop/].
  
 
The mods for Mashinky are classified under the following types:
 
The mods for Mashinky are classified under the following types:
Line 19: Line 19:
 
*'''Icons'''  
 
*'''Icons'''  
  
Under the following conditions, you can create and publish Mashinky mods in the Steam Workshop:
+
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 may not contain material from other games. Permission or ownership to use the material is needed.
*Mashinky mods can contain (edited) material from Mashinky as long as the material is only used within Mashinky.
+
*Mashinky mods can contain (edited) material from Mashinky itself, as long as the material is only used within Mashinky.
*For use of another authors mod material, contact the author and wait for permission before releasing your mod.
+
*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.
  
Files in a mod to create should be placed inside a folder in \Mashinky\mods\(your_mod_name)\
+
All files of the mod should be placed inside a folder in \Mashinky\mods\(your_mod_name)\
  
 
==Required files in a mod==
 
==Required files in a mod==
 +
 
*'''(your_mod_name)/meta.xml'''
 
*'''(your_mod_name)/meta.xml'''
 
content:
 
content:
Line 34: Line 35:
  
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
 +
 
<name value="Your_Unique_Mod_Name" />
 
<name value="Your_Unique_Mod_Name" />
 +
 
<description value="Your description.
 
<description value="Your description.
 
This may be multiple lines.
 
This may be multiple lines.
Line 48: Line 51:
 
(empty text file, or text definitions)
 
(empty text file, or text definitions)
  
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).
+
==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==
 
==Mod folder structure==
There is a strict directory structure in Mashinky's mod to help engine 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 config files are stored
+
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.
 
**''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
 
**''building_types.xml'' - config file for all indutry and town buildings
Line 76: Line 82:
 
*'''model/''' - folder for all 3D assets
 
*'''model/''' - folder for all 3D assets
 
*'''music/''' - music track in game (supported format *.ogg)
 
*'''music/''' - music track in game (supported format *.ogg)
*'''scenario'''/ - all *.mss scenario files created in Mashinky's editor are stored herescript/ .. all LUA scripts used in game (config/quest_types.xml references these scripts)
+
*'''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
 
*'''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).
 
*'''sku/''' - optional folder where per language xmls are downloaded and combined together to config/texts.xml when reloading all ingame (using content creators window).

Revision as of 23:10, 4 March 2023

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 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.