Latest Posts

Topic: exact behavior of fish

king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-02-26, 15:36

I am inquiring those who know the code about how exactly fish mechanics work. When you set the number of fish in the editor, does that represent the initial amount of fish in that water tile, or the maximum amount? if you place a fish breeder next to it, will it keep adding fish to the water until you reach a certain amount set in the code, or it will only put new fish in the water to replenish those taken from the starting value?

I ask because I'm making a desert map where the only water is in a few oasis. Oasis are not known for abundance of fish, and so I wanted to force the atlantean player to start breeding the fishes before he can make a fishery. That, however, will only work if more fish can be added after the initial amount. I'd like to keep with the "barren desert with scant resources" theme, butI don't want to accidentally make the map unplayable for one tribe. If I set the water to have exactly 1 fish, then the first fisher that takes it leaves the pool with 0 fishes, and the fish breedercan't work anymore. Speaking of that, do the fish breeder still need at least one fish to replenish a tile? or was some kind of fish reproduction/migration mechanic implemented after build 18?

Thanks to wheover knows it.

If nobody knows, I can find it out by playtesting, but it takes much more time than just asking in the forum.

Edited: 2016-02-26, 15:37

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-27, 12:02

It's the initial amount. If you don't set it, the terrain will start with the default amount instead.

Edited: 2016-02-27, 12:02

Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-02-27, 15:33

since no one could give an exhaustive answer, I playtested it, and I found out that if I made 2 fish breeders, they would not work. if I then made a fisher, it started to fish and the fish breeders would start to work, replenishing the fish. then I tried to stop the fish breeders, and the fisher gave the "no more fish" message after taking 4 more fish (the pond had 5 free corners). I restarted the work of the fish breeders, and the fisher found fish again. So I conclude that the limitation that fish run out forever is no more, and fish breeder can add new fish even to a tile that has 0. However, the amount of fish set at the beginning is a hard limit. Never the amount of fish can exceed that. I set initiallyb 1 fish per tile, and it always remained 1 fish per tile, even with 2 fish breeders refilling and only 1 fisher fishing.


Top Quote
einstein13
Avatar
Joined: 2013-07-28, 23:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2016-02-27, 18:25

Thanks for the test! It is good to know!


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

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-03-01, 23:53

Actually, i have an addition to it. I played the game more, with one breeder and one fisher, and eventually i did run out of fish, with the breeder saying "can't find more resources". I speculate that the breeder can put a fish in a tile that has none only if there is at least one in an adjacent tile. so, as long as there were 2 breeders and 1 fisher, there always was a fish in an adjacent tile. but with 1 and 1, it eventually run out. trees planted in the shores kept some fishes from being harvested for a long time, but eventually the mechanism broke.


Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-03-05, 21:38

I tried with a small enclosed pool to fish all the fish out of it, then restart the fish breeders. they were able to work. so, i have no idea how the fish mechanism works. But i know that, as long as you keep more breeders than fishers, you can fish a pool with one fish per tile.


Top Quote