Page MenuHomeWildfire Games

Danubius: Spawn gaia waves at civic centers
ClosedPublic

Authored by elexis on Apr 24 2017, 3:12 PM.

Details

Summary

The gaia civic centers at the Danubius map from D204 are currently more a decoration and besides some treasure and territory,
there is no incentive to destroy the fortification.
It would be much more entertaining if units would spawn there too and patrol at the map border.

The proposed patch implements that by reusing the existing attacker composition function for ships, not adding rams.
To not make it unfair to the closest player to the CC, the units don't attack the closest enemies but only patrol.
Since all players have about equal territory, they should be attacked with equal probability.

If the CC is destroyed, there are no more waves spawning from there.

Gates were aded to the other sides of that wall.

Test Plan

Start an MP game with 6 AIs (so that one of them is in the center close to the CC = worst case), medium resources and
after starting the game, press F9 and type Engine.SetSimRate(20); to fast forward.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1298
Build 2042: Vulcan BuildJenkins
Build 2041: arc lint + arc unit

Event Timeline

elexis created this revision.Apr 24 2017, 3:12 PM
Vulcan added a subscriber: Vulcan.Apr 24 2017, 3:56 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/886/ for more details.

elexis edited the summary of this revision. (Show Details)Apr 24 2017, 3:59 PM

(17:48:13) hannibal_baraq: 47 attacks in 10 mins
(17:48:22) hannibal_baraq: 10 to top
(17:48:28) hannibal_baraq: 20 to upper mid
(17:48:31) hannibal_baraq: 15 to lower mid
(17:48:37) hannibal_baraq: 12 to bottom
(17:48:44) hannibal_baraq: ---> imba
(17:49:06) hannibal_baraq: also shows imba that bot economy only available if not in mid
(17:49:19) elexis: yep, bot somehow stupid with gaia fort
(17:49:35) hannibal_baraq: sometimes bots go through a base in direction of another
(17:49:45) hannibal_baraq: but decide to attack instead
(17:50:58) hannibal_baraq: i'll do another
(17:51:05) elexis: sure this is inacceptable? after all spawned only every 8min?
(17:51:28) elexis: and if so, how should those units behave ideally
(17:51:36) hannibal_baraq: noone saidinacceptable
(17:51:49) hannibal_baraq: just imba
(17:52:07) elexis: (iirc ship ungarrison is somewhat imba too)
(17:52:31) elexis: if you open atlas editor and generate danubius, you can see the ungarrison points at the shoreline, the ships pick one of them randomly
(17:52:38) elexis: some players have more ungarrison points than others

(18:01:05) hannibal_baraq: of a total 34
(18:01:14) hannibal_baraq: 5-11-12-6
(18:01:25) hannibal_baraq: making mid ~ double attacks
(18:01:34) hannibal_baraq: verd hard bots deathmatch res
(18:01:39) hannibal_baraq: eco shows
(18:01:55) hannibal_baraq: while one of the mid bots got 250, outer one managed 700
(18:02:02) hannibal_baraq: or 500 and 900

elexis updated this revision to Diff 1499.Apr 27 2017, 12:26 AM

Instead of using land trigger points, place new trigger points on the very map border and pick those at random.
This way the players in the middle are still visited if a point near the shoreline was chosen.

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/896/ for more details.

elexis updated this revision to Diff 1512.Apr 28 2017, 6:20 PM

Merge D371 so that the balancing can be tested without merge conflicts.
Change D371:

Reduce max number of ships per player from 2.5 to 2.
Reduce attackersPerShip from 10 + t * 2/3 to 8 + t/2.
elexis retitled this revision from Danubius should spawn attackers at gaia civic centers to Stronger Danubius gaia waves and spawn attackers at gaia civic centers.Apr 28 2017, 6:24 PM

Here 27min replay showing that very hard 4v4 Petra bots on a normal mapsize still holds out, even with few men.
Survival of the fittest shows that its ok to have a match where the player has to struggle for survival and that we can consider the last man standing to be the winner.
So it should be considered okay for bots.

Replay

Debug log

It is challenging to beat gaia but not that hard at all if you know the basic gameplay and don't forget to do economy while fighting.
So it should be considered okay for all players.

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/907/ for more details.

elexis planned changes to this revision.Apr 29 2017, 11:07 PM

We played a 60min wonder 3v3 yesterday, was a really interesting game. The wonder victory counter actually ran out because both sides played well.

(likely rev 19470, likely works with most 19476 too as iberian fireships were banned)

The late game was really as it was expected. Gaia ships were annoying and sometimes, rarely, a ship even lands when having lost all the units on the other side. The way naval gaia combat might be expected.
But I imagine the game more to be in 2 phases. The first 40min, players should struggle with gaia, like it was before. Then they should fight each other.

Therefore the values should decrease with time. Take the old danube balancing for the first 40min then the new balancing for the rest afterwards, or interpolate something.

FeXoR added a reviewer: FeXoR.May 27 2017, 1:05 PM
FeXoR edited edge metadata.May 30 2017, 5:36 PM

I reviewed the random map part and it gets my OK.

The debug logging might better be turned off before committing.

Sandarac requested changes to this revision.May 30 2017, 6:06 PM
Sandarac added a subscriber: Sandarac.

