ts-map icon indicating copy to clipboard operation
ts-map copied to clipboard

Support for 1.43

Open Koenvh1 opened this issue 2 years ago • 5 comments

Thank you for the great project. I noticed that the map tile generation does not seem to work properly on 1.43. A few exceptions I came across:

  • Prefab originNode is sometimes null
  • Ferryline curve runs out of memory
  • mapAreas list is empty

Seems like 1.43 introduces a slightly different map format. Strangely enough the map preview loads as it should.

Koenvh1 avatar Nov 21 '21 19:11 Koenvh1

Dario,

I did some debugging with ETS2 1.43.0.35. It seems that SCS has added two new item types (found in /def/editor_data.sii):

	sub_mode_types[]: 47 #hookup_item
	sub_mode_types[]: 48 #visibility_area_item

I found visibility_area_item's in the (edit_save_text map editor output) sector files (sample follows) but I have yet to find any hookup_item's:

    struct visibility_area_item {
        struct kdop_item {
            u32 item_type: 48
            u64 uid: x40E35508B94F0000
            struct kdop {
                array_float minimums [
                    &c6bfd897 # -24556.3
                    &c4091e00 # -548.469
                    &46c2786a # 24892.2
                    &4366e340 # 230.888
                    &c6c1f0c8 # -24824.4
                ]
                array_float maximums [
                    &c6bc2b69 # -24085.7
                    &44230200 # 652.031
                    &46c67e4a # 25407.1
                    &44157270 # 597.788
                    &c6c08c92 # -24646.3
                ]
            }
            u32 flags: 0
            u8 view_dist: 40
        }
        u64 node_uid: x40E35508314F0002
        float width: &42c80000 # 100
        float height: &437a0000 # 250
        u32 children_count: 40
        u64 child_uid: x40C8C804984F224E
        u64 child_uid: x40C8C8047B4F2291
        u64 child_uid: x40C8C8041A0F235C
        u64 child_uid: x40C8C804F94F225C
        u64 child_uid: x40C8C8040F8F1FDD
        u64 child_uid: x40C8C8047E8F21A6
        u64 child_uid: x40C8C8047CCF21B4
        u64 child_uid: x40C8C804938F20D4
        u64 child_uid: x40C8C804328F219C
        u64 child_uid: x40C8C804A5CF2227
        u64 child_uid: x40C8C8040C4F21FF
        u64 child_uid: x40C8C804150F21F1
        u64 child_uid: x40C8C804F6CF21C1
        u64 child_uid: x40C8C804810F21FB
        u64 child_uid: x40C8C804F70F21EF
        u64 child_uid: x40C8C80487CF21D7
        u64 child_uid: x40C8C804FF4F21BD
        u64 child_uid: x40C8C8048DCF1FD4
        u64 child_uid: x40C8C8042ACF20D9
        u64 child_uid: x40C8C8046D4F219F
        u64 child_uid: x40C8C8040C4F21A8
        u64 child_uid: x40C8C80473CF21A0
        u64 child_uid: x40C8C804FACF1FDF
        u64 child_uid: x40C8C804344F2240
        u64 child_uid: x40C8C804854F2241
        u64 child_uid: x40C8C804AF8F2223
        u64 child_uid: x40C8C804BC4F21E3
        u64 child_uid: x40C8C804CD0F21EB
        u64 child_uid: x40C8C8044C4F221E
        u64 child_uid: x40C8C804048F21CC
        u64 child_uid: x40C8C804580F1FD6
        u64 child_uid: x40C8C804120F228F
        u64 child_uid: x40C8C804760F225B
        u64 child_uid: x40C8C804B48F2247
        u64 child_uid: x40C8C804128F1FDB
        u64 child_uid: x40C8C8047F8F1FDC
        u64 child_uid: x40C8C80474CF1FE0
        u64 child_uid: x40C8C804428F21AE
        u64 child_uid: x40C8C804AD0F21B5
        u64 child_uid: x40C8C80412CF21A9
    }

Note: children_count and the child_uid's are different for each visibility_area_item.

In addition to array_struct items and array_struct nodes there is now an array of visibility area child items at the end of the .base and .aux sector files. Here is a sample from one (edit_save_text map editor output) sector file:

u32 vis_area_child_count: 0
array_u64 uids [
]

This results in at least 4 extra bytes in .base and .aux files (more if there are actually any child uid's). So far all sector files that I examined had vis_area_child_count of "0".

Map sectors in 1.43 have core_map_version "891" (0x0000_037B).

When I account for these changes in the VS code then the program generates map tiles successfully without throwing exceptions or error messages in the debug output/log.

Josh0Trucker avatar Nov 21 '21 23:11 Josh0Trucker

It should now work with 1.43 with the latest commit to the development branch.

@Josh0Trucker Wow thanks for all the research, unfortunately I was already done with that part, and was just fixing the viewpoints.

But yeah, I couldn't find any of the "hookup" items either, but if I added one myself in the editor, it was stored in the .aux file, so not something this program needs to know about.

Anyway, thanks again for the very detailed post!

dariowouters avatar Nov 22 '21 00:11 dariowouters

Latest version of stable 1.43 is giving crashes again on the latest branch, possible to get a update for this in combination with latest 2.60 promods?

VTLog-Legacy avatar Jan 05 '22 20:01 VTLog-Legacy

@Legacy-WoH, are you using the development branch as dariowouters mentioned?

It should now work with 1.43 with the latest commit to the development branch.

Because the development branch works well for me with ProMods Europe 2.60.

Josh0Trucker avatar Jan 06 '22 15:01 Josh0Trucker

@Legacy-WoH, are you using the development branch as dariowouters mentioned?

It should now work with 1.43 with the latest commit to the development branch.

Because the development branch works well for me with ProMods Europe 2.60.

Late response, but i managed to get it working with using the dev branch, at first i thought game branch but it was the github branch. My bad, thanks

VTLog-Legacy avatar Jan 23 '22 14:01 VTLog-Legacy