loki79uk / FS22_UniversalAutoload

Mod for FS22. Please download latest release below.
122 stars 35 forks source link

Define <universalAutoload> in anyCustomPallet.xml #216

Closed BonzTM closed 10 months ago

BonzTM commented 11 months ago

Hello, I have a pack where I modify existing Platinum DLC Giants pallets and have to define them in UniversalAutoload.xml or ContainerTypes.xml to get them to pack as efficiently as you have them configured.

Since pallet configs are considered a vehicle type, I would like to be able to add the <universalAutoload><containerConfigurations></></> config to the pallet.xml so that my users don't need a custom edited version of UAL (on our dedicated server)

loki79uk commented 10 months ago

You shouldn't ever need to edit the UAL mod itself. Add a config file in ..\FarmingSimulator2022\modSettings\UniversalAutoload.xml (on the server) and any parameters set in there should be used by everyone.

BonzTM commented 10 months ago

You shouldn't ever need to edit the UAL mod itself. Add a config file in ..\FarmingSimulator2022\modSettings\UniversalAutoload.xml (on the server) and any parameters set in there should be used by everyone.

This isn't at all what I was asking a month ago. I wanted UAL to parse my custom pallet.xml files if they had a stanza.

No worries; I ended up just writing my own mod to inject custom configs into the UAL configs at runtime

loki79uk commented 10 months ago

I could add that feature but there are a few reasons it is low priority.

First, if you give the new pallets a unique i3d name (don't reuse the name from the one you copied) then UAL will use the actual sizes defined in the xml, e.g.

    <base>
        <typeDesc>$l10n_typeDesc_pallet</typeDesc>
        <filename>$data/objects/pallets/bakeryBoxPallet/bakeryBoxPallet.i3d</filename>
        <size width="1.4" length="1" height="1.1" />
        ...
    </base>

I used to have the opposite behaviour, where unknown pallets always picked up the size as above, but literally no one (apart from Dazed) set the size correctly, so it was more often correct to assume that the i3d file had simply been copied without editing it.

Second, I almost have working new code that will automatically detect a 3d bounding box for any object, and so all of the specified pallet sizes will be obsolete in a future version (probably 2.0).