Originally Posted by gap
Sorry man, I felt I had not got your idea correctly...
No, as long as you use the same granny file with unchanged bone names, there is no need to remap controller IDs. There are still some unsolved problems though:
1 - Most of the times, the name of the main model (within an unit's gr2 file), the name of the gr2 file, and the name of the folder containing the gr2 file, are matched. This is not always true for AI-controlled units, but it is for playable U-boats. If we change model name, we need to remap controller Id's. If we don't, there will be a mismatch between model name and gr2 and/or folder name. Honestly I don't know if such a mismatch can cause any problem, but this is something we should factor in.
2 - Even supposing that the above wasn't an issue, we would have two U-boats sharing the same bone IDs. It would be impossible for the two of them to appear in the same time and location, as they both would be playable U-boats, and the player can only command one U-boat at any given time. Nonetheless, we should consider that controllers are loaded in memory based on their parent IDs. Name and folder location of the binary files where the controllers are stored might play a role as well, but I am not too sure about this last statement. If the above was true, duplicating two units which share the same ID's shouldn't cause any issue until they both spawn in player's area (which, as stated above, is impossible for two playable units), but if on the contrary file name and location are unrelevant, the game would crash as soon as one of the two units is loaded in memory (because of the two sets of controllers clashing with each other). Testing this scenario on AI controlled units is easy: pick an unit, move one of its essential binary files in any folder and rename it to a random name. Set a test mission with the picked unit and run it. If the game crashes it means it couldnt locate the essential controllers, i.e. file name and location are relevant. If not, only IDs matter, and your idea is not viable. Another possible test: duplicate an unit copying its files to a new folder, and change the cfg file of the duplicated unit so that the game will recognize them as two different units. To be sure to put yourself into the worst possible circumstance, change a bit controller settings of the duplicated unit; set a test mission with either of the two units and load it. If the game crashes, then the two sets of controllers are loaded because the have the same parent Ids, no matter their name or folder.
|