jsdebug
jsdebug
Loving the stuff being done on jsdebug.
I was wondering if JS API could get access to GUI functions for creating dialog boxes similar to that used by jsdebug? Initially just ability to create a window, add some tabs, panels, lists, buttons, etc., and have events for when selection changes, button clicks, etc.
I believe we could create much more advanced debug via script, including custom addon's that are script-specific, such as running unit tests or diagnostics within the script, listing chat commands, and so on.
I'd also like to have much more comprehensive reporting about the global scope and the global object, including non-enumerable properties, property descriptor objects, more accurate reporting of data types, improved rendering of data, ability to browse functions (possibly even with a syntax-highlighting editor) and so on.
It's possible the dialogs could be used in custom campaigns, for example to show a list of mission objectives and their current status.
I was wondering if JS API could get access to GUI functions for creating dialog boxes similar to that used by jsdebug? Initially just ability to create a window, add some tabs, panels, lists, buttons, etc., and have events for when selection changes, button clicks, etc.
I believe we could create much more advanced debug via script, including custom addon's that are script-specific, such as running unit tests or diagnostics within the script, listing chat commands, and so on.
I'd also like to have much more comprehensive reporting about the global scope and the global object, including non-enumerable properties, property descriptor objects, more accurate reporting of data types, improved rendering of data, ability to browse functions (possibly even with a syntax-highlighting editor) and so on.
It's possible the dialogs could be used in custom campaigns, for example to show a list of mission objectives and their current status.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Or even integrate it into Emdek's Map Editor.
I'd love for one of our map editors to be able to do campaign stuff in a visual fashion. I know I'm kicking a rabbit hole but Star Trek Armada II's built-in map & mission editing capabilities were nothing short of awesome.
I'd love for one of our map editors to be able to do campaign stuff in a visual fashion. I know I'm kicking a rabbit hole but Star Trek Armada II's built-in map & mission editing capabilities were nothing short of awesome.
Re: jsdebug
Well, yes, that too. Although I'd love the map editor to be in the game so I can see exactly how things look and try things out in realtime, with script debugger and entire game environment 100% warzone.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Just like Armada II. That's exactly how that one works.
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Okay, so I've got Master and we're running with --debug=script. How does one call up the jsdebug window?
Re: jsdebug
go in to cheat mode, then enter cheat code "jsdebug"
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Excellent, thanks. ^_^
Re: jsdebug
There's loads of other cheat codes useful for developers: scroll to developer section
The "damage me" code is useful to check units retreat, etc.
The "damage me" code is useful to check units retreat, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: jsdebug
Yet another new cheat: 'jsload'. It pops up a file dialog (pausing the game while the dialog is up - very bad form in MP!) and allows you to load any AI script you want from the 'scripts' directory in your write directory to run on the current player. New script global 'scriptPath' holds the path to whereever you loaded the script from, and is used automatically for include files. There is no longer any need to specify any paths for include files if they are located in the same directory as your main script.
The events 'eventGameInit' and 'eventStartLevel' are immediately called on the loaded script.
This is basically an 'autogame' that works with qtscript.
The events 'eventGameInit' and 'eventStartLevel' are immediately called on the loaded script.
This is basically an 'autogame' that works with qtscript.
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Nice. Is that in today's Master build?
Had a go with jsdebug and it seems very useful indeed.
Now to get cam 4 ported over ...
I do have a question about csv2ini -- can't seem to get it working in a browser. Is it meant to be a commandline tool? And yes, I have php installed on my 'nix install.
Had a go with jsdebug and it seems very useful indeed.
Now to get cam 4 ported over ...
I do have a question about csv2ini -- can't seem to get it working in a browser. Is it meant to be a commandline tool? And yes, I have php installed on my 'nix install.
Re: jsdebug
See readme.txt in the same folder.
No, browsers aren't supposed to understand php.
Also, yay.
Also, doesn't compile (false instead of NULL in a couple of places, i think).
No, browsers aren't supposed to understand php.
Also, yay.
Also, doesn't compile (false instead of NULL in a couple of places, i think).
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: jsdebug
Looks like I'll be doing this manually.
I don't have the patience to deal with difficult-to-use tools today.
I don't have the patience to deal with difficult-to-use tools today.
Re: jsdebug
With jsload does it load in to currently selected player, or only player 0? For example, could I use old debug menu to switch to different player then jsload a new script for that player?
Also, I imagine jsload type thing could be used in multiplayer games if a player quits -- they could be replaced by an AI so that the game can continue?
Also, I imagine jsload type thing could be used in multiplayer games if a player quits -- they could be replaced by an AI so that the game can continue?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: jsdebug
"allows you to load any AI script you want from the 'scripts' directory in your write directory to run on the current player."aubergine wrote:With jsload does it load in to currently selected player, or only player 0?
Yes.aubergine wrote:For example, could I use old debug menu to switch to different player then jsload a new script for that player?
It is not meant for that purpose, and changing players with cheat menu during multiplayer will create desyncs.aubergine wrote:Also, I imagine jsload type thing could be used in multiplayer games if a player quits -- they could be replaced by an AI so that the game can continue?
Re: jsdebug
Thanks for infos
I've started documenting the js debugger: https://warzone.atlassian.net/wiki/disp ... t+Debugger
Anyone got a screenie of the 'triggers' tab?
I've started documenting the js debugger: https://warzone.atlassian.net/wiki/disp ... t+Debugger
Anyone got a screenie of the 'triggers' tab?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO