Need help developing 3.3.0 campaign

Discuss the future of Warzone 2100 with us.
User avatar
alfred007
Regular
Regular
Posts: 563
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Need help developing 3.3.0 campaign

Post by alfred007 » 08 Jul 2019, 23:49

Forgon wrote:My current solution is to reduce the number of transporters available
with Insane for the end of both Alpha and Beta to 3, so that units can
still be built in the following missions without breaking unit limits.
With a few extra checks, transporters could not be empty or loaded with
units that would exceed unit limit allowances.
Interesting idea. But at the end of Alpha mission, you have to reduce the transporter starts from 5 to 4. With the current master version, you can start 5 transporters. 4 are arriving in Beta 01, the fifth get shot down and you have to rescue your downed units in Beta 02. With your solution, it also makes sense to think about to make it possible that you rescue units that you put into the transporter. At the moment you get scripted units in Beta 02 no matter what units you put into the fifth transporter.

Forgon wrote:With this approach, only one issue remains: Overruling of unit limits
when rescuing units. I'm sure we all agree that this can be tolerated.
From my side, I agree that this can be tolerated. But we have still one more issue. In every away mission the transporter is count as a combat unit and you can use only 39 units. Only if you have 40 units already produced in the last non-away level before you can use 40. And in Beta mission from Beta 06 on you have 5 away missions in a row. So when you want to upgrade your units you have to fight with only 39 units. That should be fixed in my eyes.

Forgon wrote:Could you remind me what I have to watch out for in Alpha 10?
Alpha map.png
Alpha map.png (72.98 KiB) Viewed 50 times

At each of the points 1-5 will land 3 transporters each with NP cyborgs. First 3 at point one, then three at point two and so on. At the two green "X" you have to await ground reinforcements. Tracked Mantis Heavy Cannon tanks and Mortar units with a sensor unit. In the southeast corner, they will arrive after the second transporter has landed at point 1, in the north, they will arrive after the fifth transporter has landed at point 2. You have to destroy them all. Let one of the two sensor units alive so you will have enough time to prepare your units for Alpha 11.

Forgon
Code contributor
Code contributor
Posts: 276
Joined: 07 Dec 2016, 22:23

Re: Need help developing 3.3.0 campaign

Post by Forgon » 09 Jul 2019, 08:17

alfred007 wrote:
08 Jul 2019, 23:49
[...]
From my side, I agree that this can be tolerated. But we have still one more issue. In every away mission the transporter is count as a combat unit and you can use only 39 units. Only if you have 40 units already produced in the last non-away level before you can use 40. [...]
Berserk Cyborg has already suggested a working patch to fix this, which
excludes transporters from unit counts:

Code: Select all

diff --git a/src/structure.cpp b/src/structure.cpp
index a05451d30..1c2c5804f 100644
--- a/src/structure.cpp
+++ b/src/structure.cpp
@@ -2482,7 +2482,12 @@ int getMaxConstructors(int player)
 
 bool IsPlayerDroidLimitReached(int player)
 {
-	int numDroids = getNumDroids(player) + getNumMissionDroids(player) + getNumTransporterDroids(player);
+	int numDroids = getNumDroids(player) + getNumMissionDroids(player);
+	// transporters do not count as units in single-player games
+	if (bMultiPlayer)
+	{
+		numDroids += getNumTransporterDroids(player);
+	}
 	return numDroids >= getMaxDroids(player);
 }

Post Reply