# Installation Guide - UserPatch v1.3

## Introduction

Welcome! This is a feature and bug-fix update for Age of Empires II: The Conquerors Expansion. Its primary focus is to correct several long existing issues with the game, the AI system, compatibility, and related elements. This update will not enable no-cd gameplay and requires a valid, existing installation of Age of Empires II: The Conquerors Expansion v1.0c.

### Get More Information

- Updates: http://userpatch.aiscripters.net/
- Advanced AIs: http://forums.aiscripters.com/
- Resources: http://aok.heavengames.com/
- Multiplayer: http://www.aoczone.net/

## Installing the Update

Please install the update using the standard method before attempting the alternative method. If you continue to experience issues after trying both installation methods, please see the Help/Faq article for more information. See the Features and Notes sections for more detailed information.

### Standard Installation

1. Download the latest version of the update, if necessary.
2. Ensure that Age of Empires II: The Conquerors Expansion is not running.
3. Extract and run SetupAoC.exe.
4. Select the features you would like to install.
5. Click the Install button.

### Alternative Installation

1. Download the latest version of the update, if necessary.
2. Ensure that Age of Empires II: The Conquerors Expansion is not running.
3. Extract SetupAoC.exe into the "Age of Empires II" folder.

   It should exist next to files such as empires2.exe and eula.rtf.

4. Run SetupAoC.exe from this location in the game folder.
5. Select the features you would like to install.
6. Click the Install button.

### Uninstallation

1. Run SetupAoC.exe using your chosen method.
2. Click the Uninstall button.
3. Close and delete SetupAoC.exe.

## Features of UserPatch v1.3

In this article, you will find details about each of the features presented by the installer. Those that are checked by default are recommended, as they have been more thoroughly tested and are considered more stable. All of the restricted features are hidden by default. In order to install one of the restricted features, please press "F5" after the installer window appears.

### Out of Sync Warning

The (sync) mark indicates that a feature will affect multiplayer game setup or synchronization. Everyone in a game must have these types of features installed, or not installed, or you will experience errors.

### Recommended Features

1. Core feature update v1.3

   This required feature will install all of the updates, enhancements, and gameplay fixes required to upgrade v1.0c to v1.3. The checkbox for this feature will always be selected.

2. New save filename format

   This will modify the format for automatically named save files to yyyymmdd-hhmmss - txt.ext. For example, recorded games will be saved as "20130809-063026 - recorded game.mgz". This format should make it easier to sort and order your saved and recorded game files.

3. Widescreen interface style

   With this, the bottom center area of the in-game interface will span the width of the screen. This may be useful for certain widescreen monitor configurations.

4. Windowed mode support

   With this feature, you will be able to play the game in a window. When you install this feature, the "wndmode.dll" support library will be placed into the "age2_x1" folder.

5. Port forwarding support

   This will enable automatic port forwarding for UPnP compatible routers and setup your firewall. When installed, the "miniupnpc.dll" support library will be placed into the "age2_x1" folder.

### Optional Features

1. Multiple building queue (note)

   This will enable the multiple building selection queue (MBQ) system. If multiple buildings are selected, any units that you train are automatically distributed between the buildings. On the game setup screen, the SQ/MQ (single queue/multiple queue) button will change this setting.

2. Population caps to 1000

   The v1.3 update provides population caps up to 250 by default. This feature enables caps up to 1000, in increments of 25. Performance and game balance should be carefully considered before using this. Computer players, in particular, may slow the game significantly after a certain point.

3. Snow/ice terrain removal

   With this, snow will become grass, and ice will become moss. This is purely an aesthetic change, and should not affect gameplay. You can observe the difference on maps like Scandinavia.

4. Alternate mini-map red

   This feature will change the red dots for player 2 on the mini-map to a darker shade. On certain monitors, and LCD monitors in particular, the default shade of red may be difficult to see when positioned next to orange or purple.

5. Alternate mini-map purple

   With this, you can change the purple dots for player 6 on the mini-map to a darker shade. As with red, it may be difficult to distinguish between purple, red, and orange on certain monitors with the default shade.

6. Alternate mini-map grey

   This reverts the grey dots for player 7 on the mini-map to the original light grey of v1.0c. Although this tends to blend with stone and sand terrain on most monitors, some may be able to render it distinctly and effectively.

### Restricted Features

1. Delink from system volume

   With this feature, you can delink the game's volume from the system-wide volume controls. This is most useful for older systems, including Windows XP and earlier, to avoid the game affecting the volume of media players and other running applications.

2. Restore 20fps for single player

   If the new default speed of 60fps is too demanding for your system, you can install this feature to restore the original 20fps from v1.0c. Only install this feature as a last resort.

3. Disable windowed mode keys

   Install this feature if you would like to disable the "F7" (always-on-top) and "F8" (background mode) keys. The "F6" key for switching music tracks will still function.

4. Force new gameplay features (sync)

   With this, the multiple building queue feature will always be enabled, the multi-delete system will be enabled for shift+delete, and the SQ/MQ (single queue/multiple queue) toggle button will be removed from the game setup screen. This is intended for use only by mod developers.

5. Process team bonus list first (sync)

   Normally, the game processes technologies for each player's civilization, then generates the map for a game, and finally processes team bonuses. This may cause unusual or unintended behavior in mods. With this feature, the team bonuses will be processed before map generation.

6. Ore resource amount display (sync)

   This feature will present the ore resource counter at the top of the screen, along with food, wood, gold, and stone. The Conquerors Expansion will not use ore. This is intended for use only by mod developers and should not be installed unless necessary.

## Notes for UserPatch v1.3

This section provides more detailed information about the new features and capabilities that are included in the v1.3 update. Please read these notes carefully in order to get the most from your game.

### Core Features of v1.3

- Population caps have been extended up to 250, or optionally 1000.
- All available video resolutions, including widescreen, are selectable.
- Choose between the standard centered interface or the spanning alternative.
- Mirror player civilizations with the new Team Random civ option.
- Select a maximum age for advancement using the "Starting Age" dropdown.
- Each map script generates 4,294,967,296 unique maps from 32,768 in v1.0c.
- Single player mode now operates at 60fps instead of 20fps in v1.0c.
- Browse saved and recorded games from subfolders in your SaveGame folder.
- Check real-time achievement statistics while watching recorded games.
- With the new Relics victory condition, capturing the relics is an instant win.
- The patrol system responds like The Age of Kings with little to no delay.
- New Random button above game settings for new styles of play.
- Flares are now larger and more bold on the mini-map display.
- New higher resolution 1:1 and 1:2 full map captures with "Ctrl+F12".
- Age advancement notifications are now shown in each player's color.
- Restored games can now be recorded in all game modes.
- The vote panel/serial sync bug has been fixed for multiplayer.
- New auto-save if a problem occurs to ensure that resuming is possible.
- Optional multiple building queue to auto-distribute unit training.
- Many bug fixes for the core game and improvements for the AI system.
- The installer will correct any color problems on Windows Vista and later.

### Enhanced v1.0c Mode

- Watch v1.0c game recordings in .mgx format and load .gax saved game files.
- Play in UP widescreen style with people who have not upgraded to v1.3.
- All networking and gameplay bugs from v1.0c will remain for compatibility.
- Most of the new game, scenario, map, and AI features will be unavailable.
- Hold the "Alt" key when clicking "Install" to make a separate "age2_x1.0c.exe".
- Hold the "Ctrl" key instead to modify "age2_x1.exe" in-place.

### Windowed Mode

- Select a resolution lower than your desktop resolution to enable.
- Your chosen resolution will take effect once gameplay begins.
- Press "F7" to toggle displaying the window on top of other windows.
- Press "F8" to toggle running even when the window is not focused.
- Thanks to menopem for d3dhook, and veg for wndmode.

### Port Forwarding

- Install with admin privileges to automatically setup your firewall.
- Forwarding ports is only necessary to connect outside a LAN.
- Only use if you can't directly forward 2300-2400 TCP/UDP and 47624 TCP.
- Ports will be forwarded dynamically as required when installed.
- UPnP must be enabled on your router for this feature.

### M3U Music Playlists

- Set your favorite tracks as background music during gameplay.
- Create a "music.m3u" playlist in the "Sound" folder of the game.
- Press "F6" to skip to the next track during gameplay.
- Please see the Music section of this guide for more information.

### Color Fix for Windows

- The color palette distortion is fixed by this system compatibility update.
- Admin privileges are required one time to apply the required registry fixes.
- This issue only affects Windows Vista and later.

### DWM Fix for Windows 8

- 8-bit color mitigation is enabled by this system compatibility update.
- Admin privileges are required one time to apply the required registry fixes.
- This issue only affects Windows 8 and later.

### Maximum Age Setting

- The "Standard" and "Dark - Imperial" settings span all ages of the game.
- All of the other settings are restricted as described from starting age to end.
- If you play against the built-in Computer, a Castle Age maximum or later is required.
- Wonder Race must reach the Imperial Age, unless your mod allows early wonders.

### Relics Victory Condition

- The Relics condition can be found with Standard, Conquest, Time Limit, and Score.
- In this mode, the first player/team to capture all relics wins the game.
- There is no countdown; once all relics are captured, the game ends immediately.
- This condition is almost identical to the scenario editor-exclusive condition.

### AI & RM Scripts

- New maps can use team positioning for a different experience.
- Start your civilization on maps with new elevation attributes.
- AIs are selectable in multiplayer (direct ip or lan games are most stable).
- Multiplayer games can be started with only AI players for practice.
- AIs can now choose to close openings created in their walls.
- Boar hunting and luring is now fixed and operational for AIs.
- Ungrouped AI players will not ally themselves against humans.
- AIs are now able to lure deer and clear trees on michi maps.
- The reference guide describes all of the new features.
- For required defconsts, please see the included "UserPatchConst.per".
- Please visit the aiscripters forum for more information.

### Scenario Editor

- Press "Ctrl+S" once to disable grid placement of non-building objects.
- Enable free placement of all objects by pressing "Ctrl+S" a second time.
- Fill new maps or modify existing maps with any available terrain.
- Create maps using custom rms scripts directly in the scenario editor.
- Trees, mines, and more are now properly replicated by the map copy feature.
- Change the names of units in a specific area, without having to preselect.
- Use negative numbers more freely with trigger conditions and effects.
- Condition inversion checkbox option for all scenario trigger conditions.
- Area selection options for the patrol effect and the fewer-objects condition.
- Change object speed, range, and armor with new trigger effects.

### Compatibility Build

- This installer is designed for Windows 9X/ME/NT/2000.
- The standard build runs on Wine. Neither build works natively on Mac.
- Windowed mode and port forwarding fail on 9X/ME/Wine.
- Download the latest compatibility build.

## Custom Music Playlists

With UserPatch v1.3, you can provide a music playlist for the game to use as background music during gameplay. This file can often be created by simply saving a playlist in "m3u" format from your media player, naming it "music.m3u", and placing it into the "Sound" folder of the game. For properly defined expansions, the process is the same, except the "music.m3u" file would instead be placed inside the "Games\[NameOfExpansion]\Sound" folder of the game.

However, some media players use relative file paths like "..\..\..\Music\Track2.mp3" instead of absolute file paths like "C:\Users\Person\Music\Track1.mp3". The music will only play if these relative paths are based upon the game's "Age of Empires II" folder. This rule applies to both the core game and any expansions. Finally, some media players may save the playlist in UTF-16 or UTF-32 "Unicode" encoding. This will also prevent playback, as ANSI or UTF-8 text encoding is required.

For these reasons, it's often more reliable to create and manage your background music playlist using the installer's "Music" button, or create one manually as described below.

## Create a Music Playlist

1. Start the Notepad application from Windows.
2. Enter the absolute file path of each music file, one per line.
3. Save this file as "music.m3u" in the game's "Sound" folder.
4. Start The Conquerors Expansion and begin a new game.
5. Your music should play and switch tracks automatically.
6. Press F6 to skip to the next track at any time.

### Example File Content for "music.m3u"

`C:\Users\Person\Music\Track1.mp3
C:\Users\Person\Music\Track2.wma
C:\Users\Person\Music\Track4.mpa`

## Codec Considerations

Some players like "Media Player Classic" have many audio and video codecs, filters, and parsers built-in and therefore do not have to rely entirely on your installed DirectShow codecs. In these cases, it may seem like you have the codecs required for playback, even though they are not actually installed. If all required DirectShow codecs and filters are present, any music file format can be used. The wave audio format (.wav) should always work, regardless of installed codecs and filters.

## Advanced Details

This section describes all of the additional registry keys and command line parameters that the game will accept in v1.3. Registry entries are stored under "\Software\Microsoft\Microsoft Games\Age of Empires II: The Conquerors Expansion\1.0". The game will check under "HKEY_CURRENT_USER" first and then "HKEY_LOCAL_MACHINE". If both are missing for a given setting, the default will be used. None of the command line parameters will change data in the registry.

### Registry Settings

- Multiple Queue: REG_DWORD, Set to 1 to enable the "multiple building queue" feature.
- Adjust Terrains: REG_DWORD, Set to 1 to replace snow and ice with grass and moss.
- Extend Population: REG_DWORD, Set to 1 to extend the population dropdown list to 1000.
- Mini-map Colors: REG_DWORD, Set to combined flags for red, purple, and grey.

### Parameters for age2_x1.exe

- Format: age2_x1.exe [ parameter list ]
- GAME=name: Load the expansion defined by "Games\name.xml".
- NOWND: Disable the windowed mode library support.
- NOPORT: Disable the upnp port forwarding library support.
- NOPNG: Disable the png-format screenshot support.
- NOSTARTUP: Disable the introduction videos on startup.
- RECORD: Force the "Record Game" option to enabled for multiplayer.
- MBQ=0: Force the "multiple building queue" feature to disabled.
- MBQ=1: Force the "multiple building queue" feature to enabled.
- USESC: This replaces NOSC to enable strategic commander detection.

### Parameters for SetupAoC.exe

- Format: SetupAoC.exe [ -i | -c | -u ] [ -s ] [ -b ] [ -l ] [ -f ] [ -g ] [ -v ]
- -i: Install all fixes and features of the v1.3 update.
- -c: Install a subset of features for Enhanced v1.0c.
- -u: Uninstall and return to your original v1.0c.
- -s: Start the game after the operation.
- -b: Bypass the version check for v1.0c.
- -l: Create a shortcut link in the game folder.
- -f:options: Set feature checkboxes with 0/1 flags, -f:11111000110000000000
- -g:name: Operate on the expansion defined by "Games\name.xml".
- -v:version: Set a custom version id for an expansion, -v:2.3

## Help for Installation Problems

Here, you can find the answers to some commonly asked questions. Please click on a question to see the answer, along with any associated information.

### Frequently Asked Questions

1. Why is it failing with the message, "The data backup could not be created?"

   ### Cause

   The update will not install if it cannot safely make a backup of your current age2_x1.exe, in order to ensure that you can perform an uninstall in the future. The problem is usually related to user account permissions. Windows protects system folders, like Program Files, by default, in order to keep the system safe from malware. In order for the update to modify age2_x1.exe inside the "Program Files\Age of Empires II\age2_x1" folder, your user account will need to have permission to write there.

   There are 2 ways to accomplish this: the first, and perhaps easier way, is to run the update installer (SetupAoC) with elevated privileges. The alternative shown below is to grant limited user accounts the ability to modify files inside the "Age of Empires II" folder.

   ### Troubleshooting

   First, you will need to open an elevated command prompt. To do this, please follow the instructions under the "How do I run a command with elevated privileges?" article on this site.

   #### After you have opened an elevated command prompt:

   To grant limited users the ability to modify the game's files:

   cacls "FullPathToAge2Folder" /e /t /p Users:C

   To restore read-only permissions at a later time:

   cacls "FullPathToAge2Folder" /e /t /p Users:R

   #### An example of granting permissions with the default installation path (32-bit):

   cacls "C:\Program Files\Microsoft Games\Age of Empires II" /e /t /p Users:C

   ### More Information

   The actual path to your "Age of Empires II" folder may vary, depending on how you installed the game. Once you have granted limited users the ability to modify files in the game folder, you should be able to install the update.

2. It is telling me that "required files could not be located." What does this mean?

   ### Cause

   The update requires a valid installation of Age of Empires II: The Conquerors Expansion v1.0c. In order to verify your installation, it checks for age2_x1.exe in your "age2_x1" folder. If this file is not present, or your installation is in a non-standard state, you will not be able to proceed.

   ### Troubleshooting

   Please verify your age2_x1.exe file in the "age2_x1" folder.

   1. Browse to the "Age of Empires II\age2_x1" folder.
   2. Look for a file named age2_x1.exe.

   If this file is present, please use the Alternative installation method. If you are missing age2_x1.exe, please reinstall the game and apply the v1.0c update before continuing.

