.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Campaigns, Scenarios & Maps (http://forum.shrapnelgames.com/forumdisplay.php?f=106)
-   -   Extracting Scenarios from Campaigns (http://forum.shrapnelgames.com/showthread.php?t=25959)

cbreedon September 17th, 2005 01:51 PM

Extracting Scenarios from Campaigns
 
Is there a way to take a campaign and extract the scenarios within the campaign to make a stand alone scenario?

Beeg September 17th, 2005 02:23 PM

Re: Extracting Scenarios from Campaigns
 
It's been awhile, but I remember I used to save a campaign game, then rename it to a free scenario#. Then go into the editor and tweak it.

Beeg

cbreedon September 17th, 2005 02:30 PM

Re: Extracting Scenarios from Campaigns
 
that's basically what I have done, but I am having issues the with cmt files. Is there a specific program that you need to creat these?

Beeg September 17th, 2005 02:35 PM

Re: Extracting Scenarios from Campaigns
 
Don't know about a specific program. My guess is it's basic text. I would copy an existing .cmt file, edit it in notepad (windows), and save it as your new .cmt...or just make a new text file from scratch and name it *.cmt

Beeg

cbreedon September 17th, 2005 04:09 PM

Re: Extracting Scenarios from Campaigns
 
tried that.... it crashes the game when you get to the page that would have that scenario on it... It must be in some other format...

Beeg September 17th, 2005 05:05 PM

Re: Extracting Scenarios from Campaigns
 
I just tried it and it works ok for me. I renamed both save files to the new scenario files (dat & cmt). I opened the game, used the editor to tweak the new scenario, saved it and played a couple turns. No problems.

Beeg

Mobhack September 17th, 2005 05:33 PM

Re: Extracting Scenarios from Campaigns
 
Best to copy an existing CMT file, any one will do, to the slot your renamed scenario is at. Then open the scenario in the editor and re-save to a new slot, now renaming the scenario to the correct name you desire. If you need to extract several campaign scenarios, recycle the one renamed slot with the copied CMT file.

The CMT file is NOT text - it is binary with a string at the front, usually edits with <= the number of characters in the former CMT will work (but not alwayys). An edit that adds a longer string than the original had, is more prone to error. It's a C string, so expexts a null terminator (hex 0), and overwriting that can crash. As can editing with non USA-ASCII (Spanish text, say a cidilla will work OK on the Spanish guy's PC, but cause random crashes on UK, USA, and possibly other versions)

I'd edit one with a hex editor myself, ensuring a zero (0x0) at the end of the char string. Not sure if it excpects a CR/LF there either (Inspecting in a hex editor will show - 0x0D 0xOA AFAIR)

I have a very old (but it works http://forum.shrapnelgames.com/images/smilies/happy.gif version of frhed go to : http://www.kibria.de/frhed.html for the latest - a nice simple to use hex editor. HINT - put a shortcut on the desktop, and you can drop any file you want to hex-examine or edit onto the desktop shortcut icon and frhed will open with it http://forum.shrapnelgames.com/images/smilies/happy.gif

Just dumped a CMT frtom scenarios into frhed.exe - the string ends with CR/LF/NULL ie 0x0D 0x0A then 0x00-> EOF

So- a quick edit and save from frhed (and not textpad) will do the trick without any re-save needed.

Cheers
Andy

cbreedon September 17th, 2005 08:46 PM

Re: Extracting Scenarios from Campaigns
 
thanks Andy

I used the first method. I worked great.

I did try the hex editor for the heck of it though...messed the game up with that one....Oh well..


All times are GMT -4. The time now is 03:08 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.