Opened 6 years ago

Closed 6 years ago

Last modified 8 months ago

#2311 closed enhancement (fixed)

[PATCH] New way to manage trade

Reported by: mimo Owned by: mimo
Priority: Nice to Have Milestone: Alpha 16
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

There are some points in trade management which could be improved:

  • when you start a new trade route, you have to individually set the trading goods of each trader, which is annoying when you want to use rally-points to set trade routes.
  • if you want to change your trade priorities, you have to go after all of your traders to change their trading goods.
  • if some traders have been killed for example, it becomes difficult to know which are the goods still being traded and which are the ones for which we should create new routes (this last point could nonetheless be improved by adding display of statistics about trade).

All these points would be cured with a central management of trade priorities. So I propose to have a new trade window in which we would select which goods we want to trade (and with which percentage if several) and the traders would take their trading goods from it, i.e. they would change goods at each travel cycling on the needed ones. In that approach, we don't need to care anymore on the number of traders trading each goods as this would be dynamically determined by the player according to its needs.

I've attached a functionnal WIP patch for tests. Some pending points:

  • The gui of the trade window can certainly be improved. But this could be for a later ticket.
  • The location of this new trade window: my first proposition was in the main window (as the diplomacy window). Mythos proposed to have it available from the market. both ways are implemented in this patch, for comparison. In the market approach, it's done as a command button (because there was no other place available) which may be hard to find for a new player.
  • I've used the economics.png icon, but a new one more fitted would be good.

Attachments (1)

trade.diff (23.5 KB) - added by mimo 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by sanderd17

I have tested your patch a bit. I think having the button in the market is the clearest, as that's the traders' goal. OTOH, I found myself thinking it was the division for that market, for some reason.

Maybe it should be market based, so that every trader that arrives at the market drops the resources, and gets new resources assigned according to that market (it would still be easy to keep an eye on it, as the number of markets is a lot smaller than the number of traders).

When playing in teams, you could also set the resources for your team mate like that (if he goes via your market). There could even be given a bonus if the trader switches goods (like real trading, one good for another). So if two players play, they have a bonus if they take different resources. This could create interesting dynamics in a team when playing on a map with some scarce resource.

I'm just spitting ideas here, the patch you provided is certainly a lot better than the current trader handling.

Changed 6 years ago by mimo

Attachment: trade.diff added

comment:2 Changed 6 years ago by mimo

I've uploaded a new version changing the way to set the tradings goods (via Commands rather than via guiInterfaceCall) so that the AI could also use it.

sanderd17: I'm not sure it is worth to set goods independantly for each market because it's just a probability and there is no reason that it changes from one market to the other. But what can be done is that the goods are chosen according to the preference of the market's owner and not the trader's owner as I have now. So when trading with an ally, you would return back with your ally's preferred goods. This could help him as he will receive part of the gain, but on the other side, it may refrain you from trading with him if his choice does not suit you. So i don't know what's the best solution.

comment:3 in reply to:  2 Changed 6 years ago by Tom Brewe

Replying to mimo:

So when trading with an ally, you would return back with your ally's preferred goods. This could help him as he will receive part of the gain, but on the other side, it may refrain you from trading with him if his choice does not suit you. So i don't know what's the best solution.

Maybe increasing the bonus for trading with your ally could do the job?

comment:4 Changed 6 years ago by sanderd17

The bonus is aready increased. If you trade with your ally, you get +25% trading profit. And you ally also gets +25% of your goods (so in total, your team gets a bonus of +50%).

I don't know if it's worth doing it, or in any way relevant to the patch. But the things I mentioned above could make diplomacy inside teams a bit harder, so more chances of teams splitting up, and interesting games.

But let's leave it outside this patch.

comment:5 Changed 6 years ago by mimo

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 14417:

change the way to manage trade, closes #2311

comment:6 Changed 6 years ago by mimo

As there was no definitive answer on the location of the new trade window (from the main window or from the market), I've kept both in the patch for tests. We can remove either one later.

comment:7 Changed 8 months ago by elexis

In 23072:

Refactor trade dialog and barter panel buttons to use object orientation, refs #23, #2311, #4366, #5387, rP10588, rP14417, rP17553, rP19354.

Differential Revision: https://code.wildfiregames.com/D2369

Note: See TracTickets for help on using tickets.