Posts made by skipper_is
posted in MudRunner - Modding read more

@Sodoma, Ah nice! You guys have taken the idea and run with it! I've been busy with teaching for the past couple of weeks, so haven't been able to look any further into this.

Still the question though, the truck object (and the wheel objects too...), what other properties do the objects have? Ideally I'd like something like - then we can have a lookup table for gear ratios.
In @Pavel 's explanation of engine mechanics, you're referring to a number of variables from the xml file, eg fGearAngVel. Is this exposed to any of the objects/classes in the lua?
The wheels object, for example, takes wheel.radius from the wheel XML, same with wheel.width.

posted in MudRunner - Modding read more

Looks seriously good!

posted in MudRunner - Modding read more

And ideally a list of the truck object properties....

posted in MudRunner - Modding read more

Ah, fair enough
This is my shifter:
Need to do some lettering, some sort of cover on the threaded bar, and maybe a new knob... Doesn't look nearly as professional as yours though!
Just powering it through an Arduino Micro - using up 8 digital pins, but I wasn't really planning on adding much more to it..

posted in MudRunner - Modding read more

Nice! Yea, just needs some dials there now! Well, you can already put in a speedometer

Lot of resisters! What are they all doing?

posted in MudRunner - Modding read more

Well, looking at it is the hard part, once you've got the data, you can do all sorts, from simpits to just custom dials

posted in MudRunner - Modding read more

[0_1519040481839_truck.lua](Uploading 100%) Ah nice! Yea, interim method of getting RPM, like you mentioned on Discord, would be a lookup table for each truck..
Would be easier if we pass the data to Python - then we could have a little GUI allowing for easy truck selection
The fact that the game passes some details from the xmls through to the lua script (like the wheel radius), there must be other parts of the xmls that can be accessed.
I wonder whether wheel radii are different enough to be used as a "fingerprint" for the different trucks...Probably not

Some of the trucks have reasonably unique radii, the K700 for example, but most share wheels with other vehicles, for example, the D535 has the same wheels as the E7310

:Edit 2:
Figured out how to get AWD, diff lock and handbrake status to file. Was trying to write a boolean to file, and it wasn't having it, so converted to string and its all good.

Here is my modified lua file if you're interested

Headings for the CSV would be:
Tension, Ground Speed, Wheel Speed, Gear, Wheel Radius, Revving/Clutch?, Class, All Wheel Drive, Diff Lock, Handbrake

posted in MudRunner - Modding read more

I'm currently trying to get telemetry from the game, and have had some success by modifying the truck.lua to save the wheel rpm, ground speed, engine tension (difference between what you've asked for, and what the engine can/is giving), selected gear, and some other basic things.
I'm wondering though, what other properties do the wheels and truck objects have? I tried dumping it to a table using something along the lines of:

for key, value in pairs(truck) do
    .....export each key and value pair from the table 

but it didn't seem to work for some reason.
Gives me:

 K is: isBreakPulled, V is:  K is: prevGear, V is: -1

Which is great, but I'd prefer more!

Anyone with more lua experience, or a dev able to shed some light on some of the other properties of the objects?

The ones I've got thus far are:

  • truck.engineTension

  • truck.heavy (seems to follow tension closely, but shows a greater difference)

  • truck.turbo (doesnt seem to give any output)

  • truck.trans(also, nothing, and neither does truck.transReverse)

  • truck.revving (seems to indicate the clutch being down, as it goes high on gear change, but engine tension remains the same, more or less...So not sure)

  • wheel.radius (this seems to come from the xml file for the specific wheel)

  • wheel.angVel (angular velocity - this is the rotational speed of the wheel I think (i get these two mixed up though...)

  • wheel.linVel (Linear velocity - correlates with ground speed - +value for forward, -value for reverse

  • difference between angVel and linVel gives you a nice wheel spin factor

Currently, I've got some key ones exporting to a csv file so I can plot them in excel (or read them in Python and parse the result onto an arduino - driving a voltmeter as a speedo/rpm gauge etc.

If you want my code (its not very neat) :

if (truck.engineTension > 0.0001) then

		file ="rpm.csv", "a")

This lives in the ProcessTruck function, so it is called regulally. It dumps it all to a CSV file called rpm.csv (because I was trying to find the rpm)
There are two global variables, groundspeed and angularspeed, which are defined under process wheels...