Version / Navigation

Version: 1.1
Released: 2010-Jun-17



Download
How to use
Troubleshooting

AO Container Cleanup tool

Every time your character receives (via trade with other players or when bought from a shop) a backpack, two new files will be created on your computer to hold the associated settings for the backpack. But even if the backpack later gets removed from your character (deleted, sold, traded to someone), those associated files won't.

Also, the game sometimes "decides" to abandon a previously used file in the prefs fileset for no apparent reason and creates a new instance of it under a different name. This can happen repeatedly every now and then, leaving you with several duplcates of the exact same file, of which only one is actually used.

Basically, the game keeps leaving a lot of garbage on your computer which it never bothers to clean up. Ever. Because of this, your Prefs folder constantly grows both in total file size and number of individual files (up to several thousands or more), which may cause a freeze when you access your bank in the game, and can make backing up and restoring your Prefs take quite some time because of the sheer number of files involved.

Using this tool once every few months (or more frequently if you often trade larger numbers of backpacks) on your characters to remove such unused files should keep the garbage level down.


Version history

v1.1 (2010-Jun-17) v1.0 (2010-Jun-09)
to top

Download

A few things we need to make clear first: Cleanup tool file: AO_CCleanup_Tool_v1.1.vbs

The tool is not a stand-alone executable but an MS Visual Basic script (a simple text file with a .vbs extension, containing the source code in readable form). It relies on the Windows Scripting Host (WSH) component built into most recent Windows operating systems to get executed straight from this source code state.
In general, it should run on any Windows from XP and up, 32/64 bit, provided you don't have the WSH component somehow disabled.


to top

How to use

#0: Locate the Prefs folder (and make a backup)
  1. Completely exit the game
  2. Start the AO launcher, click "Settings", then select the "GUI" tab in the Settings window
  3. Click the "Open" button next to the "Skins" line in the "Folders" frame to open the custom GUI folder, then click "Cancel" in the AO Settings window
  4. Go one step up, where you should now see the "Prefs" folder; this will be your starting point for the cleanup process, it's the best to work with this window
Optional: Now that you are here, it might be a good idea to copy the entire "Prefs" folder to a different location as a backup, in case something fails.

#1: Prepare
The only viable way to tell if a container file is still in use is to look at its "last modified" date, which gets updated every time you use the associated backpack in the game. If it has not been updated in a while, then it may have become orphaned... Or you just havent't used it lately.
By default, the script considers container files older than 30 days as unused, and will remove them. If you are sure you've used all backpacks on the given character in the last 30 days, you can skip this part.
  1. Log in to the game with the character you want to perform the cleanup on.
  2. Open your Inventory, then open and close each and every backpack you have in it.
  3. Open your Bank and go through all the backpacks stored there: move them into your Inventory, open and close them, then move them back to your Bank. Important: Simply moving them out then back is not enough. You also have to open and close each of them.
  4. When you are sure you went through all your backpacks stored anywhere on the given character, log out of the game.
#2: Execute
When you are sure all the backpacks on the given character had been accessed in the last 30 days, you should be ready to perform the actual cleanup:
  1. Place a copy of the cleanup tool file into the "Prefs\<AccountName>\<CharId>" folder of the character you want to perform cleanup on.
  2. Double click on the cleanup tool file to execute it.
  3. If everything checks out, you will get a message window telling you that the tool is ready to perform the cleanup. Click OK to continue.
    If there's something wrong at this point, a message window informs you about what's the problem, and the tool exits.
  4. There is no progress indicator during the cleanup process, and it may need up to a minute to finish, depending on the number of files to be processed. Be patient, you'll get a notification when the cleanup is completed (or some error has occured and execution was aborted).
  5. Eventually, a message window should appear to tell you that the cleanup has been completed. Click OK to close it.
#3: Verify
After the tool has reported a successful cleanup, there are a few things left to check and do:
To change the number of days after which a backpack is considered unused:
  1. Open the cleanup tool file with a plain text editor (eg. Notepad)
  2. Locate the line near the beginning of the script similar to this: Const cleanup_age = 30
  3. Change the number in this line to any value greater than zero
  4. Save and close the file

to top

Troubleshooting

The tool exited with a message about not finding "Prefs.xml" or "DockAreas"

The tool exited with some message about "old_" folders being present

The tool exited with some message about "clean_" folders being present

The tool exited with a "Completed" message

The tool exited with a "Fatal Error" message

The tool exited with some Visual Basic Script Error