Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3526 closed defect (fixed)

[PATCH] Build a tower in enemy territory

Reported by: elexis Owned by: sanderd17
Priority: Must Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: scythetwirler Patch:

Description

Reproduce:

  1. Capture any kind of enemy building
  2. Quickly place a tower in that territory
  3. Garrison the finished tower.

If you lose the captured building, you can still finish the construction. Once you garrison the tower, it will not decay, so you can keep it.

This is very problematic if your primary metal / stone sources are hit.


Prohibiting the building of (defensive?) structures in disconnected territories seems the ideal solution to me (especially better than messing with the capture-rates).

Notice when playing the iberian civ, you can currently build the monument in order to replace a vanished CC. This effect will disappear if you are required to build a CC before constructing other structures.

Attachments (3)

connectedTerritory.diff (4.5 KB ) - added by sanderd17 8 years ago.
connectedTerritory.2.diff (6.0 KB ) - added by sanderd17 8 years ago.
connectedTerritory.3.diff (6.0 KB ) - added by sanderd17 8 years ago.
New version with complete AI support (made possible since r18023)

Download all attachments as: .zip

Change History (27)

comment:1 by elexis, 8 years ago

Milestone: BacklogAlpha 19

I'll have a look. Can be pushed to a20 if we don't find a suitable solution.

comment:2 by mimo, 8 years ago

Milestone: Alpha 19Alpha 20

yep, won't be in A19 as it will also require some changes in the way the AI chooses its best position for building placement.

comment:3 by ffm, 8 years ago

This attack is too effective and too easy to make. To avoid it, the defensive player needs to have constantly men everywhere a building is. In maps with low tree density it is hard to watch every storehouse at the side of the terretory.

Lets assume you build 2 storehouses at opposite sides of your territory. Now you have your 20 men split up to 10 on each side. Attacker comes with all his 20 men to one side and brings 15 women more.

Defender got 2 main options

  1. Defender retreats, get troupes together and then fights with all men.

as attacker you have now time with 20 men to capture the storehouse and set a tower. The defender will soon come to fight. So attacker now fights with his men and the 10 women complete the construction and 5 men get in the tower. Now attacker can build a barrack and garrison 4 women in it and it wouldn't decay.

  1. Defender fights instantly with 10 men and the other 10 joins the fight as soon as they can.

The attacker fights now 20 vs 10 and can decimate the number of men. When the other 10 men are arriving the attacker has a higher number of men. After the attacker won the fight he can still make his tower and barrack.

In both scenarios the attacker holds the advantage. I'd choose option 2 and hope for an ally to help me.

To abandon the territory affected by the tower is another option, but has high disadvantage. If you gather near the tower all men on aggressive stance (standard) will run in to the tower.

So the only real options are being the attacker first, having only one storehouse at the time and delete it after usage or what i see upcoming is to have another "gentlemen agreement" not to use such attacks. Like the way it used to be in a17 with mellee cavalry vs buildings or Persian chariots, or in a18 with Maurian Warriors.

in reply to:  2 comment:4 by elexis, 8 years ago

Milestone: Alpha 20Alpha 19

Replying to ffm: Only options remaining:

  • being the attacker first
  • having only one storehouse at a time
  • delete storehouse after usage
  • another "gentlemen agreement" not to use such attacks

Thanks for adding the comment. You are right, those will be exactly the consequences for the first 20 minuts gametime, which usually decide games.

I would also add the following:

  • houses may not be placed near metal/stone, otherwise exploit can be used if you don't gather wood with men there

Replying to mimo:

will require some changes in the way the AI chooses its best position for building placement

  • If we are able to fix the placement of buildings, adopting the AI changes to it might not be too hard.
  • Maybe we could instead solve the issue by adjusting the capture-rate / regen-rates?

comment:5 by mimo, 8 years ago

We know the fix, which is preventing building in a non connected zone. Imo changing the rates is just a wrong hack: there was already an attempt in r17060 in that direction some time ago which changed quite a lot the gameplay without solving the issue.

Adding some requirement in the buildRestrictions to require a connected tile should be quite easy, but we do not have any working way to pass that info to the AI. There would be an easy way which is to expose a function IsConnected(x,z) to the Ai, but this can be really time expensive if called for each tile when trying to find a good building position. The other possibility would be to add this info in a bit (dunno if there is any one not yet used) of the territoryMap which is transfered to the AI.

But still, we are only releasing alphas and i do not see this problem as a release blocker. Of course, if somebody comes with a working and well tested patch before all the A19 release blockers are solved, i could change my mind :D

comment:6 by leper, 8 years ago

It should be noted that preventing all building in disconnected territories would make rebuilding or keeping a base in case the CC is destroyed nigh impossible.

Apart from that I do fully agree with mimo.

comment:7 by mimo, 8 years ago

The idea was to require a connected tile for buildings with only territory=own, but we could even add more flexibility by adding a territory=connected case for example for military structures.

comment:8 by Josh, 8 years ago

TL;DR: Disable all building in disconnected territory. It's simple and intuitive. See below for logical progression.


What strikes me as the most realistic way to do this would be by severely lowering the build rate in disconnected territory (e.g. 1/10th of normal). From the realism side, you could say that it's much more difficult to get the required building materials to a disconnected piece of territory.

Unfortunately, the slow build time may not be entirely intuitive and could confuse the player. The second most realistic argument may be that the lack of a proper supply chain makes all building at all in disconnected territory impossible.

I think a hybrid solution (no defense, and only economic buildings in disconnected territory) would add unnecessary complexity in the name of compromise. I can't think of a case when you'd want to build a non-defensive building in disconnected territory, so the argument progresses that you may as well disable all building in disconnected territory to keep the game simple and intuitive.

comment:9 by Stan, 8 years ago

That means if you lose your CC you lose the game. I think cc should be buildable, and then use your TLDR

in reply to:  9 comment:10 by Josh, 8 years ago

Replying to stanislas69:

That means if you lose your CC you lose the game. I think cc should be buildable, and then use your TLDR

This is with the exception that CCs can still be built anywhere. I wouldn't want to change that.

comment:11 by Lionkanzen, 8 years ago

I like disable option. The only way to protect your buildings is using walls, because the towers can't be good in a rush for capture or C-rush. If enemy capture temple, have a great advantage agaist defenses, because can heal the units in your own territory, this way may be for balance is the walls must be easy to build again.

in reply to:  8 comment:12 by elexis, 8 years ago

TLDR -> Yes.


Replying to Josh:

Disable all building in disconnected territory

Agree

Replying to stanislas69:

That means if you lose your CC you lose the game.

Mostly true already. It's more penalized than on a18 if the attacker captures it and it's quickly game over (rightfully so probably).

Replying to Josh:

can't think of a case when you'd want to build a non-defensive building in disconnected territory

Maybe build a barracks / temple and garrison it for defending without buildings or something

Replying to Lionkanzen:

If enemy capture temple, ... can heal the units in your own territory,

Same goes for barracks a barracks in enemy territory. It would trump the defenders advantage (shorter supply lines). Once a tower is placed, one could snowball / escalate this advantage (capture/build and garrison houses/barracks/temple to build a fort and then capture the CC by territory. Doing this in age 3 would be cool, but this tower rush is no good).

comment:13 by Stan, 8 years ago

I actually lost to a tower rush yesterday, he captured my storehouse, built a tower next to it, and that killed all my units. So, out of resources, and out of units...

comment:14 by mimo, 8 years ago

A completely different possibility would be to implement a progressive territory influence instead of the immediate one we have now: the idea would be to change progressively the influence radius, quite fast for structures in a connected tiles and really slow for structures in disconnected tiles. Thus for example when phasing, the cc radius goes typically from 140 to 180, and with a 5 m/s speed, we would fully expand in 8 s. But when capturing a house in enemy territory, the radius would go from 0 to 20, and if we set a 0.5 m/s speed for unconnected structures, that would require quite some time before having enough room to be able to build a tower (with the fast decayRate that we have currently, it may even happen to be impossible).

There would be two main advantages:

  • visually, it would be really nicer to have such a progressive expansion of our territories.
  • no specific changes needed for the AI.

If the territory computation is too heavy, we can in a first step only have this progressive influence for unconnected structures (which are not so frequent in a game). Or we could try to implement only local updates of the territory map.

In addition, having the same (but inverted) logic when losing a structure would be nice (slow decrease of influence when connected and fast one when disconnected), but that's certainly more complicated to achieve as it would require to keep track of lost structures.

comment:15 by Lionkanzen, 8 years ago

