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

Barter formula #580

Open
JanSimek opened this issue Sep 24, 2019 · 1 comment
Open

Barter formula #580

JanSimek opened this issue Sep 24, 2019 · 1 comment

Comments

@JanSimek
Copy link
Contributor

Implement formula for calculating barter prices to match the vanilla engine.

NovaRain came up with the following pseudo-code for FO2:

Master_Trader = 0.0;
if (player_has_master_trader) Master_Trader = 25.0;

barter_mod = script_modifier + reaction_modifier; // reaction_modifier is -15/0/25 for good/neutral/bad.
barter_percent = (barter_mod + 100.0 - Master_Trader) * 0.01;

if (barter_percent < 0.0) barter_percent = 0.0099999998;

barter_ratio = [(trader_barter_skill + 160.0) / (highest_barter_skill_in_party + 160.0)] * 2.0;

total_price = caps_total + item_total_cost_without_caps * barter_ratio * barter_percent;
@FakelsHub
Copy link

There seems to be a mistake.
2019-10-24_05-10-42

@JanSimek JanSimek mentioned this issue Oct 31, 2019
@JanSimek JanSimek mentioned this issue May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants