Skip to content
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

Minimap overlay settings don't load from XML #149

Open
LockdownX7 opened this issue Aug 7, 2016 · 0 comments
Open

Minimap overlay settings don't load from XML #149

LockdownX7 opened this issue Aug 7, 2016 · 0 comments
Labels

Comments

@LockdownX7
Copy link

LockdownX7 commented Aug 7, 2016

For a few people, some of the minimap overlay settings are not loaded from XML after a game restart, with the minimap defaulting to their originally defined color/radius. As I have this bug myself, I've done some troubleshooting to try and figure out the root cause for it:

From what I understand, the issue with the overlay color/radius settings being ignored lies with a few specific calls of the Scribe_Values.LookValue method. I used the MiniMapOverlay_Colonists class for the purposes of debugging, but all MiniMapOverlay subclasses likely suffer from the same issue, as their colors reset too.

For the test, I used this XML (setting colonists to show as orange in the minimap) and changed the ExposeData method of MiniMapOverlay_Colonists to look like this. The resulting console output makes it clear the intended orange color for the colonist overlay is not loaded from the XML: the color field maintains its default green color, and my custom colorScribeTest variable maintains its default "empty?!?!" value, so the Scribe_Values.LookValue calls aren't doing anything.

However, there are some instances where the XML scribing is working as intended, such as when fetching the 'ccl_version' or 'visible' elements, so it's definitely not an access problem to the XML file itself, or the use of the Scribe_Values.LookValue method. Rather, the problem seems to be that the scribe mode is set to ResolvingCrossRefs at the time ExposeData is called (as the console ouput shows), which makes the LookValue method calls not do anything, because they only run any code at all if the mode is LoadSaveMode.Saving or LoadSaveMode.LoadingVars.

If you have any ideas on how to help identify the root cause for this, I'll gladly try them out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants