Please note that new user registrations disabled at this time.

Script compiler

This forum is to be used for all discussions pertaining to BioWare's Baldur's Gate II: Shadows of Amn.
Post Reply
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Script compiler

Post by hwttdz »

Any body know of a good place to find a user-friendly script compiler for either BGII/ToB or BG or IWD? A tutorial would be nice as well. Thanks.
User avatar
Sojourner
Posts: 3084
Joined: Sun Mar 25, 2001 11:00 pm
Contact:

Post by Sojourner »

Check out TeamBG.
There's nothing a little poison couldn't cure...

What happened here was the gradual habituation of the people, ... to receiving decisions deliberated in secret; to believing that the situation was so complicated that the government had to act on information which the people could not understand, or so dangerous that, even if he people could understand it, it could not be released because of national security.
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

I've gotten as far as a .baf file but cannot find out how to compile it.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Just use aicompiler.bat.
  • Script .baf must be in the Source folder.
  • Open a DOS prompt and move to the scriptcompiler folder.
  • Type "aicompile MyScript", where "MyScript" is, of course, the name of your script. No ".baf" or anything, just that. Off it goes.
  • Look in your Compiled folder for the result. The compiler runs asynchronously (meaning it says it compiled but is actually still doing so), so it'll take up to several minutes for the compiled script to arrive (depending on script size and computer speed).
  • If you want it to be a creature (enemy) script, just change the extension to ".bcs".
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

I don't have time to try that as of now but will hopefully try that tomarrow or later tonight. Thanks for the directions that was as I found yours and Kensai Ryu's site.
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

I tried this and got the error message too few parameters.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Right, sorry! You need to use compile.bat instead of aicompile.exe. So that's:

compile MyScript
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

Then move the compiled script to the override folder? Can you write a description for them? What about can I steal the scripts from enemies? Has anyone written any good .baf files? now that I know how to do this I have to learn the actual writing of good scripts.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Originally posted by hwttdz
Then move the compiled script to the override folder?
The \Scripts folder. You can assign any .bs script in the \Scripts folder to your party. The \override folder is used by enemies (and the script exstensions have to be changed to .bcs for some reason).
Originally posted by hwttdz
Can you write a description for them?
Not unless you mess with the dialog.tlk file, which is cumbersome and risky. So, no.
Originally posted by hwttdz
What about can I steal the scripts from enemies?
Certainly. You'll need some tool to decompile them, though. Best stuff around is Near Infinity. Less advanced but more user friendly is Infinity Explorer. Both will allow you to look at the enemy scripts (and a lot of other things).
Originally posted by hwttdz
Has anyone written any good .baf files?
You bet! I write .bafs weekly, and I'm not the only one. The biggest, most comprehensive party AI around is probably the eSeries (which is an adaptation by Cirrerek of the famous gSeries, adding ToB support).
Originally posted by hwttdz
now that I know how to do this I have to learn the actual writing of good scripts.
Don't hesitate to visit IEEAIS. It's focussed mainly on enemy AI, but a lot of members have worked on party AI in the past.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

What do you do with an .ace file and are there any scripts that do not require more files/modifications? Can you use any of these scripts with IWD, I wouldn't think so because there is no scripts folder.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Originally posted by hwttdz
What do you do with an .ace file
It's a sort of .zip file, but with better compression. You unpack it with WinAce Archiver.
Originally posted by hwttdz
are there any scripts that do not require more files/modifications?
Not sure what you mean here. Ask around on IEEAIS.
Originally posted by hwttdz
Can you use any of these scripts with IWD, I wouldn't think so because there is no scripts folder.
Some, yes. IWD's scripting engine is somewhere between BG1 and BG2 in terms of commands it supports. I don't know too much about this because I don't have IWD, but, again, ask around.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
jcompton
Posts: 427
Joined: Tue Apr 16, 2002 4:59 pm
Contact:

Post by jcompton »

I'm a little surprised Xyx didn't mention this, but NI includes a script compiler (and a better-than-nothing script editing interface.)
"t's a testament to the determined RPG fraternity that a number of Baldur's Gate II mods have been successfully produced. The best can be found at pocketplane.net." - PC Gamer UK
User avatar
hwttdz
Posts: 210
Joined: Fri Nov 30, 2001 11:00 pm
Location: Virginia
Contact:

Post by hwttdz »

I remember why I didn't get NI beacuse the jar file didn't work so I took that and all the runtime environment off my computer. I don't really want to try again so I'll live with what I have.

What I meant about scripts that do not require extra stuff was in the g series I think you needed to download 3 additional files and put them in different folders and the like. I'm just hoping for something I can put in the scripts folder and roll.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Scripting has evolved a little since BG2 came out. The extra files you need are IDS files, which contain simple lists of numeric constants for the compiler. Open one in Notepad and you'll see. The newer IDS add a few spells (mostly innate ones) and correct a few spelling mistakes (PLANATAR, ALUCRITY and such).

If you like to go back to the basics, you could browse around at BGScripts, the original scripting group, predecessor of IEEAIS. The group was cancelled but the files and posts are still archived. You can find old stuff there, probably earlier versions of the gSeries as well.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
Post Reply