Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vehicle trading between players #669

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

Ranran-the-JuicyPork
Copy link

@Ranran-the-JuicyPork Ranran-the-JuicyPork commented Jul 19, 2024

This patch enables vehicle trading between players.
Please note that this only implements the functionality and UI, it does not tweak the economic balance.

How to buy and sell a vehicle:

A management button will be added to the top right of the depot dialog.
Press this button to open the management dialog.

Changing the depot name has been moved to this dialog for space reasons.

The dialogue currently shows the vehicles stocked in the depot. Players can choose to **scrap** them or **list** them for sale to other players.

This list is a sortable table, and clicking on a header will sort by that item. The code for vehicle list has also been significantly changed to make it the same as the code for vehicle list.
Left-click on a row to select a vehicle, right-click to open a details window.
To be consistent with this behavior, the way to open the details window in the vehicle list has also been changed to right-clicking.

To list for sale, select "Sell" from the mode buttons.
Then press the execute_listing button and the selected vehicle will be moved to the list.
The selector can select multiple vehicles at the same time.

Once you've been listed, other players will be notified via message.

Vehicles listed by other players can be purchased from the "Buy" list. You can only purchase vehicles that are supported by the depot. This means you need to open the management dialog from the correct depot. Select the vehicle you want to purchase and press the execute_purchase button to purchase the vehicle and transfer it immediately to your depot.

We can still sell vehicles in the existing depot dialog, and this functionality is still there, but we should be aware that the old vehicle selling functionality has some flaws.
Vehicles of the same model are displayed in stacks rather than one by one, so we cannot pick out a specific one to sell.
For example, if there are multiple vehicles of the same model with different livery schemes, the player cannot decide which livery scheme vehicle to sell.
It is difficult to even know how many vehicles of each livery scheme are in storage.
Due to livery scheme features, bundling different colored vehicles is a bad design. This dialog allows us to select the appropriate retired vehicle.

Next, the existing code (action on the depot window) automatically sells the newest vehicles because they sell for a higher price, which is the exact opposite of what happens in the real world.
Generally, vehicles are scrapped starting from the oldest because they are consumables.
I think that in the future or at this stage, we will need to fix or remove the selling(scrap) functionality that includes the flaws in the depot dialog.

As I said at the beginning, there are currently no economic balancing adjustments in this patch.
Vehicles still get sold immediately for a high price rather than for scrap.
Therefore, at present there is no benefit to selling vehicles to other players; only the UI and functionality have been implemented.

However, the extended implementation plan included scrapping the vehicles, so I think this is sufficient preparation for that.
I also think that even at this stage it is possible to make adjustments such as lowering the scrap price when sold to non-players.


EDIT:
The depot list UI has been revamped in this update. Note that we have added an indication of the number of vehicles for sale. This is shown in parentheses in the vehicles number column.

@Ranran-the-JuicyPork Ranran-the-JuicyPork changed the title 2407 vehicle trading between players vehicle trading between players Jul 19, 2024
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch from a0b6a2f to 346a155 Compare July 19, 2024 20:28
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch from 346a155 to c322a30 Compare July 19, 2024 20:31
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch from 2a42582 to 421c97c Compare July 20, 2024 06:21
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch 3 times, most recently from 2e79ce1 to 98f2d53 Compare July 25, 2024 13:39
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch from 98f2d53 to a49c792 Compare July 25, 2024 23:37
@Ranran-the-JuicyPork Ranran-the-JuicyPork force-pushed the 2407-vehicle-trading-between-players branch 2 times, most recently from 7207b73 to b18314e Compare July 26, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant