WCP Pascal Help

TC

SubCrid
Can anyone explain the proper function for launching at the onset of a mission instead of starting in the middle of space. I've read through the documentation a number of times and, unless I missed something, there doesn't seem to be anything applicable.

Then, f course, it'd be nice to know how to set the landing info with AI_PLR_SetLandingInfo. I'm not sure on the arguments.
 
I never messed much with takeoff/landing sequences (all sequences i did so far where new ones), but afaik its MS_ShowTakeoffSequence(tag); wcp;
Landing is function SF_ExitLandObj(tag, capship, u1); wcp; ...i guess :p
Make sure the capship you want to launch from, or land in has an hangar, or the game will most likely crash.
The landing sequences dont work on the simulator btw.

Quarto can inform you better.
 
Originally posted by KillerWave
Quarto can inform you better.

Let's hope so. ;) As far as I know, UE's using painfully scripted landing and take-off sequences instead of those one-liner sequences... just like Standoff (and just like B5 I suppose).

Are you sure you don't want me to add a hangar component to that new Bengal, Q? :D

--Eder
 
Havent you added hangar to your capships Eder?? At least the ones i saw, i remmember they had...didnt they?

A hangar for the bengal would be a good idea, but since the new landing/takeoff sequences have already been scripted (i think), there is no need. Would mean change the code...again :p
 
Well, yeah, my capships do have hangars, as you've already seen for yourself. :) This Bengal I'm working on is for UE, though. (Though I could probably re-use it with different textures, later on... Hmmmm ;))

--Eder
 
Well, I had to do some quick research to work out AI_PLR_SetLandingInfo, but I can now reply to your questions in full :).

1. Takeoff
There are two options you can use:
MS_GenericTakeoff(tag);
MS_ShowTakeoffSequence(tag);
In each case, <tag> stands for the name of the ship you're taking off from. The difference between the two commands is that GenericTakeoff works for any ship (including, IIRC, non-capships, but I don't remember for sure), and shows the player taking off from a hangar (this is the takeoff used in the Relay Station mission). ShowTakeoffSequence, on the other hand, requires a capship with a launcher component - as far as Confed goes, this limits you to the Midway and Cerberus.

2. Landing
Having checked a WCP mission, I believe these are the parametres taken by SetLandingInfo:
AI_PLR_SetLandingInfo(capship, winning comm line, losing comm line, series);
(of course, winning and losing could be the other way round - I'm not quite sure on that)
What this basically does is determine the conversation that takes place after a mission is over. <capship> determines who it is that responds to the player's "need clearance" call. Then there are references to the line numbers to be used depending on victory or failure, and finally the series file from which they are being drawn. To use the generic "you succeeded/failed, you're cleared" comms instead of special ones, you put -1 for each of the comm line numbers, and (I think) any series number you like. So, you will probably want something like this:
AI_PLR_SetLandingInfo(Cerberus, -1, -1, 1);

Note that the above line also automatically triggers the standard landing sequence, when you get within the right range of the capship specified in the command. It is possible that this message works in connection with the SF_SetBaseShip command, which I'll explain in a moment.

Then, there is also the command that KW mentioned:
SF_ExitLandObj (tag, capship, u1);
<tag> is the landing ship - obviously, this will almost always be the Player. <capship> is the ship we're landing on - be warned, it must have a hangar component. <u1> is... well, unknown, obviously :p. I believe it's probably the number of the hangar component you're landing at, but I am not certain.
It is interesting to note that SF_ExitLandObj is never actually used in WCP or SO, although WCP missions usually have it (remarked out) - the command was probably developed before (AI_PLR_SetLandingInfo), and became obsolete.

There is another command that can be used for landing. This is:
SF_ExitLandObjEscort(tag, capship_tag, ship1_id, ship2_id, series, comm, u1);
Lots of parametres there... <tag> and <capship_tag> are the same as before, as is <u1>. <ship1_id> and <ship2_id> are fighters flying on either side of <tag> during landing (these are not references to specific fighters from the mission, apparently - just the type of fighters). <series> and <comm> refer to the comm line number and series number for the comm message played during the landing. This command is used once during WCP - if you don't help the Kats the second time round, you're arrested and see this landing sequence.

Earlier, I mentioned:
SF_SetBaseShip(tag);
<tag> in this case is a capship. It is _vital_ that this capship have a hangar component. This command is basically there so that the game can keep track of the player's home base - if the base ship loses all its hangar components, for example, the game will automatically trigger the "you are unable to land" message (which is why the base ship needs hangar components), and if the base ship dies, you get the "your carrier was destroyed" message.

Final note: I have never tried using any of the commands listed above during sim missions, so I'm not sure if they work. KW says the landing commands don't work, so that answers half the question. Takeoff commands might work, I guess. SetBaseShip probably doesn't work properly - usually, it would give you the restart/quit menu, but in this case, if it works at all, it will just dump you back to the sim mission selection screen.

If you're interested in doing more than sim missions, BTW, you should take a look at KillerWave's homepage - he's just uploaded a rather lengthy tutorial I wrote about series files.
 
Originally posted by Quarto
If you're interested in doing more than sim missions, BTW, you should take a look at KillerWave's homepage - he's just uploaded a rather lengthy tutorial I wrote about series files.

Yeah, I actually already did , thanks for the information. :)
 
Of course, that doesn't mean I can write them... stupid inability to properly add all the room functions for SO...
 
You mean modifying the original SO campaign, or modifying room files? The former should be relatively easy if you decode the SO campaign and rebuild it in WCPPas. I could do that if you want...
As for modifying room files, that's also rather easy, but I haven't had the time so far to write a tutorial about it (though I do intend to write one as soon as I find the time).
 
The campaign files. The issue would be that I have no clue how one would go about (somewhat easily) rebuilding them in WCPPas after decompiling. I mean, looking at the result after decompiling the file gives me the gist of what's going on, but I couldn't get the conversion to WCPPas all done manually without a rather large amount of work and screwing around...
 
All right, I'll do that for you then. It shouldn't take me long.
...Any idea when those voiceovers might be ready, BTW?
 
...And done. Go to KW's page. The link to the SO campaign file has been added to the bottom of the series tutorial.

Note that I have not tested this file in action. It compiles fine, so it should work fine, too. However, it is possible that trying to use existing SO savegames with it will result in a crash. If that is the case, you will need to delete \savegame, \history, autosave.gsw and replay.gsw.
 
Back
Top