The official --=jscam=-- thread

For AI and campaign script related discussions and questions

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

Postby Goth Zagog-Thou » 23 Oct 2014, 04:57

Will do. Looking forward to the QT5/JSON bits.
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

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

Postby NoQ » 23 Oct 2014, 06:04

vexed wrote:Please upload the patches to trac when done here #4234 , don't use the forums.

Mentioned on the wiki as well.

Just curious - why? Just for more verbose monitoring on the mailing list?
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby Goth Zagog-Thou » 24 Oct 2014, 01:52

My thinking, and this is just my opinion .. for peer reviewing before commit. Code quality and testing. Etc. Totally understandable if that's the case. :3
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

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

Postby stiv » 24 Oct 2014, 04:03

What he said. Plus it makes it easier to find and follow patches if you don't have to search the forums for them. I realize that having an actual process is chafing, but it does make life easier in the long run.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

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

Postby vexed » 24 Oct 2014, 05:18

Basically, yes, what they said, and the fact that you can click on the file, and view the results, instead of downloading... and also easier to look up who did what (if we get more people).. and..and..and..
and we can use ref ticket# to keep track as well, when we commit the stuff.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
vexed
Inactive
Inactive
 
Posts: 2451
Joined: 27 Jul 2010, 02:07

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

Postby NoQ » 24 Oct 2014, 20:55

Now since FlaME cannot parse JSON ... do we really need labels? I guess hardcoding labels into code would be cleaner and shorter :hmm:

The work of understanding the original scripts and obtaining areas and logic behind them still needs to be done, of course.
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby ClockWork » 25 Oct 2014, 03:42

I downloaded something...an exe. from some sort of master?...thingy? It crashes when I open it.
User avatar
ClockWork
Trained
Trained
 
Posts: 216
Joined: 07 Sep 2008, 03:22
Location: USA

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

Postby Goth Zagog-Thou » 25 Oct 2014, 04:36

You downloaded the 3.2 Master from the Buildbot? It's currently broken, sadly. :( It'll be fixed soon. QT5 and JSON bits aren't playing nice with the automated build system, if I understand correctly.
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

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

Postby vexed » 25 Oct 2014, 04:41

NoQ wrote:Now since FlaME cannot parse JSON ... do we really need labels? I guess hardcoding labels into code would be cleaner and shorter :hmm:

The work of understanding the original scripts and obtaining areas and logic behind them still needs to be done, of course.

Cowboy's newer version should be able to fix this issue.

Hardcoding anything is normally frowned upon.

If Flame does it now in ini format, then we should just have a converter or something.


(And yeah.. buildbot is down as I wrote, still fixing things.) :stressed:
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
vexed
Inactive
Inactive
 
Posts: 2451
Joined: 27 Jul 2010, 02:07

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

Postby Goth Zagog-Thou » 25 Oct 2014, 06:11

Moving right along. :)

I finally have some more dedicated time to work on Mission 3a and 3b tonight. Perhaps enough to be able to give it a test run? We'll see. ;)

The Pumpkins sure did a lot of un-necessary things for an almost-optional mission and another that the player would spend perhaps ten minutes on. I think I can make the code way more efficient, the file size smaller, and all while providing the same experience we're all used to.

And for the record, libcampaign is the bees knees. :3
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

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

Postby NoQ » 25 Oct 2014, 08:35

All right, morning all, now i'm going to fix levels 1 and 2 after the conversion and break libcampaign in the process. Goth: if you're reading this soon enough and made many changes, you'd have to keep up. Or push your stuff and i'd work over this. Or whatever, i'm in the chats btw.

Hardcoding anything is normally frowned upon.

1) The coding isn't really hard, we're still in the realm of moddable data; 2) Most of this stuff was designed to be useful in only one place in the script. Why make the reader and/or the author look for it in a separate file? Kinda sorta annoying and ineffective. 3) We can still have named constants for such stuff. 4) But with under 150 lines of code in each script, it's even more easily readable to have the numbers inlined in a self-descriptive piece of code, it's so simple it looks like data anyway.

we should just have a converter or something

We do have one btw (/tools/conversion/ini2json/).
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby NoQ » 25 Oct 2014, 09:20

Done. The campaign should be working again in master. Not much changes actually.

Goth: if/when you manage to figure out how do get the transporters working, let us know ;)

ClockWork wrote:I downloaded something...an exe. from some sort of master?...thingy? It crashes when I open it.

From a52d783, the game's back in "works for me" state (not the exe though, i compile myself and cannot test the exe since i'm not on windows). Also, the original campaign wzscripts are available in your 3.1 release and are exactly the same.
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby NoQ » 25 Oct 2014, 12:05

b56fbcae: With the new camAreaEvent decorator, you most likely won't be needing camMarkTiles anymore. Also checks if the event is triggered by human or by enemy, and behaves accordingly.

Before:
Code: Select all
function eventAreaAttackArea2(droid)
{
   if (droid.player !== me)
   {
      resetArea("AttackArea2");
      return;
   }
   camMarkTiles();
   camTrace("Player 0 enters AttackArea2");
   camEnableFactory("base4factory");
}

After:
Code: Select all
camAreaEvent("AttackArea2", me, function(droid)
{
   camEnableFactory("base4factory");
});
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby Goth Zagog-Thou » 25 Oct 2014, 14:33

Morning NoQ. Sadly, I have some running around to do, but I have all day after I get back. Couple of hours worth. I'll join you afterward.

We'll see what we can do about Transporters today.
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

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

Postby NoQ » 25 Oct 2014, 14:40

b615352: a funny lifehack to define factory templates easier.
0498184: we don't care if the group for enemy base isn't a valid label, auto-create one. wzcam didn't have any of them anyway.

P.S. in fact we don't need to go through levels in chronological order.
User avatar
NoQ
Special
Special
 
Posts: 6136
Joined: 24 Dec 2009, 11:35
Location: /var/zone

PreviousNext

Return to Scripting