Community Forum

boughtWithFarmland doesn't work

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created23.05.2019 17:47


Martin Lund Kristensen (Lundy836) 23.05.2019 17:47
I've tried just about everything with this, but can't get it working in my map.
I am trying to make buildings with triggers being bought when you buy the land they are on, and added the following to XML file of the building:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable>
<storeData>
<name>$l10n_animalPen_cow2</name>
<image>data/placeables/animalHusbandry/store_husbandryCowLarge.png</image>
<price>1</price>
<canBeSold>false</canBeSold>
<showInStore>false</showInStore>
<boughtWithFarmland>true</boughtWithFarmland>
<functions>
<function>$l10n_function_animalPenCow</function>
</functions>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>Lizard</brand>
<species>placeable</species>
<category>animalpens</category>
<vertexBufferMemoryUsage>1221784</vertexBufferMemoryUsage>
<indexBufferMemoryUsage>147174</indexBufferMemoryUsage>
<textureMemoryUsage>25116168</textureMemoryUsage>
<instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
<instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
</storeData>

and the defaultItems.xml has the following line for the building:
<item className="AnimalHusbandry" filename="$moddir$FS19_Eiersholt/maps/placeables/animalHusbandry/husbandryCowLarge.xml" position="0 0 0" rotation="0 0 0" defaultFarmProperty="true" farmId="1" />

and it works perfectly fine in new farmer mode. The building is there as intended, but when I am going in to Farm manager mode or start from scratch, the building and triggers are not being loaded when I buy the land they are placed on...

Am I trying to do something impossible here?

Derek Squire (dezza069) 24.05.2019 08:34
It's possible you're misinterpreting your expectations/functioning of the different modes.

Bilbo Beutlin (BBeutlin) 24.05.2019 08:55
If you have an item with attribute defaultFarmProperty="true" this is indeed depending on start mode.

If you don't want this, you must use an XML entry like the 'shared' items. Take the BGA as example.

Martin Lund Kristensen (Lundy836) 24.05.2019 15:40
I think I might have to let go of my idea of having "static" buildings that would be loaded no matter what mode you were in, but were only yours in the New farmer mode. However in the other modes, you could buy the land they were on, and the building would become yours including the functions these building may have.
@Derek Squire you might be right, that I was misinterpreting what could be done in the different modes. But thanks anyway :)


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