So lets discuss the Empire AI to a larger extent, I know I’ve talked about it in the past but there has been a lot of changes and a lot more additions are incoming with my new finalized design for it. So I think it’ll be quite interesting to discuss this iteration.
In this section we’ll go through the core systems for the AI, the systems which essentially makes everything tick and work correctly.
There are a few minor core systems like the Project, Job, Threat systems but these systems are either a means of interacting with the world or for data retrieval to make the main core systems function in a proper fashion.
Empire AI Core
This is the Core of the AI and all other systems I will be discussing are sub-systems of this main system. So what the Core takes care of are adjusting Resource spending ratios, in essence what happens is that the Core will move resources to either the Production or War system depending on certain parameters, one of them being Threat level of the Empire. The Core also adjusts the allocation of Units for the different systems as well.
A broad example would be if the Empire has a high threat level over a large duration of time, it will start shifting resources and units over to the War system causing it to become a more hostile and war-like Empire and vice-versa if the threat level is very low it will most likely spend more resources and units on the Production system.
But these spending ratios will never drop below a certain point so that no extremes such as 100% on War and 0% on Production occur.
Starting off with the Production System, here are a few broad examples which this system takes care of.
- Constructing Production Structures (Farms, Houses, Blacksmith, Roads etc.)
- Production Researches (Tools, Materials, Construction Methods etc.)
- Delegating Production Related Jobs
- Housing for the Population
- Reproduction (This will be moved to NPC AI Layer later on)
There are a few more nitty-gritty details which can be left out but the essential goal of the system is to take care of the Production-side of the Empire as you can see from the examples above.
Currently it also takes care of delegating Harvesting of Doodads jobs for the NPCs but this will be moved up a layer into the Empire AI core and requests for resources will be sent up the chain to the Core’s Resource list.
This is a fairly interesting and different system from that of the Production System because it takes care of the defensive and offensive side of the Empire.
Yet again let me give you some broad examples:
- Guards (Patrols the Empire on the lookout)
- Defensive Structures (Walls, Towers)
- Offensive Structures (Outposts, Siege Buildings)
- War-based Research (Weaponry, Structures)
There are a few sub-systems for this system in order to properly make it function and to not give me a headache when implementing it, such as Guards AI, Offensive-Attacks AI.
Because I do not want Guards to be some half-witted nutters I’m going to have a sub-system which keeps track of Guard routes and where Guards are suppose to be stationed so if a guard notices that another guard is missing from his post it will start alerting other guards and cascade through the system to tell that something is not as it should be and therefore causing a higher alertness level within the Empire.
This system is rather simple, as you can tell from the name it takes care of all kinds of researches.
Essentially all it does is delegate research jobs depending on a research priority list to NPCs and these will in turn start researching a research at a library if one has been built.
This system is however not active if no library has been built within the Empire.
Now here is a very interesting system to discuss. Everyone has heard of Trading systems within games throughout the years, instant trading with other Empires or transport trading etc.
I’ve opted to go for a Transport trading system for The Old World and my reasons are that it allows for a lot of fun game-play elements. I’ll go into this very shortly.
Here’s another example list what this system takes care of.
- Moving Resources to Trading Post before shipments
- Establishing Trade with other Empires (Messenger is sent to foreign Empire)
- Takes care of Shipment documents
Here’s where the interesting bit comes in, As you can see from above I mention something about Trading Documents.
These documents will be in-game Items which holds data for the Shipment, this data being such things as:
- Route to take
- Inventory of Shipment
- Time of Dispatchment.
This data is quite interesting because it allows me to implement a few neat game-play mechanics. Maybe you break into a trade-post and steal this document, or copy it and decide to ambush this shipment during it’s journey, or decide to give this information to a group of bandits, or an Empire, or Empire generates a task for you to defend said transport etc. etc. List goes on and on.
These are systems either directly linked to the Empire AI in-order for them to function correctly or they’re just assisting systems to some other systems in the long chain of AI abstraction layers.
Now this is yet another very interesting system, this has nothing to do with the Terrain Map. This system takes care of Item-based Maps which contain various data. These items aren’t just going to be used for a way of keeping track where things are, they’ll be a way of interaction between you and the AI.
Here are a few examples in what way they can be used to interact or pass information from you to the Empire or vice-versa.
- Empire Resource Scout
Empire generates a task of scouting for resources which you may or may not accept. In order to properly pass information about your scouting to the Empire you will be needed to use a Map-Item. When this Item is used it’ll analyze the terrain, doodads, npcs around you, so that when you scouted an area with a resource you’ll be able to record this on a map and hand it back to the Empire.
- Empire War Scout
Empire generates a task for you to scout a specific location or a foreign Empire’s location. As mentioned previously a Map analyzes and records terrain,doodad,npc data, you can easily go to said location, record the data and hand the map back to the Empire easily transfering information.
- Empire Attack Plan
As mentioned previously with the Trading System it has so called trading documents, however in the War System there will be Attack Plan Documents which holds data about an attack or scouting missions etc. Later on if you have a high enough standing with an Empire you’ll be able to form these Attack Plans yourself.
This system is an assisting system for NPCs and is used for NPCs to identify other NPCs or Players.
So essentially what this system will be doing is keeping track of certain parameters of units and their gear when met in order to correctly or incorrectly recognize another unit when meeting it.
Some of the data it collects and saves is
- Current Equipment
- Familiarity Parameters
- Last Seen
- Chance of Recognize
This will allow for a lot of neat features such as, units recognizing you or other npcs for deeds which they may have done and will acknowledge them. The chance of being recognized depends on a few parameters but the main one being the more you’re recognized the higher the chance will be. But it also allows for you to trick units by changing gear but only to a certain extent.
But this can also be used as a method of transferring information about someone to others, so if you murder an npc and another unit sees you doing it, if it’s a civilian, it will most likely run off and tell others but if you manage to catch up and.. well.. “silence” that unit you’ll essentially get away with it.
The “Quest” system in The Old World is a bit different from other games because they are generated depending on the environment and you do not only retrieve them through the means of talking to units and them directly giving you a quest.
A lot of.. tasks.. are “given” by you from perhaps overhearing NPCs discussing the state of an Empire and how they’re running low on Wood or Metals etc. which gives a reason for you to eavesdrop in on conversations between NPCs because it may contain useful information.
There are also a lot of different types of tasks to accomplish, here are a few examples of basic and more advanced tasks
- Basic Tasks
- Resource Gathering
- Resource Scouting
- Construction of Structure
- Advanced Tasks
- Attack Planning
- Establish Trade
- Infiltrate Empire
- Scout Empire
- Steal Research Documents
- Steal Attack Plan Documents
These are only a handful of possible tasks that may be generated and more will be added further down the line.