The basics of Script

The_Pastmaster

It Wandered In From the Wastes
Is ther anyone who know were you can find and learn the basics of
Fallout 2 Scripting for newbs the learn insted of asking the same
annoying question over and over...

"How do I script that"
"How do I do this"
"What dose that do"
"How do I make that"

Gez I get a headache just thinking about it...
 
Well, there are some tutorials around, but the best way to learn is, IMO, first-hand. Take decompiled working scripts as examples and off you go! :) Also, Fallout scripts are basically C programming language, so it helps a lot if you know that....
 
Shadowbird said:
Take decompiled working scripts as examples and off you go! :)

The FO2 script source that comes with the mapper is a much better reference than decompiled scripts for learning how they work. You see all the names that are in the headers, not just numbers.

First step is being able to compile the existing scripts that came with the mapper (without changing them). You need to have watcom installed and edit the p.bat file in the \mapper2\scripts directory.

Then when compiling works, do a very simple script, like the one I posted at DAC yesterday, the actual code is 3 lines.

You need to study the mapper docs (script commands) and look at FO2 script source to learn how they work. Its not like a regular programming language. We are using existing procedures that are already set up for different things like:

talk_p_proc - when player tries to talk to this critter
use_p_proc - when player does the "use" function on this critter
combat_p_proc - actions during combat

The rest are documented in the mapper docs, and you can see example of their use in the FO2 script source.
 
Read these two descriptions on setting up for script compiling:

http://www.coljack.pwp.blueyonder.co.uk/fallout/compsetup.html
http://modguide.nma-fallout.com/#Scripting002

Get watcom 11 from here:
http://openwatcom.mirrors.pair.com/watcom/11.0c/watcom-c-11.0c.exe

And get to the point where you can compile existing scripts. Look in one of the script directories in the mapper, like \mapper2\scripts\arroyo and you'll see a batch file there arroyo.bat

If you look at that batch file what it does is

call ..\p ACBRAHMN
call ..\p ACDOG
call ..\p ACERIC
call ..\p ACFIST
call ..\p ACGECKO
etc

So once your p.bat (in \mapper\scripts) is properly set up, you can compile any script using this call ..\p SCRIPT in a batch file.

When you have successfully compiled existing scripts, then try to compile that simple floating text example.
 
Just to query, the fallout scripting language looks a lot like pascal to me, so is it actually based off c or is it pascal? ( Ive never really used either much, but had to do a small amount of pascal for a course, syntax is just about identical, so I guess it could be some form of hybrid but maybe c is similar to pascal? )

Anyway, yeah id also go with just messing around with preexisting scripts after going through the tutorials on getting compilers set up and everything.
 
It was programmed in C (which is mostly irrelevant, but anyway...)

It looks a lot like pascal, with some C/C++ additions and using a preparser to use macros, something which is not at all common with pascal programs (though doable).
 
yeah, I figured they might have a calgorithm for decoding the pascal into predefined methods ( well thats fairly obvious i guess, but what the hell )
 
Back
Top