I think this trigger script is getting to the point that some of the logic/functions should be moved to a common place (TriggerHelper) so that other scripts can easily use them to handle spawning gaia units/make them patrol/attack, etc. (likely won't happen in this diff), as the lot of the functions are generic enough that they should be elsewhere.

I'm not too sure when it comes to balancing for this map, but I noticed AI players could sometimes become overwhelmed by these new units that spawn at CCs.

binaries/data/mods/public/maps/random/danubius.js
164–165

gallicCC -> gaiaCC.

binaries/data/mods/public/maps/random/danubius_triggers.js
5

The number ships -> The number of ships.

13

false, as FeXoR mentioned.

89

Extra space.

302

We now do this exact line twice in this file (refs D577).

434

This block and the next are very similar, but they are in the current version, fine I guess.

451

Not sure if this and the other warn in this file should actually be warns, may be better to use debugLog.

456

Why was this removed?

458

New function?

680

Vars like this make me wonder if a Set should be used.

elexis retitled this revision from Stronger Danubius gaia waves and spawn attackers at gaia civic centers to Danubius: Spawn gaia waves at civic centers.May 31 2017, 6:45 PM
elexis marked 8 inline comments as done.Jun 1 2017, 4:08 PM

Thanks for the review

binaries/data/mods/public/maps/random/danubius.js
164–165

But then we should rename gallicCCTreasureCount to gaiaCCTreasureCount too (and not have it treasureCount as other treasure exists too potentially).

I can rename it (trivial), but if we search for "gallic" we can find many other occurances while we find only 2 gaia occurances

519

Committed in rP19705

binaries/data/mods/public/maps/random/danubius_triggers.js
5

Fixed in rP19705

94

Removing the balancing changes again. Had hoped to get it in quicker (testing only one patch affecting teh balancing), but that's not the case. Going for cleaner diffs.

302

Thanks for the patch

451

They should, because it would be an actual error in the code if the code logic doesn't do what it intends. Hence could even make this an error().

456

Committed in rP19705

That was mentioned somewhere above in the description. It was a terrible decision in fact.

The violent stance makes rams that just attacked the CC and got attacked by a spearman attack that spearman and all other units attacking it instead of finishing the job.

The stance also makes ships stick to the shoreline more often (when being hit by a tower) instead of moving on with shiplife.

458

GetAttackerComposition has been split from FillShips so that it can be reused for the civic center attackers.

680

Never used a Map nor Set and don't really want to. Once we have sm45, we can use array.includes(value).

elexis updated this revision to Diff 2352.Jun 1 2017, 4:17 PM
elexis edited edge metadata.
elexis marked 6 inline comments as done.

Committed the bugfixes separately, removed balancing changes, uses the new GetMapSize

Vulcan added a comment.Jun 1 2017, 5:06 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1433/ for more details.

Vulcan added a comment.Jun 1 2017, 5:07 PM
Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/maps/random/danubius_triggers.js
| 239| »   if·(remainder·!=·0)
|    | [NORMAL] JSHintBear:
|    | Use '!==' to compare with '0'.

binaries/data/mods/public/maps/random/danubius_triggers.js
| 450| »   if·(remainder·!=·0)
|    | [NORMAL] JSHintBear:
|    | Use '!==' to compare with '0'.

binaries/data/mods/public/maps/random/danubius_triggers.js
| 632| »   »   let·siegeEngines·=·attackers.filter(ent·=>·Engine.QueryInterface(ent,·IID_Identity).HasClass("Siege"));
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.

binaries/data/mods/public/maps/random/danubius_triggers.js
| 633| »   »   let·others·=·attackers.filter(ent·=>·siegeEngines.indexOf(ent)·==·-1);
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.

binaries/data/mods/public/maps/random/danubius.js
| 247| »   »   »   placeCustomFortress(mX,·mZ,·new·Fortress("celt·ritual·males",·new·Array(maleCount).fill(0).map(i·=>
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/maps/random/danubius.js
| 306| »   »   for·(let·i·=·0;·i·<·gallicCCTreasureCount;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/maps/random/danubius.js
| 177| »   »   let·gX·=·i·==·0·?·gaulCityBorderDistance·:·mapSize·-·gaulCityBorderDistance;
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 186| »   »   »   let·mX·=·i·==·0·?
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 197| »   »   »   »   gX·+·gaulCityRadius·*·(i·==·0·?·1·:·-1),
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 247| »   »   »   placeCustomFortress(mX,·mZ,·new·Fortress("celt·ritual·males",·new·Array(maleCount).fill(0).map(i·=>
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.

binaries/data/mods/public/maps/random/danubius.js
| 330| »   if·(numPlayers·%·2·==·0)
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 617| »   »   i·==·0·?
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 772| »   »   »   »   i·==·0·?·triggerPointShipUnloadLeft·:·triggerPointShipUnloadRight,
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 790| »   »   »   »   i·==·0·?·triggerPointLandPatrolLeft·:·triggerPointLandPatrolRight,
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/maps/random/danubius.js
| 808| »   »   »   »   »   i·==·0·?·triggerPointCCAttackerPatrolLeft·:·triggerPointCCAttackerPatrolRight,
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/95/ for more details.

elexis updated this revision to Diff 2361.Jun 1 2017, 6:00 PM

Rename one gaia occurance to gallic

Sandarac accepted this revision.Jun 1 2017, 7:30 PM

The comments were addressed in the new diff, looks good.

binaries/data/mods/public/maps/random/danubius_triggers.js
94

Okay.

451

Alright.

This revision is now accepted and ready to land.Jun 1 2017, 7:30 PM
This revision was automatically updated to reflect the committed changes.

Build has FAILED

Link to build: http://jw:8080/job/phabricator/1437/
See console output for more information: http://jw:8080/job/phabricator/1437/console

Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/99/ for more details.