Assassin’s Creed IV Black Flag Guide

AC Modding NEW EDITION for Assassin's Creed IV Black Flag

AC Modding NEW EDITION

Overview

How to create mods for Assassin’s Creed games!

WARNING

To follow this guide you must have a basic understanding of hexadecimal notation[www.mathsisfun.com] as well as navigating and using a hex editor.[www.sweetscape.com]

This guide was written for AC4, and I can confirm the same method applies to AC3 and Rogue.
The tools also support Unity, Syndicate, Origins, and Odyssey, but I have not tested those games.

THE FOLLOWING INFO IS PROVIDED AS-IS.
I CANNOT TAKE ANY REQUESTS OR ANSWER ANY QUESTIONS.

Introduction

When I created the very first Assassin’s Creed mod back in 2016, it was done by brute force guess and check, there were absolutely no tools whatsoever. That all changed in 2019 when a person by the name of Delutto on the Zenhax forums created several tools that can export and then reimport the game files! With these new tools we can now create fully-fledged mods for Assassin’s Creed, something that has been impossible for any AC game past the second one!

There are some limitations however.

WE CAN:

  • Edit player and NPC outfits
  • Edit ships
  • Change AI behavior

WE CANNOT:

  • Add anything new
  • Edit maps
  • Edit sounds
  • Edit missions

This guide is dedicated to fellow former modder JediJosh, who first introduced me to the new tools and kickstarted this whole process.

Setup

To get started, download Delutto’s two tools:

[link]
[link]
(if the links ever go down, tell me and I’ll get different ones)

Both programs have a simple and user-friendly GUI, but there’s also a readme.txt in each file with more information if needed.

Each main section of this guide contains a <name>.forge. The first thing you should do is use the Forge tool to extract the named .forge file, found in the root folder of your AC game installation, whether Steam or Uplay. Then use the Data tool to extract any .data files mentioned.

I highly recommend you create a brand new folder to extract the forge files to, as there could potentially be THOUSANDS of files. The data tool creates a subfolder automatically.

IMPORTANT: How the Game Files Work
The game’s binary data use a References system. Each file in the game’s data has a 4-byte header, and that header can then be included in other places to reference that whole file just by it’s header.

Commonly, instead of swapping out entire data files we will only be swapping out these small bits of data so that they point somewhere else, or nowhere at all.

CRASHING

The first few times you attempt any of this, the game WILL crash.

Hex editing requires absolute precision, if you make even one tiny mistake, if even 1 byte is out of place or missing, the whole thing goes down in flames. Persistence is key, expect to spend quite a few hours working on this.

Also when swapping assets, the game might crash because the asset is not loaded.

There is no point where all the game files are loaded at once. Especially ships and characters, they are loaded in some areas of the game, and unloaded in others.

If you try to point to an asset that is not loaded, it will simply be invisible. Or more likely, the game will crash right after the loading screen finishes. Try uninstalling the mod, moving your character to a new area (major area that requires a loading screen, like a city), then try again.

Player and NPC Outfits

DataPC_extra_chr.forge

Find and extract the .data files of the character you want to modify, and the character you want to change them into. For example first I’ll be replacing the Spanish Soldier with a Pirate Sailor.

After you extract the character’s .data file, the first thing to note is the file that starts with “0-“, for example “0-CHR_G_Spanish_Soldier.-1759869906”.

This is the main file for that character, it contains all their core information. Inside that file are references to other files that then further describe the character. We want to replace their model, so look for a file called VisualMaster. This file describes everything about a character’s appearance ingame.

Upon opening it in your hex editor, look for the first 4 bytes after the first 01, that is the ID of that specific VisualMaster file. For example the ID of “CHR_G_Spanish_Soldier_Visual_Master” is CE3DA84A.

Next do the same for the character you want. In this case the ID of “CHR_G_Pirate_Sailor_Visual_Master” is E33DA84A.

Now in your original character’s main file, search for their original VisualMaster ID. Once you’ve found it, replace their original VisualMaster ID with the VisualMaster ID of your new character.

Save the file, then repack the .data file and then the .forge (don’t forget to remove the .new from the .data before repacking the forge). Then remove the .new from the .forge, and paste it into your AC directory, overwriting the original. If you did everything correctly (and you open the game in an area where the new character is actually loaded) the whole character model should be swapped out!

If not, then simply keep trying. If you keep doing it over and over and it still crashes, it simply just might not be possible. Not all characters can be replaced sadly.

For Player outfits, the process is slightly different. Swapping entire VisualMasters does not work, so instead you have to go a level deeper, and swap the IDs inside of the VisualMaster.

For example Inside CHR_P_EdwardKenway_Default.data’s CHR_P_EdwardKenway_Default_VisualMaster, there is 4FB6CA17, which is the ID of CHR_P_EdwardKenway_Default_Body.

If I swap it out with the ID of CHR_U_Adewale_Body:

If that doesn’t work, you can go a level even further, and swap out the IDs of individual models inside of the head/body build_tables.

Note that Edward’s default outfit is the very first thing that is loaded ingame, so he might be invisible on the loading screen. Once you spawn, switching back and forth between outfits should cause the new assets to show up.

Trust me, with enough fiddling around in the build_tables you can transform your entire player quite extensively:

Player Ship

DataPC.forge -> 51-Game Bootstrap Settings.data

Open the file 107-PlayerProgressionManager_ACGA.-1760321185 and look for the ID D1BABCBD03. This is the ID for the player’s main ship.

You can change it to one of the following:

