Latest Posts

Topic: Harbour building space bugs

Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-08, 16:26

A week ago, I played in the release candidate test tournament 2022 in round 3 against niektory ( https://www.widelands.org/forum/topic/5627/?page=4#post-39491 ). The map was "Long, long way v2" and I was the green player (that normally is player starting position 4 in this map suitable for 8 players). When the game started, I reached out to the north of my half-island, as I like seafaring and had viewed before in the map editor that there is one blue building space for a harbour. When I got near to the coast, I built one last watchpost to finally reach the coast. As I didn't want to build the last building too close to the coast, as I didn't want that it would happen that this building would maybe block the harbour building space before I could see it, I built the last watchpost not that close to the coast, but I made sure via the conquer range preview that the territory that would be conquered by the watchpost would include the complete shoreline all around the area where the harbour building space would be somewhere. So when my soldiers arrived at that watchpost, I got that area and my new borders extended into the ocean all around that place, but surprisingly for me, no blue harbour builiding space popped up, although I knew that there would be one. To double the confusion: where the blue harbour symbol should be but was not, instead of it there was the symbol for a big building space, but not the normal one but an altered one, which I have not seen anywhere before, neither in version 1.0 nor in the tournament release candidate version. Still, it was not possible to build a harbour there. I spoke via the game the chat about this, and niektory gave me the advice, to try to conquer more area around that place / to stretch out my borders more far into the ocean. When I finally did this, in the spot of the altered big building space now the normal blue harbour building space popped up and from that on everything went normal until the end of the game.

As I had not much time left the last weekend, I finally today got to watch the replay of the game via its savegame (see link above). Mysteriously, as I watched the replay of how I reached the coast, I couldn't see anything unnormal, as at the coast there was just the very normal big building space visible (until later in the game, as said, it changed to the blue symbol when I expnaded my borders wider into the ocean). First I thought that I just had a bad remembering from one week ago, but when I started a new new game on the same map and at the same player starting position 4, while playing and reaching the coast, there next to the coast the altered big building space symbol appeared again! :-o But when I ended that game and watched its savegame-replay, there the altered symbol has just DISAPPEARED - just like it did from the tournament game replay-savegame! :-o Because, while I made screenshots during playing the map today and saved them, I found in the saving folder a screenshot I made live during playing the tournament match from the possible harbour area (I forgot that I had made this screenshot until I found it now again) - and on this screenshot the altered symbol is already visible! I now made a screenshot from the replay-savegame from the same timeframe, so that it is better comparable and made crystal clear, that that what the savegame is showing is not what was really going on on the screen during the match! face-surprise.png So the savegame data are lying! face-surprise.png What a big fat bug! face-surprise.png

When I finally got to made the vanished altered symbol reappear again, I felt a bit like Kirk in Star Trek 6 where all computer data first say that he is guilty of murdering the Kling chancellor or so! face-grin.png lol (I think there are other Star Trek episodes as well in which also computer data for various reasons are not showing as what they should be showing)

So I definitely consider the savegame's incorrect replay of the livegame a bug. Here-in, I call it bug1, which is, however, not an "in-game" bug, as it does not alter the game / has no effect during playing.

But what I find a way much bigger "bug", is the existence of the altered big space symbol / the non-appearance of the blue harbour symbol at first. Because, what would that new altered symbol be for? I think it is unnecessary. Of course it is better to have that hint that there could be a harbour building space than not having that hint - but that hint souldn't be necessary at all.

Because when a player reaches a shore and

1) while building a military building near to the coast making sure he leaves enough room for a placed harbour symbol to appear after the military building will be manned, and

2) makes all free possible big building spaces appear, and

3) clears the area of all possible blocking things like rocks or trees or whatever, and

4) conquers the whole shoreline with his borders extending into the ocean all around the area, and

5) when there even existsts a placed harbour building space (which is rarely enough the case),

when all these many conditions finally are fullfilled, then why does the blue symbol does not appear then? I just don't understand it. I mean, if the blue habour building space symbol would not appear in a game just because the player had built his military building too close to the coast, so that the blue big builidng space is dwarfed into a middle building space (or by a tree standing nearby which has still missed to cut down), it is clear that it is the own fault/responsibilty of the player, but that way as it is now, I don't see that.

I mean, if a big building space symbol appears, I'm thinking, ok, all space what is there is free - so that if a harbour building space is placed there, it should appear at least now. I don't know why it seems to be that there must be sooooo many space around the harbour and so much wide into the surrounding ocean, because for all other buildings in the game it is the case that if a builidng space symbol fitting their size appears, you always also then can build the wished building. E.g. if a big building space appears, you normally always can start building a farm there. Whether the building after it has been constructed finally can work correctly then is a totally another question and has nothing to do with the other one, e.g., if your farm/reed farm/vine farm can't work correctly because there is too few free space around it, that is another thing. So by the in-game mechanics, it seems to be unlogical that a harbour can't be built when its spot is big-building-space-like-free but just the far neighbourhood is not free/not conquered.

So what space is really needed to enable a placed harbour builidng symbol? Expanding the borders more wide into the sourrounding ocean than one node like I did first in the game? (when I later built a watchtower, I think it expanded the borders to at least two nodes from the shore and than the blue symbol appeared) Or how many ocean nodes exactly or what conditions apply to the blue symbol?

In addition, I find it totally unlogical, that building a harbour that way is made dependend of so many factors as described and thus made that complicated in comparison to that if you start an expedition and discover by it on a remote, unknown coast lying into the fog of war, a blue harbour building space symbol, then you ALWAYS can build a harbour there, although before of course you have none possession/no conquered area at this place at all (but when such a harbour has finished constructing, it conquers its own area for itself).

So although it seems to be intended to function that way, for the said reasons I still would consider the non-appearance of the blue symbol - even when a big building space is free at the spot of where the blue symbol would be - , as a bug, which I would call here-in "bug2".

I want to make clear that I know that "bug2" seems to be not new to the release candidate version, but also is existent in version 1.0 (which is the only other version I know). I also want to make clear that I of course do not expect that "bug2" could be "corrected" in the short time for the upcoming version 1.1. It's just a wish from me for version 1.2 (and of course I also want to express that although I don't like this little thing, that there are thousand things I like in widelands and that I can't express how thankful I am for all the developers of the game and all of the work they are doing. Thank you! It's so great what you are doing!).

Edited: 2022-10-08, 18:14

Top Quote
Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-08, 16:28

Screenshot from the SAVEGAME:

Screenshot from the replay of the SAVEGAME

Edited: 2022-10-08, 16:41

Attachment:
widelands - tournament 2022 round 3 - Seefahrer vs niektory - long long way v2 official - player 4 starting position - after last watchpost built - screenshot from SAVEGAME.jpg

Top Quote
Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-08, 16:32

Screenshot made during playing the LIVEGAME:

Edited: 2022-10-08, 16:43

Attachment:
widelands - tournament 2022 round 3 - Seefahrer vs niektory - long long way v2 official - player 4 starting position - after last watchpost built - screenshot from LIVEGAME.jpg

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2552
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2022-10-08, 16:43

Seefahrer wrote:

Screenshot from the SAVEGAME:

Screenshot from the replay of the SAVEGAME

Normally a blue anchor should have been shown at the ports building space. This is a new feature and possibly not free of bugs?


Top Quote
Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-08, 17:49

kaputtnik wrote:

Normally a blue anchor should have been shown at the ports building space. This is a new feature and possibly not free of bugs?

The newly altered big building space symbol with the little blue anchor symbol on it, as you described it, was visible for me during playing the game live:

https://www.widelands.org/forum/topic/5656/?page=1#post-39555

, but the little blue anchor was not shown in the savegame, there was only a normal big building space symbol visible.

In any case, I would have expected none ot both ones, but the blue harbour building symbol (which only showed up when I built a watchtower wihich made the conquered area around that place bigger / extended the borders more wide into the ocean, but I don't see why this should be needed... I mean, you can even build a shipyard when there is no single drop of water around - ok, it will not work then, but at least you can build it... so I just don't understand why you cannot build a harbour at its spot, when the spot is free and big and the shore is yours :-D)


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2057
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-10-08, 20:54

Because a harbour extends into the ocean. it consists of two parts: The warehouse, which is the building you see, and a portdock, which is automatically placed on water near the port when the port is completed. The portdock is where ships have to sail to interact with the port. Like for buildings, you need to own the field the portdock is placed on and all six fields around it. Portdocks are currently invisible; there's an open bug report to draw piers or something to visualize them, which will make this more intuitive.


Top Quote
Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-08, 22:32

