Community Forum

change the Price of Wood

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created03.03.2019 21:27


Andre Nierhaus (Dimer24) 03.03.2019 21:27
Hi

I'm traing to Change the Price of Wood not Woodchips.

I find to files

maps_fillTypes.xml

<fillType name="TREESAPLINGS" title="$l10n_fillType_treeSaplings" showOnPriceTable="false" pricePerLiter="1.2" >
<image hud="$dataS2/menu/hud/fillTypes/hud_fill_treeSaplings.png" hudSmall="$dataS2/menu/hud/fillTypes/hud_fill_treeSaplings_sml.png" />
<physics massPerLiter="0.35" maxPhysicalSurfaceAngle="80" />
</fillType>

showOnPriceTable="false" when i change the false to true i will get a Tree in the Pricetable

sellingStationWood.xml

<woodSellStation stationName="$l10n_station_sawmill" triggerNode="0" sellTrigger="1" appearsOnPDA="true">

</woodSellStation>

appearsOnPDA="true" when i change the to true i will get a sign in the PDA

How i have to change the files to change the Price of Wood?

Thanks

Andy

Bilbo Beutlin (BBeutlin) 04.03.2019 00:06
"TREESAPLINGS" as well as "POPLAR" are for planting. If you don't know what "sapling" means use a dictionary.

Since the FS19 LUA 'WoodSellTrigger' isn't published (yet), look in FS17 docs 'WoodSellTrigger' - should be similar.
There the logs are handled as 'splitType'.

So far you might try adjusting the price in the sellStation.xml with the 'priceScale'.

Derek Squire (dezza069) 04.03.2019 00:11
Adjust the 'priceScale="1"' in the sellingStationWood.xml


BTW, not sure if you are or not, but it appears you're modifying the base game files, and consequently may break multiplayer by doing this.


Hope that helps.

Andre Nierhaus (Dimer24) 04.03.2019 09:41
Hi

The file sellingStationWood.xml with the line

<woodSellStation stationName="$l10n_station_sawmill" priceScale="10" triggerNode="0" sellTrigger="1" appearsOnPDA="false" />

priceScale="10" do not work.

I'm not modifying the base game files

In the modDesc.xml

<!-- Test Holzpreis Anpassung -->
<storeItem xmlFilename="maps/sellingStation/sellingStationWood/sellingStationWood.xml" />
<storeItem xmlFilename="maps/sellingStation/sellingStationWoodChips/sellingStationWoodChips.xml" />

But nothing will change.

Thank

Andy





Bilbo Beutlin (BBeutlin) 04.03.2019 15:15
Try with FS17 method: add (in i3d) to the WoodSellTrigger the user attribute (float)priceMultiplier.

Andre Nierhaus (Dimer24) 04.03.2019 22:45
Thanks Bilbo Beutlin

I tried it with the attribute (float)priceMultiplier.


But no change.




Bilbo Beutlin (BBeutlin) 04.03.2019 22:57
I've seen in main forum that you have added 'priceMultiplier' in the xml.
You can read, can't you? I have written: you must add the user attribute in the i3d !
See the FS17 LUADOC Triggers -> WoodSellTrigger -> function new()

Not guaranteed, but probably the old code is taken over to FS19.

Andre Nierhaus (Dimer24) 04.03.2019 23:09
Thanks Bilbo Beutlin

I tried it with the attribute (float)priceMultiplier.


But no change.




PinchTheFarmer 05.03.2019 01:36
You need to modify the priceScale into the Fill Type :

<sellingStation blabla...etc> OR <woodSellStation etc.... attributes >
<fillType name="woodchips" priceScale="2" supportsGreatDemand="true" disablePriceDrop="false" />
</sellingStation> OR </woodSellStation>

Depending of your main node, but normally they are all SellingStation > then you define what fillType they sell inside. I gave you the woodchips type here, it is the same for all wood ? like trunk too ?

You also have fillType "TREESAPLINGS" and "POPLAR"

I have lots of placeable selling stations :) it's like that, but errr are you in FS19 ? :O


Andre Nierhaus (Dimer24) 05.03.2019 06:44
Yes I am in LS 19

The sellingStationWoodChips.xml

<sellingStation stationName="$l10n_station_sawmill" appearsOnPDA="false" storageRadius="0" litersForFullPriceDrop="100000" fullPriceRecoverHours="1">
<unloadTrigger exactFillRootNode="0|0|0|0|0" />
<fillType name="woodChips" priceScale="0.01" supportsGreatDemand="true" disablePriceDrop="false" />
</sellingStation>

The sellingStationWood.xml

<woodSellStation stationName="$l10n_station_sawmill" priceMultiplier="10" triggerNode="0" sellTrigger="1" appearsOnPDA="true" />

I tried the following

My sellingStationWood.xml

<woodSellStation stationName="$l10n_station_sawmill" priceMultiplier="10" triggerNode="0" sellTrigger="1" appearsOnPDA="true" >
<unloadTrigger exactFillRootNode="0" />
<fillType name="????????" priceScale="10.0" supportsGreatDemand="true" disablePriceDrop="false" /> -->
</woodSellStation>

I tried the following entries
name="poplar"
name="treeSaplings"
But they are wrong

Ich weis nicht wie der Richtige Eintrag für Holzstämme lautet
I do not know what the right entry for logs is


Bilbo Beutlin (BBeutlin) 05.03.2019 11:15
I told you already in post above: the logs have no fillType, they are handled in a totally different way.
Since there's no FS19 doc, see for reference LUADOC FS17 -> Triggers -> WoodSellTrigger -> function triggerCallback()
The basic price is 'splitType.pricePerLiter' but there's no xml for splitTypes.
But the function has a price modifier 'self.priceMultiplier' which is taken directly from the WoodSellTrigger user attribute 'priceMultiplier', not from any xml.

Andre Nierhaus (Dimer24) 05.03.2019 23:03
Hi BBeutlin

it does not work. sorry.

<?xml version="1.0" encoding="iso-8859-1"?>

<i3D name="untitled" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
<Asset>
<Export program="GIANTS Editor 64bit" version="8.0.0"/>
</Asset>

<Files>
<File fileId="2" filename="../../../maps/textures/shared/triggerIcons_diffuse.png" relativePath="true"/>
<File fileId="3" filename="../../../shaders/fxCircleShader.xml" relativePath="true"/>
</Files>


<Materials>
<Material name="triggerIcons_mat" materialId="4" alphaBlending="true" customShaderId="3" customShaderVariation="PULSATING">
<Emissivemap fileId="2"/>
<CustomParameter name="scaleParameters" value="0.75 1 2.5 1"/>
</Material>
<Material name="lambert1" materialId="5" diffuseColor="0.494118 0.494118 0.494118 1">
</Material>
</Materials>


<Shapes externalShapesFile="sellingStationWood.i3d.shapes">
</Shapes>


<Dynamics>
</Dynamics>

<Scene>
<TransformGroup name="sellingStationWood" nodeId="10">
<Shape shapeId="1" name="woodSellTrigger" translation="0 1.65 0" static="true" trigger="true" collisionMask="16777216" nodeId="11" materialIds="5" nonRenderable="true" distanceBlending="false"/>
<Shape shapeId="2" name="woodSellStartTrigger" translation="6 0 -7.5" static="true" trigger="true" collisionMask="3145728" clipDistance="300" nodeId="12" materialIds="5" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape shapeId="3" name="triggerIconInteraction" translation="0 1 0" clipDistance="300" nodeId="13" materialIds="4" castsShadows="true" receiveShadows="true">
<Light name="light" nodeId="16" type="point" color="0.75 0.5 0" emitDiffuse="true" emitSpecular="true" decayRate="4" range="3"/>
</Shape>
</Shape>
</TransformGroup>
</Scene>

<UserAttributes>
<Attribute name="priceMultiplier" type="float" value="10.5"/>
</UserAttributes>

</i3D>

The Price always the same, ther must be en other Way.

Thank you for the support BBeutlin

Bilbo Beutlin (BBeutlin) 06.03.2019 02:35
You have added the <UserAttributes> with a text editor?
*sigh* that's totally wrong - right is:
<UserAttributes>
<UserAttribute nodeId="11">
<Attribute name="priceMultiplier" type="float" value="1.5"/>
</UserAttribute>
</UserAttributes>

You had better used the GE to avoid these mistakes.


btw:
Looks like you modified the original sellingStationWood.i3d ?
Are you aware that this disables multiplayer? And next patch your changes are lost.
Should be known that changes should only be done on a mod copy of the original.

Andre Nierhaus (Dimer24) 06.03.2019 09:17
Sorry BBeutlin wrong fiele

sellingStationWood.i3d

<?xml version="1.0" encoding="iso-8859-1"?>

<i3D name="untitled" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
<Asset>
<Export program="GIANTS Editor 64bit" version="8.1.0"/>
</Asset>

