WC:SO - Briefings

Jason_Ryock

Vice Admiral
Obviously the next step in my quest for knowledge, the ever important briefings.

Presently, rather then attempt to create my own .srs file (I'm not even sure which program to use to do this) and my own CDLayout filed (I have a problem with that one I'll address later)...

...I am over writing misison a1.mis, the first mission in the campaign, with my own edited mission to test it's briefing and the use of Objectives (also to experiment with the MS_GenericLaunch; function, in which the hanger looks upside down to me).

Anyway, in an attempt to reverse engineer some code, I started with:


function B_Player;
begin

BRIEF_CAM_SetActive(1); //Activate Camera
BRIEF_CAM_SetPos(0, 600, 0); //Camera location
BRIEF_CAM_TrackObj(Player); //Camera follow player

BRIEF_SetAppearance(1); //Ship ID
BRIEF_FaceObject(Nav1); //Face the firs nav

BRIEF_Activate; // player activates himself

BRIEF_WaitSeconds(1);

BRIEF_Exit;
end;

Obviously my M_Player Fuction has the line brief: B_Player;

Also obvious to anyone with some knowledge, this mission briefing code doesn't work. It responds with the command: "CMission::update - Unknown command! 0"

So...a little help? Haven't seen a briefing tutorial yet.
 

TanGO

Spaceman
Remove your B_Brief command declaration from M_Player and do as follows:

The brief function is a property of the "object" declaration.
As like you write
main:"M_Player"
you must write other line:
brief: "B_Player" (don't remember exactly if is "brief" or "briefing" is the name property.)

These also you must write other line with the the property "color" to object representation on the briefing.
i.e.: color: 0,0,0,1 (they are RGB values)

When I was learning about brIefs, I was several time ask me why the brief don't work... and simply the brief models needs the color else you only could be a black screen :)

Oh!, and the .srs file is done with wcpascal too!, later you have read how patch the exe file (this is the better way if you don't want overwrite the SO original files)

And also search in this forum the word "brief", 1 year ago Quarto gave me a lot of infornation about this because has not many info available on other sites about files, comms and other related things of briefings. :cool:
 

Quarto

Unknown Enemy
TanGO said:
Quarto, are you follow my teaching support? What do you think about your pupil (me)?
Hehe, well, to be honest, I don't read too closely when I see you've already responded to the problem. Considering that you've done half a dozen missions for us already, I have confidence that you can provide the right answers ;).
 

Jason_Ryock

Vice Admiral
Yeah actually, Tango, I tried copying your briefing text from the other thread into my mission to make it run and it skips right over the briefing and jumps into the spaceflight.

So I have a question. In that thread you mention something about a GF command that I don't seem to have in my mission, what is it and do I need it?

PS: I tried copying in Quartos briefing code too, which I'm sure is good (because it was used in UE). This leads me to believe that something in my mission coding is wrong, but I'm not sure what or even where to look.
 

Jason_Ryock

Vice Admiral
Hope this works...

Aside from the fact that I have no "// comments" in my mission, most of what's going on here isn't going to make a whole helluvalot of sense to anyone. ALSO, no one can just plug this code into their game and run it, because I've edit the targetid strings and the nav ID strings files to fit my mission, and I'm running it with my specific ships.

While it's possible that someone else could edit their game to match mine, the odds of them doing it correctly are slim to none. Oh yeah, also I'm overwriting the first mission in the SO Campaign, so once you do this it makes the campaign unplayable and creates a few other bugs I won't bother to get into here (needless to say I worked them all out by now, but someone else would have to figure out how to do the same thing as well).

I tried pasting the code in here, and got this message:
"The text that you have entered is too long (21004 characters). Please shorten it to 12000 characters long."

I was hoping it would be a quick fix, usually by describing my problem to Quarto and Tango they can point me in the right direction for a fix without examining my code.
 

Attachments

  • missionerror.txt
    19.7 KB · Views: 49

Jason_Ryock

Vice Admiral
"CMission::update - Unknown command! 0"

Was the original error message.

After I set it up like you suggested the mission loads without an error, but it skips over the briefing. AS in, I click on the mission doors and it launches my ship.
 

KillerWave

Spaceman
Jason_Ryock said:
ALSO, no one can just plug this code into their game and run it, because I've edit the targetid strings and the nav ID strings files to fit my mission, and I'm running it with my specific ships.

While it's possible that someone else could edit their game to match mine, the odds of them doing it correctly are slim to none.

Someone could simple edit the strings...

I took a quick look at your code, you're using Nav3 just to end the mission right?
You dont need a new navpoint just for that. Just create a global variable as false, and them in the end on Nav 2 set it to true, return the player to Nav1 and set a conditional in it (Nav1).
Something like that:

If (success=true) then
begin
SF_SetMissionSuccess;
end;


The advantage of it is that if you have any capships at Nav1 or something that should appear just there, you wont need to create it all over again in a new navpoint.
 

Jason_Ryock

Vice Admiral
I like you, you made sense out of my code! Yes, I did that, and I set a whole new set of capships for the third nav. I'll go play with it and try and fix that. Is there a way to set where the autopilot ends you after a flight? So I could arrange where the player is in relation to the capships?
 

TanGO

Spaceman
Exactly, AutoPilot transport at the player to center of nav point, a trick is move the capship on a distance of that center when you reactivate the nap point, using SF_SetWorldPoistion.
 

TanGO

Spaceman
Jason, I'm sorry but I have not spare time to review code, I can response you any question but review code is a lot of time. Your code repeat cap ships creation many times, it should be good if you learn how spawn ships, specially geting other ship or object coordinates, then, if you change ships or nav position, the spawned ships remain as you desing its positiions.
 

Jason_Ryock

Vice Admiral
Ugh, you know...I have spawn code that I tried to use for that mission, and everytime I tried to load the mission it crashed SO.

An interesting side effect from this is that the mission worked just fine in the simulator, but when I tried to run it as part of an .srs file it crashed the game. Go figure. Instead I used the Nav_CreateShipCommand a whole bunch of times.
 

Quarto

Unknown Enemy
Code:
function MAIN; // game main function
begin
MS_RunBriefing;
MS_RunGameflow(0); // start gameflow
MS_RunSpaceflight(0); // start engine
end;

That's wrong - RunBriefing should be after RunGameflow, since you want the briefing to happen right before spaceflight.

Also, try adding the following line somewhere the start of the mission. I don't remember for sure if this line is necessary to make a non-sim mission work, but I suspect it probably is.
Code:
#SetRooms ("Cerberus.rom");
 

Jason_Ryock

Vice Admiral
I think I need to include somewhere the data about the briefing screen...so it knows how to display the briefing....I don't know, maybe I'm wrong.

I added your line in and moved my Briefing command but it's still not working. I get the same error message listed twice above.

"CMission::update - Unknown command! 0"
 

KillerWave

Spaceman
Before adding more lines to your code, try to figure out the error first. If you add a bunch of stuff and leave to check the error later, it will be much harder to find it.

Try adding "\\" to the lines you believe are creating the problem to transform them in messages to see if it compile correctly. Once it manage to compile, you found the error.

From the message it seems that you're trying to use a command that SO doesnt understand. It happens while compiling or just ingame?
If it is ingame, there are certain commands introduced by HCl that need an edited exe file to run.
 
Top