Asophix 189 Posted October 9 With the Skirmish mode coming up and the next demos being released, one may wonder how the computer opponents will get their personality and tactics. There are few details known so far, but the AI definitions have been given a lot more detail, so now we can speculate as to what each of them will do. Below I will outline and detail, what defines a SH4 computer opponent, and what implications it may bring. Please keep in mind that everything written is mostly my speculation, and details may change over time! 😉 Enjoy! How it Looked in Earlier Games There is one baseline intelligence running all the computer opponents, as is tradition for all Stronghold games - the characters vary in choice of buildings, units and trade. For a very long time - up until Crusader 2! -, the AI had to be told in a very fine detail what it should build, as well as how its castle should look like. These allowed for considerably easy design, but it quickly became obvious how repetitive and limited the computer plays: it blindly composed unit groups as told, and threw them in battle. In Stronghold Warlords, the baseline AI got a large needed boost to its capabilities, replacing the deterministic this "printing press"-like strategy with self-sufficiency: it can adjust building and recruiting based on its demands. Early on, the Warlords opponents build a lot of woodcutters and rice farms to take care of basic necessities, then they branch into other economic aspects. In short: at the cost of definition detail, the AI no longer makes the same armies. Instead, it decides for itself when to launch smaller probing attacks, and proper sieges, respectively. Considering the similarities in the current files, SH4 will very likely continue with this implementation. Definition Details The SH4 AI will have three general groups of attributes: castle pool, economic, military. The Castle pool is currently empty, since Skirmish is not yet added. Economic Attributes: Maximum Rank: the AI will not attempt to rank all the way up to maximum. This limits weaker characters from playing at full strength. Maximum Banquet Variety in the Kitchen: the AI will not attempt to hold richer banquets. Target Fear Factor Rate: the AI will build Bad or Good Things in the castle to reach this limit. Target Housing Value: the AI will try to ensure that this many free peasants are available at all times. Building Chain Toggles: if enabled, the AI will develop and sustain a specific production branch. These can separately be given a maximum rank so that the AI will not utilise them once this rank is reached. An example would be turning off Dances once the AI reached its full potential. The following chains can be configured: Turnip Farms Apple Farms Dairy chain (Dairy Farm, Cheesemonger) Wheat chain (Wheat Farm, Mill, Bakery) Inns / Ale chain (Hops Farm, Brewery, Inn) Spirit ~ Religion (Chandler's Workshop, religion buildings) Dances (Sheep Farm, Weaver's Workshop) Military attributes: Minimum Attacks Before Siege: the AI will launch at least this many raids before attempting a siege camp attack. Iron Needed for Troops: the AI will provide iron mines and workshops, if set. Troop to Worker, Troop to Siege Multipliers: these two numbers determine the troop limit, which scales based on how many workers (and siege equipment?) the AI keeps around. Generally as the bot grows its economy, the harder its armies grow and hit. List of Troops: the AI will recruit these units. The AI will keep its units in the castle until it decides to send them in a raid or a siege. Each troop has a weight to alter how much the AI favors making them. Some units will be liked more by the AI. There is also a rank limit to stop the AI from recruiting each troop type, which serves the purpose to phase out weaker units in later stages of the game. List of Siege Equipment: the AI will make these siege equipment when attempting a proper siege. Same attributes as the "List of Troops" property. List of Starting Troops: determines what troops the AI starts the game with. 1 Share this post Link to post Share on other sites
Mizo 0 Posted October 18 Very Interesting. Have you figured out any file where you can configure or mod the game (just from a stat changing perspective) when it comes to editing the rules.xml and Skirmish AI (upcoming soon) of the game? 0 Share this post Link to post Share on other sites
Asophix 189 Posted October 18 It is no specific file, but actually a nested definition that is bundled along 98% of the content with the game. If my guess is correct, the entire Stronghold 4 packfile must be rebuilt, which seems miles harder than the .v files for the preceding games, and I don't know how to do that. 0 Share this post Link to post Share on other sites
Asophix 189 Posted October 18 Update: I think I can do such a thing. 🙂 For certain I can only extrapolate after the Skirmish Demo has been released and pried open. 0 Share this post Link to post Share on other sites
Mizo 0 Posted October 19 Oh for real? Lets hope we can adjust some stuff considering how weak the AI is, see what levers we can pull ect . Let me know what you find once you finish digging deep into it. 0 Share this post Link to post Share on other sites
Asophix 189 Posted Wednesday at 18:06 While not strictly related to modifying by any means, I was playing around a bit seeing how the characters build up with a specific chain on/off. The behaviour is very similar to the Warlords AI, so many of the following points may ring a bell for you. Nevertheless, I made the following observations over a few hours: Economy Like SH2, the most essential buildings are placed at different focal points, not interfering with the castle design. The AI has no restrictions to what buildings it can place, and if one is missing from the castle, then they will be built. The production buildings and the consumers are usually placed quite far from each other. The provided castle templates seem very strict, as Firefly must have wanted to make the AI's castles pleasing to the eye. The bot economic development is very delicate and slow: the more economic branches open, the more it dips into every one of them, but not to a great extent. Due to SH4 being a relatively low population game, the AI may forgo fully developing a production chain, such as not building tanners even if it recruits Crossbowmen or Macemen. As a result it doesn't fully exploit the resources and real estate at its disposal. A new economic mechanic is that the AI will cease maintaining a production chain, when it reaches a certain rank. When this happens, the respective building will be demolished. Like the player, the AI can and will upgrade its houses whenever it sees fit. The AI respects the same trading rules as the player and seemingly have no bonuses to its gameplay or production. Military The AI keeps its units spread out at home until it decides to send a raid or siege. Generally it keeps ranged units on walls and elevated positions, while melee units guard the Keep. Engineers will wait at the Engineer's Guild. Battle groups behave generally the same, moving in a column formation and inching forward, addressing provocations on the way. Siege groups have the added functionality of Engineers constructing engines just outside the enemy castle's range. The "obsolete when reaching a rank" mechanic applies to hiring certain unit types as well. One such example for some lords is not recruiting any more Levy after Rank 4 or 5. The AI takes quite a bit to respond to long-range bombardment, and it doesn't address being locked down by missile fire. After a while, it will grab all melee units around the Keep and charges them at the siege engines causing damage. The AI does send a panic message, but this doesn't seem to prompt it to gradually delete its economy to make gold, nor does it stop production to get peasants. 0 Share this post Link to post Share on other sites