No way to remove default resources in the editor.

Bug #969873 reported by Angelo Locritani
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Low
Unassigned

Bug Description

It seems that there's no way to force zero resources on a tile, because if you don't add resources inside the editor default applies.
For example, in greenland worlds, defining no fishes for water tiles let the default of 4 fishes apply.
The same for water.

Linking a branch that add possibility to see current resources of a tile in debug window

Tags: editor

Related branches

Revision history for this message
Astuur (wolfsteinmetz) wrote :

You're right it seems - what I thought might work didn't.
Can't set any water tiles to 0 fish.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

This has a merge proposal attached which was merged a year ago. Is this fixed and released in build18?

(And if so, can we retroactively tie it to an already released milestone somehow? That would be the most correct approach probably.)

Changed in widelands:
importance: Undecided → Low
status: New → Incomplete
tags: added: editor
Revision history for this message
SirVer (sirver) wrote :

The merge proposal did not change anything here, so this is still confirmed and important.

Changed in widelands:
status: Incomplete → Confirmed
summary: - no way to force zero resources on a tile?
+ No way to remove default resources in the editor.
Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
TiborB (tiborb95) wrote :

I just played with this a bit and I can not see what is this about. Resources amount as reported by field->get_resources_amount() can be set to zero, and DBG window for a field (in game) confirms this.

Revision history for this message
wl-zocker (wl-zocker) wrote :

I just tested it in r7261. Place a lake in the editor, put no fish in there. Start a game on the map, build a fisher -> he finds fish. I have no debug build available, but there is fish in the lake.

Revision history for this message
TiborB (tiborb95) wrote :

I think that when somebody creates map he/she adds fishes manually and default values does not matter much.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

I agree that it must be possible for a map maker to explicitly set the number of resources on a field to zero - i.e. no fish in a lake.

Changed in widelands:
status: Expired → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

Can some one explain what the default_resource_amount is good for at alll? From my understanding they are "just there" but nothing else depends on it (yet).

Revision history for this message
GunChleoc (gunchleoc) wrote :

I guess the original idea was to save map editors some time?

If we remove it, it might break some old maps - that might be taken care of by map loading compatibility code though.

Revision history for this message
kaputtnik (franku) wrote :

Yes, better show them in the info tool, as first step. So a map maker has at least the possibility to examine the default amount.

Removing could be implemented if we have overlays for resources: https://bugs.launchpad.net/widelands/+bug/778540

Revision history for this message
kaputtnik (franku) wrote :

Another idea:

1. Remove default amounts
2. Add a check to the editor which checks for some things and if the check fails, open a window showing what is missing.

E.g.: 'The map does not contain any fish/water/coal/gold/players/..'

The check can be executed automatically on map save, or with a new button 'Check playability' (maybe in the Save map dialogue).

GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build21-rc1
Revision history for this message
hessenfarmer (stephan-lutz) wrote :

In the empire 4 scenario I had the same problem. I solved it by removing the ressources via lua script.

My preferred solution would be:
1. Having a button "apply default ressources" for each category in the editor to save some work
2. Apply them for older maps in game as now using some compat code

Revision history for this message
GunChleoc (gunchleoc) wrote :

The applying for older maps is non-trivial, because we don't have versioning for maps on the website yet.

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.