Jundiyy
  • Jundiyy
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago
Hi all,
I'm not a modder, but I have used INI files in the far past, recently I felt like editing units for my own self but I'm already stuck and have forgotten.
Firstly, I have extracted from the INIZH big file to a folder on my desktop.
In the past I used INI files per map, rather than in the main directory, I have also played maps which have INI files in them and their own modified units...my first question is, when I add the ini file to my map, it just crashes the game, can someone direct me to my mistakes?
So I decided to follow a guide from someone about Battlemasters/Red Guards but still didn't work.

This is my first attempt, using only what I need from the units


; ***DESIGN parameters ***
DisplayName = OBJECT:Redguard
Side = China
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY DragonTankFlameWeapon
End


ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 500
ShroudClearingRange = 500
Prerequisites
Object = ChinaBarracks
End
BuildCost = 50
BuildTime = 15.0 ;in seconds

ExperienceValue = 5 5 10 20 ;Experience point value at each level
ExperienceRequired = 0 20 40 80 ;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 = ChinaInfantryRedguardCommandSet

;---------------------------------------------------------------------

Weapon TomahawkMissileWeapon2
PrimaryDamage = 500.0
PrimaryDamageRadius = 100.0
SecondaryDamage = 50.0
SecondaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 5.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 600.0
PreAttackDelay = 50
PreAttackType = PER_SHOT ; Do the delay every single shot
MinimumAttackRange = 25.0
DamageType = EXPLOSION
DeathType = EXPLODED
FireFX = FX_TomahawkIgnition
ProjectileObject = TomahawkMissile
ProjectileExhaust = TomahawkMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicTomahawkMissileExhaust
; ProjectileDetonationFX = WeaponFX_TomahawkMissileDetonation
ProjectileDetonationFX = WeaponFX_BombTruckDefaultBombDetonation
RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
FireSound = TomahawkWeapon
DelayBetweenShots = 1
ClipSize = 5 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1000 ; how long to reload a Clip, msec
; Uses a clip of one to get the Reloading modelcondition
CapableOfFollowingWaypoints = Yes

; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES
End

;---------------------------------------------------------------------

; ***DESIGN parameters ***
DisplayName = OBJECT:BattleMaster
Side = China
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY TomahawkMissileWeapon2
End
ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
BuildCost = 800
BuildTime = 10.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = ChinaWarFactory
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 ;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 = ChinaVehicleBattleMasterCommandSet

;---------------------------------------------------------------------

; ***DESIGN parameters ***
DisplayName = OBJECT:BlackLotus
Side = China
EditorSorting = INFANTRY
TransportSlotCount = 1 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY RedguardMachineGun
End
ArmorSet
Conditions = None
Armor = HumanArmor
DamageFX = InfantryDamageFX
End
VisionRange = 300
ShroudClearingRange = 400
Prerequisites
Object = ChinaBarracks
Object = ChinaPropagandaCenter
End
BuildCost = 1500
BuildTime = 20.0 ;in seconds
MaxSimultaneousOfType = 1
CommandSet = ChinaInfantryBlackLotusCommandSet

ExperienceValue = 50 100 150 400 ;Experience point value at each level
ExperienceRequired = 0 150 450 900 ;Experience points needed to gain each level
IsTrainable = Yes ;Can gain experience
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = ChinaInfantryBlackLotusCommandSet


My second attempt was to use the full info but still failed

;------------------------------------------------------------------------------
Object ChinaTankBattleMaster

; *** ART Parameters ***
SelectPortrait = SNBattlemaster_L
ButtonImage = SNBattlemaster

UpgradeCameo1 = Upgrade_Nationalism
UpgradeCameo2 = Upgrade_ChinaUraniumShells
UpgradeCameo3 = Upgrade_ChinaNuclearTanks
;UpgradeCameo4 = NONE
;UpgradeCameo5 = NONE

Draw = W3DTankDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = NVBtMstr
Turret = Turret01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = REALLYDAMAGED
Model = NVBtMstr_D
Turret = Turret01
WeaponFireFXBone = PRIMARY Muzzle
WeaponRecoilBone = PRIMARY Barrel
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponLaunchBone = PRIMARY Muzzle
End
ConditionState = RUBBLE
Model = NVBtMstr_D
Turret = Turret01
End

TrackMarks = EXTnkTrack.tga
End

; ***DESIGN parameters ***
DisplayName = OBJECT:BattleMaster
Side = China
EditorSorting = VEHICLE
TransportSlotCount = 3 ;how many "slots" we take in a transport (0 == not transportable)
WeaponSet
Conditions = None
Weapon = PRIMARY TomahawkMissileWeapon2
End
ArmorSet
Conditions = None
Armor = TankArmor
DamageFX = TankDamageFX
End
BuildCost = 800
BuildTime = 10.0 ;in seconds
VisionRange = 150
ShroudClearingRange = 300
Prerequisites
Object = ChinaWarFactory
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 ;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 = ChinaVehicleBattleMasterCommandSet

; *** AUDIO Parameters ***
VoiceSelect = BattleMasterTankVoiceSelect
VoiceMove = BattleMasterTankVoiceMove
VoiceGuard = BattleMasterTankVoiceMove
VoiceAttack = BattleMasterTankVoiceAttack
SoundMoveStart = BattleMasterTankMoveStart
SoundMoveStartDamaged = BattleMasterTankMoveStart

UnitSpecificSounds
; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
VoiceCreate = BattleMasterTankVoiceCreate
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
VoiceCrush = BattleMasterTankVoiceCrush
VoiceEnter = BattleMasterTankVoiceMove
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 = 800
SubdualDamageHealRate = 500
SubdualDamageHealAmount = 50
End

Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 120 ; turn rate, in degrees per sec
ControlledWeaponSlots = PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End

Locomotor = SET_NORMAL BattleMasterLocomotor
Locomotor = SET_NORMAL_UPGRADED NuclearBattleMasterLocomotor

Behavior = HordeUpdate ModuleTag_04
RubOffRadius = 150 ; if I am this close to a real hordesman, I will get to be an honorary hordesman
UpdateRate = 1000 ; how often to recheck horde status (msec)
Radius = 75 ; how close other units must be to us to count towards our horde-ness (~30 feet or so)
KindOf = VEHICLE ; what KindOf's must match to count towards horde-ness
AlliesOnly = Yes ; do we only count allies towards horde status?
ExactMatch = Yes ; do we only count units of our exact same type towards horde status? (overrides kindof)
Count = 5 ; how many units must be within Radius to grant us horde-ness
Action = HORDE ; when horde-ing, grant us the HORDE bonus
End

Behavior = PhysicsBehavior ModuleTag_05
Mass = 40.0
End

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

Behavior = VeterancyGainCreate ModuleVet_01
StartingLevel = ELITE
ScienceRequired = SCIENCE_BattlemasterTraining
End

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


Behavior = SlowDeathBehavior ModuleTag_12
DeathTypes = ALL -CRUSHED -SPLATTED
ProbabilityModifier = 25
DestructionDelay = 200
DestructionDelayVariance = 100
OCL = FINAL OCL_ChinaTankBattleMasterDebris
FX = FINAL FX_BattleMasterExplosionOneFinal
End

Behavior = TransitionDamageFX ModuleTag_13
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuous01
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_BattleMasterDamageTransition
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

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

End

;---------------------------------------------------------------------

Weapon TomahawkMissileWeapon2
PrimaryDamage = 500.0
PrimaryDamageRadius = 100.0
SecondaryDamage = 50.0
SecondaryDamageRadius = 25.0
ScatterRadiusVsInfantry = 5.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 600.0
PreAttackDelay = 50
PreAttackType = PER_SHOT ; Do the delay every single shot
MinimumAttackRange = 25.0
DamageType = EXPLOSION
DeathType = EXPLODED
FireFX = FX_TomahawkIgnition
ProjectileObject = TomahawkMissile
ProjectileExhaust = TomahawkMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicTomahawkMissileExhaust
; ProjectileDetonationFX = WeaponFX_TomahawkMissileDetonation
ProjectileDetonationFX = WeaponFX_BombTruckDefaultBombDetonation
RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
FireSound = TomahawkWeapon
DelayBetweenShots = 1
ClipSize = 5 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 1000 ; how long to reload a Clip, msec
; Uses a clip of one to get the Reloading modelcondition
CapableOfFollowingWaypoints = Yes

; note, these only apply to units that aren't the explicit target
; (ie, units that just happen to "get in the way"... projectiles
; always collide with the Designated Target, regardless of these flags
ProjectileCollidesWith = STRUCTURES
End



My second question: this is different (NOT INI), I have always wondered how I can add extra buildings/units through the worldbuilder, (I can easily add units, let's say combat bike to China War Factory, delete the invisible character and it works without a problem, no INI needed) I'm talking about the option to toggle up/down, such as the fake and real GLA buildings, how can I:-
A) add this toggle to USA/China or a war factory
B) add buildings/units to this UI, when I go to slot number, I only get the option for 1-12, I can't go any higher, so let's say I wanted the China War Factory to produce an extra 10 tanks, how can I use the toggle button to add them.

So Chem_Command_ConstructGLAVehicleRadarVan is added to all objects of type ChinaWarFactory in slot number 15/16/17/18/19/20/21 etc
Sponsor