Jump to content

Build Limits / Restrictions


Recommended Posts

Now that we have territories, we need more build restrictions. So I've gone ahead and got this working for territories as described in this post. This got me to thinking about other limits and restrictions we want, and it seems like a good time to fix those :)

I've found a few build limits in #687, are these still valid?

One new restriction is related to distance between civ centres. So I thought maybe we'd want similar restrictions for other buildings, why not make it flexible? So here's the scheme I came up with (to be added to the affected entity templates):


<BuildRestrictions>
<Territory>own</Territory>
<Category>CivilCentre</Category>
<DistanceRestriction>
<Category>CivilCentre</Category>
<MinDistance>150</MinDistance>
<MaxDistance>300</MaxDistance>
</DistanceRestriction>
</BuildRestrictions>

That means the civ centre can only be built in the player's own territory (except it has special allowance to build in neutral territory), and it has to be at least 150 and no more than 300 units from another civ centre owned by the player (just an example, we may not want MaxDistance in this case :)). Is this too complicated, too much functionality we won't use or does it make sense? If there are any other planned distance restrictions, feel free to list them.

Link to comment
Share on other sites

#687 limits are not valid. They were derived from static territories and settlements.

In your example, where is the special allowance for it to build in neutral territory? Are we going to do it like this?

    <Territory>own neutral</Territory>

We may want to be able to have an unlimited MaxDistance. Perhaps 9999 would be enough to constitute "unlimited" since our largest maps (currently) are 512x512, or a way to disable MaxDistance (and the other elements) in child entities. The only distance restriction would be the Civic Centre one, as far as I know, and that is only a MinDistance restriction, but it wouldn't hurt to add more functionality than planned, just in case we change our minds later (like Houses can't be built farther than X distance from Civ Centres, etc.). (y)

Right now, I can only think of a few build limit restrictions:

Scout Towers = 20 or 30.

Fortresses = 5 or so.

Special Buildings = variable. When we had static territories many of the Special Buildings had per-territory limits, so now we will have to revisit them (which may be a fun task!).

Heroes = 1 alive at any given time.

As long as these limits are easy to change, then their exact numbers don't matter at this junction (we'll play with it a bit to see what's best). Things like Houses don't need a limit, since there is a hard-capped population limit. If someone wants to build 100 Houses, then let them. And I see no reason for a hard limit on Civ Centres either; if we're going to give them a MinDistance, then they will automatically be limited by the size of the map, which is nice and tidy.

Other thoughts: We'll need some UI additions that notify you of why you can't place the Civ Centre so close, etc. Also perhaps a visible ring around the Civ Centre as you are moving its ghost around to determine where to place the foundation.

Link to comment
Share on other sites

Well if we are going to make houses count towards dynamic territories (not sure where we are at on that), then it might make sense to limit the number you can build. So it will be nice to have that option at least.

As long as all those values are stored where they can easily be tweaked we should be fine. We might come up with some really fun unique types of combat tweaking those combinations.

I am excited by the number of options we will be able to tweak!

Link to comment
Share on other sites

Well if we are going to make houses count towards dynamic territories (not sure where we are at on that), then it might make sense to limit the number you can build. So it will be nice to have that option at least.

The only reason I gave them a border effect is to see the border nicely and gently arc around them. Their effect isn't great enough to give room for building anything else or to deny the enemy much room either. It's mostly cosmetic.
I am excited by the number of options we will be able to tweak!

Ditto! And I'll probably go through the civ profiles and look at the Special Buildings and make some restriction suggestions. I believe there will be these types of restrictions:

-- MinDistance: I'm thinking the Iberian Monument will fit the bill. The size of the map will limit the number the player can make.

-- 1 constructed and alive at any given time: Persian Palace/Treasury building.

-- 1 per Civic Centre: Greek Special Buildings

-- A specific number, like 2 or 3: Thinking the Roman Army Camp.

-- Unlimited: The Roman Siege Walls... difficult to actually assign some number to this, so will probably effectively be unlimited, although they may have a restriction that they must be built in neutral or enemy territory (most be used offensively, rather than defensively).

