Tutorials/Map Editor/Introduction to the Map Editor/Saving, Loading, Sectors, and Files
Saving, Loading, Sectors, and Files | |
Topic: | Map Editor |
Difficulty: | Easy |
Tools: | Map Editor |
So far we have learned how to launch the editor, and some of the basic tools and functions that are available to us. We will continue to expand on this by learning how to save, load, and run our map. We'll also talk about where our files are being saved and what's in them.
Contents
Placing our First Road and Saving our Map
Loading our map
Running our First Map
Sectors, an Explanation
So I want you to imagine mainland Europe. Now imagine that we took a giant cookie cutter in the shape of a square and punched a chunk out in the middle of Europe. This single square is called a sector. The entire map of Europe, or any map for that matter, is made up of many of these sectors. The first sector of the map is the origin, and its named: SEC + 0000 + 0000. A single sector has a length of 4000 meters with a height of 4000 meters or 162 km. Sectors are numbered from 0000-9999 and may either have a (-/+). The can travel near infinetly in the X and Y axis. Each subsequent sector change their value based on their location. The image below shows how sectors are numbered starting from the origin.
So what does that mean for us? For map editing not too much. When we get to the edge of a sector, the editor automatically creates another sector with no input necessary from you. However, if you have a problem with a single sector you don't loose your entire map, and it makes it easier to keep track of different changes. Additionally, several map makers could work on a single map project dividing the work among sector borders.
This brings us to our next topic...
Files
When we launched the editor for the first time, a folder was automatically created in our /home/mod
directory called 'user_map' This is where the game automatically saved our map and map files. Lets take a look at what was saved.
Note: Typical location of the /home
directory: C:\Users\*user*\Documents\Euro Truck Simulator 2\mod
Looking inside of /home/mod/user_map/
we have a folder and 3 files (remember our example map was named "deerland"):
- deerland (folder)
- deerland.epa
- deerland.mbd
- deerland.set
Now looking inside of /home/mod/user_map/deerland/
we have 5 files:
- sec-0001-0001.aux
- sec-0001-0001.base
- sec-0001-0001.data
- sec-0001-0001.desc
- sec-0001-0001.layer
Note: Your first sector number might be different depending on where you clicked and drew your first and only road piece
These files are stored in binary format that the game reads data from. The most important part is that a single sector is made up of 5 files (6 files counting a .SND file which is not present here since we have no sounds in our sector, yet) In order for your map sector to function you need at least all 5 named sector files or your game will crash. Each of the 5 sector files are responsible for a different aspect of our map: roads, signs, sounds, model placement, sign layouts, overlays, cities, companies, etc. The 3 other map named files are header files that are used to open our map in the editor.