You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, so there's currently an issue with adding and removing PWPs that can end up breaking peoples saves due to invalid building amounts. The game assume there's 58 town PWP Slots where there's actually 56 Town PWP Slots and 2 Event PWP Slots (i.e. ones on the town plaza).
The Event PWP Slots should not be used and should be kept free. Or it should be implemented correctly so that only Event PWPs can go in those slots and it uses the Event PWPs amount byte.
As seen here in my WIP save structure, the Town PWPs and Event PWPs each have their own byte for the amount of them currently in the save.
Also, it'd probably be a good idea to recalculate how many buildings the user has (i.e. how many of the buildings aren't 0xFC) upon saving, or instead of reading the value, just calculate how many they have when loading the save rather than reading from the save. It'll fix saves that might have been previously broken and prevent this very common issue.
The text was updated successfully, but these errors were encountered:
Indeed, the editor always try to add buildings from slot 56 backwards (leaving 57 and 58 for events). I coded the editor some years ago and I could not remember this, but after checking the code lately, the limit was already there, so I did something well after all :-D
The building counter was also there, but broken somehow. Your contribution is appreciated, this is going to fix those building problems that some user get randomly, I hope this is once and for all.
I implemented an automatic fix when opening the glitched savegame in 916f432 along with other fixes aswell.
And I'm gonna toy with building removing now that the counter works correctly.
marcrobledo
changed the title
PWPs not read/written correctly
How to add/remove buildings correctly
May 1, 2019
Hey, so there's currently an issue with adding and removing PWPs that can end up breaking peoples saves due to invalid building amounts. The game assume there's 58 town PWP Slots where there's actually 56 Town PWP Slots and 2 Event PWP Slots (i.e. ones on the town plaza).
The Event PWP Slots should not be used and should be kept free. Or it should be implemented correctly so that only Event PWPs can go in those slots and it uses the Event PWPs amount byte.
As seen here in my WIP save structure, the Town PWPs and Event PWPs each have their own byte for the amount of them currently in the save.
Also, it'd probably be a good idea to recalculate how many buildings the user has (i.e. how many of the buildings aren't 0xFC) upon saving, or instead of reading the value, just calculate how many they have when loading the save rather than reading from the save. It'll fix saves that might have been previously broken and prevent this very common issue.
The text was updated successfully, but these errors were encountered: