The Castles Avalon are part and parcel with arcologies, and many overlap, with said arcologies being the jewel set in the iron crown of the Castle Avalon. These structures were started in the last days of the Petroleum Era and their first purpose was to defend the nascent arcologies being built.
The Last Days
In the last days of the Petroleum Era, war and strife were rampant and the institutions of the world were on the verge of collapse. Seeing the writing on the wall, various powerful groups financed the construction of the arcologies, and this was not without protest. These massive structures were resource sinks, and were the subject of domestic protest, and the target of foreign attack. They were quite simply too vulnerable to leave unguarded. The first castles were not much more than curtain walls built around the enormous construction sites. Basic security was enough for holding back protestors and riots, but spotlights and security guards were insufficient to stop military attacks. The second round saw the construction of arcology scaled walls. Compared to the mile tall megastructures, having fifty foot tall, thirty foot thick walls seems like a border around a garden.
Once the first gen arcologies were complete, the wall remained and formed a barrier between what was considered inside and outside, and the masses could only cluster against the wall instead infesting the grounds directly around the arcology. During the second dark age, many of these courtyards were turned to agricultural land, growing luxury crops like orchard trees and fruit, while other 'green towers' were used to mass produce the food needed for the arcos, supplementing what the arcology forces would 'harvest' from the rural land around the remaining cities.
The War Years
After the Resource Wars ended, and the second dark age settled in, it became a time of lower scale but constant conflict. This was considered a Mad Maxian time period as settlements were fighting for their very survival, scavenging from the ruins, contesting resources with each other, all under the constant haughty gaze of the arcologies, who were better armed, better equipped, and almost always better fed.
New walls were build, and proper towers grew along these walls, themselves the size of old skyscrapers. The bulk of these fortress sized towers was concrete and iron, on such a scale that they were impervious to the weapons of the day, and remain largely impervious to all but the most powerful of Cosmic Era weapons. These walls and towers were also heavily armed.
The Turrets - the towers were capped with battleship sourced turrets, and associated battleship scale cannons. While technically primitive, these weapons were still massive and even in the modern Cosmic Era, even mecha are going to be demolished or severely damaged by a naval grade cannon, or three. The placement of the turrets and the angle of elevation their guns could reach allow them to function as artillery support for defenders of the castle, or in case the defenders fall back, the guns can fire at what amounts to point blank range, with devastating consequence.
In the Cosmic Era, many of the turrets have been removed. The cannons were quite old, and the structures supporting them were worn by the decades. The force of the cannons was enough to shake the towers when they fired. Missiles and beam weapons have largely replaced said conventional heavy arms, and the turrets that remain typically have had their chemical propellant cannons replaced with linear and rail guns.
Wall Batteries - in areas of easy approach, the walls have buried batteries of guns. These vehicle scale cannons, lasers, and rail guns are manned in the manner of flag and sail gun crews. Each section of wall could hold dozens of guns, at different levels, and of differing composition. The early wall batteries were stocked with tank cannons, and autocannons. The later Cosmic Era batteries are manned by autons and armed with laser and beam weaponry.
Top of the Wall
The tops of the Castle Avalon walls are large enough for a rail line to run around them, in a full circle. The long combination vehicle made an appearance here, riding the rails atop the wall and letting their gun carriages and artillery carriages move to where they were needed. While the walls and turrets had ample military power, the LCVs and wall trains could move anti-riot, LRAD, and other acoustic devices where they were needed without building anti-riot facilities every hundred feet or so along the massive length of the wall. Many of these LCVs had 'wall bunkers' where the vehicle could shelter, rearm, or change crews.
Each castle wall had a 'front' tower and a 'rear' tower. The front tower was the tallest and the operational HQ for wall defense and was almost a mini-fortress of it's own. The rear tower was a massive elevator complex where LCVs could be raised and lowered onto the top of the wall. It is worth noting that some castles had only a single orbital rail, and the larger and more important castles could have three or more orbital rails, allowing multiple LCVs to operate on top of the wall. These Castles were more likely to have to defend themselves from airborne attack and the LCVs allowed for a more flexible deployment of anti-aircraft weaponry.
These massive Castles Avalon could have special rail mounted defenses such as massive naval mortars, long barrel energy cannons, and other war platforms that moved on more than one set of rails at a time.
Of Mechadromes and Motorpools
The first Castles Avalon predate mecha and power armor and were so configured to house conventional infantry, conventional armor, and the fighting tactics thereof. The 'courtyard' of the Castle Avalon is a densely armored 'deck' and there are extensive facilities underground and under the wall. This space is isolated from the arcology and geofront spaces, keeping a high level of security. The base line Castle Avalon was equipped with space and stockpiles enough to support an entire armor regiment.
In the Cosmic Era the tanks are gone, but the facilities have been expanded to handle both mecha and power armor. The mechadrome is completely underground, and the access points to the surface are literally inside the wall, and the mecha gates only pass halfway through the wall. Blasting through a mecha door would only grant access to the elevator system, which itself would be locked out by the destruction of the mecha doors. The refits were carried out well after the point the courtyards were no longer needed for food production, so in many of the Castles Avalon, the mechadrome refits coincided with the rebuilding and remodeling of the courtyards to become civic parks and green space and no longer actual production farms.
In the instance of a hostile action, a Castle Avalon can activate it's wall batteries, remaining turrets, and then mobilize at very minimum a regiment of mecha forces, plus supporting power armor forces.
One of the greatest tricks the Castles Avalon have pulled is being forgotten about. Many of the mecha gates, wall battery doors, and other structures havent moved or opened in decades, or longer. Some gates have never opened. Slums and shanties have clustered up against them, and many have coral like growths of human habitation on them. Inside, the fortress is still active, and the elevators and mecha are still there. Most movement in and out of the Castle are handled via carry-all, and through internal access doors, where late at night and under covert guidelines, the machines are moved in and out of the mechadromes, as needed. Entire crews work inside keeping the facility quietly operational, and the mecha and other gear in working order.
in the actual instance of hostile action, the Castle Avalon would remain dormant unless the threat was deemed legitimate. Regular arcology defenders would carry out their missions, and military base style mechadromes and aerodromes would be involved in the lines of defense and battle. Only at that final moment would the giant doors swing open, tearing down city blocks worth of build up, and the hidden mecha forces would charge into battle under the blazing light of guns long forgotten.
The Castles Avalon are full fledged independent fortresses that just happen to have arcologies situated in the middle of them. The majority of arcologies that have Castles Avalon around them dont remember that they are there, and it is an open secret among the leadership of the arcology and its local defenders. The average resident or citizen has no idea.
The Caches Avalon
There is another purpose of the modern Castles Avalon, and they are massive stockpiles of military hardware. There are hidden armored warehouses where hundreds of mecha and combat vehicles are stored, longterm. During AFAF military draw downs, the unneeded military hardware is mothballed and hidden under the Castles. This hardware is not forgotten, and as new upgrades are released for the existing hardware, the stored models are kept updated. This keeps a large pool of hardware available on short notice, and the crews who maintain and upgrade the machines have a large amount of hands on experience.
There are years of falsified records demonstrating that old and obsolete mecha have long since been sent to scrap. While a few were, for token exposure and records purpose, most remain hidden in the caches. These older machines have had their electronics and AI systems continually upgraded, and their weapons kept up to date, and their reactors vigorously maintained. Those that are deemed too worn out to keep using are eventually sent to scrap, but not before being parted out to keep other out of production machines stocked in part.
This is part of the Atlantic Federation's cognocratic AISC government's response plan. In the event of an unexpected invasion, there is a huge surplus of hidden weapons, and dozens of massive fortresses across the AtFed's dominion.