Posted by: Japie19 - Tuesday, May 1, 2012 2:26:00 AM
Hello,
I have been trying the last time to replace the laser turret of the avenger by my own modelled rocket turret, but it doesn't show up.
Here is the code of the rocket turret.
[code= cpp]
Object AmericaTankAvengerRocketTurret ; Seperate turret object so it can attack independantly
; *** ART Parameters ***
SelectPortrait = SNPropSpeaker_L
ButtonImage = SNPropSpeaker
UpgradeCameo1 = Upgrade_Nationalism
UpgradeCameo2 = Upgrade_ChinaUraniumShells
UpgradeCameo3 = Upgrade_ChinaNuclearTanks
;UpgradeCameo4 = NONE
UpgradeCameo5 = Upgrade_ChinaOverlordPropagandaTower
Draw = W3DDependencyModelDraw ModuleTag_01
OkToChangeModelColor = Yes
ExtraPublicBone = Barrel01
ExtraPublicBone = Barrel02
ExtraPublicBone = Base
ExtraPublicBone = TurretTel01
ExtraPublicBone = Turret01
ExtraPublicBone = FireFX01
ExtraPublicBone = FireFX02
ExtraPublicBone = Smoke01
ExtraPublicBone = Smoke02
AttachToBoneInContainer = FIREPOINT01
DefaultConditionState
Model = avenger_rocket_turret ; name of my model
Turret = Turret01
TurretPitch = TurreTel01
WeaponLaunchBone = PRIMARY FireFX1
WeaponLaunchBone = SECONDARY FireFX2
WeaponFireFXBone = PRIMARY FireFX1
WeaponFireFXBone = SECONDARY FireFX2
End
ConditionState = REALLYDAMAGED
Model = avenger_rocket_turret ; name of my model
Turret = Turret01
TurretPitch = TurreTel01
End
End
PlacementViewAngle = -45
; ***DESIGN parameters ***
Side = America
EditorSorting = SYSTEM
TransportSlotCount = 1
WeaponSet
Conditions = None
Weapon = PRIMARY AvengerMissileWeapon1
Weapon = SECONDARY AvengerMissileWeapon2
End
ArmorSet
Conditions = None
Armor = InvulnerableAllArmor ; We can't be hurt on the field. We share damage from the Avenger with his damage module
End
VisionRange = 200
; *** AUDIO Parameters ***
UnitSpecificSounds
TurretMoveStart = NoSound
TurretMoveLoop = NoSound ;TurretMoveLoop
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 SECONDARY
TurretTurnRate = 180 // turn rate, in degrees per sec
TurretPitchRate = 180
AllowsPitch = Yes
NaturalTurretPitch = 45
End
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 500 ; default is 2000
End
Behavior = DestroyDie ModuleTag_05
;
End
Geometry = BOX
GeometryMajorRadius = 6.0
GeometryMinorRadius = 6.0
GeometryHeight = 10.0
GeometryIsSmall = No
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
; And the code for the avenger:
;--------------------------------------------------------------------------------------
Object AmericaTankRocketAvenger
; *** ART Parameters ***
SelectPortrait = SAAvnger_L
ButtonImage = SAAvnger
UpgradeCameo1 = Upgrade_AmericaBattleDrone
UpgradeCameo2 = Upgrade_AmericaScoutDrone
UpgradeCameo3 = Upgrade_AmericaHellfireDrone
UpgradeCameo4 = Upgrade_AmericaAdvancedTraining
UpgradeCameo5 = Upgrade_AmericaCompositeArmor
Draw = W3DOverlordTruckDraw ModuleTag_01
OkToChangeModelColor = Yes
ExtraPublicBone = TurretFX03
ExtraPublicBone = LazerSpot01
ExtraPublicBone = LazerSpot02
DefaultConditionState
Model = AVAVNGER
End
ConditionState = REALLYDAMAGED
Model = AVAVNGER_D
End
ConditionState = RUBBLE
Model = AVAVNGER_D1
End
Dust = RocketBuggyDust
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 = Tire03
RightRearTireBone = 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:Avenger
Side = America
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY AvengerTargetDesignator
End
ArmorSet
Conditions = None
Armor = AntiAirVehicle
DamageFX = TankDamageFX
End
BuildCost = 1000
BuildTime = 10.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = AmericaWarFactory
End
ExperienceValue = 100 100 200 400 ;Experience point value at each level
ExperienceRequired = 0 200 300 600 ;Experience points needed to gain each level
IsTrainable = Yes
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 = AmericaTankAvengerCommandSet
; *** AUDIO Parameters ***
VoiceSelect = AvengerVoiceSelect
VoiceMove = AvengerVoiceMove
VoiceGuard = AvengerVoiceMove
VoiceAttack = AvengerVoicePaint
VoiceAttackAir = AvengerVoiceAttack
SoundMoveStart = HumveeMoveStart
SoundMoveStartDamaged = HumveeMoveStart
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = AvengerVoiceCreate
TurretMoveLoop = NoSound
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
VoiceCrush = NoSound
VoiceEnter = AvengerVoiceMove
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE CANNOT_RETALIATE
Body = ActiveBody ModuleTag_02
MaxHealth = 300.0
InitialHealth = 300.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 = 1000
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL AvengerLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
End
; Turret fly off death
Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
; ModifierBonusPerOverkillPercent = 30% ; negative means less likely to pick this in the face of much damage, positive means more likely
DestructionDelay = 500
DestructionDelayVariance = 100
FX = INITIAL FX_GenericTankDeathEffect
FX = FINAL FX_GenericTankDeathExplosion
OCL = FINAL OCL_AvengerTankDeathEffect
End
; Catch fire, and explode death
Behavior = SlowDeathBehavior ModuleTag_06
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 50
DestructionDelay = 2000
DestructionDelayVariance = 300
FX = INITIAL FX_CrusaderCatchFire
FX = FINAL FX_GenericTankDeathExplosion
OCL = FINAL OCL_AvengerTankDeathEffect
End
Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
WeaponTemplate = AvengerPointDefenseLaserOne
PrimaryTargetTypes = BALLISTIC_MISSILE SMALL_MISSILE
ScanRate = 0
ScanRange = 200.0
PredictTargetVelocityFactor = 1.0
End
; Behavior = PointDefenseLaserUpdate ModuleTag_Laser_Two
; WeaponTemplate = AvengerPointDefenseLaserTwo
; PrimaryTargetTypes = BALLISTIC_MISSILE SMALL_MISSILE
; ScanRate = 100
; ScanRange = 200.0
; PredictTargetVelocityFactor = 1.0
; End
Behavior = OverlordContain ModuleTag_OverlordContain
Slots = 1
DamagePercentToUnits = 100%
AllowInsideKindOf = PORTABLE_STRUCTURE
PassengersAllowedToFire = Yes
PayloadTemplateName = AmericaTankAvengerRocketTurret
ExperienceSinkForRider = Yes ; I get the Exp for things my turret friend kills
End
Behavior = ObjectCreationUpgrade ModuleTag_08
UpgradeObject = OCL_AmericanBattleDrone
TriggeredBy = Upgrade_AmericaBattleDrone
ConflictsWith = Upgrade_AmericaScoutDrone Upgrade_AmericaHellfireDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_09
UpgradeObject = OCL_AmericanScoutDrone
TriggeredBy = Upgrade_AmericaScoutDrone
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
End
Behavior = ObjectCreationUpgrade ModuleTag_19
UpgradeObject = OCL_AmericanHellfireDrone
TriggeredBy = Upgrade_AmericaHellfireDrone
ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
End
Behavior = ProductionUpdate ModuleTag_10
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
Behavior = ExperienceScalarUpgrade ModuleTag_11
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
End
Behavior = TransitionDamageFX ModuleTag_12
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
End
Behavior = FXListDie ModuleTag_13
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_14
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = DestroyDie ModuleTag_15
DeathTypes = NONE +CRUSHED +SPLATTED
End
Behavior = CreateCrateDie ModuleTag_16
CrateData = SalvageCrateData
;CrateData = EliteTankCrateData
;CrateData = HeroicTankCrateData
End
Behavior = EjectPilotDie ModuleTag_17
DeathTypes = ALL -CRUSHED -SPLATTED
ExemptStatus = HIJACKED
GroundCreationList = OCL_EjectPilotOnGround
AirCreationList = OCL_EjectPilotViaParachute
VeterancyLevels = ALL -REGULAR ;only vet+ gives pilot
End
Behavior = FlammableUpdate ModuleTag_22
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 3 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Geometry = BOX
GeometryMajorRadius = 15.0
GeometryMinorRadius = 10.0
GeometryHeight = 10.0
GeometryIsSmall = Yes
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End
[/code]
if I change the name of my model back to the original laserturret it does show.
Are the names of the bones important to the linking?
Does anyone have an idea why it doesn't show up?
Sorry if my English is bad at some points.
Posted by: precision_bomber - Tuesday, May 1, 2012 3:10:35 AM
There are a few things why a model is invisible.
1. Your model filename is too long. (modelname must not be more than 16 chars)
2. You did not skin it.
3. You skinned it but not include the image files.
4. You messed up the bones.
Posted by: Japie19 - Tuesday, May 1, 2012 5:53:29 PM
Thanks for the reply,
The skin if fine so that shouldn't be the problem. Skin files are included too, the bones could be the problem or the character limit. Well thanks and I'll try to get it fixed.
Posted by: CommieDog - Tuesday, May 1, 2012 10:34:43 PM
By "it doesn't show up", do you mean that the rocket turret doesn't function in the game, or that it shoots rockets but is invisible?
Posted by: NewNightmare - Wednesday, May 2, 2012 10:06:06 PM
[quote]2. You did not skin it.
3. You skinned it but not include the image files.[/quote]
Wrong.
Object not skinned appear in game with its original colour (the one seen inside RenX)
Skinned objects without texture files in the Textures folder appear purple.
Posted by: Japie19 - Friday, May 4, 2012 7:15:12 AM
Problem solved. The turret shows up now.
The name was the problem I think.
Now I only have a few small things to fix, but that's not a problem.
Thanks for taking time to help me.