Can someone please help (Code not working)

I have this ability

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetWithTravel"
instantActionTriggerType "AlwaysPerform"
buffType "BuffAsgardBeamsCapital"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 5
object "Titan"
object "CapitalShip"
object "Frigate"
object "PlanetModule"
object "StarBase"
numSpaces 1
space "Normal"
numConstraints 0
range
Level:0 5000.000000
Level:1 5500.000000
Level:2 6000.000000
Level:3 0.000000
travelSpeed 1750.000000
hasWeaponEffects TRUE
weaponEffectOriginType "Targetter"
weaponEffectAttachInfo
attachType "Ability"
abilityIndex 0
weaponEffectImpactOffsetType "RandomMesh"
canWeaponEffectHitHull TRUE
canWeaponEffectHitShields TRUE
weaponEffectsDef
weaponType "Projectile"
burstCount 1
burstDelay 0.100000
fireDelay 0.000000
muzzleEffectName "Weapon_Psi_BeamCapital_Muzzle"
muzzleSoundMinRespawnTime 0.100000
muzzleSounds
soundCount 1
sound "WEAPON_ASGARDBEAMS_MUZZLE"
hitEffectName "CapitalAbility_BeamBlastImpact"
hitHullEffectSounds
soundCount 1
sound "WEAPON_ASGARDBEAMS_MUZZLE"
hitShieldsEffectSounds
soundCount 1
sound "WEAPON_ASGARDBEAMS_MUZZLE"
projectileTravelEffectName "Weapon_AsgardBeam_Travel"
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget TRUE
isUltimateAbility FALSE
maxNumLevels 3
levelSourceType "Intrinsic"
minExperienceLevelRequired
Level:0 0.000000
Level:1 2.000000
Level:2 4.000000
Level:3 0.000000
aiUseTime "OnlyInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
Level:0 100.000000
Level:1 100.000000
Level:2 100.000000
Level:3 0.000000
cooldownTime
Level:0 4.000000
Level:1 3.500000
Level:2 3.000000
Level:3 0.000000
orderAcknowledgementType "ONATTACKORDERISSUED"
researchPrerequisites
NumResearchPrerequisites 1
ResearchPrerequisite
Subject "RESEARCHSUBJECT_ABILITYACCESS_ASGARDBEAMSTAURI"
Level 1
RequiredFactionNameID ""
RequiredCompletedResearchSubjects 0
nameStringID "IDS_ABILITY_ASGARDBEAM_NAME"
descStringID "IDS_ABILITY_ASGARDBEAM_DESCRIPTION"
hudIcon "HUDICON_RESEARCHSUBJECT_WEAPONDAMAGE_BEAM1"
smallHudIcon "HUDICON_RESEARCHSUBJECT_WEAPONDAMAGE_BEAM1"
infoCardIcon ""

 

 

And I am trying to change the weapon with this one

 

 

WeaponType "Beam"
damageEnums
AttackType "ANTIHEAVY"
DamageAffectType "AFFECTS_SHIELDS_AND_HULL"
DamageApplyType "BACKLOADED"
DamageType "ENERGY"
WeaponClassType "BEAM"
DamagePerBank:FRONT 1250.000000
DamagePerBank:BACK 0.000000
DamagePerBank:LEFT 0.000000
DamagePerBank:RIGHT 0.000000
Range 6500.000000
PreBuffCooldownTime 10.000000
CanFireAtFighter FALSE
SynchronizedTargeting FALSE
PointStaggerDelay 1.300000
TravelSpeed 0.000000
Duration 1.000000
fireConstraintType "Research"
researchPrerequisites
NumResearchPrerequisites 1
ResearchPrerequisite
Subject "RESEARCHSUBJECT_ABILITYACCESS_ASGARDBEAMSTAURI"
Level 1
RequiredFactionNameID ""
RequiredCompletedResearchSubjects 0
WeaponEffects
weaponType "Beam"
burstCount 1
burstDelay 0.000000
fireDelay 0.000000
muzzleEffectName "Weapon_Psi_BeamCapital_Muzzle"
muzzleSoundMinRespawnTime 1.30000
muzzleSounds
soundCount 1
sound "WEAPON_ASGARDBEAMS_MUZZLE"
hitEffectName "Weapon_Psi_BeamCapital_Hit"
hitHullEffectSounds
soundCount 1
sound ""
hitShieldsEffectSounds
soundCount 1
sound ""
beamEffectSounds
soundCount 1
sound ""
beamGlowTextureName "PsiCapitalBeam_Glow"
beamCoreTextureName "PsiCapitalBeam_Core"
beamWidth 20.000000
beamGlowColor ffffffff
beamCoreColor ffffffff
beamTilingRate 3.000000

 

What I thought I could do

 

 

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetWithTravel"
instantActionTriggerType "AlwaysPerform"
buffType "BuffAsgardBeamsCapital"
targetFilter
numOwnerships 1
ownership "Enemy"
numObjects 5
object "Titan"
object "CapitalShip"
object "Frigate"
object "PlanetModule"
object "StarBase"
numSpaces 1
space "Normal"
numConstraints 0
range
Level:0 5000.000000
Level:1 5500.000000
Level:2 6000.000000
Level:3 0.000000
travelSpeed 1750.000000
hasWeaponEffects TRUE
weaponEffectOriginType "Targetter"
weaponEffectAttachInfo
attachType "Ability"
abilityIndex 0
weaponEffectImpactOffsetType "RandomMesh"
canWeaponEffectHitHull TRUE
canWeaponEffectHitShields TRUE
weaponEffectsDef
weaponType "Beam"
burstCount 1
burstDelay 0.000000
fireDelay 0.000000
muzzleEffectName "Weapon_Psi_BeamCapital_Muzzle"
muzzleSoundMinRespawnTime 1.30000
muzzleSounds
soundCount 1
sound "WEAPON_ASGARDBEAMS_MUZZLE"
hitEffectName "Weapon_Psi_BeamCapital_Hit"
hitHullEffectSounds
soundCount 1
sound ""
hitShieldsEffectSounds
soundCount 1
sound ""
beamEffectSounds
soundCount 1
sound ""
beamGlowTextureName "PsiCapitalBeam_Glow"
beamCoreTextureName "PsiCapitalBeam_Core"
beamWidth 20.000000
beamGlowColor ffffffff
beamCoreColor ffffffff
beamTilingRate 3.000000
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget TRUE
isUltimateAbility FALSE
maxNumLevels 3
levelSourceType "Intrinsic"
minExperienceLevelRequired
Level:0 0.000000
Level:1 2.000000
Level:2 4.000000
Level:3 0.000000
aiUseTime "OnlyInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
Level:0 100.000000
Level:1 100.000000
Level:2 100.000000
Level:3 0.000000
cooldownTime
Level:0 4.000000
Level:1 3.500000
Level:2 3.000000
Level:3 0.000000
orderAcknowledgementType "ONATTACKORDERISSUED"
researchPrerequisites
NumResearchPrerequisites 1
ResearchPrerequisite
Subject "RESEARCHSUBJECT_ABILITYACCESS_ASGARDBEAMSTAURI"
Level 1
RequiredFactionNameID ""
RequiredCompletedResearchSubjects 0
nameStringID "IDS_ABILITY_ASGARDBEAM_NAME"
descStringID "IDS_ABILITY_ASGARDBEAM_DESCRIPTION"
hudIcon "HUDICON_RESEARCHSUBJECT_WEAPONDAMAGE_BEAM1"
smallHudIcon "HUDICON_RESEARCHSUBJECT_WEAPONDAMAGE_BEAM1"
infoCardIcon ""

I cant seem to get it working, the ability still goes off but no mesh for the beam comes up if anyone can help me I would appreciate it greatly.

3,964 views 4 replies
Reply #1 Top

