Author Topic: Classic Wing Commander flight dynamics script  (Read 4240 times)

0 Members and 1 Guest are viewing this topic.

Classic Wing Commander flight dynamics script
Hi! I have created a small script for PPJoy (Parallel Port Joystick Emulator) and GlovePIE (an input emulator and converter), that brings back the old Wing Commander flight dynamics in Wing Commander Saga (so far tested on the Proogue). In other words, yaw (horizontal turns) will no longer roll (bank) your ship. Your turns will be perfectly in to the horizontal plain.

The script is in the attachment. To use, and you use it on your own risk, I accept no liability for damage, Install PPJoy and create a virtual controller with 3 axes (X, Y, Z) bound to inputs Analog0, Analog1 and Analog2, and three buttons (Digital0, Digital1, Digital2). Then, install (unzip) GlovePIE, load the script, clock "Run" and send it into the systray with "[.]". Start the game and play.

This script has been created for my Saitek PS1000 PC/PS3 gamepad, so the butons may vary on your controller. Button 6 (Right trigger) is Fire Guns, Button 5 (Left Trigger) is launch missile, Button 7 (lower left trigger) is afterburn. Left thumbstick is pitch/yaw, right is roll. If you know what you're doing, feel free to change the button assignments to your liking. Be carepul with the afterburner press/release algorithm, though, or you might end up with your GlovePIE sending you an endless stream of tabs. There also seems to be a bug; if you use roll together with yaw, you might lose control of your ship, but all you need to do is to stabilize the ship with proper inputs. I'll attend to this later.

The basic purpose of the script was to bring back the old flight dynamics, but since I have discovered that there is no gamepad support in Wing Commander Saga, it is almost certain that the basic role will be to give the game gamepad support. I don't know, however, how it would work if you have a joystick, though, but I already plan to release an edition for the mouse (a "mousestick"). The script will probably work on other FS2Open engine based games as well, both regarding gamepad support and Wing Commander classic flight dynamics.

And that's it. I claim no copyright whatsoever over this script, do whatever you want with it. All trademarks mentioned above are the property of their respective owners.

On a final note, my sincere apologies to the Wing Commander Saga team for the mostly incomprehensible message on the script from earlier today, I used "Contact Us" just because I didn't know there was a forum where I could post it.

[attachment deleted by ninja]

 

Offline KeldorKatarn

  • Moderator
  • 211
Re: Classic Wing Commander flight dynamics script
You are aware that you can achieve the exact same thing by modifying one simple value in the ships.tbl entry of the ship in question?

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Classic Wing Commander flight dynamics script
WCS most likely done it using a "Banking constant" parameter, which is a simple modification.
Thus, default joystick settings will suffice.

 
Re: Classic Wing Commander flight dynamics script
Actually, I wasn't aware of that, and even so, modifying every ship in the game would be quite an endeavor, especially when the game is completed. But even without this, The script adds gamepad support, which does not exist without it, at least as far as my Saitek PS1000 is regarded, and it does show up in the controller section, but does not bind or work at all in game. This could be a problem with my computer only, but why not just take some time and correct it. Anyway, just in case someone wants or needs to use a gamepad that is not supported, I have created a full, though still rather imperfect version of the script, available in the attachment together with idetailed install and configuration options. I don't know whether it will work with the Xbox 360 controller, but so far, it works fine with mine. Sorry, but while I'm not new to programming and modding, I just didn't have the time to analyze the game content and configuration to that detail.

[attachment deleted by ninja]

 
Re: Classic Wing Commander flight dynamics script
I've taken a look at ships.tbl and the entire prologue_core.vp, but I didn't find a single trace of a bank or roll constant, local per ship, or global. The only places the word "bank" appears is in missile banks, "roll" appears in some conversation files, while the only values related to maneuvrability was "rotdamp", which is rotation sluggishness, and "rotation time", which is essentially turn, bank and yaw speed. No trace of a constant. Maybe it's hardcoded into the game engine. KeldorKatarn, I know I'm probably wrong and that I've probably overseen something important, but could you please help me with it?

To be honest, when I saw your post above I was actually looking forward to abandoning this entire script thing in favor of modded ship stats, but now I've really hit a dead end.

 

Offline Tolwyn

  • The Admiral
  • Administrator
  • 214
  • Ridiculously Old Fraud
    • Wing Commander Saga
Re: Classic Wing Commander flight dynamics script
That would be because, uh, the prologue is based on the 3.6.9 version of the Freespace Open engine.
Wing Commander Saga: A Legend Is Reborn | WingCenter
 
Tolwyn’s reputation for risk taking with other people’s lives was considered  to understate the facts. The admiral’s willingness to sacrifice anyone or anything to achieve his objectives had long been lauded in the popular press. He was “the man who got things done”.- Colonel Blair

No errors, no random CTDs, just pure fun and proof of why getting hit with missiles is a bad thing.
-WC Saga's beta tester


Report Wing Commander Saga bugs with Mantis

 
Re: Classic Wing Commander flight dynamics script
Talon_1024 was developing a physics Mod for Saga which recreates the physics from the pre-WC3 games and from Prophecy and Secret Ops. Perhabs he could give you any advise.
Audio Converter of Enigma Campaign 2666:
http://enigma.de.to/

German translator of WC: Hostile Frontier:
http://www.ciinet.org/kevin/wchf/

My Youtube Channel:
http://www.youtube.com/user/FekLeyrTarg?feature=mhee

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Classic Wing Commander flight dynamics script
You wouldn't need to modify every ship in game, since WCS team most likely already included banking constant modification in the upcoming final release.
Prologue is very old and is missing this feature.

 
Re: Classic Wing Commander flight dynamics script
Thanks, people. Guess the flight dynamics thing is at its end. But what about gamepad support? The Prologue lists the input device as PS1000 gamepad on my computer, but it doesn't respond ingame without the script. Is that too because the Prologue is old? Not that it matters, I've learned that gamepads don't have enough buttons anyway to handle the complicated controls. Even the mouse and keyboard give better results in terms of kills per time and overall game experience.

Still, if anyone wants it and it is not implemented in the newer version, I'm ready, willing and able to continue development for gamepad support, provided it is worth the hassle about installing PPJoy and GlovePIE and the configuring and calibration and everything.

IMHO, purchasing even a mediocre-quality joystick is a better solution.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Classic Wing Commander flight dynamics script
I don't really know how it could be possible to play FS with gamepad, but it's unlikely that latest builds have better support for them than the old ones (I may be wrong though).

 

Offline KeldorKatarn

  • Moderator
  • 211
Re: Classic Wing Commander flight dynamics script
You should be able to play the game with any standard USB Gaming Device, be it joystick or pad, since windows usually recognizes them as the same type of device.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Classic Wing Commander flight dynamics script
Indeed, but if there was something wrong with it on the old build, it won't be any different on current, right?
This could as well be a problem with gamepad itself though, if it doesn't work in FS, there's a chance it doesn't work at all without additional software.
That would be unusual, but I'm not an expert on gamepads.