Jump to content
Hardik Arekar

How to add new button image for new unit

Recommended Posts

At the CommandButton section, look for the word ButtonImage and change the button name. Make sure the new button name refers to an existing image in your game directory (eg. you want a button to look like a humvee thumbnail just change to ButtonImage = SAHummer). You can also put new images.

Share this post

Link to post

Stumbled upon this very old post because I had the exact same question. First some information for Google searches:

1) There's a procimity operator that other search engines call "NEAR" operator. Google calls it "AROUND" and it works term#1 AROUND(number of words) term#2, like: "Generals" AROUND(4) "Cameo".

2) "term" stops Google from suggesting and manipulating a term. Not always but most of the time.

3) unwanted websites and terms can be excluded by puttin a minus and then naming them, like -garbagewebsite -unrelatedterm

4) Google supports the OR and AND term but much like the AROUND term those only work when written in capital letters

5) I've read but not tested that [term#1 term#2] seems to help Google sorting things. What's the difference to term#1 OR term#2 I cannot tell


Onwards to the issue:

Source#1: http://www.moddb.com/mods/command-conquer-generals-version-20/tutorials/the-long-awaited-tutorial-how-to-add-cameos-to-generals


Tools you'll need:

FinalBIG for opening the files with the data and edit them (make backups before editing anything !)

An image manipulation program able to save in .tga format.

A text editor (Notepad++).


You're expecting single images but Generals uses big image files with various button images ("cameos") from which it draws the single button images by using x, y coordinates, like:

Coords = Left:373 Top:301 Right:433 Bottom:349


The files with the images are typically named *interface*.tga (* = something in front or after the interface term, might be written together).

Use FinalBIG to locate such files, found in the Art\Textures\ folder. Look for something named *interface*.tga.


The .ini files which define what images coordinates define a button are located at:



An entry looks like this:

MappedImage SURadarVan
Texture = CTRSUUserInterface512_003.tga
TextureWidth = 512
TextureHeight = 512
Coords = Left:435 Top:395 Right:495 Bottom:443
Status = NONE


There you have it all: Button name, the texture file it refers to, it's total width and height and the dimensions that form the button.


Button sizes:

1. Small: 62x50 pixels

2. Large: 122x98 (Edit: Got 120x96 from what I got, can't test right now - see your files)

The final image on which all those images are placed needs 512x512 as size.


Now you may just have added an image but nothing in the game uses it. 3 more changes to make it into the game:

1) Data\ini\CommandButton.ini needs a button that refers to your image's name with it's dimensions drawn from the .tga file.

2) A Data\ini\CommandSet.ini needs a CommandSet added or modified that makes use of that newly added command button. CommandSets are you unit's control buttons, like "Stop", "Guard", "Clear Mines", "Build Worker/Dozer" etc.

3) You need a unit that uses this CommandSet. Let's say I'd want to have Nuke General's Dozer have that new CommandSet. In this case I'll open the Data\ini\Object\NukeGeneral.ini, seach for "Dozer" and then for "CommandSet". I'll then replace it's current CommandSet (CommandSet = CurrentCommandSet) with my custom CommandSet.


And with that it should be done.


In short:

1) add a 512x512 .tga file

2) use Data\ini\MappedImages\*.ini to create name and dimensions of your button

3) Add that button into the game by having anything that uses this button by editing the Data\ini\CommandButton.ini

4) Create or modify a unit CommandSet that uses an ability / build order / research / whatever that uses this button

5) This can be skipped if you didn't add but instead just edit this unit's CommandSet: Find the unit you want to see using this button and edit it's CommandSet to use your's instead




Source#2: http://www.moddb.com/mods/command-conquer-generals-version-20/tutorials/how-to-make-cameos

In case it's down: Recommends a tool I haven't used or tested, called "SHP Builder".


I'm sorry I wrote this somewhat sloppy as I'm in a hurry.

Also I know this is a necro but as you can see at me digging this: It's relevant when it's relevant (and finally it has been answered - high five !). So don't ****ing delete this or anything. The internet will connect it for the people searching.


Finally some tags that may help Google find this:


Zero Hour









Edited by UsernameUsername

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.