Table of Contents
AI Editor
GearCity stores all AI companies in an XML file. Due to some variables requiring a City ID, AI.xml files are specific to City.xml files. As such they are shipped with game maps and not shared between maps. However, the mod system can override these files on specified maps.
Each AI node contains a logo file. These files are shipped with the map or added via the mod system as supplemental artwork.
If you add/edit an AI company, and the game crashes, check the log file. You're probably missing a logo because it hasn't been added to the .zip files containing the logos. (Or you're not loading those zip files…)
This page will break down the AI.xml system and hopefully explain to you how it works, the variables involved, and how to use the editor.
Mod Tools
To access the AI Editor, you must open the Mod Tools. See How to Open the Mod Tools.
The AI Editor is located on the left hand column of the Mod Tool's Main Menu. Click the button labeled “AI Editor.”
The Editor
This is the AI Editor. Below we'll walk you through what each part of the Editor is for.
- Creates a New AI List by clearing out all data entered into the editor.
- Opens an existing AI List.
- Saves the AI List to an XML file.
- Returns to the previous editor or the Main Menu.
- Opens the Map Data Editor.
- Opens the Turn Events Editor.
- Opens the City Editor.
- AI Company Variables. “Add” button at the bottom of the scroll adds a new AI company to the list.
- Current AI file opened. (Or last save name if saved.)
- Open a City.xml to populate AI Head Quarter's drop down.
- Select Logo folder to populate AI Logo drop down and to check to make sure the logo exists and is not being used.
- Lists the AI companies entered into the editor.
- Clears AI Variable data so a new AI company can be generated from scratch.
- Adds the new AI company on the left to the list of AI companies in the editor. Or edits the selected AI company in the list.
- Removes selected AI from list of AI companies entered into the editor.
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 its 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.
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. 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 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 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.
AI Variables
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 (#8 in this picture).
Base Information
Variable | In Game Use |
---|---|
AI ID | This is a non-editable value that is used to uniquely identify an AI entry inside the game. |
Name | This is the name of the company. It's typically how you'll see companies in the game. 26 characters is consider the soft maximum. You can put more, but it may cause text formatting issues. |
Owner | This is the AI ID of the AI that owns this company. If the owner ID is set to the same as the company ID, then the company owns it self. Any other value a marque of the Owner ID company. The drop down to the right allows you to quickly select the ID of an existing company. |
Head Quarters | This value corresponds to the City ID for the City.xml file. If you have loaded a City.xml file, the cities should be in the drop down box for you to choose from. If you select a city which does not exist in the City.xml file, the AI company will experience errors which could crash the game. |
Founding Year | This is the year in which the AI company will appear in the game. |
Death Year | This is the year that the company is no longer in the game IF you start at a later game date. For example, if the death year is 1950, and you start the game in 1951, that AI company will not be in the game. However if you start in 1949, that company will be in the game. |
Logo | The first box is where you can type in the filename of the logo. Remember, logos must be in .dds format. Any new logos for the game must be placed in a zip file before use. The drop down box will list logo files available in the selected logo folder for quick access to the proper filename. |
Finances
Variable | In Game Use |
---|---|
Quick Finances | This is a time saver to quickly automatically add starting funds, etc, for the AI company. |
Starting Funds | This is the amount of money the AI starts with. Please note, this value is adjusted in game depending on the number of AI and the size of the map. |
Existing Loans | This starts the AI company out with an existing loan that it has to pay off. Generally, due to the weakness of the AI in the game, it is probably best to avoid this setting outside of scenarios. |
Credit Rating | This is credit worthiness of the company. The better the rating, the lower rates will be on borrowed money. AAA is the highest, D is the lowest rating. |
Company Skills
Variable | In Game Use |
---|---|
Quick Skills | This drop down lets you quickly set the AI Company's skill ratings automatically. Thus saving you time. |
Skills–Manufacturing | This effects the number of vehicles an AI produces per production line when constructing a factory, the cost to construct and run a factory, and the quality rating of a vehicle being produced. A company with high manufacturing skills is good at production. |
Skills–RnD | This skill effects how quickly vehicles and components are designed, reduces design and unit costs, and gives a minor boost to overall ratings. A company with high RnD skills is good at design. |
Skills–Admin | This is the administration skill. It effects morale, striking, the amount of admin employees you need, administrative costs, and branch employees motivation to sell vehicles. A company with high admin skills is good at managing their company. |
Skills–Marketing | Higher marketing skills increase the effectiveness of marketing funds when selling vehicles. A company with high marketing skills is good at marketing. |
Skills–Dealership Management | Dealership management skill effects the company's ability to gain and retain dealerships. It also effects how well those dealerships sell vehicles. A company with high dealership skills is good at creating and maintaining relationships with companies that sell their vehicles. |
Design Skills
Variable | In Game Use |
---|---|
Quick Design Skills | This drop down lets you quickly set the AI Company's design skill ratings automatically. Thus saving you time. |
Design Skills Engine | This effects engine design and unit costs, as well as final ratings of an engine. |
Design Skills Chassis | This effects chassis design and unit costs, as well as final ratings of a chassis. |
Design Skills Gearbox | This effects gearbox design and unit costs, as well as final ratings of a gearbox. |
Design Skills Body | This effects the coachwork ratings of the vehicle design. It improves sliders such as Paint quality and Styling, as well boost demographic results. It also improves aerodynamic drag, cargo ratings, and various other styling and quality ratings. |
Design Skills Luxury | This effects the luxury ratings of vehicles designed by this company. |
Design Skills Safety | This effects the safety ratings of vehicles designed by this company. |
Image
Variable | In Game Use |
---|---|
Quick Image | This drop down lets you quickly set the AI Company's image ratings automatically. Thus saving you time. |
Image–Global | This is how the world sees the AI company in general. While there are niche image ratings, and various design skills, this is more of an overall perception of the AI company. This rating effects the sales of a vehicle when compared to other vehicles. |
Image–Quality | This is how the world views the quality of AI company's vehicles. This will more effect expensive luxury vehicles more than cheaper , performance, or work vehicles. This rating will however effect the sales of all vehicles when compared to other vehicles. |
Image–Workmanship | This is how the world views the AI company as a performance brand. This rating effects performance and power rated vehicles more so than cheaper vehicles. But it does effect sales across the board when compared to other vehicles for sale. |
Image–Workmanship | This is how the world views the workmanship of AI company's vehicles. Workmanship is how durable or well made the public perceives the brand. This is more important for cheap cars, luxury cars, and work-vehicles more so than performance vehicles such as sports cars or supercars. This rating will however effect the sales of all vehicles when compared to other vehicles. |
Behavior
Variable | In Game Use |
---|---|
Quick Behavior | This drop down lets you quickly set the AI Company's behavior automatically. Thus saving you time. |
Behavior–Performance | This sets how much focus the AI will have toward performance. The higher this value, the more likely the AI will build performance type vehicles. If the AI company has too many Performance vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward performance ratings of those vehicles. The opposite is also true, a lower rating will mean less performance vehicles. And less performance in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Driveability | This sets how much focus the AI will have toward driveability. The higher this value, the more likely the AI will build driveability type vehicles. If the AI company has too many driveability type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward driveability ratings of those vehicles. The opposite is also true, a lower rating will mean less driveability vehicles. And less driveability in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Luxury | This sets how much focus the AI will have toward luxury. The higher this value, the more likely the AI will build luxury type vehicles. If the AI company has too many luxury type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward luxury ratings of those vehicles. The opposite is also true, a lower rating will mean less luxury vehicles. And less luxury in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Safety | This sets how much focus the AI will have toward safety. The higher this value, the more likely the AI will build safety type vehicles. If the AI company has too many safety type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward safety ratings of those vehicles. The opposite is also true, a lower rating will mean less safety vehicles. And less safety in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Fuel | This sets how much focus the AI will have toward fuel economy. The higher this value, the more likely the AI will build fuel economy type vehicles. If the AI company has too many fuel economy type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward fuel economy ratings of those vehicles. The opposite is also true, a lower rating will mean less fuel economy vehicles. And less fuel economy in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Power | This sets how much focus the AI will have toward power. The higher this value, the more likely the AI will build power type vehicles. If the AI company has too many power type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward power ratings of those vehicles. The opposite is also true, a lower rating will mean less power vehicles. And less power in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Cargo | This sets how much focus the AI will have toward cargo. The higher this value, the more likely the AI will build cargo type vehicles. If the AI company has too many cargo type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward cargo ratings of those vehicles. The opposite is also true, a lower rating will mean less cargo vehicles. And less cargo in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Behavior–Dependability | This sets how much focus the AI will have toward dependability. The higher this value, the more likely the AI will build dependability type vehicles. If the AI company has too many dependability type vehicles, then they may branch out into other vehicle types, when they do, they will have extra bias toward dependability ratings of those vehicles. The opposite is also true, a lower rating will mean less dependability vehicles. And less dependability in vehicles designed overall. Please note, this behavior value is combined with other behaviors when selecting vehicle types. |
Generic Design | This checkbox will remove the AI using the behavior weights when selecting a vehicle type. Instead the AI will build many different types of vehicles under their marque. Typically going for what is most popular. |
Agression
Variable | In Game Use |
---|---|
Quick Aggression | This drop down lets you quickly set the AI Company's Aggression at taking certain actions. Thus saving you time from having to set all these settings. |
Aggression–Sales | This is how aggressive the AI will be with the quality of branch they build. The higher the this aggression the more likely the AI will try to build better branches. |
Aggression–Build | This aggression controls how aggressive the AI will be when building factories. The higher the aggression, the greater the tendencies to build larger factories. |
Aggression–Marketing | This aggression controls how much and how often the AI will spend on marketing. |
Aggression–Costs | This is how aggressive the AI is at keeping the costs low. The higher the agression, the more likely the AI will be to make cheap things. |
Aggression–Quality | This is how aggressive the AI will be at building quality, dependable vehicles. This rating does not effect the type of vehicle the AI selects to build, but how well it designs vehicles and how much “quantity” slider the AI uses at factories. |
Aggression–Price | This is how aggressive the AI is at pricing. A higher aggression will mean the AI will reduce margins to be more competitive. A lower price aggression will result in higher margins for the AI company (at the cost of less competitive pricing.) |
Aggression–Expansion | This is how aggressive the AI company will be at opening new branches and factories. The higher the aggression value, the more branches the AI company will build. |
Aggression–Design | This is how often the AI company designs new vehicles. A higher design aggression value will cause the AI company to create more brand new designs. A lower aggression level will have the AI company use the same designs longer. |
Clustering | This is how close the AI builds new branches and factories from one another. The higher the value, the closer the branches will be. The lower the value, and the more likely the AI will seek out far away cities to create their branches. |
Design Export | This adjust how often an AI company is willing to license out their designs to other companies. Higher values means that they are more likely. |
Design Import | This adjust how often an AI company is willing to purchase other company's design license for their own use. A higher value means the AI will use other company's designs more often. |
Examples
The following contains examples on how to properly set up the AI editor, add and remove AI, and save the AI for use.
Set Up
Filling HQ Cities List
The AI files are specific to to game maps. As such you should load a City.xml file from the map you wish to have the AI run on. To do this, you must click the City Script file selector button (#10 in this picture). Next navigate to the folder that contains the city.xml script. (If editing an existing map AI file, or creating a mod of an existing map, check File Locations for help finding those folders.)
Selecting a city script should now populate the drop down boxes for HQ ID with cities from the file. This will help up when selecting the HQ of the AI company.
Filling Logos List and Error Checker
Each AI company should have a logo. These logos must be 256×128 resolution and in DDS format. See DDS Textures for more details.
The game reads artwork from .zip files, however due to limitations in QT4.8 (and not wanting to implement zzip) the mod tools can not read artwork from zip files. As such, if you're working on an existing AI file, you should extract its AI logos into a folder. See File Locations for the location of these files. If you're working on an AI file from scratch, you should save all your logos into a single folder.
To load the logo files into the drop down, and to allow the game to error check your logo entries, click the Logo Folder Selector button (#11 in this picture). Then navigate to the folder with your logo files and select it. Now the logo drop down will contain the file names of your logos and any manually entered logos will be checked to see if they exist (after you hit Add AI).
Opening AI File
You should open your city script file and select a logo folder before you open an AI.xml file. While it is not necessary, it will prevent any unexpected errors from occurring.
To Open an AI file, click on the Open AI List button (#2 in this picture). Navigate to where the existing AI.XML file is. If you wish to open an AI file in an existing map or mod please see File Locations for more details on the location of these files.
Adding New AI
To add an AI company to the list, simply fill out all the data on the left hand side and click the “Add AI” button (#14 in this picture).
AI Companies must have unique IDs (which should automatically be taken care of), unique names under 26 characters long, a HQ ID in an existing city within the City.xml files for a map, and a .dds logo file. Any failure to meet those conditions will result in ingame errors and possibly crashing,
Editing Existing AI
Select the AI from the list you wish to edit. Edit the data on the left. Then click the “Add AI” button (#14 in this picture).
If you're adding new logos to an AI company, please be sure you include the dds files in a zip file. See Saving AI File for more details.
Removing AI
Simply select the AI company you wish to remove from the list, then click the “Remove AI” button (#15 in this picture).
Removing an AI in the middle of the list will automatically re-ID all AI ID's above the removed company. Any AI companies owned by the removed company will now be owned by themselves.
Saving AI File
Weither you're saving your work for future use, or you're ready to use it in the game, you will save the AI.xml using the same button. To save an AI.xml file, simply click the “Save AI List” button (#3 in this picture). Navigate to where you wish to save the the file and hit save.
If you're saving for use in a new map or mod (or adding a new file to the map/mod), then the location where you save it will not matter. As the Map Data Tool and Mod Data Tool, will automatically place the script files where they need to go.
However, if you're editing an existing map or mod AI.xml file, you must save the new AI file over the old one.
After you have saved your AI.xml file. Before using using the AI in the game, you will need to compress all of the logos into a single .zip file. If you're editing an existing map or mod, you must use the zip files already created. See File Locations for details where these zip files are. If creating a new map, use one .zip file for all AI logos. If creating a mod, you will have to share zip files with other additional mod content.
There must not be any folders inside of the zip file. Just place the files directly into the zip without any sub-folders. The game will not read anything inside of a folder in a zip file.
Testing New Logos In Game
The game has a built in logo tester system. Start a new game with the mod, map, and AI.xml file you wish to test. Click safe in the Office to go to the Financial Room. Hold down ctrl and hit the “L” button. This will pull up a list of all the Logos used in the game.
If the game crashes, then you are most likely missing a logo or one is miss named. Check your Log Files to see which file name is giving you problems.
Troubleshooting
Common things that can go wrong when editing AI files:
Game Crashes When Checking Stocks
Most likely you're missing a logo file in your Logos.zip or you miss named the logo filename in the AI editor. (Thus the filename is wrong in your AI.xml file) Check your Log Files to see which file is missing and add it to the .zip.
Also be sure to test all the logos in the AI.xml file using “Ctrl-L” while you are in the Financial room. This will save you a lot of trouble in the future.
None of the Changes I Made are in the Game!
Any changes to the AI require you to start a new save game before they take effect. Be sure to start a new game. If you are creating or editing a mod. Make sure you've selected the mod from the external Settings Editor.