-- 1 built/alive the whole match: Can only build (or train) one of these entities once, ever, the entire match. Once it's destroyed/dead, then you can't build/train it ever again. I can't think of any current special buildings that would warrant this restriction, but you never know. May do this for certain powerful heroes.

Link to comment
Share on other sites

The only reason I gave them a border effect is to see the border nicely and gently arc around them. Their effect isn't great enough to give room for building anything else or to deny the enemy much room either. It's mostly cosmetic.

This sounds like a good idea. I was thinking about when AoE2 came out and Town Centers were overpowered and people started using them as offensive weapons. Buildings became overpowered and folks were calling it AgeOfBuildings or something like that wink.gif

Link to comment
Share on other sites

This sounds like a good idea. I was thinking about when AoE2 came out and Town Centers were overpowered and people started using them as offensive weapons. Buildings became overpowered and folks were calling it AgeOfBuildings or something like that wink.gif

With the minor, albeit useless, territory effect Houses and Mills and Farmsteads have, you get the satisfaction of seeing those buildings add some territory to your empire, but what they do take is too small for any real benefit. If we have dynamic territories, I think it's good to squeeze as much satisfaction into the concept as possible. I think it's a good balance between gameplay and aesthetics.

Link to comment
Share on other sites

We may want to be able to have an unlimited MaxDistance. Perhaps 9999 would be enough to constitute "unlimited" since our largest maps (currently) are 512x512, or a way to disable MaxDistance (and the other elements) in child entities.

Why not just leave out the <MaxDistance> node? No max distance, so no element defining one, nice and clean.

Link to comment
Share on other sites

That would be good, but we still need a way to disable it if we, say, make a special object that inherits from a template that has MaxDistance, but we don't want the entity to have a MaxDistance.

Right, so I think a disable="" attribute would be appropriate, much like the ones that already in place to disable parent components. I just think "magic" values like 9999 or something should be avoided, especially in a markup language as flexible as XML.

By the way, <BuildRestrictions> implies that multiple <XxxRestriction> elements may follow. How would that work with overriding, e.g. if you only want to override a single restriction? Unless there's guaranteed to be only one of each restriction type (which could very well be a possibility), you'd need some kind of ID to be able to override a single one, wouldn't you? And what if there are restrictions that apply to different territories and/or categories? Right now the territory and category apply to all of the restrictions that follow, which might not necessarily be what you want.

Edited by vts
Link to comment
Share on other sites

Right, so I think a disable="" attribute would be appropriate, much like the ones that already in place to disable parent components.

Yep, and that'll already work - it's nothing to do with components in particular, the XML-with-inheritance code handles disable="" on any arbitrary XML element.

By the way, <BuildRestrictions> implies that multiple <XxxRestriction> elements may follow.

The current XML-with-inheritance format doesn't support that - an element can only have a single child element with a given name, so the inheritance processing and the C++ API and the JSON conversion remain straightforward and non-listy. In the few cases where we currently want some kind of list of items, it's done like

<SoundGroups>
<select>attack/siege/siege_select.xml</select>
<order_walk>attack/siege/ram_move.xml</order_walk>
<order_attack>attack/siege/ram_attack.xml</order_attack>
<trained>attack/siege/ram_move.xml</trained>
</SoundGroups>

where the element name is effectively the ID of the list item. (One could imagine writing '<SoundGroups><SoundGroup id="select">...</SoundGroup><SoundGroup id="order_walk">...' instead, if it was designed that way). It'd certainly be possible to add some new kind of list handling to the system, but it's much easier if we can avoid doing that, especially if it's only used for hypothetical features which the game design doesn't need :)

Link to comment
Share on other sites

#687 limits are not valid. They were derived from static territories and settlements.

In your example, where is the special allowance for it to build in neutral territory? Are we going to do it like this?

    <Territory>own neutral</Territory>

I changed it to work this way, since it's more explicit :)

Right, so I think a disable="" attribute would be appropriate, much like the ones that already in place to disable parent components. I just think "magic" values like 9999 or something should be avoided, especially in a markup language as flexible as XML.

By the way, <BuildRestrictions> implies that multiple <XxxRestriction> elements may follow.

