• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Math behind EconomicValue?

Can anyone explain me the math behind the EconomicValue ?

Example

<item name="ammo9mmBulletBall">
<property name="Tags" value="ammo"/>
<property name="DisplayType" value="ammoBullet"/>
<property name="HoldType" value="45"/>
<property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mbrass"/>
<property name="MeltTimePerUnit" value=".4"/>
<property name="Stacknumber" value="1000"/> <!-- STK ammo high -->
<property name="Group" value="Ammo/Weapons"/>
<property name="UnlockedBy" value="ammo9mmBulletBallSchematic"/>
<property name="EconomicValue" value="5"/>
<effect_group name="ammo9mmBulletBall" tiered="false">
<passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
<passive_effect name="BlockDamage" operation="base_set" value="7" tags="perkGunslinger"/>
<passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
<passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
</effect_group>
</item>



Ingame:

1 Bullet = 1 Coin 

But Why ?

 
Last edited by a moderator:
Can anyone explain me the math behind the EconomicValue ?

Example

<item name="ammo9mmBulletBall">
<property name="Tags" value="ammo"/>
<property name="DisplayType" value="ammoBullet"/>
<property name="HoldType" value="45"/>
<property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mbrass"/>
<property name="MeltTimePerUnit" value=".4"/>
<property name="Stacknumber" value="1000"/> <!-- STK ammo high -->
<property name="Group" value="Ammo/Weapons"/>
<property name="UnlockedBy" value="ammo9mmBulletBallSchematic"/>
<property name="EconomicValue" value="5"/>
<effect_group name="ammo9mmBulletBall" tiered="false">
<passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
<passive_effect name="BlockDamage" operation="base_set" value="7" tags="perkGunslinger"/>
<passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
<passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
</effect_group>
</item>



Ingame:

1 Bullet = 1 Coin 

But Why ?
You mean you get 1 coin for selling a 9mm bullet? That is because they trader buys everything from you at a much worse rate than he would sell it to you. 

This rate can be changed with BetterBarter for example

First line in traders.xml:

Code:
<traders buy_markup="2" sell_markdown="0.2" quality_mod="0.4,8" currency_item="casinoCoin" >
 
Last edited by a moderator:
i just understand 

"currency_item="casinoCoin"


thats the value of the "money"

buy markup 2? it means 200% ?

sell markdown if a item has a price of 100, you can sell it for 20 ?

 
i just understand 

"currency_item="casinoCoin"


thats the value of the "money"

buy markup 2? it means 200% ?

sell markdown if a item has a price of 100, you can sell it for 20 ?
Just make the test. Go into the game, find an expensive item at the trader (not one with quality). Buy it and see for how much you can sell it back. I did this with the duckbill mod and I bought it for 432 and could have sold it again for 43. So it seems you buy it for 200%, sell for 20%.

I couldn't find the economic value of the duckbill mod in the XML though. But Grandpas Fergetin Elixier was sold for 40k and its economic value in xml is 20k. So everything checks out.

 
Last edited by a moderator:
yeah, 

<traders buy_markup="0.2" sell_markdown="0.2" quality_mod="0.4,8" currency_item="casinoCoin" >


is the 1 to 1 trade what im searching for, actually, i got it ...

but the showing up items in the trader shop makes me crazy actually

<trader_item_groups>
<trader_item_group name="AmmoNormal">
<item name="ammo9mmBulletBall" count="1000"/>
<item name="ammo44MagnumBulletBall" count="1000"/>
<item name="ammo762mmBulletBall" count="1000"/>
<item name="ammoShotgunShell" count="1000"/>
<item name="ammoBlunderbuss" count="1000"/>
<item name="ammoJunkTurretRegular" count="1000"/>
</trader_item_group>
</trader_item_groups>
<!-- Trader Joel -->
<trader_info id="1" full_reset="true" min_inventory="1" max_inventory="1" reset_interval="3" open_time="6:05" close_time="21:50">
<trader_items count="1">
<item group="AmmoNormal"/>
</trader_items>




i want to showing up each items one time, but i cant figure it out with the min/max_inventory...

 
Last edited by a moderator:
yeah, 

<traders buy_markup="0.2" sell_markdown="0.2" quality_mod="0.4,8" currency_item="casinoCoin" >


is the 1 to 1 trade what im searching for, actually, i got it ...

but the showing up items in the trader shop makes me crazy actually

