[A17] Economic Stability

Started by AngleWyrm, May 30, 2017, 01:38:53 PM

Previous topic - Next topic

AngleWyrm

#15

Quote from: kutch on June 01, 2017, 02:36:56 PM
Thank you for this mod.  Always great to see more mods!

Question:  Is there a way to change the percentage?  So instead of always being equal, could we make it 10% of original value and/or 200%?
Certainly! feel free to Tinker. Because the evil of multiple percentages is at play, it takes a bit of figuring stuff out. A not-too-detailed overview:
  • Everything has a market value that isn't displayed in the trade window, but can be seen in the information tab.
  • The price charged by traders for their goods is (mostly) 3/2 of that market value.
  • The price charged by players for their goods is in two variables, defaultBaseValue and SellPriceFactor, the first applying to everything and the second being an individual over-ride, like the way weapons have been set to 1/5 market value
For example, to sell things at 1/10 of market value, set those two variables to 1/10 (0.1), and to sell things at twice their market value set them to 2.



Ok, so hike up your nickers, here comes the

Too Detailed Section
The variables are fractions of something; that something can be fractions of market price, or it can be fractions of trader price (or it could be fractions of the number of chickens on the map for that matter). But there's a hidden additional percentage that confuses matters, so that what is displayed in-game as the percentage modifier is no longer a representation of marketPrice x modifier = sellPrice. That hidden modifier is a 50% multiplier.

So for example in order to arrive at a sales price that equals market value we have to apply an extra factor:
100% marketValue x 1/2 hidden factor x 2/1 balancing factor = 1 x market value.

Whew, just getting to one is tricky business. And remember the display will not match 100%; what it will show instead is the calculation without the hidden factor (100% market value x 2/1 balancing factor = 200%)
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

lorebot

Thanks for this mod!

Is there a way to make trade prices more dependent upon pawn skill? I don't like the universal 50% modifier, but I also don't like that a pawn's Social skill can have at most a 10% effect on trade prices. I feel like Social skill should have much more impact on sale prices, this isn't a world of MSRP so the previously given game store example doesn't really apply. Everyone kinda knows what silver is worth, but someone with a lot of talent at bartering should be able to get a much more equitable trade than someone that's totally unpracticed.

I think something like this would accurately represent what I'm feeling about this issue:
market value x (0.25+(5xseller social skill)) x (1-(0.01xbuyer social skill)) = trade price *then factor in effects from condition (ie illness, bionics, etc...)

This should be run both ways on the trade screen so that the seller's social skill is heavily weighted to determine the price the seller wants or expects for the item and then marginally adjusted by the buyer's ability to talk them down and get a better deal. This means that two equally skilled and modified traders will essentially deadlock each other on any item they both have for trade, but when the skill of the two traders differs greatly so will the prices. An extremely skilled trader will seriously rake an amateur over the coals, making skills far more important for trading than they currently are. This also makes the maximum trade price of an item greater than the market value, which is perfectly acceptable to me because to get the numbers that high you'd need to have skill above 15 and/or have some really nice bionics which makes you a System Class Master or better...presumably making you the best trader on your planet or even the galaxy.

I'm not sure if there's a way to alter the trading system in Rimworld in this fashion, but I'd love to see it happen :)

AngleWyrm

Quote from: lorebot on July 12, 2017, 08:43:23 PM
I don't like the universal 50% modifier, but I also don't like that a pawn's Social skill can have at most a 10% effect on trade prices.

Additional Traits mod by etoire has a set of traits that affect trade prices (TradePriceImprovement)
  • Sucker -20%
  • Amateur haggler +20%
  • Haggling enthusiast +40%
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

lorebot

Quote from: AngleWyrm on July 12, 2017, 11:05:41 PM
Additional Traits mod by etoire has a set of traits that affect trade prices (TradePriceImprovement)
  • Sucker -20%
  • Amateur haggler +20%
  • Haggling enthusiast +40%

I appreciate the info, but it doesn't really address my desire for skill to have more of an impact on trading. Unless those traits do more than just add a condition-like modifier they're no different than installing some bionics or having a broken jaw aside from the fact that they're only available at pawn generation.

bladerunner170

I understand the idea behind the mod, but it doesn't make sense for traders to buy an item for the same price they're selling for. Then they're not making a profit AND the game is suddenly broken and unbalanced.

AngleWyrm

#20
Quote from: lorebot on July 13, 2017, 12:25:05 AM
I appreciate the info, but it doesn't really address my desire for skill to have more of an impact on trading.
That's a good conception for a beginning, a direction to pursue. But it doesn't contain an ending, a desired goal. So how can we work towards developing a satisfying destination for that beginning?

We have a competitive tug-of-war at a bargaining table to alter the trade balance point in favor of one side or another based on a difference in social skill.

The range of social skill is 0 to 20, so the range of a difference between two social skills is -20 to +20. These two end-points then define the span over which an adjustment would take place.

All that remains is to specify the desired proportion of market value at -20 and at +20.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Soupy Delicious

Quote from: AngleWyrm on July 13, 2017, 02:38:24 AM
Quote from: lorebot on July 13, 2017, 12:25:05 AM
I appreciate the info, but it doesn't really address my desire for skill to have more of an impact on trading.
That's a good conception for a beginning, a direction to pursue. But it doesn't contain an ending, a desired goal. So how can we work towards developing a satisfying destination for that beginning?

We have a competitive tug-of-war at a bargaining table to alter the trade balance point in favor of one side or another based on a difference in social skill.

The range of social skill is 0 to 20, so the range of a difference between two social skills is -20 to +20. These two end-points then define the span over which an adjustment would take place.

All that remains is to specify the desired proportion of market value at -20 and at +20.

I think ya lost him.

lorebot

Quote from: AngleWyrm on July 13, 2017, 02:38:24 AM
Quote from: lorebot on July 13, 2017, 12:25:05 AM
I appreciate the info, but it doesn't really address my desire for skill to have more of an impact on trading.
That's a good conception for a beginning, a direction to pursue. But it doesn't contain an ending, a desired goal. So how can we work towards developing a satisfying destination for that beginning?

We have a competitive tug-of-war at a bargaining table to alter the trade balance point in favor of one side or another based on a difference in social skill.

The range of social skill is 0 to 20, so the range of a difference between two social skills is -20 to +20. These two end-points then define the span over which an adjustment would take place.

All that remains is to specify the desired proportion of market value at -20 and at +20.

Well, I'm pretty sure I did that in my post. I provided an example of the type of equation I feel would be satisfactory to me. It starts with a base value of 25% of market value and then adjust it up to 125% based on the seller's skill, afterwards it gives the buyer a chance to reduce that price by up to 20%. Once all that is sorted it applies any conditional modifiers from bionics, traits, wounds, etc... so that those remain as a direct adjustment of the final purchase price and aren't a part of the skill calculation. This heavily weights the seller's skill while giving the buyer a significant impact on the final price.

Functionally you'd just have to run the equation twice for each trade session to get a modifier to apply to all the items in each column which is probably what's already happening just applying that 50% adjustment to one side.

I'm not sure if implementing that would be possible tho. I don't know much about modding Rimworld so I'm not sure if that's something that could be done with an xml edit or if it would require some C# and/or a script.

Quote from: Soupy Delicious on July 13, 2017, 03:20:43 AM
I think ya lost him.

Nope :D

AngleWyrm

#23

I notice that no fractions of market value were given for the end points of -20 and +20 difference in social skills.

Quote from: Investopedia.comA buyer's market is a situation in which supply exceeds demand, giving purchasers an advantage over sellers in price negotiations. The term "buyer's market" is commonly used to describe real estate markets, but it applies to any type of market in which there is more product available than there are people who want to buy it.

The opposite of a buyer's market is a seller's market, a situation in which demand exceeds supply and owners have an advantage over buyers in price negotiations.

