Topic: Remove addon from map
kaputtnik Topic Opener |
Posted at: 2023-03-02, 15:26
Because of some spare time i was working on a new map. Now i have a problem with not used add-on: Unfortunately i had the Impassable water addon enabled when starting to work on the map. But i don't use any of the terrains of the Impassable water add-on. Since i am close to publishing the map i wanted to remove the reference to that add-on. I removed the entry
grepping over the map there is another reference in I remember we talked about such issue, but can't remember where or what the result was. Top Quote |
Nordfriese |
Posted at: 2023-03-02, 19:33
The map terrain packet performs an optimization to significantly reduce packet size and speed up loading and saving. Terrains are identified by name, and it would be extremely inefficient to save a long terrain name for every single triangle. Instead the terrain packet creates a dictionary that maps terrain names to indices and saves only every terrain's index. In order to further speed up saving, we simply create the dictionary for all known terrains, not just the actually used ones. This is something you cannot manually repair at all, not even with a good binary editor. Checking which terrains are actually used and only writing the mapping for these to the binary would be somewhat slower during saving, but doable, and then resaving a map with such a change would allow you to remove the add-on dependency. We'd just have to pay attention to efficiency – terrain saveloading is fast only because of all these optimizations. Top Quote |
kaputtnik Topic Opener |
Posted at: 2023-03-03, 10:22
Thanks for the explanation. Hm, that's a pity. Imagine one has several world addons enabled... that means every terrain (something else?) is part of the map. I think this needs overthinking. From my understanding this means if a world add-on gets deleted on the server, each map that refers to this addon (if a terrain is used on the map or not) can't be loaded anymore. Top Quote |