3. Why should I "install the 1.0c update for The Conquerors" when I already have it?

   ### Cause

   The update requires a valid installation of Age of Empires II: The Conquerors Expansion v1.0c. If you receive this message, it means that the required files were found, but your installation may not be properly updated to v1.0c.

   ### Troubleshooting

   Please verify the existence of empires2_x1_p1.dat in the "Data" folder.

   1. Browse to the "Age of Empires II\Data" folder.
   2. Look for a file named empires2_x1_p1.dat.

   If you are missing empires2_x1_p1.dat, your installation either requires an update or is damaged. Please reinstall the game and apply the v1.0c update before continuing.

4. I can't watch a recorded game from v1.0c in .mgx format. What should I do?

   ### Cause

   To prevent the loading of incompatible data, v1.3 uses the .mgz format for recorded game files. In order to watch a v1.0c .mgx file, you will need to use Enhanced v1.0c mode. In this mode, all game errors from v1.0c are maintained, in order to ensure compatibility. This mode is not recommended for actual gameplay.

   ### Troubleshooting

   Please create a separate Enhanced v1.0c mode executable.

   1. Run the installer, SetupAoC.exe.
   2. Hold the "Alt" key and then click the "Install" button.
   3. Close the installer after the process is complete.
   4. Browse to the "Age of Empires II\age2_x1" folder.
   5. Run the new "age2_x1.0c.exe" for Enhanced v1.0c mode.
   6. Load your v1.0c .mgx recorded game file as usual.

   To make it easier to start in the future, you can right-click on "age2_x1.0c.exe", select the "Send to" option, and choose "Desktop (create shortcut)". Windows will then create a shortcut on your desktop to the Enhanced v1.0c mode executable.

5. What happened to my custom campaign files? They aren't appearing.

   ### Cause

   The game will now load and save custom campaign files (.cpx), and all other scenario-related files like background bitmaps (.bmp), to the "Scenario" folder instead of the "Campaign" folder. This makes it easier to isolate user files from core game files.

   ### Troubleshooting

   Please copy your custom campaign files from the "Campaign" folder to the "Scenario" folder.

   1. Browse to the "Age of Empires II\Campaign" folder.
   2. Look for files that are not cam*.cpn and xcam*.cpx.
   3. Copy these to the "Age of Empires II\Scenario" folder.
6. Why is the fast-forward playback of recorded games slower than I remember?

   ### Cause

   Windowed mode performs many additional computations in order to change color depth and translate graphics operations in real-time. For normal gameplay, there is usually no difference, however, when watching a recorded game on fast-forward, there is a distinct loss of speed.

   ### Troubleshooting

   Please reinstall the update without the windowed mode feature.

   1. Run the installer, SetupAoC.exe.
   2. Uncheck the "Windowed mode support" feature.
   3. Click the "Install" button.

   Please note that it is normal for recording playback to slow down as the game progresses and more units are active on the map.

7. I can't hear any game sounds. What happened to the volume?

   ### Cause

   The restricted feature, "Delink from system volume," was installed. This causes the game's volume to be delinked from the master system volume, which allows the volume to be controlled in-game without affecting other applications on the system.

   ### Troubleshooting

   Please adjust your system volume settings.

   1. Open your system's volume control settings.
   2. For Windows XP, ensure the Wave/MP3 audio volume is not muted.
   3. For Windows Vista/7, set the game-specific volume setting to max.
   4. Start The Conquerors Expansion and begin a single player game.
   5. Raise the game volume to max from the in-game options.
   6. Make slight adjustments as necessary.
8. When starting a new game, the application crashes. What is causing this?

   ### Cause

   If your existing age2_x1.exe file is not a valid v1.0c executable, the modifications made to it by the update installer may render it unstable.

   ### Troubleshooting

   Please verify the version of your existing age2_x1.exe file.

   1. Uninstall the update using SetupAoC.exe, if necessary.
   2. Browse to the "Age of Empires II\age2_x1" folder.
   3. Look for a file named age2_x1.exe.
   4. Right-click the file, select Properties.
   5. Select the Version tab, and note the File Version.

   If the file is version 0.7.26.809, you have a valid v1.0c executable file and there may be another reason for the failure. If your file version is different, you may need to reinstall the game or apply the v1.0c update before continuing.