I won't be implementing a static bias between buyer and seller. Anyone wishing to experience such an arrangement can do so by setting up a weapons manufacturing business in vanilla Rimworld.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

lorebot

Quote from: AngleWyrm on July 13, 2017, 08:15:20 AM
I notice that no fractions of market value were given for the end points of -20 and +20 difference in social skills.

I think what we got here is failure to communicate.

I don't understand what you mean by 'end points of -20 and +20 difference' because that's not how it works as I understand it. You have 2 pawns, each with a Social skill rating, 0-20, so the difference between them can never be greater than 20 points. I also don't understand why you're asking for fractions, I can't imagine the game is using actual fractions for any calculations because that'd be a coding and optimization nightmare. I've never seen anything coded with fractions, it's always percentile and decimal points which is what I provided in the equation in my first post.

If you're having trouble understanding this allow me to give examples:
market value x (0.25+(5xseller social skill)) x (1-(0.01xbuyer social skill)) = trade price

example a:
colonist has Social skill 0 with no condition modifiers
trader has Social skill 20 with no condition modifiers

so the buy column (right side of the window) would be:
market value x 1.25 x 1 = trade price
all the items listed would be 125% of market value

and the sell column (left side of the window) would be:
market value x .25 x .80 = trade price
all the items would be 20% of market value

the Colonist has no skill and the Trader is a God of Bartering and rakes the colonist over the coals in any deal they make.
This example works in reverse as well, so if the Colonist had Skill 20 and the Trader Skill 0 the trade prices would just be reversed.

example b:
Colonist has Social skill 12 with no condition modifiers
Trader has Social skill 15 with no condition modifiers


so the buy column (right side of the window) would be:
market value x 1 x .88 = trade price
all the items listed would be 88% of market value

and the sell column (left side of the window) would be:
market value x .85 x .85 = trade price
all the items would be 72.25% of market value

The Colonist and the Trader are nearly evenly matched in skill, their trades would be mostly fair with the Trader coming out slightly ahead in any deal they make.

example c:
Colonist has Social skill 10 with no condition modifiers
Trader has Social skill 10 with a missing ear (a .5% reduction on trade prices from what I can tell)


so the buy column (right side of the window) would be:
market value x .75 x .9 = trade price
modify trade price by the .5% reduction from the trader's missing ear to get:
all the items listed would be 67.1625% of market value

and the sell column (left side of the window) would be:
market value x .75 x .9 = trade price
modify trade price by the .5% reduction from the trader's missing ear to get:
all the items would be 67.8375% of market value

I'm not totally sure about the trade price effect from missing an ear, I loaded a game I knew had a colonist with a missing ear and tried to figure it out but I'm still not certain about the effect value. .5% seems really low to me but I couldn't find any better data to work with. Regardless you can see that the skill of the Colonist and Trader are equal so their prices will be about equal as well, only being affected by conditional modifiers like that missing ear.

PixelBitZombie

#25
Edit: I didn't see a second page. So I'll just adjust my post. Seem's like a decent mod. Can't wait to try it out.
"When logic and proportion have fallen sloppy dead
And the White Knight is talking backwards
And the Red Queen's off with her head"


AngleWyrm

#26

Quote from: lorebot on July 13, 2017, 02:00:07 PM
If you're having trouble understanding

I see a motive that got what it wished for, a variant of there can be only one expressed in terms of doing harm to its buyers thereby selecting against its own evolutionary survival; and so it is forever pounding at the gates of heaven for entry.

Quote from: lorebot on July 12, 2017, 08:43:23 PM
Is there a way to make trade prices more dependent upon pawn skill? I don't like the universal 50% modifier, but I also don't like that a pawn's Social skill can have at most a 10% effect on trade prices.
Inscribing these two numbers with a magic quill summons the answer to the question asked.
  • "effect on trade price" for the case where buyer has 20 social skill and seller has  0 social skill (+20)
  • "effect on trade price" for the case where buyer has  0 social skill and seller has 20 social skill (-20)
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

lorebot

Quote from: AngleWyrm on July 14, 2017, 02:21:30 AM

Quote from: lorebot on July 13, 2017, 02:00:07 PM
If you're having trouble understanding

I see a motive that got what it wished for, a variant of there can be only one expressed in terms of doing harm to its buyers thereby selecting against its own evolutionary survival; and so it is forever pounding at the gates of heaven for entry.

Quote from: lorebot on July 12, 2017, 08:43:23 PM
Is there a way to make trade prices more dependent upon pawn skill? I don't like the universal 50% modifier, but I also don't like that a pawn's Social skill can have at most a 10% effect on trade prices.
Inscribing these two numbers with a magic quill summons the answer to the question asked.
  • "effect on trade price" for the case where buyer has 20 social skill and seller has  0 social skill (+20)
  • "effect on trade price" for the case where buyer has  0 social skill and seller has 20 social skill (-20)

I've been staring at this post for the past 15 minutes trying to figure out what you're trying to say.

I get the feeling you're being vague and metaphorical on purpose because you somehow felt insulted by something I posted and if that's the case I assure you I meant no disrespect. I'm genuinely trying to understand what you're saying and only trying to ensure that you understand me as well.

I do see what you meant by +/-20 now, it's not how I look at the issue which is why I was confused. If those are the numbers you're looking for then they're in example a of my previous post. +20 is 125% and -20 is 20% (5/4ths and 1/5th if for some ungodly reason you actually need fractions for that). Those numbers alone don't really convey how I feel the skills should be weighted tho which is why I gave the equation i did.

If you disagree with my numbers or idea that's fine, just please explain to me why. I don't mind have a serious discussion about it if that's what you'd like.

AngleWyrm

#28
Quote from: lorebot on July 14, 2017, 04:42:54 AM
If those are the numbers you're looking for then they're in example a of my previous post. +20 is 125% and -20 is 20%


  • Using difference between buyer and seller social skill compacts the problem into two-dimensional space, with the x-axis a skill difference [-20 .. +20] and the y-axis a percent market value [20% .. 125%]
  • We can then describe the two end-points as coordinates (-20, 20%) and (+20, 125%)
  • given two coordinate points, we can get the formula of the line that passes through both of them
    • find the slope of the line
    • (125% - 20%) / (20 - -20) = 105% / 40; slope m = 21% per 8 skill point difference
    • put the slope into a point-slope formula
    • y = 21% / 8 (x - 20) + 125%
So a line that describes a relationship across this range of values is:
percentMarketValue = 0.21/8 (socialSkillDifference - 20) + 1.25

A nice property that comes with linear functions is predictability, a consistent mapping across a range (slope value) that lends itself to recognition and memory. A skill 10 vs a skill 6 produces the same 10% advantage as does a skill 20 vs a skill 16, or a skill 4 vs a skill 0.

So a player can look at the character sheets in-game and see a communique "my Skill-12 guy is up against a skill-8 guy, that's about 10% in my favor," or "They've got a skill-16 and the highest I got right now is only a skill-8, that's gonna suck to the tune of about 20%"

Further tweaking can be had by adjusting the slope, the 21% per 8 skillDifference portion of the equation. Also, I'd suggest moving the offset up a bit so that 0 skill difference results in 100% market price (the +1.25 part of the equation) because most people are going to expect that evenly matched contestants will be the point where things change direction from disadvantage to advantage or visa versa.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

lorebot

#29
My problem with that function is that it weights both sides' skills equally, where I feel the seller should hold a more significant effect over the end price. They do hold most of the cards in the deal. Neither side is forced to accept a deal, but in most cases it's the buyer that 'needs' the item and the seller can always use that to their advantage. And if the seller's poorly skilled then the end price should suffer more than if the buyer is so. Because of that I don't feel like a Linear function will work on this problem, for me at least.

Edit: props for using Math is Fun! I love that site and have shared it with most of my friends and all of the students and teachers I know :)