Hey guys 
In January 2009 I've written a little program called MAIC. It is a tool that helps you to change the AI while playing.
It can also be used to create ai files for your mods with just some mouseclicks.
Download link:
http://www.2shared.com/file/7485509/d678203/MAICv071.html
Unrar it to any folder you like and start the MAIC.exe from there.
The latest version is version 0.71. I won't develop MAIC any further as I'm working on HOI3 now. So I just wanted to share the tool with you guys.
How to use MAIC:
First of all add the following event to an event file e.g. HOI2.txt
When you want to change the AI behavior for a specific country switch to your Desktop and open MAIC. Set the AI as you want. You only have to set the values you want to change e.g. the production.
Create the ai file with MAIC and switch back to your game.
Open the console and type
event 760001 TAG
Replace 'TAG' with the country tag of course.
That's it. Now the AI will use your settings.
Limitations:
- MAIC only works on Windows Vista and XP (probably Windows 7 too, but haven't tested that). The .Net Framework 2.0 or higher is required!
- the language setting (english or german) only affects the province and country names (read from the csv's). I haven't done any further translations. The tool itself is in English and will stay in English regardless of what language you choose.
- Every aspect of the AI can be changed with MAIC except the Airforce and the Research.
Although you see some controls and values for the Airforce they don't work. The functions are not implemented yet.
For the research you only see one option 'ignore = {}'. This option causes the AI to clear it's ignore list. Thus they are able to research any technology. Influence the research behavior with blueprints then or if you know what you're doing add the technology code and the tech ids manually to the textbox before you save the AI.
- also the Load-Button does not work. It is just a placeholder for a load function I wanted to code some day (well, now it's propably never).
- Be aware of that some countries will switch their AI automatically. This is done through the switch events. Usually Majors have more switch events than Minors. So it could happen that you've just changed the invasion AI for the USA but in 1944 they'll switch automatically back to another AI with targets in the Normandy and such.
There is no (easy) way to prevent that. So when a switch event changed your settings you have to change the AI again.
The latest switch event is in 1945 if I remember right. After that you are free to do what you want without any further disturbances.
- It is not easy to create an embargo for your own auto-trade because the AI does not change for the player's country. To create an embargo you have to load your savegame with another country, set the embargo and then switch back to your original country.
- Changes on the AI can take a while. If you change the production of course the AI will finish their current queue first before they start with the new production priorities. Also if you e.g. change the Naval AI, the units will fulfill their current tasks first before they receive their new orders. So if for example you want German Submarines to cruise around Australia it can take several month before they return to their naval base and then go for their new task.
Aside from that you can change the AI in any way you like.
If you want Germany to build carriers or if you want Japan to send some fleets to the North Sea or if you want Italy to invade the US Eastcoast while Japan invades the Westcoast or if you want GB to share their Techs with Bolivia or if you want the SU to be more aggressive on the frontline.... everything is possible.
Although MAIC could also be used to "cheat" (if you make your enemies weaker) it is way more fun to just use it for your allies and tell them exactly what they have to do, what to build, where to invade, with whom to trade etc. pp.
I've always used MAIC to adjust the AI depending on what is going on in the world, especially in ahistorical games or in the cold war era.
MAIC SHOULD be compatible with mods because it just reads the csv files of the HOI2 installation path (countries, provinces, etc.). However, I cannot guarantee (e.g. countries and provinces must have an english AND a german name to be read by MAIC). Unit types and buildings are hard coded, so there is no support if you have made drastic changes.
What more to say?
Well... have fun!
Greets
Mac
In January 2009 I've written a little program called MAIC. It is a tool that helps you to change the AI while playing.
It can also be used to create ai files for your mods with just some mouseclicks.
Download link:
http://www.2shared.com/file/7485509/d678203/MAICv071.html
Unrar it to any folder you like and start the MAIC.exe from there.
The latest version is version 0.71. I won't develop MAIC any further as I'm working on HOI3 now. So I just wanted to share the tool with you guys.
How to use MAIC:
First of all add the following event to an event file e.g. HOI2.txt
Code:
event = {
id = 760001
random = no
country = GER
style = 0
persistent = yes
name = "AI has changed"
desc = "AI has changed"
action_a = {
command = { type = ai which = "MAIC.ai" }
}
}
When you want to change the AI behavior for a specific country switch to your Desktop and open MAIC. Set the AI as you want. You only have to set the values you want to change e.g. the production.
Create the ai file with MAIC and switch back to your game.
Open the console and type
event 760001 TAG
Replace 'TAG' with the country tag of course.
That's it. Now the AI will use your settings.
Limitations:
- MAIC only works on Windows Vista and XP (probably Windows 7 too, but haven't tested that). The .Net Framework 2.0 or higher is required!
- the language setting (english or german) only affects the province and country names (read from the csv's). I haven't done any further translations. The tool itself is in English and will stay in English regardless of what language you choose.
- Every aspect of the AI can be changed with MAIC except the Airforce and the Research.
Although you see some controls and values for the Airforce they don't work. The functions are not implemented yet.
For the research you only see one option 'ignore = {}'. This option causes the AI to clear it's ignore list. Thus they are able to research any technology. Influence the research behavior with blueprints then or if you know what you're doing add the technology code and the tech ids manually to the textbox before you save the AI.
- also the Load-Button does not work. It is just a placeholder for a load function I wanted to code some day (well, now it's propably never).
- Be aware of that some countries will switch their AI automatically. This is done through the switch events. Usually Majors have more switch events than Minors. So it could happen that you've just changed the invasion AI for the USA but in 1944 they'll switch automatically back to another AI with targets in the Normandy and such.
There is no (easy) way to prevent that. So when a switch event changed your settings you have to change the AI again.
The latest switch event is in 1945 if I remember right. After that you are free to do what you want without any further disturbances.
- It is not easy to create an embargo for your own auto-trade because the AI does not change for the player's country. To create an embargo you have to load your savegame with another country, set the embargo and then switch back to your original country.
- Changes on the AI can take a while. If you change the production of course the AI will finish their current queue first before they start with the new production priorities. Also if you e.g. change the Naval AI, the units will fulfill their current tasks first before they receive their new orders. So if for example you want German Submarines to cruise around Australia it can take several month before they return to their naval base and then go for their new task.
Aside from that you can change the AI in any way you like.
If you want Germany to build carriers or if you want Japan to send some fleets to the North Sea or if you want Italy to invade the US Eastcoast while Japan invades the Westcoast or if you want GB to share their Techs with Bolivia or if you want the SU to be more aggressive on the frontline.... everything is possible.
Although MAIC could also be used to "cheat" (if you make your enemies weaker) it is way more fun to just use it for your allies and tell them exactly what they have to do, what to build, where to invade, with whom to trade etc. pp.
I've always used MAIC to adjust the AI depending on what is going on in the world, especially in ahistorical games or in the cold war era.
MAIC SHOULD be compatible with mods because it just reads the csv files of the HOI2 installation path (countries, provinces, etc.). However, I cannot guarantee (e.g. countries and provinces must have an english AND a german name to be read by MAIC). Unit types and buildings are hard coded, so there is no support if you have made drastic changes.
What more to say?
Well... have fun!
Greets
Mac