Actually I made the MinDistance and MaxDistance elements optional which seems to work fine (a simple undefined test in JS), if both are omitted nothing happens :P

BuildRestrictions is so-named because the component handles several types of restrictions (terrain, territory, obstructions, alignment). Philip explained the technical reason, but I think it's clearer that each limit has it's own unique name like PlacementType, Territory, Category, etc. If a certain building needs more complex restrictions, then maybe it's best to add a new element and/or handle it in the code, rather than complicating everything else.

Link to comment
Share on other sites

Here's a demonstration of the shore building restrictions for docks, as seen in Atlas. You could build them anywhere that's not red:

Bawbyl.jpg

It shows the following:

1. Foundation obstructions (other buildings, trees)

2. Distance from shoreline

3. Slope of terrain

I think a map's terrain should reflect some of these criteria, so it's more obvious where a dock can be built.

Link to comment
Share on other sites

Here's a demonstration of the shore building restrictions for docks, as seen in Atlas. You could build them anywhere that's not red:

Bawbyl.jpg

It shows the following:

1. Foundation obstructions (other buildings, trees)

2. Distance from shoreline

3. Slope of terrain

I think a map's terrain should reflect some of these criteria, so it's more obvious where a dock can be built.

Hmm, in other RTS games, specifically AOK and AOM, it was simply understood very easily where you could place the dock---on the shoreline with a requisite water depth. The Dock's ghost would be red until you move it to a place that it may be placed. And when you moved it to a suitable place, the ghost "snapped" to a position perpendicular to the shoreline.

Link to comment
Share on other sites

Hmm, in other RTS games, specifically AOK and AOM, it was simply understood very easily where you could place the dock---on the shoreline with a requisite water depth. The Dock's ghost would be red until you move it to a place that it may be placed. And when you moved it to a suitable place, the ghost "snapped" to a position perpendicular to the shoreline.

Well there was no snapping in AOK and the water texture appeared differently to indicate depth :P I mean, the placement preview "ghost" will always appear red if not allowed to build, but how does the user know things like water depth?

Link to comment
Share on other sites

Well there was no snapping in AOK and the water texture appeared differently to indicate depth :P I mean, the placement preview "ghost" will always appear red if not allowed to build, but how does the user know things like water depth?

I don't know. It never seemed to be a problem in Age of Mythology. Maybe a green glow can show up on the buildable shorelines when the Dock is selected for construction.

Link to comment
Share on other sites

Great work historic_bruno! :banana: It works really really well in-game, and it's more than obvious where the dock can and can't be placed. I also really like that the dock automatically faces away from the shoreline, great stuff.

My only comment is that the dock should be restricted further into the water if possible, only a tiny piece of land should be occupied by the dock and this is for the workers to build it. The dock can in fact sit all on water, as long as a piece of underwater land is shallow enough for worker units to build it (think Belgian Bog). Just my tuppence worth :)

Link to comment
Share on other sites

i kinda got lost in the discussion, so im just gonna say this pertaining to building limits: perhaps these could be fueled or influenced by the number of civic centers that the player has

suppose that you start the game with one civic center, like usual. with just this, you can build 10 houses, 5 mills, 2 farmsteads, 1 barracks, and 1 temple. later on, you build a second civic center, which allows you to construct 10 more houses, 5 more mills, and so on. the numbers ive given here are just examples.

Link to comment
Share on other sites

I'd actually like to see numerical AND placement limits per civic centre: you can build a given number of each building in the radius of one civic centre. For example, you can build 10 or so houses, 1 barracks, 1 temple, 1 market etc. per civic centre, but they have to be near the civic centre. This way, the game design would make the player (and especially the AI) build compact cities. This also goes well with the proposed concept of curtain walls - the area within the walls would indicate the radius where such buildings could be built.

All of this doesn't apply to buildings like mills, farmsteads, fortresses, outposts etc., who could and should be built OUTSIDE of a city (civic centre radius).

Link to comment
Share on other sites

My only comment is that the dock should be restricted further into the water if possible, only a tiny piece of land should be occupied by the dock and this is for the workers to build it. The dock can in fact sit all on water, as long as a piece of underwater land is shallow enough for worker units to build it (think Belgian Bog). Just my tuppence worth :)

