Wing Commander Toolbox

Discussion in 'Fan Projects & Editing' started by UnnamedCharacter, Feb 26, 2015.

  1. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    The Wing Commander Toolbox (WCToolbox) is a set of tools to work on Wing Commander 1/2/Academy game data. Included in the WCToolbox:

    * The API Library provides an application programming interface for the Microsoft .NET Framework v4. It is a fully documented set of types which provide read and write functionality to many of the game data formats. Consult the help file for additional information, including the underlying data structures of the data formats.

    * The WCTools is a Windows application which provides functionality to perform actions on WC1/2/Acad game data files: extracts information and assets from data files; convert the data to and from XML.

    * The WC1ToolsCmd / WC2ToolsCmd / WCAcadToolsCmd are console applications which provide various commands to perform actions on WC1/2/Acad game data files. The commands:

    - EXTRACT; extracts information and images from a data file.
    - XMLPACK; converts XML to a game data file.
    - XMLUNPACK; converts a game data file to XML.

    Code:
        WC1ToolsCmd extract OBJECTS.VGA [/encoding:CodePage|Name]
    
         WC1ToolsCmd xmlpack BRIEFING.000.xml [/encoding:CodePage|Name]
    
         WC1ToolsCmd xmlunpack BRIEFING.000 [/encoding:CodePage|Name]
    
    Updated 2017-11-23
    • Major API/XML changes, breaking backward compatibility.
    • WC1: Updated EXE file to support editing of strings and pilot intelligence events.
    • WC2: Added support for COMM, DIFFLEVL, FNT, INTELSHP, PAL/PALETTE, SECTOR, SPEECH, STAR, VGA data files.
    • WCAcad: Added support for COMM, CREDIT, INTELSHP, PALETTE, WAVEINFO data files.
     

    Attached Files:

    Last edited: Nov 23, 2017
  2. AD

    AD Finder of things, Doer of stuff

    Messages:
    4,929
    Likes Received:
    104
    Trophy Points:
    36,885
    Location:
    BC, Canada
    This sounds like a pretty cool program. I'll have to test it out when I get a bit of time.
     
  3. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    A small update the WCGames Library; added support for COMM data files.


    To convert a game data file to an XML file using the WC1Xml console application:

    WC1Xml CAMP.000

    After making changes, convert the XML file to a game data file:

    WC1Xml CAMP.000.XML
     

    Attached Files:

  4. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    Another update including an additional console application to extract assets from certain data files. See bellow for a few examples of the output.


    Library

    The library provides an application programming interface (API) for the Microsoft .NET Framework v4.

    The library supports:
    • CAMP (reading and writing)
    • BRIEFING (reading and writing)
    • MODULE (reading and writing)
    • COMM (reading and writing)
    • PAL (reading only)
    • VGA (reading only)
    • SHIP (as VGA, reading only)

    WC1Xml

    The WC1Xml application is a simple console application which converts supported WC1 game data to and from XML. This provides a quick and easy way of editing game data.

    The application supports:
    • CAMP
    • BRIEFING
    • MODULE
    • COMM
    To convert a game data file to an XML file:

    WC1Xml BRIEFING.000

    To convert an XML file to a game data file:

    WC1Xml BRIEFING.000.XML


    WC1Extractor

    The WC1Extractor application is a simple console application which extracts
    supported WC1 game data.

    The application supports:
    • CAMP
    • BRIEFING
    • MODULE
    • COMM
    • PAL
    • VGA
    • SHIP
    To extract all the data from a game data file:

    WC1Extractor OBJECTS.VGA
     

    Attached Files:

    Whistler likes this.
  5. Whistler

    Whistler Commodore

    Messages:
    848
    Likes Received:
    138
    Trophy Points:
    16,685
    Gender:
    Male
    Location:
    Orbit
    Amazing work!

    I wish I had this tool when I was still managing fan-sites, bravo!
     
  6. centaurianmudpig

    centaurianmudpig Captain

    Messages:
    296
    Likes Received:
    59
    Trophy Points:
    10,635
    Gender:
    Male
    Location:
    Earth, New Old England
    Awesome stuff. It would be great to see someone create a campaign editor, or own expansion with this.
     
  7. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    Minor update resolving a localization issue.
     

    Attached Files:

  8. Shades2585

    Shades2585 none

    Messages:
    591
    Likes Received:
    21
    Trophy Points:
    26,185
    First off : Welcome to the WCNews community! :D
    "You will never find a more rech..." oops wrong genre! ;)
    I love what you are talking about doing. I haven't figured out how to use this tool yet. Instructions would be nice.

    You should take a look at what delMar is working on here I think you two could complement each other quite well. Maybe a team up?

    Welcome again!
    Shades
     
  9. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    It works now, thanks.

    So, it seems I've got SM1.5 up and running here, sir.
    I bow to you!
     
    Last edited: Mar 11, 2015
  10. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    Mouths are not animated when talking. But eyes are. But besides that, it seems to work perfectly (just started the first mission so far)
     
  11. Mekt-Hakkikt

    Mekt-Hakkikt Mpanty's bane

    Messages:
    5,399
    Likes Received:
    66
    Trophy Points:
    51,885
    Location:
    Wiesbaden, Germany
    Sounds very cool, thanks for your work!
     
  12. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    Strange! There is no lip sync text until the 6th mission; and then it is the typical "Bimorgameslikwincamandertoo". I looked into the original SWC binary data and the lip sync text is not present. So it is not an extraction problem, someone forgot to add it.
     
  13. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    Small updated.

    WCGames Library
    - added support for reading SHIPTYPE files

    WC1Extractor
    - added support for SHIPTYPE files
     

    Attached Files:

    Shades2585 likes this.
  14. Shades2585

    Shades2585 none

    Messages:
    591
    Likes Received:
    21
    Trophy Points:
    26,185
    I did see some instructions a couple posts above my last comment. Sorry, I missed that. I hope to try this this weekend.

    I would love to get the binary for SWC. Could you post that please?

    Thanks! :D

    Keep up the great work!
     
    Last edited: Aug 30, 2015
  15. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    Ok, I should have spotted that myself, sorry for the inconvenience. And thanks for taking a look into it, though.

    UnnamedCharacter, do you think you could also provide a version that's not command-line based but listens for HTTP POST requests?
    If not, no problem. One can always but a wrapper around it that takes care of that...

    Does it also compile under Mono?
    Wouldn't require Wine for running on Linux then...

    Just asking, no hurries :)
     
  16. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    On second thought, forget all that HTTP and Mono stuff.
    Any editor producing XML files is perfectly good enough, I guess.

    Talking about editors: is anyone already working on something? Just asking, because working on it without knowing about similar projects might turn out to be a waste of time...
    So, if no one's on it, I might give it a try in the near future.
     
    Shades2585 likes this.
  17. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    Hm, Shades, looks like some kind of translation table could come in handy here *hinthint*
     
  18. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    @UnnamedCharacter, I just tried to call
    Code:
    wc1xml briefing.002
    I get an exception, that the assembly could not be found. It looks for verison 0.13.0.32062
    Windows Explorer shows version 0.13.0.0 of BeBe.WCGames.Engines.dll
    I got a similar error with 0.12 (which was why I really updated to 0.13)

    calling
    Code:
    wc1extract briefing.002
    worked perfectly.
    briefing.002 is the original SM2 file, btw.

    I checked, if it fails with other files as well and it doesn't work for any or CAMP,BRIEFING or MODULE. None of 000 to 002.

    Another localization error?
    I wish I could start the .net runtime with a language parameter, so I could copy/paste the english error message here.
     
  19. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    The executable files depend on the DLL, are they in the same directory?
     
  20. delMar

    delMar Rear Admiral

    Messages:
    274
    Likes Received:
    43
    Trophy Points:
    22,635
    Gender:
    Male
    Location:
    Austria
    Yes, of course. Unpacked everything into the same directory. And the other exe is working, so it should be just fine.

    Different thing:
    I recognized some still unknown variables in the MODULE file among the mission ship points. Any chance of decrypting them soon? Just in case there's not, I asked for some information over at the source code thread...
     

Share This Page