Section 1
Overview & Key Concepts
What is binning?
The City of Heroes engine uses binary .bin files for faster loading. Binning converts human-readable text and config files into these optimized binaries. Both server data and client data must be binned.
What are PIGG files?
PIGG files are the production distribution format for client data. The client builds a virtual filesystem from loaded PIGG archives, especially from the configured patch directory (for example, <ClientRoot>\ouro\). Loose client bins can sometimes be loaded by the v2 client, but they are not the intended production release format.
Critical client release rule
- Treat
bin\data\bin\*.binandbinned\bin\*.binas intermediate build output. - Do not distribute loose client bins into
1. Client\data\bin\for production. - Do not distribute loose server bins into any client folder.
- Pack approved client bins and assets into PIGG files, then place those PIGGs in the configured client patch directory (e.g.
<ClientRoot>\ouro\). - Your launcher / web distribution folder should mirror the same client structure.
What are .texture files?
.texture files are DDS textures wrapped with a custom header. The header contains the relative path to the texture (for example, texture_library/GUI/Icons/powers/IconName.dds). This embedded path is critical — the game uses it to locate the texture.
Why path matters
- Wrong path:
Output/GUI/Icons/powers/icon.dds→ game cannot find texture → white icon. - Correct path:
texture_library/GUI/Icons/powers/icon.dds→ game finds texture → works.
Data vs localdata
bin/data/— base game data (original CoH content).bin/localdata/— server custom content (new powers, textures, maps).- The server merges
localdataover base data. - Most custom content (powersets, textures, maps) lives in
localdata.
Section 2
Important Tools & Locations
Bin server location
<BinServerRoot>\Key batch files (in bin server root)
1-delete-old-bins.bat Clears old binary files
2-rebuild-server-bins.bat Rebuilds server-side .bin files (mapserver_debug)
3-rebuild-client-bins.bat Rebuilds client-side .bin files (ouroboros_debug)
6-update-server-bins.bat Updates server bins without full rebuild
7-update-client-bins.bat Updates client bins without full rebuild
8-copy-product-catalog.bat Copies product_catalog.bin to server\bin\
9-copy-binned-files.bat Copies binned files from bin\data\ to binned\
10-build-patch-piggs.bat Optional manual fallback for packing patch PIGGsPIGG packing tools
Command-line packer:
- Location:
<BinServerRoot>\bin\tools\pig.exe - Existing Jenkins usage:
.\bin\tools\pig.exe cfvvz piggs\v2_serverbin.pigg binned\
.\bin\tools\pig.exe cfvvz piggs\v2_bin.pigg binned\Piglet GUI / source:
- Source/tool folder:
<PigletRoot>\ - Built GUI executable also exists in
bin\tools\Piglet.exe
Important
pig.exe/ Piglet are for packaging binned output into PIGG archives.- The numbered batch files stop at loose bins; they do not complete client release.
- City Hall is the recommended PIGG builder for controlled releases. It calls
bin\tools\pig.exedirectly and packages only approved narrow patch bins. - A local PIGG build batch file can stay available as a backup, but it is not part of the normal City Hall workflow.
- PIGG creation and promotion to the client patch directory are required release steps.
Texture conversion tools
City Icon (recommended)
- Location:
<CityIconRoot>\publish\CityIcon.exe - Supports PNG, JPG, TGA, DDS.
- Command line:
CityIcon.exe --convert --mode [login|icons|folder] --source "input" --output "output" - The output folder must be named
texture_libraryfor the correct embedded path. - Creates
.texturefiles with proper headers automatically.
GetTex (alternative)
- Location:
<BinServerRoot>\GetTex\GetTex.exe - Only processes TGA files.
- Has bugs requiring source code fixes (fopen modes, lock file paths).
- Embeds the output directory name into the texture header.
- Not recommended unless specifically required.
Manifest generation
Preferred: launcher / admin manifest panel (for example https://www.example.com/manifest).
- Scans
public\gameand calculates MD5 hashes / sizes for every distributed file. - Required after replacing PIGG files in the client mirror.
Legacy script: <ToolsRoot>\update_manifest.js — only updates selected loose-bin entries and is not sufficient for final releases.
Section 3
The Full Binning & PIGG Packaging Process
Pre-step: Merge content to data folder (critical)
Before binning, custom content must be merged into the correct binning server source folders using the Merge Tool. Loose files placed directly under bin\serverdata\Defs\ are not binned correctly and must be treated as a mistake.
- Merge Tool location:
<MergeToolRoot>\ - Purpose: merges new power definitions, textures, and other assets from 2. Deployment into the binning server data tree.
Why this is critical
bin\data\ and bin\localdata\. If content is not merged first, new powers and textures won't be binned — resulting in missing powers, white icons, or broken archetypes in-game.Power data destinations
.powers -> bin\serverdata\Defs\powers\
.powersets -> bin\serverdata\Defs\powers\
.categories -> bin\serverdata\Defs\powers\
.ms -> bin\serverdata\texts\English\Powers\.powers, .powersets, .categories, or .ms files loosely in bin\serverdata\Defs\. Remove any loose copies once the canonical copy is in place.Merge process
- Run the Merge Tool from the bin server root directory.
- Select source: 2. Deployment folder.
- Select destination: the correct binning server destination folder.
- Click Merge to combine all custom content into the data directory.
- Verify merged files appear in the canonical locations, especially
bin\serverdata\Defs\powers\andbin\serverdata\texts\English\Powers\.
- Always merge before running any binning steps.
- The merge tool may create backups of overwritten files.
- Check merge logs for any conflicts or errors.
- Some content may require manual merging if tool conflicts occur.
Step 1 — Delete old bins
Run 1-delete-old-bins.bat. Clears old binary files to prevent conflicts. Required before any rebuild.
Step 2 — Rebuild server bins
Run 2-rebuild-server-bins.bat
mapserver_debug.exe -createbins -verbose 2 -project ourodev- Generates server-side binaries (powers, classes, costumes, etc.).
- Takes ~5–10 minutes.
- Output:
bin\data\server\bin\
Step 3 — Rebuild client bins
Run 3-rebuild-client-bins.bat
ouroboros_debug.exe -console -createbins -verbose 2 -fullscreen 0 -project ourodev- Generates client-side binaries (geobins, texture bins, etc.).
- May take 10+ minutes (times out at 10 min if too slow).
- Output:
bin\data\bin\
Steps 4–5 — Update bins (optional)
If you only changed a few files and don't need a full rebuild:
6-update-server-bins.bat— update server bins.7-update-client-bins.bat— update client bins.
Step 6 — Copy product catalog
Run 8-copy-product-catalog.bat. Copies product_catalog.bin to server\bin\. Required step.
Step 7 — Copy binned files
Run 9-copy-binned-files.bat
- Copies binned client files from
bin\data\bin\tobinned\bin\. - Copies binned server files from
bin\data\server\bin\tobinned\server\bin\. - Cleans old binned files first.
- Produces candidate loose-bin output only — this is not final client release.
Step 8 — Build PIGG archives
- Canonical method: City Hall native PIGG builder.
- Fallback method: local/manual patch PIGG batch file.
- Uses
bin\tools\pig.exe
Purpose:
- Pack approved loose bins/assets into PIGG archives for production distribution.
- The client should receive PIGGs in the patch directory, not loose bins.
- City Hall must package narrow patch PIGGs only — do not wildcard-copy every generated .bin into a production patch PIGG.
Approved client patch PIGG bins (e.g. patch_bin.pigg):
bin\clientmessages-en.bin
bin\product_catalog.bin
bin\costume.binbin\powers.bin, bin\powersets.bin, bin\powercats.bin, or bin\VillainDef.bin. Power data is packaged in the serverbin patch PIGG, which is also deployed to the client patch directory.Approved serverbin patch PIGG bins (e.g. patch_serverbin.pigg):
server\bin\powers.bin
server\bin\powersets.bin
server\bin\powercats.bin
server\bin\VillainDef.bin
server\bin\product_catalog.bin
server\bin\messages-en.binForbidden in all patch PIGGs
sequencers.bin
ent_types.bin
behaviors.bin
behavioralias.bin
animlists.bin
fxinfo.bin
menuAnimations.bin
seqstatebits.binIf any forbidden bin appears in a staged folder or in a generated *.contents.txt listing, do not deploy the PIGGs.PIGG naming reference
Current Jenkinsfile output names:
piggs\v2_bin.pigg
piggs\v2_serverbin.piggExisting local output also includes piggs\v2_textures.pigg.
Example configurable stable patch names:
piggs\patch_bin.pigg
piggs\patch_serverbin.pigg
piggs\patch_textures.pigg
piggs\patch_login.piggTexture packaging rule
- The textures PIGG owns general custom textures and icons under
texture_library\, includingtexture_library\GUI\Icons\Powers\. - The login PIGG owns only:
texture_library\GUI\CREATION\HybridUI\LoginScreen\COH_LogInScreen_Background.texture - Do not put the same internal texture path in more than one patch PIGG.
Renaming rule
- Changing PIGG filenames is allowed only as a deliberate one-time migration.
- CityVault launchers do not reliably delete files that disappear from the manifest, so stale old PIGGs must be manually removed during a rename migration.
- Once stable patch names are adopted, replace the contents of the same filenames on every release instead of creating new names.
Step 9 — Promote client PIGGs
Copy approved client PIGGs to <ClientRoot>\ouro\:
patch_bin.pigg(or your configured client patch PIGG name).patch_serverbin.pigg(or your configured serverbin patch PIGG name).patch_textures.pigg(optional — when texture assets are packaged).patch_login.pigg(optional — when login-screen assets are packaged).
1. Client\data\bin\. Do not copy loose server bins to any client location.Step 10 — Promote server output
The server may run raw bins. Promote approved server bins to the live server data tree only:
<ServerRoot>\data\The serverbin PIGG is part of the client patchdir PIGG set and should be copied to <ClientRoot>\ouro with the other patch PIGGs. This does not mean loose server bins should be copied to the client — loose server bins remain server-only.
Step 11 — Mirror client and generate manifest
- Mirror the entire client folder to
<WebRoot>\public\game\. - Generate a new manifest from
https://www.example.com/manifest. - Test from launcher.
public\game folder should mirror <ClientRoot>, contain the ouro\ patch PIGGs, and should not contain loose data\bin or data\server\bin release payloads unless an explicit temporary diagnostic override is being tested.Section 4
Texture Conversion Guide
Converting power icons with City Icon
- Prepare source images (PNG or TGA, 32×32 or 64×64).
- Create an output directory literally named
texture_library(e.g.C:\Output\texture_library\). - Run City Icon:
CityIcon.exe --convert --mode icons --source "C:\InputIcons" --output "C:\Output\texture_library" - Output appears in
C:\Output\texture_library\GUI\Icons\powers\. - Verify the header (first 100 bytes should show
texture_library/GUI/Icons/powers/).
Converting login screen with City Icon
- Prepare source image (PNG, recommended 1920×1080).
- Create an output directory literally named
texture_library. - Run City Icon:
CityIcon.exe --convert --mode login --source "C:\Input\loginscreen.png" --output "C:\Output\texture_library" - Output:
C:\Output\texture_library\GUI\CREATION\HybridUI\LoginScreen\COH_LogInScreen_Background.texture - Verify the header shows
texture_library/GUI/CREATION/HybridUI/LoginScreen/...
Critical rule
texture_library exactly. If named anything else, the embedded path will be wrong.CORRECT: --output "C:\temp\texture_library" -> Path: texture_library/GUI/...
WRONG: --output "C:\temp\output" -> Path: output/GUI/...Section 5
Manifest Update Process
Why update the manifest?
The launcher downloads game files based on manifest.xml. If file sizes or MD5 hashes don't match, the launcher will either redownload files unnecessarily or skip files that actually need updating.
Manual update steps
- Open
<WebRoot>\public\manifest.xml - Find the file entry to update:
<file name="data/texture_library/GUI/Icons/Powers/Filename.texture" size="OLD_SIZE" md5="OLD_MD5"> - Calculate the new MD5:
(Get-FileHash "filepath" -Algorithm MD5).Hash - Get the new file size:
(Get-Item "filepath").Length - Update the entry:
<file name="data/texture_library/GUI/Icons/Powers/Filename.texture" size="NEW_SIZE" md5="NEW_MD5"> - Update the version tag:
<version>YYYYMMDDTHHMMSS</version> - Save the manifest.
Automated update (update_manifest.js)
node update_manifest.js- Automatically updates
powers.binandVillainDef.binhashes. - Updates version timestamp.
- Located at
<ToolsRoot>\update_manifest.js
powers.bin and VillainDef.bin. It does not understand the PIGG-first release process and must not be relied on for final production releases.Section 6
Deployment Checklist
After binning, deploy to all locations
Do not deploy
- Do not place loose client bins in
<ClientRoot>\data\bin\for production. - Do not place server bins in
<ClientRoot>\data\server\bin\. - Do not place server bins anywhere under the launcher
public\gamefolder. - Do not leave stale old PIGG names in
public\gameafter a rename migration.
Verify deployment
Section 7
Common Issues & Solutions
Section 8
Confirmed City Hall + City Icon Full Binning Guide
This is the recommended direct path for a full release using City Hall and City Icon. It is based on the confirmed stable process:
- Source content is checked before deployment.
- Textures are converted with correct texture_library headers.
- Content is merged, not blindly overwritten.
- Official full binning batch files are used.
- Generated bins are treated as candidate output.
- Only approved narrow bins/assets are packed into patch PIGGs.
- Volatile bins are blocked from client patch PIGGs.
- Client distribution is PIGG-first.
Required tools
- City Hall — validation, controlled merges, official full binning, protected-bin comparison, PIGG packaging, and promotion.
- City Icon — converting PNG / JPG / TGA / DDS source images into
.texturefiles with correct embeddedtexture_librarypaths. - Merge Tool — used by City Hall (or manually when troubleshooting) to merge data into the binning server source tree.
- Binning server tools —
mapserver_debug.exe,ouroboros_debug.exe,pig.exe, and the official numbered batch files.
Folder expectations
<StagingRoot>— unfinished or newly received content. Fix issues here first.<DeploymentRoot>— clean content ready to merge into the binning server.<SourceFilesRoot>— canonical archive of content that has successfully binned and tested.<BinServerRoot>— i2401 binning server root containingbin\,binned\,piggs\, and the official batch files.<ClientRoot>— full client folder that will be mirrored to the launcher public game folder. Patch PIGGs normally live under<ClientRoot>\ouro\.<ServerRoot>— the live server root. Approved raw server bins are promoted to<ServerRoot>\data\.<WebRoot>\public\game— launcher distribution mirror. Mirrors<ClientRoot>; never receives loose server bins.
Step 1 — Prepare content in staging
- Place new powersets, defs, message stores, textures, PFX, sequencers, or other content into
<StagingRoot>. - Do not put loose files directly into the binning server source folders.
- Check for obvious issues before moving forward:
- Missing .ms display strings.
- Raw P-number labels showing in source.
- Missing referenced PFX files.
- Missing referenced entity or pet definitions.
- Incorrect icon names or paths.
- Files placed at the wrong folder depth.
- New files that should be merged into existing canonical files.
Step 2 — Convert textures with City Icon
Use City Icon before binning whenever content includes icons, login screens, or other custom textures.
Power icons
- Open City Icon.
- Choose Power Icons mode.
- Select one or more images, or a folder of images.
- Set output to a folder literally named
texture_library. - Convert.
- Expected output:
texture_library\GUI\Icons\powers\*.texture
Login screen
- Open City Icon.
- Choose Login Screen mode.
- Select the source login image.
- Set output to a folder literally named
texture_library. - Convert.
- Expected output:
texture_library\GUI\CREATION\HybridUI\LoginScreen\COH_LogInScreen_Background.texture
Folder conversion
- Use Folder mode when converting an existing
texture_librarytree. - City Icon should preserve the relative folder structure under
texture_library.
Critical texture rule
texture_library. If named output, temp, converted, or anything else, the embedded texture path will be wrong — the game can report a misnamed texture or show white icons.Step 3 — Move clean content to deployment
- After staging content is corrected, move or merge it into
<DeploymentRoot>. - Keep Deployment clean — it should contain only content intended for the next binning run.
- If content belongs to an existing canonical data file, merge it into the relevant canonical file rather than keeping duplicate competing files.
- Place converted
texture_libraryoutput into Deployment so City Hall can stage it for texture PIGG packaging.
Step 4 — Open City Hall and check settings
<BinServerRoot>points to the binning server root.<StagingRoot>points to the staging folder.<DeploymentRoot>points to the deployment folder.<SourceFilesRoot>points to the canonical source/archive folder.<ClientRoot>points to the client folder.<ServerRoot>points to the live server folder.<WebRoot>\public\gameis the launcher distribution target, if configured.- Known-good baseline output is configured.
- Protected bins are enabled.
- PIGG names are set to your stable patch names.
Recommended protected-bin rule
Step 5 — Run City Hall validation
- Validate Staging.
- Fix any reported issue before continuing.
- Run the Staging → Deployment merge dry-run.
- If the dry-run is clean, run the real Staging → Deployment merge.
- Validate Deployment.
- Fix any reported issue before continuing.
Step 6 — Merge deployment into bin server source
Important canonical destinations:
.powers -> <BinServerRoot>\bin\serverdata\Defs\powers\
.powersets -> <BinServerRoot>\bin\serverdata\Defs\powers\
.categories -> <BinServerRoot>\bin\serverdata\Defs\powers\
.ms -> <BinServerRoot>\bin\serverdata\texts\English\Powers\
texture_lib -> <BinServerRoot>\bin\localdata\texture_library\.powers, .powersets, .categories, or .ms files loosely under <BinServerRoot>\bin\serverdata\Defs\. Loose files in the wrong source folder may not be binned correctly.Step 7 — Run the official full binning chain
1-delete-old-bins.bat2-rebuild-server-bins.bat3-rebuild-client-bins.bat8-copy-product-catalog.bat9-copy-binned-files.bat
Step 8 — Compare generated bins against baseline
Expected bins may include:
powers.bin
powersets.bin
powercats.bin
VillainDef.bin
product_catalog.bin
messages-en.bin
clientmessages-en.bin
costume.binProtected bins must be reviewed carefully and blocked by default:
sequencers.bin
ent_types.bin
behaviors.bin
behavioralias.bin
animlists.bin
fxinfo.bin
menuAnimations.bin
seqstatebits.binStep 9 — Build patch PIGGs with City Hall
City Hall should call <BinServerRoot>\bin\tools\pig.exe and stage and build only approved patch contents:
- Client patch PIGG — approved narrow client bins only. Must not include volatile protected bins.
- Serverbin patch PIGG — approved power/server data bins needed by the client patchdir. Loose server bins must not be copied into client data folders.
- Texture patch PIGG — approved
texture_librarycontent, including custom icons. Build only when texture assets exist. - Login patch PIGG — only the login background texture. Build only when login assets exist.
Step 10 — Promote approved output
Client
- Copy approved patch PIGGs into
<ClientRoot>\ouro\. - Do not copy loose client bins into
<ClientRoot>\data\bin\. - Do not copy loose server bins anywhere under
<ClientRoot>.
Server
- Promote approved raw server bins to
<ServerRoot>\data\. - Keep server-only raw bins server-side.
Launcher / public game folder
- Mirror
<ClientRoot>to<WebRoot>\public\game\. - Do not union old files with new files if that leaves stale content behind.
- The public game folder should represent the current client package exactly.
Step 11 — Generate the manifest
- Generate a fresh manifest from the launcher/admin manifest panel.
- Confirm the manifest contains the new or replaced patch PIGGs.
- Confirm file sizes and hashes match the actual files.
- Do not rely on old loose-bin manifest update scripts for PIGG-first releases.
Step 12 — Smoke test before announcing release
- Launcher downloads the expected patch files.
- Client starts without texture misnamed errors.
- Character creator opens.
- Relevant archetypes/powersets appear.
- New icons render correctly.
- New login screen or custom textures render correctly, if changed.
- A character can load into a map.
- Any new powers can be selected and activated.
- No protected-bin related crashes appear.
If testing fails
