WMD Flamer causing game crash

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
marr
Miner
Miner
Posts: 37
Joined: Wed Aug 09, 2006 9:27 am

Hi all. I'm pottering away here happily building a flamethrower to get rid of looted wrecks, and it's all going pretty well so far, but when I add WMD to the damage and use it on a derelict ship, the following crash tends to crop up:

program state: updating object motion
obj class: CShip
obj name: [Varies - usually player ship, but not always]
obj pointer: 435a0c0 [player ship in this example]
CPlayerShipController
m_pStation: none
m_pTarget: none
m_pDestination: none
game state: in game

Which is an impressively thorough error trap, btw. Nice.

Having trouble with my webspace atm, so here's the flamer's weapon code:

--

<ItemType UNID="&itZorch2;"
name="Zorch - Wide"
level="16"
value="1000000"
mass="5000"
modifiers="MajorItem"
frequency="rare"
description="Spinal mounted fusion torch."
>

<Image imageID="&rsItems1;" imageX="0" imageY="480" imageWidth="96" imageHeight="96"/>

<Weapon
type="particles"
particleCount="2"
particleSpreadAngle="90"
fireRate="2"
missileSpeed="8"
lifetime="16"
damage="plasma:32; WMD3"
powerUse="4000"
sound="&snShipExplosion1;"
>

<Image imageID="&rsMediumExplosions;" imageX="0" imageY="64" imageWidth="64" imageHeight="64" imageFrameCount="16" imageTicksPerFrame="1" blend="brighten" />

</Weapon>

</ItemType>

--

It's probably massively overpowered at this stage, being the development version for my own amusement and education. I'm hoping that long term, I'll be able to add a control key to it that switches between this one and a focused, long range mode. But this version looks cool. :D

Any ideas?
User avatar
marr
Miner
Miner
Posts: 37
Joined: Wed Aug 09, 2006 9:27 am

Oh yeah - here's the entity id block I'm using, just so you don't have to go digging around for them:

<!ENTITY rsDriveExhaust "0x0000F10C">
<!ENTITY rsItems1 "0x0000F11D">
<!ENTITY rsMissiles4 "0x0000F116">
<!ENTITY rsMediumExplosions "0x0000F110">
<!ENTITY rsLargeExplosions "0x0000F10F">
<!ENTITY rsMissiles2 "0x0000F10B">

<!ENTITY snLaserCannon "0x0000F201">
<!ENTITY snRecoillessCannon "0x0000F202">
<!ENTITY snArmorHit1 "0x0000F203">
<!ENTITY snShipExplosion1 "0x0000F204">
<!ENTITY snStationExplosion1 "0x0000F205">
<!ENTITY snShieldHit1 "0x0000F206">
<!ENTITY snMissileLauncher "0x0000F207">
<!ENTITY snStargate "0x0000F208">

<!ENTITY itZorch1 "0x00004113">
<!ENTITY itZorch2 "0x00004114">

[NB: These id's are not finalised, and probably conflict with something or other that I tore apart for example code.]
Yugi
Fleet Officer
Fleet Officer
Posts: 1027
Joined: Sun Mar 05, 2006 8:21 am

x wrote:particleSpreadAngle="90"
What's that meant to be?
User avatar
marr
Miner
Miner
Posts: 37
Joined: Wed Aug 09, 2006 9:27 am

That fires particles at random angles within an [X] degree arc, centered on the ship's facing. 90 appears to be the upper limit, covering a full one-quarter facing. 360 degree arcs may be possible by using four linked weapons?

Or on more practical terms: It does a cone-o-death no fly zone. :)
User avatar
marr
Miner
Miner
Posts: 37
Joined: Wed Aug 09, 2006 9:27 am

Is that new for v0.97, then? I just got back from a month's forced offline today, and there's a lot to catch up on. :)

[Reads Trans News] Ah yes. Well, that's pretty much awesome. Disregard the entities bit, then. Er, anyone have any thoughts on why it might be crashing the game, though? :?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Are you using 0.97?

There was a crash in 0.96 that looks just like you described and had to do with particle weapons like yours.

If you upgrade, I believe it will be fixed.

If you are already using 0.97, then I'm not sure.
User avatar
marr
Miner
Miner
Posts: 37
Joined: Wed Aug 09, 2006 9:27 am

You're kidding, right? [Upgrade, edit out gStation, test..]

He's not, you know. Heh. How's that for service? Okay, I guess I'll be sorting out the id numbers and zipping this one up for field tests, then. Just out of interest, what was happening? Something to do with collisions between debris and weapon particles?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

marr wrote: Just out of interest, what was happening? Something to do with collisions between debris and weapon particles?
Yeah, exactly. In 0.96 I added a performance optimization that keeps a short list of stationary barriers (e.g., old shipwrecks) so I don't have to recompute the set of objects that can block other objects on every frame.

Obviously that means that I need to update the short list whenever a new barrier gets created or an existing one gets destroyed. Unfortunately, I missed the place in the code where a weapon particle destroys a barrier, so the list never got updated and it ended up pointing to an object that was already gone from memory.
User avatar
SparcMan
Militia Lieutenant
Militia Lieutenant
Posts: 194
Joined: Tue Mar 07, 2006 3:17 am

That's what I love about programming. You have to think about every possible combination of conditions and ensure that the code can handle any of it.
Post Reply