|
|
| (2 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| So you have designed something with GMax or FSDS3, but your desires are outreaching the capabilities of MakeMDL? And now you have come across one of those tips that describes how you can tweak the source code to get the result you want, but you have no idea where to start with source code tweaking. Then this article should be enough to get you going.
| | #REDIRECT [[ASM_tweaking]] |
| | |
| == Does MakeMDL produce source code then? ==
| |
| | |
| MakeMDL makes a BGL or MDL file for you, but does it also produce a source file for you? Yes it does! Normally this source code is created only temporarily and removed when the BGL or MDL has been created. But you can also keep this source file and that gives you the abbility to tweak your object beyond the limitations of MakeMDL.
| |
| | |
| OK, so when you want to tweak the source file, the first step is of course to save it. How to do this is different for the GMax gamepack you are using.
| |
| | |
| === How to keep the source file [Fs2002] ===
| |
| | |
| For the Fs2002 gamepack it is rather simple. Just make sure you have the latest version of [http://download.microsoft.com/download/FlightSim2002/Install/sdk/W982KMeXP/EN-US/MakeMDL_SDK.exe MakeMDL] for Fs2002 installed. Now you will see that the options screen during the export also has an option "Keep files". This will make sure that the source files are saved in the same folder as the BGL file you created.
| |
| | |
| === How to keep the source file [Fs2004] ===
| |
| | |
| For the Fs2004 gamepack things are a little more complicated. MS has tried to hide the options screen from us, so we can not access it directly anymore. But there are still ways to save the source files.
| |
| | |
| The first option is to use [http://hometown.aol.de/_ht_a/docmoriarty3/fs2002/dl/MDLCommander.zip MDLCommander]. After you have installed MDLCommander as explained in the documentation, you will get the options screen again on export. Selecting the "Keep files" option will save the source files agian in the folder where you created your MDL file.
| |
| | |
| A second option is to make a cfg file for MakeMDL. If you write a line "Keep=1" (without the quotes) in this file the source files will also be saved. So your makemdl.cfg could look like this:
| |
| | |
| <code>[Options]<br>
| |
| Keep=1</code>
| |
| | |
| == Cool, now I have the source, but... ==
| |
| | |
| MakeMDL has now created two ASM files for you. But why two and what can I do with them?
| |
| | |
| You can open these source files with any text editor, like Notepad for example. What you will see then is just a lot of commands that define your object. If you open the source with a program like Word, please be sure that you save it as plain text afterwards.
| |
| | |
| As you have seen MakeMDL made two source files for you, myfile.asm and myfile_0.asm. What is contained in these two files? In theory the myfile_0.asm file contains all the actual code of your object. So the vertices, textures and polygons. The myfile.asm contains "only" the basic framework that allows you to place the object or that adds the crash detection to it. Most changes will thus be made to the myfile_0.asm file.
| |
| | |
| == How to get a new BGL/MDL file ==
| |
| | |
| After you have made the changes to the source files you want, the final step is to create a new BGL or MDL file. To do this you will need a compiler that converts the ASM source code into a BGL/MDL file for FS again.
| |
| | |
| For Fs2002 you need to use [http://download.microsoft.com/download/FlightSim2002/Install/sdk/W982KMeXP/EN-US/bgl_compiler_sdk.exe BGLC] for this. BGLC is the compiler that MS supplied for creating scenery files (BGL), BGLC stands for BGL Compiler.
| |
| | |
| For Fs2004 MS has not provided an updated BGLC, but an updated version has been made by Richard Ludowise (rhumbaflappy), you will need to download [http://www.fsdeveloper.com/forum/attachment.php?attachmentid=72 BGLC_9] to be able to compile your updated MDL file.
| |
| | |
| Now that you have the tools, the next step is to actually compile. Here you again have a couple of options.
| |
| | |
| You can do it in the Windows style. That means that you select your source file and then drop it onto the icon of the BGLC/BGLC_9 program. A new BGL/MDL file will then be created. You only need to compile the myfile.asm file, the myfile_0.asm file is automatically included. In the case of BGLC_9 it could be that a BGL file is created, but you will have to rename it to MDL.
| |
| | |
| The other option, and I prefer this one, is to use the command prompt (DOS). To compile a file you would have to type something like this:
| |
| | |
| <code>bglc myfile.asm<br>
| |
| bglc_9 -mdl scenery.asm</code>
| |
| | |
| Note that I added the option -mdl for BGLC_9, as that will automatically set the extension to MDL. To make use of the command prompt really easy, you could also put the folder of BGLC/BGLC_9 on your path, then you can call it from any folder you wish.
| |
| | |
| After you have compiled the new files you can use them just like the files GMax creates directly. So have fun tweaking your work!
| |
| | |
| [[category:Scenery design]]
| |