Yeah, boggy maps are a bit tricky, because shores aren't as well defined :( I'm thinking you're right, a dock shouldn't strictly have to be built on "land", but in shallow water.

i kinda got lost in the discussion, so im just gonna say this pertaining to building limits: perhaps these could be fueled or influenced by the number of civic centers that the player has

suppose that you start the game with one civic center, like usual. with just this, you can build 10 houses, 5 mills, 2 farmsteads, 1 barracks, and 1 temple. later on, you build a second civic center, which allows you to construct 10 more houses, 5 more mills, and so on. the numbers ive given here are just examples.

We had a concept like this for fixed territories (see http://trac.wildfiregames.com/ticket/687) but it has now been mostly scrapped. New territories are experimental, only time and feedback will tell if what we have now works :)

All of this doesn't apply to buildings like mills, farmsteads, fortresses, outposts etc., who could and should be built OUTSIDE of a city (civic centre radius).

This makes sense to me and is now quite easy to implement, it's just a matter of editing a few templates.

Link to comment
Share on other sites

I'd actually like to see numerical AND placement limits per civic centre: you can build a given number of each building in the radius of one civic centre. For example, you can build 10 or so houses, 1 barracks, 1 temple, 1 market etc. per civic centre, but they have to be near the civic centre. This way, the game design would make the player (and especially the AI) build compact cities. This also goes well with the proposed concept of curtain walls - the area within the walls would indicate the radius where such buildings could be built.

All of this doesn't apply to buildings like mills, farmsteads, fortresses, outposts etc., who could and should be built OUTSIDE of a city (civic centre radius).

IMHO, it's not necessary to make such restrictions. I feel that the curtain wall itself would be enough of an incentive for the player to build within its radius. Just my tuppence. ;)

Link to comment
Share on other sites

IMHO, it's not necessary to make such restrictions. I feel that the curtain wall itself would be enough of an incentive for the player to build within its radius. Just my tuppence. ;)

You may be right. I just thought it would be a nice idea to encourage (maybe not really force) players to build coherent cities.

What about this: The mentioned buildings could be built anywhere on the map, but they are less effective if built outside the radius of a civic centre.

Link to comment
Share on other sites

What about this: The mentioned buildings could be built anywhere on the map, but they are less effective if built outside the radius of a civic centre.

I seem to remember EE2 doing something like this. Perhaps not make them more effective, but they were more protected against attacks or something. The area around the city center (or whatever word they used, don't remember) was pretty small though, so I don't seem to recall that affecting things too much. There should be enough room to build things :) But the curtain walls as they've been described seems to be large enough, so I don't think it will be a problem. We'll have to test and see to be sure though :)

Link to comment
Share on other sites

WHY? WHY? WHY?

People disliked Age of Empires III partly because of the arbitrary building restrictions on everything. If people use buildings offensively, why is that such a problem? Let there be a vibrant churning of strategies instead of people being forced into certain strategies. It is inevitable that somehow a strategy emerges which you will not like because it's not the way you intended the game be played. That always happens. Let players have freedom.

Link to comment
Share on other sites

WHY? WHY? WHY?

People disliked Age of Empires III partly because of the arbitrary building restrictions on everything. If people use buildings offensively, why is that such a problem? Let there be a vibrant churning of strategies instead of people being forced into certain strategies. It is inevitable that somehow a strategy emerges which you will not like because it's not the way you intended the game be played. That always happens. Let players have freedom.

I disliked AOE3 because it was bland and the AOE formula was starting to get old to me. Their musketeers might as well have been archers from AOE2. Formation control still clunky as Hell. The Home City/card system was interesting but felt only half-developed (they fully developed it for AOEO though).

Anyway, I think my POV is the better approach--that the curtain walls would be enough incentive for players to play defensively with most buildings, but they aren't forced to play that way. IMHO some restrictions force strategy adaptation, but there can be too much restriction. Adding different effects to the buildings depending upon where they are placed (making some less effective or whatever, if built outside the curtain wall radius) forces a layer that is unnecessary, since some buildings will naturally be more effective in certain spots than others already. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...