Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Tahna Los on August 01, 2005, 01:38:26 am

Title: Editing CS2 files
Post by: Tahna Los on August 01, 2005, 01:38:26 am
I took one of the recent builds from your website to solve an issue regarding ATI drivers and OpenGL 2.0.  One thing I immediately noticed is that one of my missions were skipped.  Is there a utility out there that will allow us to edit CS2 files so I can go back to that mission?  I know that there is a CSG edit utility, but it will not edit CS2 files.

Anyone?
Title: Editing CS2 files
Post by: karajorma on August 01, 2005, 02:20:35 am
You can replay any mission from a campaign that you have already passed via the tech room simulator.

If you type -allslev into the custom flags box you can play any mission in a campaign.
Title: Editing CS2 files
Post by: WMCoolmon on August 01, 2005, 02:34:21 am
Alright, by popular demand I've slapped together a quick (command-line) program that will set the current mission on csg and cs2 files.

However. I can't compile a windows executable, although it should compile and run under windows.

Once it's compiled, you just need to type in "(program name) (target .csg/.cs2 file) (target mission #)"

I've tested it under Linux AMD64 and it seems to work fine. As I said it should work under windows; Mac OS will need someone to setup things to swap to compensate for endian changes.

It should work for retail FS2 campaign files as well, FS1 will require the CAMPAIGN_FILE_MIN_VERSION to be changed, but I suspect it will work then.

It performs fairly strict checking, so you can't mess things up by pointing it at a multiplayer file or somesuch. :p

Source code attached with a sample Linux executable.

Edit: Uploaded zip with windows executable, as well as an i386 linux one.
Title: Editing CS2 files
Post by: Tahna Los on August 01, 2005, 11:26:45 am
Quote
Originally posted by karajorma
You can replay any mission from a campaign that you have already passed via the tech room simulator.

If you type -allslev into the custom flags box you can play any mission in a campaign.


The funny thing is that I tried doing that.... but the skipped mission will not appear in the Tech Room.
Title: Editing CS2 files
Post by: karajorma on August 01, 2005, 12:01:04 pm
That is odd. Which campaign and which mission?
Title: Editing CS2 files
Post by: Tahna Los on August 13, 2005, 04:18:24 pm
Main Campaign.  Just before the mission: The King's Gambit.  Just after i installed the latest build, it goes straight to the Sicilian Defense instead.

I tried to set the mission to #23 (King's Gambit), it does not work.  Also setting the mission to #22 (Proving Grounds), it also does not work.  Both times, the mission skips to "The Sicilian Defense"