patchFreeciv - Patches: patch #4610, AI won't build sea-only workers

 
 
Show feedback again

patch #4610: AI won't build sea-only workers

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Sun Mar 16 02:21:21 2014  
 
Category: aiPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0, 2.6.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.

 

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

Mon Apr 21 09:59:54 2014, comment #8:

Aha! I see now. Yes, this is critical infrastructure for patch #4658. Thanks for the clarification.

Emmet Hikory <persia>
Project Member
Mon Apr 21 06:02:28 2014, comment #7:

Patch added concept of role unit filter. The single filter included can be used to select land or sea moving (both moving units being suitable for both) units.

You probably want to rework the filter for complex nativity, and callers must be changed to request correct kind of unit (instead of current hardcoded "Land")

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Apr 20 21:19:03 2014, comment #6:

I encountered this patch again this weekend, and while I accepted the argument when it was posted, I'm now a bit confused about the implementation. Is this implementation based on some concept of how different units would be built for where they are needed, or is this just a quick workaround and we still need to figure out how to sensibly handle cities building the right workers?

Emmet Hikory <persia>
Project Member
Wed Apr 16 07:17:19 2014, comment #5:

> Shouldn't the land settlers patch also take into account other
> units that have the settlers flag


That's exactly how it knows the unit to be "Worker" type.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed Apr 16 06:54:50 2014, comment #4:

Shouldn't the land settlers patch also take into account other units that have the settlers flag e.g. migrants.
see http://gna.org/patch/?4560

Anonymous
Tue Apr 15 20:09:54 2014, SVN revision 24768:

AI never builds sea-only workers. As we don't have worker selection mechanism
fine-grained enough to select workers based on where they are needed, disallowing
sea-only workers completely is better than ending up using only them in some rulesets,
meaning no worker would work land tiles. Amphibious workers working both land and
sea are still supported.

See patch #4610

(Browse SVN revision 24768)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Apr 15 20:09:47 2014, SVN revision 24767:

AI never builds sea-only workers. As we don't have worker selection mechanism
fine-grained enough to select workers based on where they are needed, disallowing
sea-only workers completely is better than ending up using only them in some rulesets,
meaning no worker would work land tiles. Amphibious workers working both land and
sea are still supported.

See patch #4610

(Browse SVN revision 24767)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun Mar 16 04:17:15 2014, comment #1:

Good to know, because there are sea-only workers in civ2civ3 rules too.
I gave the flag "settlers" to transports so they can clean up pollution on oceans (the only working activity available on sea apart of building buoys), and I did it mainly to help the ai.
Please, let me know if this can be problematic for the ai.

David Fernandez <bardo>
Sun Mar 16 02:21:21 2014, original submission:

Once sea-only worker units become avilable in my ruleset, AI failed to build any workers capable of moving on land. That's because it blindly takes the latest available worker type, and that happened to be the sea-only one.

Attached patch improves the situation a bit by making sure that AI never builds sea-only workers. If presented with a choice between land-only and sea-only workers, it will build land-only ones.

This patch is not as counter-productive as one may think ("why don't you really fix it?") as almost all of the code added is about building the framework for AI to select role units based on where they can move. That's certainly needed in full fix to make AI to build different units based on where they are needed.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20350:  LandSettlers.patch added by cazfi (6kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by bardo (Posted a comment)
  • -unavailable- added by cazfi (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

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Apr 15 20:10:11 2014cazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sun Mar 16 03:47:29 2014cazfiPlanned Release2.6.0=>2.5.0, 2.6.0
    Sun Mar 16 02:21:21 2014cazfiAttached File-=>Added LandSettlers.patch, #20350
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup