soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago
Hey all, I have a relatively simple question about buildings in WB:

I want to make a certain building (dock) capturable in a map. I go through the steps to create the building in WB and make it selectable, neutral, targetable, etc. but when I get into the game I can't capture it, and my units can only attack it. I even went into the CivBuildings INI and made sure that the building had "CAPTURABLE" underneath the ***Engineering Parameters*** but still can't figure out why my infantry can't capture it. Any help would be greatly appreciated.
Sponsor
Delphineas
17 years ago
Easy thing to overlook is, do your units have the capture upgrade? And if so, are you pressing capture, then targeting the building?
soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago
Yep, difinitely made sure that they can do that as well - the first thing I do is make the units, buy the upgrade, and click the capture button before trying to select the building. Still seems to not want to allow me to capture the building.
Me Myself and Pi
17 years ago
Just to make sure, but did you put the CAPTURABLE in the Kindof section? I would think it work from just doing that. Could you put the Map.ini file in a .zip folder & upload it for me? Or just paste the code in a post?

Another thing you could try is to just make the dock unmanned. Then infantry could just garrison it & it would be yours.

Also, why do you want to do this? Does if have to do with scripting?
soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago

Here's the code for the object Boatdocks01:


; *** ENGINEERING Parameters ***
KindOf = STRUCTURE SELECTABLE IMMOBILE CAPTURABLE
Body = StructureBody ModuleTag_02
MaxHealth = 200.0
InitialHealth = 200.0
End
;Behavior = DestroyDie ModuleTag_03
; ;nothing
;End
; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are
; never truly destroyed, even when reduced to zero health. Also note that garrisonable
; buildings automatically stick around because GarrisonContain has it's own DieModule
Behavior = KeepObjectDie ModuleTag_IWantRubble
End

As you can see, I have made it 'CAPTURABLE' but I still can't make the units capture it, even with the upgrade. How do I make the structure unmanned? I haven't tried this yet. I would like to do this so I can do some scripting, yes. I don't, however, want to just give it to a team, I want to make it a building to capture.

Thanks for the help.
Drummin
17 years ago
I tried to make the structure unmanned to see if that would work last night. It didn't help. Making the structure unmanned did however allow a single unit to enter the dock and thus turned it over to the player. But capturing the dock was still not possible.
Me Myself and Pi
17 years ago
Well I was able to capture the dock when I added the CAPTURABLE to it. Could you upload the map for this & the .ini file?
soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago


Sure thing, but I am actually not sure how to upload what you're asking for, or upload anything onto this site. some help?
Me Myself and Pi
17 years ago
1) Open up My Documents, then Command and Conquer Generals (Zero Hour) Data, then Maps. You'll see folder there with the name of each map you hame there.
2) Click, File > New > Compressed (zipped) Folder. You can name it if you want.
3) Click & drag the folder that has your map name on it over the .zip folder. A copy of your map will be compressed in the .zip folder.
4) Then after posting something, click ATTACH on the the top right corner of your post to upload the .zip folder.

If you modified the CivilianBuilding.ini file, then put that file in the .zip folder too. If you used a Map.ini file instead, that should be included in the map folder.
soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago


Ok, here's the info.   Valhala.zip (126kb) downloaded 59 time(s).
Me Myself and Pi
17 years ago
As soon as I used the CivilianBuilding.ini file, the game crashed. After checking out your code, it looks like you're trying to add a command set like this:
  ArmorSet
    Conditions          = None
    Armor               = StructureArmor
    DamageFX            = StructureDamageFXNoShake
    CommandSet          = NeutralTutorialShipyardCommandSet 
  End
This won't work because the command set has nothing to do with the amor set. So change it to:
  ArmorSet
    Conditions          = None
    Armor               = StructureArmor
    DamageFX            = StructureDamageFXNoShake
  End
  CommandSet          = NeutralTutorialShipyardCommandSet 
After doing this, the game loaded up fine & I was able to capture both of your docks with rangers. Although I'm not sure why you made one of them targetable. Also, the script that you placed in the Neutral folder, stops the map from using the the AI scripts. In other words, the computer players won't do anything & the music won't player. Move it to the PlyrCivilian folder instead. I also noticed you used . Are you referring to the host of the game? Use player0 instead. 3 question marks will appear at the beginning of the action, but it'll work. To refer to the rest of the players, use player1-7.

Anyway, are you sure you have the CivilianBuilding.ini file in the right location? It needs to go in an Objectfolder, which needs to be in an INI folder which needs to be in the Data folder in your game directory. That's probably why it's not working, you just need to have it in the right folders.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
For more information on using "player#" scripts in WorldBuilder refered to by MMaP, see my tutorial and topic here. 
UserPostedImage 
soccer22
  • soccer22
  • 54.5% (Neutral)
  • Private Topic Starter
17 years ago
Thanks alot you guys, this has helped a lot.