Opened 11 years ago

Closed 10 years ago

#1822 closed defect (fixed)

[PATCH] Batch-trained traders fail to arrive at market rally point

Reported by: zoot Owned by: leper
Priority: Should Have Milestone: Alpha 16
Component: UI & Simulation Keywords: patch wip
Cc: Patch:

Description (last modified by zoot)

Steps to reproduce:

  1. Build two markets, market A and market B.
  2. Draw a zig-zagging line of several rally points from market A to market B.
  3. Train a batch of traders in market A.

What happens:

The batch of traders follow the rally points, but halt at the second-to-last point (the one just before the destination market).

What should happen:

The traders should arrive at market B and continue walking back and forth between the markets.

http://trac.wildfiregames.com/raw-attachment/ticket/1822/screenshot0086.jpg

Attachments (2)

screenshot0086.jpg (85.8 KB ) - added by zoot 11 years ago.
Batch of trader stopped at second-to-last rally point.
1822.patch (2.5 KB ) - added by leper 11 years ago.
WIP fix for #1822 and #1821

Download all attachments as: .zip

Change History (9)

by zoot, 11 years ago

Attachment: screenshot0086.jpg added

Batch of trader stopped at second-to-last rally point.

comment:1 by zoot, 11 years ago

Description: modified (diff)

by leper, 11 years ago

Attachment: 1822.patch added

WIP fix for #1822 and #1821

comment:2 by leper, 11 years ago

Component: Core engineUI & Simulation
Keywords: patch added
Milestone: BacklogAlpha 14
Summary: Batch-trained traders fail to arrive at market rally point[PATCH] Batch-trained traders fail to arrive at market rally point

The patch works and fixes the issue, but the code is sort of ugly so I will not commit this patch as it is now. One of the problems is that SetupTradeRoute depends on the entity to have the Trader component, which for the formation controller isn't true.

Moving the logic from SetupTradeRoute to Order.Trade could work, but would make queued trading (move first, then start to trade) a bit strange.

I suppose fixing this would have some code overlap with the first point of #1207.

comment:3 by Kieran P, 11 years ago

Milestone: Alpha 14Alpha 15

comment:4 by historic_bruno, 11 years ago

Owner: set to leper

comment:5 by historic_bruno, 11 years ago

Keywords: wip added

comment:6 by leper, 10 years ago

Milestone: Alpha 15Alpha 16

comment:7 by mimo, 10 years ago

Resolution: fixed
Status: newclosed

In 14697:

allow the possibility to define route with waypoints when doing trade, fixes #1207, #1821 and #1822

Note: See TracTickets for help on using tickets.