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

Trader System #8

Open
PatchRequest opened this issue May 24, 2022 · 11 comments
Open

Trader System #8

PatchRequest opened this issue May 24, 2022 · 11 comments
Assignees
Labels
feature A gameplay or technical addition high priority High priority task

Comments

@PatchRequest
Copy link
Contributor

PatchRequest commented May 24, 2022

Summarize your proposal
A generic system to buy and sell items in an interaction with an NPC or object

Describe the solution you'd like
It should be a generic system that can be used for NPC traders.
The goal is to use it in most of the farming routes and NPC shops
The items and the prices should be configurable with a config
In the future, an external connection for a dynamic system should be considered when implementing the system

@PatchRequest PatchRequest added feature A gameplay or technical addition high priority High priority task labels May 24, 2022
@Arkensor
Copy link
Contributor

General setup

@phumberdroz and I discussed that we very much like the idea of an MMO-like trader interaction GUI and process. We could utilize the inventory menu and fill the left side with a custom layout.
In there you can see rows and columns of items with a little preview widget, a name, and the current price. You have a buy and a sell tab. When you enter the trader menu and right-click your items to sell them it automatically switches to the sell tab.
The sell tab could "virtually" store the items you want to sell and overlay them in gray in your inventory. Once you are done you could press sell and only then the server is informed about all the items you want to sell. It deletes them from the player inventory and on success rewards cash to the inventory.
Buying items could and should be an instant activity. Selling is only a two-step to avoid accidentally selling a valuable item by miss-clicking and having to offer a buyback system. Though we could of course still offer that (but it requires more data to be saved so he can buy back later in case a restart happens between the sales).
For reference, I like the menu design for Lost Ark's traders. They also have GUI ideas for "exchanges" if we want that kind of thing in the future.

I would think that the same system can be used for "general vendors" that sell food and drinks. And traders that only buy stuff but do not sell anything maybe just have no sell tab?

Dynamic pricing

The first step is going to be to have static pricing. But the script and config setup must be designed in a way that allows the pricing provider to be switched out transparently.

We could then later add a dynamic model calculated on the server based on demand and supply, or connect an external market price web API once the HTTP client is fixed by BI.

Player trading

We should encourage RP interaction by giving the option for players to trade directly with others. Those trades can take place over the vanilla inventory system and vehicles or other storage as exchange containers. Prices could be configured in a way that selling it to other players that need the item benefits both more than each trading with an NPC. But this is probably going to be a separate topic in the near future. I just wanted to say that I don't think we need any player-to-player trading system for now, and only player-to-NPC.

@Arkensor
Copy link
Contributor

Arkensor commented Jun 3, 2022

image
@salutesh is assigned for GUI and implementation of this now. Contact him if you want to cooperate Steve aka Salutesh#4539.

@salutesh
Copy link

salutesh commented Jun 4, 2022

Started working on the basic prototype for the trader menu and added also some basic functionality:
2bea8633770c2ea763d8481029f838f5-jpg

@salutesh
Copy link

salutesh commented Jun 4, 2022

For further progress on the menu i am on a stage now where i need to know how you guys see the buy/sell handling with this menu here and what kind of information i should display for the items.
For example the quantity when the player wants to sell and buy something:
f379dc4bee04a6ff8e9071aaa422d80a

@Jasper-Cooper-AutoRFP
Copy link
Contributor

Great stuff @salutesh

I think each item also has a item description that could potentially be displayed?

Other then that, it would be great to optimise the interface for speed (I have always hated spending time in the UI rather then properly In-Game).

One way you could do that is by using multiple buttons that allow you to quickly buy different quantities.

An example of this could be to have a +1, +5 and +10 button that adds that to the quantity. This would make it easy for people to quickly buy large or small specic quantities.

Another example, maybe in combination with the above would be to have a text field in quantity that you could manipulate directly aswell.

For selling, you should be able to one click sell all of an item and it will do that.

That's a few ideas for now, love that work is already being done on this @salutesh

@DrLuk
Copy link

DrLuk commented Jun 5, 2022

I have started a concept on a shop menu too, I will send you some pictures tomorrow.
My original idea was to use the vertical selection like in the "F" Interaction where you can scroll up and down for the amount.

Just something I already mentioned before: Keep the console/controller players in mind! Things like text fields might not be the best solution for using with a controller.

An example of this could be to have a +1, +5 and +10 button that adds that to the quantity. This would make it easy for people to quickly buy large or small specic quantities.

I also thought of something like that, but we need to decide if we then want to make sure we always get stacks that fit that system, because if you need to click all three buttons 6 times we rather do it with just a one button.

What we definetly need is the "max amount" function, especially for selling stuff you mined ect. My idea was that if you go up/to the left with the arrow from 1, you automatically get the max amount you have.

@DrLuk
Copy link

DrLuk commented Jun 6, 2022

As promised a picture of my shop concept:
ShopConcept1

ShopConcept2

The basic idea was to split the shop in 2 or 3 parts. On the lift is a scrollable list of the things you can buy. You select the item, then a dialog opens where you can select the amount. Here you have 3 possibilites: using the preset buttons, scroll the big number up or down or use the text box to type the number. From the dialog you add it to the cart which is on the right side of the screen. There you get a overview of the prices, you can also delete a part if you don't want it anymore. The bottom shows the total for everything, when you press that button you checkout and buy the things. They then would get send directly to your inventory, no drag and drop required. You can leave right away.
Note that I included 4 different ways we could do the selection for the amount of items if we need or want to do it directly in the list. The problem I see here is the double scrolling action. You have a scroll for the list itself + the enter button to add to the cart, so a third action doesn't integrate well. That's the reason I used the dialog box thing.

Also I included my idea of a HUD in the top right, I can post something about that in the corresponding issue.

@salutesh
Copy link

salutesh commented Jun 6, 2022

I like the overall concept and design. In my version i started with the selling part and how to bring the inventory and the players items into this whole concept and use it for a fluent experience when interacting with the menu. I would suggest that we bring our ideas together and work a concept out that fits to the required needs that @Arkensor posted.

@LuxPoseidon
Copy link
Contributor

LuxPoseidon commented Jun 14, 2022

Player Driven Economy would be a cool addition to bring into the trader system, notice

#8 (comment)

Here you see the #/X that X could be optionally changed to only be able to sell as much as is bought by the trader.

I imagine the prices would adjust based on scarcity to a max / min value per item.

@Pyth3rEx
Copy link
Contributor

Wanted to check on something really quick. Isn't the trader system discussed here a legacy system for #186 ? Will we have both implemented? If that's the case, what's the point?

My train of thought is that if we have the item shops (#186) traders will be useless.

@Arkensor
Copy link
Contributor

The quick item shop via 3d actions is an early variant that is still going to be be a nice addition once I had time to take care of a proper trader menu. In the long term there needs to be a UI to buy and sell, see prices, buy back, having a search if there are many items on e.g. a general store. So no this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A gameplay or technical addition high priority High priority task
Projects
None yet
Development

No branches or pull requests

7 participants