Latest Posts

Topic: new tribe: amazons

king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2019-09-13, 15:48

found another couple problems, those more serious.

I am now playing the "make the desert bloom" (https://www.widelands.org/maps/to-make-the-desert-bloom/) map, to test gardening. but i see problems with water. south oof blue starting position there is a narrow water strip; I made wilderness keepers and water gatherers there, but both are unable to work. they don't recognize the water as such.

on the other hand, the small pool near the blue hq works fine. this makes me think that those buildings require a corner that's fully surrounded by water. and a thin strip of water surrounded by land is not recognized as a valid target. I checked for confirmation on the dolomites map, which has narrow rivers, and i saw the same behavior; water gatherers do not find water, wilderness keepers are unable to breed fish. hunter gatherers can catch the fish until they run out, though

unfortunately, this limits the options in some maps. in particular, most players in the dolomites map have only narrow rivers for water, and amazonians would be unplayable on the map


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-09-13, 16:30

south oof blue starting position there is a narrow water strip; I made wilderness keepers and water gatherers there, but both are unable to work. they don't recognize the water as such.

on the other hand, the small pool near the blue hq works fine. this makes me think that those buildings require a corner that's fully surrounded by water. and a thin strip of water surrounded by land is not recognized as a valid target. I checked for confirmation on the dolomites map, which has narrow rivers, and i saw the same behavior; water gatherers do not find water

This is deliberate behaviour. The water gatherer looks for nodes where at least 1 neighbouring node is completely surrounded by water.

The wilderness keeper has an error in the findspace command for fish replenishing. @hessenfarmer please do it like for atl fishbreeder there:
findspace=size:any radius:… breed resource:fish
Otherwise he will try to replenish fish only on the nodes described (but fish can life on other shore nodes as well), and also on nodes that never had fish or where fish is still 100% full (both will fail).

Edited: 2019-09-13, 16:35

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-09-13, 17:23

Well, we got lucky and the conversion script decided to grab the amazons branch early. So, I have pushed it to GitHub early: https://github.com/widelands/widelands/tree/amazons

Enjoy the new digs and post to https://www.widelands.org/forum/topic/4624/ if you need any help with it.


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-09-13, 17:26

Nordfriese wrote:

south oof blue starting position there is a narrow water strip; I made wilderness keepers and water gatherers there, but both are unable to work. they don't recognize the water as such.

on the other hand, the small pool near the blue hq works fine. this makes me think that those buildings require a corner that's fully surrounded by water. and a thin strip of water surrounded by land is not recognized as a valid target. I checked for confirmation on the dolomites map, which has narrow rivers, and i saw the same behavior; water gatherers do not find water

This is deliberate behaviour. The water gatherer looks for nodes where at least 1 neighbouring node is completely surrounded by water.

Can't we change this to find the small amounts of water by the water gatherer as well? As on the mentioned maps (e.g. Dolomites) we might ran out of water otherwise.

The wilderness keeper has an error in the findspace command for fish replenishing. @hessenfarmer please do it like for atl fishbreeder there:

I did this intentionally. Of course this can be changed, but I wanted the amazon fish supply work differently from atlanteans.

findspace=size:any radius:… breed resource:fish
Otherwise he will try to replenish fish only on the nodes described (but fish can life on other shore nodes as well), and also on nodes that never had fish

that was the reason why I chose it like this I wanted to breed in emptied nodes as well.

@ KoN: just a short explanation of the behaviour described:
- Atlantean fishbreeder knows where he can breed fish (there is at least 1 fish left and the node isn't fully filled with fish) then he goes there and tries to breed which is most of the time succesful if at least the surrounding nodes can take more then 4 fish in summary (it is like mining in the opposite direction --> chances for succes get worse the more fish is already there.
- Amazons wilderness keeper doesn't know whether he can breed on the node (if there is space left to breed) but he tries to breed in a node where he finds water and there is no other precondition for it. so you could built a wilderness keeper even if all the fish has been caught.


Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2019-09-13, 17:32

hessenfarmer wrote:

  • Amazons wilderness keeper doesn't know whether he can breed on the node (if there is space left to breed) but he tries to breed in a node where he finds water and there is no other precondition for it. so you could built a wilderness keeper even if all the fish has been caught.

they didn't try to breed fish. they merely said "out of resources" and didn't come out of their huts.

the wilderness keepers can keep working that way. on dolomites and similar conditions they can still produce meat, even if they won't be able to regenerate fish. but the water gatherers need to be able to get water without a node fully surrounded by it, else some maps may become unplayable


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-09-13, 17:49

findspace=size:any radius:… breed resource:fish

Otherwise he will try to replenish fish only on the nodes described (but fish can life on other shore nodes as well), and also on nodes that never had fish

that was the reason why I chose it like this I wanted to breed in emptied nodes as well.

This just results in the wilderness keeper walking to nodes that never contained fish, and when he gets there the program fails because it is not allowed to replenish a resource if it was never present in the node. The check for breed resource:fish in findspace is mandatory to avoid bugs on many maps.

This is deliberate behaviour. The water gatherer looks for nodes where at least 1 neighbouring node is completely surrounded by water.

Can't we change this to find the small amounts of water by the water gatherer as well? As on the mentioned maps (e.g. Dolomites) we might ran out of water otherwise.

Reason why I did it like this is that I copied this code 1:1 from the shipwright´s buildferry code, and since a ferry shouldn´t be built in a tiny puddle, I put that check there. I´ll modify the code to allow nodes with 1 water triangle and no other condition as default (for water gatherer), and re-enabling the current behaviour with the space flag (for the ferry yard).

Doing so I can check out now whether my git environment is functional face-wink.png


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-09-13, 19:02

Seems like git is working for me face-smile.png

Uploaded a fix (and also a merge of master, which I noticed was needed after I accidentally added the big build directory…). The water gatherer should now be using all triangles with water.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-09-13, 19:36

Nordfriese wrote:

This just results in the wilderness keeper walking to nodes that never contained fish, and when he gets there the program fails because it is not allowed to replenish a resource if it was never present in the node. The check for breed resource:fish in findspace is mandatory to avoid bugs on many maps.

From what I saw in the code and experienced so far it will not crash. It will replenish a random node in radius 1 if this can be replenished. this is somewhat ineffective but that was the tradeoff for being able to breed in empty nodes. For the moment I would use the code like the water gather as it could esily be changed at any time.

Now I will try to setup git. wish me luck face-wink.png


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-09-13, 20:05

I wasn´t talking about crashing but about the program failing face-wink.png

Looked at the code now – true, if there is a field with replenishable fish within a radius of 1 it will be replenished, even if there are 0 fish now (provided there were ever fish there!). But as far as I can see, breed resource:fish will also find nodes where there were fish at some point but are exhausted, so using this would not change the actual behaviour except that the breeder will not run to nodes where he cannot breed anything.

Good luck with git face-smile.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-09-13, 20:19

As far as I understood breed is an additional flag to the find resource command. resource:fish will therefore only find nodes with at least one fish as 0 fish is equivalent to no resource. When there the atlantean fishbreeder accidentally can increase a neighbour node with 0 fish to 1 as the search node code is independent of the run_breed code. the find node part is the cause for the atlantean fishbreeder needing at least 1 fish.


Top Quote