<Files>
<File fileId="3" filename="fxCircleShader.xml"/>
<File fileId="2" filename="triggerIcons_diffuse.png"/>
</Files>


<Materials>
<Material name="lambert1" materialId="5" diffuseColor="0.494118 0.494118 0.494118 1">
</Material>
<Material name="triggerIcons_mat" materialId="4" alphaBlending="true" customShaderId="3" customShaderVariation="PULSATING">
<Emissivemap fileId="2"/>
<CustomParameter name="scaleParameters" value="0.75 1 2.5 1"/>
</Material>
</Materials>


<Shapes externalShapesFile="sellingStationWood.i3d.shapes">
</Shapes>


<Dynamics>
</Dynamics>

<Scene>
<TransformGroup name="sellingStationWood" nodeId="10">
<Shape shapeId="1" name="woodSellTrigger" translation="0 1.65 0" static="true" trigger="true" collisionMask="16777216" nodeId="11" materialIds="5" nonRenderable="true" distanceBlending="false"/>
<Shape shapeId="2" name="woodSellStartTrigger" translation="6 0 -7.5" static="true" trigger="true" collisionMask="3145728" clipDistance="300" nodeId="12" materialIds="5" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape shapeId="3" name="triggerIconInteraction" translation="0 1 0" clipDistance="300" nodeId="13" materialIds="4" castsShadows="true" receiveShadows="true">
<Light name="light" nodeId="14" type="point" color="0.75 0.5 0" emitDiffuse="true" emitSpecular="true" decayRate="4" range="3"/>
</Shape>
</Shape>
</TransformGroup>
</Scene>

<UserAttributes>
<UserAttribute nodeId="11">
<Attribute name="priceMultiplier" type="float" value="3"/>
</UserAttribute>
</UserAttributes>

</i3D>

----------------------------------------------

sellingStationWood.xml

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable>
<storeData>
<name>shopItem_sellingStationWood</name>
<image>$data/placeables/mapDE/store_sellingStationWood.png</image>
<price>1</price>
<canBeSold>false</canBeSold>
<showInStore>false</showInStore>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>LIZARD</brand>
<species>placeable</species>
<category>placeableMisc</category>
<vertexBufferMemoryUsage>1464</vertexBufferMemoryUsage>
<indexBufferMemoryUsage>216</indexBufferMemoryUsage>
<textureMemoryUsage>174864</textureMemoryUsage>
<instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
<instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
</storeData>

<placeableType>woodSellPlacable</placeableType>
<filename>maps/objekte/sellingStationWood/sellingStationWood.i3d</filename>
<placement testSizeX="7.5" testSizeZ="10" sizeX="3" sizeZ="3" useRandomYRotation="false" useManualYRotation="true" />

<woodSellStation stationName="$l10n_station_sawmill" triggerNode="0" sellTrigger="1" appearsOnPDA="true" />
</placeable>

--------------------------------------------

defaultItems.xml

<item mapBoundId="sellingStationWood" className="WoodSellStationPlaceable" filename="data/placeables/mapDE/sellingStationWood/sellingStationWood.xml" position="586.5 234.65 -936" rotation="0 0 0" />

----------------------------------

modDesc.xml

<storeItem xmlFilename="maps/sellingStation/sellingStationWood/sellingStationWood.xml" />

---------------------------------

log.txt

2019-03-06 09:00 data/placeables/mapDE/sellingStationBales/sellingStationBales.i3d (1.80 ms)
2019-03-06 09:00 C:/Users/andre/Documents/My Games/FarmingSimulator2019/mods/MeineMap/maps/objekte/sellingStationWood/sellingStationWood.i3d (12.72 ms)
2019-03-06 09:00 data/placeables/mapDE/sellingStationWoodChips/sellingStationWoodChips.i3d (10.96 ms)

----------------------------

I think I did everything right.

Thank you for your patience.

but unfortunately the price is not changed.

Could it be that we have to wait for GIANTS until the documentation is adapted.

BBeutlin Thank you for your patience and support.

Many greetings

Dimer24


Bilbo Beutlin (BBeutlin) 06.03.2019 14:39
No - you didn't do everything right. *g*

In your "defaultItems.xml" the sellStation.xml is still the original from game. And so it will point to the unchanged i3d.

Andre Nierhaus (Dimer24) 06.03.2019 15:58
Hi BBeutlin

Now the right line.

<item mapBoundId="sellingStationWood" className="WoodSellStationPlaceable" filename="$moddir$MeineMap/maps/sellingStation/sellingStationWood/sellingStationWood.xml" position="586.5 234.65 -936" rotation="0 0 0" />

But the Price did change.



Bilbo Beutlin (BBeutlin) 06.03.2019 16:15
Now it's ok. :)
If it still doesn't work, they have changed the code and we'll have to wait for LUADOC update. Is probably to be expected after game v1.3 official release.

Andre Nierhaus (Dimer24) 06.03.2019 16:55
Hi BBeutlin

then we wont to wait.

thank you, for your nerves and time.

That is not self-evident.

Thank you and good time

Dimer24



Kari Halonen (Jurkkis) 14.09.2019 18:45
I cant find anything related to this from luadoc. Would want to edit wood selling prices


Phillip Lund (wopper1) 02.11.2019 04:40
Yeah, tried following this exactly, and followed everything to the letter. Price modifier of -200 to 200 makes no difference. Has anyone figured this out? It really doesn't look like the 19 luadocs addressed this at all. This seems to be the only forum topic that I can find too. Has anyone successfully changed the log prices?

Gtx | Andy (GtX_Andy) 04.11.2019 08:49
There is no multiplier anymore this was removed for some reason..
Are you looking to change the value on all maps you play or just on a specific sell point on a placeable or map placeable?

Cheers,
GtX

Cory Nelson (Unknown) 04.11.2019 13:40
Hey Andy|GtX, I can't speak for everyone else' intentions. but for me, I'd be looking to change it either on a per map or per sellpoint basis. (different prices for different maps).

Phillip Lund (wopper1) 04.11.2019 19:02
I was afraid of that, the attribute being deleted. The need is to have a different price at different woodselltriggers. The concept is a map with multiple sell spots, some easily accessible, some quite difficult to get to, and one of the sell points requiring the manual unloading of the logs and placing in the trigger to sell. We wanted to set up a payment system that would reward the level of effort put in on the part of the player. We've done this kind of thing for all the sell points and buy stations on the map for all fruits except the logs, which unfortunately cannot seem to be modified. Very disappointed as why bother with an out of the way, manual unload sellpoint, when you can just fly an autoload trailer through and sell right off the truck for the exact same price at an easy spot. My mistake for assuming that simple modifier would be left in 19 that made logging so much more interesting in 17. Appreciate your response Andy, at least now I know...ug.

Gtx | Andy (GtX_Andy) 05.11.2019 10:39
I can make you a simple script to include with your mod or map to allow you to add a 'multiplier attribute' if you would like.
This would not be any good for console release obviously.

I just needed to know the use or if you just wanted a global mod to add to your mod folder to multiply the value of all wood sell points or something to include with a mod or map. ;-)

Cheers

Gtx | Andy (GtX_Andy) 05.11.2019 10:57


Phillip Lund (wopper1) 05.11.2019 18:05
Oh wow, ty! Um, probably if a global mod to have the engine accept a modifier on the woodSellTriggers would be the most useful if possible. We often build 4x maps with 3-4 separate sell triggers, some easy, some miserable to access. The ability to set the multiplier for each trigger as in 17 would be fantastic. If it cannot be done globally, implemented on a per mod/placeable would be easy enough to work with. If you're kind enough to figure it out and make it happen, I would strongly suggest you make sure to build the script for credit to yourself. I'd be more than happy to wait for a proper release on your site. Credit where credit is due. Greatly appreciate and follow your work, tyvm.

Gtx | Andy (GtX_Andy) 09.11.2019 03:21
Hey Phillip,

There is no need for me to release this as a mod, I have always liked helping when time allows so everyone can have the experience in the game they want. I will look to add this and many other helper scripts and request scripts to my GIT Hub soon but I have little time at the moment :-(

This is just a simple change to one of the functions that allows the 'multiplier' to be added just like in FS15 and FS17.
If there is not attribute then no change will be made to the price.

You can add this directly to a mod if needed or directly to a map. If part of a map any placeable added containing the attribute will be adjusted as needed.

https://workupload.com/file/ZZQ5UvWw

Just remember to add the following to the modDesc

<extraSourceFiles>
<sourceFile filename="scripts/WoodSellStationMultiplier.lua" />
</extraSourceFiles>

Cheers,
GtX


Phillip Lund (wopper1) 12.11.2019 01:50
I'm speechless...on behalf of myself and the entire community.....thank you SO VERY much! It's perfect!

Jake Hare (Unknown) 08.06.2020 20:36
Hi Andy,

Hopefully you are still active on this.

I am trying to increase the price of logs on a mod sell point trigger please can you explain how you do this with the multiplier? many thanks in advance !! I am so confused.



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