Whomever can figure this out is a genius!
FallacyStudios
Member Posts: 970
Now this problem is mainly mathematical and I could really use some help. Even if you aren't able to figure it out entirely, but are able to give me a push in the right direction would be extremely grateful.
Ok so there are 4 different types of an item in my game. Lets call them A, B, C, and D.
In game the person is able to adjust the selling price of each of those to what they want within a boundary, BUT each of those has a key price in which it sells the most quantity and making the most amount of money. A sweet spot if you will.
A's = $25
B's = $20
C's = $15
D's = $10
Now if the person is selling D for example and they price it at $15 they should see a drastic decrease in sales resulting in still having a large quantity and making more money per sale, but still a very low amount sold. If they were to price D at $5 they would see a drastic increase in sales resulting in large quantity sold, but far less earned.
Now what I am trying to figure out is a formula that could calculate all this on the fly. Basically, based on what they price it above, below, or at the sweet spot will determine the number of sales and the amount made from those sales.
I hope that makes sense and if you need clarification please ask.
Thank you and I hope one of you is the genius that can figure this out. I don't seem to be capable lol.
Ok so there are 4 different types of an item in my game. Lets call them A, B, C, and D.
In game the person is able to adjust the selling price of each of those to what they want within a boundary, BUT each of those has a key price in which it sells the most quantity and making the most amount of money. A sweet spot if you will.
A's = $25
B's = $20
C's = $15
D's = $10
Now if the person is selling D for example and they price it at $15 they should see a drastic decrease in sales resulting in still having a large quantity and making more money per sale, but still a very low amount sold. If they were to price D at $5 they would see a drastic increase in sales resulting in large quantity sold, but far less earned.
Now what I am trying to figure out is a formula that could calculate all this on the fly. Basically, based on what they price it above, below, or at the sweet spot will determine the number of sales and the amount made from those sales.
I hope that makes sense and if you need clarification please ask.
Thank you and I hope one of you is the genius that can figure this out. I don't seem to be capable lol.
Comments
If you say exactly how big the difference is between -1/+1 than the sweet shot, I have a much better chance at getting the question answered the way you want.
Can you give that information?
EDIT: If this a tycoon-type game, and rather than an exact amount of sales lost/gained, you want it to be approximate sales lost/gained randomly decided on when they play, let me know a range of the negative/positive impacts rather than the specific amount.
As for difference I'm open to suggestions to simplify it, but something like if the sweet spot was 1 sale, the pricing going up $1 could be 0.80 quantity, and going down $1 could be 1.2 quantity. Although I'm uncertain if at that range it would make the sweet spot the most profitable spot or not.
I hope that answer what you are asking for and I am most certainly open to other suggestions if it makes it simpler to get functional.
AMOUNT-MADE FORMULA:
Change Attribute:
attribute.leftover to attribute.sweetspot-attribute.whatplayerpicks
Rule:
If attribute.leftover < 0, change attribute.moneymade to attribute.sales (attribute.leftover*1.2)
If attribute.leftover > 0, change attribute.moneymade to attribute.sales (attribute.leftover*0.8)
-------------------------------------------------------------------------
-------------------------------------------------------------------------
***Use integer attributes over index attributes, as it could potentially be negative***
If this doesen't work, let me know, and I'll try again.
***You will have to make duplicate copies of these rules for each individual item***
And to make the results randomized, select random from the dropdown box in expression editor and select 'random' then input your desired minimum/maximum.
Since you have a pro license, I assume your pretty familiar.comfortable with GameSalad, but do let me know if you need help.
I wanted to say that it is currently literally impossible to make a formula for calculating amount sold, other than making individual rules for every possible scenario the user picks for pricing, which may impact loading times. But if you were to give me an exact amount/range of amount sold for the sweet spot, I will hopefully be able to make a formula for that too. But if this works, then do give the amount-formula a shot using similar logic.
Try this out, and let me know if it doesen't work.
Hope this helps.
Thank you Chakku the Genius
Your welcome