Jump to content

Wall Creation


LTGoldman
 Share

Recommended Posts

Looks like good progress. AI building walls would, imo, first require that we implement actual terrain/chokepoint detection. I'm fairly sure using a basic circle/square that encompasses most things we could do a fairly efficient wall building (walls cutting through forests would be nice though).

What is harder is detecting the presence of walled in buildings.

Note: the AOE3 AI actually can build walls, even fairly well, it's only deactivated (it's in one of the scripts. ) because it won't try to rebuild broken walls I think (which comes back to my second point: being aware of the wall is harder than actually building it).

Link to comment
Share on other sites

which comes back to my second point: being aware of the wall is harder than actually building it

You could do that with an abstract alignment saved in the AI. I did something similar to this in the rmgen wall_builder lib in getWallAlignment. In my case I needed it to determine the center (center of mass) of a given fortress to place it right. It simply does the same as a place function would do but instead of placing each wall element it puts everything needed for placement into a data structure and returns it. If you'd save such an alignment you could check if a part of the wall is missing and rebuild it correctly. Of cause the AI API have to support rotation for building placement...  

Edited by FeXoR
Link to comment
Share on other sites

That's supported already, qBot simply doesn't do it because it's not necessarily the most efficient way to place buildings, rotating them all over the map (I do that with Marilyn because I find it more aesthetically pleasing, and it looks more natural).

The problem with walls is actually two-folds: walls that pre-exist must be "discovered", I'm thinking of the Iberians now in scenarios... In that case, the AI must learn there are walls. And we need a way for the AI to rebuild destroyed walls/disband and rebuild larger if needed. It's certainly possible, it just requires some work. Then again, not more so than a proper attack system.

Link to comment
Share on other sites

The problem with walls is actually two-folds: walls that pre-exist must be "discovered", I'm thinking of the Iberians now in scenarios... In that case, the AI must learn there are walls.

Doesn't the AI get all entities it owns at the start including all it's props (like position, placement angle etc.)?

Edited by FeXoR
Link to comment
Share on other sites

Doesn't the AI get all entities it owns at the start including all it's props (like position, placement angle etc.)?

Yes, the AI gets information about every entity in the game. I not sure that rotation is there currently but it could easily be added. What is more tricky is actually using this information sensibly.

Link to comment
Share on other sites

I like the drag-and-drop wall system but it makes me wonder: those 'towers' between the walls ought to have their attack removed. Maybe make them upgradeable (like in BFME 1 & 2)?

Also: I hope that walls will be expensive and will take a while to build, unlike in the age of series, where it was easier and faster to build a new wall than to repair your damaged walls...

When stone walls take a while to build, it will give palissades a lot more of importance, even in later phases of a game.

Link to comment
Share on other sites

I like the drag-and-drop wall system but it makes me wonder: those 'towers' between the walls ought to have their attack removed. Maybe make them upgradeable (like in BFME 1 & 2)?

Also: I hope that walls will be expensive and will take a while to build, unlike in the age of series, where it was easier and faster to build a new wall than to repair your damaged walls...

When stone walls take a while to build, it will give palissades a lot more of importance, even in later phases of a game.

I don't think a wall without any attack has much of a worth in game. It might not be realistic but the costs of a wall should be low to match the actual advantage in game.

The time to build a structure and the time to repair a structure should indeed be the same I think. In fact it should depend on the materials needed to build an entity IMO so the build time would be something like (0.7*foodCost + 0.9*woodCost + 1.2*stoneCost + 1.5*mettalCost)/2 seconds. Same with the maximum hitpoints (structural points/life). It could be something like (1.3*foodCost + 0.7*woodCost + 1.5*stoneCost + 0.5*metalCost)/2. Same with the armor. It could be (0.1*foodCost + 0.5*woodCost + 0.9*stoneCost + 1.9*metalCost)/10 and distributed with another function as seen fit for this unit type. This would allow to balance things easily but I think I run into great opposition with that...

In this case palisades would indeed be build faster.

