Closed mike-koch closed 8 years ago
Given how much similar both games are probably going to be, and how similar our code will be; I vote for keeping both ATS and ETS2 together in the same repository and in the same codebase. Changing between ATS and ETS2 can be a simple configuration in our code; or maybe even automatic if the telemetry server adds a value that identifies the game.
For download, we may have two branches (ATS and ETS2) so that people don't need to download the map of the game they don't have.
Regarding renaming the repository, let's wait to see if ets2-telemetry-server will be renamed as well. For the sake of keeping the old links still working, I'm in favour of keeping the name. If we ever rename it, I suggest adding redirections from the old name.
Truck icon: Yes, I did the SVG icons.
The process was like this:
base.scs
, using scs_extractor
. This ensures the highest possible quality for the source material, usually higher than screenshots. Look:Extract the original texture image from base.scs, using scs_extractor. This ensures the highest possible quality for the source material, usually higher than screenshots
I already ordered my copy from Gamesplanet, so I should be getting my Steam key on the 3rd. I'll extract the needed textures and post them here as soon as I get base.scs
extracted.
Mapping: I think I got the map capture mod working as-is (as you noted in the forum thread); however there is still a weird issue with the camera settings (as the garage looks tiny on-screen, and I'm not sure if it's supposed to be there at all :laughing: ). It's possible to ignore that with the bright purple/pink colored roads; I just need to figure out the correct number of rows and columns to capture the entire map :grinning:
Another option for mapping is to look into nlhan's ets2-map project, which takes *.base
files from the maps to rebuild the roads (via some fancy trigonometric functions and other craziness I could not completely understand yet lol), along with some prefab information. I got the program to dump the majority of the roads; however it seems to be missing the road prefabs (such as highway/motorway interchanges, etc; see nlhans/ets2-map#1). If this app will work well and consistent enough where we can export this information to a .PNG or similar, it would be much faster than having the capture mod slowly screenshot each part of the map in-game (the C# program takes ~15 sec to render Europe). I've included a basic output from ets2-map. I'm not concerned about POIs or city names, as I'd like to place city names and POIs as separate layers in the map (see #48).
(If you can look at the full-screen image, you can see several missing road pieces)
Speed Limit: It looks like the new speed limit sign is just a plain white rectangle around the current speed limit. That will be extremely easy to update.
Sorry for the massive brain dump, but I'd like to get all of this out there in some way :laughing:
Extracting data from the game is the better solution, no doubt. We can even try to extract it as vector data itself.
I've managed to run Ets2MapDemo. Here is a quick screenshot comparison:
I'd love to read the documentation for the formats of the game data. It would make writing such tools so much easier. Right now I'm just blind.
By the way, here is the output of Ets2MapDemo:
0 buildings were found
18995 roads were found
4109 prefabs were found
3308 road prefabs were found
1115 service points were found
237 companies were found
117 cities were found
I changed projectMap
at line 24 of Ets2MapDemo.cs
. Here are the contents of the directory pointed by that var:
+- LUT/ (found inside ets2-map repository)
| +- LUT1.19-cities.csv
| +- LUT1.19-companies.csv
| +- LUT1.19-prefab.csv
| '- LUT1.19-roads.csv
'- SCS/
+- europe/
| '- *.base
+- prefab/
| '- *.ppd (it can be kept in several directories)
+- LUT1.19-prefab.sii (renamed from prefab.sii)
'- LUT1.19-road_look.sii (renamed from road_look.sii)
It is worth noting that UK map in Ets2MapDemo is larger than in Funbit's image, that's because UK and Europe use different scales.
Wow, your output turned out much nicer than mine! (I wonder why that is lol ... I'll have to look into that in a little bit). And you also somehow got city data as well... my config must be messed up somewhere lol. It looks like there might me a couple missing prefabs (such as the fuel station); however we might be able to work around that. If we can get vector data though, that would be awesome!
Also, it might actually be easier if the UK is larger. It will make things easier when converting coordinates to pixels, as we won't need to maintain two different formulas.
By the way, do you have Visual Studio installed? I have (I mostly followed this guide), and I compiled Ets2MapDemo on my machine.
Indeed, converting coordinates would be easier, but at the same time the map will be… huh… non-realistic…? Not that it matters. :)
Yes, I just updated from Visual Studio 2013 to Visual Studio 2015 last night. I found out what my issue was (I had some directories listed incorrectly), and now I am getting the correct output.
I'm not too concerned about the "realism" of the map right now, as users probably won't be able to notice the size increase when using the map. If we really want to grab the correct size, we can try and shrink the size of the UK afterwards.... but it's not a top priority for me.
There are a couple things in this map that are bothering me though:
I think I figured out why there is a missing gap at some gas stations. It looks like the Ets2Map builds prefab roadways based on the prefab's markings for where AI traffic can travel on the prefab itself. For the missing prefab, there are none of these markings:
However, on a different service station prefab (such as the gas station/parking near Praha), there are AI road markings:
We may be able to get the map to recognize the fuel station prefab if we add some AI traffic marks... now I just need to figure out how to do that :laughing:
Hey, how you managed to get those screenshots?
I have no knowledge of ETS2 modding, and I haven't tried messing with the Ets2Map code (at least not yet).
I used the in-game map editor:
edit
, followed by <Enter>
File -> Open...
and then type in europe.mbd
to open the map.Anyways, I'm now debating whether or not I should modify the prefab to add the bit of road to the map, as it will not be efficient when it comes to trying to build custom maps, such as ProMods. I may have to dig around to see if roadway information can be generated from the prefab itself, instead of relying on AI paths.
Crazy idea that might work: if we can render the 3D bird's eye view, we MAY be able to apply some image filtering to detect the grayish road. Maybe if we apply a mod to change the road textures to a unique color. Again, a crazy idea, but it may work for some cases.
Alternatively, it should be possible to create some road data for the prefabs; so that the code to render the map will replace the game road data (which would be bad or non-existent) with a custom road data. Might require a bunch of work, but it may work.
Unfortunately, trying to grab the entire map in the editor does not seem possible right now; the editor only zooms out partway, so it's not possible to grab the whole map in one screenshot (plus I can't seem to find a way to turn off all of the nodes and highlights which would make filtering quite difficult).
And yes, adding custom road data to the prefabs would take a lot of work; plus it looks like I'll need to purchase a ZModeler license to import the prefab information. All of the *.ppd
files are stored as binary data so it's a bit difficult to decode all of it :stuck_out_tongue_closed_eyes: . My hope is that we can just look at some other information in the .ppd
files to find actual roadways like the rest of the roads.
Release! ATS was just unlocked on Steam, and I've already extracted out the graphics needed for the changes that we need to make to the skin (I have not tried to build the map yet, though). Below the ripped graphics that we should need. If you wouldn't mind tracing them into a vector format, that would be awesome :grinning:
Trailer:
ETS2's trailer has three axles, while ATS' only has two.
Truck:
Damage Icon:
^ there actually is an image here, but it's white. You may have to highlight the blank space above to actually see it :laughing:
I am also electing to move map-related discussion to #77, as that is a dedicated issue I created specifically for the intent for mapping.
<!-- Based on the actual game gfx. -->
<symbol id="svg-ats-truck" viewBox="0 0 73 40">
<path d="M15 34a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm3 0a6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6 6 6 0 0 1 6 6zm47 0a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm3 0a6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6 6 6 0 0 1 6 6zm-13-14h14v3h-14zM16 9h9v8h-9zm11 0h4v8h-4zM27,0l-4 4h-6l-2 2v11h-12v2h-1v10h-2v6h5.078a7 7 0 0 1 -0.078 -1 7 7 0 0 1 7 -7 7 7 0 0 1 7 7 7 7 0 0 1 -0.08 1h6.08v-2h11v2h19.078a7 7 0 0 1 -0.078 -1 7 7 0 0 1 7 -7 7 7 0 0 1 7 7 7 7 0 0 1 -0.08 1h2.08v1h2v-12h-2v1h-21v-1h-3v-24h-8v24h-1v-24z"/>
</symbol>
<!-- Based on the actual game gfx. -->
<symbol id="svg-ats-trailer" viewBox="0 0 114 43">
<path d="m104 38a2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2zm3 0a5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5 5 5 0 0 1 5 5zm-14 0a2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2zm3 0a5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5 5 5 0 0 1 5 5zm-42-4h21v4h-21zM2 0h110a2 2 0 0 1 2 2v30h-114v-30a2 2 0 0 1 2-2z"/>
</symbol>
Just like in ETS2, I have not drawn the damage icon, I don't think we need it; instead we can use the normal truck icon scaled down.
Interesting how the wheels of the truck (but not the trailer) of ATS are 1 pixel larger.
I believe I have updated everything; however I am going to do more testing tomorrow just to double-check that I didn't break anything with ETS2.
Also, thanks for making the SVGs. They look awesome!
Suggestions (feel free to discuss them if you disagree; they are suggestions after all!):
svg-truck
and svg-trailer
to svg-ets2-truck
and svg-ets2-trailer
.#speed-limit
and changing the look (via CSS) according to the game?#_damage
tab, try increasing the width from 6em
to 7em
. Why? Because for ETS2 I chose those dimensions to make sure both images had the same height. In case of ATS, the proportions are slightly different, and the truck now looks slightly smaller. Note that you can specify a larger width without issues, as the actual image will be scaled to fit, but still keeping the aspect ratio. So, yes, you can increase the width for both ETS2 and ATS.I suggest dynamically adding a class (e.g. game_running_ets2
or game_running_ats
) to the body
element, and then just using CSS like this:
#_map #speed-limit {
/* The common style is left here. */
}
.game_running_ets2 #_map #speed-limit {
border-radius: 100%;
border: 0.25em solid red;
background: white;
color: black;
}
.game_running_ats #_map #speed-limit-ats {
background: white;
color: black;
}
I'm not on my Windows computer, so I can't test the latest changes. (This sucks! I usually use my Linux computer to be productive, but I can't test this kind of stuff without first booting up Windows.)
Those are all valid suggestions. See https://github.com/mike-koch/ets2-mobile-route-advisor/commit/e27c30b0a9f1d87a4c3d59fea472bc1fbe9a066e for all of the changes.
$('.game-name').addClass(data.game.gameName).removeClass('game-name');
This will probably break if the user leaves the mobile-route-advisor open while switching between ETS2 and ATS.
An alternative is to add the game name as an attribute.
Or, just add and remove those two classes (one for each game) to the body
or html
or other ancestral element.
Using an attribute is the best choice IMO. Check out 014d5c33a08f27fd026aa957f0fc9cd5a147c158 for the changes I made.
Anyways, I think this is pretty much everything besides the mini-map, unless there is something else I'm missing.
Blocking this until ATS is officially released on Feb 3
ATS is coming out this Wednesday, and there are a few things that need to be updated:
Should I hard-fork this to a new repository (
ats-mobile-route-advisor
)? Or should this repository hold both skins, and be renamed to something more generic?Of course, this all depends on ATS being released with telemetry support. If there is no telemetry support, this is impossible to do.ATS does have telemetry support. The existing plugin works just fine on ATS.