MeestaDude
Chieftain
- Joined
- Jul 21, 2002
- Messages
- 19
I have not dug into the code yet, but I am very familiar with programming and am interested in making some mods to Civ IV of a possibly complicated nature. I'd like some feedback on whether these seem possible, or possibly have already been done.
Critical components of the AI mod are described in this first post, additional alterations will be posted in a reply right afterwards.
Can I?
-Overhaul the diplomacy dialog to add new options and completely replace the trading AI used by computer players.
WHY: My mod is based on giving the AI a more rational/strategic method of making trades. It will calculate the value of any trade to its empire, be it resource/tech/city/treaties/etc, and also estimate the value of what it is giving to you in return for your empire (as well as the cost to give it away).
The additional dialog options relate to making more complex negotiations possible. For instance one would give the player a general estimation of the value of tradeable items (for instance you could ask what your biggest non-capital city is worth in gold equivalent).
In addition to trade a similar process is also used for the value of peace treaties, alliances, and so on... the AI will attempt to use the Diplomacy screen more proactively to further its national interests. For instance, instead of asking the player to declare war on its enemies, it may offer tech/resources, a city, or even a 'partition' of the enemy empire (one of the new proposals, agrees to let you take over some cities if it is allowed to hold some cities, failure to keep with the terms may lead to war between your empires).
Replacing this AI and the supporting diplomacy changes is the most important feature.
-Change the way AI calculates stance towards the player.
WHY: I'd like to modify the scale to have a wider spread (-30 to 30). I'd change the values associated with some factors, and add new ones. It will generally be harder to get pleased/annoyed levels, but the rewards will be stronger part of AI diplomacy calculations. Also if you do tick off an AI the ability to rebuild your reputation will be somewhat easier.
-Overhaul the entire AI...
WHY: This is not a critical component, but as a further development I wouldn't mind digging into completely changing the way the AI runs its empire from every warrior on up to its nuclear policy. I'm assuming for the most part the existing code can be broken into its essential functions and reused and then study how to implement the features I would like.
-- Subpoint: Change the AI's method of conducting war
WHY: I would like to move the AI towards adopting several types of war (it can use and channge midflight its overall strategy), these could include:
= Defensive War: Hold onto main cities with some offense mixed in more to stop foreign invasions than to take territory. Mostly used if someone declares on you, and you have no interest in taking their land.
= Single Front - Single Point Invasion: The AI creates a massed army at one point and attacks the player at one location with everything. Then can move onto next target, or change strategy. It will be somewhat like a stack of doom, although given the collateral damage ability it will spread forces where it makes sense. Typically used when the AI is interested in a particular target (a city with a resource for instance).
= Single Front - Wide Invasion: The AI masses along a 'line' of attack. For instance, a common shared border with enemy. Force is roughly evenly distributed over area into multiple attack groups (so instead of one stack of doom, maybe three or four smaller stacks). The line generally advances in pace, eliminating everything in front of it. At cities attack groups may converge to siege, take city, and spread back into line. This is pretty much an all out war tactic, slow but thorough, and may result in WW1 like trench-warfare.
= Full Invasion: AI masses a complete assault upon an empire, with attack groups positioned to attack multiple insertion points at once. This is a premeditated warplan involving large resource contribution... however, if the player is attacked on all sides at once it would be pretty amazing. This attack method would often be done in coordination with other AI's or the player (through advanced diplomacy options).
= World War... Multi-front: When multiple nations are pulled into the war the AI might go into 'world war' mode and split its empire into multiple fronts. There are defensive fronts, the borders and chokepoints of its own nation, and offensive fronts, potential targets. Forces will be assigned to each threat as deemed appropriate. In this situation the AI will be cautious, focusing on defense before offense.
These war methods would generally involve programming unit management AI. Generally units will be organized into groups with some formation, and then the AI will operate on the group level to determine its overall military strategy (reduces operations at unit level, so hopefully it scales well).
-- Subpoint: AI Expansion modification
WHY: Generally have the AI spread its cities more, higher quality over quantity. Make sure it specializes them intelligently. Also make sure it meshes with the new strategies involved in the war/diplomacy mods.
-- Subpoint: Technological Development
WHY: Change the AI's technology strategy to be more varied and fit to certain purposes. Also make a cooperative technology trading based AI, the AI may negotiate 'research treaties' where it will gather into a consortium of tech research nations assigning each nation a set of tech's to target and trade to other players. This process accelerates tech growth, assuming the parties are honest (betrayal will result in bad relations/war).
This is the major AI changes I would like, although the first one, new Diplomacy is all I am currently targeting, and would be a significant improvement in itself. Remember, I would like to know whether anyone exploring the SDK/code has any information that can say whether this is possible, and of course any examples of alteration that are anywhere close to these is useful. For instance, if someone has an AI mod that changes unit behaviour, or made a Diplomacy screen mod, those things I can look at, break apart, and turn to my own uses.
Thank you, further changes are discussed in the next post. The alterations mentioned above only change the way the AI DECIDES how to play the game.
Critical components of the AI mod are described in this first post, additional alterations will be posted in a reply right afterwards.
Can I?
-Overhaul the diplomacy dialog to add new options and completely replace the trading AI used by computer players.
WHY: My mod is based on giving the AI a more rational/strategic method of making trades. It will calculate the value of any trade to its empire, be it resource/tech/city/treaties/etc, and also estimate the value of what it is giving to you in return for your empire (as well as the cost to give it away).
The additional dialog options relate to making more complex negotiations possible. For instance one would give the player a general estimation of the value of tradeable items (for instance you could ask what your biggest non-capital city is worth in gold equivalent).
In addition to trade a similar process is also used for the value of peace treaties, alliances, and so on... the AI will attempt to use the Diplomacy screen more proactively to further its national interests. For instance, instead of asking the player to declare war on its enemies, it may offer tech/resources, a city, or even a 'partition' of the enemy empire (one of the new proposals, agrees to let you take over some cities if it is allowed to hold some cities, failure to keep with the terms may lead to war between your empires).
Replacing this AI and the supporting diplomacy changes is the most important feature.
-Change the way AI calculates stance towards the player.
WHY: I'd like to modify the scale to have a wider spread (-30 to 30). I'd change the values associated with some factors, and add new ones. It will generally be harder to get pleased/annoyed levels, but the rewards will be stronger part of AI diplomacy calculations. Also if you do tick off an AI the ability to rebuild your reputation will be somewhat easier.
-Overhaul the entire AI...
WHY: This is not a critical component, but as a further development I wouldn't mind digging into completely changing the way the AI runs its empire from every warrior on up to its nuclear policy. I'm assuming for the most part the existing code can be broken into its essential functions and reused and then study how to implement the features I would like.
-- Subpoint: Change the AI's method of conducting war
WHY: I would like to move the AI towards adopting several types of war (it can use and channge midflight its overall strategy), these could include:
= Defensive War: Hold onto main cities with some offense mixed in more to stop foreign invasions than to take territory. Mostly used if someone declares on you, and you have no interest in taking their land.
= Single Front - Single Point Invasion: The AI creates a massed army at one point and attacks the player at one location with everything. Then can move onto next target, or change strategy. It will be somewhat like a stack of doom, although given the collateral damage ability it will spread forces where it makes sense. Typically used when the AI is interested in a particular target (a city with a resource for instance).
= Single Front - Wide Invasion: The AI masses along a 'line' of attack. For instance, a common shared border with enemy. Force is roughly evenly distributed over area into multiple attack groups (so instead of one stack of doom, maybe three or four smaller stacks). The line generally advances in pace, eliminating everything in front of it. At cities attack groups may converge to siege, take city, and spread back into line. This is pretty much an all out war tactic, slow but thorough, and may result in WW1 like trench-warfare.
= Full Invasion: AI masses a complete assault upon an empire, with attack groups positioned to attack multiple insertion points at once. This is a premeditated warplan involving large resource contribution... however, if the player is attacked on all sides at once it would be pretty amazing. This attack method would often be done in coordination with other AI's or the player (through advanced diplomacy options).
= World War... Multi-front: When multiple nations are pulled into the war the AI might go into 'world war' mode and split its empire into multiple fronts. There are defensive fronts, the borders and chokepoints of its own nation, and offensive fronts, potential targets. Forces will be assigned to each threat as deemed appropriate. In this situation the AI will be cautious, focusing on defense before offense.
These war methods would generally involve programming unit management AI. Generally units will be organized into groups with some formation, and then the AI will operate on the group level to determine its overall military strategy (reduces operations at unit level, so hopefully it scales well).
-- Subpoint: AI Expansion modification
WHY: Generally have the AI spread its cities more, higher quality over quantity. Make sure it specializes them intelligently. Also make sure it meshes with the new strategies involved in the war/diplomacy mods.
-- Subpoint: Technological Development
WHY: Change the AI's technology strategy to be more varied and fit to certain purposes. Also make a cooperative technology trading based AI, the AI may negotiate 'research treaties' where it will gather into a consortium of tech research nations assigning each nation a set of tech's to target and trade to other players. This process accelerates tech growth, assuming the parties are honest (betrayal will result in bad relations/war).
This is the major AI changes I would like, although the first one, new Diplomacy is all I am currently targeting, and would be a significant improvement in itself. Remember, I would like to know whether anyone exploring the SDK/code has any information that can say whether this is possible, and of course any examples of alteration that are anywhere close to these is useful. For instance, if someone has an AI mod that changes unit behaviour, or made a Diplomacy screen mod, those things I can look at, break apart, and turn to my own uses.
Thank you, further changes are discussed in the next post. The alterations mentioned above only change the way the AI DECIDES how to play the game.