Here’s a mod I created that makes Berber Bombard Cannons 4 times larger than regular Bombard Cannons:
Because I wanted this custom unit to be unique only to the Berbers, I created new SMX files and units. To do this, I used the following software:
- Advanced Genie Editor (comes with AoE2:DE)
- SLX Studio
Part 1: SLX Studio
The Bombard Cannon and its projectile have 14 SMX graphics files that make up their animations. They are:
- p_ball_shadow_x1 and p_ball_shadow_x2
- p_ball_x1 and p_ball_x2
- u_sie_bombard_cannon_attackA_x1 and u_sie_bombard_cannon_attackA_x2
- u_sie_bombard_cannon_deathA_x1 and u_sie_bombard_cannon_deathA_x2
- u_sie_bombard_cannon_decayA_x1 and u_sie_bombard_cannon_decayA_x2
- u_sie_bombard_cannon_idleA_x1 and u_sie_bombard_cannon_idleA_x2
- u_sie_bombard_cannon_walkA_x1 and u_sie_bombard_cannon_walkA_x2
The X1 and X2 suffixes refer to regular graphics and UHD graphics respectively.
Copy these 14 SMX files from resources\_common\drs\graphics
to your work folder. Open SLX Studio, go to Graphics → Batch Extract SMX to SLX. Using the dialog box that appears, browse to the work folder where these 14 SMX files are located. From these SMX files, SLX Studio will create 14 subfolders, each of them containing an SLX file and bitmaps of the SMX’s animation frames.
Open the SLX file with SLX Studio. This will load all the animation frames into the software. To resize all the images, go to Tools → Resize Graphic Scale. Type “400” in the Resize Scale box and then clicked the “Apply To All” button. After that, go to Graphics → Batch Convert to SMX or SMP → SMX Format (Compressed) and select the folder where you want to save your SMX file. If your SMX has a lot of images this conversion might take a while; I think it took about an hour to convert the 14 SLX files. Once you save your SMX file, rename the SMX file to whatever. Here’s how I named the SMX files for the Big Bombard Cannon:
Alternatively, you can use an image viewer such as IrfanView to batch resize the frames. For some weird reason, using an external program to resize the frames reduces SMX file sizes. After resizing your BMPs, overwrite the original BMPs with the new BMPs. Now reopen SLX Studio
Because the frames were resized outside of SLX Studio, you will need to correct the anchor points i.e. the point where the selection ring is anchored to. To do that, go to Edit → Modify Selected Anchor by Amount. In the Modify Anchors window, switch operators to the multiplication symbol and set By Amounts to 4 for both X and Y. Finally, click Apply To All to apply new anchor points.
In addition to SMX files, some units also use particle effects. Particle effects are .json files located inside resources\_common\particles
. For the Bombard Cannon, the particle effects it uses are the following:
- impact_dust
- Impact_water
- smoke_hit
- smoke_trail
Copy and rename these 4 .json files (for my mod, I just added “_big_bombard” to the the names). Inside each particle file, multiply the scale value by 4.
Now that you’ve resized your graphics, move all of your modified SMX and .json files into your mod folder. The SMX files will go inside resources\_common\drs\graphics
while the particle files will go inside resources\_common\particles
.
Now let’s get the graphics into the game with the Advanced Genie Editor.
Part 2: Graphics and Terrain Table
After copying empires2_x2_p1.dat to your mod folder, open that file with AGE and go the Graphics tab. For the Bombard Cannon unit, its graphics entries in the Advanced Genie Editor are:
- BombardCannon (Attack) (654)
- BombardCannon (Death) (657)
- BombardCannon (Idle) (660)
- BombardCannon (Decay) (661)
- BombardCannon (Walk) (664).
- Projectile Ball (3382)
- Projectile Ball (Shadow) (3383)
- Smoke Trail (1711)
- Impact Building (1744)
- Impact Ground (4203)
- Impact Water Large (5507)
For these 11 graphics entries, copy and paste them as new graphics entries and rename them (for my mod, I just added the word “Big” to the name). For the BombardCannon and Projectile Ball entries, change the SLP names to match the modded SMX file. For example, for BigBombardCannon (Attack), you would change the name from u_sie_bombard_cannon_attackA_x1 to u_big_sie_bombard_cannon_attackA_x1. The game will automatically handle the X2 stuff.
The Smoke Trail and Impact entries use particle effects instead of SMX files. For these entries, you need to change Particle Effect Name as opposed to SLP Name.
The Definitive Edition does not use DRS files, so the SLP number does not matter.
We now need the terrain impact graphics (Impact Ground Big Bombard, Impact Water Big Bombard) to appear when the Big Bombard Cannon’s projectile hits the ground/water. To do that, go to the Terrain Tables table, copy table 12 (All -bridge, ground impact) and paste it as a new table. Now, you will need to go through each terrain and change the Enter Tile Graphic entry to either Impact Ground Big Bombard or Impact Water Big Bombard. This will be a tedious process, but the copy and paste buttons can speed things up. Note that this new table will just be named “Table” and that you’ll be unable to rename this table. You don’t need to worry about that.
Part 3: Units
With graphics and terrain tables entries set, we can now switch to the Units tab.
First, make sure the “Including graphics” option is checked. Then, copy the Bombard Cannon (36), Projectile Bombard Cannon (368), BCANN_D (16) and Trail Smoke (247) unit entries and paste them into new unit entries (I pasted those four entries at 1786, 1787, 1788, 1789 respectively). To make tracking units easier, change the Language File Name for the units to an unused name such as 0 or 7000 and give them a custom name. For my mod, I renamed 1786, 1787, 1788 and 1789 to BIG BOMBARD CANNON, Projectile Big Ball, Big BCANN_D and Trail Smoke Big respectively. Make the Big Bombard trainable at the Siege Workshop by setting Train Location to Siege Workshop (49) and Train Button to 4 and edit its stats while you’re at it.
Now let’s link the units to the graphics entry. For BIG BOMBARD CANNON, change Standing Graphics to BigBombardCannon (Idle), Dying and Undead Graphics to BigBombardCannon (Death), Walking and Running Graphics to BigBombardCannon (Walk), Attack Graphic to BigBombardCannon (Attack), Projectile Unit to Projectile Big Ball and Dead Unit to Big BCANN_D.
For Projectile Big Ball, change Standing Graphics + Walking and Running Graphics to Projectile Big Ball, Dying and Undead Graphics to Impact Big Bombard, Terrain Table to 32 and Trailing Unit to Trail Smoke Big. For Big BCANN_D, change Standing Graphics to BigBombardCannon (Decay). For Trail Smoke Big, change Standing Graphics + Dying and Undead Graphics to Smoke Trail Big Bombard. Here’s a table summarizing what I’ve said:
Finally, let’s make the Big Bombard Cannon available to the Berbers. To do that, create an effect command that upgrades Bombard Cannons to the Big Bombard Cannon (Upgrade Unit is command type 3). Then create a Tech that sets the effect to that Big Bombard effect you just created and the civilization to Berbers. From here, your Big Bombard Cannon mod will now be available in game. Unlike UI mods, graphics mods can be combined with a data mod.
If the unit’s custom graphics aren’t showing up, go back to the unit entry, uncheck Automatically, click the Copy button next to Including graphics and recheck the Automatically button. Special thanks to PsychoticSock on the SLX Studio Discord for pointing out this graphics fix.