Latest Posts

Topic: Strange values in mines' conf file

alocritani

Topic Opener
Joined: 2011-11-24, 12:03
Posts: 55
Ranking
Likes to be here
Location: Trento, Italy
Posted at: 2011-12-01, 07:41

If I understand correctly the conf file for barbarian deeper coalmine

[work]
sleep=40000
consume=meal
animate=working 16000
mine=coal 2 100 10
produce=coal:2
mine=coal 2 100 10
produce=coal:3

the line mine=coal 2 100 10 should mean extract 2 units, up to 100% of available resources with a chance of 10% to find more units also if all resources (100% in this case) have been mined

it means that every time this program is executed, a meal is consumed, then 2 units of coal are removed from the mined area, 2 units of coal are produced, then 2 units of coal are removed from the mined area and 3 units of coal are produced.

It seems a bit strange to me: you mine 2 units but are able to produce 3?

If this is not intended, I found other strange conf files, like the barbarian deeper oremine

[work]
consume=meal
sleep=40000
animate=working 16000
mine=iron 2 100 10
produce=ironore
animate=working 16000
mine=iron 2 100 10
produce=ironore:2
animate=working 16000
mine=iron 2 100 10
produce=ironore:2

In this case 3 cicles are executed (other mines executes 2 cicles - why this one 3? ) and the first one return only 1 ore, even if 2 are removed from the mined area

I found other examples, also. If you confirm that are typos or small errors, so no logic behind, I can try finding and solving all this small "errors" in a branch.


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2011-12-01, 12:31

Jepp everything you wrote is correct. In the first case, this is clearly intended, as deep and deeper mines are meant to mine faster and more efficient (get more from what lies inside the mountain). In the last example you posted the last criteria is not met, therefore it is likely that this indeed is a bug.

How is this handled in the deep coalmine and the coalmine? if those are more efficient than the deeper c.m. it .is likely a typo (should be mine=iron 2 100 10;produce=ironore:2)

A branch would of course be nice face-smile.png

Cheers Peter


Top Quote
alocritani

Topic Opener
Joined: 2011-11-24, 12:03
Posts: 55
Ranking
Likes to be here
Location: Trento, Italy
Posted at: 2011-12-01, 13:08

Hi Nasenbaer, what it seems strange to me is that the deeper mine produces 2 units of coal out of 2 units removed from the mine the first time, and 3 coal units out of 2 units removed from the mine the second time.

So you say that is this way in order to obtain a 5/4 (5 units produced over 4 units used) or 25% increase in efficiency?

I'm thinking about the creation of a single branch and commit every change in a specific revision, so developers can cherry-picking the changes they want to apply. I know it is a bit more complex than merging several branches (each one with a different change) but in this way I can avoid having lot of branches around.


Top Quote
Mars

Joined: 2009-03-28, 09:26
Posts: 118
Ranking
Likes to be here
Location: Germany
Posted at: 2011-12-03, 20:54

Is it possible to have comments in the .conf files? that would be very useful

and maybe i should read these .conf files when i have time, i never know deep mines produce more ores in total then an ordinary mine.

that could be why developers always wins .. they have more knowledge of what's going on

Edited: 2011-12-03, 20:54

Top Quote
alocritani

Topic Opener
Joined: 2011-11-24, 12:03
Posts: 55
Ranking
Likes to be here
Location: Trento, Italy
Posted at: 2011-12-04, 09:32

I've created a branch (https://code.launchpad.net/~alocritani/widelands/mines_conf) to keeping track of modification to conf files related to mines.

Feel free to discuss about the changes and reject any change, if you think the logic I applied is wrong


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2011-12-06, 10:50

IIRC one can start comments with a hash '#' sign in the conf files.


Top Quote