00din
Elite Ant Killer

Group: Villager
Posts: 25
|
 |
00din's B&W2 Script Tool
« Posted Jan 16, 2008, 02:02 AM » |
|
This project is not done yet, but I've already included some nice features that really improves the scripting experience. Features: - Tabs to edit more than one script at a time.
- Quick access to enums.
- Open all scripts referenced in your challenges.txt. This will automatically set the Input and Output paths. ("Open Project" button or CTRL+SHIFT+O)
- Compile the project and get the feedback in the debug textbox ("Compile" or F5).
- Search the currently selected script for a specified string (press enter to get the next instance of that string).
- Line number is displayed for debugging.
B&W2 Script Tool Enjoy! 
|
|
Logged
|
|
|
|
Kays
|
 |
Re: 00din's B&W2 Script Tool
« Reply #1 Posted Jan 16, 2008, 02:59 AM » |
|
That looks nice. 
|
|
|
|
TheCraziestMonkey
Prepare for unforseen consequences....

Group: Villager
Posts: 24
|
 |
Re: 00din's B&W2 Script Tool
« Reply #2 Posted Jan 16, 2008, 01:45 PM » |
|
So this tool will make it all around easier to script?
|
|
Logged
|
|
|
|
|
|
TheCraziestMonkey
Prepare for unforseen consequences....

Group: Villager
Posts: 24
|
 |
Re: 00din's B&W2 Script Tool
« Reply #4 Posted Jan 17, 2008, 12:15 AM » |
|
Just got done playing with it and it's awesome! Scripting just got a whole lot easier with this! 
|
|
Logged
|
|
|
|
Kays
|
 |
Re: 00din's B&W2 Script Tool
« Reply #5 Posted Jan 17, 2008, 01:36 AM » |
|
I hate to say it. But it don't work for me.  I changed the pathes to one of my maps and the compiler did run with usual windows error message. But there was no .chl file created and in the result window it showed as only compiling two out of eight scripts. Also, when trying to open a script, I get a blank page and the following error in a popup. (WinXP SP2) See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.MissingMethodException: Method not found: 'System.String System.Windows.Forms.OpenFileDialog.get_SafeFileName()'. at BnW2_Script_Tool.mainForm.openProjectToolStripMenuItem_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- B&W2 Script Tool Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///D:/Black%20%26%20White%202/Tools/Script%20Compiler/B%26W2%20Script%20Tool.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ----------------------------------------
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
|
|
|
|
00din
Elite Ant Killer

Group: Villager
Posts: 25
|
 |
Re: 00din's B&W2 Script Tool
« Reply #6 Posted Jan 17, 2008, 05:30 AM » |
|
Monkey, I'm glad you like it.  If you have any suggestions please post them here. Kays, do you have .NET 3.5 installed? The error you get states that it can't find one of the standard methods. By the way, you can use Open Project if you want to compile.
|
|
|
|
« Last Edit: Jan 17, 2008, 05:33 AM by 00din »
|
|
|
Logged
|
|
|
|
00din
Elite Ant Killer

Group: Villager
Posts: 25
|
 |
Re: 00din's B&W2 Script Tool
« Reply #7 Posted Jan 17, 2008, 10:04 AM » |
|
I'll make it save all open scripts before compiling. Any objections?
I've also made it display an asterix in the tabname when a script has been modified since the last save.
|
|
Logged
|
|
|
|
|
|
Kays
|
 |
Re: 00din's B&W2 Script Tool
« Reply #9 Posted Jan 17, 2008, 11:10 PM » |
|
Installing .NET 3.5 got it to work. I couldn't open a project either. Got the same error. The problem with it not compiling was with the script. No errors, it just stops. But any other script seems to compile without problem. I like it. It puts every in one place and takes the mystery out of using the compiler. How about making it optional? If someone was using a text editor instead and that file was also open in the scripting tool. Any changes made in the text editor will be over written. That's a good idea.
A few suggestions: A way to close a project or display each project seperately. Right now if you open a second project all of those files are added to the existing open files. A popup window to define the path and name of the output fiie. Right now it defaults to the name of the challenges.txt file. Maybe even the option to output it directly to the Scripts/BW2 folder And a button to launch the game.  But other than that, it's a great tool and will remove some of the frustrations of scripting.
|
|
|
|
Daxter
|
 |
Re: 00din's B&W2 Script Tool
« Reply #10 Posted Jan 17, 2008, 11:14 PM » |
|
Oh yes I had to forget to mention how well your tool ran on my pc. As far as I know it works on Vista(though designed in XP) and it is simply brilliant. I must admit that I have using it these past few days, to make my scripting go much better and its easier to navigate in the same window rather than opening several text files for each of the enums(once again it wouldn't be a problem because I use Windows Aero). But an excellent effort so far. 
|
|
Logged
|
|
|
|
00din
Elite Ant Killer

Group: Villager
Posts: 25
|
 |
Re: 00din's B&W2 Script Tool
« Reply #11 Posted Jan 18, 2008, 08:44 PM » |
|
Umm... Remember to turn on the DB if your script uses any "say" or other DB commands. That's the only thing I can think of. Good. That was one of the reasons I wanted to make this.  Good point. I'll make a settings window. That'll require some reworking of the code, but can be done. Lionhead's compiler is a bit screwy, but I'll see what I can do. That should definitely be possible. Good idea.  Thanks, Daxter. 
|
|
Logged
|
|
|
|
00din
Elite Ant Killer

Group: Villager
Posts: 25
|
 |
Re: 00din's B&W2 Script Tool
« Reply #12 Posted Jan 18, 2008, 08:52 PM » |
|
I've uploaded the version with the changes mentioned earlier. Most notably of which is the list of defined scripts. B&W2 Script ToolNext I'll implement Kays suggestions and whatever else I can think of.
|
|
|
|
« Last Edit: Jan 18, 2008, 08:57 PM by 00din »
|
|
|
Logged
|
|
|
|
|
|
|
|
|