:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat Nov 18, 2017 8:29 am
All times are UTC + 0
 Forum index » Modding Central » Generals Editing Forum
Making 3 Turret
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
red2cracker
Vehicle Driver


Joined: 13 Feb 2013

PostPosted: Mon Dec 16, 2013 6:52 am    Post subject:   Making 3 Turret
Subject description: three turret is possible in generals?
Reply with quote

hi, i maked boat.

boat has 3 turret. Turret, AltTurret, Overlord Turret.

but Overlord Turret doesn't work.

In Screenshot, overlord gattling turret doing fire, but watching wrong place.

here's code.

sorry for bad english.

Code:


;------------------------------------------------------------------------------
Object SouthKoreaVehicleChamsuri

  ; *** ART Parameters ***
  SelectPortrait         = SNOverlord_L
  ButtonImage            = SNOverlord
  
  UpgradeCameo1 = Upgrade_ChinaUraniumShells
  UpgradeCameo2 = Upgrade_ChinaNuclearTanks
  UpgradeCameo3 = Upgrade_ChinaOverlordBattleBunker
  UpgradeCameo4 = Upgrade_ChinaOverlordGattlingCannon
  UpgradeCameo5 = Upgrade_ChinaOverlordPropagandaTower
  
  
  Draw = W3DOverlordTankDraw ModuleTag_01
    ConditionState        = NONE
      Model               = KVChamsuri ;NVOvrlrd
      ;레이다 돌아감 -_-zz
      ;Animation           = NVOvrlrd.NVOvrlrd
      ;AnimationMode       = LOOP
      Turret              = Turret01
      TurretPitch         = TurretEL01
      AltTurret           = Turret02
      AltTurretPitch      = TurretEL02

      WeaponFireFXBone    = PRIMARY Tur1Muzzle ;Muzzle
      WeaponRecoilBone    = PRIMARY Tur1Barrel ;Barrel
      ;WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Tur1Muzzle ;Muzzle

      WeaponFireFXBone    = SECONDARY Tur2Muzzle ;Muzzle
      ;WeaponRecoilBone    = SECONDARY Tur2Barrel ;Barrel
      ;WeaponMuzzleFlash   = SECONDARY MuzzleFX
      WeaponLaunchBone = SECONDARY Tur2Muzzle ;Muzzle

      ;ParticleSysBone   = TreadFX01 BattleShipWaterRipples
      ;ParticleSysBone   = TreadFX02 BattleShipWaterRipples
      ;ParticleSysBone   = TreadFX03 BattleShipWaterRipples
      ;ParticleSysBone   = TreadFX04 BattleShipWaterRipples
      ;ParticleSysBone   = TreadFX05 BattleShipWaterRipples ;WaveSpray01
    End
    ConditionState        = REALLYDAMAGED
      Model               = KVChamsuri ;NVOvrlrd_d
      ;Animation           = NVOvrlrd_d.NVOvrlrd_d
      ;AnimationMode       = LOOP
      Turret              = Turret01
      TurretPitch         = TurretEL01
      AltTurret           = Turret02
      AltTurretPitch      = TurretEL02

      WeaponFireFXBone    = PRIMARY Tur1Muzzle ;Muzzle
      WeaponRecoilBone    = PRIMARY Tur1Barrel ;Barrel
      ;WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Tur1Muzzle ;Muzzle

      WeaponFireFXBone    = SECONDARY Tur2Muzzle ;Muzzle
      ;WeaponRecoilBone    = SECONDARY Tur2Barrel ;Barrel
      ;WeaponMuzzleFlash   = SECONDARY MuzzleFX
      WeaponLaunchBone = SECONDARY Tur2Muzzle ;Muzzle
    End

    ConditionState        = RUBBLE
      Model               = KVChamsuri ;NVOvrlrd_d
      Turret              = Turret01
      TurretPitch         = TurretEL01
      AltTurret           = Turret02
      AltTurretPitch      = TurretEL02

      WeaponFireFXBone    = PRIMARY Tur1Muzzle ;Muzzle
      WeaponRecoilBone    = PRIMARY Tur1Barrel ;Barrel
      ;WeaponMuzzleFlash   = PRIMARY MuzzleFX
      WeaponLaunchBone = PRIMARY Tur1Muzzle ;Muzzle

      WeaponFireFXBone    = SECONDARY Tur2Muzzle ;Muzzle
      ;WeaponRecoilBone    = SECONDARY Tur2Barrel ;Barrel
      ;WeaponMuzzleFlash   = SECONDARY MuzzleFX
      WeaponLaunchBone = SECONDARY Tur2Muzzle ;Muzzle
    End

    ;배틀쉽은 별로.. 콜드워 수륙양용 파티클로 바꿔봐야 겠음 -_-a
    ;ConditionState = MOVING
      ;Model               = KVChamsuri
      ;ParticleSysBone   = EXHAUSTFX01 BattleShipWaterRipples ;DozerSmokeHeavy
      ;WaitForStateToFinishIfPossible = TRANS_DIGGING
    ;End

    ;TrackMarks           = EXTnkTrack.tga
    OkToChangeModelColor = No ;es
    ;TreadAnimationRate = 2.0;  amount of tread texture to move per second
    ;TreadDriveSpeedFraction = 0.3  ; fraction of locomotor speed below which treads stop moving.
    ;TreadPivotSpeedFraction = 0.6  ; fraction of locomotor speed below which we allow pivoting.
  End

  ;씨발칸 포신 회전하는걸을 넣어야 하니까 -_-a 레이다는 따로 분리시켰다.
  ;한 유닛에 애니메이션은 한개만 되니까..
  Draw = W3DModelDraw ModuleTag_Radar
    DefaultConditionState ;ConditionState        = NONE
      Model               = KVChamsuri_R ;NVOvrlrd
      ;레이다 돌아감 -_-zz
      Animation           = KVChamsuri_R.KVChamsuri_R
      AnimationMode       = LOOP
      ;총 80프레임(배틀쉽 참고)
    End
  End

  ;from CWCruBMD1.ini
