[Current Forum ] [Archive 2003 - 2005]
[Register]  [Profile]  [Preferences]  [Search]
[Private messages]  [Memberslist]  [FAQ]  [Login]
Subsim Radio Room Forum Index » » Sub Command » » Idea for a util
Author Idea for a util
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-10 12:27   
OK this might be a bit out of my league.
A prog for making campaigns easier. Now I don't just mean the linking them but a util for writing out the cam file and also for making up the briefing screens like in the stock missions.

That would be cool.
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Bill Nichols


Joined: Feb 27, 2002
Posts: 664
Posted: 2002-12-10 12:31   
Quote:

On 2002-12-10 12:27, XabbaRus wrote:

...a util for writing out the cam file and also for making up the briefing screens like in the stock missions.

That would be cool.




Yes, I'd love to be able to add briefing screens to a custom campaign. My Silent Dolphins campaign is crying for this!
_________________
My Sub Command website: www.subguru.com


  View Profile of Bill Nichols      Edit/Delete This Post   Reply with quote
jsteed


Joined: Apr 08, 2002
Posts: 253
Posted: 2002-12-10 15:07   
Hi Ben,
Sounds like a perfect project for you. I'm sure it could be done in VB. It's also simple enough to be a way to learn C++.

Happy programming, jsteed


  View Profile of jsteed      Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-10 16:24   
Well jsteed I hope you could be on hand to help me out with advice.

Could someone also explain to me how the briefing screens are setup in the manual way then I would be able to develop a spec to make a util for it.

First though I'm going to work on a cavitation speed vs depth util.
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Monophonic


Joined: Feb 28, 2002
Posts: 279
From: Espoo, Finland
Posted: 2002-12-10 17:59   
I thought I had already written about this somewhere, but I can't find it. Well, this comes from distant memory mostly, so I may get some bits wrong.

First, in the cam file there's the other file name beside the mission script itself. That name is the grp file that contains the briefing. SC will expect to find identically named ndx and agg files. The ndx file is the natural counterpart of the grp file, and the agg file contains the voice of the briefing.

The grp file contains a bundle of files. The central script is names briefcontents.txt, and controls the entire briefing. Then there are a bunch of jpg images, one for each screen. 800 by 600 pixels. Then there are a bunch of text files, which contain the text for the screens. Now they seem to be peculiarly named: each with the name part of the respective jpg image, followed by a number which is the ordinal of the screen in question. Then there is the familiar dot and txt suffix. No spaces or any other punctuation. For example, names might be MapRussiaSides.jpg and MapRussiaSides1.txt

Then to the contents of the briefcontents.txt. I'll show the structure first and discuss it in detail below:

Code:

<number of screens> <name of the CAM file> <unknown number, use zero> <unknown path, not deciphered>
<name of jpeg file> <name of wav file> <goal codes> <text box coordinates>
<name of jpeg file> <name of wav file> <goal codes> <text box coordinates>
... one line for each screen



number of screens and name of CAM file are self-explanatory.

unknown number and unknown path if anyone can figure these out, let me know

name of jpeg file and name of wav file again self-explanatory. Note: text file name is nowhere in this file, the game "guesses" it from the jpg file name.

goal codes four numbers referring to a goal in an earlier mission. Whether a particular screen is displayed is decided from the outcome of that goal. One of them is the number of the mission, one is a number of a goal in that mission, and one chooses which outcome(s) to accept. The meaning of the remaining number is unknown or forgotten. I know I had these meanings written down somewhere, but I have no ****ing idea where!

text box coordinates four numbers, giving the top left and bottom right corners of the text box for the briefing screen.

And an example for an ending.

Code:

2 ABR.cam 0 C:\temp
MapRussiaPlain.jpg R_RM_01_b.wav 2 1 0 0 25 37 300 350
MapRussiaSides.jpg R_RM_01_b.wav 2 1 0 0 25 37 300 350



This is a briefcontents.txt which I tried out a long time ago. Naturally it crashed SC, and there are quite a few reasons which may have been behind it. Might have been that mystery path, might have been extra stuff in grp. (cmputil cannot create new ones from scratch so I had to use an existing as a base. I grabbed cursor.grp/ndx which was smallish in size.) It might have been that I used progressively encoded jpgs.

As you can read, there's still a myriad of things here I don't understand. If anyone can fill in the blacks, please oh puhleeeeeze DO!
_________________
Signature unavailable during refit&resupply.


  View Profile of Monophonic   ICQ status         Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-12 09:42   
OK looking at the files, that undeciphered path I've noticed is Y: Which I think SC uses as an internal reference inside a grp file.

Just a long shot but I think it is a default in SC.

This will take a bit of figuring out...

If Bill doesn't mind I might take a look at his campaign and match the goals up and see how it all links up.


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Lock this Topic Move this Topic Delete this Topic
Powered by phpBB Version 1.4.4
Copyright © 2000 - 2001 The phpBB Group

phpBB Created this page in 0.041945 seconds.