User Tools

Site Tools


modtools:aieditor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
modtools:aieditor [2019/02/17 17:02] – [The Editor] adminmodtools:aieditor [2019/02/17 17:47] – [AI Variables] admin
Line 42: Line 42:
 ===== Files And How it Works ===== ===== Files And How it Works =====
  
-When the player starts a new game on a selected map, the //MapDataForGame.xml// file will tell the game which //AI.xml// files are available and how many AI to load from that file. The mod files can override this action, by supplying the game with it'own list of AI files and numbers of AI to load. However AI files are specific to the map, so even when the mod files override map files, it can only do it for a specific map.+When the player starts a new game on a selected map, the //MapDataForGame.xml// file will tell the game which //AI.xml// files are available and how many AI to load from that file. The mod files can override this action, by supplying the game with its own list of AI files and numbers of AI to load. HoweverAI files are specific to the map, so even when the mod files override map files, it can only do it for a specific map.
  
 The game can only load a random number of AI from an //AI.xml// file or all the AI from the file. With that in mind, multiple AI files may be needed. For example, Base City Map has 3 //AI.xml// files. One with 10 large companies, one with 25 large companies, and finally one that has 300 AI companies and is used for the "All" selection and the "Random #" selections. The game can only load a random number of AI from an //AI.xml// file or all the AI from the file. With that in mind, multiple AI files may be needed. For example, Base City Map has 3 //AI.xml// files. One with 10 large companies, one with 25 large companies, and finally one that has 300 AI companies and is used for the "All" selection and the "Random #" selections.
  
-The //AI.xml// contains all the behaviors, data, and starting information for AI companies. The actions of the AI are based on the variables presented in the //AI.xml// file. All data is moved from the xml file to the save game. So any changes made to the //AI.xml// will require a save game.+The //AI.xml// contains all the behaviors, data, and starting information for AI companies. The actions of the AI are based on the variables presented in the //AI.xml// file. All data is moved from the xml file to the save game. Any changes made to the //AI.xml// will require a save game.
  
-Finally, one of the variables for an AI company is the Head Quarters ID, or hqID. The hqID value corresponds to the cityID value in the //City.xml// files. As such, AI files can only work with maps that share the same CityID's. For example cityID 5 on //Classic Map// is London, but on //Base City Map// it is San Diego. So if an AI file from //Classic Map// was used in //Base City Map// all companies based in London would actually be based in San Diego... The exception to this rule is if you only add new cities to an existing //City.xml// file at the end of the list. For example, if there are 206 cities, you can add 207th and use the same AI file as long as the new city's ID is 207.+Finally, one of the variables for an AI company is the Head Quarters ID, or hqID. The hqID value corresponds to the cityID value in the //City.xml// files. As such, AI files can only work with maps that share the same CityID's. For example cityID 5 on //Classic Map// is London, but on //Base City Map// it is San Diego. So if an AI file from //Classic Map// was used in //Base City Map// all companies based in London would be based in San Diego... The exception to this rule is if you only add new cities to an existing //City.xml// file at the end of the list. For example, if there are 206 cities, you can add 207th and use the same AI file as long as the new city's ID is 207.
  
-There are also some advanced options in the [[modtools:cityeditor| City Editor]] that will take care of editing AI hqID's for you if you add new cities to a //City.xml// file in between other city IDs. This will however result in a new //AI.xml// file.+There are also some advanced options in the [[modtools:cityeditor| City Editor]] that will take care of editing AI hqID's for you. If you add new cities to a //City.xml// file in between other city IDs, it will automatically adjust the hqIDs. This will however result in a new //AI.xml// file.
  
  
Line 57: Line 57:
 ===== AI Variables ===== ===== AI Variables =====
  
-The AI has lots of variables stored in the //AI.xml// files. But it is these variables that distinguish one company from the next. The following will break down the editable variables found in the variable panel ({{ :modtools:aieditor_2_editorv2.png?linkonly |#8 in this picture}}).+The AI has lots of variables stored in the //AI.xml// files. These variables distinguish one company from the next. The following will break down the editable variables found in the variable panel ({{ :modtools:aieditor_2_editorv2.png?linkonly |#8 in this picture}}).
  
  
modtools/aieditor.txt · Last modified: 2022/02/15 18:00 by 127.0.0.1