FactoryPlanner
FactoryPlanner copied to clipboard
Add in-mod changelog view
It would be neat to show the changelog in-game because it'll show to many more people. The button for it could be alongside tutorial and preferences at the top, or buried inside one of them (likely tutorial). Alternatively, that dialog could be renamed to be somewhat more general, and maybe get rid of the bad tutorials.
It could do the thing where it only shows you the changes you haven't seen yet (as well as the complete changelog if desired). I'm not quite sure how to do this exactly, as every player will need to be treated separately. One likely solution is to accumulate updates on a player until they open the dialog and then flush them. This is a bit weird since opening, closing, then opening again will show a different view the second time. Might want to delay the flush somewhat.
This reveals two technical deficiencies. First, this would require the changelog to be Lua-readable and in its natural format. Having to update a changelog in two spots is obviously dumb. There would need to be a separate file that contains the changelog in a machine-readable format (YAML or JSON), which is then converted into its usual and into its Lua form when building a release. This sounds like a somewhat fun exercise. The migration masterlist could also be integrated into this one.
Second, the migration logic and tracking needs to be more beefy. It is quite primitive currently, basically running any migrations that are above the version of the data in the save. This works great, but is annoying during development as it'll always try to apply that future migration. Changing the migration system to avoid this would be neat. The obvious solution is to keep track of the exact migrations that were applied and thus don't re-apply any. Could also be a hybrid of those two approaches. A similar system would be required to keep track of which changelog entries the user has already seen.
After this is done, the release script could also potentially create a release script on Github.
Another idea that could be done alongside this is the ability for me to write special messages for certain versions, highlighting an important change or a potentially confusing GUI change, just to have a closer interaction with users, most of which don’t read the changelog anyways. This would work the same way, only showing users things that are new to them. I could do a pop-up when these come in, but an ‘news here!’ icon somewhere in the main interface would be less obtrusive, and allow the user to engage with it on their own time, without disrupting their workflow and having them dismiss it without reading.