Transport Fever - Modding Basics for Noobs - Starting up guide

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Hello, I'm new to Transport Fever but I like it a lot and saw that there's a posibility to develop different sorts of mod's for it to enhance the gameplay .


    I have a few questions, if you could help me so that I know the general things about
    the game and mods , would be great, as I've looked and I dont really find this information provided in English, as for google translate, that distorts the context pretty badly .





    Mesh :




    - how many vertices can an object have for it to be supported by the game, is there a max number ? From the forums I gathered 10.000 ?




    - what are LOD's , I know lod stands for level of detail, but how does it work in the game ? I noticed there are 3 levels, LOD 0 being the max quality, I think , but what's the vertex maximum for each ?




    - do meshes need to have collision boxes ?




    - can meshes be grouped , or does it need to be a single object ? example : body - 4 wheels - doors - windows etc.




    - do meshes support multiple materials per face ? example : joining a car toghether, body + doors + wheels + windows , assigning materials to each part of the object, does the game support that, or it needs to have multiple objects separated each with it's own material ?




    - how do materials work in game ? I downloaded the blender plug in and saw that there's a material entry as well as import/export option for the object. / Does the game support glossy or glass materials or just flat ? Does it accept normal & specular maps ?




    - what formats of object does the game support? .dae / .obj etc. I noticed only .msh & .msh blob , which are supported only with the blender plugin
    in .




    - what file formats does the game support for textures ? .tga / .png / .jpg/.jpeg etc ? Does the game support transoarency in textures, such as .tga / .png - for windshields / glass / headlights , etc ?




    - what is the maximum resolution that the game supports for textures ? 2048 / 4096 etc




    I would say that my skills are - beginer ~ medium in Blender / - medium ~ advanced in Photoshop / - 0 skill in coding, none whatsoever / - 0 skill in 3d max or other 3D programs other than perhaps Zbrush altho I mainly used it for texturing .

  • There is no limit for Tris (or even Vertices) as far as I know, the 10'000 are just an "acceptable" value because the more tris the slower the game becomes.


    There is also no limit for LoDs, you can have just one, you can also have more than 3, once again, it's just for the game's speed to have LoD with lower Tris numbers.


    No.


    Yes, they can be grouped. It's also possible to animate groups.


    Yes, you can even assign different materials to the same mesh. Also it is possible to have several meshes with the same material.


    It supports RedGreenBlue, Transparence, Gloss, Reflecting, Normal and even Dirt, Rust and Color-Changing.


    It only supports .msh and .msh.blob.


    The games supports only .tga, .dds and .hdr. For .tga and .dds transparency is possible.


    There is no max resolution. The smaller the better, as long as it looks nice. Most vanilla vehicles and also mods work with 2048 x 2048.


  • Well, nothing to add I think ^^ only restrictions are gameplay changes. So you can add an object "Signal" but you can't change it's behaviour or parameters or such stuff. Only always alternative/unique looking instances


    This is great news, I'm happy that the game doesn't restrict much in therms of resources.



    I still have a couple of unanswered questions though :


    - how do materials work in game ? I downloaded the blender plug in and saw that there's a material entry as well as import/export option for the object.


    By that , I mean, are there any tutorials out there, written or video on how to use the train fever material option on blender ? Does that option automaticly save the material you've created for the object in blender and exports it in a way that the game can read & reproduce it ? How does that work ? I only need to see it once to get it.



    - are there any english tutorials out there for transport fever or even train fever since that's an older game with a bigger following, on how to animate different parts of the object you want to bring in game ? Example, how can I make the wheels spin while the car is in motion ? Can I make it open it's door and the tiny person getting inside ?


    - back to textures , say I join the whole car toghether, I have a nice topology that allows me to texture it properly as one piece with all the parts on the same texture , and it shall be tga or dds, in these formats , due to the transparency , does the texture cut itself ?( I don't know how to explain the effect, basicly the texture cuts thru itself because it's all on one texture and you have windshields which are semi opaque , and then you have the car body paint and the interior which are opaque , but the texture just cuts in itself, does that happen in game ?


    - also in textures , can you have separate textures per parts of the object / groups ? Example : take the wheels of a car, you have 4 objects, 4 wheels, you group them , but you only have one UV / Texture for all the 4 wheels . does that work ?


    - and last, how do you put everything toghether from exporting properly , to converting , putting everything in the right folder with the right lua files and textures and meshes and folder names , to getting the object in game ?


    Are there any complete tutorials out there that teach you this stuff , or you have to figure it out ?


    I have looked on transport fever wiki mod and read what the developers of the game wrote in there but it's not very niob friendly if the only thing you know is how to model & texture :-/



    Anyways, thank you for the info given so far, It is great information , I appreciate it.

  • Animations... each part that is movable has to be a separate mesh. Basically every movement/rotation is relatively to the meshes origin but at custom animations you can set another point. But most likely you set a proper origin and use this. Weels/axles are a special kind of "animation". You simply tell the game which mesh is an axle (turns while driving in the given speed) or a wheel (like axle, but also steers). Here you can't change the origin. If you want to have a look at keyframe animations just open a default vehicles door-mesh and study the animation block eighth at the top.


    Well, work calls ><

  • Not YouTube, actually, Twitch. twitch.tv/ystldystl feel free to stop by - if you can't make it, don't worry, I will upload the stream later to YouTube and the link will be posted in the thread Yoshi linked above.
    Judging by the questions you asked, you already seem fairly knowledgable, why don't you just try out some stuff? Almost all of my knowledge I gained through trial and error. But if you get stuck, we're here to help :)

    Lg, YstlDystl

  • Animations... each part that is movable has to be a separate mesh. Basically every movement/rotation is relatively to the meshes origin but at custom animations you can set another point. But most likely you set a proper origin and use this. Weels/axles are a special kind of "animation". You simply tell the game which mesh is an axle (turns while driving in the given speed) or a wheel (like axle, but also steers). Here you can't change the origin. If you want to have a look at keyframe animations just open a default vehicles door-mesh and study the animation block eighth at the top.


    Well, work calls ><

    Thanks for that, I had a look in the time on how a door opens, I'll have to watch a youtube tut on how to make animations in blender . Although quick question, if I dont do a custom animation , you mentioned origin, should the origin be @ the centre or the geometry ( I mean in blender) ?


    As for the wheels , sounds easy enough , I did see the therms " axel" & "boogie" somewhere in the lua files.


    Have an easy day @ work!



    Not YouTube, actually, Twitch. twitch.tv/ystldystl feel free to stop by - if you can't make it, don't worry, I will upload the stream later to YouTube and the link will be posted in the thread Yoshi linked above.
    Judging by the questions you asked, you already seem fairly knowledgable, why don't you just try out some stuff? Almost all of my knowledge I gained through trial and error. But if you get stuck, we're here to help :)


    I've watched one of your youtube tutorials, the one about assets , yeah that truly does sound complicated putting everything toghether. My biggest concern is assembling the settings / info /material files lua files, I dont really know anything about those and I can't find any info for noobs in english so if I make it to your twitch stream, I'll be like what's this, what's that, how do I do this, how do I do that & so on :))


    I'll have another look at your pool creation video and try to pick up from what you're doing in that to get myself a bit aquainted.


    As for now I have the car ready I just need to UV unwrap it and texture it and I'm good to move onto actually importing the car in the game which hopefully I'll learn from you . For now I'm just thrilled that I managed to get between the lines of the vertex acceptable limit ,





    One more thing , I read on the TPF wiki modding page , something about custom shaders, what are those ?

  • Back in Hotel, some time ^^


    You asked for texture stuff... hmm. When you have 4 wheels, you can simply copy them. So in fact you only need one... well wheels are a bad example >< You need an axle and wheels. If you have a truck with two axles, you only need to model one. The other is simply copied in the mdl. There you have for each lod this children list. Simply copy the lines with your axle mesh and change the x-value so they are not both in the same place.


    In general all you really need are the mesh files (.mesh and .mesh.blob). Everything else is text editor stuff. Ofc it's less work if you put more work to blender so it exports more properly.


    Mappings... in blender you can add texture slots. Can't show you that - mobile phones suck xD Choose faces with material a and assign them slot1 and then choose faces with material b and assign them slot2. Both materials can use the same texture but with other setting for example or ofc also different textures.


    Putting all together... for vehicles the exporter does well. I have to say since Transport Fever I missed the development so I can't say what the exporter can do now. Perhaps assets and stations work fine too.


    If not you always can have a look in the res folder of the game. In general you have a structure like that:
    The model file mdl with the basic informations. Which meshes are contained, where are they located, from where to where are they visible (lods) and costs, speed, power...


    Than perhaps group files (.grp). Almost the same like the mdl but without meta data and no lods. For each lod use a different group that is linked in the mdl.


    The meshes them selves (.msh). Here you set the material(s) and animations.


    And last but not least the materials (.mtl). What type is the material of, which textures are linked?


    And then there are some "special" files. For assets or stations(?) There is a construction file (.con) that puts all the mdl's together that are needed to build this thing. Also parameter options are set here. The stuff you can choose in-game then.
    And also the multiple units to define presets for trains. Again a list of mdl's (this loc and those waggons...).



    Ah yeah, the origin question. It's most important for rotations. The object rotates around that point. So an axle should have an origin in center of xz plane, the y coord is ... Wayne xD what is egal in English ><
    Wheels also steer along the z axis, so also x should be centered. A door should have the origin there, where it turns around. And animations in blender... never did this ^^ let's turn a door:
    Time 0: position 0 and rotation 0
    Time 1000: position still 0 and rotation 90°


    Done :P time is in milliseconds. There are several events and in the mdl you can define, which event should trigger what animation of which mesh - or group. Unfortunately my lexicon articles are in German :/


    Ah and bogies are fix. Wheels behave like axles what is a bit frustrating. If you have a bus like in my avatar pic this is like 3 bogies... and that's why the front wheels don't steer *cry* ^^


    Well... "good night" :D

  • That's a lot of information that I need to process and wrap my head around. Thank you though !


    So from my basic curlyblonde understanding, "boogie" stands for the part that an object "bends" , like your bus, i see it bends in 3 places and those I'm assuming, are the boogies, and axels are for wheels , meaning the steering like you've said, having for example a truck that has 2 sets of axels , 4 wheels in front , it being a heavy or long truck/bus, you can only set up one axel per vehicle ?


    Egal in English is " equal " ,


    So the origin, for a set of wheels , front wheels for example, I need to set up the axel linking the two front wheels to that axel, and their origin needs to be in the middle of them ? they need to be one joined object containing two wheels with it's origin in the middle of the two wheels or they need to be individual , unlinked objects, each with it's origin on the center of the Z ?


    As for doors , the origin point of the door should be where a hinge would normally be , for it to rotate in the right direction ?


    How do I know what values to set objects apart from eachother in the text editor settings lua file , without seeing the actual model itself in game ? Does the Transport fever Model Viewer show such values or allows to handle objects and move them around ? Didn't see that option when I played with it.


    Example, the wheels, since they are separate objects because they need to rotate, how do I know , in text editor values, where to place them so that they fit into the wheel arch on the car body ? Or a separate door that has an animation , how do I know where to place that?


    I'm gonna have a look in the game's files and see how stuff works on a basic level.


    Gonna be back with more questions though.




    Moderated/Edited by YstlDystl due to full quote of previous post. Please only quote what is absolutely necessary! Thank you.

    Einmal editiert, zuletzt von YstlDystl ()

  • Wayne xD what is egal in English ><

    Egal in English is " equal " ,

    "Wayne" is bad German slang for "ist doch egal" (it doesn't matter), "interessiert keinen" (nobody cares) or simply "don't care".


    The simple German word "egal" depends on the context imo.
    Either it means "whatever", "I don't care" (Das ist mit egal), "it does not matter" (das ist egal/unwichtig), "Never mind" (Ach egal / vergiss es) or something like "regardless" (egal welches)... The meaning of "equal/the same" (das selbe) for egal is something which I personally do not use often.


    Nevermind the offtopic ;)

  • Thx @Xanos. Does not matter would have fit my needs ^^


    Okay... where to start :P A bogie is translated a "Drehgestell" and this looks like this:
    http://www.drehgestelle.de/2/vba_1.html


    It's simply a chassis/platform with two (or more) axles. In case of my bus each part (front middle back) is the platform. So the front body an the axles are such a bogie. Well, it's one axle and the frontwheels, but because they are part of a bogie (they are grouped with the chassis) they don't steer.


    The middle and back bodies are almost the same. They only have one axle, so you have to "fake" a second axle. That's this famous fake-bogie ^^ if you have a chassis and two axles (meshes defined as axle in mdl) in a group the game creates automatically a bogie. If you have only one axle, you have to define this fake-bogie entry in the mdl. In fact you can define that without any real given axle. The "Faltenbalg" - ah gaiter - is a bunch of fake-bogie >< each "Falte" - hmm I think plait ( https://www.dict.cc/?s=falte ) - is the platform/chassis without any axle, they are all faked ^^


    So the bending part are in fact many bogies.



    The "set" of wheels does not exist. Axles can be one mesh (left an right wheel and axle) because they don't steer. Wheels need to be separate. One mesh left and one right. If both are one mesh with an centered origin this looks weird ^^ so yeah - unlinked objects.


    Hinge - Scharnier Gelenk... yep, exactly :)


    Values to position objects in text editor...
    One unit in blender means 1m in game. So let's say you have a bogie with 2 identical axles. So you only create one. The bogie is 3m long so reaches from -1.5 to 1.5. The build axle is located at x -1.2. Erm, the front of a vehicle faces along the positive x axis ^^


    Well, in the mdl you copy the axle mesh entry and set the -1.2 to 1.2 and your done. If you have a bus with two axles in the back, you can do it the same way. Well it's not simply a symmetric change but it's not more complicated. The one axle is at -3 and the next should be 95cm in direction to the front. So you set -2.05 as x value and your fine :D


    You can also export 2 axle meshes and simply rename the second entry so it links the same mesh like the first axle. Blender creates the mdl with the children list and correct positions.


    Hmm, hope that helps ><

  • One more thing, I'm at the UV unwrapping part and doing the texture, so, I'm assuming that I can have multiple textures per an object, and I don't know if textures with transparency cut thru the opaque ones, so I thought of placing the windshields & heandlights glass on a single uv / texture.


    I wanted to know if the game renderes the mod/object the same if you have let's say 2 x 1024 / 2 x 2048 textures versus having one as 4096x4096 , or, if it's better to have smaller textures , such as 512 as YstlDystl used for his pool project, but more of them for different parts. Which version do you guys think works better for the game ? Multiple smaller textures or one big texture that fits everything?


    Example : Car exterior - 1 texture @ 2048 / Car interior - 1 Texture @ 2048 / Wheels - 1 texture @ 512 / Glass parts - 1 texture @ 1024

  • Though this may sound silly, just compare some file sizes.
    The smaller the combined files, the better. So if one 4k texture is smaller than four 1k textures, use it. ...except it won't be. Although it depends on what your texture looks like, as this influences file sizes to a degree, four 1k textures will always be better sizewise.
    But that doesn't mean it's better for you! Don't sacrifice usability for a few MB! What I'm trying to say is that file sizes are important but it can be more important to have more details on one texture and fewer on another. Or it can be useful to have several objects on one texture and others will be better off on a separate one (for instance with transparencies).


    Oh, speaking of transparancies. These are all dealt with through the *.mtl files - so you can have opaque and transparent in one - just try it out :)

    Lg, YstlDystl

  • Just try to learn about the rendering order of materials. With the wrong order the body for example is rendered after the interior and "overrides" it. The result is an invisible interior ^^


    File amounts... I'm going with @mediziner to say use as less as possible. He said it's coz of the drawcalls, but there I'm not sure. A drawcall is an order to the GPU to render an object. There it doesn't matter, how many textures you use. 1 draw call is 1 draw call ^^ but this is a bit important for mesh amounts. More single meshes result in more drawcalls. And this means transfer of data to the gpu what's "expensive".


    The thing with textures is texture calls or how it's called. Open the texture, decompress it, find the pixels. With one texture you minimise the overhead.


    But I can't say what impact this all have to the performance.

    Büffeln is nich so meins, ich bin da eher der Ornithologe...

    DarkMo's YouTube-Kanal

    Einmal editiert, zuletzt von DarkMo () aus folgendem Grund: I love autocorrect on mobile Phones -.- hip = GPU ><

  • st try to learn about the rendering order of materials. With the wrong order the body for example is rendered after the interior and "overrides" it. The result is an invisible interior

    That worked! The H12 hopper uses "DISCRETE" open loads instead of "LEVEL" like other hoppers. So to lower the 'full' amount of limestone & iron ore I had to study the .mdl file & make some cuts. It all came out pretty Darkmo!


BlueBrixx