fuchur
Joined: 2009-10-07, 13:01
Posts: 186
Widelands-Forum-Junkie
Location: Germany
|
Posted at: 2017-02-08, 21:46
WorldSavior wrote:
4 : In the match between Tando and waylon531, Tando's headquarter was destroyed because a guardhouse close to it was conquered. I think that it's a bug, because a headquarter should have higher priority, like a fortress. (A guardhouse next to a fortress cannot be conquered, it will be always destroyed automaticly). To watch this situation, just watch a little bit of the time after the replay (after 230 minutes) http://www.widelands.org/~sirver/wl/161121_tournament_2016_replays/Round04/
I was curious and had a look at the incident you mention. From what I saw I'd say it's not a bug because Tando hat no soldiers in is headquarter. That means it is treated like any other unmanned military building and therefore got destroyed when waylon531 conquered the guardhouse next to it. If there had been at least one soldier inside the headquarter I guess the guardhouse couldn't have been conquered but would have been burned instead.
There is a (quite old) bug report for this: https://bugs.launchpad.net/widelands/+bug/536583
Top
Quote
|
|
|
Tibor
Joined: 2009-03-23, 22:24
Posts: 1377
One Elder of Players
Location: Slovakia
|
Posted at: 2017-02-08, 22:01
@WorldSavior
bool is a one bit in memory that can store only 0 or 1. Thus 20 bits is like single integer (it can take 8, 16 or 32 bits, depending of size). So it is extremely effective way how to store 20 results - both RAM-wise and also processing-wise. Storing also durations there, or increase the number of results - let say skipping takes one second so 10 minutes of performance can be 600 skips each lasting 1 second - is fundamental change... Also if we want to cover 10 minutes, length of results queue will vary depending on actual duration of current result to be pushed in. This is not rocket science, but for so many buildings.... And of course all that stuff will have to be saved in savegames
Top
Quote
|
|
|
GunChleoc
Joined: 2013-10-07, 14:56
Posts: 3317
One Elder of Players
Location: RenderedRect
|
Posted at: 2017-02-09, 10:12
2 : Often you don't get an attack message. I'm almost sure that this bug didn't exist in build 18.
There are multiple messages related to attacks. which one of those do you mean exactly?
The message "you are under attack" if that certain building is under attack.
By the way, the message "you are under attack" is always send if a soldier walks close to a miltary building, for example because of the random walk of lost soldiers
Sounds like this is difficult to reproduce, especially for somebody who plays as badly as me. The next time this happens, could you load your last autosave to check whether this is reproducible there? If so, such a savegame would be of great help for debugging this.
Busy indexing nil values
Top
Quote
|
|
|
kaputtnik
Joined: 2013-02-18, 19:48
Posts: 2488
OS: Archlinux
Version: current master
One Elder of Players
Location: Germany
|
Posted at: 2017-02-09, 15:42
Regarding the attack message: I have noticed this also if a foreign soldiers just passes my terrain (crosses the border) if he walks around.
Fight simulator for Widelands: https://wide-fighter.netlify.app/
Top
Quote
|
|
|
king_of_nowhere
Joined: 2014-09-15, 17:35
Posts: 1668
One Elder of Players
|
Posted at: 2017-02-09, 15:53
i never noticed instances of missing messages. and whenever an enemy soldier breach your border, you get the message. in fact, i'd say you get too many messagges at the moment, making it difficult to understand all of them. in particular, if you receive an attack on two fronts, one well manned and the other not, the second front may slip your notice for the sheer number of messages you get from the first front. I admit taking advantage of this a few times.
Top
Quote
|
|
|
WorldSavior
Topic Opener
Joined: 2016-10-15, 03:10
Posts: 2097
OS: Linux
Version: Recent tournament version
One Elder of Players
Location: Germany
|
Posted at: 2017-02-12, 19:26
fuchur wrote:
WorldSavior wrote:
4 : In the match between Tando and waylon531, Tando's headquarter was destroyed because a guardhouse close to it was conquered. I think that it's a bug, because a headquarter should have higher priority, like a fortress. (A guardhouse next to a fortress cannot be conquered, it will be always destroyed automaticly). To watch this situation, just watch a little bit of the time after the replay (after 230 minutes) http://www.widelands.org/~sirver/wl/161121_tournament_2016_replays/Round04/
I was curious and had a look at the incident you mention. From what I saw I'd say it's not a bug because Tando hat no soldiers in is headquarter. That means it is treated like any other unmanned military building and therefore got destroyed when waylon531 conquered the guardhouse next to it. If there had been at least one soldier inside the headquarter I guess the guardhouse couldn't have been conquered but would have been burned instead.
There is a (quite old) bug report for this: https://bugs.launchpad.net/widelands/+bug/536583
OKay... I still think it's a bug (headquarters are like ports, and ports conquer terrain without soldiers - different to military buildings) - but the priority of that bug might be very low, if it doesn't cause bigger problems
Tibor wrote:
@WorldSavior
bool is a one bit in memory that can store only 0 or 1. Thus 20 bits is like single integer (it can take 8, 16 or 32 bits, depending of size). So it is extremely effective way how to store 20 results - both RAM-wise and also processing-wise. Storing also durations there, or increase the number of results - let say skipping takes one second so 10 minutes of performance can be 600 skips each lasting 1 second - is fundamental change... Also if we want to cover 10 minutes, length of results queue will vary depending on actual duration of current result to be pushed in. This is not rocket science, but for so many buildings.... And of course all that stuff will have to be saved in savegames
Ah, short form of boolean! So you say that it would be very complicated to implement the other system of productivity? Why not just checking how much wares the building produced during the last X minutes and comparing it with the wares which the building would have produced at 100%?
I don't know if it would bother me if the correct productivity would not be shown immediately after loading a match. In Build 18, it never bothered me. And I liked it that the productivity statistic graph showed exactly when you loaded the match ("it's not a bug, it's a feature"). Without that feature, the productivity statistic graph is not very useful
GunChleoc wrote:
2 : Often you don't get an attack message. I'm almost sure that this bug didn't exist in build 18.
There are multiple messages related to attacks. which one of those do you mean exactly?
The message "you are under attack" if that certain building is under attack.
By the way, the message "you are under attack" is always send if a soldier walks close to a miltary building, for example because of the random walk of lost soldiers
Sounds like this is difficult to reproduce, especially for somebody who plays as badly as me. The next time this happens, could you load your last autosave to check whether this is reproducible there? If so, such a savegame would be of great help for debugging this.
You don't play badly.
I could try it, and I could send you the savegame via mail.
kaputtnik wrote:
Regarding the attack message: I have noticed this also if a foreign soldiers just passes my terrain (crosses the border) if he walks around.
To be more precise: The border of a certain military building, right?
king_of_nowhere wrote:
i never noticed instances of missing messages. and whenever an enemy soldier breach your border, you get the message. in fact, i'd say you get too many messagges at the moment, making it difficult to understand all of them. in particular, if you receive an attack on two fronts, one well manned and the other not, the second front may slip your notice for the sheer number of messages you get from the first front. I admit taking advantage of this a few times.
Yes, to many messages ("no more trees")
Why shouldn't you take advantage of the possibility to attack at various fronts?
But I'm used on fighting on many fronts at a certain time, so I could sware that you could conquer this one watchtower of mine
just because of the no-message-bug...
Wanted to save the world, then I got widetracked
Top
Quote
|
|
|
Tibor
Joined: 2009-03-23, 22:24
Posts: 1377
One Elder of Players
Location: Slovakia
|
Posted at: 2017-02-12, 20:15
WorldSavior wrote:
Tibor wrote:
@WorldSavior
bool is a one bit in memory that can store only 0 or 1. Thus 20 bits is like single integer (it can take 8, 16 or 32 bits, depending of size). So it is extremely effective way how to store 20 results - both RAM-wise and also processing-wise. Storing also durations there, or increase the number of results - let say skipping takes one second so 10 minutes of performance can be 600 skips each lasting 1 second - is fundamental change... Also if we want to cover 10 minutes, length of results queue will vary depending on actual duration of current result to be pushed in. This is not rocket science, but for so many buildings.... And of course all that stuff will have to be saved in savegames
Ah, short form of boolean! So you say that it would be very complicated to implement the other system of productivity? Why not just checking how much wares the building produced during the last X minutes and comparing it with the wares which the building would have produced at 100%?
I don't know if it would bother me if the correct productivity would not be shown immediately after loading a match. In Build 18, it never bothered me. And I liked it that the productivity statistic graph showed exactly when you loaded the match ("it's not a bug, it's a feature"). Without that feature, the productivity statistic graph is not very useful
I like the idea of storing only production time of last n wares, from that we should be able to calculate average productivity for last 10 minutes (f.e.) The logic would be complicated by multiple types of produced wares with different production times, but should be doable.
When I talked about saving - right now each building stores in savegame 20 bool(ean)s, no matter what. This is very effective and simple to implement - the number is static. Also above idea storing production times of e.g. 20 wares is simple, 20 integers, no matter what. I just dont like idea of variable count of production results (in savegame).
Top
Quote
|
|
|
GunChleoc
Joined: 2013-10-07, 14:56
Posts: 3317
One Elder of Players
Location: RenderedRect
|
Posted at: 2017-02-13, 08:58
WorldSavior wrote:
Yes, to many messages ("no more trees")
Would you like to do some testing for us here? The value can be set for each building at
data\tribes\buildings\productionsites\<tribe>\<buildingname>
Lower the value for productivity_threshold until you find a good balance, then tell us which value you used.
You can change these values and still play multiplayer with others without breaking any savegames etc.
Busy indexing nil values
Top
Quote
|
|
|
king_of_nowhere
Joined: 2014-09-15, 17:35
Posts: 1668
One Elder of Players
|
Posted at: 2017-02-13, 12:36
Tibor wrote:
@WorldSavior
bool is a one bit in memory that can store only 0 or 1. Thus 20 bits is like single integer (it can take 8, 16 or 32 bits, depending of size). So it is extremely effective way how to store 20 results - both RAM-wise and also processing-wise. Storing also durations there, or increase the number of results - let say skipping takes one second so 10 minutes of performance can be 600 skips each lasting 1 second - is fundamental change... Also if we want to cover 10 minutes, length of results queue will vary depending on actual duration of current result to be pushed in. This is not rocket science, but for so many buildings.... And of course all that stuff will have to be saved in savegames
storing productivity in 20 bools still works. it just needs a different equation, one that takes into account the different duration of a working and idle cycle. right now, the (faulty) equation used is "number of worked cycles * 5". It should be
"number of worked cycles * (cycle duration + 3600 * number of wares produced) * idle duration / (number of worked cycles * (cycle duration + 3600 * number of wares produced) + 20 * idle duration)".
all the numbers needed are in the lua files of the building. the factor "3600 * number of wares produced" is to take into account the time to carry the produced ware() to the flag.
this only fails for mines, that produce different amounts of stufff every time. i don't know how they work, so i cannot suggest a fix for them.
Top
Quote
|
|
|
WorldSavior
Topic Opener
Joined: 2016-10-15, 03:10
Posts: 2097
OS: Linux
Version: Recent tournament version
One Elder of Players
Location: Germany
|
Posted at: 2017-02-13, 18:58
Tibor wrote:
I like the idea of storing only production time of last n wares, from that we should be able to calculate average productivity for last 10 minutes (f.e.) The logic would be complicated by multiple types of produced wares with different production times, but should be doable.
Hint: That system could lead to productivity numbers which would be not as up-to-date as the numbers of the system "Checking for a time x the produced number n of wares".
When I talked about saving - right now each building stores in savegame 20 bool(ean)s, no matter what. This is very effective and simple to implement - the number is static. Also above idea storing production times of e.g. 20 wares is simple, 20 integers, no matter what. I just dont like idea of variable count of production results (in savegame).
Ok
GunChleoc wrote:
WorldSavior wrote:
Yes, to many messages ("no more trees")
Would you like to do some testing for us here?
Probably yes...
You can change these values and still play multiplayer with others without breaking any savegames etc.
Thanks for the information! But I've got a problem: Changing the lua-file didn't work, because it is write-protected. And it seems to be hard to change that if you use Linux...
Wanted to save the world, then I got widetracked
Top
Quote
|