Workers & Resources: Soviet Republic

Workers & Resources: Soviet Republic

74 ratings
Beginner Modders Q&A
By ryantheskinny and 4 collaborators
A Question and Answer guide put together by the modder's community to help aspiring modders dive into the world of adding assests to the Worker's and Resources Steam Workshop.
11
2
   
Award
Favorite
Favorited
Unfavorite
First an amazing introduction from the writers...
We hope you will find this guide useful in answering all your basic questions about modding, WR:SR.

We will be updating it with more questions and answers and a polish translation soon.

Thanks for reading, leave a like and/or comment with any other Q&A or suggestions for this guide

Ryan, Toprus and 4smiler, March 2020
Changelog
Changes and additions to the guide will be listed here, With section and item #

  1. Modeling item #6, Corrected missing picture.
  2. Scripting item #1, fixed links
  3. Removed some placeholder sections and added a more welcoming introduction
  4. Animation item #1 added that mines can also have animations currently
  5. Scripting item #3 added
  6. Animation item #1 added link to plugin and edited
  7. Animation item #2 added short guide by Nyxyx on how to animate a cube in blender for the game
  8. Scripting item #4 added short guide by Akira on how to set up and underground mesh
  9. Added section for building editor
  10. Building Editor #1 added steps to edit custom mesh in BE by Ternet
  11. General modding Part 2 item #1 added. Shotkey's guide
General modding Part 1
General Modding, Questions and Answers


  1. Q: Which programs do I need to get into modding?
    A: If you want to, for example, make just a reskin mod, all you require is any text editor (for example the default notepad on your computer) and an image editing program . The free ones are paint.net or GIMP. You can also use Photoshop, but for that you’d have to pay. If you want to get into modding of other things, like buildings or vehicles, you will need a 3D modelling software. The best one you can find for free is Blender. It is also suited with a plugin to export game format files.


  2. Q: How do I prepare my files for conversion and how do I convert them to the in-game formats?
    A: If you want to convert your 3D model to the game format you’ll need every face in your model to be a triangle ( use the triangulate option in Blender) and then use the merge by distance option. After that, export your mesh as an .obj file. After that, go into Modelviewer and use the import option. Import your mesh and save it as .nmf . To convert the textures into .dds format, load up an image editor and simply save your textures as .dds format. For that you can use paint.net, GIMP or Photoshop.


  3. Q: Where do I find my workshop_wip folder?
    A: It is located in SovietRepublic > media_soviet. If you create a workshop item, its files wil be located in one of these folders. The numbers in the name of the folder are your workshop item ID.

    ***See General modding Part 1, item 12. for more details on creating a workshop folder.***


  4. Q: Why does my game crash while loading after I created a mod?
    A: This can be caused by many reasons, but most likely, it’s because you exceeded the limit of skins or models per one workshop mod. The limit for material files in a reskin mod is 16 (when you create a multiple unit i.e. a multi car trainset, you need more than 2 material files). The limit for individual buildings and vehicles is 32, which can have up to 16 skins each. Other reasons may be, for example, a mistake in the code you wrote. Ensure you do not use any spaces unless it is within quote marks. I.e. $NAME_STR "V3S Multiunit train"


  5. Q: Can I mod something other than maps, skins, vehicles and buildings? Can I mod infrastructure?
    A: No - not yet. The game doesn’t allow that.


  6. Q: How do I create separate preview images for my pack of buildings?
    A: In the folder of every building you need to put a 96x96 pixels .png file and name it imagegui.png


  7. Q: Which files do I need to create an item and how do I make them?
    A: (Maps) - a .png file that is not bigger than 1 MB for your workshop and in-game preview (can be changed later) and a .txt file for your description (can be changed too).

    (Reskins) - a .png file that is not bigger than 1 MB for your workshop and in-game preview (can be changed later) and a .txt file for your description (can be changed too). For the reskin itself you need to copy the diffuse.dds and material.mtl file of the vehicle you’re reskinning, and put them in you workshop folder. From there you can start fun with editing them.

    (Vehicles) - a .png file that is not bigger than 1 MB for your workshop and in-game preview (can be changed later) and a .txt file for your description (can be changed too). Besides that, you’ll need a .nmf file of your vehicle (can be created by converting an .obj file to .nmf in Modelviewer), an .mtl file (can be also created through Modelviewer) and a script.ini file (which you can copy from a folder of another vehicle from the same type you’re modding).

    (Buildings) - a .png file that is not bigger than 1 MB for your workshop and in-game preview (can be changed later) and a .txt file for your description (can be changed too). Besides that, you’ll need a .nmf file of your building (can be created by converting an .obj file to .nmf in Modelviewer), an .mtl file (can be also created through Modelviewer) a building.ini file (which you can copy from a folder of another building from the same type you’re modding) and a renderconfig.ini file.


  8. Q: What are the .mtl, .dds, .nmf, .ini and other file extensions for?
    A: .mtl - a material file. It sets the properties of how the lighting affects your mod in the game
    .dds - direct draw surface. This file is the texture file of your vehicle/building
    .nmf - mesh file. It is the model of your vehicle/building
    .ini - config file. It is used to write properties of your mod in the game, eg. capacity of your vehicle or to place the light(s)


  9. Q: Can I rip models from Workers and Resources: Soviet Republic, modify them and upload them on the steam workshop of the game?
    A: Yes, you can. Peter is allowing us to modify his models for his game.


  10. Q: Can I rip models from another game and upload them on the steam workshop of Workers and Resources: Soviet Republic?
    A: You can do that ONLY if you have the permission of the original author.


  11. Q: What does it mean that a thing is hardcoded?
    A: It means that a certain factor within the game cannot be changed.


  12. Q: How do I create a new mod folder?/How do I create a mod?
    A: Here:

    Note: If this is your first time creating a workshop item you will need to be logged into a browser and accept the steam user agreement. If you are not, your item will not upload, you will also not get an error message.

General modding Part 2
Useful Guides!


  1. Q: but i still don't understand.
    A: Then take a look at this guide! https://steamproxy.net/sharedfiles/filedetails/?id=3118625236
