Mapping Saving and Merging data best practices

Post Reply
Posts: 23
Joined: Tue Jul 02, 2019 4:29 pm

Mapping Saving and Merging data best practices

Post by davidwiththenicehat »

Thanks for reading.

Am I understanding correctly that the generic mapper does saves player location with table[charactername]? Then saving the table with I was wondering if saving to userData would work than thought that pushing out a new map database would clear the character location.
Is writing map data to a still be considered best practice?

Somewhat on subject with the last question.
I would like to support multiple people mapping. Sharing the map data they collect. Than if possible support offering that data to other clients.
I am looking at generic mapper functions map.import_area and map.export_area as a guide.
Using the same general method than exporting to json, to offer support for other clients.
Everything seemed strait forward. Though I feel confident I misunderstood function map.fix_portals. It looks like it converts userData entries to special exits. I know it is needed. I could not figure out why. It looks like special exits get exported and imported. Why store exits as userData?

Thanks for your time!

User avatar
Posts: 996
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mapping Saving and Merging data best practices

Post by SlySven »

For the special exits being handled as user data it is because the XML importer/exporter was written to handle IRE's map files that does not include special exit data in the XML and it was never put into the partial reader that Mudlet has.

In the medium term I do plan to get around to producing a full XML import/export capability as - with sorted data - it is the most flexible way to share map data in a way that can be externally (with care) edited and compared (without sorting there is no way that diff - a *nix file comparison tool - is going to give any meaningful results) which is going to be essential for cooperatively working on a shared map...

Post Reply