<trader_item_groups>
<trader_item_group name="AmmoNormal">
<item name="ammo9mmBulletBall" count="1000"/>
<item name="ammo44MagnumBulletBall" count="1000"/>
<item name="ammo762mmBulletBall" count="1000"/>
<item name="ammoShotgunShell" count="1000"/>
<item name="ammoBlunderbuss" count="1000"/>
<item name="ammoJunkTurretRegular" count="1000"/>
</trader_item_group>
</trader_item_groups>
<!-- Trader Joel -->
<trader_info id="1" full_reset="true" min_inventory="1" max_inventory="1" reset_interval="3" open_time="6:05" close_time="21:50">
<trader_items count="1">
<item group="AmmoNormal"/>
</trader_items>




i want to showing up each items one time, but i cant figure it out with the min/max_inventory...
You want that the trader always has these 6 items in its inventory and nothing else? Have you tried min_ and max_inventory both set to 6?

PS: I would also use

Code:
<trader_item_group Name="AmmoNormal" count="all" >
 
Last edited by a moderator:
yeah i try many things yesterday/night, thats why my sanity goes down :D

i just wondering why the items showing up twice 😕

EDIT:Intressting, in the  section 1,499 it work but not in "all loot"

<trader_item_groups>
<trader_item_group name="AmmoNormal" count="all">
<item name="ammo9mmBulletBall" max="1" count="1000"/>
<item name="ammo44MagnumBulletBall" max="1" count="1000"/>
<item name="ammo762mmBulletBall" max="1" count="1000"/>
<item name="ammoShotgunShell" max="1" count="1000"/>
<item name="ammoBlunderbuss" max="1" count="1000"/>
<item name="ammoJunkTurretRegular" max="1" count="1000"/>
</trader_item_group>
</trader_item_groups>
<!-- Trader Joel -->
<trader_info id="1" full_reset="true" min_items_swapped="20" max_items_swapped="20" reset_interval="3" open_time="6:05" close_time="21:50">
<trader_items count="all">

</trader_items>
<!--
min max
<item name="ammo9mmBulletBall" min="1" max="1" count="1000"/>
<item name="ammo9mmBulletHP" min="1" max="1" count="1000"/>
<item name="ammo9mmBulletAP" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletBall" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletHP" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletAP" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletBall" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletHP" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletAP" min="1" max="1" count="1000"/>
<item name="ammoShotgunShell" min="1" max="1" count="1000"/>
<item name="ammoShotgunSlug" min="1" max="1" count="1000"/>
<item name="ammoShotgunBreachingSlug" min="1" max="1" count="1000"/>
<item name="ammoBlunderbuss" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretRegular" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretShell" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretAP" min="1" max="1" count="1000"/>
-->
<tier_items level="1,499" count="all"> <!-- requires Perk 0 -->
<item group="AmmoNormal"/>
</tier_items>


is there a way to give like in loot.xml a level requirement ?

Example:

level 1-25 you can buy only "ammo9mmBulletBall"

level 26-50  ammo44MagnumBulletBall 

etc

--------

anyway im half happy actually :)

 
Last edited by a moderator:
yeah i try many things yesterday/night, thats why my sanity goes down :D

i just wondering why the items showing up twice 😕

EDIT:Intressting, in the  section 1,499 it work but not in "all loot"

<trader_item_groups>
<trader_item_group name="AmmoNormal" count="all">
<item name="ammo9mmBulletBall" max="1" count="1000"/>
<item name="ammo44MagnumBulletBall" max="1" count="1000"/>
<item name="ammo762mmBulletBall" max="1" count="1000"/>
<item name="ammoShotgunShell" max="1" count="1000"/>
<item name="ammoBlunderbuss" max="1" count="1000"/>
<item name="ammoJunkTurretRegular" max="1" count="1000"/>
</trader_item_group>
</trader_item_groups>
<!-- Trader Joel -->
<trader_info id="1" full_reset="true" min_items_swapped="20" max_items_swapped="20" reset_interval="3" open_time="6:05" close_time="21:50">
<trader_items count="all">

