Community Forum

Show avalible parameters

Forum Overview >> Scripting

Created27.02.2021 11:34

Jesper Thorup (Jesper87) 27.02.2021 11:34

Is it possible, somhow to see the avalible paramters?

E.g. if I would like to know the fill level of the sowing machine, curently attached?

But in generel if there is a list of avalible parameters?

Bilbo Beutlin (BBeutlin) 27.02.2021 14:06
The "fill level of the sowing machine" is displayed ingame. What do you need else?

For values you don't see ingame, you can use the console. For usage see
Console commands will display many of game values.

For all other you need a custom script and advanced knowledge about FS LUA.

Jesper Thorup (Jesper87) 27.02.2021 14:29
I already have somthing to start with.

I'm trying to get more information in Sim Hub Dashboard, to show.
I'ts limited compared to Sim Dashboard. But sim Dashboard only works on Android, and I have a few iPads laying arond.

Bilbo Beutlin (BBeutlin) 27.02.2021 14:37
Prepositioned know-how and experience, you can read all game values by LUA script.
A data exchange with external programs is limited by file transfer only, preferably XML.

Bob Bobster (Bobster82) 27.02.2021 14:44
Hi Jesper,

Im currently working on a mod for myself that also includes a list of vehicles and their attachements / filllevels

I draw my information from the g_currentMission.vehicles table

If you type this in the console command, you will see the attached fill information:

print (g_currentMission.controlledVehicle:getAttachedImplements()[1].object)
Here it prints a lot of info (var, tables, funcs) of your 1st attached to your vehicle you are currently in.

Function can return values you need, but for this purpose, i write the print for direct access to a seeder fill unit:
print (g_currentMission.controlledVehicle:getAttachedImplements()[1].object.spec_fillUnit.fillUnits[1])
print (g_currentMission.controlledVehicle:getAttachedImplements()[1].object.spec_fillUnit.fillUnits[2]) -- if it has fertilizer

I hope this helps you get in the right direction ;)

Jesper Thorup (Jesper87) 27.02.2021 16:57
Hi Bob,

I can't seem to get it to work.

If I write print (g_currentMission.controlledVehicle:getAttachedImplements()[1].object.spec_fillUnit.fillUnits[1]) in the console, i'm just recieving a "command unknown"..

And if I put print (g_currentMission.controlledVehicle:getAttachedImplements()[1].object.spec_fillUnit.fillUnits[1]) in the code, it claims it's table data in return?

Bob Bobster (Bobster82) 15.06.2021 10:34
For anyone still wondering why 'print' command is not working when using it in console:
I thought it was an engine command, but I used courseplay, they added a console command 'print' .

I just found out today, I used print a lot ingame, but didnt work today... I had disabled courseplay :$

Note: Log in to post. Create a new account here.