Important Dates

Latest Posts

Topic: Criteria for a port space?

Astuur
Avatar
Topic Opener
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2012-03-20, 07:57

Hi Sirver,
Need a little info:
I'm playing around with the new port feature in the editor (bzr6322).

What exactly are the criteria for placing a port space in the editor?
You must fist have a "big" plot showing, so much seems clear.
but then?

  1. Terrain at water-lelvel?
  2. immediately on the shoreline?
  3. any restriction as to other port spaces in the vicinity?
  4. No fish?

is this already documented some place?


Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 826
Ranking
One Elder of Players
Location: Germany
Posted at: 2012-03-20, 08:29

Hi Astuur,

Hi Sirver

I am not Sirver, but as you write in the forums, I guess it's okay, that I answer. face-wink.png

There are only two criterias for a port buildspace:

  • Big build space
  • At least one swimable (completely surrounded by water) field 2 fields away

All other criteria are just based upon these two. E.g. the terrain does not have to be at water-level, but can't be much higher or deeper simply because else it is either not near enough to the water or not a big build space. Further there is no restriction to other port spaces in the vicinity. Maybe this will be changed in future once the colonization feature arrives, but it will most likely stay that way -> map creator decision. Fish doesn't matter as well.

is this already documented some place?

Unfortunally nowhere else than in the code - for me it was (as always for developers) quite obvious how it works. My fault, sorry. Perhaps we should start a wiki page about seafaring (not the one about the planned implementation, but an end user one)

Cheers Peter


Top Quote
alocritani

Joined: 2011-11-24, 13:03
Posts: 55
Ranking
Likes to be here
Location: Trento, Italy
Posted at: 2012-03-20, 08:40

Not sure if this is used in editor, too, but for map the rules should be the following:

If I read correctly src/logic/map.cc (Map::recalc_nodecaps_pass2) a port space is simply a big space with a swimmable second order neighbour (I think it is a neighbour at distance 2).

according to the same source, if height difference between a field and second order neighbour is >= 3, we can only build a small house there.

and finally the rules for objects/building dimensions:

Small object: allow medium-sized first-order neighbour, big second-order neighbour
Medium object: allow small-sized first-order neighbour, big second-order neighbour
Big object: allow no first-order neighbours, small second-order neighbours

edit: obviously I've not seen Nasenbaer's answer...

Edited: 2012-03-20, 09:36

Top Quote
Astuur
Avatar
Topic Opener
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2012-03-20, 08:55

Thanks Peter
Sorry, I just addressed Sirver, because he was doing this feature (I thought).
But of course I am just as happy with you answering this face-grin.png
...and very comprehensive, too! Thank you ....
Yes, it really is a plague with those code illiterates, but they are legion face-smile.png
Time to start thinking about a manual for the Editor ...


Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2012-03-20, 10:08

Sorry, I just addressed Sirver, because he was doing this feature (I thought).

Nope, I wasn't :). It is all Peter's work - I just didn't stand in the way which should also count for something I guess face-tongue.png


Top Quote
chuckw
Avatar
Joined: 2010-03-15, 16:23
Posts: 945
Ranking
One Elder of Players
Location: New York - USA
Posted at: 2012-03-20, 14:31

SirVer wrote:

Nope, I wasn't . It is all Peter's work - I just didn't stand in the way which should also count for something I guess face-tongue.png

I will paraphrase another American saying, "If you are not a part of the problem, you are a part of the solution."


I see little people.

Top Quote
Astuur
Avatar
Topic Opener
Joined: 2009-02-28, 10:08
Posts: 733
Ranking
One Elder of Players
Location: Frankfurt / Germany
Posted at: 2012-03-20, 18:55

All cleared up - and I stand corrected, but a better informed.
Thanks to all that helped, including Angelo, who's posted I missed face-smile.png


Being no programmer, I apologize for all my suggestions that imply undue workload and for other misjudgements due to lack of expertise or relevant skills.
I am on Win32, have no means to compile, and rely on prefabricated distributions (Thanks to Tino).

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2013-10-04, 17:23

Is it a bug connected to port place?

I'm not sure why in the editor is something else than in the game... Is it a bug?


Edit:
I've made small experiment:

Changing land type (steppe/grass) doesn't change anything, but connection to the ice does.

Edited: 2013-10-04, 17:35

einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
wl-zocker

Joined: 2011-12-30, 17:37
Posts: 492
Ranking
Tribe Member
Location: Germany
Posted at: 2013-10-04, 17:38

For me, it works (and has always worked) as expected: If a port space is placed in the editor, I can build a port in the game. Make sure the following (in this order): You put the port space on the map, you saved it, you started a new game on the map.

Maybe you started the game and edited the map afterwards?

EDIT: I did not see your edited post. The problem with ice is probably a bug, but there is no ice in your first screenshot.

Edited: 2013-10-04, 17:40

"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2013-10-04, 18:12

Make sure the following (in this order): You put the port space on the map, you saved it, you started a new game on the map.

I am checking my map (The Maze v1.1), so I don't make any changes as you tell face-smile.png

I've tried some changes in the editor. That's why the pictures are not exactly the same. But the port space wasn't changed.

but there is no ice in your first screenshot.

Yes, but there is a sand. Maybe I should check the sand too?


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote