Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Dark Hunter on September 16, 2006, 03:46:07 pm

Title: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on September 16, 2006, 03:46:07 pm
My current project is converting one the asteroids in FS into a planetoid. I have been mostly successful, but there are a few snags. Progress: I supersized an asteroid into planetoid porportions, inserted a modified "asteroid" table entry (in the ships.tbl) to make it a "ship". But, problems:

#1. The model file is intact, AFAIK, but it isn't showing up in the tech room or in the little target box in-game. I am able to see it perfectly well though.
#2. I seem to have activated a piece of unused code. When I try putting this into a mission, my HUD says: "Too close to planet. Taking damage.", and I get the "blast" alert. However, my ship takes no damage.
#3. When I try blowing it up (via "self-destruct" SEXP) the game crashes.

Any ideas? I'm attaching the table entry. Keep in mind that I am very new at table entry writing, so the values may be totally bogus...

[attachment deleted by admin]
Title: Re: Ship errors on (sort of) self-created ship
Post by: Flipside on September 16, 2006, 04:00:06 pm
Don't name it anything with the word 'Planet' in it, the game had some old code built in that was supposed to support planets but it never got finished, but also wasn't removed. Simply changing the object name to 'BigAsteroid' or something will fix at least problem 2 ;)
Title: Re: Ship errors on (sort of) self-created ship
Post by: Snail on September 16, 2006, 04:12:53 pm
I think it might be the Shockwave speed, but I'm not sure.
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on September 16, 2006, 07:38:10 pm
Update: Changed name to "Giant Asteroid", so the planet code isn't coming up anymore, but it still crashes when the big chunk of rock is supposed to explode, and it still doens't appear in the techroom or target box.


Snail: Changed shockwave speed to 600, didn't do anything.


I wonder.... do you have to do anything special to the model to allow explosion propagation? Because I have that set on "yes".
Title: Re: Ship errors on (sort of) self-created ship
Post by: Flipside on September 16, 2006, 08:07:23 pm
You need to have add IN TECH DATABASE to the flags list for it to show up there, that should at least fix another problem ;)
Title: Re: Ship errors on (sort of) self-created ship
Post by: Cobra on September 16, 2006, 08:39:11 pm
ok, i think i found your problem. you're missing the Shockwave count flag. it should seem something like this:

Code: [Select]
$Name:                          Giant Asteroid
$Short name:            GAsteroid
$Species:                       Terran
$POF file:                      Planetoid.pof
$Detail distance:       (0, 5000, 25000)
$Show damage:           YES
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       0.2
$Max Velocity:          0.0, 0.0, 25.0
$Rotation time:         0.0, 0.0, 0.0
$Rear Velocity:         0.0
$Forward accel:         20.0
$Forward decel:         10.0
$Slide accel:           0.0
$Slide decel:           0.0
$Expl inner rad:        700.0
$Expl outer rad:    8000.0
$Expl damage:           1000.0
$Expl blast:        8500.0
$Expl Propagates:       YES                                                      ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:       750.0                                             ;; speed shockwave expands at, 0 means no shockwave
$Shockwave Count: 3 [Do spaces count? I forget, haven't dabbled in tables for a while.]
$Default PBanks:        ()
$Default SBanks:        ()
$SBank Capacity:        ()
$Shields:                       0
$Power Output:          100.0
$Max Oclk Speed:        8.0
$Max Weapon Eng:        0.0
$Hitpoints:                     1000000
$Flags:                         ("big damage" "supercap")
$AI Class:                      Captain
$Afterburner:           NO
$Countermeasures:       0
$Scan time:                     20000
$EngineSnd:       -1                    ;; Engine sound of ship
$Closeup_pos:           0.0, 1.0, -14
$Closeup_zoom:          0.5

plus i scaled down the hitpoints to colossus HP. i think that might have been the problem as well. if not, go ahead and leave it at the original HP.
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on September 16, 2006, 10:08:21 pm
The Hitpoints were ridiculously high for storyline purposes. Storyline purposes are also the reason there's such a huge explosion. But this is an Inferno ships.tbl, and I'm pretty sure the Gigas has 100,000,000+ hitpoints.  :D


Yeah, now I think about it, shockwave counts would be quite important. I'll add those and see what that does. That table entry was copied (and modified) from the "asteroid" entry in the main game. The shockwave counts tag wasn't in there.


EDIT: Aw, crap. That didn't do it, although it took the game a few extra seconds to crash. I'll see if turning Explosion Propagation off does anything....

EDIT2: Hmm. Turning off Explosion Propagation allows it to self-destruct, but now it crashes when Integrity drops to 11%. Could the Supercap flag be interfering with the self-destruct SEXP?
Title: Re: Ship errors on (sort of) self-created ship
Post by: Cobra on September 17, 2006, 12:49:48 am
hmm. i don't think so.

man, i'm giving myself a headache.

I wonder if debris has anything to do with it?
Title: Re: Ship errors on (sort of) self-created ship
Post by: Getter Robo G on September 17, 2006, 02:40:37 am
LALALA planet as a fighter (play dead) test from long ago, death never caused a crash...

(http://img122.imageshack.us/img122/2987/planet2.jpg)

Title: Re: Ship errors on (sort of) self-created ship
Post by: Scooby_Doo on September 17, 2006, 03:00:07 am
Just how big is that planet?  I'd love to see really really massive maps, but I'm sure that would require a larger bit number type (double float?)
Title: Re: Ship errors on (sort of) self-created ship
Post by: Getter Robo G on September 17, 2006, 09:53:30 am
I never did anything beyond that cause all the planet talk back then (but apparently fizzeled out until a few years later OMNISCAPER did some atmosphere tests and then the deathstar LOD video)...

I found it, it was only 4km sphere (a small moon)

Just use a fighter table as I did, adjust hit points and in fred play dead to prevent movement and it SHOULD at least blow up without a crash for you...

Hope this gets you on the right track for what you eventually want to achieve...



[attachment deleted by admin]
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on September 19, 2006, 11:00:29 pm
Ok I did some comparisions to other POFs I have, and I have found that:

A) There is no debris defined.

B) Somehow, during the conversions, the LOD's became.... submodels. Hmmmmm.....

