Topic: minor bug with deleting
Speter Topic Opener |
Posted at: 2018-02-21, 07:44
I noticed a bug while deleting some water in a map. Minerals and fish were also deleted. Before deleting the water: After deleting the water: I don't think this is a big issue, but thought I'd mention it. Top Quote |
kaputtnik |
Posted at: 2018-02-21, 08:17
Checked it and this happens also when removing other resources, e.g. removing coal removes also water. Wrote a bug report. Which widelands version are you running? Thanks for reporting Edited: 2018-02-21, 08:44
Top Quote |
Speter Topic Opener |
Posted at: 2018-02-21, 11:47
I am running build 19. Top Quote |
Solstice_s_Return |
Posted at: 2020-02-04, 08:50
Contrary to this finding, I found that bug helpful when I did fine tuning of my last map. So I didn't consider it a bug. Top Quote |
GunChleoc |
Posted at: 2020-02-07, 09:57
The bug report is now at https://github.com/widelands/widelands/issues/3174 Busy indexing nil values Top Quote |
knarf |
Posted at: 2024-01-14, 23:39
Trying to look into it I noticed a few things. Please correct me if I am wrong: I am new to the code:
Whether this is a bug or a feature is now largely a matter of expectations. Consider a field which currently holds resource A, but could also hold resource B instead. Now you tell the editor to set the amount of resource B on that field to some non-zero value. You could
Here, I tend towards 1. Now consider the same situation, but you tell the editor to set the amount of resource B to 0. Again, you could
Here, I tend towards 2 (but the editor seems to do 1.) What we could (and in my opinion, should) do, is to make sure that setting resource B to 0 does not affect resource A if B is already at 0 (resource A is currently set). I am not sure if this solves the described problem, but it seems to me that it does, and it might be not so difficult to implement (but I have not tried). What do you think? Edited: 2024-01-14, 23:42
Top Quote |
kaputtnik |
Posted at: 2024-01-15, 11:14
One can expect that a node can hold both water and fish. But what about other resources like coal and iron? I think no one would expect that a node can hold iron and coal (plus gold?) simultaneously. Placing resources is likely done with a bigger toolsize so each click applies resources to many nodes. If a node can hold more than one resource there will be overlapping areas containing coal and iron on one node. And which resource should a geologist find then? Additionally some terrains "contain" water or fish with a default amount, so placing such a terrain means there is already water or fish. One can't see this though, it is also currently not possible to get those amounts without using some lua code (or digging through the source code). Placing water and fish is therefor mostly useless, except you want more than the default amount of this resource being available. Top Quote |
hessenfarmer |
Posted at: 2024-01-15, 11:21
regarding water and fish. from a ressources point of view water means Ground water (for building wells). Top Quote |
knarf |
Posted at: 2024-01-15, 21:20
Why not? I wondered whether that is the case, actually. There is not really a logical reason why a mountain could not contain both. Whether this is intended would be up to the map maker. But this argument is mood anyway if, as I still read the code, a field can only contain one resource. Btw: is the latter true: does the code only support one resource type per node?
There are a few possibilities. It could be a random one, with probability based on the actual amount. Or it could be the one with the maximum amount (and random or something else for ties). It wouldn't be that unreasonable.
I didn't know. Is there a reason? Without thinking hard about it, this does sound like a bug to me. Wouldn't I want to see all that info in the editor?
What if I want the opposite: how do I remove resources from the default amounts if I don't see them in the first place? But to come back to the original problem of this thread: here, removing one resource seems to remove another, which sounds like something that is not wanted and which we could improve upon. Top Quote |
kaputtnik |
Posted at: 2024-01-16, 12:10
Sorry, real world explanation: The genesis of coal is totally different from the genesis of iron, gold, or stone. If you hear something about a mine you will ever hear "The coal mine, the iron mine, the gold mine, the diamond mine" So from a human perspective there are only mines of one type. Yeah, widelands is not the real world, but it should not be too different, imho.
You might want to read this discussion
Yes, definitely. Maybe there can be some rule, e.g.
So water can't be placed directly at the border of water terrains and can't be placed at the border of mountain terrains. I think this would not change any game mechanics and would not have an effect on game play. Top Quote |