-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Doesn't work, pls help] Json connection origins #67736
Conversation
@jbytheway this seems like something you would probably understand better than most others. Sorry if I’m incorrect. |
Yes, I would like to take a look at this, but I probably won't get the chance until next weekend. @Procyonae it would be helpful if you could make one JSON change demonstrating the expected use of this new feature. Or maybe more than one change if necessary to demonstrate the different ways it can be used. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
Summary
None
Purpose of change
Unhardcoding good
The hardcoded function needs changing for sub_connector unhardcodingMakes #68496 alot less wonkyAllows for adding custom connections like a new
rural_road
connection that paths to the nearest road.Allows separating z-2 and z-4 subway into different connections, with the z-4 pathing to ramps and z-2 pathing to surface subway stations, with fallbacks to join to the closest subway if none found.
Potentially could allow streams to path to rivers if reworked into a connection.
Describe the solution
Connection targets can be defined in JSON in their respective
overmap_connection
object under a new "origin" fieldAccepts
om_terrain
s optionally with accompanying match types (defaults to type), city true/false (defaults to false) and a max distance that specifies how far it should look for each origin point. Atm it just picks the closest one it finds.If it fails to find any of the specified origins or there aren't any it tries to find the nearest connection subtype terrain within 50 tiles and joins to that.
(I presume I need to make it select an appropriate adjacent tile to the target but I just want it to work first, it'll need #67723 to work reliably with specials anyway)
Describe alternatives you've considered
Ideally boundary joins would be selectable too (and jsonified themselves)
Ideally you'd be able to join all of one type together to ensure full connectivity where desired (like cities join rn)
Testing
Currently doesn't work, adding
"origin": [ { "city": true } ]
tolocal_road
loads but doesn't function properly and anything else (eg{ "om_terrain": "forest_thick" }
) hangs the game when building a world.Additional context