Steam Workshop
Steam Workshop Related Questions and Answers


  1. Q: How do I update a mod?
    A: To update your mod on the steam workshop, just press the green tick button while you are in the page of your mod IN THE GAME.


  2. Q: How to make my mods public?
    A: You make your mods public by changing the visibility of them in the workshop tab of the game and saving them with the green icon in the bottom right corner.


  3. Q: What happens after I make my item public?
    A: It will be visible for every person on the steam workshop. They will be able to download your stuff and play with it. When you get to the page of your item in the workshop, you can add screenshots to promote it there.


  4. Q: Do I need to subscribe to my own mod after I put it on the workshop?
    A: No, there is absolutely no need to.


  5. Q: Where can I find mods I subscribed to?
    A: You can find it in subfolders, which are located inside of
    C:steam diretory\Steam\steamapps\workshop\content\784150


  6. Q: When updating a mod, after I have added a better description and a different preview image on Steam, if I update the mod from the game, will it change the description and previews on Steam?
    A:Yes, what you have in your workshopconfig file will apply to the Steam workshop page after updating.


  7. Q: How to add screenshots to my steam workshop page?
    A: That can be done simply by going to the steam workshop page for your item and pressing “Add/edit images and video” on the right hand side of your workshop page.

Modelviewer
Questions about the Modelviewer Tool


  1. Q: Where do I find the Modelviewer?
    A: Modelviewer can be found in your Steam directory > steamapps > common > SovietRepublic folder. There, you will see a blue truck icon.


  2. Q: Why are my model and textures flipped when I import them into modelviewer? Will they be like that in the game too? How do I fix that?
    A: This is just how the modelviewer works. When put in the game your model and textures will be flipped too. You can fix that by flipping your model along the X axis before exporting to .obj this is unnecessary for vehicles.


  3. Q: How do I locate the coordinates for my script?
    A: After you load your mesh in modelviewer, find the “gizmo/point type” menu.
    Then select the point.
    After that, a point will appear.

    Using the arrows, you can move it around and wherever it is, you can save the coordinates, which it is on

    The coordinates can be saved in three different colours, you’ll see why in a second.
    The coordinates will appear in the log.html file located in your SovietRepublic folder and you can find them there, painted with colours you chose. From there, you can copy them to your script.

    Alternatively, if you don’t change the scale when you export the model from blender, the scale in blender is accurate to the grid shown in the modelviewer, so you can use the measuring tool in blender to determine dimensions and locations of nodes.


  4. Q: Why is modelviewer crashing?
    A: Common crashing is associated with something being wrong with a model. It is strongly advised to avoid any n-gons in your model by triangulating faces first. Sometimes it crashes because there are overlapping faces and loose vertices. Merging vertices is also required and by doing ALT+M > by distance, you are preventing from crashing the modelviewer.


  5. Q: Why are some parts of my model not visible in the game or are visible from the wrong side?
    A: If the face is invisible from both sides, that means you used an alpha texture. If it is visible from one side, but not the one you want it to be visible from, that means that you have to flip normals in your 3D program, because the game doesn’t support textures visible from both sides.

    Protip: A simple fix in blender is to select the face menu and solidify the area you wish to make dual faced.


  6. Q: Why is my building partially or completely underground? How do I fix that? What if it’s hovering above the ground?
    A: If your building is either underground or hovering above ground, it means that it is not placed correctly in your 3D objects editor. You have to place it just about on the 0 point of your 0 axis.


  7. Q: Why does my model look weird in Modelviewer?
    A: : The cause of this may be you have too high tris or verts (max is approximately 19000 per object) count on your model. Try removing some unnecessary detail until you lower them to an acceptable level.


  8. Q: How am I supposed to get, read and understand coordinates? How do I move around the point in Modelviewer?
    A: Using the pointer tool in the MV, you can find all the needed coordinates for anything in the script. There are also tools for finding the points for resource visualization.
    The axis directions are noted in the below picture. Each grid square is 1 unit. you will also see the log show on the left, and how the numbers are displayed (token_position).
    Using the colored arrows you can move the pointer (little red square) around by the axis. Or selecting the colored boxes will allow you to freely move it around.


  9. Q: Is the material file created in blender the same as the one created in modelviewer?
    A: : No, they are different. The game requires a material file created in modelviewer and the blender material will not load

Modeling
Questions and Answers related to modeling for WR


  1. Q: Is the scale in the game the same as in Blender?
    A: The games building and workers scale correlates to the metric system so real life measurements can most definitely be used and will give you the best outcome. Blender defaults to meters and works well for the game, but there is an option to switch to imperial measurements if you so desire. A person model in game is roughly 1.8 meters (or 6 feet). A floor a of building is usually 2.5 meters from floor level to the floor above. (NOTE: some buildings in the vanilla game vary slightly)
    (The workers model in the game varies in size when rotating or zooming)



  2. Q: What is the height of the in-game catenary so I can set the height of my pantograph?
    A: In game catenary is 5,75 meters above the track.

    Editors note: This Question was very important to Toprus


  3. Q: What is a LOD file? Is it implemented yet?
    A: LOD stands for level of detail. It means that the detail of your model will decrease when getting further from it. You have to create these files by yourself, they will not be automatically generated by the game.


  4. Q: (modelling)
    Q: How do I get my models in the right scale? Can someone send me a reference locomotive or building? (well you can just measure stuff in blender)
    A: Ask for a reference model on the modder’s discord at: https://discord.gg/s7hQ47r


  5. Q: Do I need to merge all my objects in Blender into one before exporting?
    A: No, if you have a few objects, you’ll be able to select them separately in modelviewer and apply different construction phases to them in the script (for buildings), so it’s actually better to have a few different objects. Also do the the limitations on verts (approximately 19000 per object) and the ability to reuse already textured buildings it can be beneficial to export as seperate objects to use multiple objects and materials.


  6. Q: Do I need to name the objects in Blender in order to make the game script use them for building construction costs?
    A: No, after you have all the separate objects prepared in your Blender file, you can rename them in Modelviewer. However any name you give them in Blender will carry over. See pic:

    The mesh name is needed to code the construction phases and properly render the model. You will take the mesh name from the picture above and then write it in the Building.ini like so: $COST_WORK_BUILDING_NODE module_shape you can repeat this as necessary for complex models with multiple objects(submeshes)


  7. Q: How to make wheels on vehicles rotate?
    A: name the mesh of the front tires “tire1Shape” and the rear tires “tire2Shape”. If you have more than one rear axle you can call them “tire3Shape” and on...

    You can also use: “tireFoward” and “tireRear1(2),etc”


  8. Q: Why is my vehicle dancing around?
    A: This happens when the word tire is spelled with an upper case T. Make sure the word tire is spelled in only lower case as noted in the above question.

Texturing
Questions and Answers about making Textures


  1. Q: The textures on my model are waaaay too bright when imported to Modelviewer. How can I fix that?
    A: You can change the brightness of your texture and the impact of light on it by using the sliders in modelviewer until you’re happy.

    Protip: you can also alter them in the material file using a program like notepad, start with this and adjust them up or down if it's too bright/dark
    $DIFFUSECOLOR 0.5 0.5 0.5 0.5
    $SPECULARCOLOR 1.000000 1.000000 1.000000 1.000000
    $AMBIENTCOLOR 0.5 0.5 0.5 0.5


  2. Q: What is an alpha texture? How and when do I use it?
    A: An alpha texture is a very useful thing for when you want to decrease the number of tris you have and it can impact performance a lot. You can create it by cutting a part of a texture (select the part and ctrl + x). In buildings, that will mean that this part of texture is transparent, which means you can see through it. Useful for making fences for example. On vehicles, that part will be replaced with an in-game window texture, which will shine during night.


  3. Q: What is a bump map? How do I make it?
    A: It is a way to mess with the shading on your model, to make it look like a surface is 3D, when it’s just a plain surface. It improves performance a lot, because you spend less tris on details. It is helpful for surfaces such as corrugated steel or vents. You can create it with a 3D modeling program like Blender by a process called Baking.




  4. Q: Why do my colors look different in Blender, graphic editor, modelviewer and ingame?
    A: It is because the lighting engine is not the same for every program and it can be different.


  5. Q: What is the size of a texture? Suggested size? Max size?
    A: The recommended size of the texture performance-wise is 1024x1024 pixels for vehicles and small to medium buildings. For larger buildings use 2048x2048 pixels. If you think your texture is too small, you can save space by overlapping a few faces on your UV map in your 3D editor.

    It is not recommended to go over 4096x4096 at maximum.


  6. Q: I tried cutting a place for a window in my graphics editor, but the game displays some white area around it. How do I fix it?
    A: It is caused by having a half-transparent piece of texture, you must fix it in your image editor.


  7. Q: How do I make the lights in my building shine at night?
    A:: To make your windows shine at night, you need to create an _e texture. To make an _e texture just get your normal texture, replace your window textures with night window textures and make everything else on the _e texture completely black. Save it as (texture name)_e and create a new material file. Name it (name of material)_e and change $TEXTURE 1 blankspecular.dds with $TEXTURE_MTL 1 (name of texture)_e.dds

Scripting
Question and Answers about Scripting


  1. Q: Why does my vehicle/building not do (x)?
    A: Every property of your mod is written in the script. You can add properties through the script. To see what does what, you can visit the official documentations for vehicles https://steamproxy.net/sharedfiles/filedetails/?id=1861143159 and buildings https://steamproxy.net/sharedfiles/filedetails/?id=1885817861 We also recommend you visit the guide for vehicle skinning https://steamproxy.net/sharedfiles/filedetails/?id=1802735632


  2. Q: How do i set the vehicle station?
    A:


  3. Q: How do I make a building 'fire proof'?
    A: In the Building Script remove all instances of VEHICLE_STATION i.e: $COST_WORK_VEHICLE_STATION_ACCORDING_NODE this will make the building.fire file generate blank (or not at all)


  4. Q: How do I make set up an underground mesh?
    A: 3 tried and tested steps to get custom underground meshes to work (Aug2022):

    Note: If you do not need a custom shaped underground and only need the piping, the game automatically adds underground piping at the positions of $CONNECTION_WATERPIPE or $CONNECTION_SEWAGE you specify.
    No need to bother with anything else mentioned below.

    Step 1:
    In order to make life and debugging easier, put your underground mesh and corresponding material to use in the same folder as your building.ini
    You can call the 2 files anything you want.
    (In the example below I named them model_under.nmf and material_under.mtl)

    Add this line in the building.ini:
    $UNDERGROUND_MESH_WORKSHOP model_under.nmf
    material_under.mtl

    Step 2:
    You need to specifically name the node to be nuilt from your underground mesh at any construction phase. (In the example below I name that part UnderPipes in Blender) :
    $COST_WORK_BUILDING_NODE UnderPipes

    Step 3:
    This may be unnecessary but if you want to be 100% sure, make the construction phase costs where you built the underground part be calculated automatically with tech_steel:
    $COST_RESOURCE_AUTO tech_steel X

    So a complete example of the construction phase would be:

    $COST_WORK SOVIET_CONSTRUCTION_STEEL_LAYING 1.0
    $COST_WORK_BUILDING_NODE UnderPipes
    $COST_WORK_VEHICLE_STATION -11.5000 0.0000 11.0000 -13.0000 0.0000 11.0000
    $COST_RESOURCE_AUTO tech_steel 0.6

    Your underground mesh should get built and be fully viewable in the game.

    Addendum: Thanks to Illy and Comrade Dimitry for pointing this out:
    "Some buildings which are designed to have underground stuff have a default UNDERGROUND_MESH_DEPTH_OFFSET, but you need to provide it for other buildings if your underground mesh does not show.
    You have to set that "depth" value larger than the depth of your model like adding $UNDERGROUND_MESH_DEPTH_OFFSET 10 or something like that."
    (Credits to Akira for this short guide)

  5. Q: What is bbox correction for locomotives, how do i use it?
    A: It allows you to shrink the bbox to allow for articulated locomotives or trams or Tender engines. Included in the picture explanation is also a new token that allows you to fix the axle distances allowing for shorter engines than the game allows by default.

Animations
How do I make this thing move?


  1. Q: Can I create animations for my models? How do I do that? Is it implemented yet?
    A: The dev has provided a blender plugin which you can find the link for here: https://www.dropbox.com/sh/xuyrj0he24rgzz4/AACL2yws9pCVIHt4fvho2m7ga?dl=0. A lot of buildings and vehicles can now be animated in various ways.


  2. Q: How do i animate something in blender?
    A: Here is how to make an example animation of a cube:
    create the cube and an armature bone
    Give the cube a vertex group and make sure the vertices of the cube are assigned to the group
    then parent the cube to the armature "with empty groups"
    if the bone name and the vertex group name are different, this action will create a new vertex group in the object with the name of the bone
    in this case, this vertex group will be empty. You need to assign the vertices to this group
    if the names of the bone and the vertex group match this will not happen
    (this is what it means by "empty groups")
    as long as the object has vertices assigned to a vertex group with the same name as a bone, it should work
    (written by and all credit goes to Nyxyx for this short guide)
Building Editor
  1. Q: How can i edit my own mesh in the BE?
    A: 1) create a save in building editor
    2) find the save's folder inside game files
    3) insert your nmf, mtl and texture files in it
    4) rename nmf and mtl files to "custom.nmf" and "custom.mtl"
    5) load the save in building editor again, and tick the "use custom nmf"
    6) script away
    7) export to game (I think the option is called)
    8) test it out in game and then adjust things manually you think it didnt do right
    (credits to Ternet)

Map making Part 1
Landscape Editor Questions and Answers


  1. Q: Where can I find the map editor?
    A: After you create and save a workshop item with the item type set to Landscape, an icon near the green check mark will appear. That is the map editor.


  2. Q: How do I import a heightmap for my map mod?
    A: Here’s a steam guide by one of the devs to help you:
    https://steamproxy.net/sharedfiles/filedetails/?id=1835594235&searchtext=heightmap


  3. Q: Why are certain buildings blocked in the map editor?
    A: The buildings, which are blocked, are buildings that are unlocked through settings at the start of your game - power, fuel usage, pollution, education level and so on. Buildings locked by research in the game are also locked.


  4. Q: Can I use modded buildings in my custom maps?
    A: Yes, you can, however if you’re going to upload the map, you’ll have to list the mods you used in the required items field on steam workshop.


  5. Q: Can I run vehicles in the map editor?
    A: Yes, you can purchase and run vehicles in the map editor freely.


  6. Q: : How does the terrain generator in the map editor work?
    A: It generates terrain ONLY (no buildings, trees, resources, rocks) according to the values you insert.


  7. Q: : How does the rock generator in the map editor work?
    A: You set the values - the max and minimum grade for the slope to generate rocks, the minimum height where it starts generating rocks, the maximum height where it starts generating rocks, and the max height of the slope.


  8. Q: I can’t find rocks in the resources menu in the map editor. Where do I find them?
    A: They have their own tab. There you can also find a tool which automatically generates rocks across your map.

Map Making Part 2 (more Q&A coming soon)
Advanced Questions and Answers
More Advanced, Questions and Answers


Advanced Textureing
  1. Q: Object that I want to texture is bigger in one dimension (longer, wider, thicker) than in other dimensions. How do I texture it properly without the unwanted scaling and distortion.
    A: You can split the UV mesh into smaller pieces and put it on top of each other. Check the gif below.



  2. Q: I used an alpha texture on my vehicle, but instead of being transparent, it becomes a black space. What’s this?
    A: The game automatically replaces alpha textures in vehicles with a window texture, which shines at night. There is a way to make alpha textures for vehicles, but it’s hard.
    Come join us at the modder’s discord and we’ll explain it to you.

Glossary
frequently used acronyms in this guide and on the community:

CO - Construction Office
RCO - Rail Construction Office
MV - Model Viewer
WR - Workers and Resources
WRSR - Workers and Resources; Soviet Republic
BE - Building Editor
↓ Slovenský preklad ↓
Úvod od autorov
Topie je zemiak
Ahojte ako budem viditeľný ako je topie
Ano jasne a čiste
Takže ma vidíš ako topieho?
Nie ale môžem ťa vidieť písať

Dalo vám to náhodné zvieracie mená
Topie je narval na mojej obrazovke a 4smiler je kačica
Takže ako sa teda stanem topiem :D

Nehovorím o tom, žeby narvali neboli pekné zvieratá
A kto je škrečok mimochodom?
Ja
Nie ty si kačica
Na mojej obrazovke som ja ♥♥♥♥♥ neviem :DD
Jašterica prišla

O: Je sc
leguán?
Vidím kravu?

Ok všetci čo poviete ak sa dáme do práce, bude to ľahšie
Navrhujem aby sme označili všetko čo už máme, potom nejako usporiadali do zmyslupolného poradia.
Aktualizácie
Aktualizácie a zmeny v texte budú uvedené s konkrétnou kategóriou a číslom otázky #

  1. Modelovanie #6, Pridaná chybajúca fotka.
  2. Skriptovanie #1, Opravené linky
  3. reserved
