General Joined: 5/13/2013(UTC) Posts: 1,537 Location: Right Behind You Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
|
So for some reason I get an error saying I'm missing a weapon that I'm looking directly at the code for, and this weapon doesn't work in-game. Why? Code:
Code:
;------------------------------------------------------------------------------
Weapon EMPDefenderMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 175.0
DamageType = INFANTRY_MISSILE
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = MissileDefenderMissile
ProjectileExhaust = MissileDefenderMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileDefenderMissileExhaust
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
FireFX = FX_BuggyMissileIgnition
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = MissileDefenderWeapon
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
ProjectileCollidesWith = STRUCTURES
HistoricBonusTime = 1500
HistoricBonusCount = 3
HistoricBonusRadius = 20
HistoricBonusWeapon = EMPDefenderEMPSmallCreationWeapon
End
;------------------------------------------------------------------------------
Weapon EMPDefenderLaserGuidedMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 300.0 ;Extending this range, allows the special ability to work better.
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = MissileDefenderMissile
ProjectileExhaust = MissileDefenderMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileDefenderMissileExhaust
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 500 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = MissileDefenderWeapon
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = 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
HistoricBonusTime = 1500
HistoricBonusCount = 3
HistoricBonusRadius = 20
HistoricBonusWeapon = EMPDefenderEMPSmallCreationWeapon
End
;------------------------------------------------------------------------------
; firing this weapon just creates an EMP Spheroid
Weapon EMPDefenderEMPSmallCreationWeapon
DamageType = FLAME
DeathType = BURNED
FireOCL = SupW_OCL_PatriotEMPEffectSpheroid
End
Edited by moderator Wednesday, October 10, 2018 3:00:45 PM(UTC)
| Reason: Not specified Gameanater attached the following image(s): |
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there. |
|
|
|
Major Joined: 2/21/2015(UTC) Posts: 386 Thanks: 80 times Was thanked: 132 time(s) in 96 post(s)
|
My guess is that you have to provide a damage value of something like 0.00001
That or the name is too long? |
|
|
|
|
General Joined: 5/13/2013(UTC) Posts: 1,537 Location: Right Behind You Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
|
Originally Posted by: SkyMix_RMT My guess is that you have to provide a damage value of something like 0.00001
That or the name is too long? Doesn't seem to be the case for the first one. This is a clone of the FirestormSmallCreationWeapon Code:
;------------------------------------------------------------------------------
; firing this weapon just creates a Firestorm object.
Weapon FirestormSmallCreationWeapon
DamageType = FLAME
DeathType = BURNED
FireOCL = OCL_FirestormSmall
End
There's also several more weapons that have even longer names than mine. Such as Chem_SCUDLauncherGunAnthraxGammaPlusOne and the weapon above EMPDefenderLaserGuidedMissileWeapon which both work fine. (I added a simple ProjectileDetonationOCL as a placeholder and it has no issues. I'm stumped on this one. I'm also stumped because somewhere along the way I must have broken something because trying to play a Skirmish match with a Hard Superweapon General crashes the game after a few minutes. The crash logs were of no help. |
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there. |
|
|
|
Colonel Joined: 8/13/2013(UTC) Posts: 817 Location: Middle east Thanks: 430 times Was thanked: 184 time(s) in 168 post(s)
|
Treat ini code like a script, the script executes each line from top to bottom, and this is how ini code works. Doing this fixes your problem, to make it simple, you write the code for the thing you want to use before the code of the other thing that uses it. Code:
;------------------------------------------------------------------------------
; firing this weapon just creates an EMP Spheroid
Weapon EMPDefenderSmallCreationWeapon
DamageType = FLAME
DeathType = BURNED
FireOCL = SupW_OCL_PatriotEMPEffectSpheroid
End
;------------------------------------------------------------------------------
Weapon EMPDefenderMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 175.0
DamageType = INFANTRY_MISSILE
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = MissileDefenderMissile
ProjectileExhaust = MissileDefenderMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileDefenderMissileExhaust
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
FireFX = FX_BuggyMissileIgnition
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 1000 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = MissileDefenderWeapon
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
ProjectileCollidesWith = STRUCTURES
HistoricBonusTime = 1500
HistoricBonusCount = 3
HistoricBonusRadius = 20
HistoricBonusWeapon = EMPDefenderSmallCreationWeapon
End
;------------------------------------------------------------------------------
Weapon EMPDefenderLaserGuidedMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 5.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 300.0 ;Extending this range, allows the special ability to work better.
DamageType = ARMOR_PIERCING
DeathType = NORMAL
WeaponSpeed = 600
ProjectileObject = MissileDefenderMissile
ProjectileExhaust = MissileDefenderMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileDefenderMissileExhaust
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 0 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 500 ; time between shots, msec
ClipSize = 0 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 0 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
FireSound = MissileDefenderWeapon
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
AntiAirborneVehicle = Yes
AntiAirborneInfantry = 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
HistoricBonusTime = 1500
HistoricBonusCount = 3
HistoricBonusRadius = 20
HistoricBonusWeapon = EMPDefenderSmallCreationWeapon
End
EDIT #2: I changed the name of the weapon just in case it was because of the long name, you don't need to do that, because the weapon already used was longer: MissileDefenderLaserGuidedMissileWeapon Edited by user Monday, October 8, 2018 10:04:29 PM(UTC)
| Reason: poor english mate |
Proud Muslim
UTD^Force
Moderator and former map reviewer CnC Labs |
1 user thanked UTD^Force for this useful post.
|
|
|
General Joined: 5/13/2013(UTC) Posts: 1,537 Location: Right Behind You Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
|
Originally Posted by: UTD^Force Treat ini code like a script, the script executes each line from top to bottom, and this is how ini code works. Doing this fixes your problem, to make it simple, you write the code for the thing you want to use before the code of the other thing that uses it.
That's actually quite brilliant... Thank you so much! |
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there. |
|
|
|
Colonel Joined: 8/13/2013(UTC) Posts: 817 Location: Middle east Thanks: 430 times Was thanked: 184 time(s) in 168 post(s)
|
No problem, it's always a good feeling when I get into that notepad editor to check some codes. EDIT: I like the idea too, really nice! Edited by user Monday, October 8, 2018 11:14:26 PM(UTC)
| Reason: Not specified |
Proud Muslim
UTD^Force
Moderator and former map reviewer CnC Labs |
1 user thanked UTD^Force for this useful post.
|
|
|
General Joined: 5/13/2013(UTC) Posts: 1,537 Location: Right Behind You Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
|
Originally Posted by: UTD^Force No problem, it's always a good feeling when I get into that notepad editor to check some codes. EDIT: I like the idea too, really nice! Thank you! I could some peeps to test out my ideas since I am limited on time myself... perhaps I should post the files here for all to try? Right now it's mostly minor visual effects and Superweapon General changes |
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there. |
|
|
|
Colonel Joined: 8/13/2013(UTC) Posts: 817 Location: Middle east Thanks: 430 times Was thanked: 184 time(s) in 168 post(s)
|
Yeah, you can give it a shot. Maybe after making some more significant changes first. |
Proud Muslim
UTD^Force
Moderator and former map reviewer CnC Labs |
|
|
|
Major Joined: 3/27/2015(UTC) Posts: 490
Thanks: 5 times Was thanked: 213 time(s) in 155 post(s)
|
Did you try saving each ini file separately? Then refreshing the directory? |
|
|
|
|
Users browsing this topic |
Guest
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.