Page 1 of 1

Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 07:19
by Goth Zagog-Thou
I ask because the more I've been working with the .ini and .js system the more I like it. The learning curve isn't really as steep as I thought, and I can pretty much dissect the varying bits of code and understand what's happening where and why.

Anything that'll get me away from the hell of .vlo and .slo, I'm all for it. :lol2:

So, is it ready? And yes, I'm willing to use Master builds (3.2).

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 07:28
by aubergine
There are still some features missing (see wishlist topic in this forum for more info), but it's very solid already and packed full of tasty features: https://warzone.atlassian.net/wiki/display/jsapi/API

Currently there's no way to play videos and a few other things that might be needed in campaigns, but looking at your slo/vlo scripts I'm pretty sure you'll be able to port most if not all the cam4 to js/ini. If you want it compatible with 3.1 and 3.2 some care will be needed (eg. lots of functionality is only avail in 3.2) and ini is more widely used in 3.2 as well (.txt are still dominant in 3.1).

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 07:38
by Goth Zagog-Thou
Goodie! It'll be a great environment to learn it in, too. Kinda like learning wzscript (which I had to do after Milo got me started with Cam 4), only less of a headache. :lol2:

I see that some wzscript functions are still there. Is this because the functions were ported over, or are they actual wzscript calls?

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 07:43
by aubergine
Wzscript stuff will still be around for a while yet. The JS API often calls the same back-end code in C++ from what I can work out. But my understanding is that eventually wzscript will be removed from the game, I think the campaign and Nexus AI are the last big users of wzscript, and it's getting closer to the point where both of those can be fully ported to JS.

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 08:34
by Goth Zagog-Thou
That's fine, it's there and I'm familiar with it. I'm not opposed to using wzscript calls, just the endless hell of .vlo and .slo files.

To put into context, I've looked over the Original Campaign files, and they're easy to read through. Campaign 4 has a level of complexity and inter-relation that most of the time I simply hate. I also freely acknowledge that it's also of my own doing. :lol2:

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 09:00
by bendib
I believe it's a good idea to actively maintain both APIs, and that's what I am doing in Legacy, but hey, WZScript is a bit of a pain. I keep it maintained for modding and historical purposes.

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 10:49
by Goth Zagog-Thou
I've got the .vlo ported to .js now. It also allowed me to clean up a lot of crap from the old one.

What I plan to do next is use the .slo as sort of a "guide" so that I'm not flying blind. The cleanups will be worth it once I sort out whats what.

I like working with the .js already. It's nice and clean, and the learning curve of how things are done in .js in general was easy. :D

Re: Is the .js api ready for prime-time?

Posted: 12 Jan 2013, 11:00
by NoQ
I like working with the .js already. It's nice and clean, and the learning curve of how things are done in .js in general was easy.
Couldn't agree more :)