Uh, yes I imagine it would. You have a ton of other stuff the ability doesn't know what to do with.


WeaponType "Beam"
damageEnums
AttackType "ANTIHEAVY"
DamageAffectType "AFFECTS_SHIELDS_AND_HULL"
DamageApplyType "BACKLOADED"
DamageType "ENERGY"
WeaponClassType "BEAM"
DamagePerBank:FRONT 1250.000000
DamagePerBank:BACK 0.000000
DamagePerBank:LEFT 0.000000
DamagePerBank:RIGHT 0.000000
Range 6500.000000
PreBuffCooldownTime 10.000000
CanFireAtFighter FALSE
SynchronizedTargeting FALSE
PointStaggerDelay 1.300000
TravelSpeed 0.000000
Duration 1.000000
fireConstraintType "Research"
researchPrerequisites
NumResearchPrerequisites 1

You notice the original ability had no damage information. You are just defining the weapon effect in abilities, any damage they do you define in the buff file. You cannot just paste everything from a ship's weapon and have it work as an ability.

The Vulkoras Desolator's dinintegration ability uses a beam, and it might be a better base to work from.

Alternatively, if you just wanted the ability to apply an extra effect when a ship fires a particular weapon, look at the Marza's Incendiary shells ability. That can be neater in many cases.

Also, we have a thread for just such questions here. If you are posting large amounts of code, pastebin can make things a lot easier on everyone.

Reply #2 Top

Hi and thanks for your response, I will look into the other thread and using the other ability as a base, however, for now let me explain that I am aware of the ability having no damage and only defining weapon effects, if you see the wall of text :P under what I thought I could do I'm pretty sure I only changed from projectile to beam and directed to the beam particles, this code threw no errors in dev and as I said the ability worked, the muzzle/hit meshes work fine just nothing for the beam  itself.

 

I will keep working on it when I get access to my main pc later today.

 

Thanks again for the response and point in the right direction.

Gareth.

Reply #3 Top

Quoting gareth_lol, reply 2

Hi and thanks for your response, I will look into the other thread and using the other ability as a base, however, for now let me explain that I am aware of the ability having no damage and only defining weapon effects, if you see the wall of text :P under what I thought I could do I'm pretty sure I only changed from projectile to beam and directed to the beam particles, this code threw no errors in dev and as I said the ability worked, the muzzle/hit meshes work fine just nothing for the beam  itself.

 

I will keep working on it when I get access to my main pc later today.

 

Thanks again for the response and point in the right direction.

Gareth.

Sorry, when you post a wall of text like that with explanations between pieces, its easy to miss that. :p

I also notice you have no duration parameter on your real ability. Whether as a weapon or ability effect, you need to tell the game how long the beam will last. You might have to use a different ability type for beams, which is why I suggested to look at the disintegration example.

Reply #4 Top

Quoting GoaFan77, reply 3


Quoting gareth_lol,

Hi and thanks for your response, I will look into the other thread and using the other ability as a base, however, for now let me explain that I am aware of the ability having no damage and only defining weapon effects, if you see the wall of text :P under what I thought I could do I'm pretty sure I only changed from projectile to beam and directed to the beam particles, this code threw no errors in dev and as I said the ability worked, the muzzle/hit meshes work fine just nothing for the beam  itself.

 

I will keep working on it when I get access to my main pc later today.

 

Thanks again for the response and point in the right direction.

Gareth.



Sorry, when you post a wall of text like that with explanations between pieces, its easy to miss that. :P

I also notice you have no duration parameter on your real ability. Whether as a weapon or ability effect, you need to tell the game how long the beam will last. You might have to use a different ability type for beams, which is why I suggested to look at the disintegration example.

 

 

Yeah I understand :P I got it to work using some other abilities and buffs jammed together, thanks again for the point in the right direction, I must confess its not my mod, I was just unhappy with some of the features so I thought I would change them to my liking :) but none the less its all working now.

 

 

Cheers again

Gareth