I am new at this, once again, and correct me if I'm wrong, but you use PCS for these details right? If so, someone point me in the right direction for fixing these?
Title: Re: Ship errors on (sort of) self-created ship
Post by: Vasudan Admiral on September 20, 2006, 01:40:12 am
Can you post the cob/scn you used to convert? Or a screenie of your hierarchy as seen in TS?
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on September 20, 2006, 05:34:53 pm
Here is the .cob. It is essentially one of the normal FS2 asteroids converted to cob, then blown up. Converted both ways using PCS.

[attachment deleted by admin]
Title: Re: Ship errors on (sort of) self-created ship
Post by: Vasudan Admiral on September 20, 2006, 07:17:39 pm
Ah - it's just that the hierarchy PCS generates when converting from Pof=>Cob isn't immediately ready for the conversion back. :)

Do this with the hierarchy:
- Drag each level of detail (asta - astd) one by one up to the Scene Animation level at the top. The "FreeSpace Model" bit should vanish, leaving you just with the LODs. (if it's only showing asta, astb and astc or some similar incomplete combination, hit F5 to refresh it)
- Rename 'asta' to 'detail0', 'astb' to 'detail1' and so on.
- Now drag detail1, 2 and 3 onto detail0 in that order.

You should now end up with the image on the right:
(http://i5.photobucket.com/albums/y184/VA--Twisted_Infinities/Mega-Roid-Hierarchy.jpg)
And that should convert properly. :)
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on October 20, 2006, 11:45:04 pm
:bump:

WHEEE! That hierarchy reorganization did it! It is now fully functional in the game! :D

Two finishing touches:

#1. Its picture still doesn't appear in the techroom or in the target box. Why?? :confused:
#2. Debris. Needs some. This thing's so large it'd probably leave an entire asteroid field behind! But... how to program debris ino it?
Title: Re: Ship errors on (sort of) self-created ship
Post by: BS403 on October 21, 2006, 12:18:27 am
Look in the table for the $Closeup_pos: the tell its how far from the center of the object the camera is. inrease the third number until it come into view
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on October 21, 2006, 12:39:28 am
Problem number 1 fixed (speedy reply too! :yes: )

Now about that debris...
Title: Re: Ship errors on (sort of) self-created ship
Post by: Vasudan Admiral on October 21, 2006, 01:53:42 am
Debris is done just like the Lods - each piece (you've gotta model all the pieces) has a local light glued to it, and the names start at "debris01" onwards. Unfortunately, that means you'll need to reconvert the model and re-import all the pof data from your current one.

(Just make sure you back your current one up, or you'll reconvert the cob, save the pof model over your previous one, go to re-import all the data from your previous one, and think "....Crap." ;) )
Title: Re: Ship errors on (sort of) self-created ship
Post by: vyper on October 22, 2006, 05:49:54 pm
About the massive maps someone mentioned - don't. FS2 doesn't like it. I tried for months to get it to work for a life-like Earth. Much crashing ensued.
Title: Re: Ship errors on (sort of) self-created ship
Post by: Cobra on October 22, 2006, 06:12:39 pm
didn't Omni create one? for 3.6?
Title: Re: Ship errors on (sort of) self-created ship
Post by: vyper on October 22, 2006, 06:35:30 pm
No idea. We've had planet packs for years tho - just never very high detail ones. A perfect sphere can be a bit of a bastard to render in-game.
Title: Re: Ship errors on (sort of) self-created ship
Post by: Cobra on October 22, 2006, 07:10:52 pm
Omni did create an Earth model. 'twas a sphere and had moving clouds.
Title: Re: Ship errors on (sort of) self-created ship
Post by: Flipside on October 22, 2006, 07:25:39 pm
But Omni always hated the fact you could see the joins between the images. Also, it was incredibly texture intensive, I don't think the latest standard SCP version can even handle that many maps on a single model.
Title: Re: Ship errors on (sort of) self-created ship
Post by: bizzybody on October 23, 2006, 03:25:48 am
Joints 'tween textures... hmmmm... No problem if the planet you're texturing is Trantor (http://en.wikipedia.org/wiki/Trantor). :)
Title: Re: Ship errors on (sort of) self-created ship
Post by: Scooby_Doo on October 23, 2006, 04:58:10 am
Or unicron or primus  ;)


Now thats something I'd like to see animations done ingame for, two planet sized bots transforming  :nervous:
Title: Re: Ship errors on (sort of) self-created ship
Post by: Dark Hunter on October 23, 2006, 10:58:18 am
My thread has been usurped.... :sigh:


BACK ON TOPIC:

So, to create debris, I import several more objects into the Truespace scene, place them within the main model, and then label them "debris01", "debris02", etc. as appropriate?
Title: Re: Ship errors on (sort of) self-created ship
Post by: Starman01 on October 23, 2006, 11:20:26 am
So, to create debris, I import several more objects into the Truespace scene, place them within the main model, and then label them "debris01", "debris02", etc. as appropriate?

Yep. Glue a light to each one and place them in the hierarchy after the turrets, but before the detail-levels. Also be sure to place the axis in the center of the debris object, otherwise it will later rotate in a strange way.