Posted by: VampireSilence 22 Jun 2021, 9:09
I try to give my new General the lazer patriot system, but with another lazer beam color as the original from the lazer general.
My attempt was to copy the original:
CODE
Weapon Lazr_PatriotMissileWeapon
PrimaryDamage = 40.0
PrimaryDamageRadius = 3.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 225.0
DamageType = EXPLOSION
DeathType = EXPLODED
WeaponSpeed = 999999.0
LaserName = Lazr_PatriotLaserBeam
LaserBoneName = WEAPONA01
FireFX = Lazr_WeaponFX_LaserCrusader
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 250 ; time between shots, msec
ClipSize = 3 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 2000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
AntiAirborneVehicle = No
AntiAirborneInfantry = No
AntiGround = Yes
AntiBallisticMissile = No
RequestAssistRange = 200 ; when I fire, my object will look around for things of
; his type and tell their AssistedTargetingModules to fire a clip if they are free to do so.
ProjectileCollidesWith = STRUCTURES
End
Paste/edit it like this (into Weapons.ini):
CODE
Weapon Lazr_PatriotMissileWeapon2
PrimaryDamage = 40.0
PrimaryDamageRadius = 3.0
ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 225.0
DamageType = EXPLOSION
DeathType = EXPLODED
WeaponSpeed = 999999.0
LaserName = Lazr_PatriotLaserBeam2; EDITED HERE
LaserBoneName = WEAPONA01
FireFX = Lazr_WeaponFX_LaserCrusader
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 250 ; time between shots, msec
ClipSize = 3 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 2000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
AntiAirborneVehicle = No
AntiAirborneInfantry = No
AntiGround = Yes
AntiBallisticMissile = No
RequestAssistRange = 200 ; when I fire, my object will look around for things of
; his type and tell their AssistedTargetingModules to fire a clip if they are free to do so.
ProjectileCollidesWith = STRUCTURES
End
To give it a different LaserName, which i also copied. I took this original:
CODE
Object Lazr_PatriotLaserBeam
; *** ART Parameters ***
Draw = W3DLaserDraw ModuleTag_01
Texture = EXLaser4.tga
NumBeams = 5 ;Number of overlapping cylinders that make the beam. 1 beam will just use inner data.
InnerBeamWidth = 0.005 ;The total width of beam
InnerColor = R:100 G:0 B:0 A:100 ;The inside color of the laser (hot)
OuterBeamWidth = 15 ;The total width of beam
OuterColor = R:100 G:0 B:0 A:0 ;The outside color of the laser (cool)
Tile = Yes ;The height of the texture will determine how many times to tile the texture to fit without scaling.
ScrollRate = -2500 ;Scrolls the texture offset this fast -- towards(-) away(+)
Segments = 1 ;Number of segments -- more segments give smoother curve (but more joints) Current max: 20
SegmentOverlapRatio = 0 ;This value overlaps(+) or separates(-) the segments by ratio
TilingScalar = -3 ;Stretches tiling if value > 1.0, otherwise shrinks it (1.0 is natural)
;MaxIntensityLifetime = 2000 ;Laser stays at max intensity for specified time in ms.
;FadeLifetime = 0 ;Laser will fade and delete.
;@todo -- add shot ability functionality (instead of instant point A to B)
End
KindOf = IMMOBILE
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 2.0
ClientUpdate = LaserUpdate ModuleTag_07
MuzzleParticleSystem = PaladinPointDefenseLaserFlare
TargetParticleSystem = GenericRedLaserFlare
PunchThroughScalar = 1.3; If our target dies, we get this much bigger so it looks like we punched through
End
Behavior = DestroyDie ModuleTag_03
;nothing
End
Behavior = LifetimeUpdate ModuleTag_04
MinLifetime = 205 ; min lifetime in msec
MaxLifetime = 205 ; max lifetime in msec
End
End
And made it like this (into WeaponObjects.ini):
CODE
Object Lazr_PatriotLaserBeam2
; *** ART Parameters ***
Draw = W3DLaserDraw ModuleTag_01
Texture = EXLaser4.tga
NumBeams = 5 ;Number of overlapping cylinders that make the beam. 1 beam will just use inner data.
InnerBeamWidth = 0.005 ;The total width of beam
InnerColor = R:0 G:255 B:0 A:100; EDITED HERE
OuterBeamWidth = 15 ;The total width of beam
OuterColor = R:0 G:255 B:0 A:0; EDITED HERE
Tile = Yes ;The height of the texture will determine how many times to tile the texture to fit without scaling.
ScrollRate = -2500 ;Scrolls the texture offset this fast -- towards(-) away(+)
Segments = 1 ;Number of segments -- more segments give smoother curve (but more joints) Current max: 20
SegmentOverlapRatio = 0 ;This value overlaps(+) or separates(-) the segments by ratio
TilingScalar = -3 ;Stretches tiling if value > 1.0, otherwise shrinks it (1.0 is natural)
;MaxIntensityLifetime = 2000 ;Laser stays at max intensity for specified time in ms.
;FadeLifetime = 0 ;Laser will fade and delete.
;@todo -- add shot ability functionality (instead of instant point A to B)
End
KindOf = IMMOBILE
Geometry = Sphere
GeometryIsSmall = Yes
GeometryMajorRadius = 2.0
ClientUpdate = LaserUpdate ModuleTag_07
MuzzleParticleSystem = PaladinPointDefenseLaserFlare
TargetParticleSystem = GenericRedLaserFlare
PunchThroughScalar = 1.3; If our target dies, we get this much bigger so it looks like we punched through
End
Behavior = DestroyDie ModuleTag_03
;nothing
End
Behavior = LifetimeUpdate ModuleTag_04
MinLifetime = 205 ; min lifetime in msec
MaxLifetime = 205 ; max lifetime in msec
End
End
So when using "Lazr_PatriotMissileWeapon2", the laser color should be green now. But WorldBuilder states the Weapon could not be found and i dont see any particles within the game. How can one Weapon be loaded, but another in the same file cannot? This makes absolutely no sense to me. Please help me.
Posted by: VampireSilence 3 Jul 2021, 8:42
SOLVED: The default WeaponObjects are treated differently than custom WeaponObjects you add. The default ones are always found, no matter where you store them, but the custom ones you add need to be in "INI\Object\WeaponObjects.ini". I am quite surprised that no one of the experienced modders could answer such a simple question.
Posted by: Kalamel 25 Sep 2021, 19:37
Well, thanks for posting solution. It's a help for me and hopefully other.