Page 9 of 14

Re: The official --=jscam=-- thread

Posted: 10 Mar 2015, 22:18
by Per
vexed wrote:Do you mean, replace some entries in the wrf file just to load the needed scripts, or do you mean something different?
I meant basically moving most of mission.cpp and levels.cpp into qtscript functions, allowing scripts to control almost everything to do with mission changes, in detail.

Re: The official --=jscam=-- thread

Posted: 06 Nov 2016, 23:45
by Berserk Cyborg
I could try converting sub1-5 and sub1-5s.

Normally this would not be an issue, but how would I set the camera to follow the transporter for this mission? I have a working bare setup right now, but at the moment the view position starts off at the LZ.

Re: The official --=jscam=-- thread

Posted: 07 Nov 2016, 00:19
by Per
That sounds great!

Did you try the cameraTrack(droid) function? It is meant to do what you want.

Re: The official --=jscam=-- thread

Posted: 07 Nov 2016, 08:17
by Berserk Cyborg
I just used cameraTrack() and it works great!
About 90% done right now and sub1-5 works for the most part. Just need to iron out a few minor bugs.

Re: The official --=jscam=-- thread

Posted: 07 Nov 2016, 18:04
by NoQ
Sounds great! I'm still pinned down irl, but i'd try at least to review the patches once in a while.

You can proudly add yourself to http://developer.wz2100.net/wiki/jscam#LevelStatus (:

Re: The official --=jscam=-- thread

Posted: 07 Nov 2016, 18:43
by cybersphinx
NoQ wrote:Because it's hard to find/run the original game nowadays (legally)
COPYING.README wrote:5) Permission is granted to copy and distribute unaltered copies and/or images of the original game discs in any medium, provided that they are distributed free of charge and retain their original copyright and trademark notices.

Re: The official --=jscam=-- thread

Posted: 07 Nov 2016, 23:07
by Berserk Cyborg
I am not done yet, but I am having a problem with the win conditions. It brings up the return to LZ message after all artifacts are collected and the mission never ends unless I destroy all enemy objects/units. Did I forget to add something?

progress here

Re: The official --=jscam=-- thread

Posted: 08 Nov 2016, 00:50
by Per
I'm not up to date on how the campaign scripts work these days, but the interface to the C++ code is through the loadLevel(level name) function. Just specify the named level (they are defined in the gamedesc.lev file). I see it used in camNextLevel(level name) in libcampaign.js

Re: The official --=jscam=-- thread

Posted: 08 Nov 2016, 06:45
by Berserk Cyborg
I fixed the LZ win condition bug since my last post (pos1 coordinates must be lower in value than those in pos2 apparently). I think everything is done and my Git branch is here

I can create a patch if everything looks ok.

Re: The official --=jscam=-- thread

Posted: 08 Nov 2016, 10:25
by Per
Cool!

Actually, for complex stuff like this, it is actually better to just create a ticket, and add a link in it to your git branch.

Re: The official --=jscam=-- thread

Posted: 09 Nov 2016, 22:14
by Berserk Cyborg
See http://developer.wz2100.net/ticket/4524

I will try starting on sub1A-C.

Re: The official --=jscam=-- thread

Posted: 15 Nov 2016, 01:27
by Berserk Cyborg
How do I add a labels file for cam1A-C? Each level has a folder in the wrf/cam1 directory, but not this one. I can't make any progress on this level since all my positions and areas will be undefined.

Edit: Nevermind, I see cam1A-C and cam1CA are shared.

Anyway here are some updates:
1. Fixed a typo in libcampaign.js that would otherwise render CAM_ORDER_PATROL broken.
2. Completed cam1A-C. I will upload it to my git branch later.

So I claim sub1-7 and sub1-7s next.

Re: The official --=jscam=-- thread

Posted: 28 Nov 2016, 22:39
by Berserk Cyborg
Is there a way to add another label position or modify the pos coordinates of an existing one? Right now the artifact is placed back on its starting position when the artifact group takes it and are destroyed. edit: remove old link.

Re: The official --=jscam=-- thread

Posted: 29 Nov 2016, 01:32
by Per
You mean like addLabel(object, label)? It currently takes area, radius, droid, structure, and feature labels, but explicitly refuses to take position labels (I don't remember why, probably did not see a use for it).

If you tell me what you want to do, I'll look at the code and tell if you it can be done.

Re: The official --=jscam=-- thread

Posted: 29 Nov 2016, 03:25
by Berserk Cyborg
I was passing a position label... Anyway I have the artifact drop working now. Just need to complete a few more things for cam1-7.