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
    Wow, it has been a long time since an update. Work on the toolbox has continued and this release has substantial changes.

    There are major API/XML changes, resulting in breaking backward compatibility. The code base has been refactored making it easier and quicker to add support for new file types.

    The ability to edit strings in the WC1 executable has finally been added; only a few strings are supported at the moment. For this release I was more concerned with getting the functionality in place and will tackle the tedious work of finding additional string pointers in the future.

    This release also begins support for WC2 and WCAcademy; only a few file types at the moment: COMM, DIFFLEVL, INTELSHP, PALETTE, SPEECH, WAVEINFO, etc.

    See first post for the file attachment.

    This will most likely be the only update for this year; Merry Christmas everyone.
     
  2. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    WC1 EXE String Editing

    Editing strings in an executable is tricky; there are several constraints. The total amount of space available for strings cannot change; to make one string longer, another has to be made shorter. Strings can be grouped together into a block, with many blocks and individual strings spread across different locations within the executable.

    For example, imagine the following scenario of 4 strings divided into 2 blocks.

    Original layout of strings: 5, 5, 5, 10 = 25 characters
    [DATA] [ string5, string5, string5 ] [DATA] [ string10 ]

    Modified strings: 3, 3, 3, 16 = 25 characters
    Failure: not enough continuous string area for a string with a length of 16

    Modified strings: 8, 3, 3, 11 = 25 characters
    Failure: cannot fit all strings
    [DATA] [ string11, string3, (empty1) ] [DATA] [ string8, (empty2) ]​

    The good news, there are several strings within the executable which can easily be sacrificed with no real impact: the error messages, the information to purchase Secret Missions, and even the credits if necessary. I do not recommend making the sacrificial strings empty, in case the game needs to display a message, but instead to make them as short as possible. At the moment, the algorithm used to position strings is very simple; it does not try to maximize available space.

    Use the following XML to produce the result in the images bellow.

    Code:
    <ExeFile>
      <ExeFile.Strings>
        <ExeFileStrings>
          <ExeFileStrings.Bar>
            <ExeStringItem Value="Talk to SHOTGLASS." />
            <ExeStringItem Value="A longer talk to ??????????????" />
            <ExeStringItem Value="Talk to ??????????????" />
            <ExeStringItem Value="Check pilot scores" />
            <ExeStringItem Value="Enter barracks" />
            <ExeStringItem Value="Fly training mission" />
            <ExeStringItem Value="A longer talk to %s." />
            <ExeStringItem Value="" />
            <ExeStringItem Value="Talk to %s." />
            <ExeStringItem Value="" />
          </ExeFileStrings.Bar>
          <ExeFileStrings.ErrorMessage>
            <ExeStringItem Value="Sorry, an error has occured..." />
            <ExeStringItem Value="You do not have enough memory." />
          </ExeFileStrings.ErrorMessage>
    ...
    
    wc-left.png wc-right.png
     
  3. UnnamedCharacter

    UnnamedCharacter Master Chief Petty Officer

    Messages:
    87
    Likes Received:
    44
    Trophy Points:
    1,235
    Since there has been a few post recently about medal scores, I thought I would update the WC1LiveViewer. It has the same restrictions as before, only Kilrathi Saga is supported (WC1.EXE and wing1.exe).

    To use it, start the game, then this program (WC1LiveViewer). If it recognizes the running process, it will populate the table with game data. Since the game data is continuously updating, I find the best approach is to keep pausing the game during gameplay.

    wc1liveviewer-medalscore.png
     

    Attached Files:

Share This Page