Understanding baletypes and balers

Your forum for all discussions around Modding.
Firestar_Jes
Posts: 1
Joined: Fri Mar 05, 2021 3:34 pm

Understanding baletypes and balers

Post by Firestar_Jes »

Hi

So i've delving a bit into modding, and there is something i'm not quite sure how works.

In ModDesc.xml we can have this:

Code: Select all

<baleTypes>
        <baleType filename="bales/baleStraw121324.i3d" fillType="STRAW" isRoundBale="false" width="1.2" height="1.3" length="2.4" diameter="nil"/>
        <baleType filename="bales/baleHay121324.i3d" fillType="DRYGRASS_WINDROW" isRoundBale="false" width="1.2" height="1.3" length="2.4" diameter="nil"/>
        <baleType filename="bales/baleGrass121324.i3d" fillType="GRASS_WINDROW" isRoundBale="false" width="1.2" height="1.3" length="2.4" diameter="nil"/>
    </baleTypes>
As far as i understand this defines the actual bales on that this mods adds, and the models for them.
How are these connected to a baler, i see in, as an example, the Hesston baler, this defined in the xml for it:

Code: Select all

<baler fillScale="1" maxPickupLitersPerSecond="300">
        <baleAnimation node="baleRootNode" firstBaleMarker="0.6524" scaleNode="baleAnimation" baleNode="baleNode" >
            <key time="0"      pos="0 0 0"      rot="0 0 0"/>
            <key time="0.6524" pos="0 0 -2.4" rot="0 0 0" />
            <key time="1"      pos="0 0 -3.66"  rot="0 0 0"/>
        </baleAnimation>
        <baleTypes>
            <baleType isRoundBale="false" width="1.2" height="1.3" length="2.4" />
        </baleTypes>
What i'm not quite sure about is how the baletype in the above knows which actual bale model to use, is it determined only through the Width, height and length fields? And what happens if two different mods define the same baletypes with the same width, height and length?

The reason i'm asking this is, what happens for example, if i use the above Hesston baler on Chellington_Valley, and start using it on the alfalfa that is defined in that map. As i see the filltype the baler takes is just the windrow category as defined here:

Code: Select all

<fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unit="$l10n_unit_literShort" fillTypeCategories="windrow" capacity="6000" />
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>
It seems to be not limited to anything else.

I think one of these happens, but would like to know for sure (and yes i could just test it, but would like to hear if anyone knows it in detail.

1. The baler scoops it up, but never produces an actual bale, as chellington doesn't define any baletypes with the correct width, height and length of the alfalfa type
2. The game just selects the closest match in all the baletypes defined?

Does anyone know?