[MOD] Actual support for Force Feedback
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
[MOD] Actual support for Force Feedback
Update:
First release.
Enabled force feedback effects, when getting hit by projectiles or `laser` fire.
Download
Greetings Everyone,
I currently working on a Mod to give X3:TC real support for Force Feedback instead of the bump you feel when you hit something(which I only try to do to feel the FF, and try to avoid when actually playing the game).
I'm early in dev so far I have build the first working version. So far I have used Direct Input to activate the Force Feedback and am writing a separate program(or DLL) for the force feedback events. The problem I run into though is how to get the game information from the game to my program.
Now the G15 app from Cycrow seems to get game information from the game to an external program. As far as I understand through a log of some kind.
So I wanted to ask, does anyone know how exactly it gets the information from the game?(and if this method can be used to get shield/hull/speed information(as with those hits can be calculated))
Thanks in advance...
First release.
Enabled force feedback effects, when getting hit by projectiles or `laser` fire.
Download
Greetings Everyone,
I currently working on a Mod to give X3:TC real support for Force Feedback instead of the bump you feel when you hit something(which I only try to do to feel the FF, and try to avoid when actually playing the game).
I'm early in dev so far I have build the first working version. So far I have used Direct Input to activate the Force Feedback and am writing a separate program(or DLL) for the force feedback events. The problem I run into though is how to get the game information from the game to my program.
Now the G15 app from Cycrow seems to get game information from the game to an external program. As far as I understand through a log of some kind.
So I wanted to ask, does anyone know how exactly it gets the information from the game?(and if this method can be used to get shield/hull/speed information(as with those hits can be calculated))
Thanks in advance...
Last edited by Neo Angelus on Mon, 3. Nov 08, 18:57, edited 3 times in total.
its fairly easy tbh, it just depends how often you want the information.
how the G15 mod does it, is by having a script in game, that creates a log file and dumps all the stats it needs to the log file. It does it every second the game is running.
then theres the G15 plugin, that runs in the backgroun, this basically waits for the log file to be created and reads everything from it, formating it in a way to be displayed as stats.
if all you need is the shields/hull and speed, then this should be fairly simple, just write a log file with those 3 things via a script.
btw, y do you need the speed ? u should be able to use just the hull and shields to determine when a ship is hit. Althou it'll be difficult to tell if this is from a collosion or from weapons fire
how the G15 mod does it, is by having a script in game, that creates a log file and dumps all the stats it needs to the log file. It does it every second the game is running.
then theres the G15 plugin, that runs in the backgroun, this basically waits for the log file to be created and reads everything from it, formating it in a way to be displayed as stats.
if all you need is the shields/hull and speed, then this should be fairly simple, just write a log file with those 3 things via a script.
btw, y do you need the speed ? u should be able to use just the hull and shields to determine when a ship is hit. Althou it'll be difficult to tell if this is from a collosion or from weapons fire
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
To start thanks for the information.
I think I have to experiment with the frequency at which the data is updated. To low and the effects will probably be a bit unnatural, to high and it all slows down(writing/reading).
And I will try to use that method then. There is no possibility of sending Windows messages or using sockets right?
And I wanted the shields/hull to check for a hit...and the speed to rumble a bit when going at max speeds...is there any one to also get the weapon energy?(as through that I can check if a player is firing)
Again thank you for the information
I think I have to experiment with the frequency at which the data is updated. To low and the effects will probably be a bit unnatural, to high and it all slows down(writing/reading).
And I will try to use that method then. There is no possibility of sending Windows messages or using sockets right?
And I wanted the shields/hull to check for a hit...and the speed to rumble a bit when going at max speeds...is there any one to also get the weapon energy?(as through that I can check if a player is firing)
Again thank you for the information
nope the only way to get the game to communicate outside is via log filesNeo Angelus wrote:To start thanks for the information.
I think I have to experiment with the frequency at which the data is updated. To low and the effects will probably be a bit unnatural, to high and it all slows down(writing/reading).
And I will try to use that method then. There is no possibility of sending Windows messages or using sockets right?
And I wanted the shields/hull to check for a hit...and the speed to rumble a bit when going at max speeds...is there any one to also get the weapon energy?(as through that I can check if a player is firing)
Again thank you for the information
modders dont have access to anything that could create and use sockets
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
Mhmm...strange...did you run the 100ms exe in the directory where X3:TC writes the log files to?(my documents\egosoft\X3TC)
If I might ask are you using XP or Vista?
And I'll write a debug version...which just gives force feedback and doesn't need X3:TC to narrow down the problem...
Update:
Here is the debug version, it should still work like it has to, but now it give a strong force to the Left whenever someone clicks on the program `window`(except when clicking on the exit button of course)
Download
If I might ask are you using XP or Vista?
And I'll write a debug version...which just gives force feedback and doesn't need X3:TC to narrow down the problem...
Update:
Here is the debug version, it should still work like it has to, but now it give a strong force to the Left whenever someone clicks on the program `window`(except when clicking on the exit button of course)
Download
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
Mhmm, then it probably isn't the connection between X3:TC and the program, but the actual force feedback. Strange...I'm using the max value so that might give problem(wouldn't know why)...
I have one final test...this is the example program that came with the DirectX SDK, could you test if that works? Because then I have messed something up in my code and will rewrite it...otherwise the problem may lie beyond my capabilities...
Download
Two extra questions if you don't mind: Are you using Xp or Vista? and you do have at least DirectX 8 installed right?(second one is a bit obvious)
I have one final test...this is the example program that came with the DirectX SDK, could you test if that works? Because then I have messed something up in my code and will rewrite it...otherwise the problem may lie beyond my capabilities...
Download
Two extra questions if you don't mind: Are you using Xp or Vista? and you do have at least DirectX 8 installed right?(second one is a bit obvious)
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
-
- Posts: 12
- Joined: Sat, 1. Sep 07, 14:32
Mhmm...that shouldn't be happening...and I messed up the Force Feedback in my program and I think I know how...(my joystick is just a obedient little joystick and even does it job when told incorrectly, that's why I never noticed it myself...)
I'll rewrite the program and hope to have another version up tonight...
Downlad
Again the debug version..he should work properly...but it still activates the force feedback when clicking on the dialog:)(to see if it works...)
My apologies for all the errors...
I'll rewrite the program and hope to have another version up tonight...
Downlad
Again the debug version..he should work properly...but it still activates the force feedback when clicking on the dialog:)(to see if it works...)
My apologies for all the errors...
Re: [MOD] Actual support for Force Feedback
Nooo what happenned to this ? I really want FB to work badly in this game Can I help somehow ? Would be nice to have it for throttle and laser as well.
-
- Moderator (English)
- Posts: 30436
- Joined: Fri, 16. Apr 04, 19:21
Re: [MOD] Actual support for Force Feedback
Whatever happened to it took place about 10 years ago.
A dog has a master; a cat has domestic staff.
Re: [MOD] Actual support for Force Feedback
lol mixed the dates. So really there's no mod that adds real forcefeedback to the game ? That sucks