Currently Online

Latest Posts

Topic: minor bug with deleting

tothxa
Avatar
Joined: 2021-03-24, 11:44
Posts: 452
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2024-01-16, 11:50

kaputtnik wrote:

  • "If a node where one adjacent field is water terrain, prevent placing water here.", this keeps fish
  • "If a node where one adjacent field is mountain terrain prevent placing water here", keeps mountain resources
  • "If one adjacent field is mountain terrain, prevent placing fish here"?

IOW, hierarchy is mountain beats all, water (terrain) beats rest.

Or should it be the other way round between mining and fish? Or according to the Z-layering of terrains?

I haven't looked at how default resources are handled, but this should apply to them as well.

But what do we do when we load old maps where this is violated? Should this only apply to the editor resources tool or be enforced by the game logic?


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2480
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2024-01-16, 16:10

tothxa wrote:

kaputtnik wrote:

  • "If a node where one adjacent field is water terrain, prevent placing water here.", this keeps fish
  • "If a node where one adjacent field is mountain terrain prevent placing water here", keeps mountain resources
  • "If one adjacent field is mountain terrain, prevent placing fish here"?

Oh yes, i knew i missed one rule face-grin.png

IOW, hierarchy is mountain beats all, water (terrain) beats rest.

The first yes, the latter no: Placing resource water on coast does not beat fish.

Or should it be the other way round between mining and fish?

Probably better, because a mine is more often build in the middle of a mountain.

Or according to the Z-layering of terrains?

You mean the dither layers? No, they are only used for dithering one terrain over the other. One can't make a rule for resources out of them, imho.

I haven't looked at how default resources are handled, but this should apply to them as well.

Every time the question about default resources face-wink.png AFAIK they aren't involved if one places e.g. water resources. Not sure though. When placing a terrain i do not know how the containing default resource of fish is handled internally. Is it placed on a node so a fisher can fish them? Or remain the contained fish inside the terrain (not a node) and there is some extra logic which makes it possible a fisher can fish not only on nodes but also on fields? Big questions, which need answers, imho.

But what do we do when we load old maps where this is violated? Should this only apply to the editor resources tool or be enforced by the game logic?

I think such rules don't have any effect on old maps. Such rules should only apply if one places a resource in the editor. So if an old map has water at the coast, there will be just no fish there. The map didn't changed and is playable in the same way as before implementing such rules.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote