|
Wing Commander
|
This page contains reconstructed offset locations etc for data structures within Privateer should someone wish to make a game difficulty editor.
Some people have a lot of problems with asteroid field navigation in the GOG re-releases of WC, and eventually mc.jesus on the GOG forums came up with a solution (LINK):
Downloaded the WC pack in the summer sale and I had this exact same problem. This is the first thread I found when I searched for a solution, so time for an epic year later bump. WITH A SOLUTION! One I honed in on myself. This fix means tinkering with the dosboxWC.conf file (located in Drive [D]:\GOG Games\Wing Commander 1 and 2\WC\". Keep in mind your results may vary, as DOSBox's speeds are fairly dependent on the system it's running on. Change these settings as follows: fullresolution=0x0 machine=vgaonly frameskip=0 core=normal Also a side note: Using a joystick seems to affect the game's speed as well. I actually had to LOWER the cycles from 4400 after hooking one up. |
The game runs game logic based off of CPU clock cycles – so the faster the CPU, the faster everything, from cutscene animations to gameplay. The original target machine that a lot of people played it on was a 386SX-25, so set your DOSBox cycles to about 4,500 to 4,600 cycles – this will simulate roughly a 386SX-25.
The Secret Missions 2 executable added a speed/framerate limiter, supposedly; so you could play that to get a “Feel” for how the game was supposed to play back in the day, and then adjust your DOSBox to fit those settings.
This was posted on the GOG forum by user ikantspelwurdz (LINK) and the solution is:
Warning - this is a hack that I pretty much stumbled onto. It isn't stable, it can affect the game in undesirable ways, and I haven't tested it beyond the first mission, and I don't know the full extent of its side effects. But from what I tested, this is a playable workaround. Because of all this, I only recommend this to experienced DOSBox users. But I would value any feedback from anyone who can test this, or has some insight. Maybe this technique is already known, but I didn't read about it anywhere. So first, start a new game, and save it right away. Then quit. Now, crank up your DOSBox cycles in the config. I went with 20000, but this was a blind test, and maybe other values are more ideal. Experienced DOSBox users should know how to do this. Go to the WC1 directory. Open the folder "GAMEDAT." Find the file "SAVEGAME.WLD" and make a copy of it. Move the copy to another directory. Rename it "CRUSADE.WLD." Now move the file back to GAMEDAT, overwriting the existing "CRUSADE.WLD" file. Essentially what you are doing here is renaming your save file so that Secret Missions 2 can find it. Now, launch The Secret Missions 2: Crusade. GOG by default puts a shortcut to it in your start menu. Load a saved game. You should see the saved game you just made earlier. Load it, and you should be able to play missions from the Vega campaign, but in SM2.EXE. When I played this way, the lag was gone, and the gameplay not too fast either. Some things I did notice: * The first mission seems much harder than I remember it. This could be faulty memory, but I get the impression that enemy ships are tougher and more evasive. * Laser battery charging is odd. Outside combat, I could fire indefinitely and not run out. In combat, sustained fire drains the battery quickly. I don't know which one is normal. * Cut-scenes are crazy fast. So is auto-pilot. |
A GAMEFAQs guide (LINK) noted:
9.2 Run WC missions with SM2 As this modification involves some unauthorized file manipulations, you perform these at your own risk. Start WC, and start a new campaign. Then visit the Barracks and save the file. Remember this save’s name. Exit the game. If you have SM2 installed, there should be a CRUSADE.WLD in the GAMEDAT subdirectory in the directory where WC and SM’s are installed. Make a copy of that file. There should be a SAVEGAME.WLD in the GAMEDAT directory, created by WC. Copy it to CRUSADE.WLD in the same directory. Now you can start SM2. Continue existing game, and pick that save name you saved in WC. Now you can play WC missions! You get frame rate adjustments, and some of the missions behave "better" with SM2. There are a few problems, of course. 1) Paladin will show up, but he’ll be referred to as Doomsday. Bossman will be referred to as Jazz. 2) Dralthi will be Mk2’s (mass driver instead of laser). 3) Instead of different behavior for different aces, they’ll all now fly like Drakhai and be named Drakhai instead. |
One of the most frustrating aspects of the original Wing Commander series was the asteroid fields. They seem to have been put in solely for nothing other than to lengthen gameplay via frustration.
I could slowly navigate my way through them with patience as a twelve year old...but the forty-something me can't stand them anymore.
So, without further ado, here's how to adjust the difficulty of asteroids in Wing Commander I.
Every game object in the Wing Commander I engine has a Radius; and the standard radiuses are:
Hornet Light Fighter = 100
Raptor Heavy Fighter = 180
TCS Tiger's Claw = 700
Asteroids = 100
By adjusting the radius of objects, you can decide how “difficult” the collision engine is for that object.
Reducing the radius of asteroids to 2 makes them fly right through your spacecraft with no ill-effect.
The Wing Commander Game Executables are where the asteroid data is stored, and the radius values are stored as two-byte entries at the following offsets:
WC.EXE (from GOG.com version)
Asteroid #1 Radius 101806
Asteroid #2 Radius 101917
Asteroid #3 Radius 102028
Asteroid #4 Radius 102139
Asteroid #5 Radius 102250
Asteroid #6 Radius 102361
SM2.EXE (from GOG.com version)
Asteroid #1 Radius 101358
Asteroid #2 Radius 101469
Asteroid #3 Radius 101580
Asteroid #4 Radius 101691
Asteroid #5 Radius 101802
Asteroid #6 Radius 101913
In order to adjust asteroid field difficulties, all six asteroids must have their radiuses edited.
If you have UGE, it's relatively easy to edit. But if you don't have UGE, and prefer to use a hexadecimal editor such as XVI32; you want to change the data starting at those offsets from 64 00 (aka 100) to 02 00 (aka 2).
I had no idea where the asteroid data was located in Wing Commander until “UnnamedCharacter” on the WC CIC mentioned his “WCToolbox” and that: “The asteroids are class 9 objects (ships) and if you reduce their radius to 5 they appear to have no effect.”
Armed with a data dump of WC.EXE from WCToolbox, I was able to find and decipher the format for asteroid objects:
(This is only a partial asteroid , intended to help you quickly locate it in the EXE, and rendered in UGE-style format, which renders bytes as decimal numbers instead of hexadecimal).
Class |
Radius |
Mass |
Max Scale |
Miscellaneous |
Max Yaw (DPS) |
Max Pitch (DPS) |
Max Roll (DPS) |
Angular Inertia |
||||||||
9 |
0 |
100 |
0 |
44 |
1 |
128 |
2 |
0 |
0 |
1 |
0 |
13 |
0 |
0 |
0 |
|
9 |
100 |
300 |
640 |
0 |
1 |
13 |
0 |
This ZIP file contains a old DOS-era game editor that allowed you to “program” editing modules for any game (or for binary level editing of files in general), via an intuitive alpha-decimal display (instead of the more traditional hexadecimal display used by file editors.
WC1
MIDGAME.V01 = McAuliffe VI
MIDGAME.V02 =
Brimstone
MIDGAME.V03 = Rostov
SM1
MIDGAME.V04 = Goddard
MIDGAME.V05 = In the Throne
Chamber of the Emperor of Kilrah
SM2
MIDGAME.V06 = Fnchirr Settlement, Northern
Continent, Firekka
MIDGAME.V07 = Sharrhi Settlement, Southern
Hemisphere, Firekka.
MIDGAME.V08 = Lkhi Settlement, Northern
Hemisphere, Firekka.
Like before, every game object in the Wing Commander II engine has a Radius; and the standard radiuses are:
Asteroids = 100
By adjusting the radius of objects, you can decide how “difficult” the collision engine is for that object.
Reducing the radius of asteroids to 2 makes them fly right through your spacecraft with no ill-effect.
Interestingly, the max scale of asteroids is different in WC2 (1024) than in WC1 (640), which may be why it's a bit more difficult in WC2.
The Wing Commander II Game Executables are where the asteroid data is stored, and the radius values are stored as two-byte entries at the following offsets:
WC2.EXE (from GOG.com version)
Asteroid #1 Radius 121624
Asteroid #2 Radius 121867
Asteroid #3 Radius 122110
Asteroid #4 Radius 122353
Asteroid #5 Radius 122596
Asteroid #6 Radius 122839
SO1.EXE (from GOG.com version)
Asteroid #1 Radius 121938
Asteroid #2 Radius 122181
Asteroid #3 Radius 122424
Asteroid #4 Radius 122667
Asteroid #5 Radius 122910
Asteroid #6 Radius 123153
SO2.EXE (from GOG.com version)
Asteroid #1 Radius 120504
Asteroid #2 Radius 120747
Asteroid #3 Radius 120990
Asteroid #4 Radius 121233
Asteroid #5 Radius 121476
Asteroid #6 Radius 121719
In order to adjust asteroid field difficulties, all six asteroids must have their radiuses edited.
If you have UGE, it's relatively easy to edit. But if you don't have UGE, and prefer to use a hexadecimal editor such as XVI32; you want to change the data starting at those offsets from 64 00 (aka 100) to 02 00 (aka 2).
I had no idea where the asteroid data was located in Wing Commander II until I had already edited the asteroid radiuses in WCI.
But due to the format of objects in the EXE changing slightly between WCI and WCII, it was a bit harder to find them in WC2 than WC1.
Ultimately, I found them through looking for their Yaw/Pitch/Roll rates, which was an unique collection of bytes and unchanged between WCI/WCII.
(This is only a partial asteroid , intended to help you quickly locate it in the EXE, and rendered in UGE-style format, which renders bytes as decimal numbers instead of hexadecimal).
Class |
Unknown Variable |
ID Number |
Radius |
Miscellaneous |
Max Yaw (DPS) |
Max Pitch (DPS) |
Max Roll (DPS) |
Angular Inertia |
||||||||
9 |
0 |
0 |
0 |
22 |
0 |
100 |
0 |
0 |
0 |
1 |
0 |
13 |
0 |
0 |
0 |
|
9 |
0 |
Variable. Changes with each asteroid. The first asteroid is 22. |
100 |
0 |
1 |
13 |
0 |
This ZIP file contains a old DOS-era game editor that allowed you to “program” editing modules for any game (or for binary level editing of files in general), via an intuitive alpha-decimal display (instead of the more traditional hexadecimal display used by file editors.
This program lets you fine tune WC1 and WC2 (GOG releases) difficulty to what you feel is correct.
Basically, I programmed in all the offsets for Terran Confederation Ships/Craft's shield/armor values, along with their stock base values.
So for example, if you enter a multiplier of 1.5 for difficulty for Terran Ships; the game becomes easier because you now have more armor.
WC1's Hornet has 40 stock value = 4.0 cm front shields stock.
Multiplying that, it becomes 40 * 1.5 = 60 (or 6.0 cm in game).
Likewise, entering a multiplier of say 0.8, the game becomes harder because you have less armor.
Over in asteroids; difficulty is changed via changing the radius of asteroids in the game via a multiplier.
Radius is effectively the size of the in-game collision hitbox. Stock Asteroids have a radius of 100 in both WC1 and WC2.
You can now adjust how "hard" asteroid fields are -- eliminating them entirely, if you enter 0.05, it computes a radius of 5, effectively removing them as a threat in the game.
The reason for the huge file size (for what it does) is because it's written in Python v3.x; and if you want to make a distributable executable for python scripts, the packager puts EVERYTHING IN, i.e. an entire python distribution is scrunched into the executable.
Filesize issues are offset by the fact that Python is much more pleasant to program for as a hobbyist doing hobbyist things, and there's more tutorials or answered questions for things I want to do in Python.
DEV NOTES:
In WC1, everything (ship damage, asteroid radius) is all held within the executable files (WC1.exe and SM2.exe)
In WC2, only asteroid radius is in the executable (WC2.exe, SO1.exe and SO2.exe). Ship values are held in the (SHIP.Vxx) files in GAMEDAT directory.
Here's a listing of the SHIP.Vxx files
SHIP.V00---------FERRET
SHIP.V01---------RAPIER
SHIP.V02---------BROADSWORD
SHIP.V03---------EPEE
SHIP.V04---------SABRE
SHIP.V05---------SARTHA
SHIP.V06---------DRAKHRI
SHIP.V07---------JALKEHI
SHIP.V08---------GRIKATH
SHIP.V09---------STRAKHA
SHIP.V10---------BLOODFANG
SHIP.V11---------CLYDESDALE
SHIP.V12---------FREE
TRADER
SHIP.V13---------DORKATHI
SHIP.V15---------CROSSBOW
SHIP.V16---------KAMEHKH
SHIP.V17---------WATERLOO
SHIP.V18---------CONFEDERATION
SHIP.V19---------GILGAMESH
SHIP.V20---------RALATHA
SHIP.V21---------FRALTHRA
SHIP.V23---------HUMAN
STARBASE
SHIP.V24---------HUMAN SUPPLY
DEPOT
SHIP.V25---------KILRATHI SUPPLY
DEPOT
SHIP.V26---------KITHRAK MANG
SHIP.V36---------GOTHRI
(S01)
SHIP.V41---------MORNINGSTAR
SHIP.V48---------AYERS
ROCK
SHIP.V50---------GOTHRI (S02)
NOTE: As of version 1.5; ALTSHIPS editing is not included in WING HARD, as I'm tired and sleepy.
ALTSHIPS.000---------CONCORDIA II
ALTSHIPS.000---------SABRE
TORP
ALTSHIPS.000---------EPEE NO
MISSILE
ALTSHIPS.000---------SABRE TORP
II
ALTSHIPS.000---------SABRE NO
GUNNER
ALTSHIPS.000---------BROADSWORD II
ALTSHIPS.001---------CONCORDIA II
ALTSHIPS.001---------SABRE
TORP
ALTSHIPS.001---------EPEE NO
MISSILE
ALTSHIPS.001---------SABRE TORP
II
ALTSHIPS.001---------SABRE NO
GUNNER
ALTSHIPS.001---------BROADSWORD
II
ALTSHIPS.001---------PIRATE FERRET
ALTSHIPS.001---------FERRET
MARK II
ALTSHIPS.001---------PIRATE
EPEE
ALTSHIPS.001---------GOTHRI
ALTSHIPS.001---------CROSSBOW
II
ALTSHIPS.001---------CROSSBOW III
ALTSHIPS.002---------CONCORDIA II
ALTSHIPS.002---------SABRE
TORP
ALTSHIPS.002---------EPEE NO
MISSILE
ALTSHIPS.002---------SABRE TORP
II
ALTSHIPS.002---------SABRE NO
GUNNER
ALTSHIPS.002---------BROADSWORD
II
ALTSHIPS.002---------PIRATE FERRET
ALTSHIPS.002---------FERRET
MARK II
ALTSHIPS.002---------PIRATE
EPEE
ALTSHIPS.002---------GOTHRI
ALTSHIPS.002---------CROSSBOW
II
ALTSHIPS.002---------CROSSBOW
III
ALTSHIPS.002---------MORNINGSTAR
ALTSHIPS.002---------SABRE
MAND
ALTSHIPS.002---------JAZZ STAR
ALTSHIPS.002---------MAND
SWORD
ALTSHIPS.002---------DORKATHI NO
GUNS
ALTSHIPS.002---------CONFEDORKATHI
ALTSHIPS.002---------MANIAC
STAR