Latest Posts

Topic: Bugs

Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-13, 20:14

@WorldSavior
Ownership by root should not be obstacle to editing the file. It should not be rocket science to change the owner to your current user or so.

My idea is statistics of produced times, like:

1050
1110
1220
1348
1848
1889
1957
2157
2185
2237

(in seconds)

So if current time is 2300, last 10 minutes started at 1700, that would be 6 wares, if the site produces single ware - it is simple. If more wares, that would be more complicated. Than we could store also productions times along each time above.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-13, 21:09

WorldSavior wrote:

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...

Just copy the whole folder into your home directory, there you should have write permissions. Then start widelands with the option --datadir=/home/worldsavior/widelands/ (may adjust the path to the folder where you copied the data-files into)


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-13, 22:20

Alternatively:

a) Check your file manager - perhaps it allows rights elevation (will ask for root password) and allow you to change authorization

b) Or just lear how to change the authorities/ownership in console

sudo bash

or

su -

then change ownership to your user (use actual account of course)

chown youruser /path/to/file.lua

or allow write access to everybody (g=group, o=others, +w=add write access)

chmod go+w /path/to/file.lua

And then the file will be writable for you from GUI

EDIT:

So the "session" can look like:

$ ls -al ./trees/deadtree5/init.lua
-rw-r--r-- 1 root root 422 feb 13 18:53 ./trees/deadtree5/init.lua  #only root can r+w
$ chmod go+wr ./trees/deadtree5/init.lua                       #add rw authorities for group and others
$ ls -al ./trees/deadtree5/init.lua  
-rw-rw-rw- 1 root root 422 feb 13 18:53 ./trees/deadtree5/init.lua  #now all can r&w
Edited: 2017-02-14, 10:46

Top Quote
fuchur

Joined: 2009-10-07, 14:01
Posts: 186
Ranking
Widelands-Forum-Junkie
Location: Germany
Posted at: 2017-02-14, 21:51

WorldSavior wrote:

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 face-tongue.png

Ok, I think I didn't phrase correctly what I meant. That was the following: the game is designed that buildings are burned down if they are not protected by soldiers inside or the influence range of another manned military building. Consequently that happens to the headquarters as well.

Besides that I share your opinion that it is an annoying behaviour. If it can be attacked there should be a possibility to adjust the number of guaranteed defenders. As far as I understand the bug report it should be easier now with the new barracks feature to make headquarters, warehouses and ports behave like military buildings in a way that you can adjust a number of soldiers to stay there.


Top Quote
Notabilis
Avatar
Joined: 2016-11-03, 20:37
Posts: 41
Ranking
Pry about Widelands
Posted at: 2017-02-14, 23:51

The new barracks building has nothing to do with this functionality. It only moves the soldier creation out of the warehouses and into a designated building.

There is a bug open for defenders in headquarters but it is already a "bit" older and there hasn't been any work (directly) on it in the last years: https://bugs.launchpad.net/widelands/+bug/536583


Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 10:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-02-15, 11:23

I think it is a no brainer that HQ, ports and warehouses should be military buildings, in the sense that they can store soldiers and once soldiers enter any of them there will always be at least one as a 'last line of defence' defender.

This means you can attack ports and warehouses as well as HQ, but there will normally be at least one defender so the attack is slightly harder than attacking a HQ is now. If the building is captured and is in the influence range od another manned militay building then it is destroyed, if it is not protected by another building then you capture it, the enemy workers all leave and do their headless chicken dance taking with them wares of their tribe, any wares that are common to all tribes are captured by you, logs, coal, ores and metals etc.everything else that was there is gone, even if you are the same tribe.


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

IMO the best implementation for a garrison would be to have a separate object for it, like the portdock for ports. Then we could theoretically garrison any building type that we want.


Busy indexing nil values

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

The missing attack message is confirmed now. Thanks for the savegame face-smile.png

Issues in this thread that still need looking into and be turned into proper bugs:

  1. Crystal mines overproducing - how to reproduce the problem.
  2. Fixing the productivity statistics
  3. Finding a better productivity threshold for Lumberjack messages.

Busy indexing nil values

Top Quote
fuchur

Joined: 2009-10-07, 14:01
Posts: 186
Ranking
Widelands-Forum-Junkie
Location: Germany
Posted at: 2017-02-15, 21:03

Notabilis wrote:

The new barracks building has nothing to do with this functionality. It only moves the soldier creation out of the warehouses and into a designated building.

There is a bug open for defenders in headquarters but it is already a "bit" older and there hasn't been any work (directly) on it in the last years: https://bugs.launchpad.net/widelands/+bug/536583

I don't know anything about the implementation of headquarters. But I understood comment #1 in that bug (which I mentioned before) in a way that it causes problems with soldier production if there are stationed soldiers in the headquarter. So I thought now with soldier production outsourced to the barracks it would be easier to fix. But again, I don't know the source code.

@Tinker: Do you really think it's a good idea that you can get wares stored in a captured warehouse? I'm even not sure if it should be possible to capture a warehouse. But maybe this discussion and ideas should be made in the bug report.


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

Capturing wares would be a separate feature implementation-wise that could have its own bug if we want it.


Busy indexing nil values

Top Quote