Jump to content

Update BG(2)EE's CLua console information


CrevsDaak

Recommended Posts

Around a month ago Cerevant posted some new CLUAConsole: commands particular to BG:EE's engine. Link.

Updates to the OP, with permission from Cuv‌:

 

Console commands can now begin with C: instead of CLUAConsole:

 

C:Eval("action") : execute a scripting action. Note that any quotes in the action itself need to have a "\" before them. A list of available script actions can be found in the IESDP.

Example - C:Eval("ActionOverride(\"Cernd\",MoveGlobal(\"AR0406\",Myself,[1368.1922]))") Will move Cernd to the specified location.

 

C:Exec("filename") : executes a series of console commands contained in the file specified by filename, where filename is in the game directory

Example - C:Eval("test.txt") Will execute all the commands in the file test.txt

I found this today and it's missing on the IESDP soooo let's tell the guys about it why not.
Link to comment

While we're on it, by inspecting the BG2EE executable and browsing the BGEE forum I have found a couple more CLUA commands currently not listed in IESDP. The last one is probably very useful for modders.

 

SetWaterAlpha(alpha)

Sets the transparency of water overlays. alpha values range from 0 (fully opaque) to 255 (fully transparent). Default is 128.

 

Sql(unknown)

Unknown. Probably not useful for the average user.

 

WriteScript(folder)

Originally posted by Cuv years ago. Link.

CLUAConsole:WriteScript("[Directory Name]") Output scripts to directory

 

Note: If the mouse is over a creature, the command will evaluate the scripts attached to that creature. Otherwise it will evaluate the area scripts.

 

Example - CLUAConsole:WriteScript("DebugScripts") will output the script results to a folder called DebugScripts in the root of your BG install.

Link to comment

Evaluated script results? Most don't generate any output, so it doesn't sound that interesting, unless it just dumps them.

 

No, it will decompile and write the area script, or the creature's scripts. It is pretty useful.

Also, Eval can take single quotes so you don't have to escape the inner double quotes.

C:Eval('ActionOverride("Cernd",MoveGlobal("AR0406",Myself,[1368.1922]))') 

A bit readable and easier to type.

Link to comment

Archived

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

×
×
  • Create New...