http://social.bioware.com/%252520http:/ ... 20#6285176Vypocet ceny predmetu.
ItemCost = [BaseCost + 1000*(Multiplier^2 - NegMultiplier^2) + SpellCosts]*MaxStack*BaseMult +
The Multiplier is the sum of the costs of all the Item Properties whose costs are positive.
So now we need the formula to find the value of a Item Properties. Just Keep in mind that by the formula above all of the Item Properties values are going to be added together, Squared them multiplied by 1000 before being added to the value of the item. example an item with only one Item Properties with a value of 5. would end up adding 5^2 * 1000 = 2,500 to the value of the item. If the Item has 2 Item Properties with values of 5 it would add (5+5)^2 * 1000 = 100,000 to the value of the item. This is why most number you see for the cost will be low.
Any way here is the formula :
ItemPropertyCost = PropertyCost * SubtypeCost + CostValue
PropertyCost
In itempropdef.2da, get the floating point value in the Cost column, at the row indexed by the
PropertyName Field of the ItemProperty Struct. If the Cost column value is ****, treat it as 0. This
floating point value is the PropertyCost
SubtypeCost
If the PropertyCost obtained above from itempropdef.2da was 0, then get the ResRef in the
SubTypeResRef column of itempropdef.2da, at the row indexed by the 2PropertyName Field of the
ItemProperty Struct. This is the resref of the subtype table 2da.
In the subtype 2da, get the floating point value in the Cost column at the row indexed by the Subtype
Field of the ItemProperty Struct. This floating point value is the SubtypeCost.
Only get the SubtypeCost if the PropertyCost was 0. If the PropertyCost was greater than 0, then the
SubtypeCost is automatically 0 instead.
CostValue
In iprp_costtable.2da, get the string in the Name column at the row indexed by the CostTable Field in
the ItemProperty Struct. This is the ResRef of the cost table 2da.
In the cost table, get the floating point value in the Cost column in the row indexed by the CostValue
Field in the ItemProperty Struct. This floating point value is the CostValue.
I hope that helps.