IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
adding a new unit to ROTR, i ripped this one from zero hour reborn mod
hydra46
post 30 Dec 2012, 6:04
Post #1



Group Icon

Group: Members
Posts: 29
Joined: 26 November 2012
Member No.: 9504



i tried to add the zero hour reborn tor m1 unit ,and it crashed. anyways, i checked the releasecrashinfo file (cant remember its name) and it said: Reason Uncaught Exception during initialization. idk what it means or how to fix it but the thing i did was i opened the rotr 1.8 files with finalbig, and i added the dds files to the 2d file,w3d files to w3d file,added the ini and command button,commandset to the rotr main ini file.

i added and changed the stuff to fit ROTR. did i miss something? if i did can you guys give me a step by step guide on this or better yet provide me a working code?
sorry if i keep asking for you guys to do this for me, i have some experience with the code but i just fail so much on adding new stuff like units and buildings so if anyone can help me i would really appreciate it. i want to learn this because i want to give ROTR more units so that i wouldnt get bored, also releases and patches take like months or years and i just dont want to wait that long thats why im giving rotr new units.

im not releasing my personal mod of ROTR to the public, because it would piss off the dev team.

oh, and heres the code so you guys can take a good look at it and see if it has problems.pls inform me if there are any.

code:

;------------------------------------------------------------------------------
;Also called TorM
Object ChinaVehicleTorM1

; *** ART Parameters ***
SelectPortrait = SRGrumble_L
ButtonImage = SRGrumble

;UpgradeCameo1 = Upgrade_ChinaNeutronShells
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE

Draw = W3DTankDraw ModuleTag_01

OkToChangeModelColor = Yes

DefaultConditionState
Model = NVTorM
Animation = NVTorM.NVTorM
AnimationMode = LOOP
Turret = Turret01
WeaponFireFXBone = PRIMARY Rocket
WeaponLaunchBone = PRIMARY Rocket

WeaponFireFXBone = SECONDARY Rocket
WeaponLaunchBone = SECONDARY Rocket

WeaponFireFXBone = TERTIARY Rocket
WeaponLaunchBone = TERTIARY Rocket

End
ConditionState = REALLYDAMAGED RUBBLE
Model = NVTorM_D
Animation = NVTorM_D.NVTorM_D
AnimationMode = LOOP
Turret = Turret01
WeaponFireFXBone = PRIMARY Rocket
WeaponLaunchBone = PRIMARY Rocket

WeaponFireFXBone = SECONDARY Rocket
WeaponLaunchBone = SECONDARY Rocket
WeaponFireFXBone = TERTIARY Rocket
WeaponLaunchBone = TERTIARY Rocket
End

;Air Animation
ConditionState = PREATTACK_A
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = ONCE
End
; AliasConditionState = PREATTACK_A MOVING
AliasConditionState = PREATTACK_A FIRING_A
AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A

ConditionState = PREATTACK_A REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = ONCE
End
; AliasConditionState = PREATTACK_A MOVING REALLYDAMAGED
AliasConditionState = PREATTACK_A FIRING_A REALLYDAMAGED
AliasConditionState = PREATTACK_A BETWEEN_FIRING_SHOTS_A REALLYDAMAGED

ConditionState = FIRING_A
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = MANUAL
Flags = START_FRAME_LAST
End
AliasConditionState = BETWEEN_FIRING_SHOTS_A

ConditionState = FIRING_A REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = MANUAL
Flags = START_FRAME_LAST
End
AliasConditionState = BETWEEN_FIRING_SHOTS_A REALLYDAMAGED

ConditionState = RELOADING_A
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
ConditionState = RELOADING_A REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End


;Ground Animation
ConditionState = PREATTACK_B
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = ONCE
End
; AliasConditionState = PREATTACK_B MOVING
; AliasConditionState = PREATTACK_B FIRING_B
; AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B

ConditionState = PREATTACK_B REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = ONCE
End
; AliasConditionState = PREATTACK_B MOVING REALLYDAMAGED
; AliasConditionState = PREATTACK_B FIRING_B REALLYDAMAGED
; AliasConditionState = PREATTACK_B BETWEEN_FIRING_SHOTS_B REALLYDAMAGED

ConditionState = FIRING_B
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = MANUAL
Flags = START_FRAME_LAST
End
AliasConditionState = BETWEEN_FIRING_SHOTS_B

ConditionState = FIRING_B REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = MANUAL
Flags = START_FRAME_LAST
End
AliasConditionState = BETWEEN_FIRING_SHOTS_B REALLYDAMAGED

ConditionState = RELOADING_B
Model = NVTorM1
Animation = NVTorM1.NVTorM1
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
ConditionState = RELOADING_B REALLYDAMAGED
Model = NVTorM1_D
Animation = NVTorM1_D.NVTorM1_D
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End

TrackMarks = EXTnkTrack.tga
TreadAnimationRate = 4.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

; ***DESIGN parameters ***
DisplayName = OBJECT:TorM
Side = China
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY TORMissileWeapon ;Air Guard
End

ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
BuildCost = 2000
BuildTime = 20.0 ;in seconds
VisionRange = 340
ShroudClearingRange = 650
Prerequisites
Object = ChinaWarFactory
Object = ChinaBreederReactor
End

ExperienceValue = 50 100 200 400 ;Experience point value at each level
ExperienceRequired = 0 400 600 1000 ;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 = ChinaVehicleTORCannonCommandSet

; *** AUDIO Parameters ***
VoiceSelect = NukeCannonVoiceSelect
VoiceMove = NukeCannonVoiceMove
VoiceGuard = NukeCannonVoiceMove
VoiceAttack = NukeCannonVoiceAttack
SoundMoveStart = NukeCannonMoveStart
SoundMoveStartDamaged = NukeCannonMoveStart
UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = NukeCannonVoiceCreate
TurretMoveStart = NoSound
TurretMoveLoop = NukeCannonTurretMoveLoop
VoiceEnter = NukeCannonVoiceMove
End


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

Body = ActiveBody ModuleTag_02
MaxHealth = 400.0
InitialHealth = 400.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 = 480
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End

Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 100 ;60 ; turn rate, in degrees per sec
ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
AllowsPitch = Yes
End
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
End

Locomotor = SET_NORMAL GattlingTankLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 40.0
End

Behavior = SlowDeathBehavior ModuleTag_06
DeathTypes = ALL -CRUSHED -SPLATTED
DestructionDelay = 500
DestructionDelayVariance = 100
FX = INITIAL FX_BattleMasterExplosionOneFinal
OCL = INITIAL OCL_RadiationFieldSmall
OCL = MIDPOINT OCL_ChinaVehicleTorMDie
OCL = FINAL OCL_RadiationFieldSmall
FX = FINAL FX_ChinaVehicleNukeCannonDeathExplosion
End

; A crushing defeat
Behavior = FXListDie ModuleTag_07
DeathTypes = NONE +CRUSHED +SPLATTED
DeathFX = FX_CarCrush
End
Behavior = CreateObjectDie ModuleTag_08
DeathTypes = NONE +CRUSHED +SPLATTED
CreationList = OCL_CrusaderTank_CrushEffect
End
Behavior = CreateCrateDie ModuleTag_09
CrateData = SalvageCrateData
;CrateData = EliteTankCrateData
;CrateData = HeroicTankCrateData
End

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

Behavior = DestroyDie ModuleTag_11
DeathTypes = NONE +CRUSHED +SPLATTED
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 = ProductionUpdate ModuleTag_12
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End

Behavior = StealthUpdate ModuleTag_GPSStealth01
StealthDelay = 2000 ; msec
StealthForbiddenConditions = FIRING_PRIMARY FIRING_SECONDARY FIRING_TERTIARY RIDERS_ATTACKING
InnateStealth = Yes
RequiredStatus = REASSIGN_PARKING ;Used exclusively by the GPS Scrambler
OrderIdleEnemiesToAttackMeUponReveal = Yes
End

Behavior = EjectPilotDie ModuleTag_HijackerEmerge01
DeathTypes = ALL -CRUSHED -SPLATTED
RequiredStatus = HIJACKED
VeterancyLevels = ALL
GroundCreationList = OCL_HijackerEmerge
AirCreationList = OCL_HijackerEmergeViaParachute
End

Behavior = FXListDie ModuleTag_HijackerEmerge02
RequiredStatus = HIJACKED
DeathTypes = ALL -CRUSHED -SPLATTED
DeathFX = FX_HijackerEmerge
End

Behavior = CommandButtonHuntUpdate ModuleTag_Huntin01 ; allows use of command button hunt script with this unit.
End

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

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

End




this unit is complete it has models and textures installed,i replaced some stuff to fit the rotr code,i replaced the weaponset and cameo too with stuff from ROTR, this unit belongs to china, it also has its own commandbutton and commandset, it also has a custom weapon file,its specifically converted from ZHreborn to ROTR. but it crashes what did i do wrong? did i forget to add/convert something? please help!
Go to the top of the page
 
+Quote Post
Zeke
post 30 Dec 2012, 13:02
Post #2


The X General
Group Icon

Group: Project Leader
Posts: 2166
Joined: 7 June 2009
From: Philippines
Member No.: 73
Uniqueness is Overrated



Look at the end of your code, the geometry and shadow is doubled along with the final end tag. Get rid of one.


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 28 March 2024 - 12:17