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

Tighten RulesetValidator for Terrain #10355

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

SomeTroglodyte
Copy link
Collaborator

This adds a warning for the exploit documented in HybridTileTech.md. Sorry, @hackedpassword, but at least you get a Warning only and a honorable mention in a source comment.

What happens with that exploit is - you get a tile where neither isLand nor isWater return true. Consequences for pathfinding seem nondestructive, but that unintentional un-planned-for situation is a time bomb - a regression trigger waiting to happen.

The idea in that Mod, however, should get a solution some day. "Bridges and Canals", if and when implemented in some form, may also solve some current problems - ships passing cities on hills take 2 movement for the step iirc, and so on. Something that allows ships and land units to share tile movement domains, both being able to cross without embarkation, if possible constructible (think panama canal), and optionally requiring a road to function as bridge? Something in a supported and unit-tested fashion.

@SomeTroglodyte SomeTroglodyte changed the title Mod check turns into Tighten RulesetValidator for Terrain Oct 25, 2023
@hackedpassword
Copy link

Well, let's at least set the record straight on what you're calling an exploit.

https://github.com/hackedpassword/Z2/blob/main/HybridTileTech.md

Not denying the technicality, but also concerned about this feature being removed, which Z2 was born from and relies upon. See Z2 Terrains.json: Bridges, CoastTile, OceanTile

I can understand this tech makes you coders nervous, hoping you'll find a way to make it supportable.

@SomeTroglodyte
Copy link
Collaborator Author

removed

We're not removing, but we need to clarify that we cannot guarantee any reliable behaviour when there's tiles violating the assumptions much of the code is based upon. We could choose different wording, but the severity needs to stay yellow - as in: unsupported.

@yairm210 yairm210 merged commit 74cfda9 into yairm210:master Oct 29, 2023
3 checks passed
@SomeTroglodyte
Copy link
Collaborator Author

I'd still like to start on "official" support of bridges, canals and terraforming (something CTP modding back then allowed), but every time I start looking at code, I lose courage... Not with my current health status.

@SomeTroglodyte SomeTroglodyte deleted the ModCheckTurnsInto branch October 29, 2023 17:33
@yairm210
Copy link
Owner

!
Are you okay with elaborating a bit about your health status?

@SomeTroglodyte
Copy link
Collaborator Author

Nothing compared to a moronic war. Just a foot immobilized. Worst are the anticoagulant injections I need to ram into myself. The next is due - hours ago 😨 😱 💉 👻

@hackedpassword
Copy link

current

I know exactly what you mean, and I have even more appreciation for your work.

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

Successfully merging this pull request may close these issues.

3 participants