:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Nov 14, 2019 6:13 am
All times are UTC + 0
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Adding a New Unit [ZH] (3/3)
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Defense Minister

Joined: 07 Nov 2006

PostPosted: Wed Feb 27, 2008 2:13 am    Post subject:  Adding a New Unit [ZH] (3/3)
Subject description: alos applies to infantry, aircraft, and buildings
Reply with quote

Adding a New Unit

This is the third installment of my tutorials.  As I learn how to mod Zero Hour, I will share my knowledge with you the reader.  Thus if you have read and understood my two previous tutorials, you should be ready for this one.  If not, I strongly recommend you ATLEAST follow steps one and two under this tutorial: http://www.ppmsite.com/forum/viewtopic.php?t=17904.

Tools Required:  XCC Utilities, Notepad

Step 1, Getting the Right File:  Assuming you already have your ZH directory setup (which you must have CommandSet.ini and CommandButton.ini), the next step is to get the ini file for your new unit to go into.  Fire up XCC Mixer, go to your ZH directory and enter INIZH.big.  I'm going to leave alot of experimentation for later up to you, but for know extract the file AmericaVehicle.ini to your ZH directory under data/ini/object (make sure it is in objects and not just ini!).  Once you have done this, you can close down XCC mixer and head on over and open the file you have just extracted.

Step 2, The ini, an Explanation:
The ini files hold alot of information for the game.  Nearly everything you see when playing has an ini entry and the ini defines nearly every interaction in the game from what unit uses what icon to how much damage a super weapon has.  Being almost like the DNA of the game, the ini has alot of data to hold.  The creators divided thm up to make them more managable (so you have AmericaVehicle.ini being separated from say Mouse.ini).  The reason I bring this up is because not all the vehicles have their codes in AmericaVehicle.ini.  So you will have to do some exploring along the way.  Most of the files can easily be told what they are by their names, so finding the .ini you should be an easy task.  Generally speaking, the codes ini are found in the .ini file that has the side's name followed by what is in it (AmericaVehicles.ini for example) or if it is the ini of a sub-faction, you can just look in the sub-faction's ini (like LaserGeneral.ini).

Step 3, Clone, and then Edit:
The easiest way to add a new unit is to clone an old one and then go from there.  When you create a new unit, try to think of what you want it to be and which old unit resembles it the closest.  For this tutorial, will will clone the first unit in the file and then go from there.  Open up AmericaVehicle.ini if you have not yet done so, and copy from the beginning of th humvee entry until the end (from the word "object" uo till the the final "end" before the big space).  Scroll all the way to the bottom of the page and paste it there.  All we have to do is change the entry name and the game will automatically recognize the new unit  (For this tutorial, rename the entry AmericaVehicleCannoncar.

Nows the fun part.  You can edit, anything you want to under this new entry, but remember somethings will cause the game to crash.  There are probably a few tags you should stick to at first until you get the hang of things:

SelectPortrait = SAHummer_L;this is an icon, u should probably only c/p from other units
ButtonImage = SAHummer;same as above

DisplayName = OBJECT:Humvee; the name that shows up when the cursor is over it.  Remember whatever you add here you must also add in the generals.csf

Weapon = PRIMARY xxxx ;add whatever weapons you want, but like all things, you should stick to c/p until you leanr how to make new ones.
Weapon = SECONDARY xxxx

(also note, weapon sets are the weapons a unit gets when it is upgraded or not.  This is a way to get a unit to get a new weapon if it purchases an upgrade)

BuildCost = ;self explanatory

   Object = AmericaWarFactory ;NOTE; this is what is required to exist in order to build the unit, NOT where the unit is built, that is controlled in COmmandSte.ini.

Those were just a few, and the greater exploring is up to you.  But for the purpose of this tutorial, I'll give you a few changes to make so you have something instant to test ingame.  Paste "CrusaderTankGun" over the humvee's primary gun, and change the build cost to only a 100 dollars.  Save the file and before closing it, copy the name that you gave the entry.  After that close it.

Step 4, Creating the Buttons:
Completing the second tutorial is a requirement before continueing.  Go to you Zero Hour directory and open up CommandSet.ini and CommandButton.ini.  Go to the CommandButton.ini and find the command "Command_ConstructAmericaVehicleHumvee".  Copy this entry and paste it somewhere (preferably at the bottom).  Now edit this entry to fit your new unit, most importanlty by editing the line "Object        = AmericaVehicleHumvee" from the humvee's entry name t the new unit's (in this case AmericaVehicleCannoncar).  Once you have finished, Copy the name of the entry, save and close.  Now for the final step before finishing; go to CommandSet.ini and find the building that you want your unit to be built at (in theis case, the american war factory).  Find the entry for the war factory and add a number to an empty slot (Line 10 is vacant).  Paste the name of the button entry, and you're good to go!.

Step 5, Testing and the Future:
I have shown you step by step of how to add a new unit.  But remember, I have only showed you how to add a new one, all the experimentation and exploring is up to you.  Thats what modding is all about.  The possibilities are nearly endless, so go out there and do something new!

If you have any questions posts them here

Key Words: #Tutorials #Modding #Generals #ZeroHour #XCCUtilities #OSBIGEditor #FinalBIG 

Please, read the signature rules of the forum.

Back to top
View user's profile Send private message

Joined: 12 Oct 2014

PostPosted: Sun Oct 12, 2014 3:43 am    Post subject: Reply with quote

So I've been following these steps countless times now, without any results.

I've tried over and over using TibEd 2, but dosen't work what so ever. I've even tried it manually in the INIZH.big file, but I keep screwing it up somehow.

I managed to get the Command Button to show up in the war factory when I tried it manually at some point. Untill the game desided to crash and tell me there was a serious error when I got close.

To say it straight out, I'm sick and tired of trying, so if you have any idea why this might be going wrong all the time, I'd appresiate it!

I want to be able to create new units, not just stats and W3D models.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Generals Editing Forum » Tutorials Warehouse
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1136s ][ Queries: 12 (0.0041s) ][ Debug on ]