Since switch to the DLC cook (#46) we need to figure out which maps are dirty and are in need of recook ourselves. Currently this logic only considers the map file only, ignoring the dependencies since we don't know what they are (except for collection maps, where we do know the, at least the direct ones).
One approach would be to have the mod devs manually specify the dependencies. This is simple for X2MBC, but error-prone for mod devs. A better approach would be to automatically infer the list of dependencies. If only there was a way to do it...
What's even better, is that it also lists transitive dependencies, not only the direct ones - in this case the map itself only referenced
TEST_mat_CI_2, while an object there referenced something in UILibrary_StrategyImages. This command also accepts multiple packages/maps to check in one invocation.
I suggest the following workflow:
When a map is dirty/(re)cooked:
1) Before undoing the junctions/ini changes, run the above command to gather the dependencies
2) Save the list of maps with their dependencies to a json file in BuildCache (outside of PublishedCookedPCConsole)
When deciding whether a map is dirty:
1) If the tracking file is missing, all maps are dirty
2) If the cooked map is missing, it is dirty
3) If the specific map is missing a record for its dependencies, it is dirty
4) If the timestamp of the map or any of its dependencies is later than the cooked map, it is dirty
Of course, the output of the command will need to be parsed and cleaned - we don't want to check the timestamps for:
Script packages - they get rebuilt all the time
SDK packages - the cooker doesn't permit them to be changed for DLC cook (especially their textures)
Since switch to the DLC cook (#46) we need to figure out which maps are dirty and are in need of recook ourselves. Currently this logic only considers the map file only, ignoring the dependencies since we don't know what they are (except for collection maps, where we do know the, at least the direct ones).
One approach would be to have the mod devs manually specify the dependencies. This is simple for X2MBC, but error-prone for mod devs. A better approach would be to automatically infer the list of dependencies. If only there was a way to do it...
What's even better, is that it also lists transitive dependencies, not only the direct ones - in this case the map itself only referenced
TEST_mat_CI_2
, while an object there referenced something inUILibrary_StrategyImages
. This command also accepts multiple packages/maps to check in one invocation.I suggest the following workflow:
When a map is dirty/(re)cooked:
1) Before undoing the junctions/ini changes, run the above command to gather the dependencies 2) Save the list of maps with their dependencies to a json file in BuildCache (outside of
PublishedCookedPCConsole
)When deciding whether a map is dirty:
1) If the tracking file is missing, all maps are dirty 2) If the cooked map is missing, it is dirty 3) If the specific map is missing a record for its dependencies, it is dirty 4) If the timestamp of the map or any of its dependencies is later than the cooked map, it is dirty
Of course, the output of the command will need to be parsed and cleaned - we don't want to check the timestamps for: