Renegade Projects Network Forums

Full Version: Base Defence spawning problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to make a V3-type rocket launcher that is a base defence. I took the code from the Dreadnought and slapped it into the patriot missile, then when I tried to fire it the game cried like a baby.
Anybody know where i screwed up?

; SSM
[NASSM]
Image=NASAM
UIName=Name:NASSM
Name=Surface to Surface Rockets
BuildCat=Combat
Strength=900
Armor=steel
TechLevel=4
Prerequisite=NAHAND
Adjacent=4
Sight=10
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs
AIBasePlanningSide=1 ;gs 0 for Good, 1 for Evil
Cost=100
BaseNormal=no
Points=30
Power=-50
Crewed=no
Primary=DredLauncher
Spawns=DMISL
SpawnsNumber=10
SpawnRegenRate=8
SpawnReloadRate=0
;FireAngle=32
LandTargeting=0
NavalTargeting=0
Capturable=false
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DebrisAnims=DBRIS1LG,DBRIS1SM,DBRIS4LG,DBRIS4SM,DBRIS5LG,DBRIS5SM
Maxdebris=3
MinDebris=2
ThreatPosed=0 ; This value should be 0 for objects that are purely anti-air, since aircraft do not use the threat values
;DamageParticleSystems=SparkSys,LGSparkSys
IsBaseDefense=yes
Powered=yes
Turret=yes
TurretAnim=SAM
TurretAnimIsVoxel=true
;TurretAnim=NASAM_A
;TurretAnimIsVoxel=false
;TurretAnimX=-2
;TurretAnimY=10
TurretAnimZAdjust=-20
HasStupidGuardMode=false
WorkingSound=PowerOn
NotWorkingSound=PowerOff
VHPScan=Strong[color=beige]
i dunno, but i recall that when kravvitz tried it years ago, he could only get it to work on 1x1 structures.
First of all, the official position is that spawning only works on 1x1 structures; the unofficial, unproven position is that spawns originate (and potentially return to) from the center cell, so something like 3x3 could also work.
Secondly, spawning itself works. I, personally, had a Hornet Defense for long times. So if everything fails, you can just hack spawning as usual.
Thirdly, the dred missiles spawn into the direction the ship is turned to. The ship doesn't have a turret. Your building can't turn and does have a turret. Try disabling the turret for a change. Return the FireAngle. All this kind of stuff. And report the results back Wink
Still no good.
Tried Tesla Coil, modified it to:

[NASSM]
Image=CRATE
UIName=Name:NASSM
Name=Surface to Surface Missle
BuildCat=Combat
Prerequisite=NAHAND
Strength=600
Armor=steel
TechLevel=3
Adjacent=2
Sight=8
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,Arabs
AIBasePlanningSide=1 ;gs 0 for Good, 1 for Evil
Cost=150
Points=30
Power=-75
Crewed=no
Capturable=false
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
;DestroyAnim=NATSLADM
Primary=V3Launcher
Spawns=V3ROCKET
SpawnsNumber=1
SpawnRegenRate=400
SpawnReloadRate=0
NoSpawnAlt=yes
FireAngle=32
;LandTargeting=0 //doesn't matter
;NavalTargeting=0
Turret=no
DebrisAnim=Dbris1sm,Dbris1lg,Dbris4sm,Dbris5sm,Dbris4lg,Dbris7sm,Dbris8sm,Dbris5lg,Dbris4lg
MaxDebris=15
MinDebris=5
ThreatPosed=40 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys,BigGreySmokeSys
DamageSmokeOffset=96, 64, 112
IsBaseDefense=yes
BaseNormal=no
Powered=yes
HasStupidGuardMode=false
WorkingSound=PowerOn
NotWorkingSound=PowerOff

Anybody help?
I'm sorry, but its not something i've tried to do.
Take out the NoSpawnAlt= line, that means it has a different voxel for when it is out of rockets (e.g. V3.vxl has V3WO.vxl for no rocket).
makes sence that it might cause a crash, because buildings can't be VXLs
I remember my "pillbox airbase"
with 3 planesSmile
All planes set target to one unitLOL
I pulled the line; it still crashed. I tried changing the code so that it would launch hornets instead of v3's, and it worked perfectly. Is there something hardcoded in the v3 that makes it not work as a base defence?
Hornets can retarget mid-flight, spawned missiles can't. In addition V3 can't even turn around if the launcher is facing the wrong direction. Try the dred missile instead.
His original code uses the Dreadnaught missile.

elrathia kingi: If this doesn't work out, clone the hornet, give it a missile voxel, and arm it with a limbolaunching suicide weapon. A very small ROT might also be in order, and don't forget to add the trailer.

That's the poor man's spawned missile. Doesn't look 100% when it starts, but fine otherwise.
OK, I half fixed it. I cloned the Dredlauncher and dmisl to ssmlauncher and ssm, so there was no more IE when I launched it. Instead, the missiles fly out and either go in a line to the edge of the screen without coming down or circle around and try to land back in the box. I have the MissileSpawn=yes tag in it; in fact, I haven't changed a single thing about the DMISL or launcher, I just renamed it.
That is because you can't clone spawned missiles. The missile types are fixed to the two/three present in the original game.

The only way to have additional ones is the method I described.
Alright, I'll give it a try. I still don't understand the IE, though.