[FS19] How to create custom bunker silos for all fill types

Your forum for all discussions around Modding.
ZGul
Posts: 1
Joined: Thu Feb 08, 2024 12:41 pm

[FS19] How to create custom bunker silos for all fill types

Post by ZGul »

I wanted to create some custom bunker silos for storing wood chips, sugar beets and potatoes. I also wanted to be able to use autodrive to store these things, which means i need a vunker with a trigger for these things. It took a while, but i figured it out and wrote this guide.

Necessary downloads:
Giants Editor (https://gdn.giants-software.com/index.php) (I use version 8.2.2)
Modular Concrete Walls From MrHector (https://www.farming-simulator.com/mod.p ... tle=fs2019)
Bunker Silo Set from TopAce888 (https://www.farming-simulator.com/mod.p ... tle=fs2019)
A photo as a mod icon
A photo as a store icon for each bunker you want to create

1. Creating the bunker wall
a. First create your bunker in the desired size. Write down the inner depth and width of the bunker.
b. You can use the Place Anywhere mod for Farming Simulator 19 (https://github.com/napalm00/FS19PlaceAnywhere) to create covered bunkers like i have done for my potato and sugar beet bunker here.

Tip: The walls are 1m thick and move in increments of 0.5m. You can use this to measure the size, if you are unsure.

My wood chip bunker is 15x24 on the inside
Image


2. Preparing files
a. Start by unzipping the Bunker Silo Set from TopAce888.

b. Delete every file from the folder except:
i. bunkerSiloSingle02.i3d
ii. bunkerSiloSingle02.i3d.shapes
iii. bunkerSiloSingle02.xml
iv. modDesc.xml

c. Open bunkerSIloSingle02.i3d in Giants Editor by double clicking it

d. In the top left corner go into ”File” then ”Save as…” and save the file with your desired name.

e. In the folder delete bunkerSiloSingle02.id3 and bunkerSiloSingle02.id3.shapes and rename bunkerSiloSingle02.xml to the same name as the new id3 and id3.shapes file so it’s only in the folder:
i. yourDesiredName.i3d
ii. yourDesiredName.i3d.shapes
iii. yourDesiredName.xml
iv. modDesc.xml

f. Now open modDesc.xml
i. This is an XML file that consists of a lot of elements, that are defined by opening and closing tags. An element looks like this <tag> content </tag>. This would be a name element for example: <name>Custom Bunker Silo</name>.
ii. We must change a lot of elements in this file and we can optionally change some.
iii. Musts:
1. l10n: the entire element should be deleted
2. iconFileName: here you should change the file name to the name of the image you want to use as a mod icon.
3. storeItems: here you should delete every <storeItem> element except one. In the one you keep you should change xmlFilename=”…” to xmlFilename=”yourDesiredName.xml”. If you later decide to add more than one bunker to the mod, you should link to them here by creating more <storeItem> elements.

iv. Optionals:
1. authour: change author name
2. version: change version (must be 4 number separated by dots)
3. title: change the title. Use different elements within the title element to change the title for different languages e.g. <en> for English or <de> for German.
4. description: change the descript. Use different language elements for different languages as in the title. Note: the description body should be within CDATA tags like this: <en> <![CDATA[Type your description here]]> </en>

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="53">
    <author>yourDesiredAuthorName</author>
    <version>1.0.0.0</version>
    <title> 
        <en>Custom Bunker Silos</en>
    </title>
    <description>
        <en> <![CDATA[Custom bunker silos for all fill types]]>
        </en>
    </description>

    <multiplayer supported="true"/>
    <iconFilename>modIcon.png</iconFilename>

    <storeItems>
        <storeItem xmlFilename="yourDesiredName.xml"/>
    </storeItems>
</modDesc>
v. If you copy my file to modDesc.xml you should change:
1. ”yourDesiredAuthorName” to your desired autor name
2. ”modIcon.png” to the name of your mod icon
3. ”yourDesiredName.xml” to the name of the xml-file you set i step 2.e

vi. Then save the file as modDesc.xml again

g. Later we will also change some things in yourDesiredName.xml but first we will create the bunker area

3. Creating the bunker area
a. Open yourDesiredName.i3d in the Giants Editor by double clicking it.
Image

b. Towards the top left corner you should see a field called ”Scenegraph” (if you dont click on window in the top bar and then click in Scenegraph)

c. In the scenegraph click in the little plus next to ”bunkerSiloSingle”. This allows you to see the contents of the bunker silo model.
Image

d. Delete ”visuals” in the model by selecting it (it should be blue) and then pressing delete on your keyboard.
Image

e. Now open ”warningStripes” by clicking the little plus and then open ”silo01” the same way.

f. Then delete the top 2 objects in ”silo01” called ”warningStripesCorner1” and ”warningStripesCorner2” so there is only one of each.
Image

g. Now we have to change the size of the triggers, that are left to the size of our bunker. To do this we have to create a plane to help us see how big our bunker area is.

h. Start by deselecting everthing then press ”create” in the top bar, go down to primitives and select plane.
Image

i. We have to change the size of this plane to the size of the inside area of our bunker, that you noted earlier.

j. We do this in the attributes tap in the top right of the screen (if you dont have this tap click ”attributes” under ”windows” in the top menu)

k. In the attributes tap we have to change ”Scale X” to the width of our bunker area and ”Scale Z” to the depth of our bunker area.

l. Now we can change the size of our bunker are. Start by selecting ”interactionTrigger” under ”bunkerSiloSingle” then ”bunkerSilos” then ”bunkerSilo01”. In the attributes tab find the checkbox that says ”Visibility” and make sure, that it’s checked.
Image

m. To resize the interactionTrigger width hover over the red square til it turns yellow and then drag it to the right size. Do the same to the depth by dragging the little blue square. You can see the scale change under ”Scale X” and ”Scale Z” in the attributes tab.
Image

n. We also need to change the position of ”start”, ”width” and ”height” under ”bunkerSiloArea” in the scenegraph.
i. Change the position of ”start” in the attributes tab by setting ”Translate X” to half the width of your bunker area + 0.5 and multiply it by -1 so it becomes a negative number and by setting ”Translate Z” to the depth of your bunker area + 0.5 (should be a positive number).
Image
Image

ii. Change the position of ”width” in the attributes tab by setting ”Translate X” to half the width of your bunker area + 0.5 (should be a positive number) and by setting ”Translate Z” to the depth of your bunker area + 0.5 (should be a positive number).
iii. Change the position of ”height” in the attributes tab by setting ”Translate X” to half the width of your bunker area + 0.5 and multiply it by -1 so it becomes a negative number and by setting ”Translate Z” to the depth of your bunker area + 0.5 and multiply it by -1 so it becomes a negative number.

o. Now we need to do the same to the 2 warningStripes:
i. Change the position of ”warningStripesCorner1” in the attributes tab by setting ”Translate X” to half the width of your bunker area (should be a positive number) and by setting ”Translate Z” to the depth of your bunker area and multiply it by -1 so it becomes a negative number.
ii. Change the position of ”warningStripesCorner1” in the attributes tab by setting ”Translate X” to half the width of your bunker area and multiply it by -1 so it becomes a negative number and by setting ”Translate Z” to the depth of your bunker area and multiply it by -1 so it becomes a negative number.
Image

p. Lastly we need to change the position of ”areaStart”, ”areaWidth” and ”areaHeight” in ”areaDefinition" the same way as above.
i. Do the same as step 3.n.i to 3.n.iii for alle three. Just add a bit more than 0.5 (maybe 3). This is what decides how far out your terrain will be levelled and cleared of stuff.
Image

q. Now we are done resizing the triggers so we can select the plane in the scenegraph and the delete it.


r. Then save and close the Giants Editor

4. More file modification
a. I said we would still need to do some changes in yourDesiredName.xml. The time has come to open the file.
b. Once more we must change several things. There are musts and optionals
c. Must:
i. Image: change this to the image file you want as an icon in the store
ii. Filename: change this to yourDesiredName.i3d
iii. Placement: here you should change sizeX to the width of your bunker area and sizeZ to the depth. You should also change placementPositionSnapSize to 0.5 to allow it to fit exactly between your bunker walls.
iv. bunkerSilo: change acceptedFillTypes to the filltypes you want to able to tip into the silo. Note: your bunker can only hold one type. This means, that if you write multiple filltypes here they will all be converted to a single filltype when tipping in the silo.
Change inputFilltype. This is the filltype that everything will be changed to when tipping in the silo. Also change outputFilltype. This is what will come out of the bunker after it’s done fermenting.
v. Area: change it to this: <area startNode="0|0|1|0" widthNode="0|0|1|1" heightNode="0|0|1|2" />
vi. interactionTrigger: <interactionTrigger node="1|0|0" />
vii. triggerMarker: <triggerMarker node="1" />
viii. clearArea: <clearArea startNode="2|0" widthNode="2|1" heightNode="2|2"/>
ix. levelArea: <levelArea startNode="2|0" widthNode="2|1" heightNode="2|2"/>
x. maskArea: <maskArea startNode="2|0" widthNode="2|1" heightNode="2|2" />
xi. tipOcclusionUpdateArea: change change sizeX to the width of your bunker area and sizeZ to the depth.

d. Optional:
i. Name: name of the mod in the store
ii. Function: description in shop
iii. fillTypes: fill type icons in the shop (a list of filltypes can be found here: https://gdn.giants-software.com/thread. ... eadId=7479)
iv. price
v. dailyUpkeep

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable>
    <storeData>
        <name>nameOfBunkerSiloInShop</name>
        <functions>
            <function>descriptionInShop</function>
        </functions>
        <specs>
            <fillTypes>desiredFillType</fillTypes>
        </specs>
        <image>storeIcon.png</image>
        <price>1000</price>
        <dailyUpkeep>1</dailyUpkeep>
        <lifetime>1000</lifetime>
        <rotation>0</rotation>
        <brand>LIZARD</brand>
        <species>placeable</species>
        <category>silos</category>
        <vertexBufferMemoryUsage>15680</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>2784</indexBufferMemoryUsage>
        <textureMemoryUsage>5898488</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <placeableType>bunkerSiloPlaceable</placeableType>
    <filename>yourDesiredName.i3d</filename>
    <placement testSizeX="0.001" testSizeZ="0.001" sizeX="15" sizeZ="24" useRandomYRotation="false" useManualYRotation="true" placementPositionSnapSize="0.5" placementRotationSnapAngle="90"/>

    <bunkerSilos>
        <bunkerSilo acceptedFillTypes="desiredAcceptedFillTypes" inputFillType="desiredInputFillType" outputFillType="desiredOutoutFillType" fermentingHours="6" distanceToCompactedFillLevel="100" openingLength="5" >
            <area startNode="0|0|1|0" widthNode="0|0|1|1" heightNode="0|0|1|2" />
            <interactionTrigger node="1|0|0" />
        </bunkerSilo>
    </bunkerSilos>

    <triggerMarkers>
        <triggerMarker node="1" />
    </triggerMarkers>

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

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

    <seasons>
        <maskAreas>
            <maskArea startNode="2|0" widthNode="2|1" heightNode="2|2" />
        </maskAreas>
    </seasons>

    <tipOcclusionUpdateArea sizeX="15" sizeZ="24" />

</placeable>
5. Finishing touches
a. Now you should just turn the folder into a zip-file (using 7zip or WinRAR) and put it into your mod folder.
Image