ApacheTech-VintageStory-Mods / ApacheTech.VintageMods.CampaignCartographer

Mod for Vintage Story: Adds multiple Cartography related features to the game, such as custom waypoint icons, GPS, auto waypoint markers, and more.
7 stars 4 forks source link

[FEATURE] save global coordinate offset in export #33

Closed Konfuz closed 7 months ago

Konfuz commented 1 year ago

All exported way-points are saved in global coordinates. Without knowledge of the server-settings for world-size there seems to be no way to convert them into the local coordinates a typical user would be accustomed to.

Saving the offset from global to spawn-relative coordinates in the exported JSON would make life easier for external tools importing the data. (I am writing a pathfinder and the global / local conversion annoys me)

ApacheTech commented 1 year ago

Scenario: Save World Spawn offset metadata to exports file.

Given a user is playing in a world with (MaxX, MaxZ) world bounds,
When they export waypoints,
Then the world spawn location (Default: X = MaxX/2, Z = MaxZ/2) should be saved as meta-data to the export file.

Roadmap: Due for release in v3.1.0.

For reference, the default "Next, Next, Start" settings would set the offset to (X: 500,000, Z: 500,000). If using the API, in game, this can be determined using ICoreClientAPI.World.DefaultSpawnPosition.

ApacheTech commented 1 year ago

Thanks for the suggestion, I can add this in within the next Minor update cycle. It shouldn't bring any backwards compatibility issues.

Konfuz commented 1 year ago

Thanks!

ApacheTech commented 7 months ago

Added within vNext (4.0.0)