Aha! face-surprise.png face-grin.png

Ok, in one way then "bug2" would make sense, of course! Because when the watchpost conquers only one node wide into the ocean, then there could be the space for the harbour's portdock, but some of the it surrounding nodes would still lay outside the territory.

On the other hand, I believe I saw other harbours which could be built although there was only one node ocean border width, but maybe I'm remembering incorrect or maybe it was just one side and the other side was more wide and maybe that was the portdock side - I have to look into this.

However, your outlining is totally interesting and fascinating to read, that there's a part of the harbour which is just invisible although its technically there! face-surprise.png I once wondered, why (optically) harbours are only near but not directly at the water.

I'm wondering, whether, when naval/maritime warfare will be implemented, if then the harbour will consist of three parts: warehouse, portdock (pier), military buildinglet.

(However, the invisible portdock and thus the space which is needed for it, still does not explain, why a ship expedition can build a harbour on a place where one possesses not only not the sorrounding portdock space, but not even a single node of territory/conquered space face-wink.png But ok, I don't want to be too strict, as I see, that for enabling building a harbour at a foreign coast it is needed to make an exception from that rule. In addition, I'm wondering whether the conquer range of a completed harbour is as many nodes wide as the width needed for the portdock, because then theoretically the harbour could conquerthat part of its own - if there would be enough water fields and no other player's border blocking it.)

But at least bug1 is a real bug found by me, yes? face-smile.png

Edited: 2022-10-08, 22:44

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2057
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-10-08, 22:53

IIRC the anchor symbol is only shown for actual players, spectators aren't supposed to see it as it's not their territory.

Ports are already attackable, my under-development naval warfare will not require such changes here. But all attackable buildings already have a separate building part called the AttackTarget face-smile.png

Expedition ships are simply one of the ways a player can gain new territory. The other ways are to construct a building with a conquer radius, conquering an enemy militarysite, and helpful scenario scripting.

A port's conquer radius is calculated in such a way that it always conquers sufficient space for a portdock.

IIRC, in the past port construction did not always require sufficient owned space, resulting in a crash when all the water around was already conquered so no portdock could be placed. Now we require enough space in advance, and if you lose it in the meantime, the newly completed port will if necessary forcibly make space for a portdock by conquering land and burning down obstacles, or self-destruct if all else fails.


Top Quote
Seefahrer
Avatar
Topic Opener
Joined: 2022-04-29, 18:24
Posts: 58
Ranking
Likes to be here
Posted at: 2022-10-09, 11:53

Well, but all other existing/newly conquered/changing building space symbols can be seen by every spectator, although neither of that places belongs to their territory also... so I don't see the difference... and still find it irritating if a replay does not show what was really visible for the player because that is what his actions determines... but ok it's not that important however, I admit, and it has no influence during playing the game live...

Yes, ok, yes I know that ports are already attackable by land - I meant, that ports once would be attackable by enemy ships, so that enemy islands with no free harbour building space left still could be attacked by attacking its existing harbour buildings by ship.

Ah, ok, thank you for explaining the reasons how it came that harbours need even more space than a large building space! face-smile.png I just thought it would just need the same area of space as a large building, but obviously it needs extra-large space (land and sea space combined).

Another thing coming to my mind: If HQs/warehouses/harbours can be attacked actively, then why can these buildings' soldiers (if there are some in it) just defend/react to an attack, but by their own can't attack enemy buildings? I mean, if soldiers are in these buildings, they could do something actively by their own instead of just sitting and waiting to get attacked... ;-) If there are in-game mechanics which would postulate that only pure military buildings can start an own attack/fight actively, I would understand that of course face-smile.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2022-10-09, 14:29

+1 for showing the same symbols in a replay / to a spectator as each player sees them in the game for reasons of consistency and better after match analysis and bug finding.

For attacking ports: this long wished feature is already worked on by our chieftain and will be most probably part of 1.2 (and would make a real nice tournamant focus for 1.2)

For the difference between HQ, port, warehouse and militarysites:
- Whether a building can be attacked is given in our lua definition files by the property whether it conquers land or not. Only HQ, ports and militarysites do this (and are attackable in consequence) while warehouses do not conquer anything.
- So far only militarysites can attack, as all the code necessary for attacking is within their code. There were ideas to make ports Militarysites too, but we are not sure whether this would be necessary or desirable.


Top Quote