Skip to main content

Modular Export/Import of Buildings & Construction Assets

  • Epic: World Builder / Asset Management

  • Type: New Feature / Enhancement

  • Priority: Medium / High

  • Component: Map Editor

User Story

As a user/builder, I want to be able to export a selected building, structure, or construction layout into a standalone file so that I can easily share it, back it up, or import it into a completely different map layout without having to rebuild it from scratch.

Detailed Description

Currently, construction layouts and building designs are tightly coupled to the specific map instance where they were created. To improve modularity and user creativity, we need a serialization and deserialization pipeline that allows individual structures (or groups of assets) to be packaged into a portable format (e.g., JSON, YAML, or a custom compressed binary format) and cleanly injected into another map file.

Acceptance Criteria

  1. Export Functionality:

    • Allow the user to select a building, cluster of assets, or modular construction group in the editor.

    • Provide an "Export Selection" option (e.g., right-click menu or toolbar action).

    • Generate a structured file containing:

      • Asset IDs / Metadata.

      • Local spatial coordinates/offsets relative to a selection origin point.

      • Custom properties, materials, or states attached to the assets.

  2. Import Functionality:

    • Provide an "Import Structure" option in the target map editor.

    • Allow the user to upload/select the exported file.

    • Enter a preview/ghost placement mode where the imported structure can be rotated, aligned, and snapped to the terrain before final placement.

  3. Collision & Terrain Handling:

    • Validate bounds upon import to prevent overlapping corruption.

    • Handle height adjustments gracefully if the target map's terrain slope differs from the source.

Technical Notes / Implementation Ideas

  • Format: Use a clean JSON schema for the export payload to ensure human-readability and ease of debugging.

  • Relative Positioning: Ensure coordinates are stored as local vectors relative to a bounding-box anchor (e.g., origin [0,0,0] at the bottom-center or primary entrance of the structure) rather than absolute global coordinates, ensuring seamless placement anywhere on a new map.

  • Dependencies: Verify that target maps contain the required asset packs/references before validating the import.

No comments yet

Be the first to share your thoughts.