;  Draw = W3DModelDraw Module_ParticleEffects
;    DefaultConditionState
;      Model = CWCruBRDM2_W
;    End
;    AliasConditionState = REALLYDAMAGED
;    AliasConditionState = RUBBLE

;    ConditionState = OVER_WATER
;      Model = CWCruBRDM2_W
;      ;ParticleSysBone = WATER01 CWCgenAmphibWaveRest
;      ;ParticleSysBone = WATER02 CWCgenAmphibWaveRest
;    End
;    AliasConditionState = OVER_WATER REALLYDAMAGED
;    AliasConditionState = OVER_WATER RUBBLE

;    ConditionState = OVER_WATER MOVING
;      Model = CWCruBRDM2_W
;      ParticleSysBone = WATER03 CWCgenAmphibWave1
;    End
;    AliasConditionState = OVER_WATER MOVING REALLYDAMAGED
;    AliasConditionState = OVER_WATER MOVING RUBBLE
;  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Chamsuri
  Side                = SouthKorea
  EditorSorting       = VEHICLE
  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)
  WeaponSet
    Conditions        = None
    Weapon            = PRIMARY Chamsuri40mmGun
    Weapon            = SECONDARY Chamsuri20mmSeaVulcan
;    Weapon            = TERTIARY GattlingBuildingGunAirDummy
  End
;  WeaponSet
;    Conditions        = PLAYER_UPGRADE
;    Weapon            = PRIMARY Chamsuri40mmGun ;OverlordTankGun
;    Weapon            = SECONDARY Chamsuri20mmSeaVulcan ;GattlingBuildingGunAirDummy ;Dummy weapon that allows manual targeting of air units outside range
;                                                              ;gattling cannon upgrade has been made.
;  End
  ArmorSet
    Conditions        = None
    Armor             = TankArmor
    DamageFX          = TankDamageFX
  End
  BuildCost       = 1000 ;2000
  BuildTime       = 1.0 ;20.0          ;in seconds    
  VisionRange     = 150
  ShroudClearingRange = 200
  Prerequisites
    ;Object = ChinaWarFactory
    ;Object = ChinaPropagandaCenter
  End

  ExperienceValue = 200 200 400 600   ;Experience point value at each level
  ExperienceRequired = 0 400 600 1200  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrusherLevel           = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet = SouthKoreaVehicleChamsuriCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = OverlordTankVoiceSelect
  ;SoundMoveStart = OverlordTankMoveStart
  ;SoundMoveStartDamaged = OverlordTankMoveStart
  VoiceMove = OverlordTankVoiceMove
  VoiceGuard = OverlordTankVoiceMove
  VoiceAttack = OverlordTankVoiceAttack

  UnitSpecificSounds
    ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = OverlordTankVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = OverlordTankTurretMoveLoop
    VoiceCrush = OverlordTankVoiceCrush
    VoiceEnter = OverlordTankVoiceMove
    VoiceUnload     = OverlordTankVoiceUnload
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE HUGE_VEHICLE
  
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 1000.0
    InitialHealth   = 1000.0

    ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health.
    ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
    SubdualDamageCap = 2200
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End

;  Behavior = TransportAIUpdate ModuleTag_03
;    Turret
;      TurretTurnRate = 60 ;30 ;15   // turn rate, in degrees per sec
;      ControlledWeaponSlots = PRIMARY
;    End
;    AutoAcquireEnemiesWhenIdle = Yes
;  End

  Behavior = TransportAIUpdate ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY
      TurretTurnRate      = 180
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
     End
    AltTurret
      ControlledWeaponSlots = SECONDARY
      TurretTurnRate      = 180
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      NaturalTurretAngle  = 180 ;이걸 추가해야 부포탑이 뒤쪽을 보게 된다. -_-zz
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Locomotor = SET_NORMAL BasicBoatLocomotor2 ;OverlordLocomotor
  ;Locomotor = SET_NORMAL_UPGRADED NuclearOverlordLocomotor

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_04
    DeathWeapon   = NuclearTankDeathWeapon
    StartsActive  = No                        ; turned on by upgrade
    TriggeredBy   = Upgrade_ChinaNuclearTanks
  End
  Behavior = LocomotorSetUpgrade ModuleTag_05
    TriggeredBy = Upgrade_ChinaNuclearTanks
  End

  Behavior = OverlordContain ModuleTag_06 ; Like Transport, but when full, passes transport queries along to first passenger (redirects like tunnel)
    Slots                 = 1
    DamagePercentToUnits        = 100%
    AllowInsideKindOf     = PORTABLE_STRUCTURE
    PassengersAllowedToFire = Yes
    PassengersInTurret = Yes ; My passengers ride in my turret, that's where the Firepoint bones are
    ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills
  End

  Behavior = PhysicsBehavior ModuleTag_14
    Mass = 50.0
  End



  ; Smoke for a bit then explode
;  Behavior = SlowDeathBehavior
;;    ProbabilityModifier = 25
;    DestructionDelay = 1500
;    DestructionDelayVariance = 500
;    FX  = INITIAL   FX_OverlordSmoke
;    OCL = FINAL     OCL_ChinaTankOverlordDebris
;    FX  = FINAL     FX_GenericTankDeathExplosion
;  End
  
  ; Catch fire, and explode death
;  Behavior = SlowDeathBehavior
;;    ProbabilityModifier = 25
;    DestructionDelay = 2000
;    DestructionDelayVariance = 300
;    FX  = INITIAL  FX_CrusaderCatchFire
;    OCL = FINAL    OCL_ChinaTankOverlordDebris
;    FX  = FINAL    FX_GenericTankDeathExplosion
;  End

  ; Just explode death
  Behavior = SlowDeathBehavior ModuleTag_16
    ProbabilityModifier = 25
    DestructionDelay = 200
    DestructionDelayVariance = 100
    OCL = FINAL    OCL_ChinaTankOverlordDebris
    FX  = FINAL    FX_OverlordExplosionOneFinal
  End
  Behavior = CreateCrateDie ModuleTag_17
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = TransitionDamageFX ModuleTag_18
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_OverlordDamageTransition
  End

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

;  Behavior = ObjectCreationUpgrade ModuleTag_Z01
;    UpgradeObject = OCL_Chamsuri20mmSeaVulcan ;OCL_TaniOhGattlingCannon
;    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon
;  End

;  Behavior = GrantUpgradeCreate ModuleTag_Z02
;    UpgradeToGrant = Upgrade_ChinaOverlordGattlingCannon
;    ExemptStatus = UNDER_CONSTRUCTION
;  End

  Behavior = StealthDetectorUpdate ModuleTag_22
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    DetectionRange = 250 ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End

  Geometry = BOX
  GeometryMajorRadius = 26.0
  GeometryMinorRadius = 13.0
  GeometryHeight = 15.0    
  GeometryIsSmall = No
  Shadow = SHADOW_VOLUME    
  ShadowSizeX = 45  ; minimum elevation angle above horizon. Used to limit shadow length

End


;참수리 20mm 씨발칸(Sea Vulcan)
Object Chamsuri20mmSeaVulcan

  ; *** ART Parameters ***
  SelectPortrait         = SNGatTower_L
  ButtonImage            = SNGatTower

  Draw                    = W3DDependencyModelDraw ModuleTag_01
    OkToChangeModelColor  = No ;Yes
    AttachToBoneInContainer = FIREPOINT01

    DefaultConditionState
      Model               = KVChamsuri_G ;MVTaniOh_G
      Animation           = KVChamsuri_G.KVChamsuri_G ;MVTaniOh_G.MVTaniOh_G
      AnimationMode       = MANUAL
      Turret              = TURRET01
      TurretPitch         = TURRETEL01
      WeaponFireFXBone    = PRIMARY TUR1MUZZLE
      WeaponMuzzleFlash   = PRIMARY TUR1MUZZLEFX
    End
    AliasConditionState = REALLYDAMAGED

    ConditionState        = CONTINUOUS_FIRE_SLOW
      Model               = KVChamsuri_G ;MVTaniOh_G
      Animation           = KVChamsuri_G.KVChamsuri_G ;MVTaniOh_G.MVTaniOh_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 2.0 2.0
    End
    AliasConditionState = CONTINUOUS_FIRE_SLOW REALLYDAMAGED
    
    ConditionState       = CONTINUOUS_FIRE_MEAN
      Model               = KVChamsuri_G ;MVTaniOh_G
      Animation           = KVChamsuri_G.KVChamsuri_G ;MVTaniOh_G.MVTaniOh_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 2.0 2.0
    End
    AliasConditionState = CONTINUOUS_FIRE_MEAN REALLYDAMAGED

    ConditionState        = CONTINUOUS_FIRE_FAST
      Model               = KVChamsuri_G ;MVTaniOh_G
      Animation           = KVChamsuri_G.KVChamsuri_G ;MVTaniOh_G.MVTaniOh_G
      AnimationMode       = LOOP
      AnimationSpeedFactorRange = 2.0 2.0
      ParticleSysBone    = TUR1MUZZLE GattlingMuzzleSmoke
    End
    AliasConditionState = CONTINUOUS_FIRE_FAST REALLYDAMAGED

  End

  ; ***DESIGN parameters ***
  Side             = SouthKorea
  EditorSorting    = SYSTEM
  TransportSlotCount = 1
  WeaponSet
    Conditions          = None
    Weapon              = PRIMARY   Chamsuri20mmSeaVulcan ;P4TaniOhGattling
  End
  
  ArmorSet
    Conditions     = None
    Armor          = InvulnerableAllArmor
  End
  VisionRange     = 200

  ; *** AUDIO Parameters ***
  UnitSpecificSounds
    TurretMoveStart = NoSound
    TurretMoveLoop  = NoSound
    VoiceRapidFire  = NoSound
  End

  ; *** ENGINEERING Parameters ***
  KindOf            = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CLICK_THROUGH IGNORED_IN_GUI
    Body            = StructureBody ModuleTag_02
    MaxHealth       = 100.0
    InitialHealth   = 100.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY
      TurretTurnRate      = 180
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      NaturalTurretAngle = 180
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End

  Behavior             = DestroyDie ModuleTag_04
    ;nothing
  End

  Behavior = StealthDetectorUpdate ModuleTag_06
    DetectionRate   = 500
    CanDetectWhileContained   = Yes
  End

  Geometry            = BOX
  GeometryMajorRadius = 8.0
  GeometryMinorRadius = 8.0
  GeometryHeight      = 9.0
  GeometryIsSmall     = No      
  Shadow              = SHADOW_VOLUME
  ShadowSizeX = 45

End




turret_error_marked.jpg
 Description:
 Filesize:  943.62 KB
 Viewed:  1657 Time(s)

turret_error_marked.jpg



kvchamsuri.zip
 Description:

Download
 Filename:  kvchamsuri.zip
 Filesize:  32.14 KB
 Downloaded:  36 Time(s)


Back to top
View user's profile Send private message Visit poster's website
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Mon Dec 16, 2013 6:09 pm    Post subject: Reply with quote

I assume you mean it does fire, but doesn't face the target?
Some stuff I noticed:
Code:
;  Behavior = ObjectCreationUpgrade ModuleTag_Z01
;    UpgradeObject = OCL_Chamsuri20mmSeaVulcan ;OCL_TaniOhGattlingCannon
;    TriggeredBy   = Upgrade_ChinaOverlordGattlingCannon
;  End

;  Behavior = GrantUpgradeCreate ModuleTag_Z02
;    UpgradeToGrant = Upgrade_ChinaOverlordGattlingCannon
;    ExemptStatus = UNDER_CONSTRUCTION
;  End

Why are these commented out? I assume you did this to test, but without these the Gattling Cannon won't spawn with the vehicle.

Code:
  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY
      TurretTurnRate      = 180
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      -->NaturalTurretAngle = 180<--
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End

Compared with the Overlord Gattling Cannon code I only see the NaturalTurretAngle as being odd, and the fact that you are missing the MoodAttackCheckRate (which shouldn't matter that much). Compare it with the Overlord Gattling Cannon's AIUpdateInterface:
Code:

  Behavior = AIUpdateInterface ModuleTag_03
    Turret
      ControlledWeaponSlots = PRIMARY SECONDARY
      TurretTurnRate      = 180   // turn rate, in degrees per sec
      TurretPitchRate     = 180
      AllowsPitch         = Yes
      FiresWhileTurning   = Yes
      NaturalTurretPitch  = 20 ; this keeps it aimed half way between land and sky
      MinIdleScanInterval   = 250    ; in milliseconds
      MaxIdleScanInterval   = 250   ; in milliseconds
      MinIdleScanAngle      = 0       ; in degrees off the natural turret angle
      MaxIdleScanAngle      = 360     ; in degrees off the natural turret angle
    End
    AutoAcquireEnemiesWhenIdle = Yes ;ATTACK_BUILDINGS; defensive weapon
    MoodAttackCheckRate        = 50
  End

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message Send e-mail MSN Messenger
red2cracker
Vehicle Driver


Joined: 13 Feb 2013

PostPosted: Thu Dec 19, 2013 8:40 am    Post subject: Thanks. but it still don't work... Reply with quote

Thanks. but it still don't work...

i hope that someone upload correct ini file.

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Generals Editing Forum
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 1.5834s ][ Queries: 15 (1.4497s) ][ Debug on ]