If the tower is disconnected , the units inside can experiment starving after long time. This good feature vs defenders or attackers if they haven't a territory influence.

comment:16 by elexis, 8 years ago

All those proposed solutions sound nice and sane, but consider this should be fixed in a19. The tower exploit has already occured in relatively many SVN matches and there will be definitely one of the gentlemen-agreements as ffm mentioned if not addressed in a19.

comment:17 by Lionkanzen, 8 years ago

I was playing Rise of Nations , that have territory system ( dynamically) when you capture a city other buildings assimilated the invaders, that mean, you have time to recovery or recapture before will be total hostile to you and an enemy building.

in reply to:  16 comment:18 by mimo, 8 years ago

Milestone: Alpha 19Alpha 20

Replying to elexis:

All those proposed solutions sound nice and sane, but consider this should be fixed in a19. The tower exploit has already occured in relatively many SVN matches and there will be definitely one of the gentlemen-agreements as ffm mentioned if not addressed in a19.

honestly, i do not understand what is the purpose of your post. Do we believe this "feature" is annoying ? certainly yes. Do we believe it is a release blocker ? certainly not. So once again (i repeat myself, but it seems comment 5 was not clear enough), as long as nobody works on it and no uncontroversial patch is proposed, there is no point to keep this ticket in A19. I would also add that this thread already contains enough comments explaining why this problem is annoying, and we should now start concentrating the discussion on how to best solve it.

A last point is that, even if a few tenth of core MP gamers are a bit annoyed by this "feature" (and i regret it), we release only an alpha and it is only a feature to which they could adapt (i.e. by protecting their isolated structures) and not a bug. Futhermore, they should be able to switch to the svn version as soon as it is fixed (which would even be a good side-effect as we usually are in need of testers :D). For me, releases do rather target the hundreds of new comers or casual players, and for them, having a good AI is important. And as I said already in comment 5, the last hack to try to fix this "feature" by changing the decay rates has changed a lot the relevance of capture, making the AI still more inefficient in its attacks as it now tries to capture buildings it has no chance to keep under its control. So I would not support other last-minute hack of this kind which can have unwanted side-effects.

comment:19 by elexis, 8 years ago

Milestone: Alpha 20Backlog

Backlogging due to lack of progress.

by sanderd17, 8 years ago

Attachment: connectedTerritory.diff added

comment:20 by sanderd17, 8 years ago

Keywords: patch review added
Milestone: BacklogAlpha 21
Summary: Build a tower in enemy territory[PATCH] Build a tower in enemy territory

I made a patch for this, and it seems to work well. Though I don't know if the AI will understand this (and I don't know how I can test it either).

It follows the same connectedness rules as the territory decay (so being connected to mutual-allied own ground is also good). This should give more clarity to users.

I also changed the ability to build in allied terrtory to mutually allied territory. Otherwise, a player could just quickly switch to allied, place the foundation, and become enemy again.

Last edited 8 years ago by sanderd17 (previous) (diff)

comment:21 by sanderd17, 8 years ago

A better patch would probably use the blinking flag of the territory (and don't redo the calculations), and also make the if structure a big shorter.

The AI can then also use the blinking state (which it gets via the territory map).

Watch out that the blinking state may not be totally safe to use yet, see #3891 .

by sanderd17, 8 years ago

Attachment: connectedTerritory.2.diff added

comment:22 by sanderd17, 8 years ago

Updated patch which used the blinking state of the territory, and includes AI code to support it.

The rules in this patch are slightly different. Now, when a building can be build in own (resp. allied) territory and in neutral territory, it can also be build in unconnected own (resp. allied) territory. This was done to make it easier to reconstruct a CC after losing it. Losing a CC might otherwise result in a lot of blinking terrain and leave no spot to build. But with this patch, the CC can be build on blinking terrain.

Note that the AI code wasn't completely correct before this update. F.e. it didn't have a check for neutral players (which are listed under "enemy" as before when it comes to territories). So it could have problems with that.

Now the AI code only has one problem: it checks for being an ally instead of a mutual ally. But I don't find the right function to fix that behaviour.

by sanderd17, 8 years ago

Attachment: connectedTerritory.3.diff added

New version with complete AI support (made possible since r18023)

comment:23 by sanderd17, 8 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 18049:

Disable building most structures in unconnected territory. Fixes #3526

comment:24 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.