Všeobecne o módoch Časť 1
Všeobecné módovanie, Otázky a odpovede


  1. Q: Aké programy potrebujem na módovanie?
    A: Ak napríklad chceš preskinovať nejaký mod, stačí hociktorý textový editor (napríklad poznámkový blok) a grafický program. Tie zadarmo sú napríklad paint.net alebo GIMP. Môžeš použiť aj Photoshop, ale ten si musíš zaplatiť. Ak sa chceš naopak dostať k modelovaniu iných vecí, napr. budov alebo vozidiel, tak budeš potrebovať 3D modelovací program. Najlepší, ktorý môžeš nájsť je Blender. Na tento program existuje aj plugin, ktorý ti dovolí exportovať priamo do formátu, ktorý podporuje hra (plugin je dobrovoľný).


  2. Q: Ako pripravím moje súbory aby ich vedela hra rozpoznať?
    A: Ak chceš konvertovať svoj 3D model do herného formátu, tak potrebuješ po vymodelovaní všetky strany previezť na trojuholníky ( triangulate možnosť v Blenderi) a potom ešte použiť jednu funkciu ( merge by distance ). Potom ako to urobíš môžeš svoje modely exportovať ako .obj súbor. Následne v Modelviewer importuješ tvoj .obj a uložíš ho ako .nmf. Na konverziu textúr do .dds formátu zase potrebuješ grafický program, ktorý ti takýto súbor uloží ako formát .dds. Použi paint.net, GIMP alebo Photoshop.


  3. Q: Kde môžem nájsť môj workshop_wip priečinok?
    A: Nachádza sa v SovietRepublic > media_soviet. Ak vytvoríš workshop súbor cez hru, tak sa ti v zložke workshop_wip bude nachádzať priečinok pre ten daný mód. Každá zložka má vlastné číslo, ktoré je tiež ID na workshope.

    Pozri otázku #41 pre viac detailov ako vytvoriť workshop priečinok.


  4. Q: Prečo mi padá hra pri načítavaní potom čo som vytvoril mód?
    A: Môže to byť veľa vecí, no najpravdepodobnejšie preto, že si prekročil limit pre skiny alebo modely. Jeden mód zo skinom môže mať maximálne 16 rôznych materiálov (skinov). Ak sa ale venuješ napríklad vlakovej jednote, musíš mať materiál aj pre každý jeden objekt (čiže hnací vozeň + vložený vozeň). Limit pre jednotlivé budovy je 32, ktoré každá z nich môže mať maximálne 16 skinov. Ostatné dôvody padania hry môžu byť v chybe pri písaní kódu. Presvedč sa, že tam nemáš žiadne medzery, iba ak si použil zátvorky napr. $NAME_STR "V3S Multiunit train".


  5. Q: Môžem módovať niečo iné ako mapy, skiny, vozidlá a budovy? Môžem aj infraštruktúru?
    A: Zatiaľ nie. Hra to nedovoľuje.


  6. Q: Ako vytvorím vlastné náhľady pre sériu budov?
    A: Do priečinku každej budovy musíš vložiť 96 x 96 pixelov veľký obrázok formátu .png a nazvať ho imagegui.png


  7. Q: Aké konkrétne súbory potrebujem na vytvorenie módu a ako ich vytvoriť?
    A: MAPY - .png súbor do veľkosti 1 MB pre náhľad vo workshope a v hre. (môže byť zmenený kedykoľvek). Ďalej potrebuješ .txt súbor s popisom (tiež sa dá zmeniť neskôr).

    PRESKINOVANIE - .png súbor do veľkosti 1 MB pre náhľad vo workshope a v hre. (môže byť zmenený kedykoľvek). Ďalej potrebuješ .txt súbor s popisom (tiež sa dá zmeniť neskôr). Na preskinovanie musíš do svojej vytvorenej workshop zložky pridať originály s textúrou diffuse.dds a material.mtl vozidla, ktorého chceš preskinovať. Potom ich môžeš upravovať, a takto vznikne tvoj unikátny skin.

    VOZIDLÁ - .png súbor do veľkosti 1 MB pre náhľad vo workshope a v hre. (môže byť zmenený kedykoľvek). Ďalej potrebuješ .txt súbor s popisom (tiež sa dá zmeniť neskôr). Potom potrebuješ .nmf súbor tvojho vozidla (vytvorí sa z .obj cez Modelviewer), .mtl súbor (cez Modelviewer) a script.ini súbor (ktorý môžeš odkopírovať od podobného typu vozidla).

    BUDOVY - .png súbor do veľkosti 1 MB pre náhľad vo workshope a v hre. (môže byť zmenený kedykoľvek). Ďalej potrebuješ .txt súbor s popisom (tiež sa dá zmeniť neskôr). Potom potrebuješ .nmf súbor tvojej budovy (vytvorí sa z .obj cez Modelviewer), .mtl súbor (cez Modelviewer) a building.ini súbor (ktorý môžeš odkopírovať od podobného druhu budovy).


  8. Q: Načo sú súbory typu .mtl, .dds, .nmf, .ini a ostatné prípony?
    A: .mtl - súbor s materiálom. Nastavuje sa intenzita a úrovne osvetlenia tvojich módov.
    .dds - obsahuje textúru vozidla/budovy.
    .nmf - model vozidla/budovy.
    .ini - config súbor so všetkými údajmi a vlastnosťami módu napr. kapacita, súradnice svetiel.


  9. Q: Je dovolené stiahnuť, následne modifikovať a zverejniť na workshope veci priamo z hry Workers and Resources: Soviet Republic?
    A: Áno je to dovolené.


  10. Q: Je dovolené stiahnúť módy z inej hry a zverejniť ich na workshop hry Workers and Resources: Soviet Republic?
    A: Môžeš to urobiť IBA vtedy, ak máš povolenie od autora pôvodného módu.


  11. Q: Čo znamená, že konkrétna vec je hardcoded?
    A: Znamená to, že tá konkrétna vec nemôže byť zmenená. Je to vlastnosť hry.


  12. Q: Ako vytvorím nový priečinok s módom? Ako vytvorím mód?
    A: Podľa tohto gifu:

    Poznámka: Ak vytváraš mód po prvýkrát, musíš byť prihlasený do steamu cez prehliadač a prijať podmienky steam workshopu. Ak to nepotvrdíš, tak tvoj mód nebude vytvorený a nedostaneš ani žiadne upozornenie.

Všeobecne o módoch Časť 2
Všeobecné módovanie, Otázky a odpovede


  1. Q: Pribudnú ďalšie otázky?
    A: Áno.
Steam Workshop
Otázky týkajúce sa Workshopu


  1. Q: Ako aktualizujem môj mód na workshope?
    A: Pre aktualizáciu stlač zelenú fajočku v menu hry. Je na tom istom mieste ako +, cez ktoré si tento mód vytvoril.


  2. Q: Ako zverejním svoje módy pre verejnosť?
    A: Zverejníš to ak zmeníš viditeľnosť módu v kolónke workshop v menu hry. Uložíš to kliknutím na zelenú ikonku vpravo dole.


  3. Q: Čo sa stane ak budú moje módy verejné?
    A: Budú viditeľné pre každého na steam workshope. Budú možné stiahnuť a ľudia s nimi budú môcť hrať. Na stránke workshopu si k módu môžeš pridať screenshoty a popis.


  4. Q: Musím odoberať (subscribnúť) svoje vlastné módy potom čo som ich zverejnil na workshope?
    A: Nie, nie je to vôbec nutné.


  5. Q: Kde môžem nájsť módy, ktoré odoberám?
    A: Môžeš ich nájsť v priečinku: C:steam diretory\Steam\steamapps\workshop\content\784150


  6. Q: Ak aktualizujem mód cez hru a zmením v ňom popis a nahľadový obrázok, zmení to pôvodné veci na workshope?
    A: Áno, všetko čo sa zmení vo workshopconfig súbore sa po aktualizácií nahraje na workshop.


  7. Q: Ako si pridám screenshot na workshop stránku módu?
    A: Jednoducho pôjdeš na stránku módu a klikneš na Add/edit images & videos.

Modelviewer
Otázky týkajúce sa programu Modelviewer


  1. Q: Kde môžem nájsť Modelviewer?
    A: Modelviewer nájdeš v Steam zložke: Steam > steamapps > common > SovietRepublic priečinok.


  2. Q: Prečo je môj model a textúry zrkadlovo otočené keď ich naimportujem do modelviewerea? Budú takéto aj v hre? Ako to opravím?
    A: Takto funguje Modelviewer. Ak to odignoruješ a vložíš súbory do hry, tak budú otočené správne. Ak by si si chcel odkontrolovať čo modeluješ a chceš proste vidieť náhľad tak zrkadli model podľa X koordinátu v Blenderi, aby si videl správny náhľad v Modelvieweri.


  3. Q: Ako dokážem nájsť súradnice pre skriptovanie?
    A: Potom čo naimportuješ objekt do modelviewera, nájdeš „gizmo/point type“ menu a zvolíš Point.
    Následne sa ti zobrazí bod.

    Klikaním na šípky si tento bod môžeš posúvať a súradnice si kedykoľvek uložiť pomocou týchto troch tlačidiel ♥♥♥♥.

    Súradnice môžu byť uložené v troch rozdielnych farbách, ktoré sa podľa farby zapisujú do súboru log.html, ktorý sa nachádza v priečinku SovietRepublic. Vnútri log.html to rozlíšiš podľa farby, ktorú si si v predošlom kroku zvolil. Súradnice si odtiaľ vieš skopírovať do svojho skriptu.

    Alternatívna cesta k zisteniu súradníc je pozícia v blenderi, pretože súradnice v modelvieweri a blenderi by mali byť rovnaké. Môžeš teda použiť pravítko v blenderi.


  4. Q: Prečo mi stále padá Modelviewer?
    A: Bežná vec je padanie programu, pretože je niečo zle s modelom. Je striktne odporúčané sa vyhnúť pri modelovaní n-uholníkom, čiže viac ako 4 vrcholy na jednu stranu. Odporúča sa všetky strany previezť na trojuholníky. Niekedy program padá aj z dôvodu prekrývajúcich sa strán a nespojených vrcholov. Združiť by sa mali vrcholy, ktoré sú blízko seba pomocou ALT+M > by distance v blenderi.


  5. Q: Prečo sú niektoré časti môjho modelu neviditeľné alebo sú viditeľné zo zlej strany?
    A: Ak sú neviditeľné z oboch strán, znamená to, že používaš alfa textúru. Ak sú viditeľné iba z jednej strany, bude problém, že tvoje normály sú otočené. Hra nepodporuje textúry viditeľné z oboch strán.

    Protip: Ak chceš urobiť strany viditeľné z oboch strán, môžeš použiť Solidify modifier v Blenderi.

  6. Q: Prečo je moja budova čiastočne alebo úplne pod zemou? Ako to napravím? Čo ak sa vznáša nad zemou?
    A: Pri budove pod alebo nad zemou je dôležité umiestniť budovu v 3D editore na nulovú výšku.


  7. Q: Prečo môj model vyzerá divne v Modelvieweri?
    A: Môže to byť spôsobené vysokým počtom trojuholníkov alebo vrcholov (max 19 000 pre 1 objekt). Skús sa zbaviť zbytočných detailov, a tým znížiť ich počty.


  8. Q: Ako mám získať súradnice a ako ich chápať? Ako posúvam Pointer v Modelvieweri?
    A: Súradnice pre model nájdeš používaním Pointera v Modelviewerovi. Všetky súradnice sa nachádzajú v skripte. V Modelviewerovi sa nachádza aj nástroj na zistenie hraníc pre vykreslenie surovín. Smery osí sú vyznačené v obrázku nižšie. Každý štvorček v mriežke je 1 meter. Naľavo v obrázku môžeš vidieť záznam a ako sú v ňom súradnice zobrazené (token_position).
    Kliknutím na farebné šípky si Pointer (malý červený štvorček) posúvaš po osiach. Je možné aj voľne posúvať Pointer kliknutím na farebné štvorce.


  9. Q: Je materiál súbor, ktorý sa vytvorí v Blenderi rovnaký ako ten z Modelviewera?
    A: Nie, sú odlišné. Hra vyžaduje material súbor z Modelviewera. Ten z Blendera nebude fungovať.

