View Single Post
  #38  
Old 02-26-2009, 04:16 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

As for the merchant system:

The first two are really easy. Depending on your faction and charisma, you will get better or worse prices from NPC merchants. Those values specify exactly how high or low that can be. So, the default setting is 4% for both. That means that with maxed CHA/faction you will get a 4% discount on wares, and on the flip side extreme bad CHA/faction will get you a 4% markup on wares. The reverse is also true, this value will also effect how much you will get by selling to a NPC by the same percentage.

A cloth cap has a price of 200 in the db so:

Base price: 2g
NPC sell price (1.05 modifier): 2g 1s
NPC buy price (0.95 modifier): 1g 9s
NPC sell price w/max CHA @ 4%: 2g 0s 2c (we always round up)
NPC buy price w/max CHA @ 4%: 1g 9s 1c
NPC sell price w/bottom CHA @ 4%: 2g 1s 8c
NPC buy price w/bottom CHA @ 4%: 1g 8s 2c

Be careful about using these values! If you set the bonus percentage too high, you'll get into a situation where you can sell for more than you buy. The rule to avoid this is take your two modifiers (in this case 1.05 and 0.95) and subtract them. Take half of that, .05 . You want the bonus percentage to be LESS (NOT equal) than that value, so 4% converted to a decimal is .04 and is indeed less, so in this example you can never buy for more than you sell.

The next two rules are a bit more tricky to explain and I debated even adding them, but for the sake of custom servers I decided to do it. Basically, they control your Charisma caps. Meaning, at a certain Charisma you will max out the bonus percentage and adding more charisma will no longer lower prices for you. The default bonus value of 3.45 will cap you at 104 with indifferent faction, and 132 with apprehensive. Lowering that number to 0.34 will cap your charisma at 400 apprehensive. You should not need to plug in a lower value than that, although you can if you never want players to cap.

The penalty value controls your bottom cap. 1.52 is 37 (lowest possible base CHA) meaning that even if you get hit with a CHA debuff, merchants will not raise their prices any more for you. If you want to lower the bottom cap to 0 CHA, the value would be 0.98. Since it scales that would mean at 0 that even players with 37 starting CHA would have a leg up price wise, and only could get worse prices if they got hit by a CHA debuff.

Players will always see base prices (with the modifier of course) at 103 CHA with Apprehensive faction, or 76 CHA with Indifferent or higher faction. Above those numbers they get a bonus, below a penalty. This is hardcoded and cannot be changed without modifying the code, and also breaking the rules
Reply With Quote