Cannon shells help

Hey everyone, I am Makon from the 7 Deadly Sins team and I have a question that perhaps some other experienced sins modders would be able to help me out with.

Okay, so what I am basically asking is can a cannonshell (i.e. one fired from a Nova cannon) be fired at a ship.  I am NOT talking about firing at a planet and applying a damage buff to a ship, I am talking about firing the actual shell at a ship.

Or is this sort of thing hardcoded and there is nothing I can do about it?

 

Thanks!

 

10,298 views 10 replies
Reply #1 Top

Yes, it is possible. To make this work you have to edit in the proper WeaponEffects or weaponEffectsDef information, for ship weapons and abilities, respectfully. For example, I've taken the missile from the Missile Barrage ability and added it to a normal missile weapon/bank.

Reply #2 Top

Thanks for the reply.

I should have been a little more specific, this is an ability fired weapon and not fired from one of the weapon banks per se.

It's an onboard cannon for a capital ship that "theoretically" can hit planets with the cannonshell, destroying colonies (like a normal novalith shell), but instead, can also target enemy ships/starbases/modules.

So this is the order of entity files...

Ability > targets enemy planets, capital ships, frigates, starbases, planet modules and applies cannon buff to target

cannon buff > plays 2 instant actions, 1) charges cannon (this works) 2) creates cannon shell (does not work when targeting anything but planets)

Created cannon shell > applies cannon shell impact buff, which has separate "DoDamge" and "DoDamageToPlanet" buffs.

I hope this makes sense, its kind of hard to explain these indepth ability/buff processes! Thanks again!

 

Reply #3 Top

Yes you should be able to target ships with a cannon type ability, but I think (never tried) only in you capital's ship current gravity well. I.e. you can't snipe a specific enemy capitalship in planet A from planet B, the best you can do is target planet A and then have the cannon shell apply the buff to all enemy capitalships in the gravity well. You should be able to target a specific entity in your own gravity well however.

Reply #4 Top

Yeah I can target the ship, and it charges up the cannon. But it never "creates" the shell to launch at the ship.  however if I target the planet I am at, it can shoot the planet and it works like intended.

I may just use an actual weapon projectile instead of the cannon shell and just make it able to hit planets, that way I can get this to work. It seems like you can't launch a nova projectile at an actual ship, it can only be fired at a planet.

Reply #5 Top

Quoting Makon86, reply 4
I may just use an actual weapon projectile instead of the cannon shell and just make it able to hit planets, that way I can get this to work. It seems like you can't launch a nova projectile at an actual ship, it can only be fired at a planet.
End of Makon86's quote

Hmm, there's nothing in the file to suggest that, but I suppose it could be hard coded. Though if you only wanted to target a ship in the same gravity well why not just make it a normal ability with travel like ion bolt?

Reply #6 Top

Yeah, what I did was make it like the Kol gauss blast ability instead.

I guess I wanted to try the cannonshell because it looks big and bada$$. With it still using the surfaceimpact effect, it makes for a very large explosion when its impacting ships or a planet :D

I think it is hardcoded, it just simply wouldnt fire at ships eventhough it fired at planets just fine. Oh well, worked around it by making the kol gauss blast projectile bigger and doing a copy/paste/edit job from its entity file.

Thanks for the help, looks like we probably determined another hardcode limit!

Reply #7 Top

Quoting Makon86, reply 6
I think it is hardcoded, it just simply wouldnt fire at ships eventhough it fired at planets just fine. Oh well, worked around it by making the kol gauss blast projectile bigger and doing a copy/paste/edit job from its entity file.
End of Makon86's quote

Well since it sounded like you changed the target filter correctly I would guess that's probably right. Oh well, considering you can do anything a cannon can do with an ability its not really a big deal. Technically you could create the novalith shell in the particle forge, but GRG works too.

Reply #8 Top

That's odd... It SHOULD work with an ability, assuming it's coded right. Or after looking at it the Novalith's cannon is coded differently from a ship-hitting ability. Try slapping this into your modified Gauss Blast ability; it might do the trick.

instantAction
    buffInstantActionType "PlayAttachedEffect"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonTechMuzzle"
        largeEffectName "Ability_OrbitalCannonTechMuzzle"
        soundID "WEAPON_TECHORBITALCANNON_MUZZLE"

Reply #9 Top

Lol--sorry--posted to wrong thread.

Poster go boom.

 

Reply #10 Top

Quoting Lavo_2, reply 8
That's odd... It SHOULD work with an ability, assuming it's coded right. Or after looking at it the Novalith's cannon is coded differently from a ship-hitting ability. Try slapping this into your modified Gauss Blast ability; it might do the trick.

instantAction
    buffInstantActionType "PlayAttachedEffect"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    effectInfo
        effectAttachInfo
            attachType "Center"
        smallEffectName "Ability_OrbitalCannonTechMuzzle"
        largeEffectName "Ability_OrbitalCannonTechMuzzle"
        soundID "WEAPON_TECHORBITALCANNON_MUZZLE"
End of Lavo_2's quote

 

Not sure if I can throw it in. Right now the ability has a "charging" buff, which plays an effect of a the giant cannon charging up. Then after a 7 second delay, it launches the modified gauss railgun projectile. I had SamazRalan make customized version of the projectile (essentially just doubled its size and changed the colors up a bit).

Here is an excerpt...

instantAction
 buffInstantActionType "ApplyBuffToTargetWithTravel"
 instantActionTriggerType "OnDelay"
 delayTime 7.000000
 buffType "BuffAthenaSniperCannonDamage"
targetFilter
 numOwnerships 1
 ownership "Enemy"
 numObjects 5
 object "CapitalShip"
 object "Frigate"
 object "PlanetModule"
 object "StarBase"
 object "Planet"
 numSpaces 1
 space "Normal"
 numConstraints 0
range
 Level:0 40000.000000
 Level:1 40000.000000
 Level:2 40000.000000
travelSpeed 4000.000000
hasWeaponEffects TRUE
weaponEffectOriginType "Targetter"
weaponEffectAttachInfo
 attachType "Ability"
 abilityIndex 3
weaponEffectImpactOffsetType "RandomMesh"
canWeaponEffectHitHull TRUE
canWeaponEffectHitShields TRUE
weaponEffectsDef
 weaponType "Projectile"
 burstCount 1
 burstDelay 0.000000
 muzzleEffectName "CapitalAbility_GaussBlastLaunch"
 muzzleSoundMinRespawnTime 0.100000
 muzzleSounds
  soundCount 1
  sound "WEAPON_GENERICFIRE"
 hitEffectName "Ability_OrbitalCannonTechSurfaceImpact"
 hitHullEffectSounds
  soundCount 1
  sound ""
 hitShieldsEffectSounds
  soundCount 1
  sound ""
 projectileTravelEffectName "CapitalAbility_AthenaGaussBlastTravel"

The snipercannondamage buff, then has "dodamage" and "dodamagetoplanet" buffs associated with it.  The original ability (which I didn't write, its always hard trying to reverse engineer someone elses abilities that didnt work lol!) instead of having a "weapon effect" like mine, it had another instant action buff that created a nova shell.  But like i was said earlier, the shell wouldn't fire at ships, only at planets, even with the target filters changed.