Help needed testing 3.2.x Campaign games!

The projects speaking tube.
Add your two cents if you want to.

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 01 Nov 2017, 00:50

I have pushed all updates I have, so the mod is no longer needed. Latest master as of now is 1cdd7bd which converts cam3-ad1 into javascript.
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Postby Bethrezen » 01 Nov 2017, 02:04

Ok so i tried out the mod with the Power Production Rate set at 70% on insane and so far that seems ok, I'll need to play on a bit more and see if i run in to power problems later as things get increasingly expensive as you tech up but at least at the alpha 05 end / alpha 06 start point everything seems Ok power wise, but since you have just pushed all the changes you have currently I'll update and start again tomorrow.
Bethrezen
Trained
Trained
 
Posts: 322
Joined: 25 Sep 2009, 02:05

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 03 Nov 2017, 18:40

Pushed a small update in 10b39fc53cf020e5f65f12d0ab6841afc1e77e1d.

Almost finished with the cam3-ad2 script. It was a very small script and I already had the functionality of the LasSat from the previous mission. Only difference is it has a 50% chance to hit. Now only cam3-4(s) remains.

I'm going to work on NoQ's camEnqueueVideos() idea now. Playing the videos is easily the most repeated (and sometimes ugly) portion of code I can remove from most of the scripts.
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Postby alfred007 » 03 Nov 2017, 20:02

Interesting code for alpha 11 at getArtifact that I don't understand. What does this mean? I would have prefer a queue of 90 seconds with camChangeOnDiff. This would give us a queue of a bit less than 2 minutes in easy, 72 seconds in hard and one minute in insane. Seem to me fair conditions.
alfred007
Trained
Trained
 
Posts: 153
Joined: 31 Jul 2016, 06:25
Location: Germany

Re: Help needed testing 3.2.x Campaign games!

Postby Bethrezen » 04 Nov 2017, 00:17

@Berserk Cyborg

Quick question is there some reason that the bonus oil, the power cap and the production rate for oil derricks is handled in 2 different functions ? I'm just wondering wouldn't it make sense to just handle all 3 with a single function since all 3 are related and then simple add another condition to make sure the right code is run at the right time when the power function is called for example

Code: Select all
function power()
{
    var time = getMissionTime();

    if(difficulty === EASY && time > 0)
    {
        //run production rate and power cap code
    }

    if(difficulty === EASY || difficulty === MEDIUM && time === 0)
    {
        //run oil bonus code
    }
}
Bethrezen
Trained
Trained
 
Posts: 322
Joined: 25 Sep 2009, 02:05

Re: Help needed testing 3.2.x Campaign games!

Postby alfred007 » 04 Nov 2017, 03:16

Finished testing beta 8. No problems during gameplay.

In the log file are the known billions of mapTile infos and some triggerEventStructBuilt and triggerEventSeen infos.

And I think it would be more logical if we give the collective some rearming pads for their vtols even if there also none in 3.1.5. It makes no sense to use vtols that do not leave the map after an attack if you can't rearm them.

I saw in the file for beta 8 that in line 76 the function truckDefense is coded. But neither are any trucks on the map nor does any factory produce trucks. That makes this function superfluous. And afaik no trucks were ever produced in beta 8.
Attachments
logs beta 8.zip
(970.09 KiB) Downloaded 5 times
alfred007
Trained
Trained
 
Posts: 153
Joined: 31 Jul 2016, 06:25
Location: Germany

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 04 Nov 2017, 05:16

alfred007 wrote:Interesting code for alpha 11 at getArtifact that I don't understand. What does this mean? I would have prefer a queue of 90 seconds with camChangeOnDiff. This would give us a queue of a bit less than 2 minutes in easy, 72 seconds in hard and one minute in insane. Seem to me fair conditions.
It tells the artifact group to go into the valley to go to the artifact. I want to make it find the location of the artifact where ever it may be someday. I will use that 90 seconds with camChangeOnDiff.

Bethrezen wrote:Quick question is there some reason that the bonus oil, the power cap and the production rate for oil derricks is handled in 2 different functions ? I'm just wondering wouldn't it make sense to just handle all 3 with a single function since all 3 are related and then simple add another condition to make sure the right code is run at the right time when the power function is called for example
I think it may add some unnecessary complexity to compact them.

alfred007 wrote:And I think it would be more logical if we give the collective some rearming pads for their vtols even if there also none in 3.1.5. It makes no sense to use vtols that do not leave the map after an attack if you can't rearm them.

