Warning: Cannot modify header information - headers already sent by (output started at /home/nma/public_html/content.php:68) in /home/nma/public_html/includes/header.shtml on line 2
No Mutants Allowed - Your Post Nuclear News Center!
rss rss Like this on facebook Twitter this +1 this Steam group

Compiling a Script

How to compile a script in Fallout 2 ...

This is written by Zixdey.

It took me several hours to get it all sorted out the first time, even with the P.bat and all.

I plan to write a few manuals myself when I have the time. For now there's a pretty good manual I found that you can use, it's how I learned:

And since it's only 3:30AM and I have to get up at 6:30AM, I decided to write a manual myself. Violla:

Writing Fallout2 Scripts in the Modern Age for Beginners, by Zixdey

Tools you'll need:
  • The Fallout2 Game wink
  • The Fallout2 Mapper
  • Dat Explorer (or any other .dat extraction utility)
  • Watcom 11.0 C compiler (yes, it's free!) http://openwatcom.mirrors.pair.com/watcom/11.0c/watcom-c-11.0c.exe (Any C compiler should work, but the FO2 developers originally used watcom 11.0, so I use the same. It works perfectly smile

    A basic outline of what needs to be done:
    1. Compile your script
    2. Assorted annoying bits and pieces

    Before you can do anything you need to extract the master.dat file. For this there are several programs, I use Dat Explorer. Just extract everything into the 'data' directory in the main Fallout2 directory: c:\bla\bla\Fallout2\data\

    (Run datexpl.exe. Choose Dat file and then open 'master.dat'. Now right-click the main window and select 'Extract all files to ...'. Choose the 'data' directory in Fallout2's main directory (c:\...\Fallout2\data\).

    Note: Get ready to use a Command prompt (which is like DOS).
    (To open one just do 'Run...' the write 'cmd' and hit Enter.)

    If you're REALLY clueless about DOS:
    'cd mydir' enters a the directory 'mydir'
    'cd ..' goes back up on edirectory
    'dir' lists the files in the current directory
    'copy a b' copies file 'a' to file 'b'
    'del a' deletes the file 'a'
    'del *.txt' delete all files ending with 'txt'
    'format c:' erases your entire hard drive smile

    Let's get started:

    You write your script. Say it's called 'script.ssl', and it's in the directory 'c:\...\Fallout 2 Mapper\scripts\Arroyo\'. Go to that directory. Make sure in the 'scripts' directory (which contains 'Arroyo') the files 'dos4gw.exe' and 'compile.exe' can be found (they come with the mapper and are there by default).

    1. Compile your script
    This includes 2 sub-steps:

    1.1. Pre-Compilation
    This is where you use the watcom compiler. Copy 'script.ssl' to 'temp.c', then run:
    c:\watcom\binnt\wcc temp.c /pc /fo=temp.i /w4
    (The path might differ if you use Win9x and not WinXP/2000... I think you need to use 'binw' instead of 'binnt', but I haven't tried it.)

    This will create the file 'temp.i' Now rename 'temp.i' to 'temp.ssl' for the next step...

    1.2. Actual Compilation
    This is where you use FO2's home-made script compiler. Run:
    ..\dos4gw ..\compile temp.ssl

    This will create 'temp.int'. Rename this file 'script.int', and this is your compiled script!

    (Don't forget to remove all those temporary files you created on the way. 'del temp.*' works smile

    2. Copy your script to where Fallout2 can find it
    Copy your script ('script.int') from where you compiled it to Fallout's 'scripts' directory:

    3. Add your script to the file 'script.lst'
    This file is in the same directory. Just open the file with a text editor (notepad works) and add your script's file's name at the end ('script.int').

    4. Edit some map and tell it to use the script
    For critters (which includes people, the player's character, animals, enemies and so on) change the category on the bottom left to 'critters', left click on the critter on the map whom you want to use your script, click 'edit' in the middle of the bottom toolbar, then click the button 'New Script' in the window that opens. Now choose your script from the enormous list, and save the map. (You might want to backup the '.map' file as well before doing this.) The same goes for objects (computers, doors, ...). I think each map has a map script attached to it, not sure yet.

    5. Get rid of patch000.dat
    You have to make sure you don't have the file patch000.dat sitting around in your Fallout2 directory. Otherwise the game will ignore your script. (Just rename it patch000.bak or something...)

    That's it! Nothing to it, eh? wink

    Just run the game and it should work. It's easier to check out your mod by opennig the map in the map editor and pressing F8, which lets you play the map.

    There's also a shortcut for steps 1+2:

    In c:\...\Fallout 2 Mapper\scripts\ there is a file P.bat that comes with the mapper. It's supposed to do steps 1+2 automatically for you. To use it just go to the directory as written before step 1 in a command prompt and run the following command:
    ..\P.bat script

    (Note that you have to write 'script' and not 'script.ssl'!)

    The 'P.bat' that comes with the mapper didn't work well for me. The main things that usually need changing are the watcom compiler's location and Fallout2's location.

    Here's the content of the 'P.bat' I use, so you can just copy/paste:
    @if not exist %1.ssl goto DONE
    @copy %1.ssl temp.c
    @c:\watcom\binnt\wcc temp.c /pc /fo=temp.i /w4
    @copy temp.i temp.ssl
    @..\dos4gw ..\compile temp.ssl
    @if %errorlevel% neq 0 goto ERROR
    @rem The path in the following line should point to the Fallout 2 folder:
    @copy temp.int ..\..\Fallout2\data\scripts\%1.int
    @del temp.c
    @del temp.i
    @del temp.ssl
    @del temp.int
    @goto DONE

    @echo ERROR: %_CWDS%%1.ssl >> ..\err.log


    Happy scripting!
  • Mon, 23 Nov 2015 18:22:37 GMT
    Fallout 4's first beta patch is out
    Fri, 20 Nov 2015 04:06:04 GMT
    Bethesda: Thanks and Updates for Fallout 4
    Mon, 09 Nov 2015 22:37:43 GMT
    Fallout 4 PC retail has a 18.8 GB Steam download
    Mon, 09 Nov 2015 13:04:00 GMT
    First round of Fallout 4 Reviews
    Mon, 09 Nov 2015 13:02:12 GMT
    Fallout 4 is officially released on Steam in New Zealand and Australia
    Sat, 07 Nov 2015 23:31:49 GMT
    Fallout 4's first review
    Fri, 06 Nov 2015 23:19:17 GMT
    The making of Fallout 4 - Game Informer article
    Fri, 06 Nov 2015 21:07:56 GMT
    Fallout 4 preloading has started on Steam
    Thu, 05 Nov 2015 15:35:56 GMT
    Fallout 4 Launch Trailer
    Wed, 04 Nov 2015 23:19:51 GMT
    Pipboy companion app for Fallout 4 is out
    Wed, 04 Nov 2015 15:07:43 GMT
    The Graphics Technology of Fallout 4
    -Opening Analysis: Fallout
    -AMA Q&A with Brian Fargo and Chris Avellone
    -Wasteland 2 Interview with Chris Avellone and Brian Fargo
    -Circle Junction
    -Wasteland Kickstarter Project Interview with Brian Fargo
    -The Origins of Fallout
    -Afterfall: InSanity review
    -Afterfall: InSanity preview
    -Lonesome Road Review
    -Old World Blues review
    -Fallout2 Hi-Res Patch v4.1.5
    -Fallout1 Hi-Res Patch v4.1.5
    -Falloup, a Fallout Comic by 'Ten'
    -WayDowntown V1.1
    -FO1 bos grenades quest
    -Fallout FIXT
    -Graphics Viewer v1.36
    -RobCo Systems Beta 1.0
    -S.T.A.L.K.E.R.: Anarchy Cell Design Document
    -Koan's Gift: Oblivion Lost Design Document Pack
    -S.T.A.L.K.E.R.: Oblivion Lost Design Document
    -S.T.A.L.K.E.R.: Oblivion Lost Story Outline
    -Uptown v1.4
    -Fallout Script Editor 1.5a
    -Mission Mojave Fixpack
    -Garden Of Eden Creation Kit
    -The Weapon Mod Menu
    -The Mod Configuration Menu
    -Interior Lighting Overhaul