Modelovanie
Otázky týkajúce sa modelovania


  1. Q: Je mierka v hre a v Blenderi rovnaká?
    A: Modely v hre sa zmenšujú podľa reálnej metrickej mierky a podľa skutočných rozmerov. Z toho vyplýva, že môžeš používať reálne rozmery budov a všetkého iného. Blender je východiskovo nastavený na metrický systém. Výška človeka v hre je asi 1,8 metra. Výška stropu budovy po strop poschodia vyššie je asi 2,5 metra.
    POZNÁMKA: niektoré budovy majú odchýlku, veľkosť ľudí sa mení pri zoomovaní.



  2. Q: Aká je výška trolejového vedenia na koľajniciach aby som si vedel správne vymodelovať výšku pantografov?
    A: Výška je presne 5,75 metra nad koľajnicami.


  3. Q: Čo je to LOD súbor? Je to implementované?
    A: LOD znamená „Level Of Detail“, čiže úroveň detailu aký sa práve vykresľuje v hre. Myšlienka je tá, že úroveň detailov sa pri vzdialenejších objektov znižuje. Tieto súbory si musíš vytvoriť sám, pretože to nevygeneruje hra za teba. Ak ich nechceš urobiť, tak nemusíš, pretože LOD ešte zatiaľ nie je implementovaný. Nie je jasné, či vôbec niekedy budú.


  4. Q: Ako dostanem modely do správnej mierky? Môže mi niekto poslať lokomotívu alebo budovu ako podľa ktorej si to porovnám?
    A: Mierku si ľahko overíš aj v Blenderi. Referenčné modely sú na moderskom discorde: https://discord.gg/s7hQ47r


  5. Q: Musím všetky objekty združiť do jedného predtým ako ich exportujem z Blendera?
    A: Nie. Oddelené objekty si vieš jednotlivo vyklikať v Modelviewerovi. K nim môžeš jednotlivo v skripte (iba pre budovy) priradiť určité stavebné fázy. Z toho vyplýva, že je lepšie mať viac objektov. Pre jeden objekt je limitujúci aj maximálny počet 19 000 vrcholov (verts). Výhody viacerých objektov sú aj vtedy, keď chcem použiť jednu textúru na viacero objektov alebo použiť rôzne materiály pre jednotlivé časti budovy / vozidla.


  6. Q: Musím pomenovať objekty v Blenderi? Načo je to dobré?
    A: Nie. Ak máš objekty oddelené v Blenderi, tak ich môžeš premenovať v Modelviewerovi. Avšak je treba povedať, že meno z Blendera bude mať ďalší výnam. Pozri obrázok:

    Meno objektu je potrebné na to, aby sme vedeli správne nakódovať stavebné fázy a aby sa celý model správne vykreslil. Názov objektu zoberieš, zapíšeš ho do Building.ini takto: $COST_WORK_BUILDING_NODE module_shape. Príkaz zopakuješ pre komplexnejšie modely s viacerými objektami.


  7. Q: Čo musím spraviť aby sa mi otáčali kolesá na vozidle?
    A: V 3D programe si pomenuj kolesá ako samostatné objekty s názvami „tire1Shape“ pre predné a „tire2Shape“ pre zadné kolesá. Ak máš viac zadných kolies, pomenuj ich ako „tire3Shape“ a tak ďalej.

    Môžeš použiť aj „tireForward“ a „tireRear1(2),atď.“


  8. Q: Prečo mi vozidlo nekontrolovateľne skáče?
    A: Stáva sa to ak použiješ veľké písmeno T v skripte v otázke vyššie. Skontroluj si či tam nemáš to veľké písmeno.

Textúrovanie
Otázky týkajúce sa textúr a textúrovania


  1. Q: Modelviewer mi textúry zobrazí príliš svetlé. Ako to napravím?
    A: Úroveň jasu textúr môžeš upraviť posúvaním líšt v Modelvieweri.
    Protip: dá sa to aj priamo upravením hodnôt v material.mtl súbore pomocou napr. notepadu
    Upravuješ tieto hodnoty:
    $DIFFUSECOLOR 0.5 0.5 0.5 0.5
    $SPECULARCOLOR 1.000000 1.000000 1.000000 1.000000
    $AMBIENTCOLOR 0.5 0.5 0.5 0.5


  2. Q: Čo je to alfa textúra? Ako a načo ju použiť?
    A: Alfa textúra je dôležitý nástroj ak chceš znížiť množstvo polygónov a zároveň zachovať detail. Zníženie počtu trojuholníkov pomáha hre aby bežala plynule. Môžeš ju vytvoriť ak vystrihneš časť textúry pomocou napr. CTRL + X. Pri budovách je tento typ textúry priehľadný, čiže cez tie otvory vidíš. Je to užitočné ak robíš napríklad zábradlie. Pri vozidlách sa vystrihnutá textúra nahradí textúrou okien, ktorá v noci žiari.


  3. Q: Čo je to bump mapa? Ako ju vytvorím?
    A: Slúži na zvýraznenie kontúr a tieňov modelu, čiže akýsi 3D vzhľad roviny. Veľmi to priaznivo vplýva na výkon hry, pretože môžeme použiť menej trojuholníkov. Používa sa to hlavne pri zvlnenom materiáli alebo pri mriežkach. Túto mapu môžeš vytvoriť v 3D programe ako je napr. Blender. Ten proces sa volá Baking.




  4. Q: Prečo sú moje farby v Blenderi, grafickom programe, Modelvieweri a v hre iné?
    A: Je to z dôvodu rôznej úrovne vykresľovania farieb. Každý engine je iný, a tak každá farba je iná.


  5. Q: Aká je veľkosť textúry? Odporúčaná a maximálna veľkosť textúry?
    A: Odporúčaná veľkosť z hľadiska výkonu je 1024x1024 pixelov pre vozidlá a malé budovy. Pre väčšie budovy použi 2048x2048 pixelov. Ak si myslíš, že je tvoja textúra nedostatočne veľká, skús preložiť viacero UV vrstiev na seba v tvojom 3D editore.

    Nie je odporúčané ísť nad 4096x4096 pixelov.


  6. Q: Skúšal som vystrihnúť otvory na okná, ale hra mi zobrazí biele miesta okolo. Ako to opraviť?
    A: Spôsobujú to zvyšky textúry, ktorá je polo priehľadná. Musíš to v grafickom programe opraviť.


  7. Q: Ako dosiahnem aby mi svietili na budove v noci svetlá?
    A:: Na svietenie budov musíš urobiť _e textúru. Urobíš ju tak, že zoberieš normálnu textúru, vymeníš textúru okien za textúru okien v noci. Mimo okien urobíš všetko v _e textúre kompletne čierne. Uložíš ju ako menotextury_e.dds a vytvoríš nový materiál. Pomenuješ ten materiál menomaterialu_e.mtl a zmeníš v ňom $TEXTURE 1 blankspecular.dds za $TEXTURE_MTL 1 menotextury_e.dds.

Skriptovanie
Otázky týkajúce sa skriptovania


  1. Q: Prečo moja budova alebo vozidlo nerobí niečo čo má?
    A: Každá vlastnosť módu je napísaná v skripte. Pridáš ich cez určité príkazdy.
    Pozri sa na oficiálnu dokumentáciu k vozidlám: https://steamproxy.net/sharedfiles/filedetails/?id=1861143159 A k budovám: https://steamproxy.net/sharedfiles/filedetails/?id=1885817861 Odporúčame pozrieť aj návod na skinovaniu vozidiel: https://steamproxy.net/sharedfiles/filedetails/?id=1802735632


  2. Q: Ako nastavím stanicu vozidiel?
    A: Podľa obrázka:

