Wing Commander Toolbox

Never mind, I think I know what the problem is; internal assembly versioning mismatch. Will post an update later.

As for the unknown values, I have no idea what they are. Feel free to change them and see what happens :-)
 
So, UnamanedCharacter, would you be willing to work with delMar? He has a great front end and has already added modding abilities. You have a good converter. I imagine the two together could be quite powerful. I already told him that I would be willing to work on the word translation table, which would help patch the current missions as well as help future mods.
 
Last edited:
Another small update:

  • Added partial support for PCSHIP data files (reading only).
  • API changes to ShipPointData class interface as a result of better understanding of underlying data structures.
  • XML changes to ShipPoint element to reflect ShipPointData class interface changes.

See initial post for attachment.
 
Another small update
Wow, you're moving at ludicrous speed.

btw: do you have creating .vga files on your todo-list?
I just ask because for the SO 1.5 mod (for any mod, probably) it would be awesome to be able to replace the "Start Secret Missions 2" button with something more appropriate.

Thanks
 
Last edited:
Hey guys; can you point me toward some documentation on the data file formats? I've already figured out some of them for wcdx, but if there's a central repository somewhere, then that would help with future efforts. In particular, I'd like to see the savegame format so I can make sure that the KS transfer program doesn't have the overflow bug. I know the basic structure of the file, but not necessarily which fields correlate to which data.

I may also be able to fill in some knowledge gaps here and there, which should help you in your work.
 
Hey @Stinger,

here's my info about the savegame files. I guess @UnnamedCharacter's info about the gamefiles themselves are far superior to mine, so I guess I'll leave that to him.

I'll just copy/paste the property definitions here (that's from the binary mapper I wrote so I don't have to "code" every single ressource file).
The class property refers to the actual Java file.
The offset is the location in the file.
properties with [] at the end are like arrays. the "times" parameter tells the size.
I hope this makes sense, if not, go ahead and bug me. Unfortunately there's still some unknown blocks inside.

You can find the repo and the according class files here:
https://github.com/delMar43/wcworkshop/tree/master/wcworkshop/wcworkshop-core

Hope that helps

class=wcworkshop.core.binary.Wc1Savegame
size=828
property=name,offset=0,length=16
property=unknown1,offset=16
property=occupied,offset=17
property=scoreboardEntries[],mapping=savegame_scoreboard_entry,offset=18,times=9
property=unknown4,offset=360
property=unknown5,offset=362
property=bronzeStars,offset=364
property=silverStars,offset=365
property=goldStars,offset=366
property=goldenSun,offset=367
property=pewterPlanet,offset=367
property=unknownBlock1[],offset=368,times=13
property=mission,offset=381
property=series,offset=382
property=unknownBlock4[],offset=383,times=9
property=pilotStatus[],offset=392,times=9
property=ace1,offset=408
property=ace2,offset=409
property=ace3,offset=410
property=ace4,offset=411
property=day,offset=412
property=year,offset=414
property=unknown2,offset=416
property=unknown3,offset=418
property=promotion,offset=420
property=victory,offset=424
property=campaign,offset=426
property=unknownBlock2[],offset=428,times=155
property=seriesCount,offset=583
property=unknownBlock3[],offset=584,times=243

class=wcworkshop.core.binary.Wc1SavegameScoreboardEntry
size=38
property=name,offset=0,length=14
property=callsign,offset=14,length=14
property=unknown1,offset=28
property=rank,offset=30
property=sorties,offset=32
property=kills,offset=34
property=unknown2,offset=36
 
@delMar

Yes, creating VGA files is on the list, but it is a long list, and considering I have not even looked at image encoding, it might be a while.

@Stinger

The WCLibrary ZIP contains a help file documenting the class interface, but it also includes the basic underlying data structure for each class. Essentially, every class has a 1:1 relationship with a conceptual data unit (File –> Block –> Data). So for example, the CAMP file structure is divided among its various classes in the "BeBe.WCGames.Engines.OriginFX.WC1" namespace:
  • CAMP.00x –> CampFile
    • Block 1 –> StellarBackgroundBlock
      • Item 1 –> StellarBackgroundData
      • Item 2 –> StellarBackgroundData
      • Items...
    • Block 2 –> SeriesBranchBlock
      • Items...
    • Block 3 –> BarSeatingArrangementBlock
      • Items...
Please feel free to contribute, because there certainly are some knowledge gaps :)
 
Last edited:
I believe he has been able to do it.
Yes, I think so too. Good point.
Maybe I have some email correspondence left in my inbox about some details he gave me.
Otherwise I'll just bug him. Maybe he's receiving a mail anyway because of your mentioning him.
 
The VGA format is quite simple; I can probably whip up a converter pretty quickly, but I don't have time tonight.
 
...And here you go! The attached image executable converts Wing Commander 1 image sets to png files, and also from the most common image formats (png, gif, jpg, bmp, maybe a few others) back to Wing Commander 1 image sets.

The resource executable can be used to extract individual resources (including image sets) from the resource files. I don't yet have anything that goes the other direction.

I may eventually post the source on github, but at the moment I'm too lazy.

For instructions, just run the executables without any arguments. If you have any questions, just ask.

Edit 2015-04-11: Updated image executable; it should now be compatible with XP and above (instead of Windows 8 and above).
 

Attachments

Last edited:
I know I said image support was not at the top of my list of things to-do, but it is starting to look like SM1.5 may require modifying VGA files, so I have started working on it.

Anyhow, the more tools we have at our disposal, the better; thanks @Stinger.
 
...And here you go! The attached image executable converts Wing Commander 1 image sets to png files, and also from the most common image formats (png, gif, jpg, bmp, maybe a few others) back to Wing Commander 1 image sets.

The resource executable can be used to extract individual resources (including image sets) from the resource files. I don't yet have anything that goes the other direction.

I may eventually post the source on github, but at the moment I'm too lazy.

For instructions, just run the executables without any arguments. If you have any questions, just ask.
Nice! I look forward to trying that.
 
Here's an update that adds support for reference points.

Each image has a reference point. The reference point is used by the game to determine the logical center point for image transformations (rotation, scaling, etc). The previous version of the image tool just used (0, 0). This new version allows you to specify a different reference point for each image.

I've also added a line of help text to the resource tool that reveals the -extract-all option. (The option was already there, but I forgot to include it in the help text.)

Edit 2015-04-11: Updated executable to run on Windows XP and above (instead of Windows 8 and above).
 

Attachments

Last edited:
Back
Top