How To Rebuild The ACM File - SWG-Source/swg-main GitHub Wiki
The ACM file, full name being asset_customization_manager.iff, is a client side file that allows objects to be customised by players. There are various ways that is done in-game, usually with customization kits. God mode players can use /sethue -target while your cursor is over an object. Doing so will bring up a palette selection window showing the available options. When ACM entries are not in place for an object, or are incorrect, when you use that command you will not see palette options and will most likely see an error about missing "palcolor data".
To get a grip on ACM you need to understand that every object has two "file chains" - a dsrc file chain and an art asset file chain. The "dsrc file chain" is made up of tpf (templates) and tab (datatables) entries which allow the object to be spawned in-game and attach various properties to it. The "art asset file chain" is the visual components of an object. We will need to explore that to get a better understanding of how the art asset file chain is critical to ACM.
The files involved in an art asset file chain will vary depending on the object you are examining, so let's check some common object types to see the differences:
- Painting: APT > MSH > SHT > DDS
- Speeder: APT > LOD > MSH > SHT > DDS > PAL
- Creature Pet: SAT > LMG > MSH > SHT > DDS
- Armour Piece: SAT > LMG > MSH > DDS > PAL
For the most part those file chains share common file types.
- APT (Appearance Template Redirector)
- SAT (Skeletal Appearance Template)
- LOD (Detail Appearance Template)
- LMG (Lod Skeleton Template)
- MSH (Mesh Appearance Template)
- SHT (Shader Template)
- DDS (Direct Draw Surface)
- PAL (Palette)
When we're dealing with player customization that means the object being customized has alternate textures (DDS) and / or alternate colours within the attached palette (PAL). When you consider the amount of objects in-game that allow customizations that makes for a massive list of the involved file chains. The mechanism used in the SWG client to make that list manageable is to have the ACM file (asset_customization_manager.iff). It functions exactly like the index for a large book. It contains the filename for an object from the top of the art asset file chain (APT or SAT and for some ships or structures, POB) and then lists the files attached to that one all the way down to the bottom of the file chain which is the texture and palette (DDS, PAL).
The next thing to understand about ACM is how it is built, or rather how SOE used to build it. You need to have a set of files from the server and the entire client fully extracted before even starting the SOE build process.
From the server you need 4 tab files:
dsrc/sku.0/sys.shared/compiled/game/datatables/mount/logical_saddle_name_map.tab dsrc/sku.0/sys.shared/compiled/game/datatables/mount/saddle_appearance_map.tab dsrc/sku.0/sys.shared/compiled/game/customization/vehicle_appearances.tab dsrc/sku.0/sys.shared/compiled/game/customization/vehicle_customizations.tab
From the client you need everything, essentially. So you would extract the client using SIE.
Exception: as mentioned earlier things like player ships with interiors (e.g. YT-1300) have customizations but the top file in the file chain isn't APT or SAT which causes a problem for how SOE builds the ACM file. To get around that issue SOE added another file to the server side (dsrc/sku.0/sys.shared/compiled/game/customization/force_add_variable_usage.dat). Looking inside that file shows you a list of objects that would not normally get picked up by the ACM build process.
When all of those files are gathered, you would then run the ACM build script and after a while you will get a new version of asset_customization_maanger.iff which needs to be placed into /customization in your SWG client for it to take effect.
As you can tell, that process is a colossal pain in the rear end to setup and execute. In the SWG Source v2.2 VM you can git pull updates and last month (March 2020) we added a new way to build ACM files but it required some alterations to what files were typically available on the server. The lower end of the art asset file chains were never present on the server before as they are not needed there. The VM used a repository called clientdata to populate the parts of the art asset file chains that the server required. We have changed that in the VM so that it now pulls a serverdata repository which has a companion repository called mesh. When the VM is updated to use those repositories there is no longer a need for you to fully extract your client in SIE. As the server already contains the 4 tab files and 1 dat file in the dsrc folder, everything needed to build a new ACM file is now present on the server.
Use this command: ant build_acm
When that process completes you will have a new version of asset_customization_manager.iff located in dsrc/sku.0/sys.shared/compiled/game/customization/ and you need to copy that file over to your client and place it into the /customization folder (or within that folder in a custom tre file depending on how you set up your client).
Example: If you made a new armour piece your file chain would be SAT > LMG > MSH > DDS > PAL so you would have to place ALL of those files into both the server and client before running the ant build_acm command so that your new files get picked up and entered into the new ACM file produced.