Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Sopr  
#1 Posted : Sunday, April 12, 2020 1:18:15 PM(UTC)
Sopr
Private
Joined: 4/12/2020(UTC)
Posts: 2

Please, help. I am new to modding and truing to make a new type of bunker that is build alredy with infantry inside, but I can not find the right parameter that tiggers it. Can some one explain how can that bedone or point in to the right manual or example?
Sponsor
Offline AdrianeMapMaker  
#2 Posted : Monday, April 13, 2020 4:57:30 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
uhm never looked at troop crawler codes?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Offline Sopr  
#3 Posted : Monday, April 13, 2020 5:52:41 AM(UTC)
Sopr
Private
Joined: 4/12/2020(UTC)
Posts: 2

First thing I did. But the ini file for the side or any of the china generals just show the vehicle parameters and I can not find the code that tells if the vehicle is loaded or empty.
Offline UTD^Force  
#4 Posted : Monday, April 13, 2020 8:44:15 PM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
There you go, I have not coded anything in a while, so I'm not sure if you need the behaviour 'TransportAIUpdate' or not.

Code:
Object Infa_ChinaVehicleTroopCrawler
  Behavior = TransportAIUpdate ModuleTag_CorrectAI
  End


  Behavior = TransportContain ModuleTag_06
    PassengersAllowedToFire = Yes
    Slots                 = 8
    InitialPayload        = Infa_ChinaInfantryMiniGunner 8
    ScatterNearbyOnExit   = Yes
    HealthRegen%PerSec    = 10
    DamagePercentToUnits  = 50% ;10%
    AllowInsideKindOf     = INFANTRY
    ExitDelay         = 250
    NumberOfExitPaths = 3 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
    ArmedRidersUpgradeMyWeaponSet = Yes
  End
End
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Offline UTD^Force  
#5 Posted : Monday, April 13, 2020 9:20:23 PM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
Here is the code for structures, in the example china bunker.
I added the full 'GarrisonContain' behaviour's parameters below the module, I got that from the module list rrtaya uploaded here.
Code:

Object ChinaBunker
  RemoveModule ModuleTag_08
  AddModule
  Behavior = GarrisonContain ModuleTag_08Override
    ContainMax                    = 5
    EnterSound                    = GarrisonEnter
    ExitSound                     = GarrisonExit
    ImmuneToClearBuildingAttacks  = Yes
	InitialRoster = ChinaInfantryRedguard 3 ;;;;this is the new piece 
  End
 End
End



Full module
GarrisonContain
[Module is hardcoded to use the GarrisonGun object definition for the weapons pointing from the object when occupants are firing and these are drawn at bones named FIREPOINT. Also, It Allows you to use the GARRISONED Model ConditionState]

[NOTE: THE FIREBASE LOGIC IS ONLY FOR ZEROHOUR]
[If The Model has STATIONx (X can range from 1 to a bajillion =P) and the Draw module (AKA W3DModelDraw) has a "ExtraPublicBone = STATIONx <mulitple statements can be made> defined and the garrison module has the "IsEnclosingContainer = No" ]
[The Garrisoned guys will appear at the location of the "STATION" bones...this will work like the Firebase -Requires the HiveStructureBody]

ContainMax = [integer]
EnterSound = [entry from SoundEffects.INI]
ExitSound = [entry from SoundEffects.INI]
DamagePercentToUnits = [percent]
MobileGarrison = [Yes/No]
InitialRoster = [object name integer]
ImmuneToClearBuildingAttacks = [Yes/No]
IsEnclosingContainer = [Yes/No]
HealObjects = [Yes/No]
TimeForFullHeal = [integer, milliseconds]
PassengersAllowedToFire = [Yes/No]
AllowInsideKindOf = [KindOF list]
ForbidInsideKindOf = [KindOf listing]
AllowAlliesInside = [Yes/No]
AllowEnemiesInside = [Yes/No]
AllowNeutralInside = [Yes/No]
End
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Offline beng  
#6 Posted : Saturday, November 6, 2021 7:17:44 AM(UTC)
beng
Captain
Joined: 4/8/2009(UTC)
Posts: 57
Location: In a house

Thanks: 5 times
Was thanked: 5 time(s) in 3 post(s)
Originally Posted by: Sopr Go to Quoted Post
Please, help. I am new to modding and truing to make a new type of bunker that is build alredy with infantry inside, but I can not find the right parameter that tiggers it. Can some one explain how can that bedone or point in to the right manual or example?


This is how you can have a mix of infantry types inside:

Make an OCL to put in the types of infantry you want:
Code:

ObjectCreationList OCL_InfBunkerCrew
  CreateObject
    ObjectNames = Lazr_AmericaInfantryPathfinder
    Count       = 1
    ContainInsideSourceObject = Yes
  End
  CreateObject
    ObjectNames = Infa_ChinaInfantryTankHunter
    Count       = 4
    ContainInsideSourceObject = Yes
  End
  CreateObject
    ObjectNames = Infa_ChinaInfantryRedguard
    Count       = 5
    ContainInsideSourceObject = Yes
  End
End


Then in the bunker:
Code:

  Behavior = ObjectCreationUpgrade ModuleTag_Crew
    UpgradeObject = OCL_InfBunkerCrew
    TriggeredBy   = Upgrade_ChinaMines
  End

  Behavior = GrantUpgradeCreate ModuleTag_11
    UpgradeToGrant    = Upgrade_ChinaMines
    ExemptStatus      = UNDER_CONSTRUCTION
  End
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.