Colony Cannon

I have been trying to build a novalith cannon with the ability to colonize a planet with its shot insted of doing damage. the idea is that you can use the cannon to "shoot" a colony behind your enemy and build up a fleet at his backdoor.

3,033 views 12 replies
Reply #1 Top

it is possible, you would just have to modify the novalith ability with a colonize ability

most likely the TEC colonize ability

Reply #2 Top
Kinda like a Genesis Torpedo from Star Trek 2: WoKahn.
Reply #3 Top

On an unrelated note, that sounds strange and funny.

 

:fox:

Reply #4 Top

Ive actually been trying to mod the cannon for the last 2 days, and i didnt find anything similar searching the forums.

(yes, similar to the Genesis)

i understand that the cannon fires in 4 parts

It starts with the ability
 AbilityColonyOrbitalCannon

that activates a buff that charges the shell on the cannon
 BuffColonyOrbitalCannon
  -Finishing charge up, the shell is launched.

Shell travels to target
 CannonShellColony

Upon impact the shell triggers a buff that should colonize the planet.
 BuffCannonshellColony


The problem is that I havent been able to come up with a script that the game will accept, that will colonize the planet. when the shell impacts the planet.

Reply #5 Top

post them out in full and let us see the code

Reply #6 Top

Hmmm. I'm not a modder but don't you need to take out the line of code which causes damage to the said target, and what about if it was already inhabited...

Reply #7 Top

I believe that that is part of the "CannonShellOnPlanet.entity" If he replaces that, he won't have to worry about it.

Reply #8 Top

(** items in this segment are not in actual code, i am useing them for notes to clairfy each entity file.**)
AbilityColonyOrbitalCannon.entity  (** This event controls targetting, and starts the next effect in the script in this case, the planet that is targetted by this script must be a planet, must be colonizeable, and must have been explored.**)
TXT
entityType "Ability"
buffInstantActionType "ApplyTargettedBuffToSelfNoRange"
instantActionTriggerType "AlwaysPerform"
buffType "BuffColonyOrbitalCannon"
targetFilter
 numOwnerships 1
 ownership "NoOwner"
 numObjects 1
 object "Planet"
 numConstraints 2
 constraint "IsColonizable"
 constraint "IsExplored"
effectInfo
 effectAttachInfo
  attachType "Center"
 smallEffectName ""
 largeEffectName ""
 soundID ""
needsToFaceTarget TRUE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "ResearchWithoutBase"
improveSourceResearchSubject "RESEARCHSUBJECT_PLANETMODULEACCESS_CANNONPHASE"
aiUseTime "Anytime"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "AntiMatter"
antiMatterCost
 Level:0 0.000000
 Level:1 0.000000
 Level:2 0.000000
cooldownTime
 Level:0 1.000000
 Level:1 0.000000
 Level:2 0.000000
researchPrerequisites
 NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_PSIORBITALCANNON_NAME"
descStringID "IDS_ABILITY_PSIORBITALCANNON_DESC"
hudIcon "HUDICON_ABILITY_PSIORBITALCANNON"
smallHudIcon "HUDICON_ABILITY_PSIORBITALCANNON"
infoCardIcon ""

BuffColonyOrbitalCannon.entity (** this buff creates the cannon shell **)
TXT
entityType "Buff"
onReapplyDuplicateType "ReplaceWithNewBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable TRUE
isChannelling TRUE
numInstantActions 2
instantAction
 buffInstantActionType "PlayPersistantAttachedEffect"
 instantActionTriggerType "OnDelay"
 delayTime 0.000000
 effectInfo
  effectAttachInfo
   attachType "Ability"
   abilityIndex 0
  smallEffectName "Ability_OrbitalCannonPhaseChargeUp"
  largeEffectName "Ability_OrbitalCannonPhaseChargeUp"
  soundID "WEAPON_PHASEORBITALCANNON_CHARGE"
instantAction
 buffInstantActionType "CreateCannonShell"
 instantActionTriggerType "OnBuffFinish"
 cannonShellType "CannonShellColony"
 effectInfo
  effectAttachInfo
   attachType "Ability"
   abilityIndex 0
  smallEffectName "Ability_OrbitalCannonPhaseMuzzle"
  largeEffectName "Ability_OrbitalCannonPhaseMuzzle"
  soundID "WEAPON_PSIORBITALCANNON_MUZZLE"
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 2
finishCondition
 finishConditionType "TimeElapsed"
 time
  Level:0 6.000000
  Level:1 0.000000
  Level:2 0.000000
finishCondition
 finishConditionType "OwnerChanged"

CannonShellColony.entity (** This is the projectile that is fired from the cannon **)
TXT
entityType "CannonShell"
acceleration 3000.000000
startingSpeed 5000.000000
maxSpeed 100000.000000
buffToApplyOnImpact "BuffCannonShellColony"
planetImpactEffectName "Ability_OrbitalCannonPsiSurfaceImpact"
planetImpactSounds
 soundCount 1
 sound "EXPLOSION_CANNONSHELLTECH"
planetImpactCameraShakeMaxSize 980000.000000
planetImpactCameraShakeStrength 1.500000
planetImpactCameraShakeDuration 0.000000
meshName "CannonShellTech"
mainViewIcon "MainViewIconCannonShellPSI"
picture "PictureCannonShellPSI"
nameStringID "IDS_CANNONSHELLPSI_NAME"
descStringID "IDS_CANNONSHELLPSI_DESC"
renderMesh FALSE
minZoomDistanceMult 4.500000
hudIcon "HUDIconCannonShellTech"
smallHudIcon "HUDIconSmallCannonShellPsi"
infoCardIcon "HUDIconSmallCannonShellPsi"
minShadow 0.000000
maxShadow 0.500000

BuffCannonShellColony.entity (** the effect that occures when the shell impacts the planet **)
TXT
entityType "Buff"
onReapplyDuplicateType "ReplaceWithNewBuff"
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
 buffInstantActionType "ColonizePlanet"
 instantActionTriggerType "AlwaysPerform"
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
 finishConditionType "OwnerChanged"

Reply #9 Top

last entity file change instantActionTriggerType "AlwaysPerform" to "OnDelay" then set delay at 0.0

everything else looks okay

what error messages are you getting?

Reply #10 Top

im not getting any error messages... its just not doing anything when fired at the planet.

the shell is fired from the cannon, it hits the planet, the effect from it hitting the planet is visable, however no coloniztion takes place. (maby all the colonists died in the missile impact >.< J/K :P)


On Delay has no effect also.

Reply #11 Top

As cool as it would be, shooting people at planets sound sort of whacky xD