patchFreeciv - Patches: patch #4390, Map latitude requirement for...

 
 
Show feedback again

patch #4390: Map latitude requirement for effects

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Thu 02 Jan 2014 03:12:04 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 25 Aug 2014 01:31:25 PM UTC, comment #2:

> This does mean that scenario authors can't specify how latitude
> is to be evaluated for their scenarios. A fully general
> solution would be to allow latitude to be specified per-tile,
> but that's probably not worth the hassle.

A simple solution would be to have a scenario property 'latitude', which defaults to the sentinel value used by map generation without latitude, but can be manually set to a single value by scenario authors (so a Scandinavian scenario might be devoid of Solar Plants).

Might want some UI for latitude if ruleset effects depend on it, maybe in the middle-click popup (plus perhaps a way to hide it for rulesets where it doesn't matter, to avoid clutter).

(I'm ignoring the possibility of a longitude requirement. About the only use for it I can think of would be a Ragged Astronauts scenario.)

Jacob Nevins <jtn>
Project Administrator
Thu 02 Jan 2014 03:19:58 PM UTC, comment #1:

> A fully general solution would be to allow latitude to be
> specified per-tile,


I were thinking a bit similar idea (scenario map "area id") just today, but at the moment decided that we shouldn't be adding more only rarely used fields to tile structure as there can be a lot of tiles eating memory. Though this could use information from master tile directly - no need to define it separately for player tiles (map size x number of players tiles)

Marko Lindqvist <cazfi>
Project Administrator
Thu 02 Jan 2014 03:12:04 PM UTC, original submission:

It would probably be fairly easy to add a new requirement type of "MaxLatitude", such that the requirement is only met for tiles/cities/etc below a certain latitude.

For instance, Solar Plants might only be buildable below 45° latitude, not in polar regions.
(If I get round to this, would anyone object to me adding this to the experimental ruleset?)
Similarly if something is only appropriate in the polar regions, could use present=FALSE in requirement to negate it.

Latitude would be defined as the map generator defines it (so generalised appropriately for torus worlds, etc).

Not sure whether latitude should be unsigned (easier for ruleset authors but less expressive) or signed (requires more clauses in rulesets, but allows things to only happen at the north pole, should you wish -- polar bear special at north pole, penguin special at south? ;)

Wrinkle: would need some way to control what happens when there's no defined latitude (flat maps, scenarios, alltemperate?). Can't just defined latitude=0 or =90, as that may make e.g. Solar Plants completely unusable in a given scenario.
Probably arrange that latitude evaluates to something outside the normal range (say -91) for such maps, and document this so that ruleset authors decide what the "default" behaviour is by specifying the behaviour in that range.

This does mean that scenario authors can't specify how latitude is to be evaluated for their scenarios. A fully general solution would be to allow latitude to be specified per-tile, but that's probably not worth the hassle.
More likely is probably a scenario option to specify how latitude should be calculated.
(Need to check what the default behaviour would be -- would it just depend on WRAPX and WRAPY? If so, that's probably good enough to start with, as it'll do the right thing for world-map scenarios.)

Jacob Nevins <jtn>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

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

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup