Jump to content

IWD2 Command Line Script Compiler?


Gimble

Recommended Posts

I've been scripting for IWD2, and using Near Infinity to compile my scripts. So far, so good.

 

However, I'd like a command line compiler, so that I can use it with AISF to manage my script snippets, without the manual "copy the combined BAF into NI and compile" step.

 

I took a shot at using the BG2 compiler, but since they changed the format a bit for IWD2 the attempt was a failure.

 

Does anyone know of a command line compiler that works with IWD2?

Link to comment
Uhm, why don't you use WieDU? It works just fine on IWD2 :blush:
Ah, my initial response was "Great Idea!"

 

Then I discovered that AI Script Factory (AISF) requires the compiler to be named AICompile.EXE

 

No problem, just rename Weidu.EXE and I'm good to go.

 

Then the command line arguments (obviously) didn't match up between AICompile and Weidu. Oops.

 

I was about to give up in frustration, when I discovered all the nifty command line arguments for Weidu. An hour or so later with my favorite "C" compiler, and I now have a AICompile.EXE that changes the command arguments to be what Weidu wants, and then launches Weidu to do the dirty work!

 

(Granted, there was a few other details, but I won't bore anyone more than I already have).

 

So, it wasn't as easy as I first thought, but thank you!

Link to comment

(Sighs) Not quite as easy as I thought.

 

Weidu has (at least) one bug, as the following script compiles in Near Infinity and runs properly, but not through the Weidu compiler:

IF
!TimerActive(175)
Detect([ENEMY.0.0.0.0.0.0.0.0.CLASSMASK_GROUP_ALL])
THEN
RESPONSE #100
	FloatMessage(Myself,16360) // "Order the gate into town sealed!  Sound the alarm!"
	StartTimer(175,7)
END

 

It generates the following log in Weidu:

[weidu] WeiDU version 196
[C:\program files\black isle\icewind dale II/CHITIN.KEY] 133 BIFFs, 25819 resources
[C:\program files\black isle\icewind dale II/dialog.tlk] 41424 string entries
[weidu] Using scripting style "IWD2"
[TRIGGER.IDS] parsed
[C:\Program Files\Black Isle\Icewind Dale II/data/IDS.bif] 84176 bytes, 77 files, 0 tilesets
[EA.IDS] parsed

[test.baf]  ERROR at line 3 column 58-58
Near Text: )
Failure("assign 0 to unknown bracket position 8")
ERROR: parsing [test.baf]: Failure("assign 0 to unknown bracket position 8")
ERROR: problem loading [test.baf]: Failure("assign 0 to unknown bracket position 8")

FATAL ERROR: Failure("assign 0 to unknown bracket position 8")

 

Oh, and to be complete, Near Infinity generates the following output from the above:

SC
CR
CO
TR
16535 175 1 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
TR
TR
16500 0 0 0 0 "" "" OB
255 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 4095 OB
TR
CO
RS
RE
100AC
241OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
OB
0 0 0 0 0 0 0 0 1 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
16360 0 0 0 0"" "" AC
AC
61OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
OB
0 0 0 0 0 0 0 0 0 0 0 0 0 [-1.-1.-1.-1] "" 0 0 OB
175 0 0 7 0"" "" AC
RE
RS
CR
SC

 

I guess the proper way to report the bug is to email the address in the Weidu-README file, so I'll do that.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...