Code Monkey home page Code Monkey logo

tirepressure's Introduction

Tire pressure system for Farming Simulator 19

For Farming Simulator 19 Releases

Make sure to add the following (besides the specialization entry) to your modDesc:

The registering of actions.

<actions>
    <action name="TP_AXIS_PRESSURE" axisType="FULL"/>
    <action name="TP_TOGGLE_PRESSURE" axisType="HALF"/>
</actions>

The binding of inputs (which key maps to what action).

<inputBinding>
    <actionBinding action="TP_TOGGLE_PRESSURE">
        <binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_p"/>
    </actionBinding>
    <actionBinding action="TP_AXIS_PRESSURE">
        <binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_pageup" axisComponent="+"/>
        <binding device="KB_MOUSE_DEFAULT" input="KEY_lctrl KEY_pagedown" axisComponent="-"/>
    </actionBinding>
</inputBinding>

The localisation entry.

<l10n>
    <text name="information_tirePressure">
        <en>Tire pressure [target: %1.2f bar] [current: %1.2f bar]</en>
        <de>Reifenluftdruck [Soll: %1.2f bar] [Ist: %1.2f bar]</de>
        <es>Presión Neumático [Fijar en: %1.2f bar] [Actual: %1.2f bar]</es>
    </text>
    <text name="action_toggleTirePressure">
        <en>Toggle pressure</en>
        <de>Druck ändern</de>
        <es>Cambiar presión</es>
    </text>
    <text name="input_TP_TOGGLE_PRESSURE">
        <en>Update pressure</en>
        <de>Druck aktualisieren</de>
        <es>Actualizar presión</es>
    </text>
    <text name="input_TP_AXIS_PRESSURE_1">
        <en>Inflate</en>
        <de>Aufpumpen</de>
        <es>Inflar</es>
    </text>
    <text name="input_TP_AXIS_PRESSURE_2">
        <en>Deflate</en>
        <de>Ablassen</de>
        <es>Desinflar</es>
    </text>
</l10n>

In the vehicle xml you can configure the following (which are all OPTIONAL):

  • min: the minimum kPa
  • max: the maximum kPa
  • configurationName: if you want to activate tire pressure for specific configurations you can use this entry to specify the configuration. (e.g. wheels)
  • configurationIndices: the indexes of the given configurationName that should activate the tire pressure.

PLEASE NOTE: configurationIndices can only be used when configurationName is set.

Below an example entry for your vehicle XML. Don't blindly copy paste as you will have to change the attributes yourself to the correct values or remove them when not needed.

If you only want to active it for a specific configuration/configurations you will have to set the configurationName and configurationIndices attributes.
<tirePressure min="X (OPTIONAL -> DEFAULT 80)" max="X (OPTIONAL -> DEFAULT 180)" configurationName="wheels (OPTIONAL)" configurationIndices="2 8 9 (INDEXES OF THE CONFIGURATION)">
    <sounds>
        <air template="DEFAULT_SOWING_AIR_BLOWER">
        <volume indoor="0.4" outdoor="0.85" />
            <pitch indoor="1.0" outdoor="1.0" >
                <modifier type="VALVE_LOAD" value="0.00" modifiedValue="0.80" />
                <modifier type="VALVE_LOAD" value="1.00" modifiedValue="1.20" />
            </pitch>
        </air>
    </sounds>
</tirePressure>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.