Farming Simulator 19
0 of 0

File information

Last updated

Original upload

Created by

alfalfa6945

Uploaded by

alfalfa6945

Virus scan

Safe to use

Tags for this mod

9 comments

  1. Knottypine
    Knottypine
    • member
    • 1 kudos
    Hey Alfalfa6945,

    I'm curious if this script can be used on a placeable garage? Say one wanted to have a repair bay along with a working wash bay in the same mod. Thanks!
    1. alfalfa6945
      alfalfa6945
      • premium
      • 12 kudos
      Knottypine;

      This script is set up for vehicles, so it wouldn't actually work for a placeable garage. A modder had asked if a mobile pressure washer script was possible, so this is the result of that ;) The trailer I uploaded was a quickly thrown together as I needed something to test the script on, don't judge too harshly :)
    2. Knottypine
      Knottypine
      • member
      • 1 kudos
      Ok thanks. I was looking for my Large Mechanic Shop. Originally I designed it to have a wash bay, but have been unable to find a way to make it functional. As in have the Mechanic shop have both functions, repair/customize and pressure washer. For some reason the whole pressure washer thing eludes me! And scripting is above my skill level.
    3. alfalfa6945
      alfalfa6945
      • premium
      • 12 kudos
      Knottypine;

      One thing you could do is create a "lance" mod. Basically create a modDesc.xml, lance.xml (copy the ingame hds9184MLance.xml from the kaercher directory), an icon for the mod and a storeItem icon. For the lance/hds9184MLance.xml, you would remove the lines:

      <canBeSold>false</canBeSold>
      <showInStore>false</showInStore>

      The defaults are true, so removing those two lines effectively makes them "true". For the modDesc, make sure you have:

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

      And you should then be able to purchase just the wand/lance from the "misc" section. This would at least give you pressure washing ability, though not quite ideal, for sure.
    4. Knottypine
      Knottypine
      • member
      • 1 kudos
      Thanks for the suggestion. Not really ideal for what I would like to do. Currently I just purchased the pressure washer and manually edited my save to move it into position. :)
  2. Karl911
    Karl911
    • member
    • 0 kudos
    Hello, alfalfa6945!
    At the first, sorry for my poor English.
    I`m trying to make a mobile car wash mod with Your specialization. All work great until I try to connect my custom lance. Lance is not equip. No signs at hood 'Fuel... Water ... ' . No possibility to unequipp lance. And I cannot go from my washer for more than 15 meters. I'm not sure if this is a bug, or am I doing something wrong.
    log:
    ...
    2020-01-28 12:38 Error: Running LUA method 'update'.
    2020-01-28 12:38 D:/USERS/Documents/My Games/FarmingSimulator2019/mods/aaa_MobileWasherSpecialization/scripts/MobileWasher.lua:253: attempt to index local 'tool' (a nil value)
    That 2 lines continues many times after I equip a custom lance.

    ModDesk:
    ...
    <storeItems>
    <storeItem rootNode="handTool" xmlFilename="ds9184MLance.xml"/>
    <storeItem rootNode="vehicle" xmlFilename="fire.xml"/>
    </storeItems>
    <vehicleTypes>
    <type name="fire" parent="waterTrailer" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
    <specialization name="aaa_MobileWasherSpecialization.MobileWasher" />
    </type>
    </vehicleTypes>
    ...

    TRAILER: fire.xml:
    ...
    <vehicle type="fire">
    ...
    <highPressureWasher>
    <!-- <handtool filename="data/firstPerson/highPressureWasherLances/kaercher/hds9184MLance.xml" /> -->
    <handtool filename="ds9184MLance.xml" />
    <lance node="fantom" />
    <player playerTrigger="playerTrigger" playerLanceDistance="15" />
    <sounds>
    <motorStart linkNode="fire" file="Sounds/motor53_1.ogg" innerRadius="5.0" outerRadius="80.0" >
    <volume indoor="0.3" outdoor="1.00" />
    <pitch indoor="1.00" outdoor="1.00" />
    <lowpassGain indoor="0.50" outdoor="1.00" />
    </motorStart>
    <motorStop linkNode="fire" file="Sounds/motor53_1.ogg" innerRadius="5.0" outerRadius="80.0" >
    <volume indoor="0.3" outdoor="1.00" />
    <pitch indoor="1.00" outdoor="1.00" />
    <lowpassGain indoor="0.50" outdoor="1.00" />
    </motorStop>
    <motorIdle linkNode="fire" file="Sounds/motor53_2.ogg" innerRadius="5.0" outerRadius="80.0" fadeOut="0.1" >
    <volume indoor="0.3" outdoor="1.00" />
    <pitch indoor="1.00" outdoor="1.00" />
    <lowpassGain indoor="0.50" outdoor="1.00" />
    </motorIdle>
    <!-- optional sounds -->
    <!-- <motorStartWork linkNode="fire" file="Sounds/vtwin_workstart.ogg" innerRadius="5.0" outerRadius="80.0" > -->
    <!-- <volume indoor="0.3" outdoor="1.00" /> -->
    <!-- <pitch indoor="1.00" outdoor="1.00" /> -->
    <!-- <lowpassGain indoor="0.50" outdoor="1.00" /> -->
    <!-- </motorStartWork> -->
    <!-- <motorStopWork linkNode="fire" file="Sounds/vtwin_workstop.ogg" innerRadius="5.0" outerRadius="80.0" > -->
    <!-- <volume indoor="0.3" outdoor="1.00" /> -->
    <!-- <pitch indoor="1.00" outdoor="1.00" /> -->
    <!-- <lowpassGain indoor="0.50" outdoor="1.00" /> -->
    <!-- </motorStopWork> -->
    <!-- <motorIdleWork linkNode="fire" file="Sounds/vtwin_work.ogg" innerRadius="5.0" outerRadius="80.0" fadeOut="0.1" > -->
    <!-- <volume indoor="0.3" outdoor="1.00" /> -->
    <!-- <pitch indoor="1.00" outdoor="1.00" /> -->
    <!-- <lowpassGain indoor="0.50" outdoor="0.75" /> -->
    <!-- </motorIdleWork> -->
    </sounds>
    <!-- <exhaustEffects> -->
    <!-- <exhaustEffect node="exhaustParticle1" filename="$data/particleSystems/shared/exhaust.i3d" /> <!-- Defaults: scaleFactor="1" minScale="0.2" maxScale="0.35" xzRotationsOffset="0 0" exhaustColor="0.0384 0.0359 0.0627 2.0" minExhaustAlpha="0.1" maxExhaustAlpha="2.0" colorScaleFactor="1" --> -->
    <!-- </exhaustEffects> -->
    <!-- <exhaustParticleSystems> -->
    <!-- <exhaustParticleSystem node="0>0|4" file="$data/particleSystems/shared/threshingCutterParticles.i3d" scale="0.1 1 0.1" spriteScaleX="0.1" spriteScaleY="0.1" /> <!-- Defaults: particleColor="0.0384 0.0359 0.0627 2.0" scaleFactor="1" minScale="0.1" maxScale="0.5" --> -->
    <!-- </exhaustParticleSystems> -->
    <consumerConfiguration>
    <fuel usage="0" /> <!-- liters per hour -->
    <water usage="1140" /> <!-- liters per hour -->
    <motorWorkingFactor workingFactor="30" /> <!-- percentage that motor works harder over idle when spraying, affects fuel usage accordingly -->
    </consumerConfiguration>
    </highPressureWasher>
    ...

    LANCE: ds9184MLance.xml
    <?xml version="1.0" encoding="utf-8" standalone="no" ?>
    <handTool>
    <storeData>
    <name>HDS 9/18-4 M</name>
    <functions>
    <function>$l10n_function_highPressureWasher</function>
    </functions>
    <image>$data/placeables/highPressureWasher/kaercher/store_kaercherHDS918-4M.png</image>
    <price>4500</price>
    <lifetime>1000</lifetime>
    <rotation>0</rotation>
    <brand>KAERCHER</brand>
    <canBeSold>false</canBeSold>
    <showInStore>false</showInStore>
    <category>misc</category>
    <species>handTool</species>
    </storeData>
    <handToolType>highPressureWasherLance</handToolType>
    <filename>ds9184MLance.i3d</filename>
    <handNode>
    <firstPerson node="0|0|0" position="0.35 -0.25 -0.4" rotation="17 20 0" />
    <thirdPerson node="0|0|0" position="-0.2 -0.03 0.0" rotation="0 180 270" />
    </handNode>
    <highPressureWasherLance>
    <lance raycastNode="0|0|0|1" washDistance="10" washMultiplier="3" pricePerMinute="10" />
    <effects>
    <effectNode effectNode="0|0|0|2|0" materialType="WASHER" materialTypeId="1" />
    <effectNode effectNode="0|0|0|2|1" effectClass="ParticleEffect" particleType="WASHER_WATER" emitCountScale="7000" />
    </effects>
    <sounds>
    <washing template="PRESSURE_WASHER_WASHING_01" linkNode="0|0|0" />
    </sounds>
    </highPressureWasherLance>
    <targets>
    <target ikChain="leftArm" targetNode="0|0|0|0" targetOffset="0.04 0.066 0">
    <rotationNode id="1" rotation="90 -30 -20" />
    <rotationNode id="2" rotation="0 0 -44" />
    <rotationNode id="3" rotation="0 0 -10" />
    <rotationNode id="4" rotation="0 0 -40" />
    <rotationNode id="5" rotation="0 0 -80" />
    <rotationNode id="6" rotation="0 0 0" />
    <rotationNode id="7" rotation="0 0 -40" />
    <rotationNode id="8" rotation="0 0 -80" />
    <rotationNode id="9" rotation="0 0 0" />
    <rotationNode id="10" rotation="0 0 -40" />
    <rotationNode id="11" rotation="0 0 -80" />
    <rotationNode id="12" rotation="0 0 0" />
    <rotationNode id="13" rotation="0 0 -40" />
    <rotationNode id="14" rotation="0 0 -80" />
    <rotationNode id="15" rotation="0 0 0" />
    </target>
    </targets>
    </handTool>

    I tried to connect my custom lance with another mod (at basic scripts) - FS19_CJF_OERTZEN_375_Cleane Author: CJFarming. It work fine without any errors at log.
    I will be very grateful for the help.
    1. alfalfa6945
      alfalfa6945
      • premium
      • 12 kudos
      Karl911; This was an oversight on my part. What is happening is that the specialization needs to be able to look into the mod folder of the pressure washer for the custom lance/wand, but by default it could not. I've updated the script to allow for custom lances/wands. To use a custom lance, type useCustom="true" on the <handtool> line. Using your mod as the example, it would look like this:

      <handtool filename="ds9184MLance.xml" useCustom="true"/>

      Again, the specialization could not load the wand with the path provided in filename="", let me know if the updated aaa_MobileWasherSpecialization.zip works for you.
    2. Karl911
      Karl911
      • member
      • 0 kudos
      A lot of thanks. All works great!
      A small suggestion. Could You make a option to print or not to print signs 'FUEL' and maybe "WATER" on hood. It can be electric pump or by PTO.
      And it will be great option to combine a fuel (and water) tank of washer and fuel tank of track.
      A little suggestion. Could you make the option to print or not to print the signs “FUEL =” and, possibly, “WATER =” on the hood. After all, an electric pump or a PTO is possible.
      And it would be a great option to combine the fuel tank of washer (and maybe water) and fuel tank of track.
      My case is a fire track. A trailer is a static body of track. I have to set the fuel consumption to 0 and make a very small tank of 0.00001 liters. But the inscription 'fuel = 0' is still annoying.
      Thanks for fast help.
    3. alfalfa6945
      alfalfa6945
      • premium
      • 12 kudos
      Karl911; Ok, I added that into the specialization. To disable fuel display in the help menu, use showFuelLevel="false" on the <consumerConfiguration> line:

      <consumerConfiguration showFuelLevel="false">

      If you don't want anything displayed in the help menu, you can use displayFillLevels="false" on the <consumerConfiguration> line:

      <consumerConfiguration displayFillLevels="false">

      Let me know if that's what you meant and how that works for you