JoshZemlinsky
11 years ago
Tutorials like this probably already exist in the masses, but i decided to do this one to try and shed some light on missed subjects. It was also made in an attempt to help CrashDodgers out. To view the images provided, press "Show Spoiler"


First off, you'll want to get the following two programs:

Finalbig  - Finalbig is used for extracting, importing and making new .Big files, it is not possible to mod generals without it.
Notepad++  - This one is not necessary but i would strongly suggest getting it, as it makes the overall process easier and gives a better overview.


Depedning on the unit you want to make available to other factions, you may need to go to either Generals or Zero Hour to find the desired .ini file. I do however believe that almost all units can be found inside of INIZh.big which is where all Zero Hour ini files are located.
I would always advice to get them from there, as they tend to be more up-to-date then those of ordinary Generals. I.e. Scorpion in Generals doesn't have Salvage upgrades, but in Zero Hour it does.


Now, to start out, we wanna launch Finalbig.


UserPostedImage


As you can see, not much is here yet. Now, you wanna go to 'File -> Open' This will take you to the browser window where you will have to select the .big file you wish to open.


UserPostedImage


Depending on the .Big file you wanna open, you have to go to one of two places. The following paths is where i assume the majority of you will find your Generals folders. (mine are totally different)

C&C Generals: C:\Program Files(x86)\EA Games\Command & Conquer(tm) Generals
C&C Generals Zero Hour: C:\Program Files(x86)\EA Games\Command & Conquer(tm) Generals Zero Hour

Navigate to either of these folders, depending on which INI achieve you are interested in. In this case, we want the Zero Hour variant of the HiJacker, so we will go for INIzh.big in the Zero Hour folder.


UserPostedImage


The next thing you wanna do, is scroll down till you find the files located in path 'Data/INI/object'
Now locate "GLAinfantry.ini" select the file, and press
'Edit -> Extract' You will now be prompted with another browser window. Navigate to your Zero Hour (Or Generals) folder, then open the folder named "Data" inside of it, create a new folder named "INI" and after one named "object"

You will then extract the GLAInfantry.ini file to this exact location, so it is inside of:
C&C Generals Zero Hour: C:\Program Files(x86)\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI\object\


UserPostedImage
UserPostedImage
UserPostedImage
UserPostedImage


To explain why we put it there, look at the file paths in Finalbig, these are representative of where the game 'looks' for these files, usually from the root directory.

You also wanna extract the following file "AmericaInfantry.ini" as this is where we wish to add the Hijacker to. Extract it to the exact same location as you did with the GLAInfantry.ini.


UserPostedImage


Next up, you will have to find two files, one named "CommandSet.ini" the other "CommandButton.ini" both have the file path "Data/INI" this also means, when we do extract them, they go into our newly created INI folder within the Data folder of our respective game directory.


UserPostedImage
UserPostedImage


Again, you will extract these two said files to:
C&C Generals Zero Hour: C:\Program Files(x86)\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI\

Now, it's time for the fun part! In case you followed my advice and got Notepad++ start it up, and navigate to your Data\INI folder within Zero Hour and drop over CommandSet.ini, CommandButton.ini, also GLAInfantry.ini and AmericaInfantry.ini located just one folder beneath inside of "object"


UserPostedImage
UserPostedImage


Select the GLAInfantry.ini document inside of Notepad++ and click 'Find -> find' a Search field will appear, type in "GLAInfantryHijacker" and make sure to search downwards.


UserPostedImage


Click search, hopefully the first thing that will come up is the Hijacker code. You will know its the start of his code due to the green line which indicates the start (or end) of a new unit.


UserPostedImage


Scroll to the bottom of his code, you will know when you are there, due to the green lines. Click just beside the text "END" scroll back up to the top, hold 'Shift' and click just behind the last green line. This will select the ENTIRE Hijacker code with no bits missing. Either, right click and press 'copy' or my personal favorite CTRL+C


UserPostedImage
UserPostedImage


Next up, go to the "AmericaInfantry.ini" document, scroll right down to the absolute bottom of it. (I tend to do this, as it is easier to locate recently added units)


UserPostedImage


Click just beneath "END" and press Enter, this will ensure order and not cause chaos.
Next up, right click and select paste, or CTRL+V this will insert your Hijacker code.
After such has been done, scroll back up, or use the search function to get back to the top of the Hijacker code.


UserPostedImage


Now, rename the Hijacker Object from "GLAInfantryHijacker" to... well whatever you want, for the sake of this tutorial i will keep it simple, so he will be "AmericaInfantryHijacker"


UserPostedImage


Further more, you may want to scroll down to where it says "Side = GLA" and change it to
"Side = America"


UserPostedImage


After you wanna scroll down (or search) to where it says "Prerequisites" you know you've found the right one when it says things such as "GLABarracks" and "GLAPalace"


UserPostedImage


All we wanna do here is change the Prerequisites, so that you can actually build him in an American barrack.
This is very simple to do right, you can either spent hours extracting all the US building ini files, or you can launch your Worldbuilder (located in the root of Generals Zero Hour)


UserPostedImage


Next up, select the "Place Object" tool in the top bar, a very self explanatory hierarchy of the different factions will pop up. Navigate to the faction of which buildings you wish to add to your prerequisites. In our case it would be: America->Structure->


UserPostedImage


Find the buildings you wish to add to the prerequisites, and simply note their name. In our case we want "AmericaBarracks" and "AmericaStrategyCenter"


UserPostedImage


Go back to Notepad++ and replace "GLABarracks" with "AmericaBarracks" and "GLAPalace" with "AmericaStrategyCenter" You also want to remove the whole line that says "Science = SCIENCE_Hijacker"


UserPostedImage
UserPostedImage
UserPostedImage


That will remove the requirement to have the promotion point for the Hijacker (Not available to US anyways)
Now we are done in these two files, so feel free to save them. (You may also close Worldbuilder incase you haven't done that already)

Next up, select the CommandButton.ini document.
As before, go to 'Find->find' and search for "GLAInfantryHijacker" correct result should be the first one that appears:


UserPostedImage


Now, select the entire text, and copy it like you did before.
And then scroll to the end of the document and paste it.


UserPostedImage
UserPostedImage


Now you wanna rename the appropriate names, in our case there is only two to rename.
The first which is "Command_ConstructGLAInfantryHijacker" rename it to "Command_ConstructAmericaInfantryHijacker"
The next one being "GLAInfantryHijacker" rename it "AmericaInfantryHijacker"
A little history on these two things, the first one Command_construct will be used as our button name entry for the CommandSet.ini file, the other one is the name of our Hijacker object, if you go back to when we pasted his code into the AmericaInfantry file, we named him "AmericaInfantryHijacker" So the same we should do here. (Or nothing will be build as it is not found)


UserPostedImage


Save the file, and move onto the last step, which is adding him to the CommandSet of the AmericaBarracks.
Head over to "CommandSet.ini"
'Find->find' and search for "AmericaBarracks" The first selected will be from the American Dozer command set, so you want to continue ONE more time, till you get this:


UserPostedImage


Now, copy the line "Command_ConstructAmericaInfantryPathfinder" click at the end of the same line, and press enter, this makes a space inbetween. Then paste the line as shown:


UserPostedImage
UserPostedImage
UserPostedImage


Change the number '4' to an open slot, in this case it would be '5' after, replace your newly copied line of "Command_ConstructAmericaInfantryPathfinder" with "Command_ConstructAmericaInfantryHijacker"


UserPostedImage


Save it, and you are done!

Here is the result:


UserPostedImage


As you can see, he appears, he is built, no problems.
If you however experience a crash while starting the game or he isn't built right, with no explanation or anything, here is my best suggestion - Launch Worldbuilder.
Example:


UserPostedImage


In this example we can see that we forgot a J in the word Object, Worldbuilder is good for finding errors like these, and i personally use it alot.

Now, if you were to add the hijacker to other factions, simply go over the steps again, but, instead of putting "America" you'd put the faction you are adding him for, i.e. SupW, Lazr, AirF.
Their .ini files are located along with the GLAinfantry.ini file, and often have self explanatory names, such as "SuperWeaponsGeneral.Ini", "LaserGeneral.ini" and "AirforceGeneral.ini"

For those interested, the entire Imgur achieve is here: http://imgur.com/a/R7XZc#1 
Thank you for reading, i hope this tutorial was of any use. If you experience any problems, feel free to leave a question, or any kind of critic as to how i could of done this better.
It might be obvious that i don't do tutorials that often.
Sponsor
Gameanater
11 years ago
Great tutorial!
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
klingondragon
11 years ago
Its easyer to go into the file for the original unit and change the prerequisites eg: Object = glabarracks to object = glabarracks Americabarracks then go into command set and add the original command from gla barracks and copying it into us barracks
WarlockX_X
11 years ago
Thanks for the Tutorial, but was wondering how to go about duplicating a unit on the same side but edit their weapons so they are different units. I replaced the primary and got rid of the secondary weapon, but when i go to play I can train him but he comes out with the original Commandset and weapons.

CommandButton Command_ConstructAmericaInfantryGunner
Command = UNIT_BUILD
Object = AmericaInfantryGunner
TextLabel = CONTROLBAR:ConstructAmericaInfantryRanger
ButtonImage = SARanger
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildRanger
End

Another Question, where do i go to edit the descriptions that pop up when you hover over the buttons?
klingondragon
11 years ago
Two things first can you use [code=plain] and put your code in tags
Second use generals.csf for the text labels
UTD^Force
11 years ago

Thanks for the Tutorial, but was wondering how to go about duplicating a unit on the same side but edit their weapons so they are different units. I replaced the primary and got rid of the secondary weapon, but when i go to play I can train him but he comes out with the original Commandset and weapons.

CommandButton Command_ConstructAmericaInfantryGunner
  Command       = UNIT_BUILD
  Object        = AmericaInfantryGunner
  TextLabel     = CONTROLBAR:ConstructAmericaInfantryRanger 
  ButtonImage   = SARanger
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildRanger
End

Originally Posted by: WarlockX_X 



I kinda didn't get that, but if you are saying that you want to make one unit to be two units which each one of them has a different weapon, I think it's easier to just copy the code for the first unit and paste it, then edit the pasted code to change the weapon and the object's name. Sorry if that doesn't answer your question though.


Another Question, where do i go to edit the descriptions that pop up when you hover over the buttons?

Originally Posted by: WarlockX_X 



Get a .csf editor (use google.com) and go to ZH directory> Data> English> generals.csf

A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
WarlockX_X
11 years ago
Thanks, I did forget to change the objects name and as for the csf file I was using the save function but apparently it did not work so I used Save As and now it works but only thing is i get these weird squares in between sentences and where I pressed enter to make space between sentences.

Thanks for all your help I'm starting to get the idea how behaviors work.
AdrianeMapMaker
9 years ago
Nice Tutorial
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage