Page 1 of 1

How do you develop scripts?

Posted: 02 Nov 2012, 12:09
by Duha
Hi, mod developers

There is many information how to code and show release version.
But I am interested how to deploy code during development.

Main purpose of this tread:
speed up development deploy. May be I don`t know some easy way. Or may be devs will create it.

Can you display step by step ho did you do it? (And ho to bot development)

Checking some code via rules.js
Spoiler:

Re: How do you develop scripts?

Posted: 02 Nov 2012, 14:52
by raycast
Try parsing the javascript with some JS interpreter/runtime/optimizer/whatever before even starting warzone. To catch any syntax errors.

Actually this is one of the reasons why I'm not convinced of using scripting languages for any larger development project. A C or Java compiler is really good at catching errors before you even run the program. (Well, for C you need to turn on -Wall etc. flags to make it really force you to fix them without trying ...)

Re: How do you develop scripts?

Posted: 02 Nov 2012, 16:17
by Duha
raycast wrote:Try parsing the javascript with some JS interpreter/runtime/optimizer/whatever before even starting warzone. To catch any syntax errors.
I am working in IDE and this is builtin features.
Actually this is one of the reasons why I'm not convinced of using scripting languages for any larger development project. A C or Java compiler is really good at catching errors before you even run the program. (Well, for C you need to turn on -Wall etc. flags to make it really force you to fix them without trying ...)
This thread not about writing scripts. This is about deploing scripts to game.

Re: How do you develop scripts?

Posted: 02 Nov 2012, 17:17
by Lord Apocalypse
You can check out some of the tools created for Neverwinter Nights script development or even the NWN toolset for Ideas. I think LilacSouls script generator has a source release, though in pascal/delphi if memory serves. The Script tool written for WZ script in 99/00 (I think) did not as far as I know include a source release. I don't remember if any of it has syntax highlighting or not.

Anyway, to speed things up a bit we really need a game script creator that can compile the script outside the game and parse it for errors.

Re: How do you develop scripts?

Posted: 02 Nov 2012, 19:26
by aubergine
I like syntax errors, they make me aware of the code I've written. It's like looking back on your past, realising you've made a mistake, and then you get to fix it and sit back with a calm smile on your face.

Re: How do you develop scripts?

Posted: 02 Nov 2012, 19:34
by raycast
@aubergine: well, that applies to both compile time and run time errors. Just that with compile time, the roundtrip is much faster to revisiting your code and finding the error...