Warning: I never did any scripting for either Fallout game, but I did do scripting on Klingon Academy, and it uses the same language (but different engine functions, obviously). Hopefully, this post will help more than hinder you...
Temaperacl wrote:ScriptLibs- Again, one I haven't messed around with much- basically the list of the lib files to use. This is just a comma-delimited list of other ipp files (minus the ipp extension). (The basic ones which you'll need to include are "system,stdlib").
If you're going to be making your own scripts, there's no reason you can't make your own lib files. They're just script files without an entry point for the engine (the 'main' procedure in Klingon -- I don't know what was used in the Fallouts, probably just the callbacks...).
Temaperacl wrote:ProcedureList- An optional list of the procedures in the script file in the format procedure ProcedureName;forward;. there is no problem with not including this.
Actually, it's optional only if you have the procedure defined before it's used in the script. For example, if you have:
Code: Select all
procedure Proc1()
begin
Proc2();
end
procedure Proc2()
begin
DoSomething();
end
Then you need to define Proc2 in the proclist. Otherwise, you've got to prototype Proc2
before you define Proc1. Even though it's optional, I'd recommend just defining all your procs in the list to avoid any compile time errors.
Temaperacl wrote:DebugPrint(msg)
Should print a message out to the Debug window (or maybe to the normal message window, but when you are in debug mode?) - I haven't been able to get into debug mode, so I can't be sure- if anybody knows how, let me know, please.
Without a debug version of the .exe, this isn't going to work for you. When scripting, the engine can output this to either Visual Studio's debug window, or a monochrome monitor if you've got one hooked up. It was very handy while scripting and for QA to use.
Edit: I see you got it working. Kudos. :wink:
Red wrote:This is true, however I'd like to point out that the compiler doesn't process this properly, as instead of creating a local variable for the function, it creates a global one. This means that every time you create a new variable it needs to have a unique name even though others are not within the scope of the function... This is quite annoying, especially dealing with decompiled scripts which use local variables.
Are you sure you're placing the definition for the new vars in the correct spot? To create a local variable to a procedure, you should have something like:
Code: Select all
procedure MyProc()
begin
variable myVar := 1;
end;
Red wrote:There is also \.
If it's used inside a string, it's an escape character so that the symbol after it is printed. For example:
Code: Select all
debug( "Print the double-quote " symbol." );