I saw in the file for beta 8 that in line 76 the function truckDefense is coded. But neither are any trucks on the map nor does any factory produce trucks. That makes this function superfluous. And afaik no trucks were ever produced in beta 8.
I gave them two rearming pads now and removed the truck building stuff. I had to fix a few map oddities (overlapping objects and use flame's water tile correction to compile the map). Doing this made me remember something... some islands have disappeared O_o .

Edit:
Here is the modified Beta 8 map if anyone wants to do a quick test.
Updated-Campaign.wz
Use with master
(15.27 KiB) Downloaded 7 times
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Postby alfred007 » 04 Nov 2017, 19:47

I made a fast test with the mod for beta 8. Good news: The vtols are using the rearming pads. Bad news: after they are rearmed they sit on the pads and don't attack me again.
I found also two other bugs with the mod.
First the power level again exceeds. But only when the transporter has landed in the away map. I reloaded an saved game from the end of beta 7, saved with latest master and without mod. I moved forward to beta 8 and in the home map the limit of 12.000 for insane worked. The transporter started and in the away map the power counter moves forward. This happens only, when I start the game with the latest mod. When I reload the same save without mod the limit works. And I think this is exactly what I was talking about before, when I noticed the power exceed a few posts before. At that time I adjusted my assemblies and I used them as a mod.
Second the queue for the factories coded with the function enableTimeBasedFactories didn't work correct. On insane the three so coded factories should start producing units 6:42 after landing, but they start at the time coded for normal after 10 minutes. But this also only with the latest mod. Latest master is ok.
In the attached save "beta 8" you can see the exceeded power limit and the not working factories. I have landed at 39:18, and the first produced unit should have leaved their factory at approximately 32 minutes left on the timer what didn't happened.
In the attached save "beta 8 a" I attacked the NE base and you can see the vtols sitting on their rearming pads doing nothing. They attacked me once, get rearmed and then wait. Makes no sense, they should attack me again and again until they get destroyed.
Attachments
beta 8 with mod.zip
(1.05 MiB) Downloaded 5 times
alfred007
Trained
Trained
 
Posts: 153
Joined: 31 Jul 2016, 06:25
Location: Germany

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 04 Nov 2017, 22:16

So loading mods causes weird bugs that normally would never happen? Guess I will go back to using master builds only. Might want to make ticket about that when you have the time.

I think a good solution for those VTOLs not attacking is to group together all the droids not part of a group (exclude the anti-air ones also) in that medium base upon detection. Then they can attack the player soon after.
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Postby Bethrezen » 04 Nov 2017, 23:17

Continuing testing Alpha again using master
warzone2100-master-20171103-172211-10b39fc.exe (03-Nov-2017)

Alpha 08

Minor glitch on this level with this builder

Image

For some reason he just sits there doing nothing.

Alpha 09

This level is giving me errors again here is the log

Code: Select all
 --- Starting log [C:\Documents and Settings\<user name>\Desktop\Warzone 2100_portable-master\Warzone 2100 master\logs\WZlog-1104_195240.txt]---
info    |08:27:54: [triggerEventSeen:1288] Scripts not initialized yet
info    |08:27:54: [triggerEventSeen:1288] Assert in Warzone: qtscript.cpp:1288 (scriptsReady), last script event: 'N/A'
info    |08:27:54: [triggerEventSeen:1288] Scripts not initialized yet
info    |08:27:54: [triggerEventSeen:1288] Assert in Warzone: qtscript.cpp:1288 (scriptsReady), last script event: 'N/A'
error   |08:49:05: [js_removeObject:2357] Object id 176237 not found belonging to player 12
error   |08:49:05: [callFunction:209] 0 : camSafeRemoveObject(obj = [object Object]) at script/campaign/libcampaign.js:139
error   |08:49:05: [callFunction:209] 1 : __camPickupArtifact(artifact = [object Object]) at script/campaign/libcampaign.js:727
error   |08:49:05: [callFunction:209] 2 : cam_eventPickup(feature = [object Object], droid = [object Object]) at script/campaign/libcampaign.js:3024
error   |08:49:05: [callFunction:209] 3 : <global>() at -1
info    |08:49:05: [callFunction:212] Uncaught exception calling function "cam_eventPickup" at line 139: ReferenceError: psObj failed in js_removeObject at line 2357
info    |08:49:05: [callFunction:212] Assert in Warzone: qtscript.cpp:212 (false), last script event: 'N/A'
error   |08:51:36: [js_removeObject:2357] Object id 176159 not found belonging to player 12
error   |08:51:36: [callFunction:209] 0 : camSafeRemoveObject(obj = [object Object]) at script/campaign/libcampaign.js:139
error   |08:51:36: [callFunction:209] 1 : __camPickupArtifact(artifact = [object Object]) at script/campaign/libcampaign.js:727
error   |08:51:36: [callFunction:209] 2 : cam_eventPickup(feature = [object Object], droid = [object Object]) at script/campaign/libcampaign.js:3024
error   |08:51:36: [callFunction:209] 3 : <global>() at -1
info    |08:51:36: [callFunction:212] Uncaught exception calling function "cam_eventPickup" at line 139: ReferenceError: psObj failed in js_removeObject at line 2357
info    |08:51:36: [callFunction:212] Assert in Warzone: qtscript.cpp:212 (false), last script event: 'N/A'
error   |08:51:44: [js_removeObject:2357] Object id 176207 not found belonging to player 12
error   |08:51:44: [callFunction:209] 0 : camSafeRemoveObject(obj = [object Object]) at script/campaign/libcampaign.js:139
error   |08:51:44: [callFunction:209] 1 : __camPickupArtifact(artifact = [object Object]) at script/campaign/libcampaign.js:727
error   |08:51:44: [callFunction:209] 2 : cam_eventPickup(feature = [object Object], droid = [object Object]) at script/campaign/libcampaign.js:3024
error   |08:51:44: [callFunction:209] 3 : <global>() at -1
info    |08:51:44: [callFunction:212] Uncaught exception calling function "cam_eventPickup" at line 139: ReferenceError: psObj failed in js_removeObject at line 2357
info    |08:51:44: [callFunction:212] Assert in Warzone: qtscript.cpp:212 (false), last script event: 'N/A'
error   |08:51:50: [js_removeObject:2357] Object id 176209 not found belonging to player 12
error   |08:51:50: [callFunction:209] 0 : camSafeRemoveObject(obj = [object Object]) at script/campaign/libcampaign.js:139
error   |08:51:50: [callFunction:209] 1 : __camPickupArtifact(artifact = [object Object]) at script/campaign/libcampaign.js:727
error   |08:51:50: [callFunction:209] 2 : cam_eventPickup(feature = [object Object], droid = [object Object]) at script/campaign/libcampaign.js:3024
error   |08:51:50: [callFunction:209] 3 : <global>() at -1
info    |08:51:50: [callFunction:212] Uncaught exception calling function "cam_eventPickup" at line 139: ReferenceError: psObj failed in js_removeObject at line 2357
info    |08:51:50: [callFunction:212] Assert in Warzone: qtscript.cpp:212 (false), last script event: 'N/A'


Ok so looking at the camSafeRemoveObject function mentioned in the log

Code: Select all
function camSafeRemoveObject(obj, flashy)
{
   if (__camLevelEnded)
      return;
   if (camIsString(obj))
      obj = getObject(obj);
   if (camDef(obj) && obj)
      removeObject(obj, flashy);
}


I notice that none of those if statements have curly brackets, could that be why they are throwing an intermittent error ?

shouldn't the camSafeRemoveObject function be written like this

Code: Select all
function camSafeRemoveObject(obj, flashy)
{
    if (__camLevelEnded) {
        return;
    }   
    if (camIsString(obj)) {
        obj = getObject(obj);
    }
    if (camDef(obj) && obj) {
        removeObject(obj, flashy);
    }
}


[edit]

ok just running the libcampaign.js through http://www.jslint.com/ / http://jshint.com/ and they seems to be detecting a number of errors like if statements that have no curly brackets, missing semi colons etc so it might be a good idea to run fix stuff like that as it would to eliminate issues caused by improperly written code.
Bethrezen
Trained
Trained
 
Posts: 322
Joined: 25 Sep 2009, 02:05

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 05 Nov 2017, 02:47

I now have video playback built into libcampaign. So no more having to use hackAddMessage in the mission scripts for the videos. In case anyone is interested: here it is.

Bethrezen wrote:Ok so looking at the camSafeRemoveObject function mentioned in the log

Code: Select all
function camSafeRemoveObject(obj, flashy)
{
   if (__camLevelEnded)
      return;
   if (camIsString(obj))
      obj = getObject(obj);
   if (camDef(obj) && obj)
      removeObject(obj, flashy);
}


I notice that none of those if statements have curly brackets, could that be why they are throwing an intermittent error ?

shouldn't the camSafeRemoveObject function be written like this...

The official style/guidelines we use.

Braces are not going to affect that as it is one of many styles (of which past authors of the JS scripts used). It suggests the artifact object could already be destroyed. Another thing I have noticed is the flash effect causes this to happen should object removal happen shortly after loading a save (no idea why).

Bethrezen wrote:ok just running the libcampaign.js through http://www.jslint.com/ / http://jshint.com/ and they seems to be detecting a number of errors like if statements that have no curly brackets, missing semi colons etc so it might be a good idea to run fix stuff like that as it would to eliminate issues caused by improperly written code.

Every once in a while I run everything through jshint to find stuff that may have been overlooked. Most of the warnings are about readability anyway and some others are just plain wrong.
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Postby Bethrezen » 05 Nov 2017, 04:17

Every once in a while I run everything through jshint to find stuff that may have been overlooked. Most of the warnings are about readability anyway and some others are just plain wrong.


one thing i do notice when you turn off warnings about code formatting is there seems to be a lot of errors pertaining to variables that have already been defined in fact they seem to make up most of the errors, what i am wondering is why you wouldn't just define those variables as global variables instead, and then simply used an assignment operator to set or reset there value because that to me seems like a cleaner way to do things, especially since they are used multiple times in different areas if the code.

Something else I'm curious about is why a lot of switch statements don't have the break keyword to stop evaluation after a match is found because a break can save a lot of execution time by stopping evaluation of the code once a match has been made.
Bethrezen
Trained
Trained
 
Posts: 322
Joined: 25 Sep 2009, 02:05

Re: Help needed testing 3.2.x Campaign games!

Postby alfred007 » 05 Nov 2017, 18:46

Finished testing beta 9 with no problems during gameplay, but the level needs some adjustments.

The queue for the first vtol attack ist too long and the second attack that should happen didn't happen. The vtols in base three are waiting there until I attacked that base. But they should do the second attack to the LZ.
The queue for enableFactories is also too long. If I would rush I could even on insane destroy the first two bases before the collective would produce their first unit.
The queue for enableReinforcements is too short, the message comes before the transporter has left the map. You should add 5 seconds.
As far as I remember the hover group at base four that attacks my LZ is split in two groups in 3.1.5. One attacks my LZ, the other one wait at base four and attacks my units when I attack base four. And I think the pepperpot pits in base two are firing sooner in 3.1.5 than they do in latest master.
As you can see at the picture below the exit of base four is blocked by a tank and the cyborg is stuck (the weird thing is, that the cyborgs that get produced later could switch through the gaps). You should move either the AA site or the howitzer emplacement one tile south, and the tank that blocks the exit one tile west and one tile north.
And at the minimap on the picture (it's a little bit small) you can see the red dot for base one is still there, though the base is destroyed.

wz2100-20171104_223310-SUB_2_7.jpg


I will play this level with 3.1.5 the next days to make clear suggestions how the level should be adjusted in my eyes.
Attachments
logs beta 9.zip
(1.1 MiB) Downloaded 4 times
alfred007
Trained
Trained
 
Posts: 153
Joined: 31 Jul 2016, 06:25
Location: Germany

Re: Help needed testing 3.2.x Campaign games!

Postby alfred007 » 05 Nov 2017, 22:14

Unlike in my last post announced I found today the time to look into beta 9 with version 3.1.5.

The first vtol attack comes from the vtols of base 3 after approximately 30 seconds. The second attack from the vtols of base four about 20-30 seconds later and short after that the hover group split and three of them attack the LZ. Unit production starts with no queue. The produced enemy units starts moving as soon as there are two together. But they don't attack but gather nearby west of base two. The pepperpot pits start firing as soon as my units are in fire reach as you can see at the picture below. In master they just start firing when my units are two or three tiles west of the heavy factory of base two. That's too late.

wz2100-20171105_192744-SUB_2_7.jpg


Here my suggestions for change:

Decrease enableFactory queue to 90 seconds, depending on difficulty (production is faster in master, so I think a short queue is necessary)
First vtol attack by base 3 vtols after 30 seconds, independent of difficulty
Second vtol attack by base 4 vtols after 60 seconds, independent of difficulty
Attack of the hover tank killers (all six, no split in two groups of three) after 90 seconds, independent of difficulty
Make the pepperpot pits start firing as soon as units are in fire reach
Because of the more aggressive behavior of the enemy units in master we should stay with a group size of 4 and 5 for an attack.

And with this testing I adjusted the assemblies for beta 9. Labels are attached.

@ Berserk Cyborg
I wonder why you removed camChangeOnDiff for setMissionTime in gamma 7. 1 hour 20 minutes at insane should be more than enough time for gamma 7.
Attachments
labels sub 2_7.json
(2.17 KiB) Downloaded 6 times
alfred007
Trained
Trained
 
Posts: 153
Joined: 31 Jul 2016, 06:25
Location: Germany

Re: Help needed testing 3.2.x Campaign games!

Postby Berserk Cyborg » 05 Nov 2017, 23:20

Pushed 1dda9356f309ea04ccdda8b80e82638a657c271d and f0e096823e43d2fb5cbf204637c5008e9f4a8564.

I added all the changes you suggested that I could. I think for whatever reason some of the campaign enemy structures have lost their impressive range, namely mortar like weapons. Might be a stat change between 3.1.5 and now?

alfred007 wrote:I wonder why you removed camChangeOnDiff for setMissionTime in gamma 7. 1 hour 20 minutes at insane should be more than enough time for gamma 7.
I just want to make sure its not too difficult. Those lasers and gauss weapons look a bit powerful for insane. Once one of you get this far then I will change it back.
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 306
Joined: 26 Sep 2016, 19:56

PreviousNext

Return to News and announcements