The official --=jscam=-- thread

For AI and campaign script related discussions and questions
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

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

Post by Goth Zagog-Thou »

Will do. Looking forward to the QT5/JSON bits.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

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

Post by Goth Zagog-Thou »

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
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

Post by stiv »

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.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

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

Post by vexed »

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
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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
ClockWork
Trained
Trained
Posts: 219
Joined: 07 Sep 2008, 03:22
Location: USA

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

Post by ClockWork »

I downloaded something...an exe. from some sort of master?...thingy? It crashes when I open it.
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

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

Post by Goth Zagog-Thou »

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
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

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

Post by vexed »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

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

Post by Goth Zagog-Thou »

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
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

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

Post by Goth Zagog-Thou »

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
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Post by NoQ »

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