The official --=jscam=-- thread

For AI and campaign script related discussions and questions
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

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

Post by Per »

Berserk Cyborg wrote:Missions 2-7/2-8/2-B have been completed. Additionally, I fixed 1-1s "let me win" not letting a player to skip through the power module part by cheating. And made minor fixes for the campaign library.

I am at the last Beta mission. Are droids saved in some list somewhere when the transporter exits the map (would multiple transport loads in the same mission just remove previous ones)?
The transporter is copied into the offworld list. Not sure what happens with that list on campaign change. You can read out the droids in the eventTransporterExit() event for safekeeping.

Can you make a merge request for the 1-1s "let me win" fix? It would make it easier to test things. Thanks.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

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

Post by Berserk Cyborg »

Fixed a bug with cam1-b that could cause it to not allow progress. A label was causing problems after loading from that mission.

Almost done with the last Beta script though I am having problems getting to launch another transport. I can create a new transport and fly it back into base, however I can not get the launch button to make it take off... Any ideas?

Edit: can anyone confirm if tickets #4427 and #3946 are supposed to happen?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

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

Post by Per »

I don't have many ideas, but you could try to run with --debug=save (not sure why mission code uses this particular log category) to see what's going on behind the scenes. If that fails, I could add some more of them.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

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

Post by Berserk Cyborg »

Looking at the .slo file for cam2-end I see that it calls this which is located in mission.cpp:

Code: Select all

setDroidsToSafetyFlag(true);
and then that allows code in transporter.cpp to reset the state of the launch button. Still, I need to look into this further.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

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

Post by Berserk Cyborg »

Finally finished 2-end. It needs setDroidsToSafetyFlag(true) and also a reinforcement time to function properly.

So I will start working on mission 3-A.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

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

Post by Berserk Cyborg »

Finished the first Gamma mission. Will move onto 3-1 scripts.

I just found that research is not being granted to enemy players at all (findResearch() does recognize the tech has been researched for them). Any idea why?
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

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

Post by Berserk Cyborg »

@Per need one more function for the campaign. A way to fire a laser satellite blast at either an object or a location.

I had an idea about group movement. If possible, we could modify the weight (or whatever factors into unit speed) of a group of droids and make formation movement smoother. Tracked units don't play very nice with the regrouping code and can stall a group forever.

Only three missions left to convert (cam3-ad1/cam3-ad2/cam3-4(s)). Campaign library was a bit broken with save-load but the big four problems (base detection, not receiving all events, active factory production, destroying more bases than there actually are) all seem to be fixed.
Post Reply