ship or station mass

Freeform discussion about anything related to modding Transcendence.
Post Reply
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

how do i find the mass of a ship or station through code?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

or retrieving anything like thrust, maneuver, maxspeed, cargospace from any <shipClass>?
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

i mean use a device/item during the game that can find the mass of the targeted ship or station for reasons i have yet to release. and then automatically perform some action based on the now known mass.



also, along with the first question, what units, ton kg?
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

there is an (itmGetMass WhATEVERITEM) but it keeps telling me it expects a list. the player's target is not a list, nor do i understand lists.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

because itmGetMass is used only in dockscreens or in globals called from within a dockscreen ?
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

itmGetMass needs a itemstruct if you have an UNID of the item you would need to do this

(itmGetMass (itmCreate UNID 1))

That will return the mass of the item.
Crying is not a proper retort!
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

OK a workable workaround

steps:
get total cargo space.
estimate it's mass by the principle that mare cargo means more mass on the ship.

question: what is a good estimate ratio of cargo space to mass? for ships


EDIT: objgetcargospaceleft works fine for the player ship, but crashes on the player's target
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

is there any information carried on a ship that can be accessed through code and could indicate the size of a ship? same with stations.

EX: mass, can't access
# of armor plates won't work on stations
cargo space only works on player and object calling code from what i can tell.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

for stations and ships there is always static data, lots of work but still a workable solution
works for any get of something about a ship or station
Crying is not a proper retort!
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Betelgeuse wrote:for stations and ships there is always static data, lots of work but still a workable solution
works for any get of something about a ship or station

and another hint for my project? :)
Image
Image
Post Reply