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?
|
|
|
|
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 I'll Try to Figure it out A.S.A.P 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% |
|
|
|
General Joined: 3/8/2016(UTC) Posts: 1,156 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 |
|
|
|
|
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! |
|
|
|
Major Joined: 2/21/2015(UTC) Posts: 386 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 |
|
2 users thanked SkyMix_RMT for this useful post.
|
|
|
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 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 |
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% |
|
|
|
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 Originally Posted by: SkyMix_RMT 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. Is there anything specific I need to do to the CivilianBuilding.ini file, or can this be implemented purely through Map.ini?
|
|
|
|
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 Nice little test map, but I'm not seeing any turret action from the bunkers. 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 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 |
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% |
|
|
|
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)
|
|
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% |
|
|
|
Major Joined: 2/21/2015(UTC) Posts: 386 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
|
|
1 user thanked SkyMix_RMT for this useful post.
|
|
|
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% |
|
|
|
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
|
|
|
|
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.) |
|
|
|
|
Captain Joined: 5/11/2016(UTC) Posts: 85
Thanks: 5 times Was thanked: 4 time(s) in 4 post(s)
|
Originally Posted by: Zatsupachi 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. 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
|
|
|
|
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 |
|
2 users thanked Zatsupachi for this useful post.
|
|
|
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.