Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Steeveeo on March 01, 2008, 01:38:08 AM

Title: Scrapclass freezups
Post by: Steeveeo on March 01, 2008, 01:38:08 AM
Hey all, working on getting radiation to come from "ground zero" of my nukes, the problem? Any time I try to spawn the mines (even the stock gasbomb2 for a test), the game completely freezes up and I have to ctrl+alt+delete and end the instance of battlezone.

The changelog isnt helping except to help me find this stuff:


[GameObjectClass]
ScrapClass1 = "" // Scrap generated when this object goes boom. Unspecified = use default
ScrapClass2 = "" // Scrap generated when this object goes boom. Unspecified = use default
ScrapClass3 = "" // Scrap generated when this object goes boom. Unspecified = use default


The only problem is, it either doesnt spawn what I tell it to or just locks up the game.

Anyone ever get this feature to work with non-scrap objects in 1.3pb3? Before the board was wiped I saw a lot of techniques about it, but I forget just how it was impletmented.

Here is the missile code, anything wrong?

[GameObjectClass]
geometryName = "irocketemit.xsi"
geometryScale = 0.03
animCount = 1
animName1 = "forward"
animFile1 = "irocketemit.xsi"
classLabel = "wingman" //"daywrecker"
scrapCost = 75
scrapValue = 5
maxHealth = 100
maxAmmo = 0
unitName = "Nuclear Weapon"
aiName = "PowerUpProcess"
explosionName = "xnukexpl_srv"
needpilot = 0
caninteract = 1
candetect = 1
heatsignature = 10
imagesignature = 10
radarsignature = 10
needgroup = 0
isgrouped = 0
DAMAGE_SCALE = 10
scrapclass1 = "nshockmin"
scrapclass2 = "nshockmin"
scrapclass3 = "nshockmin"

requireCount = 0
requireName1 = "ibfact"
requireText1 = "Build Factory"
requireName2 = "ibarmo"
requireText2 = "Build Armory"
requireName3 = "ibcbun"
requireText3 = "Build CommBunker"
requireName4 = "ibsbay"
requireText4 = "Build Service Bay"
requireName5 = "rcen"
requireText5 = "Build Research Center"

effectHard1 = "hp_emit_1"
effectName1 = "apnuke_srv.render"

[Render]
renderBase = "draw_multi"
renderCount = 5
//renderName1 = "apnuke_srv.rocket"
renderName1 = "apnuke_srv.flare"
renderName2 = "apnuke_srv.smoke"
renderName3 = "apnuke_srv.flame"
renderName4 = "apnuke_srv.launch"
renderName5 = "apnuke_srv.launchplume1"

[Rocket]
renderBase = "draw_geom"
geomName = "irocketshell.xsi"
texturename = "ibextw01.tga"
//textureBlend = "srcalpha invsrcalpha modulatealpha"
startColor = "96 96 96 25500"
finishColor = "96 96 96 25500"
startRadius = 0.03
finishRadius = 0.03
animateTime = 1

[Flare]
renderBase = "draw_sprite"
textureName = "flare.tga"
textureBlend = "one one modulate"
startColor = "255 255 255 255"
finishColor = "255 255 255 255"
startRadius = 7.5
finishRadius = 7.5

[Smoke]
renderBase = "draw_twirl_trail"
textureName = "smoke.tga"
textureBlend = "srcalpha invsrcalpha modulatealpha"
startColor = "31 31 31 200"
finishColor = "128 128 128 0"
startRadius = 1
finishRadius = 30.0
animateTime = 10
emitDelay = 0.04
emitVelocity = "0.0 0.0 0.0"
emitVariance = "3.50 3.50 2.50"
emitInherit = "-0.01 -.01 -.01"
emitLife = 10
maxDist = 1000

[Flame]
renderBase = "draw_twirl_trail"
textureName = "flame.tga"
textureBlend = "one one modulate"
startColor = "255 64 0 2550"
finishColor = "255 0 0 0"
startRadius = 2
finishRadius = 0.2
animateTime = 0.3
emitDelay = 0.005
emitVelocity = "0.0 0.0 0.0"
emitVariance = "3.0 3.0 2.0"
emitLife = 0.3
maxDist = 1000

[Launch]
simulateBase = "sim_dust"
lifeTime = .1
renderBase = "draw_emit"
emitName = "apnuke_srv.launch2"
emitDelay = 9e9
emitVelocity = "0.0 0.0 0.0"
emitVariance = "0.0 0.0 0.0"
emitLife = 0.1
maxDist = 1000

[Launch2]
simulateBase = "sim_dust"
lifeTime = 0.1
renderBase = "draw_emit"
emitName = "apnuke_srv.launchcloud"
emitDelay = 0.0001
emitVelocity = "0 0 0"
emitVariance = "750.0 0.0 750.0"
emitLife = 15

[LaunchCloud]
simulateBase = "sim_dust"
lifeTime = 15.0
renderBase = "draw_sprite"
textureName = "smoke.tga"
textureBlend = "srcalpha invsrcalpha modulatealpha"
startColor = "31 31 31 255"
finishColor = "128 128 128 0"
startRadius = 10.0
finishRadius = 30.0
animateTime = 15.0

[LaunchPlume1]
simulateBase = "sim_dust"
lifeTime = .1
renderBase = "draw_emit"
emitName = "apnuke_srv.launchPlume2"
emitDelay = 9e9
emitVelocity = "0.0 0.0 0.0"
emitVariance = "0.0 0.0 0.0"
emitLife = 0.1
maxDist = 1000

[LaunchPlume2]
simulateBase = "sim_smoke"
lifeTime = 0.1
renderBase = "draw_emit"
emitName = "apnuke_srv.launchPlume"
emitDelay = 0.0001
emitVelocity = "0 0 0"
emitVariance = "10.0 25.0 10.0"
emitLife = 15

[LaunchPlume]
simulateBase = "sim_smoke"
lifeTime = 15
renderBase = "draw_twirl"
textureName = "smoke.tga"
textureBlend = "srcalpha invsrcalpha modulatealpha"
startColor = "31 31 31 255"
finishColor = "128 128 128 0"
startRadius = 10
finishRadius = 25
animateTime = 15.0
rotationRate = 0.1

[CraftClass]
xplCrash = ""
rangeScan = 300.0f
periodScan = 5.0f
velocJam = 5.0f
engageRange = 120
DoBettyLost = False
BailSound = "empty.wav"
ExplodeSound = "empty.wav"
DAMAGE_SCALE = 10

//attackTask = "AssaultTankAttack"
//subAttackTask = "SupportSubAttack"
//subAttackClass = "ANS"

attackTask = "MortarBikeAttack"
subAttackTask = "MortarBikeSubAttack"
subAttackClass = "ANS"

// subAttackClass uses 3 letters.
// 1st letter is either A or N.     A is include Air targets.         

N is attack ground only.
// 2nd letter is either D or N.     D is to deploy before attacking. 

N for regular attack.
// 3rd letter is either S or N.     S is to use Weapon Range.         

N is use the Engage Range to attack.


braccelFactor = 0.03
velFactor = 0.2
steerFactor = 1.5
omegaFactor = 0.2
strafeFactor = 0.2

avoidSpeed = 20;
topSpeed = 30;

selectWaitMsg = ""
selectAttackMsg = ""
selectFollowMsg = ""
selectGoMsg = ""
selectOtherMsg = ""
holdMsg = ""

goMsg = ""
attackMsg = ""
followMeMsg = ""
followMsg = ""
repairMsg = ""
reloadMsg = ""
rescueMsg = ""
recycleMsg = ""
otherMsg = ""
holdMsg = ""
user1Msg = "" 
killedMsg = ""
diedMsg = ""

[HoverCraftClass]
DAMAGE_SCALE = 10
velocForward = 28.5 // []
velocReverse = 20.0 // []
velocStrafe = 16.0 // []
accelThrust = 24.0 //acceleration []
accelDragStop = 6.0 //how fast it stops once hands are off controls []
accelJump = 15.0 // []
setAltitude = 0.01 // how high off the ground

alphaTrack = 21.0 //springs speed it rights itself []
alphaDamp = 8.0 //shocks []

pitchPitch = 0.25 //nose up []
pitchThrust = 10 //nose down []

rollStrafe = 0.08 //rolls while strafing []
omegaSpin = 6.0 //spinning in place speed []
omegaTurn = 2.3 //turning while moving speed []
alphaSteer = 7.0 //how fast it responds to steering []
rollSteer = 0.08 //rolls while steering []

