Jump to content
Sign in to follow this  
Koen

[Generals/Zero Hour] Adding a unit guide

Recommended Posts

GUIDE: How to successfully add a unit

by Thierry

Last updated Feb 6th, 2005 for changed way of cloning

 

Adding a unit is actually pretty simple, if you have done it once. For those who haven’t, here is a guide. This guide tells you how to clone an existing unit using TibEd. Making an unit from scratch is not covered in this guide.

 

 

Cloning the actual unit

 

First of all, go to the unit you want to clone. Now, go to the parent of this unit in the tree. That is, in the tree you see on the left in the screenshot below, select the parent of the unit you want to clone. Then select your object in the list that appears on the right and select the “Clone” button.

Here is a screenshot of where you can find the clone button (if we were to clone an upgrade, this screenshot is from another example and a bit off-topic):

tib2beta3_cloning.png

 

We will use the Original Crusader Tank (which is known under the object name of AmericaTankCrusader). It’s clone will be called: CloneOfUSACrusaderTank. So, enter this name into the “Cloning object” dialog, as this will be it’s new name.

After pressing OK, you have a copy of the Crusader. The copy is an exact replica of the original so you can change it in anyway you like (strength, speed, weapon, health, etc).

MAKE SURE that you have the Prerequisites right!! Its what the unit needs before you can build it! If you make a copy of an American Paladin for the Chinese, but it requires an USA Tech Center, then you won’t be able to build it with the Chinese!

 

Now comes the slightly more difficult part: to make a Command Button for your cloned unit. A command button is the button you use to select the Crusader at the war factory. To get your new unit to show up as well, you’ll have to clone it’s commandbutton too.

 

 

Making the commandbutton

 

First you’ll have to select and copy the NAME of the new unit. See the following picture:

image003.png

Be sure to remember this name, as we'll need it later.

Then you’ll have to go the Command Button that the Original Crusader uses. You can find this in the tree on the left side under "CommandButtons" and then Command_ConstructAmericaTankCrusader. It's contents are shown in the following picture:

image005.png

Now, do the same here as you had to do for cloning the unit: right-click on the item in the tree on the left, and select "Clone commandbutton".

Give this new commandbutton a name, and open it up in an editwindow.

Now, change the Object property for this commandbutton (this controls which unit the button builds):

image007.png

So, change it to CloneOfAmericaTankCrusader.

 

Now you have a Command Button that will build your unit when selected. But… the Command Button itself will also have to be used somewhere. Because what good is a button if you can't use it?

 

 

Using your CommandButton: CommandSets

 

In order to put your new button to good use, you will have to add it to a Command Set. A commandset is something which every factory and building in the game has, and it controls which buttons you see at the bottom of your screen when you select it.

In order to add your CommandButton to a CommandSet, you'll have to select a CommandSet first. In this case, we want to add it to the USA War Factory Command Set, because we want our new unit to be a USA tank.

Make sure that your unit is added to the corresponding structure! A tank coming out of a barracks is bad!

 

In the edit tree, go to "CommandSets" and then select AmericaWarFactoryCommandSet, which, as it's name implies, is the command set for the American War Factory. You should see the following:

image009.png

 

As you can see there are quite a few buttons here which have "Command_Construct" in it. They are the buttons for the Vehicles/Tanks that the USA war Factory builds. The bottom two are for Selling the building and setting a Rally Point.

To add your Command Button into the Command Set you’ll have to select and copy the name of the Command Button in the same way you did with the unit and paste it in one of the empty boxes. The commandbutton's name:

image011.png

Now, we didn't say which name you had to enter for your commandbutton, so yours does not have to match the one in the image above.

 

Select it and paste it in the Command Set:

image013.png

 

CONGRATULATIONS!! You’ve just added a unit successfully and it is usable. Make sure that you get the prerequisites for your unit right!

 

 

Giving your unit a unique name

 

If you want to change the way that the unit is named and all, you will have to change the TextLabel and DescriptionLabel properties. For example: In the TextLabel it says: CONTROLBAR:NewTank.

Now, when looking for the name of a unit, the game will look inside Strings (found in the edittree), and then inside CONTROLBAR (which is inside Strings in the edittree) and then for something named NewTank. It works the same for the Description Label. By changing them, you can change the names of units. But wait - that will change the names of *both* units, the original and the cloned ones, right?

Indeed, this is true. So, for your new unit you will have to add a new string. We'll leave it to you to find out how to add a new string using TibEd (hint: it has something to do with right-clicking ;)) and then putting the name of your new string in the textbox for TextLabel or DescriptionLabel, in the same style as the other strings.

To change the name shown in the tooltip when you put the mouse over the unit in the game, you will have to change the OBJECT name:

image015.png

The OBJECT name is found in the DisplayName property and works just like other strings.

 

If you want to change the picture/cameo/icon that the unit uses change this:

image017.png

 

The SelectPortrait is the big picture you see when you have selected the unit, the ButtonImage is the smaller image you see when you are building the unit in the queue line.

The CommandButton also uses an icon, that is the one you see in the War Factory set. The property there is called "ButtonImage". Change it in the same way as the two above.

 

Further modding uses the same techniques, and the guide above can be applied to buildings and infantry as well.

 

Happy modding!

 

Thierry & Koen

  • Like 1

Share this post


Link to post

Its all very good telling us the obvious stuff, but can't you tell us something that we dont know.

 

Like how to remove a unit.

Or how to change a units image.

OR WHY THE DAMN PROGRAM KEEPS SCREWING UP! (sorry, fit of madness)

 

We all know how to make new units, so write something extra!

Share this post


Link to post

Well, the remove key still has to be added by Koen in Tibed.

You can change the pic of a Unit as shown above, the pic the command button uses is shown in that command button.

You can change it by filling in the name of another image that other objects use.

And if it screws up (I have it a lot) then U made a change, or removed somethin which causes the crash.

Share this post


Link to post

hi how come tibed 2 beta 3 wont let me create units. i have read other posts and it says just right click on an object to clone it but tibed wont let me right click on anything. help me please.

Share this post


Link to post

A big oops from me!

This was changed in the beta series to become more powerful. Instead, you now have to select the item on the left in the tree, for example "Armors" and then in the list on the right, where you see all the armors, there's a new button. At the bottom one of the buttons will 'clone' an existing item, also deletion now works as well. The whole menu system didn't work very well.

Share this post


Link to post

I have done what is said here in this guide and succesfully created a unit but now any other units i make will not work with the name and description and it says 'missing' and it shows

the units name.how do I fix it.

Share this post


Link to post

ok for one what file u usin 2 how do u play the mod and 3 how do u make things tht are not supposed to be build build

Share this post


Link to post

ok for one what file u usin 2 how do u play the mod and 3 how do u make things tht are not supposed to be build build

English please?

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×