Some Modding Questions

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

1) Does (sysCreateShip ... have to have a ship class name such as scAutoSentinel, or is it possible to do something like this;

Code: Select all

(setq newShip (shpGetClass ship)
(sysCreateShip newShip gSource) &svIndependent;)
Assuming "ship" has been targeted and setq'd as well.

2) When using (shpGetClass ship) on a targeted abandoned/wrecked ship, will it return the UNID of the wreck itself (stShipwreck) or the UNID of the ship class that it had before it was destroyed..or just return Nil?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

1. Yes, that's totally possible. With fixed parens:

Code: Select all

(setq newShip 
   (sysCreateShip (shpGetClass ship) gSource &svIndependent;)
   )
2. Using shpGetClass on a wreck returns Nil. [Or it might crash if I failed to handle that case properly.]
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Thanks, George, Answer to #1 really helps a lot.

As for #2, I ran some tests today and it did return Nil, no crash.

So, whenever you kill AI ships does their UNID automatically change to stShipwreck with no option to get their original ship class UNID afterward?

I think it would be cool if you could, with something like objGetShipwreckClassUNID...or something like that.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

did you try the shpGetClass function?
I know for items equipped devices are not the same as non equipped devices but they still have the same UNID.
Crying is not a proper retort!
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Yes, I tried shpGetClass on newly wrecked ships and it returns Nil, which is why I was wondering if the UNID gets changed (along with the wrecked ship image) whenever a ship gets killed.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

can you get static data from the wrecked ship?
if you can store the UNID in that (a bit brute force but still)

edit: ok just tried it, it crashes the game :(

we need a way of getting these wrecked space objects
Crying is not a proper retort!
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

I'm thinking that a wrecked ship gets treated like a station instead of a ship class upon a kill. Hence: stShipwreck -vs- scHornet, where st=station and sc=ship class?

George would have to answer this one.

Although I have noticed that if you target a wrecked ship, say a Hornet for example, it will state; Hornet-class battlepod wreck. Interesting, as that does suggest a UNID change while still retaining the ship class information.
Post Reply