jsdebug

For AI and campaign script related discussions and questions
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3755
Joined: 03 Aug 2006, 19:39

Re: jsdebug

Post by Per » 05 Feb 2013, 00:03

aubergine wrote:I've started documenting the js debugger: https://warzone.atlassian.net/wiki/disp ... t+Debugger
From your wiki: "Any errors generated will be echoed to the console." Actually, any result is echoed to the console. So you could write, say, "2+2", and it will output "4" on the console.
aubergine wrote:Anyone got a screenie of the 'triggers' tab?
triggers.png
(Not sure if showing both 'time' (time last triggered) and 'interval' (set interval between triggering) is actually useful.)

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: jsdebug

Post by aubergine » 05 Feb 2013, 00:18

I think they are both useful, but maybe rename "time" to "Most recent" (otherwise it could be misinterpreted as duration of the function invocation).

Also, maybe update column order to:

* Function
* Script
* Object
* Mode (Type)
* Interval
* Calls
* Most recent
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: jsdebug

Post by aubergine » 05 Feb 2013, 00:58

Also, would it be possible to show player ID before script name, instead of after? It just seems more logical as the script is associated with the player, not the other way round.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
NoQ
Special
Special
Posts: 6200
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: jsdebug

Post by NoQ » 05 Feb 2013, 07:03

Per wrote: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.
Uhm, now i can't use subfolders for files in /multiplay/skirmish/, as i do in NullBot3. That is, i can no longer, at all, include files that are not in the same directory.
Goth Zagog-Thou wrote:Looks like I'll be doing this manually. :(

I don't have the patience to deal with difficult-to-use tools today.
Maybe you give me the files and i'll try to run the thing? Not sure it'll work, but probably it'd be a good approximation.

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: jsdebug

Post by Duha » 05 Feb 2013, 19:19

Goth Zagog-Thou wrote:Looks like I'll be doing this manually. :(
I don't have the patience to deal with difficult-to-use tools today.
:)

Did you do it yet? I can help with script. Witch version of game? and where is files you need to convert?
http://addons.wz2100.net/ developer

User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: jsdebug

Post by Goth Zagog-Thou » 05 Feb 2013, 20:57

Thanks guys, I'm fine. Long day yesterday.

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: jsdebug

Post by Duha » 10 Feb 2013, 16:10

aubergine wrote:Thanks for infos :)
I've started documenting the js debugger: https://warzone.atlassian.net/wiki/disp ... t+Debugger
You can type JS code in to the panel below the globals list and click the Run button to evaluate that code against the global scope in the context of the global object for the associated script environment.

The result of the evaluation will be echoed to the console, eg. if you entered 2+2 then the console would echo 4.
In windows I can type only in capital letters to run input is it normal?
I wan`t something like firebug console or chrome debug console. There you can evaluate any code and has good inspectors.
http://addons.wz2100.net/ developer

User avatar
Rommel
Trained
Trained
Posts: 444
Joined: 03 Nov 2012, 19:44

Re: jsdebug

Post by Rommel » 10 Feb 2013, 16:24

Per wrote: It is not meant for that purpose, and changing players with cheat menu during multiplayer will create desyncs.
Sorry to be offtopic, but out of interest - what is a "desync"?
Moving back instead of forward
Seems to me absurd
~
Metallica - Eye of the beholder

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: jsdebug

Post by aubergine » 10 Feb 2013, 18:52

WZ is deterministic, if it sees something happening it's not expecting, that's a desync.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

Post Reply