Latest Posts

Topic: how do mine production works?

king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-02-13, 14:06

mines hve strange working cycles. One time they produce something, another time they produce something else. most baffling is the atlantean crystal mine, which produces (if i am not mistaking) first stones, then quartz, then stones, then diamond. I have a few questions and a few comments

1) how does it all work exactly? how can i figure out, from the lua files, what the mine is going to produce?

2) suspending the work cycle causes it to restart, or the cycle goes to completion?

3) mined resources are detracted from the total available to the mine based on actual resources excavated, or on working cycles? and how does it work for atlantean crystals?

regarding point 2), I suspect that with more consecutive working cycles the mine is going to produce more stuff. For example, a mine coal mine produces 1 coal the first time, 2 coals the second time, and 3 coals the third, then it starts back. if after extracting 2 coals the mine has no food, and stays idle for a while, after getting new food does it make 3 coals, or will it go back to making one? I suspect it is the second case, because mines working that way are supposed to encourage a strong economy. unfortunately, it is just possible to stop a mine and wait until it has food, so the system just ecnourages extensive micromanaging. Worse, it is the bad kind of micromanaging, the one that does not involve taking meaningful decisions but only a lot of work.

To fix that, it would be good if stopping the mine automatically caused it to restart the cycle. ok, one could still stop the mine until it has full food so that he will get at least a few working cycles complete, but it cannot be fixed; also, it is a somewhat meaningful decision, as it requires stopping the mines for a long time and you may need those resources earlier. Mines skipping work because economy does not need more ores should be treated differently; either they would have to be exempted from the restarting of the cycle, or a mine would complete the cycle regardless of ores in warehouse before declaring "skipped work because economy does not need".

regarding point 3), I am ok with mines being more food-efficient if kept well fed, but the mountain should deplete proportionally. I suppose that if the coal mine digs 3 coals in a single working cycle it still consumes 3 coal from the mountain, but this is the kind of mistakes in programming that are often overlooked.

Also, how does it work for the crystal mine? if it require 4 cycles to get a diamond, and there is scarce food, can it go through all the mountain without finding a single diamond? this would make stopping the mine of higher importance. I doubt it is important, though, as diamonds are used very rarely. And how about the marble mine? can there be some trick to get more marble than usual from it?


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2017-02-13, 18:02

As I remember marble mines, they can produce stone & marble with any proportions. I guess that there is a random choice there which decide if the cycle will produce only marble or only stone or both resources. Most of the marble mine production is always marble (for sure).


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

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-13, 20:10

king_of_nowhere wrote:

For example, a mine coal mine produces 1 coal the first time, 2 coals the second time, and 3 coals the third, then it starts back.

A mine coal mine? Is this something new in the development version? face-tongue.png

Also, how does it work for the crystal mine? if it require 4 cycles to get a diamond, and there is scarce food, can it go through all the mountain without finding a single diamond?

That would be funny...

Edited: 2017-02-14, 13:40

Wanted to save the world, then I got widetracked

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-02-13, 21:31

WorldSavior wrote:

Also, how does it work for the crystal mine? if it require 4 cycles to get a diamond, and there is scarce food, can it go through all the mountain without finding a single diamond?

That would be funny...

well, no funnier than considering the implications of diamond mining and building in widelands. the other tribes go through the same pile of stone as the atlanteans, but they never produce a single diamond. since the diamonds must clearly be inside the mountain, i wonder what happens to them. maybe the miners throw away the diamonds because they have no practical applications?

And why are diamonds needed in constructions anyway? I imagine the atlantean soldiers as a bunch of snobs who won't go into a castle if it lacks that svarovsky chandelier...


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-16, 23:04

king_of_nowhere wrote:

WorldSavior wrote:

Also, how does it work for the crystal mine? if it require 4 cycles to get a diamond, and there is scarce food, can it go through all the mountain without finding a single diamond?

That would be funny...

well, no funnier than considering the implications of diamond mining and building in widelands. the other tribes go through the same pile of stone as the atlanteans, but they never produce a single diamond. since the diamonds must clearly be inside the mountain, i wonder what happens to them. maybe the miners throw away the diamonds because they have no practical applications?

Or maybe the diamonds are inside the stones, so the other tribes use diamonds as stones, so to speak... face-wink.png

And why are diamonds needed in constructions anyway? I imagine the atlantean soldiers as a bunch of snobs who won't go into a castle if it lacks that svarovsky chandelier...

Actually, my atlantean soldiers are able to enter diamond-free imperial castles. But yours are to snobbish for that? face-wink.png

Maybe the atlanteans need the diamonds for the doors of the castles face-wink.png


Wanted to save the world, then I got widetracked

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-25, 13:43

king_of_nowhere wrote:

mines hve strange working cycles.

Only crystal and marble mines have working cycles. They are described in the thread "Bugs"...

For example, a mine coal mine produces 1 coal the first time, 2 coals the second time, and 3 coals the third, then it starts back.

I really wonder were this is coming from. A coal mine with a working cycle doesn't exist... face-wink.png


Wanted to save the world, then I got widetracked

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-02-25, 14:00

Buildings that only produce 1 type of ware have 1 building program to cycle through, so it's a cycle of 1. Except for farming, where there are also multiple programs for planting and harvesting.


Busy indexing nil values

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-25, 16:24

face-grin.png Calling a cycle of 1 a cycle is a little bit pointless in my opinion...


Wanted to save the world, then I got widetracked

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-02-25, 19:56

It's how the code works though face-wink.png


Busy indexing nil values

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-26, 20:01

Yes, sure, but obviously my phrase is meaning "Only crystal and marble mines have working cycles with a length which is greater than one." face-wink.png


Wanted to save the world, then I got widetracked

Top Quote