Is there a plugin for Euro Truck Simulator 2?

Here you can talk about creating profiles, discuss your profile settings and share problems with games and plugins.
Please note that you first have to read the the fitting game section in the manual!

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Tue 16. Jul 2013, 04:24

Greetings sir!

I have MS VC++ 2010 Express, so I can open the SDK files and look through them...

According to the file "..\scs_sdk_1_0\include\common\scssdk_telemetry_truck_common_channnels.h"

I see the channels defined for everything for motion ( velocity, acceleration, speed, etc )
// Movement.

/**
* @brief Represents world space position and orientation of the truck.
*
* Type: dplacement
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_world_placement "truck.world.placement"

/**
* @brief Represents vehicle space linear velocity of the truck measured
* in meters per second.
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_local_linear_velocity "truck.local.velocity.linear"

/**
* @brief Represents vehicle space angular velocity of the truck measured
* in rotations per second.
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_local_angular_velocity "truck.local.velocity.angular"

/**
* @brief Represents vehicle space linear acceleration of the truck measured
* in meters per second^2
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_local_linear_acceleration "truck.local.acceleration.linear"

/**
* @brief Represents vehicle space angular acceleration of the truck meassured
* in rotations per second^2
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_local_angular_acceleration "truck.local.acceleration.angular"

/**
* @brief Represents a vehicle space position and orientation delta
* of the cabin from its default position.
*
* Type: fplacement
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_cabin_offset "truck.cabin.offset"

/**
* @brief Represents cabin space angular velocity of the cabin measured
* in rotations per second.
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_cabin_angular_velocity "truck.cabin.velocity.angular"

/**
* @brief Represents cabin space angular acceleration of the cabin
* measured in rotations per second^2
*
* Type: fvector
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_cabin_angular_acceleration "truck.cabin.acceleration.angular"

/**
* @brief Represents a cabin space position and orientation delta
* of the driver head from its default position.
*
* Note that this value might change rapidly as result of
* the user switching between cameras or camera presets.
*
* Type: fplacement
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_head_offset "truck.head.offset"
/**
* @brief Speedometer speed in meters per second.
*
* Uses negative value to represent reverse movement.
*
* Type: float
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_speed "truck.speed"

// Powertrain related

/**
* @brief RPM of the engine.
*
* Type: float
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_engine_rpm "truck.engine.rpm"

/**
* @brief Gear currently selected in the engine.
*
* @li >0 - Forwad gears
* @li 0 - Neutral
* @li <0 - Reverse gears
*
* Type: s32
*/
#define SCS_TELEMETRY_TRUCK_CHANNEL_engine_gear "truck.engine.gear"


fvector and dvector seem to be explained in "..\scs_sdk_1_0\include\scssdk_value.hscssdk_value.h"

/**
* @name Vector types.
*
* In local space the X points to right, Y up and Z backwards.
* In world space the X points to east, Y up and Z south.
*/
//@{
struct scs_value_fvector_t
{
scs_float_t x;
scs_float_t y;
scs_float_t z;
};

struct scs_value_dvector_t
{
scs_double_t x;
scs_double_t y;
scs_double_t z;
};
//@}


and
for dashboard gauges ( fuel, lights, rpm, ) and other information ( air pressure, oil pressure, etc ) the entire file contains all
the defined telemetry channels for the truck.

So with the bit that I understand... this file is included inside "..\scs_sdk_1_0\include\eurotrucks2\scssdk_telemetry_eut2.h"

#include "../scssdk.h"
#include "../common/scssdk_telemetry_common_configs.h"
#include "../common/scssdk_telemetry_common_channels.h"
#include "../common/scssdk_telemetry_truck_common_channels.h"
#include "../common/scssdk_telemetry_trailer_common_channels.h"


and if you look at "..\scs_sdk_1_0\examples\telemetry\telemetry.cpp"
that file seems to be a telemetry.log file creator.

It contains preexisting log file code for

float heading;
float pitch;
float roll;

float speed;
float rpm;
int gear;


// Register for channels. The channel might be missing if the game does not support
// it (SCS_RESULT_not_found) or if does not support the requested type
// (SCS_RESULT_unsupported_type). For purpose of this example we ignore the failues
// so the unsupported channels will remain at theirs default value.

version_params->register_for_channel(SCS_TELEMETRY_TRUCK_CHANNEL_world_placement, SCS_U32_NIL, SCS_VALUE_TYPE_euler, SCS_TELEMETRY_CHANNEL_FLAG_no_value, telemetry_store_orientation, &telemetry);
version_params->register_for_channel(SCS_TELEMETRY_TRUCK_CHANNEL_speed, SCS_U32_NIL, SCS_VALUE_TYPE_float, SCS_TELEMETRY_CHANNEL_FLAG_none, telemetry_store_float, &telemetry.speed);
version_params->register_for_channel(SCS_TELEMETRY_TRUCK_CHANNEL_engine_rpm, SCS_U32_NIL, SCS_VALUE_TYPE_float, SCS_TELEMETRY_CHANNEL_FLAG_none, telemetry_store_float, &telemetry.rpm);
version_params->register_for_channel(SCS_TELEMETRY_TRUCK_CHANNEL_engine_gear, SCS_U32_NIL, SCS_VALUE_TYPE_s32, SCS_TELEMETRY_CHANNEL_FLAG_none, telemetry_store_s32, &telemetry.gear);


So I think that file can be compiled and used for testing how to extract more channels? i.e. veleocity, acceleration, and more?


I apologize for not knowing if this helps or not, trying my best with what I can figure out on my own.
Let me know if any of this helps. Do I need to look somewhere else, or try something different?

Thanks again!
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby sirnoname » Tue 16. Jul 2013, 22:53