9. Why is the host saying that I have a different version? We're all on v1.3.

   ### Cause

   Some features, like the multiple building queue (MBQ), must be synchronized for all players.

   ### Troubleshooting

   Please select the same MBQ setting as all other players in the game.

   1. Uncheck the "I'm ready" box.
   2. Click the MQ/SQ toggle button near the "I'm ready" button.
   3. Ensure all other players are on the same setting.
   4. Check the "I'm ready" box.
   5. Try to start the game again.

   If this does not resolve the issue, please refer to the Features section of this guide to learn which other features affect multiplayer setup and synchronization.

10. I changed the screen resolution, but it's still small. What is wrong?

    ### Cause

    The non-gameplay aspects of the game, including the menus and game setup screens, are always shown in 800x600. Once gameplay begins, where you can see the Town Center and control your villagers, your chosen resolution setting will take effect.

    ### Troubleshooting

    Please start a single player or multiplayer game to see the change.

    1. Setup a game in single player or multiplayer mode and start it.
    2. The resolution should change automatically.
11. Why can't I connect to anyone's game? I've enabled port forwarding support.

    ### Cause

    Connection issues may occur if your actively connected network adapter (usually named either "Wireless Network Connection" for a wireless adapter or "Local Area Connection" for a wired ethernet adapter) is not at the top of the bindings list.

    ### Troubleshooting

    Please move your active connection to the top of the bindings list.

    1. Open "Network Connections" (run "ncpa.cpl" from the start menu).
    2. Press the "Alt" key to show the menu bar in the window that appears.
    3. Click on the "Advanced" menu, and select the "Advanced settings" option.
    4. On the window that appears, find the "Connections" list at the top.
    5. Use the arrow buttons to move your active connection to the top of the list.
    6. Click OK to save the changes to the bindings list.
    7. Run the game as usual.

    If this does not resolve the issue, please contact your network administrator for assistance.

12. I'm hosting a LAN game, but no one can see my game. What should I do?

    ### Cause

    For LAN games, you may be unable to connect with certain router models if UPnP has been enabled on your router's configuration page. Although UPnP is helpful for connecting to the internet outside a LAN, it can interfere with communication inside a LAN on some routers.

    ### Troubleshooting

    Please temporarily disable UPnP on your router while playing.

    1. Open the "Command Prompt" (run "cmd" from the start menu).
    2. Type "ipconfig | findstr Gateway" to get your router ip address (usually 192.168.*.*).
    3. Browse to http://your.router.ip.address.here/ for your router configuration page.
    4. Login if necessary, find the UPnP system setting, and disable it.
    5. Host a game and see if others on your LAN can connect.

    If this does not resolve the issue, please contact your network administrator for assistance.

13. The game is crashing in v1.0c and v1.3 on Windows 8. What has happened?

    ### Cause

    Support for 8-bit and 16-bit color applications, which includes Age of Empires II, has been removed from Windows 8. However, the application compatibility system can be used to allow these applications to run as expected.

    ### Troubleshooting

    Please install the update with administrative privileges.

    1. Download the latest release of the v1.3 update.
    2. Right-click the installer, SetupAoC.exe.
    3. Select the "Run as administrator" option.
    4. Install the update as usual.

    If this does not resolve the issue, please browse to the "age2_x1" folder, right-click your "age2_x1.exe" file, and select Properties. On the window that appears, select the Compatibility tab, enable compatibility for Windows 7 or earlier, and click OK.

14. It's still crashing. Could one of my other running apps be causing a conflict?

    ### Cause

    Certain applications, including remoting apps like TeamViewer and other graphics intensive software, may conflict with the game and cause it to crash. In some cases, especially with certain graphics drivers, the original fullscreen mode may also cause the game to crash, and running in windowed mode may fix the issue.

    ### Troubleshooting

    Please close other graphics intensive software before playing the game.

    1. Close background remoting apps like TeamViewer.
    2. Disable any applications that modify your desktop wallpaper.
    3. Ensure that no other graphics intensive games are running.
    4. Run the game as usual.

    Please try the alternate game window style.

    1. Run the installer, SetupAoC.exe.
    2. Switch the "Windowed mode support" feature checkbox to the opposite state.
    3. Click the "Install" button to commit the change.
    4. Run the game as usual.