CG Apollos
  • CG Apollos
  • 100% (Exalted)
  • Commander in Chief Topic Starter
20 years ago
Ever wonder how to add boats into your mod? This is how.

Around November 2005 I found a simple way to add boats into Zero Hour with minimal bugs. I forgot to stick it on Generals World and/or upload it online. Since I want to share this around, I request that this topic be stickied. -- If this same system has already been done, thats fine. I would like people to have an actual tutorial to add boats into the game.

The parts that you might have already done will be in Red. If you have not, these ARE NOT optional steps.

The parts that are pieces of code will be in Green. These are just examples that you can either A. Copy and Paste or B. Look over to make sure you did it right.

The parts in Yellow are important pieces in the steps, which you will see often.

The chapters (Known as: Part 1, Part 2, and etc.) will be highlighted in Blue.

Part 1: Extracting the INI Files.

http://www.cncnz.com/files/generals/utils.shtml#finalb  Note: To set this up, use the readme that comes with it.

Go to your C:\Program Files\EA Games\Command & Conquer(tm) Generals Zero Hour or C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour folder and open the INIZH.big file with FinalBIG. At the top bar, hit Edit, then Extract All.

Make sure the path is set like C:\Program Files\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI or C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\Data\INI.

Once you have done this correctly, you are ready to start modding.[/color]

Part 2: Adding your boats.

It is time to start adding your boats into the game, you can start by opening up your AmericaMiscUnit.ini in Notepad. These are the pathes:

(C:\Program Files\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI\Object\AmericaMiscUnit.ini)

(C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\Data\INI\Object\AmericaMiscUnit.ini)


The first thing you should see at the top is the:
;------------------------------------------------------------------------------
Object CountermeasureFlare ;<--- The name of the object.
;------------------------------------------------------------------------------

This means you have opened the correct file.

On your keyboard, do Ctrl+F or click on the top bar Edit/Find. Type BattleshipReal, and then hit Find Next. You should go straight to an area like this:
;------------------------------------------------------------------------------
Object AmericaVehicleBattleShipReal
SelectPortrait = SABattleship_L
; *** ART Parameters ***
Draw = W3DTankDraw ModuleTag_01
;<--- The first section of the battleship part.
;------------------------------------------------------------------------------

You need to copy and paste the whole section. Start at the top and drag down to End:
;------------------------------------------------------------------------------
Geometry = BOX
GeometryMajorRadius = 200.0
GeometryMinorRadius = 20.0
GeometryHeight = 40
GeometryIsSmall = No
Shadow = SHADOW_VOLUME

End
;<--- Where you should drag down to.
;------------------------------------------------------------------------------
Highlight everything includeing the "End" and copy it (Right-Click, Copy. -- Or you can do Ctrl+C on your keyboard.). Now hit the red X at the top and exit out.

Open your AmericaVehicle.ini, found in the same folder, and open it. You should see this:
;------------------------------------------------------------------------------
Object AmericaVehicleHumvee

; *** ART Parameters ***
SelectPortrait = SAHummer_L
ButtonImage = SAHummer
;<--- The first part of the American Humvee, found in the file.
;------------------------------------------------------------------------------

Paste (Ctrl+V or click on the top bar and Edit/Paste.) your whole battleship section right above the humvee. Click above the ;-- area and then paste.

Go to the top area of your battleship, here:
;------------------------------------------------------------------------------
Object AmericaVehicleBattleShipReal ;<--- The name.
;------------------------------------------------------------------------------

Rename it to something else, for this tutorial, I will go ahead and name it like this:
;------------------------------------------------------------------------------
Object AmericaVehicleBattleShipTutorial
;------------------------------------------------------------------------------

Hit the red X at the top right, and it will prompt you to save changes. Hit yes and it should automatically close with the changes. If you would like to double-check, open the file again and see if the top area for your battleship is there.

After you do this, run the game to make sure the battleship was entered in right. You wont be able to see any of the changes you made, but if you dont get an error when starting up, it means you did these steps correctly so far.

Part 3: Your shipyard, command sets, and command buttons.

Good job so far. Open your CommandButton.ini, which is in the base INI folder:

C:\Program Files\EA Games\Command & Conquer(tm) Generals Zero Hour\Data\INI\CommandButton.ini

C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\Data\INI\CommandButton.ini

After you have done that, scroll down to the bottom and enter in this code. You may copy and paste if you want:

;-----------------------------------------------------------------
CommandButton Command_ConstructAmericaVehicleBattleShipTutorial
Command = UNIT_BUILD
Object = AmericaVehicleBattleShipTutorial ;<--- Whatever your unit's name was.
TextLabel = CONTROLBAR:ConstructAmericaVehicleHumvee
ButtonImage = SABattleship_L
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildHumvee
End

;-----------------------------------------------------------------

Copy the Command_ConstructAmericaVehicleBattleShipTutorial part and then exit out of this file. Be sure to say yes when it prompts you to save the changes.

Open up your CommandSet.ini that is within the same base INI folder. Scroll to the bottom and enter in this code:

;-----------------------------------------------------------------
CommandSet NeutralTutorialShipyardCommandSet
1 = Command_ConstructAmericaVehicleBattleShipTutorial
End

;-----------------------------------------------------------------

Copy the part that is: NeutralTutorialShipyardCommandSet and then exit out of this file. Save the changes.

Go back into the Objects folder, and open CivilianBuilding.ini. On your keyboard, do Ctrl+F or click on the top bar Edit/Find. Type BoatDocks, and then hit Find Next. You should go straight to an area like this:
;------------------------------------------------------------------------------
Object BoatDocks01

; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
; day
ConditionState = NONE
Model = CBNBoatDoc
<--- This area of code is the civilian docks.
End
;------------------------------------------------------------------------------

Scroll down until you get to the ; ***DESIGN parameters ***. Right underneith the ArmorSet, paste this single line of code:

;------------------------------------------------------------------------------
CommandSet = NeutralTutorialShipyardCommandSet ;<--- The command set.
;------------------------------------------------------------------------------

Next, you need to make it capturable. Find the line in the ; *** ENGINEERING Parameters *** that says:
;--------------------
KindOf = STRUCTURE SELECTABLE IMMOBILE
;--------------------
Change it to this:
;--------------------
KindOf = STRUCTURE SELECTABLE IMMOBILE CAPTURABLE
;--------------------

Run the game, and make sure that you dont have an error. Exit out of the game if you dont.

If you do, go to:
C:\Documents and Settings\AuroraAlphaHL2 (Your name.)\My Documents\Command and Conquer Generals Zero Hour Data\ReleaseCrashInfo.txt -- Read the contents, and it should tell you where the problem is. When you find it, correct it, and then do the next step.

Step 4: Finalizeing this tutorial, makeing your effort worth the work.

The final step, is to open up Worldbuilder and add the civilian building
BoatDocks01 near a patch of water.

If you dont know how to do this, there are many world builder tutorials you could look up, or you could ask one of the members of Generals World on how to use world builder.

If you have any questions or comments, post here or contact me. If you want to get more advanced in any way, contact me and I will help you out.

Thanks again!,
AuroraAlphaHL2 😁

[EDIT: Moved to Tutorials forum -- CommieDog]
Sponsor
Flip1299
20 years ago
if you haven't done the part in red, i wouldn't suggest trying to put ships into the game, just download a mod with them.

i knew all that, i was hoping for a tutorial on how to make buildings that can be built on water...
UserPostedImage
CG Apollos
  • CG Apollos
  • 100% (Exalted)
  • Commander in Chief Topic Starter
20 years ago


1.if you haven't done the part in red, i wouldn't suggest trying to put ships into the game, just download a mod with them.

2.i knew all that, i was hoping for a tutorial on how to make buildings that can be built on water...

Flip1299 wrote:

1. This is if you want to do it yourself. I have not seen too much stuff on the process online.

2. Maybe later, however, just because you knew how to do it doesn't mean it would be useless for someone else.

AuroraAlphaHL2 😁
Blbpaws
  • Blbpaws
  • 100% (Exalted)
  • Administrator
20 years ago
Stickied. We'll see about getting it added to the tutorial section.
UserPostedImage
CG Apollos
  • CG Apollos
  • 100% (Exalted)
  • Commander in Chief Topic Starter
20 years ago


Stickied. We'll see about getting it added to the tutorial section.

Blbpaws wrote:

Thanks for stickying it. I dont know if I got detailed enough for it to be in the tutorials section yet...

AuroraAlphaHL2 😁
fervid
  • fervid
  • 60.5% (Friendly)
  • Private
19 years ago
Why is Zero Hour required. I have the Harbor Shell map that has a Naval Boat and even waves on the shore and no Zero Hour installed...

How do we get boats to work at all? I add the Green Ferry and the Asian boat on my maps and they never show up in game. (Haven't tested after my water polygon problem, so may work) People don't like staying half submerged to look like they are swimming either and keep standing up. The Double wide Bridge looks funny when placed too and has really long legs that go way down below the terrain.

That would be cool to have a map that only uses rails, long bridges, and/or Ferrys to connect two islands.
CG Apollos
  • CG Apollos
  • 100% (Exalted)
  • Commander in Chief Topic Starter
19 years ago


Why is Zero Hour required. I have the Harbor Shell map that has a Naval Boat and even waves on the shore and no Zero Hour installed...

fervid wrote:

This is only because Zero Hour has a USA Battleship, so I figured it would be a better combat boat than a Green Ferry. 😛

AuroraAlphaHL2 😁
judoka
  • judoka
  • 50.75% (Neutral)
  • Private
19 years ago
Would make a cool mini-mod if it included some custom Maps.
UserPostedImage   UserPostedImage  
Revan
  • Revan
  • 52.25% (Neutral)
  • Private
19 years ago
wattsy87
19 years ago
hi, i managed to do all that on the list, except the end bit, the world builder.

can someone explain how i do the world builder part. does this mean i cant have boats on any level, it has to be ones i build myself?

thanks in advance

simon
CommieDog
19 years ago
It looks like you need to place the shipyard on a map. Once you have that, I imagine that you could make as many boats as you want.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
CG Apollos
  • CG Apollos
  • 100% (Exalted)
  • Commander in Chief Topic Starter
19 years ago
Yes, you just need to open or make a map in world builder and add the object BoatDocks01 which is under civilian structures. Place it near water and where your units can capture it.
swordxj
19 years ago
it`s very good!
i want to know how download the maps!
red leader79
18 years ago
Are there any generals zh maps that already have boatdocks01, I really don't like worldbuilder and it doesnt like me.
UserPostedImage
Spartan Jedi
18 years ago
I followed the tutorial step by step, but when I test after finishing, I get an error, and ReleaseCrashInfo.txt gives this message
Release Crash at Sun Jun 24 13:59:24 2007
; Reason Error parsing INI file 'Data\INI\Object\CivilianBuilding.ini' (Line: 'Object BoatDocks01 ')


Last error:


Current stack:
How would I fix this?
CommieDog
18 years ago
Looks like there is a problem with BoatDocks01. Check the code again to make sure that everything is in place. If that fails, try running WorldBuilder.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Spartan Jedi
18 years ago
When I opened WorldBuilder, I got the following error:

ASSERTION FAILURE: [LINE: 11505 - FILE:'Data\INI\Object\CivilianBuilding.ini'] Unknown feld 'CommandSet' in block 'Object'

Abort->exception; Retry->debugger; Ignore->continue
The section in CivilianBuilding.ini reads as follows

  ; ***DESIGN parameters ***
  DisplayName           = OBJECT:Docks
  EditorSorting         = STRUCTURE
  ArmorSet
    Conditions          = None
    Armor               = StructureArmor
    DamageFX            = StructureDamageFXNoShake
  CommandSet = NeutralTutorialShipyardCommandSet
  End

  ; *** AUDIO Parameters ***
  SoundAmbient = DocksVillageWaterLapping


  ; *** ENGINEERING Parameters ***  
  KindOf                = STRUCTURE SELECTABLE IMMOBILE CAPTURABLE
  Body                  = StructureBody ModuleTag_02
    MaxHealth           = 200.0
    InitialHealth       = 200.0
  End
CommieDog
18 years ago
Ah, I see the problem. The CommandSet line needs to go down one line so that it is below the "End" statement.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Spartan Jedi
18 years ago
Alright, fixed the problem. Thanks for the help 🙂
paimail
18 years ago
i know how to build buildins on water make a map with the start position in the water then you will be able to build buildings in the water...
UserPostedImage