Animácie
Otázky týkajúce sa animácií


  1. Q: Môžem vytvoriť animácie pre môj model? Ako to urobím? Je to implementované?
    A: Vývojári nám poskytli plugin, ktorý je dostupný na moderskom discorde > important links. Avšak v súčasnej dobe je implementovaná iba jediná animácia. Animácia rýpadla (eng: excavator).

Tvorba máp Časť 1
Otázky týkajúce sa tvorby máp


  1. Q: Kde môžem nájsť mapový editor?
    A: Potom ako vytvoríš workshop mód typu Landscape, uvidíš logo editora hneď vedľa zelenej ikonky napravo.


  2. Q: Ako môžem importovať výškovú mapu (heightmap) pre moju mapu?
    A: Dozvieš sa to v priloženom návode na steame:
    https://steamproxy.net/sharedfiles/filedetails/?id=1835594235&searchtext=heightmap


  3. Q: Prečo sú niektoré budovy zablokované v mapovom editore?
    A: Zablokované budovy sú tie, ktoré si hráč volí na začiatku mapy, čiže veci ako napr. elektrina, spotreba paliva, znečistenie, úroveň školstva atď. Takisto sú zablokované aj budovy dosiahnuteľné výskumom.


  4. Q: Môžem použiť budovy z módov ak si chcem vytvoriť vlastnú mapu?
    A: Áno, ale ak tú mapu chceš zverejniť na workshope, musíš uviesť aj zoznam módov, ktoré sú vyžadované. Uvedieš to do kolónky required items.


  5. Q: Môžem použiť vozidlá v mapovom editore?
    A: Môžeš ich kúpiť a používať.


  6. Q: Ako funguje generátor terénu v mapovom editore?
    A: Generuje čisto iba terén (nie budovy, stromy, suroviny, kameňe) podľa hodnôt, ktoré vložíš.


  7. Q: Ako funguje generátor kameňa v mapovom editore?
    A: Nastavíš hodnoty - maximálneho a minimálneho sklonu kde sa môže generovať kameň. (Angle start a Angle end). Potom maximálnu a minimálnu výšku v ktorej sa kameň bude generovať (Height end a Height start). Height fall a Angle fall sú vhodné na jemný prechod kameňa a trávy.


  8. Q: Nemôžem nájsť kamene medzi menu so surovinami. Kde ich nájdem?
    A: Majú svoje vlastné menu. Nachádza sa tam aj generátor, ktorý ich generuje do celej mapy.

Tvorba máp Časť 2 (pribudnú ďalšie Q&A)
Otázky a odpovede pre pokročilých
Riešenie pokročilých problémov


Pokročilé textúrovanie
  1. Q: Objekt, ktorý textúrujem je väčší v jednom smere (dlhší, širší, hrubší) ako v ostatných smeroch. Ako ho správne natextúrujem bez toho, aby som tie textúry nenatiahol?
    A: Môžeš rozdeliť UV mapu na menšie kúsky a položiť ich na seba. Ako na tomto gife:




  2. Q: Použil som alfa textúru na vozidlo, ale textúra nakoniec nebola priehľadná ale čierna. Čo sa stalo zle?
    A: Hra automaticky nahradí alfa textúru oknami, ktoré v noci svietia. Avšak existuje spôsob ako urobiť pravú alfa textúru pre vozidlá. Cesta k tomu je ale náročná, ale ak to chceš vedieť, pýtaj sa kompetených na moderskom discorde.

Slovník
Často používané termíny a skratky v tomto návode a medzi komunitou:

CO - Construction Office (v slovenčine: Závod pozemných stavieb)
RCO - Rail Construction Office (v slovenčine: Závod železničných stavieb)
MV - Model Viewer
WR - Workers and Resources
WRSR - Workers and Resources; Soviet Republic
Vertices - Vrcholy
Faces - Strany
Tris - Trojuholníky
33 Comments
mg1827999830 7 Jun, 2023 @ 7:24am 
how to "bake"?
Letusgo Iron 4 Nov, 2022 @ 1:01pm 
And you know how he does the mods of roads, paths, railway tracks, railway lines, runways, taxiways, bridges: railroad, road and tunnels: road and railroad. Do you know anything about it?:techs:
richardkovarik25 21 Feb, 2022 @ 10:44am 
zrovna sem si stáhl blender akorát bych potřeboval vědět kde můžu stáhnout plugin na otevírání nebo formátování souboru do hry
richardkovarik25 21 Feb, 2022 @ 9:53am 
Dobrý den chtěl bych si vytvořit vlastní model vozidla jenže v modelvieweru nemohu najít příslušenství - lištu s nástroji pro úpravu nebo tvorbu modelů tak se chci jen zeptat co mam udělat nebo jak s tím pracovat

ještě se chci optat na to kde mam najít program Blender ve složce s hrou sem jej nenašel počítám že to není k této hře oficialni program ale má podobné funkce
ryantheskinny  [author] 18 Feb, 2022 @ 11:37am 
Absolutely! I need to take some time to add to this soon as well
FeedMio 18 Feb, 2022 @ 10:26am 
Can i help with polish translations ?
Zyx Abacab 29 Oct, 2021 @ 10:30am 
@ryantheskinny The question " How do I make the lights in my building shine at night? " is missing a critical step: the new night texture must also be added to the renderconfig.ini file with a MATERIALEMISSIVE directive. Could you kindly update the answer to include this information?
Basil Peace 1 Aug, 2021 @ 2:08am 
What is the best way to modify existing item from workshop?

And is it ok in this community to publish this `modified mod` (with appropriate credits etc.)?
(I'd want to change a balance between several mods)
ryantheskinny  [author] 18 Apr, 2021 @ 7:36am 
Here is a new one :)
https://discord.gg/95CBdEc
[PL] BreFi 18 Apr, 2021 @ 7:13am 
Is yours discord server still avaible? Link to the server has expired