However, the advantage of walls in the age series didn't match the worth. I never build one because a fortress had a much better price/effect ratio and stone was the most limited resource (at least in AoE II - AoK/AoQ).

Edited by FeXoR
Link to comment
Share on other sites

Awesome work on the wall system guys :) It is great to see this in action! One thought I had for your consideration - for building walls on uneven terrain, I would recommend that your wall and turret models extend deep into the -Z axis, so that they are 'sub terrain'. Sort of like what is done with the docks and their piers. Just make sure that your wall turrets are tall enough to account for the build able terrain slope variation - and I think this new wall system would look pretty sharp on hills :)

Funny you should say that - AoE3's developers tried to make its AI build walls, but didn't make it work flawlessly so it was removed.

For AI, I think you guys should consider using FeXoR's RMG script logic. Have the AI reserve a wall location at it's starting position at the start of the game, and when the AI deems it time - start raising it's walls. Or for something more dynamic, maybe establish a wall that is inset from boundaries of the border/territories. To make it easier for AI to build walls, maybe it would be a good idea to allow them to break game rules by destroying gaia objects/resources in laying it's walls.
Link to comment
Share on other sites

One thought I had for your consideration - for building walls on uneven terrain, I would recommend that your wall and turret models extend deep into the -Z axis, so that they are 'sub terrain'.

Yep, I've done that to all the walls. We should be ok even on steep terrain - although there's no need to build a wall on very steep terrain so there will be some build restrictions :)

0ADWallDepth2.jpg

The red line here is at ground level:

0ADWallDepth.jpg

  • Like 1
Link to comment
Share on other sites

i figured that. for now use soldiers as gates, set them Stances as Stand and they kept entrance at homeland. the last night and i read the walls will attacked only for siege units, and palisade for soldiers.

Could do a courtyard like this that funnels attackers between a set of walls with towers.

dipylon-sacred-gate.jpg

gate-plan-lg.jpg

Pompeion_aerial.jpg

Dipylon (means: double gate)

keramikos_map.jpg

Link to comment
Share on other sites

Double walls and luring enemy soldiers within reach of towers sounds amazing.

For that to happen, soldiers ought not to be able to destroy walls without siege equipment. It would be cool if the AI goes for smashing the gate first, so you can make a bottleneck.

Link to comment
Share on other sites

Double walls and luring enemy soldiers within reach of towers sounds amazing.

For that to happen, soldiers ought not to be able to destroy walls without siege equipment. It would be cool if the AI goes for smashing the gate first, so you can make a bottleneck.

Right, we hope to alter the basic unit AI so that soldiers will not attack walls. You'll need siege weapons for that. Right now to kind of encourage this behavior I made walls bloody difficult to kill with swords and arrows, so you wouldn't want to attack them with your soldiers even though you can.

Link to comment
Share on other sites

Right, we hope to alter the basic unit AI so that soldiers will not attack walls. You'll need siege weapons for that. Right now to kind of encourage this behavior I made walls bloody difficult to kill with swords and arrows, so you wouldn't want to attack them with your soldiers even though you can.

There are some units that can raze walls well like war elephants. Most heroes with hack attack only do fine as well.

Link to comment
Share on other sites

War elephants will end up being one of the rare meat units that can attack buildings. (The Iberian Devotio cavalry with their flaming javelins are another.)

Those units might get overpowered, but we'll see. IMO both are already overpowered and if they are the only non-siege units able to attack buildings they'll get even better in comparison to other units...

Link to comment
Share on other sites

Just wondering, what makes units on walls so hard to put in?

Depends on what you want the unit to do on the wall - walk around fighting other enemy units on the wall, fire arrows, get hit by enemy projectiles, etc. There's a lot of functionality that would need to be added, and right now it's low priority.

How will gates be built with this setup? Same as they are now? Or could it be something like select a part of the wall and build a gate there?

The long wall segment can be upgraded into a gate. This isn't possible yet, but it's on the to-do list.

What about postern gates?

As far as I know there are no plans to include postern gates, although the functionality would be similar to standard gates, so they are possible.

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...