Add dependency tracking for blueprints #6668
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Reloading merge blueprints requires a full restart of the session because:
nil
case is used instead of whatever it should be when loading the full stack of edits. Some examples are mesh blueprints being reassigned and target check intervals being changed.Check out the commit where the debug blueprints are added to see more details.
Description of the proposed changes
On the initial loading, track which file changed what blueprint id, and when reloading a file, run all the files that changed the bp in the appropriate order.
I think this is the only way to solve the given issues as there is unfixable engine behavior involved, using
__blueprints
does not respect load order (and allows for recursion), and fixing all the Lua would involve far more complexity.Testing done on the proposed changes
Check out the commit before the debug blueprints are removed.
Reloading the debug blueprints does what is expected of load order and the unit functions correctly ingame. None of the issues commented in the debug blueprints occur.
Additional Context
I was running into these issues while writing the SACU rebalance mod.
Checklist