FileFront Forums

FileFront Forums (http://forums.filefront.com/)
-   CnC Modding, Mapping and Editing (http://forums.filefront.com/cnc-modding-mapping-editing-273/)
-   -   Dumb Question of the Day (http://forums.filefront.com/cnc-modding-mapping-editing/230545-dumb-question-day.html)

Joe Bonham December 14th, 2005 08:32 PM

Dumb Question of the Day
 
Here's my stupid question for the day -

I'm trying to make the GLA saboteur unit available to the America faction, trainable at the America Command Center.

The game crashes whenever I try to open it. What did I do wrong?

I edited the following notepad files: CommandSet, AmericaInfantry

I copied the saboteur file from the GLA infantry folder into the AmericaInfantry folder. I made a few changes, which are in bold.

Quote:

;------------------------------------------------------------------------------
Object AmericaInfantrySaboteur

; *** ART Parameters ***
SelectPortrait = SUSaboteur_L
ButtonImage = SUSaboteur
;UpgradeCameo1 = NONE
;UpgradeCameo2 = NONE
;UpgradeCameo3 = NONE
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes

; this says "we don't use these condition states at all, so completely
; ignore them for purposes of matchmaking"... this is useful to help
; reduce the number of AliasConditionState clauses you must add in
; order to avoid ambiguity in some cases.
IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A
; ---- standing
DefaultConditionState
Model = UISabotr_SKN
IdleAnimation = UIWRKR_SKL.UIWRKR_STA 0 9
IdleAnimation = UIWRKR_SKL.UIWRKR_IDA
AnimationMode = ONCE
TransitionKey = TRANS_Stand
End
ConditionState = MOVING
Animation = UIWRKR_SKL.UIWRKR_RNA 16
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = TRANS_Moving
ParticleSysBone = None InfantryDustTrails
End
ConditionState = DYING
Animation = UIWRKR_SKL.UIWRKR_DTA
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = UIWRKR_SKL.UIWRKR_ADTE1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = UIWRKR_SKL.UIWRKR_ADTE2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = UIWRKR_SKL.UIWRKR_ADTE3
AnimationMode = ONCE
TransitionKey = None
End
ConditionState = SPECIAL_CHEERING
Animation = UIWRKR_SKL.UIWRKR_CHA
AnimationMode = ONCE
End

End
; ***DESIGN parameters ***
DisplayName = OBJECT:Saboteur
Side = America
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)

ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = AmericaCommandCenter
End
BuildCost = 800
BuildTime = 20.0 ;in seconds
ExperienceValue = 15 15 30 40 ;Experience point value at each level
IsTrainable = No ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaInfantrySaboteurCommandSet
; *** AUDIO Parameters ***
VoiceSelect = SaboteurVoiceSelect
VoiceMove = SaboteurVoiceMove
VoiceGuard = SaboteurVoiceMove
VoiceAttack = SaboteurVoiceAttack
SoundStealthOn = StealthOn
SoundStealthOff = StealthOff
VoiceFear = SaboteurVoiceFear
VoiceTaskComplete = NoSound
UnitSpecificSounds
VoiceCreate = SaboteurVoiceCreate
VoiceSubdue = SaboteurVoiceMove
VoiceGarrison = SaboteurVoiceMove
VoiceEnter = SaboteurVoiceMove
VoiceEnterHostile = SaboteurVoiceAttack
VoiceGetHealed = SaboteurVoiceMove
End
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS INFANTRY SALVAGER SCORE
Body = ActiveBody ModuleTag_02
MaxHealth = 120.0
InitialHealth = 120.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
Behavior = CommandButtonHuntUpdate ModuleTag_04 ; allows use of command button hunt script with this unit.
End
Locomotor = SET_NORMAL SaboteurGroundLocomotor SaboteurCliffLocomotor
Behavior = PhysicsBehavior ModuleTag_05
Mass = 5.0
End
Behavior = StealthUpdate ModuleTag_07
StealthDelay = 2500 ; msec
StealthForbiddenConditions = None
InnateStealth = Yes ;Requires upgrade first
OrderIdleEnemiesToAttackMeUponReveal = Yes
End
Behavior = SquishCollide ModuleTag_11
;nothing
End
Behavior = SabotagePowerPlantCrateCollide SabotageTag_01
BuildingPickup = Yes
SabotagePowerDuration = 30000
End
;Behavior = SabotageSupplyDropzoneCrateCollide SabotageTag_02
; BuildingPickup = Yes
; StealCashAmount = 800
;End
Behavior = SabotageSuperweaponCrateCollide SabotageTag_03
BuildingPickup = Yes
End
Behavior = SabotageCommandCenterCrateCollide SabotageTag_04
BuildingPickup = Yes
End
Behavior = SabotageSupplyCenterCrateCollide SabotageTag_05
BuildingPickup = Yes
StealCashAmount = 1000
End
Behavior = SabotageMilitaryFactoryCrateCollide SabotageTag_06
BuildingPickup = Yes
SabotageDuration = 30000
End
Behavior = SabotageFakeBuildingCrateCollide SabotageTag_07
BuildingPickup = Yes
End
Behavior = SabotageInternetCenterCrateCollide SabotageTag_08
BuildingPickup = Yes
SabotageDuration = 15000
End
; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_SaboteurDie
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDieCrushed
End
Behavior = SlowDeathBehavior ModuleTag_Death03
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_SaboteurDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireGLA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death06 ; don't forget to give it a new, unique module tag
DeathTypes = NONE +POISONED_BETA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryBeta ;you'll have to create this OCL and make it use the blue guys instead of green ones
End
Behavior = SlowDeathBehavior ModuleTag_Death07
DeathTypes = NONE +POISONED_GAMMA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinGLA
OCL = INITIAL OCL_ToxicInfantryGamma
End
; --- end Death modules ---
Behavior = PoisonedBehavior ModuleTag_16
PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
PoisonDuration = 3000 ; ... for this long after last hit by poison damage
End
; Behavior = SpecialAbility ModuleTag_17
; SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
; UpdateModuleStartsAttack = Yes
; StartsPaused = Yes
; InitiateSound = RebelVoiceCapture
; End
; Behavior = SpecialAbilityUpdate ModuleTag_18
; SpecialPowerTemplate = SpecialAbilityRebelCaptureBuilding
; StartAbilityRange = 5.0
; UnpackTime = 3000 ; (changing this will scale anim speed)
; PreparationTime = 20000 ; time to complete hack once prepared (changing this will scale anim speed)
; PackTime = 2000 ; (changing this will scale anim speed)
; DoCaptureFX = Yes
; AwardXPForTriggering = 12
; ;SkillPointsForTriggering = ??? -- Dustin, fill me out if you want different balance values.
; End
Geometry = CYLINDER
GeometryMajorRadius = 10.0
GeometryMinorRadius = 10.0
GeometryHeight = 12.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
BuildCompletion = APPEARS_AT_RALLY_POINT
End
I then added the saboteur to the America Command Center's Comand Set.

Quote:

CommandSet AmericaCommandCenterCommandSet
1 = Command_ConstructAmericaDozer
2 = Command_SpectreGunship
4 = Command_LeafletDrop
5 = Command_A10ThunderboltMissileStrike
6 = Command_Paradrop
7 = Command_SpyDrone
8 = Command_EmergencyRepair
9 = Command_DaisyCutter ;NOTE THIS GETS UPGRADED BELOW
10 = Command_SpySatelliteScan
11 = Command_ConstructAmericaInfantrySaboteur
13 = Command_SetRallyPoint
14 = Command_Sell
End

And finally, I added a new command set for the American Saboteur himself in the same file.

Quote:

CommandSet AmericaInfantrySaboteurCommandSet
1 = Command_SabotageBuilding
14 = Command_Stop
End
I assume I must be forgetting a step somewhere, but I just can't figure it out. A little help please!

Alexei December 15th, 2005 03:15 AM

Re: Dumb Question of the Day
 
Yes... and where is this -> Command_ConstructAmericaInfantrySaboteur written? You have to define the Button for Command_ConstructAmericaInfantrySaboteur in CommandButton.ini...

Domination! December 15th, 2005 10:27 AM

Re: Dumb Question of the Day
 
yeah you need to make a new commanbutton, copy the default commandbutton for the saboteur and rename it, Command_ConstructAmericaInfantrySaboteur, change the object = too AmericaInfantrySaboteur, that should work as long as you do it right

Joe Bonham December 15th, 2005 10:29 AM

Re: Dumb Question of the Day
 
I did what you said, and got a half victory. The saboteur build button is at the command center, but it is greyed out and unusable.

The button says "Requires: Command Center", even though I start the game with a command center!

What am I doing wrong now?

Domination! December 15th, 2005 10:32 AM

Re: Dumb Question of the Day
 
delete these lines,

Prerequisites
Object = AmericaCommandCenter
End

the problem is the commandcenter of the faction your using isnt called AmericaCommandCenter

Joe Bonham December 15th, 2005 02:45 PM

Re: Dumb Question of the Day
 
Great! Thanks!

Next question:

In the CivilianUnit file, I found an interesting unit called UNSoldier. I tried making it trainable by the America faction. Changes I made are in bold.

Quote:

;------------------------------------------------------------------------------
Object AmericaInfantryBlackwaterElite
; *** ART Parameters ***
SelectPortrait = SABarracks
ButtonImage = SABarracks
UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
UpgradeCameo2 = Upgrade_AmericaChemicalSuits
UpgradeCameo3 = NONE
UpgradeCameo4 = NONE
UpgradeCameo5 = NONE

Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = CIUNSL_SKN
IdleAnimation = CIUNSL_SKL.CIUNSL_STA 0 21
IdleAnimation = CIUNSL_SKL.CIUNSL_ID1
IdleAnimation = CIUNSL_SKL.CIUNSL_ID2
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
TransitionKey = TRANS_Stand
End
ConditionState = FIRING_A
Animation = CIUNSL_SKL.CIUNSL_ATA1_LP
AnimationMode = LOOP
TransitionKey = TRANS_FiringA
End
AliasConditionState = BETWEEN_FIRING_SHOTS_A
AliasConditionState = RELOADING_A
TransitionState = TRANS_Stand TRANS_FiringA
Animation = CIUNSL_SKL.CIUNSL_ATA1_ST
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
TransitionState = TRANS_FiringA TRANS_Stand
Animation = CIUNSL_SKL.CIUNSL_ATA1_ED
AnimationMode = ONCE
AnimationSpeedFactorRange = 4 4
End
; these aliases handle the attack-move case.
AliasConditionState = MOVING FIRING_A
AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A
AliasConditionState = MOVING RELOADING_A
ConditionState = FREEFALL
Animation = CIUNSL_SKL.CIUNSL_PFL
AnimationMode = LOOP
TransitionKey = TRANS_Falling
End
ConditionState = PARACHUTING
Animation = CIUNSL_SKL.CIUNSL_PHG
AnimationMode = LOOP
TransitionKey = TRANS_Chute
End
AliasConditionState = PARACHUTING DYING
ConditionState = MOVING
Animation = CIUNSL_SKL.CIUNSL_RNA
AnimationMode = LOOP
Flags = RANDOMSTART
TransitionKey = None
End
ConditionState = DYING
Animation = CIUNSL_SKL.CIUNSL_DTA
Animation = CIUNSL_SKL.CIUNSL_DTB
AnimationMode = ONCE
TransitionKey = TRANS_Dying
End
TransitionState = TRANS_Dying TRANS_Flailing
Animation = CIUNSL_SKL.CIUNSL_ADTA1
AnimationMode = ONCE
End
ConditionState = DYING EXPLODED_FLAILING
Animation = CIUNSL_SKL.CIUNSL_ADTA2
AnimationMode = LOOP
TransitionKey = TRANS_Flailing
End
ConditionState = DYING EXPLODED_BOUNCING
Animation = CIUNSL_SKL.CIUNSL_ADTA3
AnimationMode = ONCE
TransitionKey = None
End
AliasConditionState = DYING SPLATTED
TransitionState = TRANS_Falling TRANS_Chute
Animation = CIUNSL_SKL.CIUNSL_POP
AnimationMode = ONCE
End
TransitionState = TRANS_Chute TRANS_Stand
Animation = CIUNSL_SKL.CIUNSL_PTD
AnimationMode = ONCE
End
End
; ***DESIGN parameters ***
Side = America
EditorSorting = INFANTRY
TransportSlotCount = 1
DisplayName = OBJECT:BlackwaterElite
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)

WeaponSet
Conditions = None
Weapon = PRIMARY RangerAdvancedCombatRifle
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = ChemSuitHumanArmor
DamageFX = None
End

VisionRange = 100
ShroudClearingRange = 300
Prerequisites
Object = AmericaBarracks
End
BuildCost = 225
BuildTime = 5.0 ;in seconds
ExperienceValue = 20 20 40 60 ;Experience point value at each level
ExperienceRequired = 0 20 40 60 120 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = AmericaInfantryBlackwaterEliteCommandSet

; *** AUDIO Parameters ***
VoiceSelect = RangerVoiceSelect
VoiceMove = RangerVoiceMove
VoiceAttack = RangerVoiceAttack
; *** ENGINEERING Parameters ***
RadarPriority = UNIT
KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS INFANTRY
Body = ActiveBody ModuleTag_02
MaxHealth = 125.0
InitialHealth = 125.0
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
Locomotor = SET_NORMAL BasicHumanLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 5.0
End
Behavior = ProductionUpdate ModuleTag_05
; nothing
End
Behavior = SquishCollide ModuleTag_07
;nothing
End

; --- begin Death modules ---
Behavior = SlowDeathBehavior ModuleTag_Death01
DeathTypes = ALL -CRUSHED -SPLATTED -EXPLODED -BURNED -POISONED -POISONED_BETA -POISONED_GAMMA
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_RangerDie
End
Behavior = SlowDeathBehavior ModuleTag_Death02
DeathTypes = NONE +CRUSHED +SPLATTED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_GIDieCrushed
End
Behavior = SlowDeathBehavior ModuleTag_Death03
DeathTypes = NONE +EXPLODED
SinkDelay = 3000
SinkRate = 0.5 ; in Dist/Sec
DestructionDelay = 8000
FX = INITIAL FX_RangerDie
FlingForce = 8
FlingForceVariance = 3
FlingPitch = 60
FlingPitchVariance = 10
End
Behavior = SlowDeathBehavior ModuleTag_Death04
DeathTypes = NONE +BURNED
DestructionDelay = 0
FX = INITIAL FX_DieByFireUSA
OCL = INITIAL OCL_FlamingInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death05
DeathTypes = NONE +POISONED
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantry
End
Behavior = SlowDeathBehavior ModuleTag_Death06
DeathTypes = NONE +POISONED_BETA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantryBeta
End
Behavior = SlowDeathBehavior ModuleTag_Death07
DeathTypes = NONE +POISONED_GAMMA
DestructionDelay = 0
FX = INITIAL FX_DieByToxinUSA
OCL = INITIAL OCL_ToxicInfantryGamma
End

; --- end Death modules ---
Behavior = PoisonedBehavior ModuleTag_12
PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
PoisonDuration = 3000 ; ... for this long after last hit by poison damage
End

Geometry = CYLINDER
GeometryMajorRadius = 10.0
GeometryMinorRadius = 10.0
GeometryHeight = 13.0
GeometryIsSmall = Yes
Shadow = SHADOW_DECAL
ShadowSizeX = 14;
ShadowSizeY = 14;
ShadowTexture = ShadowI;
BuildCompletion = APPEARS_AT_RALLY_POINT
End
Then I added my new unit's command set to the Commandset file.

Quote:

CommandSet AmericaInfantryBlackwaterEliteCommandSet
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End
Then I added the build commandset to the AmericaBarracks commandset.

Quote:

CommandSet AmericaBarracksCommandSet
1 = Command_ConstructAmericaInfantryRanger
2 = Command_ConstructAmericaInfantryMissileDefender
3 = Command_ConstructAmericaInfantryColonelBurton
4 = Command_ConstructAmericaInfantryPathfinder
6 = Command_ConstructAmericaInfantryBiohazardTech
7 = Command_UpgradeAmericaRangerFlashBangGrenade
8 = Command_UpgradeAmericaRangerCaptureBuilding
9 = Command_ConstructAmericaInfantrySaboteur
10 = Command_ConstructAmericaInfantryBlackwaterElite
13 = Command_SetRallyPoint
14 = Command_Sell
End
And finally, I added a new commandbutton to the CommandButton file.

Quote:

CommandButton Command_ConstructAmericaInfantryBlackwaterElite
Command = UNIT_BUILD
Object = AmericaInfantryBlackwaterElite
TextLabel = CONTROLBAR:ConstructAmericaInfantryBlackwaterElite
ButtonImage = SABarracks
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildRanger
End
But my unit doesn't work. The game just crashes. Any ideas on what I'm doing wrong this time?

Domination! December 16th, 2005 07:40 AM

Re: Dumb Question of the Day
 
well the onlt thing ive noticed is that you have two editorsorting = Infantry lines, other than that run worldbuilder that should tell you what the error is


All times are GMT -7.

Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.