DF-21 Mission Components: Difference between revisions

From DF21 Wiki
No edit summary
No edit summary
Line 12: Line 12:
# It should include a few screenshots that show off the misison.
# It should include a few screenshots that show off the misison.


=== Step by Step Converison Process ===
=== Conversion Process Basics ===
The process for converting missions is generally the same and you can use this guide  for any mission you choose. If you already have a mission to modernize and you know it is not available in the [https://df-21.net/downloads/levels/ Modernized Page] then you can skip the download step below.
The process for converting missions is generally the same and you can use this guide  for any mission you choose. If you already have a mission to modernize and you know it is not available in the [https://df-21.net/downloads/levels/ Modernized Page] then you can skip the download step below.  


===== Downloading the misison =====
==== 1. Downloading the misison ====
First we need to find a mission to convert. You can go [https://docs.google.com/spreadsheets/d/12ph7O8k80gGU2GdtdRoQ4qLxJyDzeGU1czZasoSETA4/edit?usp=sharing Here]  to see which missions have already been converted. You will see a google docs spreadsheet with level links. Look for those that are marked as '''Original'''  
First we need to find a mission to convert. You can go [https://docs.google.com/spreadsheets/d/12ph7O8k80gGU2GdtdRoQ4qLxJyDzeGU1czZasoSETA4/edit?usp=sharing Here]  to see which missions have already been converted. You will see a google docs spreadsheet with level links. Look for those that are marked as '''Original'''  
[[File:Google Docs Example.png|center|thumb|984x984px]]To get started lets go ahead and modernize a mission called '''Anchor Head: Tusken Raid Mini Level.''' Click on the download link from the google docs  and you will have a file called '''anchor2.zip.''' This is the oringial classic mission that needs to be modernized. Here are the contents of the zip file.
[[File:Google Docs Example.png|center|thumb|984x984px]]To get started lets go ahead and modernize a mission called '''Anchor Head: Tusken Raid Mini Level.''' Click on the download link from the google docs  and you will have a file called '''anchor2.zip.''' This is the oringial classic mission that needs to be modernized. Here are the contents of the zip file.
[[File:Anchor Hed Zip.png|center|thumb|758x758px]]
[[File:Anchor Hed Zip.png|center|thumb|758x758px]]


===== '''Mission Zip Structure''' =====
==== '''2. Mission Zip Structure''' ====
All Dark Forces missions should be in a '''zip''' file format (not a rar!). They need to have four components.  
All Dark Forces missions should be in a '''zip''' file format (not a rar!). They need to have four components.  


Line 30: Line 30:
Lets look at the '''anchor2.zip''' example.  
Lets look at the '''anchor2.zip''' example.  


It includes three files. The  '''anchor.bat , ANCHOR.TXT''' as well as '''ANCHOR.GOB.''' The GOB is the mission itself and what we will need to modernize. You will notice it is missing '''DFBRIEF.LFD - we will have to create it ourselves.'''
It includes three files. The  '''anchor.bat , ANCHOR.TXT''' as well as '''ANCHOR.GOB.''' The GOB is the mission itself and what we will need to modernize. You will notice it is missing '''DFBRIEF.LFD - we will have to create it ourselves.'''


===== Ensure the map is completable =====
==== 3. Ensure the map is completable ====
The first thing you need to do is make sure the mission can be finished with modern engines. Go ahead and play it using '''The Force Engine''' or '''Dark Forces: Remaster.'''   
The first thing you need to do is make sure the mission can be finished with modern engines. Go ahead and play it using '''The Force Engine''' or '''Dark Forces: Remaster.'''   


Line 48: Line 48:


To run the mission just double click on start.bat and the Remaster (now named as dark.exe) will run the mission. Be sure you can complete it!
To run the mission just double click on start.bat and the Remaster (now named as dark.exe) will run the mission. Be sure you can complete it!
=== Briefing File ===
Each modernized mission must have a briefing and objectives. This data is preserved in a file called '''DFBRIEF.LFD''' and must be present in the zip to be loaded by '''The Force Engine''' or simply extracted to be visible by the '''Remaster'''. Some missions already have this file so you can skip thi step but many do not. This guide will talk about creating a DFBRIEF file from scratch.
'''Important Note:''' This guide assumes there is only ONE mission in the GOB file (which is the vast majority of missions) . If there are mulitple mission additional work will need to be done in terms of multiple objectives and briefings.
==== Figuring out briefing details and objectives ====
To populate the briefing file you need to give it a description of the mission and some objectives. Typically, you can get this from the readme file that comes with the mission. If you do not have this you will need to come up with a few sentences that explain what needs to be done. Here is an example from ANCHOR.TXT <blockquote>================================================================
Title                   : Anchor Hed: Tusken Raid mini level v2.0
Filename                : anchor.ZIP
Author                  : Barry Brien
Email Address           : harachi@oceanfree.net
Misc. Author Info       :
Description             : You are Luke Skywalker, farm boy on Tatooine. You  have just received a distress call from your
  friend Windy, who is trapped in the village of Anchor Hed during a particularly bad Tusken raid.
  You rush to aid your friend in you T-16 Skyhopper, landing just outside the village gate, you
  are completely unarmed
  OBJECTIVES:
          Find Windy (Make sure not to kill him!)
           Get back to your ship
================================================================</blockquote>Here the author graciously provided us the information so now we need to create the DFBRIEF file itself.
==== Mapping briefing file to the mission ====
Dark Forces has 14 missions with names like SECBASE, TALAY or IMPCITY. We need to know which of the missions is being replaced and needs to have a briefing file. To do that we have to open the GOB file and look at the contents. There are many tools we can use but the easiest one is called CONMAN which you can download [https://df-21.net/downloads/utilities.php Here]  . Simply download and unzip the CONMAN program and then open the GOB file (in our case '''ANCHOR.GOB''') .
[[File:Anchorgob.png|center|thumb|801x801px]]
As you see, there are many files here but the ones we need is called '''JEDI.LVL .''' If you extract it - by either CTRL-C / CTRL-V the file into a folder or choosing '''File --> Extract Files''' option , then you can open it in NOTEPAD (or any other text editor) and see which mission is being overwritten. In our case, the mission being replaced is '''JABSHIP''' so this is what we will need to create a mission briefing for.<blockquote>LEVELS 1
Anchor Hed,        JABSHIP
//      (Comments must be at the end of this file)
//      This file contains the list of all the levels in Jedi,
//      and the DOS names for those levels.</blockquote>
Now that we have information on the mission being replaced and the description and objectives we should be ready to create a DFBRIEF.LFD file.
==== Creating a new DFBRIEF.LFD file ====
LFD files can also be opened with the CONMAN tool you used to open up the GOB. One would need to create a JABSHIP.ANIM and JABSHIP.DELT files that contain the briefing information. Specifically, the ANIM file contains the mission objetive overlays (Ex: Blue and Yellow color overlays) and the DELT file contains the mission briefing itself.
This is a highly complicated process that requires you to ensure you have pixel-perfect images. Because it is so complicated we've created a briefing generator at DF-21 which creates you the DFBRIEF.LFD file in seconds. All you need to do is fill in the information.
Start by going to the briefing generator page [https://df-21.net/briefing/ here]  On this page you need to fill out the briefing information. Be sure to select JABSHIP as the level you are placing (or the DFBRIEF.LFD won't work in game). It shoudl look like this.
[[File:Briefingpage.png|center|thumb|1048x1048px]]
When you are done - press "Create DFBRIEF.LFD" and it seconds you will download the file. Copy this file to ''anchor2.zip'' and rerun '''The Force Engine''' to see the new briefing. Otherwise, for the Remaster, copy '''DFBRIEF.LFD''' to the same folder as the d'''ark.exe''' executable. Now you can test your briefing.
When the mission starts you should see the new briefing file! It's also present in the PDA Mission Briefing page.
[[File:Anchorbriefing.png|center|thumb|898x898px]]
Additionally, if you click on the PDA objectives you will see them created as well.
[[File:Anchorobjs.png|center|thumb|794x794px]]
If you are having issues seeing your new briefing it is most likely due to you choosing the wrong level to replace in the briefing (as shown as JEDI.LVL file) or the game cnanot find the DFBRIEF.LFD file (maybe you've made a typo?).
'''Note''' for multiple missions. If you have multiple missions then you need to create the ANIM and DELT files '''''for each mission''''' to replace. You can use the briefing generator yourself to make new DFBRIEF.LFD files and then use CONMAN to copy the ANIM/DELT files into a single DFBRIEF.LFD file.

Revision as of 09:54, 22 March 2024

Why Convert?

Some classic maps are no longer compatible with modern engines such Dark Forces: Remaster or the The Force Engine . Their assets may be spread across multiple files and the LFD files may be renamed and are no longer detectable by the game. The uniform batch file may missing or may execute 16-bit DOS programs that are no longer compatible on modern systems. Having a standardized format for Dark Forces missions is important for automating mod loaders. We want to make it as simple as possible for new playerss to enjoy Dark Forces missions.

What must a modern map support include?

  1. It must support running in The Force Engine and preferably Dark Forces Remaster. DOS support is preferable but optional.
  2. The mission may have bugs but it must be completable - that is - it must have objectives that can result in Mission Complete message.
  3. It must have a single entry point - a start.bat file - that a user or a mod loader would execute. This is not required for TFE support.
  4. It must have a metadata.txt file that includes information such as the author, name of the misison, release date, version information as well as optional walkthroughs or reviews.
  5. For DOS and Remaster support it should attempt to clean up any stale LFD files (Such as DFBRIEF.LFD) so as not to pollute the directory.
  6. It should support multiple game stores such as STEAM and GOG.
  7. It should have a mission briefing as well as objectives.
  8. It should include a few screenshots that show off the misison.

Conversion Process Basics

The process for converting missions is generally the same and you can use this guide for any mission you choose. If you already have a mission to modernize and you know it is not available in the Modernized Page then you can skip the download step below.

1. Downloading the misison

First we need to find a mission to convert. You can go Here to see which missions have already been converted. You will see a google docs spreadsheet with level links. Look for those that are marked as Original

To get started lets go ahead and modernize a mission called Anchor Head: Tusken Raid Mini Level. Click on the download link from the google docs and you will have a file called anchor2.zip. This is the oringial classic mission that needs to be modernized. Here are the contents of the zip file.

2. Mission Zip Structure

All Dark Forces missions should be in a zip file format (not a rar!). They need to have four components.

  • The GOB that is the mission file itself
  • The DFBRIEF.LFD that contains the briefing information as well as mission objectives
  • The start.bat that should start the mission.
  • Optionally: The README.TXT file (or any .TXT file that explains mission instructions).

Lets look at the anchor2.zip example.

It includes three files. The anchor.bat , ANCHOR.TXT as well as ANCHOR.GOB. The GOB is the mission itself and what we will need to modernize. You will notice it is missing DFBRIEF.LFD - we will have to create it ourselves.

3. Ensure the map is completable

The first thing you need to do is make sure the mission can be finished with modern engines. Go ahead and play it using The Force Engine or Dark Forces: Remaster.

To test using the The Force Engine simply put the anchor2.zip (it must be in a zip!) and select it from the MOD menu. Play through it and ensure you get Mission Completed. If the misison has critical bugs you (or someone else) will need to fix them using WDFUSE or another editor which is out of scope for this guide.

If you are testing using Dark Forces: Remaster make a COPY the khnosu_shipping_<store_name>_x64 executable in your Steam or GOG directory to dark.exe. It should look like this - just CTRL-C and CTRL-V on your executable and name it dark.exe.

Create a batch file (using Notepad for example) and call it start.bat. Put this text inside the batch file.

dark -uanchor.gob

The -u parameter tells Dark Forces to use a custom a mission in this case, anchor.gob. For other missions you just put the name of the GOB you are working with such as bobafett.gob or academy.gob etc... .

In the example of anchor2.zip we already have a file called anchor2.bat that runs the GOB through Dark Forces. All we need to do is rename it to the standard name start.bat. It should look like this after you rename it - be sure to put the file in your Star Wars folder where dark.exe is located.


To run the mission just double click on start.bat and the Remaster (now named as dark.exe) will run the mission. Be sure you can complete it!

Briefing File

Each modernized mission must have a briefing and objectives. This data is preserved in a file called DFBRIEF.LFD and must be present in the zip to be loaded by The Force Engine or simply extracted to be visible by the Remaster. Some missions already have this file so you can skip thi step but many do not. This guide will talk about creating a DFBRIEF file from scratch.

Important Note: This guide assumes there is only ONE mission in the GOB file (which is the vast majority of missions) . If there are mulitple mission additional work will need to be done in terms of multiple objectives and briefings.

Figuring out briefing details and objectives

To populate the briefing file you need to give it a description of the mission and some objectives. Typically, you can get this from the readme file that comes with the mission. If you do not have this you will need to come up with a few sentences that explain what needs to be done. Here is an example from ANCHOR.TXT

================================================================

Title                   : Anchor Hed: Tusken Raid mini level v2.0

Filename                : anchor.ZIP

Author                  : Barry Brien

Email Address           : harachi@oceanfree.net

Misc. Author Info       :

Description             : You are Luke Skywalker, farm boy on Tatooine. You  have just received a distress call from your

  friend Windy, who is trapped in the village of Anchor Hed during a particularly bad Tusken raid.

  You rush to aid your friend in you T-16 Skyhopper, landing just outside the village gate, you

  are completely unarmed

  OBJECTIVES:

          Find Windy (Make sure not to kill him!)

  Get back to your ship

================================================================

Here the author graciously provided us the information so now we need to create the DFBRIEF file itself.

Mapping briefing file to the mission

Dark Forces has 14 missions with names like SECBASE, TALAY or IMPCITY. We need to know which of the missions is being replaced and needs to have a briefing file. To do that we have to open the GOB file and look at the contents. There are many tools we can use but the easiest one is called CONMAN which you can download Here . Simply download and unzip the CONMAN program and then open the GOB file (in our case ANCHOR.GOB) .

As you see, there are many files here but the ones we need is called JEDI.LVL . If you extract it - by either CTRL-C / CTRL-V the file into a folder or choosing File --> Extract Files option , then you can open it in NOTEPAD (or any other text editor) and see which mission is being overwritten. In our case, the mission being replaced is JABSHIP so this is what we will need to create a mission briefing for.

LEVELS 1

Anchor Hed,        JABSHIP

//      (Comments must be at the end of this file)

//      This file contains the list of all the levels in Jedi,

//      and the DOS names for those levels.


Now that we have information on the mission being replaced and the description and objectives we should be ready to create a DFBRIEF.LFD file.

Creating a new DFBRIEF.LFD file

LFD files can also be opened with the CONMAN tool you used to open up the GOB. One would need to create a JABSHIP.ANIM and JABSHIP.DELT files that contain the briefing information. Specifically, the ANIM file contains the mission objetive overlays (Ex: Blue and Yellow color overlays) and the DELT file contains the mission briefing itself.


This is a highly complicated process that requires you to ensure you have pixel-perfect images. Because it is so complicated we've created a briefing generator at DF-21 which creates you the DFBRIEF.LFD file in seconds. All you need to do is fill in the information.


Start by going to the briefing generator page here On this page you need to fill out the briefing information. Be sure to select JABSHIP as the level you are placing (or the DFBRIEF.LFD won't work in game). It shoudl look like this.

When you are done - press "Create DFBRIEF.LFD" and it seconds you will download the file. Copy this file to anchor2.zip and rerun The Force Engine to see the new briefing. Otherwise, for the Remaster, copy DFBRIEF.LFD to the same folder as the dark.exe executable. Now you can test your briefing.


When the mission starts you should see the new briefing file! It's also present in the PDA Mission Briefing page.

Additionally, if you click on the PDA objectives you will see them created as well.

If you are having issues seeing your new briefing it is most likely due to you choosing the wrong level to replace in the briefing (as shown as JEDI.LVL file) or the game cnanot find the DFBRIEF.LFD file (maybe you've made a typo?).


Note for multiple missions. If you have multiple missions then you need to create the ANIM and DELT files for each mission to replace. You can use the briefing generator yourself to make new DFBRIEF.LFD files and then use CONMAN to copy the ANIM/DELT files into a single DFBRIEF.LFD file.