bugFreeciv - Bugs: bug #20805, Bless resource probability hack?

Show feedback again

bug #20805: Bless resource probability hack?

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat May 11 12:39:05 2013  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: 3.0.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Fri May 17 17:17:59 2013, comment #2:

The most versatile would probably be having three different weights: one for general frequency of a specific resource, one for a general resource frequency in a specific terrain and one for the frequency of a specific resource in a specific terrain. De-dupling could be problematic if two resources with the same name are allowed to have different values.
In fact, it is currently even possible to have two buildings with the same name but different requirements, build cost and upkeep, in which case the values for the first one is shown in the help for the second one, at least with the Gtk2 client. I didn't test to see what happens if one tries to build another improvement with a replaced_by tag pointing to that name.

Micke <mss_8734>
Sat May 11 22:16:13 2013, comment #1:

If allowing ruleset authors to specify the frequency of specific resources, it would be nice to also allow control over the relative density of resources in a given terrain, so one could indicate a given terrain only has 75% average resource density with something like:

Emmet Hikory <persia>
Project Member
Sat May 11 12:39:05 2013, original submission:

At http://freeciv.wikia.com/wiki/User_talk:Yethic is described an "undocumented feature" whereby ruleset authors can influence the relative probability of resources showing up on terrain by repeating the resource type in the terrain definition. This technique can also be seen in the ruleset attached to bug #20792.

This seems harmless and useful. Should we bless / document it?

One glitch with using this technique currently is that the resource name is repeated in the online terrain help (which is how I noticed it was in use). This would be easy to fix by de-duplicating.

Alternatively (or for trunk) we could invent a syntax to specify probability, say something like:

That would allow the transform mountains+gold to hills+gold problem to be solved too:

Jacob Nevins <jtn>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by mss_8734 (Posted a comment)
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jan 21 04:23:00 2016cazfiPlanned Release=>3.0.0
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup