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

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Deinon  
#1 Posted : Monday, July 10, 2017 9:46:47 PM(UTC)
Deinon
Captain
Joined: 5/11/2016(UTC)
Posts: 85

Thanks: 5 times
Was thanked: 4 time(s) in 4 post(s)
Is it possible to mod the Civilian Bunker structure so it uses a machinegun (say, the comanche gun) on enemies within range when it is garrisoned by a player?
Sponsor
Offline Unknown Editor  
#2 Posted : Tuesday, July 11, 2017 4:04:55 AM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
In my Opinion , It Sure can be ; Just requires a Couple of codes that You Must Add to the Bunker (AddModule), You can even make them able to Get Mine Upgrades however it's almost like a bug ; I can Look and Find the Codes in INI Later and make it work as well (I think It could be Sth Like Technical Machine Gun which Is Installed on it) , But now I must go to my English Class Big Smile
I'll Try to Figure it out A.S.A.P Cool

Edited by user Tuesday, July 11, 2017 4:07:36 AM(UTC)  | Reason: A.S.A.P = as soon as Possible

Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline AdrianeMapMaker  
#3 Posted : Tuesday, July 11, 2017 5:39:53 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)
I Think You Need to Add a Model On It Not in Modeling But Coding as Unknown Editor Had Said
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Offline R.I.P  
#4 Posted : Tuesday, July 11, 2017 1:58:10 PM(UTC)
R.I.P
Captain
Joined: 6/20/2015(UTC)
Posts: 77

Thanks: 18 times
Was thanked: 16 time(s) in 16 post(s)
it can be done by coding
just change the weapon of the bunker and give it a shot
It's me your friendly modder ZOMBATAR!
Offline SkyMix_RMT  
#5 Posted : Friday, July 14, 2017 9:50:32 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
In order for this to work 100% and look good you will need to add several pieces of code to the bunker.

In DefaultConditionState add a line with "WeaponFireFXBone = PRIMARY FIREPOINT", this makes sure the bullets come out of the bunker's firepoints.

Add a Weaponset like so:

WeaponSet
Conditions = None
Weapon = PRIMARY WeaponName
End

Make sure VisionRange and ShroudClearingRange are a bigger value than that of the weapon's AttackRange. (For example, commanche's vulcan gun AttackRange is 200, so VisionRange should be something like 210 and ShroudClearingRange 250)

Then add a "CAN_ATTACK" and a "ATTACK_NEEDS_LINE_OF_SIGHT" to the Bunker's KindOf.

Finnaly, add a turret module to control the weapon, personally I use this:
Code:

  AddModule
    Behavior = AIUpdateInterface ModuleTag_Turret
      Turret
        ControlledWeaponSlots = PRIMARY
        TurretTurnRate        = 720
        FiresWhileTurning     = Yes
      End
      AutoAcquireEnemiesWhenIdle = Yes 
      MoodAttackCheckRate        = 250
    End
  End

Edited by user Friday, July 14, 2017 9:52:08 PM(UTC)  | Reason: Not specified

Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
thanks 2 users thanked SkyMix_RMT for this useful post.
Unknown Editor on 7/15/2017(UTC), CommieDog on 8/23/2017(UTC)
Offline Unknown Editor  
#6 Posted : Saturday, July 15, 2017 1:07:22 PM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Originally Posted by: SkyMix_RMT Go to Quoted Post

AddModule
Behavior = AIUpdateInterface ModuleTag_Turret
Turret
ControlledWeaponSlots = PRIMARY
TurretTurnRate = 720
FiresWhileTurning = Yes
End
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
End
End


SkyMix_RMT You are a genius ; I had tried Everything Instead of these , How Didn't I even Think about AIUpdateInterface Yet ?
By the Way , Now Everything is Ready and Prepared ; Just they Look not Auto Attack ! The Code:

Code:
Weapon BunkerCannonWeapon
  PrimaryDamage               = 20.0
  PrimaryDamageRadius         = 0.0
  AttackRange                 = 200.0
  MinimumAttackRange          = 10.0
  DamageType                  = Small_Arms
  DeathType                   = NORMAL
  WeaponSpeed                 = 999999.0
  ProjectileObject            = NONE
  FireSound                   = ComancheWeaponMachineGun
  FireFX                      = WeaponFX_HeroicComanche20mmCannonFire
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots           = 50
  ClipSize                    = 10
  ClipReloadTime              = 3000
  AutoReloadsClip             = Yes
  AntiAirborneVehicle         = No
  AntiAirborneInfantry        = Yes
End

Object CivilianBunker01

  KindOf                = +CAN_ATTACK +ATTACK_NEEDS_LINE_OF_SIGHT

  WeaponSet
    Conditions          = None
    Weapon              = PRIMARY BunkerCannonWeapon
  End

AddModule
  Behavior = AIUpdateInterface ModuleTag_AttackAI
    Turret
      ControlledWeaponSlots    = PRIMARY
      TurretTurnRate           = 360
      FiresWhileTurning        = Yes
    End
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 240
  End
 End
End


Also a MAP :

Edited by user Saturday, July 15, 2017 1:10:47 PM(UTC)  | Reason: Private ; Better than not Specified

File Attachment(s):
Bunker_Test01.rar (34kb) downloaded 9 time(s).
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline Deinon  
#7 Posted : Saturday, July 15, 2017 7:51:51 PM(UTC)
Deinon
Captain
Joined: 5/11/2016(UTC)
Posts: 85

Thanks: 5 times
Was thanked: 4 time(s) in 4 post(s)
Originally Posted by: Unknown Editor Go to Quoted Post
Originally Posted by: SkyMix_RMT Go to Quoted Post

AddModule
Behavior = AIUpdateInterface ModuleTag_Turret
Turret
ControlledWeaponSlots = PRIMARY
TurretTurnRate = 720
FiresWhileTurning = Yes
End
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
End
End


SkyMix_RMT You are a genius ; I had tried Everything Instead of these , How Didn't I even Think about AIUpdateInterface Yet ?
By the Way , Now Everything is Ready and Prepared ; Just they Look not Auto Attack ! The Code:

Code:
Weapon BunkerCannonWeapon
  PrimaryDamage               = 20.0
  PrimaryDamageRadius         = 0.0
  AttackRange                 = 200.0
  MinimumAttackRange          = 10.0
  DamageType                  = Small_Arms
  DeathType                   = NORMAL
  WeaponSpeed                 = 999999.0
  ProjectileObject            = NONE
  FireSound                   = ComancheWeaponMachineGun
  FireFX                      = WeaponFX_HeroicComanche20mmCannonFire
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots           = 50
  ClipSize                    = 10
  ClipReloadTime              = 3000
  AutoReloadsClip             = Yes
  AntiAirborneVehicle         = No
  AntiAirborneInfantry        = Yes
End

Object CivilianBunker01

  KindOf                = +CAN_ATTACK +ATTACK_NEEDS_LINE_OF_SIGHT

  WeaponSet
    Conditions          = None
    Weapon              = PRIMARY BunkerCannonWeapon
  End

AddModule
  Behavior = AIUpdateInterface ModuleTag_AttackAI
    Turret
      ControlledWeaponSlots    = PRIMARY
      TurretTurnRate           = 360
      FiresWhileTurning        = Yes
    End
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 240
  End
 End
End


Also a MAP :

Nice little test map, but I'm not seeing any turret action from the bunkers. Dead

Is there anything specific I need to do to the CivilianBuilding.ini file, or can this be implemented purely through Map.ini?
Offline Unknown Editor  
#8 Posted : Saturday, July 15, 2017 11:40:03 PM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Originally Posted by: Deinon Go to Quoted Post

Nice little test map, but I'm not seeing any turret action from the bunkers. Dead

Is there anything specific I need to do to the CivilianBuilding.ini file, or can this be implemented purely through Map.ini?


The Only Problem Was It Wouldn't Work Automatically !
No AUTO Shots

But Then Understand It Needed "VisionRange" !!! The Newest Code :

Code:
Weapon BunkerCannonWeapon
  PrimaryDamage               = 25.0
  PrimaryDamageRadius         = 0.0
  AttackRange                 = 240.0
  MinimumAttackRange          = 10.0
  DamageType                  = Small_Arms
  DeathType                   = NORMAL
  WeaponSpeed                 = 999999.0
  ProjectileObject            = NONE
  FireSound                   = ComancheWeaponMachineGun
  FireFX                      = WeaponFX_HeroicComanche20mmCannonFire
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots           = 75
  ClipSize                    = 12
  ClipReloadTime              = 2500
  AutoReloadsClip             = Yes
  AntiAirborneVehicle         = No
  AntiAirborneInfantry        = Yes
End

Object CivilianBunker01

  VisionRange         = 240.0
  ShroudClearingRange = 360

  KindOf              = +CAN_ATTACK +ATTACK_NEEDS_LINE_OF_SIGHT

  WeaponSet
    Conditions        = None
    Weapon            = PRIMARY BunkerCannonWeapon
    AutoChooseSources = PRIMARY FROM_PLAYER FROM_AI FROM_SCRIPT
    PreferredAgainst  = PRIMARY INFANTRY VEHICLE
  End



AddModule
  Behavior = AIUpdateInterface ModuleTag_AttackAI
    Turret
      ControlledWeaponSlots   = PRIMARY
      TurretTurnRate          = 180
      FiresWhileTurning       = Yes
    End
    AutoAcquireEnemiesWhenIdle = Yes
    MoodAttackCheckRate        = 250
  End
 End
End


Now If You Garrison a Bunker With an Infantry as Soon as No Rangers are Close ,
You'll See The Bunker Will Attack them itself from Range 240 !
So , Don't Worry about the RPG Troopers Cool
The Map :

Edited by user Sunday, July 16, 2017 5:33:14 AM(UTC)  | Reason: Bunker_Test 01 - Version Alpha Aurora 03 has been Released

File Attachment(s):
Bunker_Test01.rar (38kb) downloaded 7 time(s).
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline Unknown Editor  
#9 Posted : Sunday, July 16, 2017 5:31:12 AM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Case Closed
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline SkyMix_RMT  
#10 Posted : Sunday, July 16, 2017 7:52:52 AM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
You also forgot to add the FIREPOINT.

It's optional, but makes it look much better, add this to the bunker code:

Code:

  ReplaceModule ModuleTag_01
    Draw = W3DModelDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes    
      ;Day
      DefaultConditionState
        Model         = CBBunker01
        WeaponFireFXBone = PRIMARY FIREPOINT
      End
      ConditionState = DAMAGED
        Model         = CBBunker01_D
      End
      ConditionState = REALLYDAMAGED
        Model         = CBBunker01_E
      End
      ConditionState = RUBBLE
        Model         = CBBunker01_R
      End
      ;Day garrisoned
      ;Day garrisoned
      ConditionState = GARRISONED
        Model         = CBBunker01_G
        Animation     = CBBunker01_G.CBBunker01_G
        AnimationMode = LOOP
      End
      ConditionState = DAMAGED GARRISONED
        Model         = CBBunker01_DG
        Animation     = CBBunker01_DG.CBBunker01_DG
        AnimationMode = LOOP
      End
      ConditionState = REALLYDAMAGED GARRISONED
        Model         = CBBunker01_EG
        Animation     = CBBunker01_EG.CBBunker01_EG
        AnimationMode = LOOP
      End
    End
  End
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
thanks 1 user thanked SkyMix_RMT for this useful post.
Unknown Editor on 7/16/2017(UTC)
Offline Unknown Editor  
#11 Posted : Sunday, July 16, 2017 9:31:02 AM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Yeah , Right ; Case Wasn't Close :D
This was a Great Idea , I was thinking Sth is Missed .
as soon we may find other things to add to it too .
in a case that this topic will be a HOT & SPICY topic :-)
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline Deinon  
#12 Posted : Sunday, July 16, 2017 9:33:48 PM(UTC)
Deinon
Captain
Joined: 5/11/2016(UTC)
Posts: 85

Thanks: 5 times
Was thanked: 4 time(s) in 4 post(s)
Awesome! Thanks! Works beautifully, and we don't even have to screw around with core game files.

I'm trying to add it to the GuardTower object now too. It works, but it only ever fires from the very bottom of the tower, even if you're trying to target aircraft. Is there a different WeaponFireFXBone I need to be using, other than PRIMARY FIREPOINT, so it'll always fire from the top of the tower? I don't suppose their names are listed anywhere...

Edited by user Sunday, July 16, 2017 9:34:59 PM(UTC)  | Reason: Not specified

Offline Zatsupachi  
#13 Posted : Monday, July 17, 2017 5:02:37 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
If you open up 'CBTower2_G' the model with GMax/RenX pressing 'H' will list all of the model's components.

I'm not entirely sure why FIREPOINT isn't working for you unless you're using projectiles.
If you want projectiles launching off you need WeaponLaunchBone = PRIMARY FIREPOINT01

Either or maybe it's FIREPOINT01(there's up to 40, I don't know why.)
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline Deinon  
#14 Posted : Tuesday, July 18, 2017 12:15:25 AM(UTC)
Deinon
Captain
Joined: 5/11/2016(UTC)
Posts: 85

Thanks: 5 times
Was thanked: 4 time(s) in 4 post(s)
Originally Posted by: Zatsupachi Go to Quoted Post
If you open up 'CBTower2_G' the model with GMax/RenX pressing 'H' will list all of the model's components.

I'm not entirely sure why FIREPOINT isn't working for you unless you're using projectiles.
If you want projectiles launching off you need WeaponLaunchBone = PRIMARY FIREPOINT01

Either or maybe it's FIREPOINT01(there's up to 40, I don't know why.)
Leaving out PRIMARY makes the game blow up. Big Smile

Using FIREPOINT01 results in the machine gun still firing from the base of the tower. I suppose I can play around with it, the whole idea was that the civilian bunker has a powerful machine gun which can only target ground units and the guard tower has a weaker machine gun which can target both air and ground. I'd hoped to get it so it will adjust the height from which the machine gun is fired inside the tower (as garrisoned units such as the rocket launcher in the tower can be seen doing).

Edited by user Tuesday, July 18, 2017 12:16:46 AM(UTC)  | Reason: Not specified

File Attachment(s):
TowerMG.png (2,490kb) downloaded 13 time(s).
Offline Zatsupachi  
#15 Posted : Tuesday, July 18, 2017 9:19:26 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
I think I see the problem.

In Object GuardTower, it starts with 'ConditionState = NONE' as the default model which means, garrisoned version will not get from any other ConditionState.

Making a DefaultConditionState makes it so that if ever a specific bone is called from another model, it will call from the DefaultConditionState.

Code:

ReplaceModule ModuleTag_01
  Draw = W3DModelDraw ModuleTag_01
  OkToChangeModelColor = Yes

    DefaultConditionState ;Changed from ConditionState =None
      Model         = CBTower2
      WeaponFireFXBone = PRIMARY FIREPOINT01 ;For projectiles it's WeaponLaunchBone
    End
    ConditionState = DAMAGED
      Model         = CBTower2_D
    End
    ConditionState = REALLYDAMAGED
      Model         = CBTower2_E
    End
    ConditionState = RUBBLE
      Model         = CBTower2_R
    End

    ConditionState = GARRISONED
      Model         = CBTower2_G
      Animation     = CBTower2_G.CBTower2_G
      AnimationMode = LOOP
    End
    ConditionState = DAMAGED GARRISONED
      Model         = CBTower2_DG
      Animation     = CBTower2_DG.CBTower2_DG
      AnimationMode = LOOP
    End
  End
End

Edited by user Tuesday, July 18, 2017 9:21:09 AM(UTC)  | Reason: Not specified

"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
thanks 2 users thanked Zatsupachi for this useful post.
SkyMix_RMT on 7/18/2017(UTC), Deinon on 7/20/2017(UTC)
Offline Deinon  
#16 Posted : Thursday, July 20, 2017 11:33:08 PM(UTC)
Deinon
Captain
Joined: 5/11/2016(UTC)
Posts: 85

Thanks: 5 times
Was thanked: 4 time(s) in 4 post(s)
Works beautifully! Thanks!
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.