Community Forum

BgaPlaceable Error

Forum Overview >> Scripting

CategoryScripting
Created29.12.2018 18:49


Dominik C (acert) 29.12.2018 18:49
Hi!

I built a new placeable BGA. When i want to buy it in the store, i got this LOG Error:


2018-12-29 18:44 Error: Invalid placeable type 'FS19_PLACEABLE_SmallBGA.Bga'
2018-12-29 18:44 Error: Running LUA method 'mouseEvent'.
2018-12-29 18:44 dataS/scripts/gui/PlacementScreenController.lua(173) : attempt to index field 'placeable' (a nil value)


this is my placeable BGA xml File:


<placeableType>Bga</placeableType>
<filename>BGA_Small.i3d</filename>
<placement testSizeX="36.0" testSizeZ="36.0" sizeX="30" sizeZ="30" useRandomYRotation="false" useManualYRotation="true"/>

<clearAreas>
<clearArea startNode="0|0" widthNode="0|0|0" heightNode="0|0|1"/>
</clearAreas>

<leveling requireLeveling="true" maxSmoothDistance="10" maxSlope="75" maxEdgeAngle="30">
<levelAreas>
<levelArea startNode="1|0" widthNode="1|0|0" heightNode="1|0|1" groundType="grass"/>
<levelArea startNode="1|1" widthNode="1|1|0" heightNode="1|1|1" groundType="gravel"/>
<levelArea startNode="1|2" widthNode="1|2|0" heightNode="1|2|1" groundType="concrete"/>
</levelAreas>
</leveling>

<sounds>
<work file="$data/sounds/maps/details/shared/biogas_loop.wav" linkNode="0|10" innerRadius="10" outerRadius="50" loops="0" fadeIn="0.5" fadeOut="0.7" />
</sounds>


<bga>
<bunkerSilos>
<bunkerSilo acceptedFillTypes="chaff grass_windrow dryGrass_windrow" inputFillType="chaff" outputFillType="silage" fermentingHours="6" distanceToCompactedFillLevel="100" openingLength="5" >
<area startNode="0|9|2|0|1|0" widthNode="0|9|2|0|1|1" heightNode="0|9|2|0|1|2" />
<interactionTrigger node="0|9|2|0|0" />
</bunkerSilo>
</bunkerSilos>


<digestateSilo>
<loadingStation node="1|0" stationName="$l10n_station_bgaBunker" appearsOnPDA="false" storageRadius="50" fillSoundIdentifier="fillSound01">
<loadTrigger triggerNode="0" fillLitersPerSecond="2000" dischargeNode="1" />
</loadingStation>
<storages>
<storage node="1|1" fillTypes="DIGESTATE" capacityPerFillType="800000" />
</storages>
</digestateSilo>
</bga>


<bunker>
<unloadingStation node="0|9|0|0" stationName="$l10n_station_bgaBunker" appearsOnPDA="true" appearsOnStats="true" storageRadius="0" hotspotTextOffset="0px -8px">
<unloadTrigger exactFillRootNode="0" baleTriggerNode="1"/>
</unloadingStation>

<slot capacity="50000" litersPerSecond="10" >
<fillType fillTypes="silage manure" scale="0.4" pricePerLiter="0.2"/>
<fillType fillTypes="grass_windrow dryGrass_windrow" scale="0.2" pricePerLiter="0.044"/>
<display baseNode="0|1" />
</slot>
<slot capacity="50000" litersPerSecond="10">
<fillType fillTypes="liquidManure" scale="0.3" pricePerLiter="0.16"/>
</slot>
</bunker>


If i set the placeableType to <placeableType>Placeable</placeableType>, then i can buy the object, but it has no funtion.


Can anybody help me?


Thanks!

Bilbo Beutlin (BBeutlin) 29.12.2018 23:48
A short look into default placeable bga's and you would know what's wrong.
Must be
<placeableType>bgaPlaceable</placeableType>

Dominik C (acert) 30.12.2018 14:03
I have tried different variations,

same Error here with the <placeableType>bgaPlaceable</placeableType>


2018-12-30 14:01 Error: Invalid placeable type 'FS19_PLACEABLE_SmallBGA.bgaPlaceable'
2018-12-30 14:01 Error: Running LUA method 'mouseEvent'.
2018-12-30 14:01 dataS/scripts/gui/PlacementScreenController.lua(173) : attempt to index field 'placeable' (a nil value)

Bilbo Beutlin (BBeutlin) 30.12.2018 16:18
Compare your bga (i3d and xml) with the default bga's in mapDE, mapUS, mapSA (Estancia).

Dominik C (acert) 30.12.2018 20:23
Ive found no differences in the files

Bilbo Beutlin (BBeutlin) 30.12.2018 21:50
And what about the xml <storeData> ?
Anyway - you should take a default bga.xml as template and change it according your bga.i3d.

Dominik C (acert) 02.01.2019 16:40
I used the exact 1:1 files from the original Bga, it still gets the same Error "Invalid placeable type"

i think, there is no defined type for the BGA eg. the "sellingStaion", "buyingStation", "bunkerSilo" ...



so how can i register a new placeable type? (the Bga) i think when i register this new placeable type, i can load the original Bga script from the scripting LUA so it will work





Jos Kuijpers (Unknown) 02.01.2019 17:24
can you try using 'bgaPlacable' ?

Dominik C (acert) 02.01.2019 17:41
i tried bgaPlacable, and many other types. Same Error

Bilbo Beutlin (BBeutlin) 04.01.2019 17:58
Must be something wrong with your xml.

