AdrianeMapMaker
9 years ago
Can Anyone know how to Mod the car being a Garrison-able with using ini

I am Such a Noob about this pls i need help

I am Going to Mod The Police car
Look Like this is the Right Module Tag For My Idea , right?



  Behavior = TransportContain ModuleTag_05
    PassengersAllowedToFire = Yes
    Slots             = 5
    EnterSound          = GarrisonEnter
    ExitSound           = GarrisonExit
    DamagePercentToUnits = 20%
    AllowInsideKindOf  = INFANTRY
  End



Now i am Going to Experiment is this ,right ?


Object PoliceCar

  ; *** ART Parameters ***
  SelectPortrait         = SUTerrorist_L
  ButtonImage            = SUTerrorist

  Draw = W3DPoliceCarDraw ModuleTag_01
    DefaultConditionState
      Model = CVPoliceCar
      Animation = CVPoliceCar.CVPoliceCar
      AnimationMode = LOOP
    End
    ConditionState = FRONTCRUSHED BACKCRUSHED
      Model = CVPoliceCar_d
    End
    ConditionState = BACKCRUSHED
      Model = CVPoliceCar_d2
    End
    ConditionState = FRONTCRUSHED
      Model = CVPoliceCar_d1
    End
  End

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:PoliceCar
  EditorSorting   = VEHICLE

  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions = None
    Weapon = PRIMARY None
  End
  WeaponSet
    Conditions = CARBOMB
    Weapon = PRIMARY  SuicideCarBomb
  End

  ArmorSet
    Armor           = TruckArmor
    DamageFX        = CrushableCarDamageFX
  End
  CrusherLevel           = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 1  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = CivilianCarBombCommandSet

  ; *** AUDIO Parameters ***
  SoundMoveStart = CarMoveStart
  SoundAmbient = PoliceCarSirenLoop


  ; *** ENGINEERING Parameters ***  
  KindOf          = SELECTABLE CAN_ATTACK VEHICLE SHOW_PORTRAIT_WHEN_CONTROLLED
  RadarPriority   = LOCAL_UNIT_ONLY

  Body            = ActiveBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End



 Behavior = DestroyDie ModuleTag_03
    DeathTypes = ALL -CRUSHED -SPLATTED
  End
  Behavior = CrushDie ModuleTag_04
    DeathTypes = NONE +CRUSHED +SPLATTED
    TotalCrushSound     = CarAlarm
    BackEndCrushSound   = CarAlarm
    FrontEndCrushSound  = CarAlarm
    TotalCrushSoundPercent    = 50   
    BackEndCrushSoundPercent  = 50
    FrontEndCrushSoundPercent = 50
  End
  Behavior = TransportContain ModuleTag_05
    PassengersAllowedToFire = Yes
    Slots             = 5
    EnterSound          = GarrisonEnter
    ExitSound           = GarrisonExit
    DamagePercentToUnits = 20%
    AllowInsideKindOf  = INFANTRY
  End
  Behavior = SlowDeathBehavior ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
    SinkDelay = 14000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 20000
  End

  Behavior = FXListDie ModuleTag_05
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_06
    DeathTypes = ALL -CRUSHED -SPLATTED
    CreationList = OCL_PoliceCarExplode
  End
  Behavior = FXListDie ModuleTag_07
    DeathTypes = ALL -CRUSHED -SPLATTED -FLOODED
    DeathFX = FX_PoliceCarExplode
  End

  Behavior = AIUpdateInterface ModuleTag_08
  End
  Locomotor = SET_NORMAL BasicCarLocomotor
  Locomotor = SET_WANDER WanderCarLocomotor
  Locomotor = SET_PANIC PanicCarLocomotor

  Behavior = PhysicsBehavior ModuleTag_09
    Mass = 30.0
  End

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 5       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End

  Geometry        = BOX
  GeometryIsSmall = Yes
  GeometryMajorRadius = 11.0
  GeometryMinorRadius = 4.0
  GeometryHeight  = 9.0
  Shadow          = SHADOW_VOLUME

End




Or This One ?

Object PoliceCar
AddModule ModuleTag_05
Behavior = TransportContain ModuleTag_05
End



Need Help Pls , Thanks😂


wait: its seem the police is transportable based on the ***Design Parameters***
But, its not workin .... maybe something is wrong ? idk.
Here:

  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
klingondragon
9 years ago
Of your 2 codes the first should work for a mod the second looks as if you're using a map.ini but the code has many flaws.
As for the car being transportable, it looks as if it takes up 3 spaces. So if it belonged to a player they could put it in their Chinook and take up 3 of the 8 slots.
AdrianeMapMaker
9 years ago
Thanks.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
If you did want to make a map.ini the code should look similar to this:
Object PoliceCar
  AddModule
    Behavior = TransportContain ModuleTag_05
      PassengersAllowedToFire = Yes
      Slots = 5
      EnterSound = GarrisonEnter
      ExitSound = GarrisonExit
      DamagePercentToUnits = 20%
      AllowInsideKindOf = INFANTRY
    End
  End
End

acidbrain
9 years ago


Object PoliceCar
  AddModule
    Behavior = TransportContain ModuleTag_05
      PassengersAllowedToFire = Yes
      Slots = 5
      EnterSound = GarrisonEnter
      ExitSound = GarrisonExit
      DamagePercentToUnits = 20%
      AllowInsideKindOf = INFANTRY
    End
  End
End

Originally Posted by: klingondragon 



It is not just a matter of adding this module klingon.
Panem et kirkinses
zero hour mad map maker
9 years ago
Thought I add this for those who are curious:

If I'm not mistaken, you can also change the garrisons of buildings with this code line in map.ini:


Object AsianTrainStation
 ReplaceModule ModuleTag_03
  Behavior = GarrisonContain ModuleTag_03Alt
    ContainMax          = 0
    EnterSound          = GarrisonEnter
    ExitSound           = GarrisonExit
  End
 End
END

If you set the ContainMax to 0, you will no longer be able to garrison it. Likewise, increasing it should increase its slots.


Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
klingondragon
9 years ago

It is not just a matter of adding this module Klingon


I said similar. Not identical.

Likewise, increasing it should increase its slots.


It may increase the number of slots but would not you also need to add an updated commandset so as to accommodate all the slots?
Annihilationzh
9 years ago

If I'm not mistaken, you can also change the garrisons of buildings with this code line in map.ini

Originally Posted by: Zero Hour Mad Map Maker 


Beware, that uses a ReplaceModule. GarrisonContain isn't always ModuleTag_03, so it won't work for a lot of buildings.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
zero hour mad map maker
9 years ago


Beware, that uses a ReplaceModule. GarrisonContain isn't always ModuleTag_03, so it won't work for a lot of buildings.

Originally Posted by: Annihilationzh 



Thanks for that added tip 👍


It may increase the number of slots but would not you also need to add an updated commandset so as to accommodate all the slots?

Originally Posted by: klingondragon 



Note quite sure.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago

If you did want to make a map.ini the code should look similar to this:

Object PoliceCar
  AddModule
    Behavior = TransportContain ModuleTag_05
      PassengersAllowedToFire = Yes
      Slots = 5
      EnterSound = GarrisonEnter
      ExitSound = GarrisonExit
      DamagePercentToUnits = 20%
      AllowInsideKindOf = INFANTRY
    End
  End
End

Originally Posted by: klingondragon 



This Seems to Be an detailed code ,this should work.... thanks , but did my 2nd code should work?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage