FarmSim_Mod_SoilMod icon indicating copy to clipboard operation
FarmSim_Mod_SoilMod copied to clipboard

Sprayer Fill Types and UPK fill-trigger

Open jhomer opened this issue 10 years ago • 2 comments

Hey Decker, This in a way is related to issue #8 I was working on a mod that involves the UPK mod for a placeable. This mod has a processor that needs water and money to create the fill levels of your fill types. (Using money instead of creating 9 new fill types) I have it set that one can load the 10 spray types from the same spot, these triggers can be activated and deactivated for which spray type is needed. (CP friendly)

My question is I think back in 2013 that you had somehow implemented these fill types into all sprayers and in 15 this may not be the case? This mod is using fill triggers instead of sprayer fill triggers and the only way I could get any of the others except fertilizer to load was by adding them to the corresponding vehicle xml. I tried using sprayer fill triggers but I think the UPK script does not allow different fill types other than fertilizer. Here's a line from that script which I'm assuming has something to do with it: self.fillFillType = UniversalProcessKit.FILLTYPE_FERTILIZER So I think this won't allow any other fill types. This probably is more to do with the UPK than anything but thought I'd see what you thought. Thanks for your time!

jhomer avatar Apr 06 '15 23:04 jhomer

Several things:

  • Which version of the UPK mod are you using?
  • Can you supply me with your placeable, so I have the possibility to test what is going on?
  • In fmcModifySprayers.lua I am adding (forcing) extra spray-/fill-types to be accepted by the equipment, only if it already accepts FILLTYPE_FERTILIZER and does not have any of the other of SoilMod's fill-types also. (See fmcModifySprayers.overwriteSprayer1())
    • But you write that adding them to the vehicle xml, then it works, makes me think there's something odd going on, either in SoilMod, UPK or the base-game's scripts.
  • The game's default sprayer-fill-trigger can only "contain" one fill-type. So what UPK may or may not do with that trigger object, I have currently no clue about.

DeckerMMIV avatar Apr 07 '15 16:04 DeckerMMIV

I'm using 0.9.8. I will try the unreleased 0.9.9 yet and see what happens..... I will try a few more things with this yet and then I'll send you a "drop box" to your FS-UK PM. I want to try every possible option before I send just to eliminate any other solutions and so I don't waste your time so it may be a couple days yet.

I should also note that this uses a UPK fill trigger instead of a UPK sprayer fill trigger. (fill trigger doesn't require activation, it fills when the vehicle is in the trigger) A boolean can be added to allow certain vehicles- allowSprayer. I don't think the UPK sprayer fill trigger allows changing the fill type to something other than "fertilizer". Maybe it would be needed to adapt the UPK_sprayerfilltrigger to allow other fill types. Here's a link to the gitHub for the UPK mod for future reference if you need the mod: https://github.com/mor2000/UniversalProcessKit_FS15

Yes, so far the only filling other than fertilizer was done by adding to the vehicle xml.

Just so you know I should also note that my scripting knowledge is somewhat similar to that of a newborn baby. The UPK mod helps non-scripters make mods do certain things that would otherwise probably not be possible.

Edit: One more note is that I have 10 different fill triggers that can be activated and deactivated (one by one) so each fill trigger fills one of the Soil Mods 10 fill types.

jhomer avatar Apr 08 '15 01:04 jhomer