D1BABCBD03 – Jackdaw 25BC386507 – Jacobite (Pirate Brig) C29D8A2B04 – Queen Anne’s Revenge (Blackbeard’s ship) B9582F9F06 – Revenge (Stede Bonnet’s schooner) 4DB244020D – Revenge NoFX (no visible difference) D4DC82DC07 – El Dorado (Spanish Brig) 958014B806 – Nosso Senhor (Portuguese Man O War) 57C3277E08 – Jackdaw E3 (no visible difference)

And just like that you have a new ship!
And yes, these are your ONLY options. NPC ships simply do not work. However if you’re saavy enough, you can “dress up” the player ships to look like NPC ships. Ships don’t have a VisualMaster, but they do have build_tables with various parts that you can swap out the IDs of.

Now, I bet you saw “Man O War” and immediately got excited. Trust me, I did too.
While it does load and spawn successfully, you can sail it around, there is a crucial flaw with it: the game crashes any time you try to shoot the cannons.

After a LOT of time and research, I figured out a solution.
Start by unpacking SHP_BRG_Jackdaw and SHP_MOW_Nosso from DataPC_extra_chr.forge,
then inside those .data files open up
SHP_BRG_Jackdaw_Group.entity_group and SHP_MOW_Nosso_BaseEntity_Group.entity_group.

Then in SHP_BRG_Jackdaw_Group, select the entire block of data between offsets 0x50 and 0x0110, and copy paste it over the same block of data in SHP_MOW_Nosso_BaseEntity_Group.

That will fix the crash, and also enable you to board ships!

Another handy trick I discovered is to go to offset 0xAB2A in SHP_BRG_Jackdaw_Group, copy the FFFFFFFF and everything past it to the end of the file, then go to 0x96C5 in SHP_MOW_Nosso_BaseEntity_Group, and replace the FFFFFFFF and everything past it with the giant block of data that you just copied.

This will enable Travel Speed, and let you bask in the glory of your new leviathan from afar!

Editing the AI

DataPC.forge -> 51-Game Bootstrap Settings.data

As well as just making cosmetic enemy reskins, it is also possible to change the way that enemies think, move, talk, and fight.

Each enemy and ally has their own tag_rules file. These files are basically just a giant list of references to other tag_rules files that describe the character behavior.

The key is to look for this identifier: 8E6932B3.
The very first occurrence of this data, the next 4 bytes are the Header ID of that current file.
The 4 bytes immediately after all the other occurrences are the references to other tag_rules files.

The 5th byte after the first occurrence, is the hexadecimal count of how many other tag_rules that file references. For example in the picture the count is 4D, which means the reference list contains 77 items. This one byte is EXTREMELY important, if that number is not correct the game won’t even start.

The basic workflow is this: find the tag_rules of the character you want to modify, then look in the following table for their properties, then swap out that reference with the one you want.

CHARACTER ARCHETYPES 1FC2A2DD – Soldier 56C45E7E – Brute 03EE3B9A – Gunner 66DB1EC9 – Agile E126C868 – Captain 7708138A – Assassin CHARACTER FACTIONS DE49C05D – Unused? Copy of Civilian? 90C919C8 – Civilian (WARNING – causes killing desync penalty!) C8179869 – Friendly 5B0082C4 – British 8D5F5E09 – Pirate 55C80B78 – Native Guardians 28EEA9EC – Spanish 499AF2C9 – American D6610F97 – Portuguese 0868E788 – Unknown Enemy Faction COMMON ARCHETYPE MODIFICATIONS Ability YES NO Blocks Attacks 83CCDD6D E87514EA Throws Grenades 452A669E FAFB83E8 Defense Cannot Break 9B7999B8 CA89E0CE Cannot be Combo Killed C93E70CD 0847044D Resists Counter-Disarm E401F2BB 48FA7A13 Resists Counter-Hurt 6F4E4D81 29BF6419 Resists Counter-Kill B9B58E1D EDC099D3 Resists Counter-Throw EEAF6E17 63B02D33 Resists Counter-Tool B511BE36 575E6757 SHIP FACTIONS 4E4C84FC – Enemy Pirate 02DF8762 – Spanish 491532E1 – British 6FCBBC14 – Portuguese F92EC743 – Civilian 50993966 – Pirate Hunter 2E8B9019 – Ally Pirate

For example, if I wanted to make Duncan Walpole into a Gunner that blocks your attacks, I would open AI-RulesProfile-Specific-DuncanWalpole – TagRule.tag_rules, find which character archetype he uses, replace it with 03EE3B9A to make him a gunner, then open AI-Archetype-Gunner – TagRule_XLH.tag_rules, find E87514EA and replace it with 83CCDD6D to make him block.

Or, if I wanted to make Pirates friendly, I would open up each one of the AI-RulesProfile-Guard-Pirate files and replace the enemy Pirate faction 8D5F5E09 with the Friendly faction C8179869.

As a final note, I’d like to share a whole bunch of decoded various tag_rules files.[drive.google.com]
You can see that in additional to other tag_rules, references can point to AI build_tables as well, which are mostly found in DataPC_extra_chr.forge -> DataAI_Human.data.

By manipulating the references to the DataAI_DI-FightDataItem-Options files, you can drastically change how enemies behave in combat:

Misc. Tips

  • When swapping IDs, always check the entire file. Some IDs are present in multiple places in one file, make sure you replace all of them.
  • Some IDs are actually 5 bytes long instead of 4. Always double check that the 5th byte matches, or the game will crash.
  • To completely remove something from a build_table, for example a character body part, set the ID to FFFFFFFF, the hex value of -1. This will make the game just ignore that reference.
SteamSolo.com