</trader_items>
<!--
min max
<item name="ammo9mmBulletBall" min="1" max="1" count="1000"/>
<item name="ammo9mmBulletHP" min="1" max="1" count="1000"/>
<item name="ammo9mmBulletAP" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletBall" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletHP" min="1" max="1" count="1000"/>
<item name="ammo44MagnumBulletAP" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletBall" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletHP" min="1" max="1" count="1000"/>
<item name="ammo762mmBulletAP" min="1" max="1" count="1000"/>
<item name="ammoShotgunShell" min="1" max="1" count="1000"/>
<item name="ammoShotgunSlug" min="1" max="1" count="1000"/>
<item name="ammoShotgunBreachingSlug" min="1" max="1" count="1000"/>
<item name="ammoBlunderbuss" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretRegular" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretShell" min="1" max="1" count="1000"/>
<item name="ammoJunkTurretAP" min="1" max="1" count="1000"/>
-->
<tier_items level="1,499" count="all"> <!-- requires Perk 0 -->
<item group="AmmoNormal"/>
</tier_items>


is there a way to give like in loot.xml a level requirement ?

Example:

level 1-25 you can buy only "ammo9mmBulletBall"

level 26-50  ammo44MagnumBulletBall 

etc

--------

anyway im half happy actually :)
I don't know. That they couldn't balance the trader yet like they did with items points to some feature still missing in traders.xml though and that could be it. In that case you would have to wait for A20.

 
Doublepost;Sorry

Got It! ( I think ) ...better , im happy with this result^^

Ingame
In Section ALL -------------------

ammo9mmBulletBall (count="1") / You can Buy 1-16
ammo44MagnumBulletBall (count="2") / You can Buy 1-32
ammo762mmBulletBall (count="3") / You can Buy 1-48
ammoShotgunShell (count="4") / You can Buy 1-64
ammoBlunderbuss (count="5") / You can Buy 1-80
ammoJunkTurretRegular (count="6") / You can Buy 1-96

In Section SecretStash (no perk skilled) -------------------

ammo9mmBulletBall (count="1000") / You can Buy 1-1000
ammo44MagnumBulletBall (count="1000") / You can Buy 1-1000
ammo762mmBulletBall (count="1000") / You can Buy 1-1000
ammoShotgunShell (count="1000") /  You can Buy 1-1000
ammoBlunderbuss (count="1000") / You can Buy 1-1000
ammoJunkTurretRegular (count="1000") / You can Buy 1-1000

<trader_item_groups>
<trader_item_group name="AmmoNormal" count="all">
<item name="ammo9mmBulletBall" count="1"/>
<item name="ammo44MagnumBulletBall" count="2"/>
<item name="ammo762mmBulletBall" count="3"/>
<item name="ammoShotgunShell" count="4"/>
<item name="ammoBlunderbuss" count="5"/>
<item name="ammoJunkTurretRegular" count="6"/>
</trader_item_group>
<trader_item_group name="AmmoNormalSecretStash" count="all">
<item name="ammo9mmBulletBall" count="1000"/>
<item name="ammo44MagnumBulletBall" count="1000"/>
<item name="ammo762mmBulletBall" count="1000"/>
<item name="ammoShotgunShell" count="1000"/>
<item name="ammoBlunderbuss" count="1000"/>
<item name="ammoJunkTurretRegular" count="1000"/>
</trader_item_group>
</trader_item_groups>
<!-- Trader Joel -->
<trader_info id="1" full_reset="true" min_items_swapped="20" max_items_swapped="20" reset_interval="3" open_time="6:05" close_time="21:50">
<trader_items count="1">
<item group="AmmoNormal"/>
</trader_items>

<tier_items level="1,499" count="all"> <!-- requires Perk 0 -->
<item group="AmmoNormalSecretStash"/>
</tier_items>

<tier_items level="3000,3999" count="all"> <!-- requires Perk 3 -->

</tier_items>

<tier_items level="4000,4999" count="all"> <!-- requires Perk 4 -->

</tier_items>

<tier_items level="5000,-1" count="all"> <!-- requires Perk 5 -->

</tier_items>
</trader_info>



Thank you Dude, for the Motivation and the help ! :)

 
Glad I could help. Just out of curiosity: Why has your trader the same stuff in normal and secret stash? Since both stashes are accessible and need no perk the normal loot seems superfluous since you can get hundred times more of the same item from the (not-so-)secret stash?

I'm also astonished that count="1" in the normal stash leads to 16 bullets being available. Really strange.

 
Its not finished :D, now i have all information what i need to balancing that @%$# on my own, i still have few more questions, but its not "necessary" to make the game run.

but if its it possible to make diffrent economy value between "All Loot" and "SecretStashLevel1" let me know ! :D

I'm also astonished that count="1" in the normal stash leads to 16 bullets being available. Really strange.
Actually Yes, i was sitting here and scream like wtf! :D

 
Back
Top