-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix replace-with-self migration data in mods #50966
Fix replace-with-self migration data in mods #50966
Conversation
This is bad because the item ends up blacklisted
Hmm, so now I'm getting:
wat |
Ping @jbytheway who wrote |
These are already "generic" so they're being modified rather than replaced by the GG mod.
Yes, I think adding to the whitelist is probably the right call. |
Looks like the CI is going to check the other mods too. Neat. Now I need to deal with:
Looks like AFS wants to keep the advanced UPS which has been obsoleted in main. But doing it this way is not going to work, or rather it's going to cause problems due to the item being blacklisted. |
After talking to @John-Candlebury on the discord, it looks like the best thing to do here is to just remove the advanced UPS from Aftershock (it was nerfed and obsoleted by #48608). |
Started a new AFS game to see what happens to a save file in which the player is wearing an advanced UPS, loaded after this change. The answer is: it's simply replaced with a wearable normal UPS. |
Someone sent me this from this early morning “ aftershock has a game crashing bug with the new update - the migration makes the ups_off replace itself i guess? and the game doesnt like that so it kicks you back to main screen” I wasn’t sure if this is fixed by this PR or if this is the problem this PR fixed. |
Without a bug report or at least an error message I can't tell what's up with that. This PR removes adv_ups_off from AFS, so anyone who had one would have it replaced by ups_off after updating. Ah, but it's possible that this PR breaks other mods that are not in our repository because it introduces an additional JSON check that may prevent the game from starting (see 3rd screenshot). Affected users or mod owners should remove migration entries of the form:
from the mod json file that the error message points to. If they're doing this in order to "keep alive" an item that has been obsoleted in main, they need to give that item a new ID in their mod (and search-and-replace old_id with new_id in their mod files). |
Summary
Bugfixes "Fix replace-with-self migration data in mods"
Purpose of change
Fixes #50953
The Generic Guns mod had migration entries that replaced some item ids with identical item ids. This caused those items to become blacklisted and removed from recipes.
Aftershock also has one such migration entry. It is unclear what ill effects it causes if any, but it is safe to remove.
Describe the solution
generic_guns_validator.py
to not complain about 1Describe alternatives you've considered
Testing
(Without any changes) Start a new game with the "Generic Guns" mod enabled, boost all skills to 5, save.
Try to craft "shotgun trap", see that the shotgun component is missing. Search for "shotgun" recipes, find only 1.
After adding the validation, get this error on game load:
After removing the offending JSON, the game loads and the recipe for "shotgun trap" looks correct. You can also craft many more shotgun recipes.
Additional context
I haven't tested all the mods, just Generic Guns, Magiclysm and Aftershock. The new JSON check may cause other mods with bad migration data to stop loading, but if so they'll be easy to fix. The CI appears to check all the mods, that's how I found out about Aftershock.