patchFreeciv - Patches: patch #3832, Allow BaseFlag and RoadFlag in...

 
 
Show feedback again

patch #3832: Allow BaseFlag and RoadFlag in reqs lists

Submitted by:  Emmet Hikory <persia>
Submitted on:  Thu 04 Apr 2013 06:28:02 AM UTC  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 05 Jun 2013 08:39:03 AM UTC, SVN revision 22937:

Added "RoadFlag" and "BaseFlag" requirement types.

Patch by Emmet Hikory

See patch #3832

(Browse SVN revision 22937)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 09 May 2013 08:04:03 AM UTC, comment #5:

Updated patch applies over patch #3879, with the use of preq->present.

(file #17937)

Emmet Hikory <persia>
Project Member
Mon 08 Apr 2013 02:43:41 PM UTC, comment #4:

Updated patch applies over patch #3841 and includes the !preq->negated documentation for baseflag/roadflag requirements. Also includes the Adjacnet fix (inherited from rebasing above patch #3836).

(file #17717)

Emmet Hikory <persia>
Project Member
Fri 05 Apr 2013 02:46:23 AM UTC, comment #3:

I realise on re-reading my last post that I may not have outlined why this might be interesting at all. Apologies for that.

The ultimate goal was to be able to have different types of requirements for move_cost=2 roads, depending on terrain, to have the move_cost=1 road depend on the presence of any of the move_cost=2 roads, and to have the move_cost=0 road depend on the move_cost=1 road. Another way in which I tried to use this (before discovering it didn't work) was to define a road "Dredging", which could be applied to any river or canal (different canals have different source requirements: oceanic, river, canal), and changed the nativity so that one more step of the several different naval unit classes could use it.

Trying to do this in only 16 roads without roadflags isn't possible (as one needs to define different roads for every possible set of conditions: flags let one create OR-like models without real disjunctive reqs lists), especially if one also tries to have some move_cost=3 roads for particularly troublesome terrain. Yes, this can be simulated to some degree with high costs to build move_cost=2 roads in some terrains, but it has always bothered me that when it took a long time to build a road, follow-up units received full penalties for the tile until it was complete.

Emmet Hikory <persia>
Project Member
Fri 05 Apr 2013 01:52:18 AM UTC, comment #2:

Indeed, this doesn't help as-is, but I thought it was a good chunk to commit while I was learning how the custom flag feature worked. That said, if you believe it to be a 2.6 feature, I'll not rush on that, as it becomes obsolete with extras.

Emmet Hikory <persia>
Project Member
Thu 04 Apr 2013 10:27:22 PM UTC, comment #1:

Seems straightforward. The only issue I noticed was that you had copypasted typo "Adjacnet" from previous line in README.effects change.

But this is currently of quite limited usability. Road flags "River" and "Native" are the only ones I can see some ruleset wanting to use as requirement.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 04 Apr 2013 06:28:02 AM UTC, original submission:

While building my road and base definitions, I discovered that it didn't work if I added extra flags and then tried to use these in the requirements lists. Checking the documentation in README.effects, this appeared not to be clearly a bug, but it was still something I wanted. The attached patch allows these fields as requirements: although large, the vast majority is just copies of other bits of code with the names changed (I generally matched the TerrainFlag code, although because of iteration concerns, often lifted bits from the Base and Road code).

Note that this still doesn't allow definition of custom road or base flags, so my original goal remains unfufilled, but this seemed a good point to submit the patch, as it works in the current state (and could be used to implement differing requirements for "River" vs. not-"River" using the flag rather than the road name, if one wished: perhaps useful for rulesets with multiple types of river).

Emmet Hikory <persia>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17937:  baseflag-roadflag-reqs+refresh.patch added by persia (28kB - application/octet-stream)
file #17717:  baseflag-roadflag-reqs+nreqdocs.patch added by persia (28kB - application/octet-stream)
file #17673:  baseflag-roadflag-reqs.patch added by persia (26kB - application/octet-stream)

 

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 persia (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):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 05 Jun 2013 08:39:14 AM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sun 02 Jun 2013 09:05:22 PM UTCcazfiAssigned toNone=>cazfi
    Thu 09 May 2013 08:04:03 AM UTCpersiaAttached File-=>Added baseflag-roadflag-reqs+refresh.patch, #17937
    Mon 08 Apr 2013 02:43:41 PM UTCpersiaAttached File-=>Added baseflag-roadflag-reqs+nreqdocs.patch, #17717
    Thu 04 Apr 2013 10:27:22 PM UTCcazfiStatusNone=>Ready For Test
      Planned Release=>2.6.0
    Thu 04 Apr 2013 06:28:02 AM UTCpersiaAttached File-=>Added baseflag-roadflag-reqs.patch, #17673
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup