Jump to content

Trade ships doesn't work


Kern
 Share

Recommended Posts

Hello there !

I'm glad to join the 0AD members on that forum. Sad that my first post is a bug report, but I hope someday I will be able to help a bit for development !

I warn you, i'm a young french web developer, my english is very poor ! I apologize now for all the faults I will do.

Now let's speak of the main subject :

I played Britons for testing the naval trading (i'm fond of the caravans system of this game) and then my joy turn to ashes in my mouth : when the ship arrives to destination, nothing happens and the ship stops !

The departure works fine, the ships goes away from the origin's harbour and find its path to the destination. The moment when the bug happens is the arrival to the destination.

I didn't see this bug reported in the last pages, that's why I come to you to report it !

Link to comment
Share on other sites

This depends highly on your map. I've also seen it once, a year ago, but was unable to reproduce it very well. It seems to depend on the pathfinder (which is to be completely rewritten). If the dock is on a sort of terrain that's hard to reach, the ship sometimes can't reach it. It keeps approaching, but never gets there, so it can never return.

That said, unless it happens very often, we won't fix it until the pathfinder is rewritten.

Link to comment
Share on other sites

I see this sometimes too. Trade ships do their job for a while then they just stop. I believe this happens when there is too many ships having one dock as an origin\destination market (or there are other ships near that dock). If you have few ships trading normally works fine.

Link to comment
Share on other sites

If you see this happen, enable the developer overlay (Alt+D), select "Display selection state", and select the unit that appears stuck. You should see its UnitAI state listed about halfway down the list. That can help in debugging exactly what's going on. You can also provide the commands.txt from the game (in the game's log directory, see GameDataPaths). A saved game might even help.

Link to comment
Share on other sites

Today i tried to reproduce the bug on small/tiny Continent maps and it was being reproduced quite well even with one trade ship. And a batch of 10 ships got stuck at the origin market and never moved.

Attaching files for a one ship case (or should i post it on Trac?)
The state of the ship was APPROACHINGFIRSTMARKET.

trade_ships.zip

Link to comment
Share on other sites

Right, found it. It's an issue we had before with garrisoning, constructing, and now with trading.

The point where trading can happen only depends on the target obstruction size, and not on the trader. There's an arbitrary range added (2m for traders, 10m for ships). But a ship has an obstruction radius of 8, which is (for performance reasons), calculated as an axis-aligned square of 16x16m. Thus when the ship arrives at a 45° angle (relative to the terrain grid), it can't come closer than 8*sqrt(2) ~= 11.3. So it can never reach that 10m requirement.

I'll make a ticket with the patch added.

Made the ticket: http://trac.wildfiregames.com/ticket/2556

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Awesome find. The first time I found a topic of you via trac. Last time happened for Philips pathfinder.

I like it's automatic now. I wonder why one should be able to mod MaxDistance of a trader? To get damaged ships out of service, there should be other ways than reducing the MaxDistance parameter ...

thx for fixing.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...