Is this the COMPLETE xml you posted above?
Then there is missing the section <storeData>
Also needs all the xml to be included in <placeable>.

I'd suggest you DL the Giants' Estancia Lapacho, copy the complete bga.xml 1:1, merely adapt according your individual properties.

Jos Kuijpers (Unknown) 04.01.2019 18:23
Make sure you add the placeable to your modDesc storeItems

Dominik C (acert) 04.01.2019 23:55
its still not working.

Here are the COMPLETE xml files:




Moddesc:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="40">
<author>acert</author>
<version>1.0</version>
<title>
<en>BGA Small</en>
<de>Dies ist die kleine Biogasanlage</de>
</title>
<description>
<en>BGA Small</en>
<de>Dies ist die kleine Biogasanlage</de>
</description>
<iconFilename>store_BgaCustom.png</iconFilename>
<brandFilename>brand_acert.png</brandFilename>
<multiplayer supported="true"/>


<storeItems>
<storeItem xmlFilename="CustomBga.xml"/>
</storeItems>

<brands>
<brand name="PhoenixModding" title="Phoenix Modding" image="brand_acert.png"/>
</brands>


</modDesc>







BGA XML:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable>
<storeData>
<name>Dies ist die kleine BGA Anlage</name>
<image>store_BgaCustom.png</image>
<price>1</price>
<lifetime>1000</lifetime>
<rotation>0</rotation>
<brand>LIZARD</brand>
<species>placeable</species>
<category>placeableMisc</category>
<vertexBufferMemoryUsage>25248</vertexBufferMemoryUsage>
<indexBufferMemoryUsage>3336</indexBufferMemoryUsage>
<textureMemoryUsage>1179768</textureMemoryUsage>
<instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
<instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
</storeData>

<placeableType>bgaPlaceable</placeableType>

<filename>CustomBga.i3d</filename>
<placement testSizeX="26.0" testSizeZ="26.0" sizeX="20" sizeZ="20" useRandomYRotation="false" useManualYRotation="true"/>


<clearAreas>
<clearArea startNode="3|0" widthNode="3|0|0" heightNode="3|0|1"/>
</clearAreas>

<leveling requireLeveling="true" maxSmoothDistance="10" maxSlope="75" maxEdgeAngle="30">
<levelAreas>
<levelArea startNode="4|0" widthNode="4|0|0" heightNode="4|0|1" groundType="grass"/>
<levelArea startNode="4|1" widthNode="4|1|0" heightNode="4|1|1" groundType="gravel"/>
<levelArea startNode="4|2" widthNode="4|2|0" heightNode="4|2|1" groundType="concrete"/>
</levelAreas>
</leveling>

<bga>

<bunker>
<unloadingStation node="0|0" stationName="Kleine BGA" appearsOnPDA="true" appearsOnStats="true" storageRadius="0" hotspotTextOffset="0px -8px">
<unloadTrigger exactFillRootNode="0" baleTriggerNode="1"/>
</unloadingStation>

<slot capacity="50000" litersPerSecond="10" >
<fillType fillTypes="silage manure" scale="0.4" pricePerLiter="0.2"/>
<fillType fillTypes="grass_windrow dryGrass_windrow" scale="0.2" pricePerLiter="0.044"/>
<display baseNode="0|1" />
</slot>
<slot capacity="50000" litersPerSecond="10">
<fillType fillTypes="liquidManure" scale="0.3" pricePerLiter="0.16"/>
</slot>
</bunker>

<digestateSilo>
<loadingStation node="1|0" stationName="$l10n_station_bgaBunker" appearsOnPDA="false" storageRadius="50" fillSoundIdentifier="fillSound01">
<loadTrigger triggerNode="0" fillLitersPerSecond="2000" dischargeNode="1" />
</loadingStation>
<storages>
<storage node="1|1" fillTypes="DIGESTATE" capacityPerFillType="800000" />
</storages>
</digestateSilo>

<sounds>
<work file="$data/sounds/maps/details/shared/biogas_loop.wav" linkNode="0|2" innerRadius="10" outerRadius="50" loops="0" fadeIn="0.5" fadeOut="0.7" />
</sounds>
</bga>

<bunkerSilos>
<bunkerSilo acceptedFillTypes="chaff grass_windrow dryGrass_windrow" inputFillType="chaff" outputFillType="silage" fermentingHours="6" distanceToCompactedFillLevel="100" openingLength="5" >
<area startNode="2|0|1|0" widthNode="2|0|1|1" heightNode="2|0|1|2" />
<interactionTrigger node="2|0|0" />
</bunkerSilo>
</bunkerSilos>

<dayNightObjects>
<dayNightObject node="0|3" visibleDay="false" visibleNight="true" />
</dayNightObjects>

</placeable>




Dominik C (acert) 04.01.2019 23:59
Also tried it with the

<canBeSold>true</canBeSold>
<showInStore>true</showInStore>

parameters in the xml

Bilbo Beutlin (BBeutlin) 05.01.2019 12:28
The files seems ok.
Try in modDesc.xml
<storeItem rootNode="placeable" xmlFilename="CustomBga.xml"/>

Dominik C (acert) 06.01.2019 14:38
still the same Error.

It must be a problem in the placementscreen, because the Error occours, when i click on the objekt in the store. The Error contains the "invalid placeable type"

Bilbo Beutlin (BBeutlin) 06.01.2019 20:48
Try with a test map without BGA. Might be, you can't add another BGA to map.

Or the BGA isn't suitable for manual placing. Try including it in the "defaultItems.xml".

Gonimy Vetrom (Vasilius) 30.10.2021 21:36
Probably the main object has no collision.


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