bugFreeciv - Bugs: bug #22005, Path finding problem when...

 
 
Show feedback again

bug #22005: Path finding problem when establishing trade route from a Transport

Submitted by:  Sveinung Kvilhaugsvik <sveinung>
Submitted on:  Fri 02 May 2014 04:16:17 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Duplicate
Assigned to: Sveinung Kvilhaugsvik <sveinung>Open/Closed: Closed
Release: TRUNKOperating System: None
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.

 

Wed 11 Jun 2014 06:51:40 PM UTC, comment #4:

This was fixed by patch #3901 (svn revision 24881)

I don't see why the use of Marines|AttFromNonNative should be ruleset enforced.
Not that it matters now that the bug is fixed but here is how I reasoned (if you are curious): Without Marines|AttFromNonNative the unit would still be able to establish a trade route from a transport on non native terrain (by using the arrow keys). If tested using goto this bug + the ability to remove Marines|AttFromNonNative would give an illusion that the rule was configurable. Forcing the flag to be there was meant as a temporary work around until it became ruleset configurable for real.

Sveinung Kvilhaugsvik <sveinung>
Project MemberIn charge of this item.
Fri 02 May 2014 11:00:05 PM UTC, comment #3:

Aside from patch #4671 discussion, I don't see why the use of Marines|AttFromNonNative should be ruleset enforced. For compatibility, the existing rulesets should continue to offer the same functionality, but I do not see the value of both extracting this from the engine and requiring rulesets to have the restriction. If the intent is to have every TradeRoute unit able to establish a TradeRoute from non-native to native, then the engine should ignore the value of the flags and just permit the behaviour. If the intent is to make this ruleset configurable (so that some TradeRoute units may establish traderoutes from non-native terrains, and others may not), then the ruleset sanity check prevents this configuration.

Emmet Hikory <persia>
Project Member
Fri 02 May 2014 05:35:02 PM UTC, comment #2:

> I object :-)

I take this an objection to patch #4683 and Alternative 3 in patch #4671 as well.

> And it shows that there is a lack in path finding module which can be fixed easily.

Could you comment on the discussion in patch #4671 when you have time?

Sveinung Kvilhaugsvik <sveinung>
Project MemberIn charge of this item.
Fri 02 May 2014 04:57:04 PM UTC, comment #1:

> Unless anyone objects to it I'll commit both.


I object :-)

I don't think "Marines" and "AttFromNonNative" are supposed to be used for anything else than attack. And why not units able to establish trade route wouldn't be able to attack too ?

If using arrow keys works, that mean that these flags are not needed to establish a trade route (or the current behaviour should be considered as wrong). And it shows that there is a lack in path finding module which can be fixed easily.

pepeto <pepeto>
Project Member
Fri 02 May 2014 04:16:17 PM UTC, original submission:

It is possible to establish a trade route from non native terrain. It is possible to establish a trade route to an enemy city even if it is occupied. Ordering a Caravan in a Transport to establish a trade route to an occupied enemy city on a neighbor tile don't work. Ordering the unit to establish a trade route using the arrow keys work as expected.

The first attached patch (0003-All-units-that-can-establish-a-trade-route-can-act-f.patch) works around this by giving all units capable of establishing a trade route the "Marines" unit flag or the "AttFromNonNative" unit class flag. This makes it use the existing support for those flags in the path finding code.

The second attached patch (0004-Force-Marines-when-TradeRoute.patch) applies on top of the first. It makes it more extreme by forcing all units that can establish a trade route to have "Marines" or "AttFromNonNative". Since this may be controversial I separated it from the other. Should it be made configurable if establishing trade routes can be done from non native, something I hope to do, the checks will obviously be removed again.

Unless anyone objects to it I'll commit both.

Sveinung Kvilhaugsvik <sveinung>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

 

Digest:
   patch dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by pepeto (Posted a comment)
  • -unavailable- added by sveinung (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 11 Jun 2014 06:51:40 PM UTCsveinungStatusIn Progress=>Duplicate
      Open/ClosedOpen=>Closed
    Fri 02 May 2014 05:35:02 PM UTCsveinungStatusReady For Test=>In Progress
    Fri 02 May 2014 04:36:51 PM UTCsveinungDependencies-=>Depends on patch #4683
      Dependencies-=>Depends on patch #4682
    Fri 02 May 2014 04:16:17 PM UTCsveinungAttached File-=>Added 0003-All-units-that-can-establish-a-trade-route-can-act-f.patch, #20629
      Attached File-=>Added 0004-Force-Marines-when-TradeRoute.patch, #20630
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup