bugFreeciv - Bugs: bug #20038, Transform to water

 
 
Show feedback again

bug #20038: Transform to water

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Wed 08 Aug 2012 09:44:09 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 09 Aug 2012 10:48:38 PM UTC, comment #4:

> Perhaps make the transformed tile conditional on whether it is
> adjacent to Lake/River or Ocean.

This ticket was originally about trying to find a general solution to have that effect without hardcoding assumptions about rulesets into the game engine.

> If there is no water near then it should default to Lake.

Of course in default rulesets this isn't possible -- ocean_reclaim_requirement means there has to be some water (not even a river) nearby. But of course rulesets could waive that, in which case this case needs worrying about.

As it happens, cazfi's solution (now in patch #20043) has this property.

> there is probably going to be an occasional corner case where
> both kinds of water are adjacent.

That was precisely the corner case that patch #3478 was dealing with -- if transforming a tile to water that had Ocean and Lake on either side of it, flood one to the other.

More interesting is the corner case where terrains that don't "flood" each other (ocean & deep ocean) are both present.

Jacob Nevins <jtn>
Project Administrator
Thu 09 Aug 2012 10:40:02 PM UTC, comment #3:

> Simplest solution, possibly something we implement at least for
> the time we wait your model [...]

Neat idea. I've raised it separately as bug #20043, so we can keep this ticket for noodling about with longer term ideas.

Jacob Nevins <jtn>
Project Administrator
Thu 09 Aug 2012 07:20:33 AM UTC, comment #2:

I like Cazfi's idea, but let me throw in another possibility. Perhaps make the transformed tile conditional on whether it is adjacent to Lake/River or Ocean. If there is no water near then it should default to Lake. But maybe it is more expensive to check all surrounding tiles, and there is probably going to be an occasional corner case where both kinds of water are adjacent.

David Lowe <doctorjlowe>
Wed 08 Aug 2012 10:03:36 PM UTC, comment #1:

Simplest solution, possibly something we implement at least for the time we wait your model, would be to
1) Fix flooding to happen also towards the transformed tile if it's freshwater and there's adjacent ocean tile
2) Make transform_to in all supplied rulesets (and document for custom ones) "Lake"

- If one then transforms next to lake -> (s)he gets lake
- If one transforms next to ocean -> (s)he gets lake that is then immediately flooded with ocean from adjacent tile. Temporary lake should not be user-visible at any point.

Marko Lindqvist <cazfi>
Project Administrator
Wed 08 Aug 2012 09:44:09 PM UTC, original submission:

Currently for land-to-water transformations, as with others, you have to specify a specific transform_result terrain. This means you can't arrange that expanding a lake gets you more lake whereas receding a coastline gets you more ocean.

Prior to patch #3478 this simply led to discontinuities in water type. Now it means that any attempt to expand a lake turns the whole thing to Ocean, via flooding, even if it's still inland.

What you really want is some way of expressing in the ruleset that you want to transform to an appropriate kind of water, with the exact transformation depending on the surroundings.

Details to work out:

  • How to express this in ruleset?
    • transform_result="Water" (potentially clashing with existing terrain name in modpacks)?
    • just trigger the selection behaviour on any land-to-water transformation, ignoring the precise transform_to terrain? (Other special behaviour is already triggered, such as checking for sufficient surrounding water tiles.)
  • What to do if multiple "water" types surround tile?
    • Obviously in cases where flooding happens, then the flooding type wins.
    • Use most_shallow_ocean()?
    • Perhaps we want to define a partial order on ocean terrains showing which wins over and/or floods which, replacing the current fixed one of !TER_FRESHWATER > TER_FRESHWATER.
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 doctorjlowe (Posted a comment)
  • -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):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 09 Aug 2012 10:40:02 PM UTCjtnPlanned Release2.5.0=>
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup