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 16 Mar 2014 02:21:21 AM UTC  
 
Category: aiPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0, 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)

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

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

Emmet Hikory <persia>
Project Member
Mon 21 Apr 2014 06:02:28 AM UTC, 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 20 Apr 2014 09:19:03 PM UTC, 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 16 Apr 2014 07:17:19 AM UTC, 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 16 Apr 2014 06:54:50 AM UTC, 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 15 Apr 2014 08:09:54 PM UTC, 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 15 Apr 2014 08:09:47 PM UTC, 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 16 Mar 2014 04:17:15 AM UTC, 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 16 Mar 2014 02:21:21 AM UTC, 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.

     

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

     

     

    Follow 5 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup