Community Forum

Manure/liquidManure shop

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created25.09.2018 15:13


Gamling Hassel (Unknown) 25.09.2018 15:13
Hi!

I added Manure and liquidManure shop to map

filltyp - manure and liquidManure
onCreate - FillTrigger.onCreate

How do i change price on Manure/liquidManure when buying it?

the price is 8000l / 105€ i want it to be more expensive. When you sell 8000l manure you get around 1300€ on Goldcrest Valley.

Bilbo Beutlin (BBeutlin) 25.09.2018 16:33
Add in i3d the user attribute "priceScales". The priceScale is the factor/multiplier relative to the base price.
Example (as xml):
<UserAttribute nodeId="..">
..
<Attribute name="fillTypes" type="string" value="manure liquidManure"/>
<Attribute name="priceScales" type="string" value="1.2 1.2"/>
..
</UserAttribute>

Adjust the priceScales to the desired values.

Gamling Hassel (Unknown) 25.09.2018 17:58
Thanks for the answer!


I added priceScales and changed it to 10 just for testing it, but it's still the same price ingame.


<UserAttribute nodeId="344994">
<Attribute name="fillType" type="string" value="liquidManure"/>
<Attribute name="onCreate" type="scriptCallback" value="FillTrigger.onCreate"/>
<Attribute name="priceScales" type="string" value="10"/>
</UserAttribute>

Bilbo Beutlin (BBeutlin) 25.09.2018 19:12
*argh* I didn't read exactly. FillTriggers don't support priceScale/s anymore (for some reason only Giants knows).
The price is calculated by the "EconomyManager".

You can either change the FillTrigger to a SiloTrigger - this supports priceScales.

Or you change the base price with a little lua script.
Example:
-----------
local ftDesc = FillUtil.fillTypeNameToDesc["manure"]; -- or any other fillType
if ftDesc ~= nil then
ftDesc.pricePerLiter = 1.50; -- here you set the price per liter
end;
-----------
Note that the base price changes the value for buy AND sell.

Gamling Hassel (Unknown) 25.09.2018 19:37
Ok thanks for the answers!

Gamling Hassel (Unknown) 25.09.2018 20:26
The lua scripts work fine.. but is there a way to do it without affecting the price on sell? now you get around 46k€ for 8000 liter which was 1300€ before.



Gamling Hassel (Unknown) 25.09.2018 20:43
The lua scripts work fine.. found a work around on the sell price, i just priceScale on the fillType in map01.xml.



Note: Log in to post. Create a new account here.