How do you develop scripts?

For AI and campaign script related discussions and questions
Post Reply
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

How do you develop scripts?

Post 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:
http://addons.wz2100.net/ developer
raycast
Trained
Trained
Posts: 131
Joined: 12 Sep 2012, 19:16

Re: How do you develop scripts?

Post 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 ...)
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: How do you develop scripts?

Post 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.
http://addons.wz2100.net/ developer
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: How do you develop scripts?

Post 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.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: How do you develop scripts?

Post 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.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
raycast
Trained
Trained
Posts: 131
Joined: 12 Sep 2012, 19:16

Re: How do you develop scripts?

Post 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...
Post Reply