Summary: Hidden resources which can be revealed by tech
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Thu Jan  2 16:01:06 2014
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



(We should have a ticket status "Half-Baked".)

It would probably be fairly easy to make it so that a particular kind of
resource would only be revealed to a player when they learn a certain
technology. This would be particularly useful for "strategic" resources
(required for units/buildings/etc).

Basic implementation would probably be fairly simple -- just don't send the
resource to the client until its requirement is known, and evaluate tile
output and requirements in the context of player knowledge.
Once a resource is known to exist on a tile, the player gets to keep that
knowledge forever, even if they lose the prerequisite.

When the relevant tech is learned, we could either reveal the resource in any
tile known by the player and add it to their private map (patter: scholars go
over their records looking for tales of yellow rocks on discovery of uranium),
or require re-exploration of terrain to find the resource -- this could be a
ruleset (per-resource) choice.
* The latter has usability issues -- how does a player track which bits of
terrain have been re-surveyed?
** Possible idea: update the map generator to optionally arrange that every
tile of a certain type has either a "helium-3" or "no helium-3" resource, both
revealed by the same tech, the latter having no sprite; and add a map overlay
to the client highlighting areas which don't have any known resources.
** This would also allow resource surveys to be done by specialist units in an
explore-type mode, if that were desired.
** Need to think about what happens if there are multiple resources for a tile
revealed at different times; perhaps we have to forbid that.
* In general, in both cases strategic resources would benefit from extra
client UI to find resource locations on the map, but that's outside the scope
of this ticket.

Obvious generalisation questions:
* Should the requirement be hardcoded to be a tech, or can it be a generalised
requirement? If the latter, then probably certain requirement types will never
be handled correctly.
* Should it be limited to resources, or can it be extras too? Resources have
certain restrictions that make this easier to implement. (Not sure what future
plans are for resources vs extras.)

There are several wrinkles with this that would need ironing out. Some I've
thought of:
* This makes player maps more valuable. I don't think we need a new "resource
map" diplomatic gift, but the AI may need to evaluate the value of world maps
more carefully in diplomacy, considering shared vision etc.
* This would interact badly with extra/building requirements on the *absence*
of a certain resource ("you can't build a mine here, but I can't tell you
why"). Can we detect and disallow this at ruleset loading time?
* All the requirement machinery would need updating to reflect the uncertainty
of presence of a resource on a tile, to avoid the server leaking information
about hidden resources.
* (Probably more I've already forgotten.)

I'd be tempted to have a go at this for 2.5, but (a) I have no time (b) stuff
will clearly come out of the woodwork (c) it'll probably be much simpler if we
can rely on all the 'extras' work having been done first.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to