soundThrust = "ssmfly.wav"
soundTurbo = "ssmfly.wav"
Title: Re: Scrapclass freezups
Post by: General BlackDragon on March 01, 2008, 02:09:52 AM
not sure if scrapclass can spawn a vehicle....o.0
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 01, 2008, 02:35:48 AM
ive had it spawn buildings

try spawning an isdf scout or something to test it
Title: Re: Scrapclass freezups
Post by: Angstromicus on March 01, 2008, 03:15:59 AM
Just the be certain, make sure it's spawning an object, and not an ordnance.
Title: Re: Scrapclass freezups
Post by: Zero Angel on March 01, 2008, 03:54:43 AM
Just out of curiosity, is wingman class allowed to use PowerupProcess as an AI? I've never seen that happen before.
Title: Re: Scrapclass freezups
Post by: Nielk1 on March 01, 2008, 07:23:35 AM
It has worked so far, but maybe that AI process somehow interfears with the scrap class (I doubt it, but powerups don't leave scrap).
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 01, 2008, 08:15:11 AM
try tugprocess
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 01, 2008, 09:20:30 PM
PowerupProcess objects can leave scrap, I set the value to 5 and a single glop of scrap spawns every time.

@GBD: nshockmin is a mine, not a vehicle, whered you get vehicle from anyway?
Title: Re: Scrapclass freezups
Post by: General BlackDragon on March 01, 2008, 09:41:58 PM
classlabel = "wingman" is a vehicle...
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 01, 2008, 09:47:27 PM
no GBD - that is the missile - what it leaves behind is a mine -- and steeveeo - wont the mine be destroyed by its own radiation??

and perhaps you could try it creating a 'powered' class building which creates an object spawn as a tap just before it is destroyed and the spawn will create the mine after the nuke has subsided (because object spawns are invincible and wont be destroyed by the nuke)
Title: Re: Scrapclass freezups
Post by: Nielk1 on March 02, 2008, 12:26:21 AM
The mines would be set to 0 health and thus last until their lifespan ran out.

They would be an other neutral side so anything killed by them would be killed by a natural or neutral phenomenon (radiation).
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 02, 2008, 12:55:03 AM
the only other time that the game freezes on me is if it has a bad sound file called for...
Title: Re: Scrapclass freezups
Post by: Avatar on March 02, 2008, 01:29:00 AM
When you fall victim to such a crash the first thing to do is drop back to stock objects as much as possible.  Replace the scrap called in the odf with actual scrap, see if it works.
If it does try a stock "i76building" class building, see if it works.
If it does try a stock mine, see if it works.
etc...

Work your way back up to your custom objects, to narrow down the real issue.

-Av-
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 02, 2008, 01:52:41 AM
thats exactly what i do
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 02, 2008, 03:25:40 AM
@Avatar:
QuotePowerupProcess objects can leave scrap, I set the value to 5 and a single glop of scrap spawns every time.
QuoteAny time I try to spawn the mines (even the stock gasbomb2 for a test), the game completely freezes up
Havent tried the i76building yet.

It seems to be a problem with spawning spraybuilding classes so far...

BTW, Im not on a very good comp at the moment so I will take notes until I get back to home base.
Title: Re: Scrapclass freezups
Post by: Commando on March 02, 2008, 05:09:55 AM
I believe scrapClass must be scrap.  If it is not, bz2 goes into an infinite loop causing the freezing.  That is my guess anyways.
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 02, 2008, 05:29:38 AM
no cmdo - i had an isdf tank which would leave behind the 'petank' (the derelict one from the first pluto missions) and that was a building - it does work
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 02, 2008, 06:58:11 AM
Can someone else attempt to have a vehicle with powerupprocess spawn the mine gasbomb2 as a scrapclass? I wanna see if its a particle and/or system issue.
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 02, 2008, 09:04:02 PM
Anybody got results or what?
Title: Re: Scrapclass freezups
Post by: bigbadbogie on March 02, 2008, 09:15:50 PM
i gave it a shot - it froze like you said....weird
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 02, 2008, 09:28:52 PM
huh...strange...I guess its not the massive particle counts of the nuke...

I'll try i76building when I get back home.
Title: Re: Scrapclass freezups
Post by: Steeveeo on March 04, 2008, 04:22:00 AM
yay, it works now! AND I made a nice little (read: gigantic) shockwave thats quite reminicent of COD4 ^_^