Config Train Engine

From Mashinky
Revision as of 13:30, 13 July 2021 by CapnZapp (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Mod configs are to be placed in: DriveLetter:\....\Steam\steamapps\common\Mashinky\mods\ModName\config

All vehicle configs are to be named wagon_types.xml. XMLs are human readable and their values should not be difficult to udnerstand to anyone. When creating your first config, it's probably best to take a config file from vanilla vehicle and just alter it.

<WagonType -- begin the definition of a vehicle

id="8694AA87" -- unique id of the vehicle, can only be once in the game
name="E69-03" -- a string name for the vehicle
vehicle_type="0" -- 0 for train engine or wagon, 1 for road vehicles
epoch="5-7" -- in which epoch does this vehicle appear
track="2" -- 0 - basic railway, 1 - speed railway, 2 - electrified railway
capacity="0" -- capacity of cargo="" defined in cargo_types.xml
cost="-400" sell="200" fuel_cost="-2" -- numbers mean money tokens, other cargo types are defined in cargo_types.xml
power="306" max_speed="50" max_speed_reverse="35" -- speed (in kilometers per hour)
weight_empty="25" weight_full="25"
depo_upgrade="0" -- if present, depot engine works extension required. (Otherwise omit entirely)
particle="035DF0E8" particle_indoor="035DF0E8" particle_emit_delay="0.5" particle_emit_delay_jitter="0.45" particle_emit_position="0,0.31,0" -- particles used by the engine as defined in particle_types.xml
sound_engine_standby = "sound/electricengine1/standby.wav" -- sounds taken from ./media/sound/ folder
sound_engine_slow = "sound/electricengine1/slow.wav"
sound_engine_medium = "sound/electricengine1/medium.wav"
sound_engine_fast = "sound/electricengine1/fast.wav"
sound_breaks = "sound/electricengine1/brakes.wav"
sound_tunel = "sound/electricengine1/whistle.wav"
sound_engine_speed = "0.8"
sound_ref_max_speed = "225"
anim_speed="5.5" -- speed of wheel animation
icon_texture="map/gui/e69_ico.png" icon="8694AA88" icon_color="8694AA89" -- path to icon and icon ids from tcoords.xml
hipoly="model/train/scz_e6903.x" -- realistic mode model
lowpoly="model/train/scz_e6903_lod.x" -- LOD model
length="0.45" front_wheel="0.15" rear_wheel="0.15" > -- overal length of the vehicle and placement of axles from the beginning and the rear of that length
<Camera position="0.05, 0.17, 0.01" direction="0,0,-1"/> -- camera definition for driver view, position and direction in X,Y,Z axis from the center of the vehicle
<Camera position="-0.05, 0.17, -0.01" direction="0,0,1"/>
<Camera position="0.0, 0.17, 0.027" direction="0,0,1"/>
<Camera position="0.0, 0.17,-0.025" direction="0,0,-1"/>

</WagonType> -- end the definition of a vehicle

NOTE 1: This is just a sample mod config. For more options and information you can see vanilla game config