Ships Retaining Their Names When Unmerged - With Possible Solution
When a grid is separated into two or more parts, either via destruction or unmerging, the current behavior is to analyze the grid size of the separate pieces and the largest will maintain the grid name while the smaller grid receives a new arbitrary grid name. When grids are merged the largest grid prevails and absorbs the new blocks.
Merging grids is a way of safely docking two ships in a permanent or semi-permanent manner. The downside is when the grids are unmerged, one or more has to be renamed. The same can be applied to using a projector to build a new ship/station. The grid with the projector acts as a host until the ship is separated. The same issue exists.
Recently, I believe its DIGI that added some additional data to IMySlimBlock and stored in the grid .sbc files, the playerID of the person who built the block. I'd like to add another entry. This entry would be the grid name for each block.
This entry would be updated when a grid is saved as a blueprint. It would also be updated if the player changes the name of the grid manually. When a block is being built via a projector, this information carries over to the block.
During an unmerging or forced separation, each grid will query the grid name saved in each block and then tally each duplicate entry. The entry with the most duplicates becomes the grid's new name. In the event of a forced separation, the new grids and the surviving grid would be under the same rules. This would mean all separated grids would have the same custom grid name. This could be advantageous when cleaning up a game via Space Master or even SEToolbox as ships that have been utterly destroyed in many pieces could be easily removed just by sorting the grid names.
During a merge, the old rules would still apply. The biggest grid gets the name... however, the data stored in each block would not change. This means, that merged ships would be capable of retaining their names once unmerged. This means projected ships would get the name their blueprint describes once they've been cut from their host grids.
It does mean a little more data in each block entry. However, this behavior can be 100% backwards compatible with existing blueprints as null entries could simply default back to the current scheme. Analyzing or rewriting of the data would only happen during manual grid name changes, blueprint creation, or grid separation which is typically infrequent during game play.