Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Assign IDs to new objects automatically #1
Comments
|
This only appears to be problematic in Scripts, everything else appears to use sequential ID numbers. |
… their YAML This also changes the way scripts are serialized. Scripts are serialized with a magic number, but I couldn't figure out how it was calculated. Thankfully, the editor does not appear to care about the number - at least, VX Ace doesn't - so I just got rid of it, and used the same sequential ID numbering that is used in the rest of the YAML structures. Works great. Items with an ID already set should be preserved, so you should be safe to do this without worrying about references to item ID numbers changing in events & etc. In other words, this should be collaboration-safe.
If the yaml loader detects a duplicate ID (2 items with ID #12 for example), then the import will abort. Also adds formatador for pretty output and easier parsing of errors.
|
Complete, merged. All success criteria met. Also added formatador for pretty output formatting. |
Consider if I add a new script to the Scripts/ directory. I need to add it to YAML/Scripts.yaml so that the designer will have the script available to them the next time they repack & load the game in the editor. The current structure of the YAML makes this hard:
Every object in the YAML has an ID that should be assigned when it is repacked into the database. This ID is pulled in from the initial unpack operation, so we have no way of saying "This is a new object, assign it an ID when you repack it". We need a mechanism for this.
Criteria for success