Validate actions and triggers in *.d files
#1
Posted 13 November 2002 - 09:25 AM
It´s here available for download.
There´s a large readme included. I hope it´s comprehensible, if not feel free to ask.
#2
Posted 18 November 2002 - 05:01 PM
To Dorotea, the Redemption author -- this is the tool you want to look into to chase down the script errors in your D files.
#3
Posted 18 November 2002 - 05:11 PM
I wanted to thank the author myself, but since I am a great procrastinator -I never did. It is a big help indeed. Right now I need help with scripting and precisely - how to use WEIDU to modify a block inside bcs's but I am working on it.
Again - I do recommend Validate. It is a great tool. My only comment will be it does not recognise some of the alignments from 'alignmen.ids'.
Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.
Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.
The Longer Road mod
Redemption mod
Bitter Grey Ashes
#4
Posted 18 November 2002 - 11:37 PM
Another possibility might be that you´ve exported the ids file with NI without saving it to the override folder first. To export a file with NI means 'write the file as it is'. Because files not found in the override folder are compressed the exported ids file is compressed too and that´s why validateD doesn´t recognise any entries.
Btw, current version of ValidateD is 1.21. Some bugs are fixed and it finds some more bugs and errors.
#6
Posted 22 November 2002 - 06:06 AM
#7
Posted 12 January 2003 - 02:13 AM
Features:
a) Checks actions and triggers in d files (now obsolete since WeiDU does it too), checks actions and triggers in script files (slightly better than decompilers like NI, InfExpl or WeiDU because it finds bugs like 'Dead("astSeenBy())")' which I was told are common decompile bugs but once you compile such a script again these bugs are also in your BCS file.
b) Creates a list of names used in your dialogues (D files) and/or in your script files. With this list you can easily find error like:
- using a variable as GLOBAL and as LOCALS,
- misspelling of names (variables),
- using variables with and without your mod prefix,
- mixing up parameters ('HasItem("Keldorn","SW2H10")' or 'HasItem("SW2H10","Keldorn")',
- using not existing items, spells,...
and perhaps many more...
#8
Posted 12 January 2003 - 08:07 AM
This program is an incredible idea, and works beautifully -- it's something that I've always wanted to be able to do with my .D files; get a text print out of all the Globals initiated and changed (and their line numbers!) and a listing of errors. I ran it on a dialogue I coded months ago, and it caught an error WeiDU was terribly vague on, and I had forgotten about. (And did I mention that global print out is ridiculously useful?)
Congratulations on writing this, and thank you for releasing it!
#9
Posted 12 January 2003 - 10:12 AM
This program is very nice. I put ValidateD (and its .dat file) and WeiDU in a system path directory with a whack-load of .bat files. Modding has never been so nice.
#10
Posted 13 January 2003 - 03:20 PM
Past: Ascension, Return to Windspear, Imoen Relationship, The Broken Hourglass
"Perfection has no deadline"
#12
Posted 25 January 2003 - 03:08 PM
#13 -Devon-
Posted 25 January 2003 - 10:35 PM
Must curse DOS for using '\' as path seperators even when the '\' is the harder charater on the keyboard to reach. The '/' is a much better seperator and '-' is a much better switch and a switch you can confuse with the path seperator.
Must end rant.
Cheers,
Devon Smith
#14
Posted 26 January 2003 - 01:58 AM
Must curse DOS for using '\' as path seperators even when the '\' is the harder charater on the keyboard to reach.
Hmmm, I can type a '\' using only one hand (two fingers). To type a '/' I need two hands . But I will change from '\' to '/'.
I will also allow '-' as switch in the next version. But most likely you don´t need much switches. The defaults are pretty good and for the rest I use an ini file.
Must have source code to port to Mac OS X.
If you really want to port it to Mac OS X send my a PM or an email. (But the source is soooo ugly.)
#15 -Devon-
Posted 26 January 2003 - 10:51 AM
dir \w
And I would get File Not Found errors. Actually, I would type 'ls' before remembering to use 'dir'.
I will busy the next few days, so I'll probably try to retrieve the code on Tuesday if you don't mind. Don't worry about its messiness, as long as its either in Basic, C, C++ or Java, I should be fine(I'm strangely enough beginning to understand a little Ocaml - though just a little). Pascal might be a problem though, I haven't seen that language in such a long time.
Cheers,
Devon Smith
#16
Posted 26 January 2003 - 11:39 AM
#17
Posted 08 March 2003 - 03:13 PM
New in this version:
DyValiTo can create a debug script that allows displaying the values of variables in the BG2 message window.
The debug script looks like:
IF HotKey(D) THEN RESPONSE #100 SetGlobal("DEBUGStartGlobalDebug","GLOBAL",1) END IF Global("DEBUGStartGlobalDebug","GLOBAL",1) AreaCheck("ARRTW5") THEN RESPONSE #100 DisplayStringNoName(Myself,~Starting ARRTW5 debug output:~) SetTokenGloba("RtWTombGuardDescription","ARRTW5","DEBUGOUTPUT") DisplayStringNoName(Myself,~ARRTW5 RtWTombGuardDescription: <DEBUGOUTPUT>~) Continue() END IF Global("DEBUGStartGlobalDebug","GLOBAL",1) THEN RESPONSE #100 DisplayStringNoName(Myself,~Starting GLOBAL debug output:~) SetTokenGlobal("AerieHardened","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL AerieHardened: <DEBUGOUTPUT>~) SetTokenGlobal("AerieRomanceActive","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL AerieRomanceActive: <DEBUGOUTPUT>~) SetTokenGlobal("AnomenIsKnight","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL AnomenIsKnight: <DEBUGOUTPUT>~) SetTokenGlobal("AnomenIsNotKnight","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL AnomenIsNotKnight: <DEBUGOUTPUT>~) SetTokenGlobal("AnomenRomanceActive","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL AnomenRomanceActive: <DEBUGOUTPUT>~) SetTokenGlobal("JaheiraRomanceActive","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL JaheiraRomanceActive: <DEBUGOUTPUT>~) SetTokenGlobal("Kidnap","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL Kidnap: <DEBUGOUTPUT>~) SetTokenGlobal("KorganMazzy25","GLOBAL","DEBUGOUTPUT") DisplayStringNoName(Myself,~GLOBAL KorganMazzy25: <DEBUGOUTPUT>~) ... Continue() END IF Global("DEBUGStartGlobalDebug","GLOBAL",1) THEN RESPONSE #100 SetGlobal("DEBUGStartGlobalDebug","GLOBAL",0) END
After compiling this script with WeiDU (version 114 or higher)
WeiDU debug.baf --tlkout dialog.tlk (--ftlkout dialogf.tlk) -- out scripts
and renaming the file debug.bcs into debug.bs you can start BG2, assign the script to a char, turn AI on and press 'D'.
You will get an output like
In the current version you can only display GLOBALs and area variables but I´m still looking for a good way to display also the LOCALS of a selected creature.
#18 -Sim-
Posted 08 March 2003 - 03:19 PM
#19
Posted 08 March 2003 - 03:42 PM
But I definitely will try all the things you and GB have suggested.
#20
Posted 09 March 2003 - 02:10 PM
I may end up stealing something like that for IWD2 debugging. Very nice.