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

Roads Generating on Water #63

Open
ADamDirtyApe opened this issue May 31, 2020 · 7 comments
Open

Roads Generating on Water #63

ADamDirtyApe opened this issue May 31, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@ADamDirtyApe
Copy link

Issue with roads in water, they still generate as if the water tile was land.

Image of issue:
https://imgur.com/a/R7trVaQ

Rimworld export Logs are here, these were yellow warnings at the end.

https://gist.github.com/HugsLibRecordKeeper/7ef5f5a8978b01760f7fb38763bda345

I thought it was an interaction with the boats mod and pushing settlements over closer to water, but in generating maps with that setting at different levels has this error no matter the setting for the Boats mod.

It might have to do with Update 1.1.2647 (i confirm i am running this version), but the update notes does not mention anything changed for world gen?

@LocoNeko
Copy link
Owner

LocoNeko commented Jun 8, 2020

Thanks. The problem is that glitter roads can be built on water, but I only test that when building roads.
So somehow, I have to find how road generation decides which type of road it is creating and prevent it from doing so if the road is not a glitter road, which would essentially mean no roads on water since glitter roads can only be built, not generated.
Problem : I can't see how road generation picks up the type of road. Still looking...

@LocoNeko
Copy link
Owner

LocoNeko commented Jun 8, 2020

Note : This is probably in WorldGenStep_Roads.GenerateProspectiveLinks(List indexToTile)

There, it uses Find.WorldPathFinder.FloodPathsWithCost with the cost function from Caravan_PathFollower.CostToMove

I must prevent the floodPathsWithCost from allowing a tile to be used by anything but a glitter road

@LocoNeko
Copy link
Owner

LocoNeko commented Jun 8, 2020

First find which mod(s) interact with RotR to throw this bug. Doesn't seem to be common

@LocoNeko
Copy link
Owner

LocoNeko commented Jun 9, 2020

OK, I have confirmed that it's really a combination of mods. Roads are not generated by Roads of the Rim alone. @ADamDirtyApe , please try to find which mod or combination of mods triggers this issue, and please confirm whether adding RotR changes things. I would look first into any mod that directly affects the world map.

@LocoNeko
Copy link
Owner

@ADamDirtyApe , did you find the mod that triggers this issue combined with RotR ?

@ADamDirtyApe
Copy link
Author

I have not been able to, as removing all the mods I have broke rimworld to the point that vanilla didn't even work.

I heavily suspect it is "Preemptive strike" allowing generated enemies to path across water (the mod makes it so that you can see them coming as an entity if you have manned towers).
I am using the forked version,
https://steamcommunity.com/sharedfiles/filedetails/?id=2056230561
the original has some more documentation
https://steamcommunity.com/sharedfiles/filedetails/?id=1890377807

This behavior combines with the way that your mod is attempting to allow bridges, and makes it so that map gen treats water as if it were land for the purposes of roads upon world generation.

@LocoNeko
Copy link
Owner

Thanks a bunch for getting back to me. I think the best way to debug this is for me to create a new game with RotR and preemptive strike enabled, see if roads are generated on water. The test is reasonably easy since it should be wrong right from the beginning (world generation). You can also try a new game on your side with preemptive strike disabled, see if the world created had roads on water or not.
It took me a long time to get back to this issue, but I will do my best to fix it.

@LocoNeko LocoNeko added the bug Something isn't working label Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants