deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.44k stars 192 forks source link

uID and duplicate variable saving for Project/Individual Files causing issues with source control #1110

Open chosencharacters opened 5 months ago

chosencharacters commented 5 months ago

I'm trying to pull files another member on my project made where main branch has proceeded past the position they were making levels for, and uIDs as a result are causing issues.

The scenario:

  1. Branch A was made off Master when there were 1000 levels
  2. Master continued to add 5 more levels
  3. Branch A made 10 levels
  4. As a result Master has levels 1000 - 1005 already with uIDs and can't pull Branch A

This project file both uses Worlds and Seperate Level Saving

I've tried to edit the .json directly but you have to constantly and manually make sure the levels have unique uIDs that also have to match up with their individual levels. When I finally got the levels in the world grid, I got a pxWid error and just gave up.

To fix this I propose:

chosencharacters commented 5 months ago

The resulting is an image of what happens when the uIDs clash. In this case the uID in the project files were all unique, but the uIDs in individual level files weren't and LDTK got confused

image