The names like local acceleration instead of cabin acceleration make me thinking.
Here is a plugin with accelerations and angular velocity.
Check if this works fine and check if they are map or car related (90° turn should not invert something)
Check if angular velocities are correct ordered and working.
Attachments
X-Sim.zip
(4.83 KiB) Downloaded 266 times
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1744
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 122 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Wed 17. Jul 2013, 08:29

Awesome! Will get back with feedback soon.
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Thu 18. Jul 2013, 08:06

Great work !

Looks like it's mostly working correctly... These are my findings so far.
At this time, no effects appear to be affected by which direction the truck is facing. None of these effects invert by direction.

Longitudinal force effect 27 - seems to be working correctly with forward & backward motion when accelerating and breaking.

Lateral force effect 25 - don't think this one is working correctly. I get feedback, but it's REAL short and jerky motion left to right, real spikey, seems
to respond to turning but not responding the way it should be? Maybe I don't have the correct values set for this force yet, i'm not sure, still testing this one further to see if any way to make it work correctly.

Vertical force effect 26 - seems ok
Roll effect 30 - seems ok
Pitch effect 28 - seems ok

Pitch acceleration effect 31 - this effect is incorrect, it works like roll acceleration. seems ok otherwise.
Roll acceleration effect 33 - this effect is incorrect, it works like pitch acceleration. seems ok otherwise.

Effect 36, 37, 38 - local veleocity x, y, z - gives no values, so I don't know if this is normal behavior or necessary. I never personally use these forces before.

Please advise if there is any other forces I need to test, or if there is more information you need from me to proceed.

Thanks.
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby sirnoname » Thu 18. Jul 2013, 22:11

Ok, changed the two ones.
Lateral is as it comes from the game ;) Perhaps you ask them?

Added:
SCS_TELEMETRY_TRUCK_CHANNEL_fuel
SCS_TELEMETRY_TRUCK_CHANNEL_oil_pressure
SCS_TELEMETRY_TRUCK_CHANNEL_oil_temperature
SCS_TELEMETRY_TRUCK_CHANNEL_water_temperature
SCS_TELEMETRY_TRUCK_CHANNEL_battery_voltage

I think more is not compatible with the X-Sim list.
Attachments
X-Sim.zip
(5.02 KiB) Downloaded 276 times
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1744
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 122 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Fri 19. Jul 2013, 09:45

Nice work!

I am going to continue tweaking the profile for a while until I get a good "truck" feeling. But it seems like it is working really well...

I think I'm just used to fast cars and a lot of off road rally races, so driving a big truck is going to take a little getting used to the different
force feeling. I think lateral is ok, I just had to make some adjustments to how I usually set lateral.

But, the plugin seems like a success to me.

SCS_TELEMETRY_TRUCK_CHANNEL_fuel
SCS_TELEMETRY_TRUCK_CHANNEL_oil_pressure
SCS_TELEMETRY_TRUCK_CHANNEL_oil_temperature
SCS_TELEMETRY_TRUCK_CHANNEL_water_temperature
SCS_TELEMETRY_TRUCK_CHANNEL_battery_voltage


shows data as well.

I will try to make a few youtube videos this weekend showing my motion sim with the game.
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Wed 24. Jul 2013, 08:34

Okay, here's my first decent working test drive with motion... Using NVidia 2D surround triple monitor setup.



This video is done with a sneak peek of my current sim chair project. I will start a new project page with this new setup soon...

Keep in mind this truck simulator game is new for me, so I still have to work on profiles for it for a while to get it just right ;)
Great job on the plugin sirnoname!

Maybe this game can now get it's own section added to the list of games officially working with X-sim?
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby RafBR » Tue 30. Jul 2013, 00:03

In which folder should I put this plugin? I have only the demo version of Euro Truck2 and there is not a plugin folder.

Any idea?
User avatar
RafBR
X-Sim Supporter
 
Posts: 135
Images: 24
Joined: Tue 20. Mar 2012, 21:53
Location: Brasil
Has thanked: 6 times
Been thanked: 4 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby sirnoname » Tue 30. Jul 2013, 00:51

The folder is generally not there. The demo is not tested and may not be supported by the game developer??
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1744
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 122 times

Re: Is there a plugin for Euro Truck Simulator 2?

Postby crs2012 » Tue 30. Jul 2013, 03:51

RafBR wrote:In which folder should I put this plugin? I have only the demo version of Euro Truck2 and there is not a plugin folder.

Any idea?


Which demo are you using? What version is it?
If you have steam demo, make sure the version is at LEAST 1.4.1 ( this is the first version with telemetry data added and activated in game ).

Steam just released the latest patch for the full version which is currently 1.4.8. I do not know what the demo version from steam is currently.
The last time I checked it was only 1.3.6 as mentioned in an earlier post. This may have changed... You'll have to look at the game exe file by right click
and look at properties and details tab. ( eurotrucks2.exe ) Check version you have.

The latest demo version available from the developer website is... 1.4.8

http://download.eurotrucksimulator2.com/EuroTruckSimulator2_1_4_8_setup.exe
create 'plugins' folder if it does not exist for the demo available in the link above...
"C:\Program Files (x86)\Euro Truck Simulator 2\bin\win_x86\"
to
"C:\Program Files (x86)\Euro Truck Simulator 2\bin\win_x86\plugins" and place the X-sim.dll inside

You can follow these steps to see if it works with the demo version.
User avatar
crs2012
 
Posts: 46
Images: 61
Joined: Thu 16. Aug 2012, 05:35
Location: Texas
Has thanked: 0 time
Been thanked: 3 times

PreviousNext

Return to Game profile & plugin discussions

Who is online

Users browsing this forum: kakasi and 1 guest