Hello everyone! I got stuck with some maths and it’s implementation in my project, looking forward to hear some advices.
I’m currently trying to make a trading system with vendors in my project.
Using a slide bar, players can choose the desired price (“current price”) between 1 (“priceMIN”) and the default vendor price (“priceMAX”).
I managed to add the correct formula, which detects the percentage of “current price” between “priceMIN” and “priceMAX”.
Now I would like to detect the chances of successful and unsuccessful trading, so if player lowers the price for too much - vendor will be more likely to refuse selling an item or move the trading process to the next “round” with different min\max prices. Any ideas of how may i approach this with UE tools?
Here is a table of approximate chance values I wish to set, depending on percentage of “current price” - the value I get with my first formula:
% of price - the % of “current price” in between “priceMIN” and “priceMAX”;
% chance to succes - chance for vendor to accept the trade and sell player an item;
% chance to trade - chance for vendor to move the deal on the next trading rounds with new “piceMIN” and “priceMAX”;
% chance to fail - chance for vendor to refuse the deal.