Out of my first question i will make a project with dynamic trader prices
I would be pleased for any help because its my first modding project for DayZ Epoch -- have no testing enviroment, yet
This will be a custom mod with dynamic trader prices.
First of all i am collecting ideas about formulas and pro and cons about the values.
My ideas are the following:
- Use dynamic stocks of the traders (maybe an own for every trader) [look at
-> i want to give the traders a dynamic stock instead of a fixed stock after restart
=> e.g. Baked Beans stock is at 100 -- players sells 100 -- stock is at 200 -- server restarts and it will keep the 200 in stock
-> i want a factor for selling and buying -- the bigger the stock is the lower the prices -- up to a maximum (maybe 1000)
=> e.g. there are 1000 Baked Beans at the traders stock so its sell and buy price will be very low -- e.g. 100GC base price * 0,25 as the lowest stock modificator -- result 25gc
-> also randomized values for items getting on the stock
=> e.g. Baked Beans stock is at 200 -- after restart he gets stocked up with a random number (maybe 20-30) e.g. 24 -- stock is now 224
- Use a buy/sell ratio (maybe an own for every trader) [look at
-> depending on supply and demand -- saving a buy/sell ration for each item
=> e.g. Baked Beans 250 buyings/ 50 sellings --> ratio for the price of 5 (maybe there can be a minumum too e.g. 4?)
-> decaying ratio so the prices get a bit more affected over the time
=> e.g. Baked Beans 250 buyings/ 50 sellings -- factor of 5 -- after restart decaying (maybe a few % -- here 10%) -- Baked Beans 225 buyings/ 45 sellings -- again factor of 5 BUT selling or buying will affect the prices a bit more now
~> maybe deacaying in other % how high the value is -- e.g. if value>=1000 use 20% decay else if value>=500 && value<1000 use 10% decay
All in all i have to think about where i can save those values and how to make it effective and using less ressources.
Any help would be nice :-)
If anyone got any attempts for this, it would be nice telling me.
When it gets finished i will release it with all participants in the credits.
Regards, fexxianosch
Original starting Post (and its question)
Original threadname: Traders with random additional charge (SC)
Hi there,
is it possible to add random additional charges to traders every restart?
I have no idea how you can do such stuff in BIs scripting langauge -.-
e.g.
You want to buy/sell a DMR at a standard trader
-> standard trader buy price is 20000 gold coins
-> standard trader sell price is 10000 gold coins
Now you want to buy/sell at a trader with random additional charges (maybe 2 variables for all traders or 2 variables for every trader)
->caravan trader buy price is 20000+20000*(random 0 to 15) => e.g. after restart #1: 20000+20000*9/100 = 21800 => after restart #2: 20000+20000*13/100 = 22600
->caravan trader sell price is 10000+10000*(-(random 0 to 15)) => e.g. after restart #1: 10000+10000*(-6/100) = 9400 => after restart #2: 10000+10000*(-15/100) = 8500
Can it be realized with variables that gets randomized per restart and when you buy/sell something, the variables gets querried and you pay/get up to/only x*(random percentage)?
In addition, can it be realized to show those modified trader prices at the traders, when you querry the variable just when buying/selling or is it better to show the extra percentages somehow in the trader menu without displaying changed prices?
Question
fexxianosch
Out of my first question i will make a project with dynamic trader prices
I would be pleased for any help because its my first modding project for DayZ Epoch -- have no testing enviroment, yet
This will be a custom mod with dynamic trader prices.
First of all i am collecting ideas about formulas and pro and cons about the values.
My ideas are the following:
- Use dynamic stocks of the traders (maybe an own for every trader) [look at
-> i want to give the traders a dynamic stock instead of a fixed stock after restart
=> e.g. Baked Beans stock is at 100 -- players sells 100 -- stock is at 200 -- server restarts and it will keep the 200 in stock
-> i want a factor for selling and buying -- the bigger the stock is the lower the prices -- up to a maximum (maybe 1000)
=> e.g. there are 1000 Baked Beans at the traders stock so its sell and buy price will be very low -- e.g. 100GC base price * 0,25 as the lowest stock modificator -- result 25gc
-> also randomized values for items getting on the stock
=> e.g. Baked Beans stock is at 200 -- after restart he gets stocked up with a random number (maybe 20-30) e.g. 24 -- stock is now 224
- Use a buy/sell ratio (maybe an own for every trader) [look at
-> depending on supply and demand -- saving a buy/sell ration for each item
=> e.g. Baked Beans 250 buyings/ 50 sellings --> ratio for the price of 5 (maybe there can be a minumum too e.g. 4?)
-> decaying ratio so the prices get a bit more affected over the time
=> e.g. Baked Beans 250 buyings/ 50 sellings -- factor of 5 -- after restart decaying (maybe a few % -- here 10%) -- Baked Beans 225 buyings/ 45 sellings -- again factor of 5 BUT selling or buying will affect the prices a bit more now
~> maybe deacaying in other % how high the value is -- e.g. if value>=1000 use 20% decay else if value>=500 && value<1000 use 10% decay
All in all i have to think about where i can save those values and how to make it effective and using less ressources.
Any help would be nice :-)
If anyone got any attempts for this, it would be nice telling me.
When it gets finished i will release it with all participants in the credits.
Regards, fexxianosch
Original starting Post (and its question)
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now