NewNightmare
14 years ago
So I have created few new unit recently, and 2 of them have bugs,
1st one, a 'dual' cannon on marauder hull, with turret moved slightly to the back, doesn't aim properly, what it does is it focuses one of the barrels (the closest one angle-wise) on the target (leaving the other one slightly off), I'm attaching Sshots. it looks good when firing @ units in front of him, since there's almost 0 angle change..

and 2nd one, a truck technical with turret, the game simply rejects the damaged version, regardless of the order _D model does NOT appear at all( same with death OCL's _D1 to _D3), but if I put the 'healthy' one in REALLYDAMAGED state the unit does basically stay the same thoughout whole health.
Also, another thing worth attention is that while HideSubObject IS working, ShowSubObject isnt, putting both in the Defaultconditionstate / NONE conditionstate does nothing,
I do have the "OkToChangeModelColor = Yes" if it matters... co-accidentally, it's my 1st wheeled model I've ever done..
  sshot047.JPG (289kb) downloaded 5 time(s).   sshot046.JPG (294kb) downloaded 3 time(s).   sshot044.JPG (287kb) downloaded 2 time(s).   sshot043.JPG (292kb) downloaded 4 time(s).
Sponsor
precision_bomber
14 years ago
Not totally sure but...

About the first glitch, I think you have go to RenX then Fix and Find the Pivot point for the turret. Then, go to the INIs if there's something ain't right.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
NewNightmare
14 years ago
Yeah, the turret aiming bug was caused by CHASSIS not being centered @ 0,0,0.
Working on the disappearing stuff now
NewNightmare
14 years ago
hmm... no idea... I've managed to get ShowSubObject working, dunno how.. I copied and edited SCUD's model draw module, I'm posting the code for the unit, dunno where the bug might be.
Object Demo_GLAVehicleFieldBarracks

  ; *** ART Parameters ***
  SelectPortrait         = SUTechnical_L ;temp 
  ButtonImage            = SUTechnical ;temp

  UpgradeCameo1 = Upgrade_GLAJunkRepair

  Draw = W3DTruckDraw ModuleTag_01
    OkToChangeModelColor = Yes
  
    DefaultConditionState
      Model = UVFieldBarracks
      Turret = TURRET
      ShowSubObject = ASD
      HideSubObject = UPPART HOUSECOLOR04 BARRELFX01
      WeaponLaunchBone = PRIMARY MUZZLE
    End

    ConditionState = REALLYDAMAGED
      Model = UVFieldBarracks_D
    End
    AliasConditionState = RUBBLE

    ConditionState = WEAPONSET_CRATEUPGRADE_ONE
      Model = UVFieldBarracks
      Turret = TURRET
      ShowSubObject = ASD HOUSECOLOR04
      HideSubObject = UPPART BARRELFX01
      WeaponLaunchBone = PRIMARY MUZZLE
    End

    ConditionState = WEAPONSET_CRATEUPGRADE_ONE REALLYDAMAGED
      Model = UVFieldBarracks_D
      Turret = TURRET
      ShowSubObject = ASD HOUSECOLOR04
      HideSubObject = UPPART BARRELFX01
      WeaponLaunchBone = PRIMARY MUZZLE
    End
    AliasConditionState = WEAPONSET_CRATEUPGRADE_ONE RUBBLE

    ConditionState = WEAPONSET_CRATEUPGRADE_TWO
      Model = UVFieldBarracks
      Turret = TURRET
      ShowSubObject = ASD HOUSECOLOR04 UPPART
      WeaponLaunchBone = PRIMARY MUZZLE
      WeaponFireFXBone  = PRIMARY MUZZLE
      WeaponMuzzleFlash = PRIMARY BARRELFX
      WeaponRecoilBone  = PRIMARY BARREL
     
    End

    ConditionState = WEAPONSET_CRATEUPGRADE_TWO REALLYDAMAGED
      Model = UVFieldBarracks_D
      Turret = TURRET
      ShowSubObject = ASD HOUSECOLOR04 UPPART
      WeaponLaunchBone = PRIMARY MUZZLE
      WeaponFireFXBone  = PRIMARY MUZZLE
      WeaponMuzzleFlash = PRIMARY BARRELFX
      WeaponRecoilBone  = PRIMARY BARREL
    End
    AliasConditionState = WEAPONSET_CRATEUPGRADE_TWO RUBBLE

    TrackMarks = EXTireTrack.tga

    Dust = ScudLauncherDust
    DirtSpray = RocketBuggyDirtSpray
    PowerslideSpray = RocketBuggyDirtPowerSlide

    ; These parameters are only used if the model has a separate suspension, 
    ; and the locomotor has HasSuspension = Yes.
    LeftFrontTireBone = Tire01
    RightFrontTireBone = Tire02
    LeftRearTireBone = Tire05
    RightRearTireBone = Tire06
    MidLeftRearTireBone = Tire03
    MidRightRearTireBone = Tire04

    TireRotationMultiplier = 0.2   ; this * speed = rotation.
    ;PowerslideRotationAddition = 0.0   ; This speed is added to the rotation speed when powersliding.

  End


  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:FieldBarracks
  Side                = GLADemolitionGeneral
  EditorSorting       = VEHICLE
  TransportSlotCount  = 3                 ;how many "slots" we take in a transport (0 == not transportable)

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY ToxinTruckGun
    Weapon = SECONDARY TerroristSuicideNotARealWeapon
    AutoChooseSources = SECONDARY NONE
  End
  WeaponSet
    Conditions = CRATEUPGRADE_ONE
    Weapon = PRIMARY FieldBarToxUp
    Weapon = SECONDARY TerroristSuicideNotARealWeapon
    AutoChooseSources = SECONDARY NONE
  End
  WeaponSet
    Conditions = CRATEUPGRADE_TWO
    Weapon = PRIMARY FieldBarToxUp
    Weapon = SECONDARY TerroristSuicideNotARealWeapon
    AutoChooseSources = SECONDARY NONE
  End
  ArmorSet
    Conditions      = None
    Armor           = FieldBar
    DamageFX        = TruckDamageFX
  End
  ArmorSet
    Conditions      = CRATE_UPGRADE_ONE
    Armor           = FieldBar
    DamageFX        = TruckDamageFX
  End
  ArmorSet
    Conditions      = CRATE_UPGRADE_TWO
    Armor           = FieldBarUp
    DamageFX        = TruckDamageFX
  End

  BuildCost            = 650
  BuildTime            = 6.5          ;in seconds    
  VisionRange           = 150
  ShroudClearingRange   = 300
  Prerequisites
    Object = Demo_GLAArmsDealer
  End

  ExperienceValue         = 30 30 60 120    ;Experience point value at each level
  ExperienceRequired      = 0 60 90 180  ;Experience points needed to gain each level
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel            = 2  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel          = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = Demo_GLAVehicleFieldBarracksCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = TechnicalVoiceSelect
  VoiceMove = TechnicalVoiceMove
  VoiceGuard = TechnicalVoiceMove
  VoiceAttack = TechnicalVoiceAttack
  SoundMoveStart = TechnicalMoveStart
  SoundMoveStartDamaged = TechnicalMoveStart
  SoundEnter = HumveeEnter
  SoundExit = HumveeExit

  UnitSpecificSounds
  ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
    VoiceCreate          = TechnicalVoiceCreate
    TurretMoveStart = NoSound
    TurretMoveLoop = TurretMoveLoop
    TruckLandingSound = RocketBuggyLand
    TruckPowerslideSound = RocketBuggyPowerslide
    VoiceSalvage = TechnicalVoiceSalvage
    VoiceCrush      = TechnicalVoiceCrush
    VoiceUnload     = TechnicalVoiceUnload
    VoiceEnter = TechnicalVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS SALVAGER WEAPON_SALVAGER VEHICLE SCORE TRANSPORT

;  Behavior = VeterancyGainCreate ModuleTag_03
;    StartingLevel = VETERAN
;    ScienceRequired = SCIENCE_TechnicalTraining
;  End

  Body = ActiveBody ModuleTag_04
    MaxHealth       = 250
    InitialHealth   = 250

    ; 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 = 360
    SubdualDamageHealRate = 500
    SubdualDamageHealAmount = 50
  End
  Behavior = AIUpdateInterface ModuleTag_05
    Turret
      TurretTurnRate = 180       ; turn rate, in degrees per sec
      ControlledWeaponSlots = PRIMARY SECONDARY
    End
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL FieldBarracksLocomotor
  
  Behavior = PhysicsBehavior ModuleTag_06
    Mass = 50.0
  End
  
  Behavior = AutoHealBehavior ModuleTag_07
    HealingAmount = 2
    HealingDelay = 1000 ; msec
    TriggeredBy = Upgrade_GLAJunkRepair
  End

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

  Behavior                 = TransitionDamageFX ModuleTag_10
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_11
    DeathTypes = NONE +CRUSHED +SPLATTED
  End

  ; A crushing defeat
  Behavior = FXListDie ModuleTag_12
    DeathTypes = NONE +CRUSHED +SPLATTED
    DeathFX = FX_CarCrush
  End
  Behavior = CreateObjectDie ModuleTag_13
    DeathTypes = NONE +CRUSHED +SPLATTED
    CreationList = OCL_TechnicalJeep_CrushEffect
  End
  Behavior = CreateCrateDie ModuleTag_14
    CrateData = SalvageCrateData
    ;CrateData = EliteTankCrateData
    ;CrateData = HeroicTankCrateData
  End

  Behavior = SlowDeathBehavior ModuleTag_15
    DeathTypes = ALL -CRUSHED -SPLATTED
    DestructionDelay = 500
    DestructionDelayVariance = 1500
    OCL = INITIAL OCL_FieldBarDeath
    FX = INITIAL FX_CrusaderCatchFire
  End

  Behavior = CommandSetUpgrade ModuleTag_16
    CommandSet = Demo_GLAVehicleFieldBarracksCommandSetUpgrade
    TriggeredBy = Demo_Upgrade_SuicideBomb
  End

  Behavior = TransportContain ModuleTag_17
    PassengersAllowedToFire = Yes
    Slots = 4
    AllowInsideKindOf   = INFANTRY
    DamagePercentToUnits = 50%
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
    HealthRegen%PerSec    = 25
  End 

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

End

P.S, The OCL is not working either (except for the FX, which is crusauder's)
which is:
ObjectCreationList OCL_FieldBarDeath
  CreateObject
    ObjectNames = DeadFieldBarracksHulk
    Offset = X:0 Y:0 Z:0
    Count = 1
    Disposition = SEND_IT_FLYING
    DispositionIntensity = 0.1
  End
  CreateDebris
    ModelNames = UVFieldBarracks_D2
    Offset = X:-4.678 Y:6.497 Z:2.993
    Mass = 5.0
    Count = 1
    Disposition = SEND_IT_FLYING
    DispositionIntensity = 2.5
  End
  CreateDebris
    ModelNames = UVFieldBarracks_D3
    Offset = X:-4.678 Y:6.497 Z:2.993
    Mass = 5.0
    Count = 1
    Disposition = SEND_IT_FLYING
    DispositionIntensity = 1.5
    Offset = X:11.069 Y:5.212 Z:2.211
  End
  CreateDebris
    ModelNames = UVFieldBarracks_D3
    Offset = X:-4.678 Y:6.497 Z:2.993
    Mass = 5.0
    Count = 1
    Disposition = SEND_IT_FLYING
    DispositionIntensity = 1.5
    Offset = X:11.069 Y:-5.194 Z:2.211
  End
End
I do have all models in W3D folder