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

Update Graphical Overmap mod to support buildings from some other mods #36247

Merged
merged 11 commits into from
Dec 22, 2019

Conversation

Kilvoctu
Copy link
Contributor

@Kilvoctu Kilvoctu commented Dec 19, 2019

Summary

SUMMARY: Mods "Update Graphical Overmap mod to support buildings from some other mods"

Purpose of change

Some of the mods I use on my savefile add buildings that are not supported by Graphical Overmap mod. Also, the new cabins are not supported.

Describe the solution

Appended the main file to add support for the new cabins. Wrote new files to add support for each of the mods I use: More_City_Locations, Fuji_Structures, More_Locations, secronom, and Urban_Development

Describe alternatives you've considered

Wait for the original author to do it.

Testing

In my current savefile I observed the missing graphics from the overmap.

I copied over the contents of the overmap_terrain files from the affected mods and trimmed out unnecessary information from them, then I went through and changed the "sym": "[code]" for each structure to a logical code referenced from the main Graphical Overmap mod.
example: change all houses from "sym": "^" to "sym": "à"

Reloaded the savefile to confirm that previously missing graphics were now displayed. Created a new world and revealed the map to check for anything I missed and repeated that a few times. Tested with and without the referenced mods. No errors that I can find.

Additional context

This shows the difference with and without the changes on a test world I created.

Before:
before

After:
after

Support for a bunch of additional cabins added a while ago
mods:
Fuji_Structures
More_Locations
secronom
Urban_Development
Update generic houses to "color": "light_gray" in order to be consistent with color in Graphical_Overmap mod
@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display Mods Issues related to mods or modding labels Dec 19, 2019
@ZhilkinSerg
Copy link
Contributor

You also need to add mentioned mods as dependency for Graphical Overmap mod.

@Kilvoctu
Copy link
Contributor Author

You also need to add mentioned mods as dependency for Graphical Overmap mod.

For me, the Graphical Overmap mod still worked properly even without the mentioned mods active. I'd tested by generating a few worlds with only Graphical Overmap mod enabled and it seemed fine (from the perspective of a non-programmer). Idunno what those extra jsons do if the world isn't generating the buildings from the mentioned mods.

That said, I wasn't sure how to handle it, and that's the reason there's a json for each mod in a subfolder in Graphical Overmap, so the player can decide.
I could set the dependencies, but players may want to use the Graphical Overmap mod but not necessarily the mentioned mods, and setting the dependencies would force those mods in. I could put the additional jsons in a zip file, so they get ignored, and the player could pull out what they need. Dunno what would be the best solution.

@I-am-Erk
Copy link
Member

This needs linting

@ZhilkinSerg
Copy link
Contributor

If you will create a world with your changes, but without newly supported mods, you will receive a lot of messages like this:

image

@ZhilkinSerg
Copy link
Contributor

You can create a separate mods. Each mod would be dependent on both Graphical Overmap mod and mod with new buildings.

@Kilvoctu
Copy link
Contributor Author

Kilvoctu commented Dec 19, 2019

I reset my test world a few more times and managed a world that produces the error for the daycare. Will see if that can get resolved. If not:

You can create a separate mods. Each mod would be dependent on both Graphical Overmap mod and mod with new buildings.

This would work, too. Is this saying I would create a new mod for each of the mentioned mods (five, in this case)? For example, "Graphical_Overmap_Secronom" would have dependencies for Graphical_Overmap and secronom?

edit: I notice a couple mods aren't mainline, So I guess I'd actually just make three new mods for fuji structures, more locations, and urban development.

revert reest of files
Add new mods for graphical overmap for fuji structures, more locations, and urban development
@Kilvoctu
Copy link
Contributor Author

Ended up creating separate mods as per ZhilkinSerg suggestion. Secronom and More_City_Locations aren't mainline mods, so I left the updates for those out since they'd have dependency problem if the player tried to add 'em without those mods installed.

Applied each new mod individually and all together to test for correct dependencies, and generated a new world five times each to look for error.

I tried to clean up my commits but I'm very inexperienced in github (installed the desktop client just now to facilitate usage), so I'll clarify the changes. Sorry for the trouble.
The support for the new cabins is commit c785ebb.
The three new mod folders are per commit c32b8c7.

Trying to clear up check for mods\Graphical_Overmap\overmap_terrain.json
@@ -204,6 +204,118 @@
"sym": "â",
"color": "brown"
},
{
"type": "overmap_terrain",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking you should be using copy-from and change only sym (and color if necessary), so other settings would be copied over from original mods.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, it's so I'm not unnecessarily overwriting any changes that authors would make to their respective mods? I've cleaned up the files. Thanks for the feedback.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, GO mods only needs symbol to be changed, so any other properties would remain intact when copying.

update the three mods to copy settings from parent mods and only replace symbol (and color if needed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants