	Making Privateer Missions: By Mario Brito v0.3

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

		P L E A S E   R E A D   T H I S !

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

  This is more of a Mission Editing File than a Mission Making one.
  This is because I am editing just one slot of one mission. (S5Md, I think)
  I'll be honest: There's still much i don't know, like how to assign
people to bases and work 100% with the PROG parts. This is still version
0.3, so i'm hoping to make later versions as I figure things out...

  A good idea on how to distribute missions is to make patch programs
in Qbasic, Pascal, C++, anything.
  Sending the whole TREs would be really painful, since the two that
matter are 7Mb and 300Kb long. To send these by E-Mail would take more
time than most people are willing to spend to download a mission.

  In this ZIP there's also a mission I made. 
  Note that you'll have to backup your SPACE.TRE and GAMEFLOW.TRE.
  In fact, the ideal would be to copy Privateer Floppy + RF to another
directory in the HD, because you'll have to backup the SPACE.TRE for the
mission, GAMEFLOW.TRE for the briefing and PRSO.TRE for system changes
(see Vortex Generator and system ships part) if you want the Salthi or
RF items. If you don't, you can make system changes in the SPACE.TRE.
  Either way, we're looking at a backup of almost 10Mb. That's almost 
the whole game!
  To play the mission you'll have to use the savegame that came with the
mission. The ship you'll fly is *NOT* the ideal ship, but I *KNOW* the
mission will be a challenge if you play it this way.
  You can use PREDIT to upgrade your ship, but that's cheating.
  Remember, you can fly a challenging mission or an easy one. Your call.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

A) Briefings

  To make a mission look good, nothing better than a briefing
explaining what you have to do. I hope I will find out how to 
make Briefings for WC1 and WC2.

73 61 6E 64 72 61 00 00 00 6E 6F 72 6D 61 6C 00         sandra   normal
00 00 72 61 6E 64 63 75 5F 31 00 AF 00 13 00 48           randcu_1   H
69 2C 20 24 4E 4D 2C 20 67 6F 6F 64 20 74 6F 20         i, $NM, good to
73 65 65 20 79 6F 75 20 61 67 61 69 6E 2E 00 C8         see you again. +
00 70 63 00 00 00 00 00 00 00 6E 6F 72 6D 61 6C          pc       normal
00 00 00 72 61 6E 64 63 75 5F 32 00 AC 00 0F 00            randcu_2  
48 69 2C 20 43 61 70 74 61 69 6E 2E 20 48 6F 77         Hi, Captain. How
20 61 72 65 20 79 6F 75 20 64 6F 69 6E 67 3F 00          are you doing?
A0 


Ok, this excerpt of a briefing of mine will be enough to explain how to do
things:

 - "Sandra" is the name of the person.
 - "Normal" is the state of mind (nervous, surprised, etc)
 - "Randcu_1" is the scenario.
 - I don't know what those AF 00 13 are for, let them be.
 - Your text goes next. You can use $NM, for the name in the savegame, and
$CS for the callsign.
 - Finally, that C8 is the color of the writing. Usually, Brownhair has a A0,
that makes the writing white, and the person he's talking to has a C8, that
makes the writing brown.


  For the Accept/Refuse choice:

65 64 2C 20 24 4E 4D 2E 20 57 69 6C 6C 20 79 6F         ed, $NM. Will yo
75 20 74 61 6B 65 20 74 68 65 20 6D 69 73 73 69         u take the missi
6F 6E 20 74 68 65 6E 3F 00 C8 07 73 61 6E 64 72         on then? +sandr
61 00 00 00 72 61 6E 64 63 75 5F 31 00 AF 00 13         a   randcu_1  
00 00 70 63 00 00 00 00 00 00 00 6E 6F 72 6D 61           pc       norma
6C 00 00 00 72 61 6E 64 63 75 5F 32 00 AC 00 0F         l   randcu_2  
00 4F 6B 2C 20 77 68 61 74 20 64 6F 20 49 20 68          Ok, what do I h

 - Put a 07 after the color byte (C8 07), then put the name and scenario
along with three bytes (AF 00 13). I don't know what they do. Then just
put the 00 00 interval and put the "YES" choice after that.


  For the "NO" choice just put a 05 after the color byte.

69 6F 6E 2C 20 6F 6B 3F 00 C8 05 00 00 00 00 00         ion, ok? +

I'm still having a few problems with a "NO" choice, but what the heck...
After all, we'll make new missions and fly them, not reject them right?
Just use the "NO" byte to end the briefing.



	A2) Related lists:

		Persons:

	Sandra
	Merchguy
	Mercgirl
	Miggs
	Lynn
	Roman
	Salman
	Mastersn
	Terrel
	Tayla
	PC (brownhair)
	Taryn
	Monkhous
	Piratnav (X)
	Monte ( monte = sandoval, i think)

		States of Mind:

	Normal
	Nervous
	Surprise
	Angry
	Afraid

		Scenarios:

	Rand_npc
	Random
	Random0
	Random1
	Random2
	Random3
	Adoff_1
	Adoff_2
	Pbarcu3
	Mercecu
	Hpdlr_1
	Libcu_1
	Libcu_2
	Pnbgcu1
	Pnbgcu2


	Artifct1
	Artifct2
	
NOTE: There may be more. I just found these...


	A3) Characters at table. 

  Ok, so after we have our briefing done, we won't want to appear a "Talk to Sandra Goodin"
if in fact we'll be talking to an Admiral, right?
  Here's how to change it:

                                            -------- Person
                                           |
CA 53 50 52 54 53 48 41 50 00 00 00 07 07 D3 00         -SPRTSHAP   +
46 00 56 00 00 4C 41 42 4C 00 00 00 16 54 61 6C         F V  LABL   Tal <- Write what you
6B 20 74 6F 20 53 61 6E 64 72 61 20 47 6F 6F 64         k to Sandra Good <- want in here (like
69 6E 00 52 45 43 54 00 00 00 08 46 00 56 00 6D         in RECT   F V m <- "Talk to Admiral")


		A3b) List of Persons:


	5A - Admiral Terrel
	CE - Lynn Murphy
	CF - Miggs
	D0 - Roman Lynch
	D1 - Dr. Monkhouse
	D2 - Sandoval
	D3 - Sandra Goodin
	D4 - Taryn Cross
	D5 - Tayla

	There may be more... I just found these...

  _PLEASE NOTE_ that some people may only look good in a specific scenario.


              -=-=- THIS CAN BE FOUND IN THE FILE GAMEFLOW.TRE OR PRSO.TRE -=-=-


B) Mission Making



	B1) Jump Points: my Vortex Generator.

  I was trying to make something new in Privateer, like a Vortex Generator that would open
a jump tunnel in a certain nav point and cross the entire sector in a single jump. So, I
tried to put new jump point in the mission. Since I failed, the only way is to modify the
jump points in the systems you're gonna travel to. Here's how to do that:

00 00 00 B8 2E 00 4A 55 4D 50 54 59 50 45 4A 55            +. JUMPTYPEJU
4D 50 00 00 00 00 01 00 00 3A 00 00 00 00 00 00         MP      :
00 00 00 00 00 00 FF FF 01 FF FF FF FF FF FF FF               _________
FF 2E

 - The "Jumptypejump" is telling that in this slot there's a jump point, not a ship.
 - The 01 is pointing to the 1st pilot (which in this case is JMPPYRI, since it's the
jump to PYRENEES).
 - After that, you'll find a 00 3A. The 00, represents nav 1 and the 3A represents Troy.
   Note that here BYTE_VALUE + 1 = NAV_POINT.
   To find the bytes that represent a System, go to space.tre and search for the System.
   You'll find about 3: two of them have the ships you'll find  in that system.
   The one that matters is the shortest (you'll know it's the one if it's only about 3
lines long; the other two are pages long).
   When you find the name, count back from the first letter of the name 5 bytes.
   That's it.
 - After that, i *THINK* the 01 is the number of jump tunnels. If not 1, may crash Priv.
(may, may not. Don't take the chance.)
 - The 2E is the Jump Destination (system).

  Note that, by modifying a Jump point, we're creating a non-standard (and thus, not-linked)
jump point, so most times you'll jump out in the middle of the system and not near any NAV 
point at all.

	B2) Pilots

  Easy stuff. If you find anything that looks like this, you found it.

00 00 02 70 50 4C 41 59 45 52 00 00 43 4F 4E 5F           pPLAYER  CON_
41 41 00 00 43 4F 4E 5F 41 41 00 00 43 4F 4D 5F         AA  CON_AA  COM_
53 46 00 00 43 4F 4D 5F 53 46 00 00 43 4F 4D 5F         SF  COM_SF  COM_
53 46 00 00 43 4F 4D 5F 53 46 00 00 43 4F 4D 5F         SF  COM_SF  COM_
53 46 00 00 43 4F 4D 5F 53 46 00 00 43 4F 4D 5F         SF  COM_SF  COM_
53 46 00 00 43 4F 4D 5F 53 46 00 00 43 4F 4D 5F         SF  COM_SF  COM_
53 46 00 00 43 4F 4D 5F 53 46 00 00 43 4F 4D 5F         SF  COM_SF  COM_

  In here, you can see 2 different pilots: CON_AA and COM_SF.
  As you may have figured, CON means CONFED. Less obvious is the COM, that means CHURCH OF MAN.
  There are also PIR (pirates), MER (merchants), KIL (kilrathi), BOU (Bounty Hunters) and MIL 
(militia).
  I really don't have a clue what those AA or SF mean, so better let them be.


  There are, of course, some special ones:

	SDRONE
	SSCOUT
	KROIZ
	RETRO1
	RETRO2
	TOTH
	MIGGS
	REIS (Commodore Reismann, not RF)
	GARVICK (Garrovick)

  In Righteous Fire there are a few more: Kahl and Jones for example.

	B3) Mission text

  Easier still! Just write what you want!

00 00 13 C4 4D 53 53 4E 54 45 58 54 00 00 00 B4           -MSSNTEXT   
0A 54 72 61 76 65 6C 20 74 6F 20 50 65 72 72 79         
Travel to Perry
20 4E 61 76 61 6C 20 42 61 73 65 20 61 6E 64 20          Naval Base and
6D 65 65 74 20 77 69 74 68 20 41 64 6D 69 72 61         meet with Admira

	B4) Money to receive

2E 0A 0A 00 50 41 59 53 00 00 00 04 00 00 00 00         .

 PAYS   
46 4F 52 4D 00 00 12 F0 53 43 52 50 43 41 53 54         FORM  _SCRPCAST
00 00 02 70 50 4C 41 59 45 52 00 00 43 4F 4E 5F           pPLAYER  CON_

 - Here's the PAYS section. Just put the money after the byte 04.

	B5) Ships

            02 00 74 61 6C 6E 74 79 70 65 74 61              talntypeta
6C 72 65 6C 69 67 02 00 00 3A 00 24 FA FF 00 7C         lrelig  : $_ |
15 00 00 00 00 00 2D 00 01 FF FF FF FF 05 00 FF              - ____ _
FF 

 - The "talntypetalrelig" is the Retro's Talon
 - The two "02" (one after and one before) are pointing to the pilot's number.
 - After the second 02, there's a 00 3A, which means NAV 1 (00), Troy system (3A).
 - After all this there are the coordinates of the ship, somewhere...
 - At last, the string "01 FF FF FF FF 05 00 FF FF".
   This part is not fully understood, and the expaination may not be accurate, but here's what
I think:

                  -- Well, i suspect this is related to SCENs. 04= 1st, 05=2nd, etc...
                 |   May be related to a final-byte 04 in PROG.
 01 FF FF FF FF 05 00 FF FF
  |
   --- = 00 Not there at first; will appear later
       = 01 It's there when you arrive
           This is the only byte i'm sure about!

		B5b) More on ships: Systems changes.(not missions!)


	FF FF 07 00 5A 12 00 54 41 4C 4E 57 49 4D 50 54         __ Z TALNWIMPT
	41 4C 50 49 52 00 00 15 00 02 3A 00 90 E8 FF 00         ALPIR   : __
	00 00 00 00 F4 01 00 02 00 01 FF FF FF FF FF FF             _  ______
			      |
			       -- Number of Pirate Talons

	07 00 5A 13 00 47 4C 58 59 54 59 50 45 4D 45 52          Z GLXYTYPEMER

		This only works in systems and seems to have no effect on missions.


  Btw, here's a list on ships:


Ship name	 - 	1st name 	-	 2nd name

Galaxy			glxytype		merchant
Tarsus			tarstype		clunker
Orion			oriotype		tug
Drayman			draytype		drayman
Centurion		centtype		fighter
Demon			demntype		demon
Broadsword		brodtype		brdsword
Paradigm		paratype 		frigate
Gothri			gothtype		gothri
Dralthi			draltype		dralthi
Kamekh			kamktype		kamekh

Talon			talntype		talmil (or) talpir (or) talrelig 
						/\/\/\      /\/\/\      /\/\/\/\

						These are the 3 types of Talon
						used by the 3 groups.
					        (militia, pirates and retros)

Gladius			gladtype 		gladius
Stiletto		stiltype		stiletto

Salthi			salttype		salthi			< - RF only!

Steltek Drone		drontype		drone
Steltek Scout		sscttype		scout

  There are, of course, some special ships. These are the only ones I can remember right now

1st N.  2nd N.

Jones   Fighter (centurion w/ 6 stelteks: 4 front, 2 rear)
Elite   Salthi  (salthi with stelteks)


	B6) SCEN

  Using a SCEN command (or SSCEN in the savegames) is the way to call a ship to a location.
  The differences between SCEN and SSCEN are:

		- SCEN is used only in TREs and SSCEN only in savegames.
		- There can be only one SSCEN, but you can have many SCENs in a TRE.

53 43 45 4E 00 00 00 1F 01 00 3A FF FF FF FF FF         SCEN    :_____
FF 01 00 02 00 03 00 04 00 05 00 06 00 00 00 00         _     

 - Here's the structure of a SCEN:

SCEN 00 00 00 1F 01 nav-1 sys FF FF FF FF FF FF ship 00 ship 00 ship ... ship 00 00

  Note that if you call a ship to Troy Nav-1 in the SCEN (for example), if the ship(s)
being called are not defined as Troy Nav-1, they will appear a few seconds later, from
about 30000 clicks away. This is an interesting effect, that may be used in circumstances
such as "expect enemy reenforcements".

	B7) PROGs

  A PROG makes all non-standard actions happen, for example your little chat with the Steltek,
the power booster of the Ste. gun, a ship running away by jumping out (I saw this once in RF),
and, believe it or not, even Following Waves (you destroy a few ships and the more appear).
  This is really great! If only I could fully understand this...

  But here is what I know:

 - This string can be considered a header, when it comes to Following Waves.
   it's explained below.

	45 01 11 01 30 03 38 61 30 06 38 62 01
                        |     |     |     |  |
  Number of kills... ---      |     |     |   -- This is the "end string" byte.
... to call wave marked "61" -      |     |  
             Number of kills... ----      |
          ... to call wave marked "62" --- 


 1-> Note that the kill value is accumulated. Example: you must go to nav1 to destroy a few
     Retros. When you arrive to nav1, you kill 3 guys and wave "61" appears. Then you kill
     another 3 guys (3+3=6) and then wave "62" appears. And so on...

 2-> Keep in mind that the game will crash if it handles more than 7 ships (other than you,
     of course) at the same time. Slowdowns are a good indication that it may happen. I got
     a Pentium 120 and sometimes I can see the game a bit slower. Some times, the game
     crashes.


 - Following this string (with a 00H of interval) you can find as many strings as the one
   below, as many 38 xx exist in the last string.

	08 61 90 06 90 07 90 08 04
               

 1-> Note that every 90 is like a separator.
 
 2-> The 06, 07 and 08 are the ships invoked.

 3-> the 04 is the end byte

 4-> the 61 is the wave mark see above.


   You can find an example of this in the mission I made. It has the following prog strings:
                                          (mymiss.zip)

45 01 11 01 30 02 38 61 30 06 38 62 30 0A 38 63 01 <- This is the header for waves marked 
                                                      "61", "62" and "63".
00                                                 <- This is a separator

08 61 90 06 90 07 90 08 90 09 90 0A 04             <- This is wave "61", and it invokes ships
                                                      6,7,8,9,A (A hex=10 dec).
00                                                 <- This is a separator

08 62 90 0B 90 0C 90 0D 90 0E 90 0F 04             <- This is wave "62", and it invokes ships
                                                      B,C,D,E,F (11, 12, 13, 14, 15 decimal).
00                                                 <- This is a separator

08 63 90 10 04                                     <- This is wave "63", and it invokes only 
                                                      ship 10H, (16 decimal).

  When you arrive you'll find 3 talon. When you kill 2 of them (see first string, 30 02)
5 more will appear. 5 new ships + 1 that was left from the 3 initial ones, make 6 ships, what
will probably make the game a bit slower. It won't crash it, unless they're more than 7.

  After 4 ships out of these 6 are destroyed, 5 more will appear. 6-2=4 (the kill value is
accumulated, remember?). 2 ships left + 5 others=7. Really pushing the envelope on this one,
but the game can handle it (barely).

  Ok, right now we have 7 ships in the screen. After 4 have been destroyed (10-6=4), one last
ship will appear (an enemy Stiletto, if i can remember it correctly). 3+1=4 ships active at
the same time. No risks here.


-----------------------------------------------------------------------------------------------

 One last note on the mission I made: I've been playing my mission (mymiss.zip) a few times,
and some times, the game crashed on the 7 ships' wave. I thought I fixed the mission in file
mymissfx.zip, where you only have on the screen 5 ships at the same time. The game crashed
much less frequently, but it wasn't fixed yet.

  Finally, in file missfinl.zip is the fully debugged mission. No crashes to DOS anymore. The
changes I made pointed to these three things: Either ...

 1 - The mission had to many diferent ships...

                        or/and

 2 - ... the presence of cargo-carrying ships (like the galaxy) make the game handle more
     objects (cargo ejected when the ship was destroyed), what made the game crash...

                        or/and

 3 - ... maybe capital ships like the Kamekh souldn't appear in a following wave.


  Either way, even though the mission no longer crashes, when you got 5 Broadswords firing
against you in an asteroid field, you may experience some slowdowns.

-----------------------------------------------------------------------------------------------

                -=-=- THIS CAN BE FOUND IN THE FILE SPACE.TRE OR PRSO.TRE -=-=-
                               (in my mission, it's SPACE.TRE)


 - Well, this is all I know about Privateer Mission making. I personally think it's enough to
create a decent mission, but the most complex missions are usually more fun, because there's
more interaction. I hope to update this in a short time as I find thing out.

 I'm available for any question by E-Mail or on #Wing-Commander, because I realise this is
an incomplete file in some aspects.

 You can E-Mail me anytime, even if it's just to tell me what do you think of my mission.

					Mario Brito
				nop03079@mail.telepac.pt
					 PORTUGAL