content-creation


Warning, this page is intended for people who wish to contribute content to the mod or make add-ons for it.
It's intentionally bland because it doesn't need to be pretty.

index:
- Necessary Tools
- Bugs
- TC 4.3 and older limits
- Pro tricks
- TC Rewrite changes
- General rules
- TC Modern style rules
- TC Classic style rules
- Scaling tool

Necessary tools:
Modeling program:
- SMP Toolbox: http://www.minecraft-smp.de/index.php/toolbox-2-0
- FMT: a new multiplatform modeling tool made by Fexcraft, with all the features and then some of SMP Toolbox, it's suggested you use this instead.
https://github.com/Fexcraft/FMT-Standalone/releases

If you are making your own content pack there is partial support for .obj and .json formats, but these will not be accepted for official releases.

External image editor (pick one, listed in order or recommendation from most to least):
- Paint.net: https://www.getpaint.net/
- Gimp:https://www.gimp.org/downloads/
- Krita: https://krita.org/en/
- Piskel (incapable of texture noise, but doesn't require downloading): https://www.piskelapp.com/
- Other opacity/alpha layering supported image editors.


Bugs
- The in-game render does face culling, which means the back-faces of geometry, aka the texture on the inside of the cube, is fully invisible. SMP Toolbox however does not use any form of culling.
--- You can read more on how exactly face culling works here: https://www.khronos.org/opengl/wiki/Face_Culling
-Parts intended to animate, such as wheels and pistons, must have their "offset" at the point where it's expected to animate from (the center for wheels and axels for example).
- If you make the texture resolution larger than what's mapped in SMP Toolbox you can't go back to editing the texture with the paint tools in toolbox (further explained in pro tricks).
--- Also if you do that be sure to check "Allow HD Texture" under Model -> Model Settings.
- We cant load the config files for seats, hitboxes,collision points, gun points, etc, it has to be done manually in code (the geometry/textures for them work fine of course).
- If you are attempting to implement the model yourself:
--- due to unknown reasons, SMP Toolbox does not automatically set the part names of geometry, so this has to be written in manually on the output java file, but write them anyway so you know which is which.
--- The default package and imports are incorrect in the output java file, they will have to be fixed to match the content pack you are implementing them into.
--- With SMP Toolbox we only support the "As Flan Java Model (Bullets, Grenades)" and "As Flan Java Model Large Model Fix" exports.
--- With FMT we only support the "FVTM 2.9 Scheme" and "TMT-FLANS-EXPORTER" exports.
- Sometimes textures will show z-fighting or stippling, like in the following image, the bottom two cases in the image are fixed automatically by the game render, because flat cubes are expanded by a small amount, however the top one is not fixed by the render because neither cube is flat.



TC 4.3 and older limits
- These versions versions can't handle when trains have bogies that are more than 7 blocks apart, and even then it's a bit unreliable.
- Rollingstock longer than 7.5 blocks have inconsistent linking issues.


Pro tricks
- The face culling mentioned before can be used for things like having windows on different positions to better suit outside look vs inside view, or different kinds of layering.
- Use alpha layering (Opacity) in an external image editor to make certain pixels invisible. It must be full alpha, so it's best to use a selection tool and press delete on the parts you want invisible.
- Shapeboxes allow you to edit each corner's exact position with great detail and it's no extra overhead versus a standard box (they run through the same exact systems with the same amount of data).
- You can copy and paste parts between SMP Toolbox instances using the options under the edit menu.
- If you want your texture to be more detailed, multiply the base resolution using an external editor.
--- you can load this back into SMP toolbox to see what you are doing, after it's loaded back in once it automatically updates without needing to select the file again.
---NOTE: Technically you can also do this by making the box bigger and stretching it down with shapeboxes, but this makes texture noise VERY difficult, and would break the automated texture noise when we get it working.
- Holding right click and pressing W, S, A ,or D will allow you to pan the camera in SMP Toolbox.


Rewrite's Animation system
- Parts can now animate and perform other graphical features using tags in the geometry name (yeah really, just add one or more of the animation tags to the parts in the output model file).
Later verisons of FMT will have better support for this system.
NOTE: this system is not fully complete, some names may change, and new animations will be added.
1. "lamp" for lights that will render in a cone.
2. "lantern" for lights that glow in a sphere.
3. "glow" for parts that glow without actually emitting light (a vat of lava for example).
4. "smoke" for train exhaust such as a chimney, these cubes are not rendered, only used as a spawn point of sorts.
5. "steam" for steam exhaust such as a piston valve, these cubes are not rendered, only used as a spawn point of sorts.
6. "door swing left" and "door swing right" doors that would swing left(80) or right(-80).
7. "door slide x" and "door slide -x" for doors that slide open and closed like on a modern tram or underground rail.
8. "scaleinventory" will scale the height of the cube based on how full the inventory is.
8.1. "scaleblockinventory" is the same except it will use the texture of the first block in the inventory.
9. "rendercrate #" is used to render a cube based on the percentage of inventory filled, this percentage is defined by how many different groups there are. The # defines it's group number this allows multiple parts to represent the same value.
10.1. "renderblock" the same as above but using the texture of the block. Each group will use a different block in the inventory, so the first group will use the first block, second uses the second, and so on.
11. "liveryimg #" is used to display a custom livery image such as a company logo, entries with the same number will display the same logo that is defined in the GUI.
12. "nocull" will disable the face culling for that part.


General rules
- Models must be made with a supported modeling program (listed above)
- Texture noise must maintain a 1 pixel per microblock ratio, even if the rest of the texture does not. NOTE: Texture noise requirement will be removed in the future when we can automate it.
- Textures may be shaded if you wish, however the render does a good degree of shading by default so it's not required.
- The RGB values of the colors should be between 30 and 225 before noise, otherwise noise and lighting can make things blindingly bright, or dark beyond recognition. Additionally this change falls more properly in like with modern 24-bit sRGB standards that most phones and tablets use.
- Texture mapping need be an optimized resolution. If the mapping has a lot of empty space try and reduce the mapped texture size under model settings.
- Flat cubes must be textured on both sides due to culling.
- The player is 9 microblocks wide and 21 microblocks tall (65% of normal size), 5 microblocks for legs, however width for transports is still required to be around 20 to 24 range in most cases for consistency sake.
--- In 4.3 and older, the player was 16 microblocks wide (full scale), so the chassis width had to be 20 to 24.
- The rails are 12 microblocks apart counting from the outer-edge, so the wheels should be 11 or 12 so that way it appears like the outer edge of the wheel lining up with the rail.
- Seats should be able to fit the player, for this often means making the seats wider than they should be, or even reducing the rows and/or columns of seating. For cars with individual passenger rooms it's common practice to only have one row of rooms for this reason.
- nameplates and numberplates must be on their own separate geometry.
- Beyond this the rest of the rules are defined by the specific artstyle, see modern or classic rules.
- All pantographs should be modeled in the 'up' position, and angled parts should have their angle from rotation. This will allow the animator to raise and lower them realistically once support is added.

TC Modern rules
- Texture detail should be done by upscaling the texture, not by using shapebox offsets to shrink geometry (it makes texture noise difficult, and would break the automated system when it's implemented).
- Cylinders should follow the helper tool here:

--- Smaller cylinders may want to cut some of the corners since the detail would be too small to see anyway.
- Railings and any generally significant details, such as air hoses, cables, pipes, etc, should have actual geometry.
- Railings specifically should have a half microblock radius.
- All air hoses, MU cables, and pipes should be modeled.
- Springs may be designed via texture or geometry.
- Remember, this is still minecraft, over-the-top detail can look really stupid sitting next to a perfectly square meter of dirt with a texture that windows 98 would laugh at.

TC Classic rules
- Larger cylinders such as boilers or large chimneys must be done as octagons.
- Octagons should be done using cubes and triangle shaped cubes. However with FMT you can make octagons using the clinder tool and that's much easier and more efficient to render.
- Details in the cabin and on the exterior are to be done using textures and alpha layering instead of actual geometry where possible.
- It is advised to keep trains and rollingstock under 200 parts, this design is not only focused on keeping the old feel of TC but also keeping in mind users with weak computers, additionally it's a great style for free users due to the low part count.



3rd party content packs
- Your pack your rules, just consider this guide as "experienced advice."
- If you would like to be featured, please contact us on discord.
---NOTE: being featured will require the add-on being hosted on a reliable source such as curseforge, and Eternal will need to double over the mod to be sure it doesn't contain anything malicious or inapproporate.


This calculator works by taking your desired in-game width, and dividing that by the actual width, to create the proper scales for everything else.
Model train scales can be used alongside actual train scales.
If the dimensions you have are not in milimeters, google has an inbuilt calculator for that.
In-game width in microblocks:
Real width in milimeters:
Real length in milimeters:
Real height in milimeters: