How do I get value of a ship/station ?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Gqqnbig
Posts: 66
Joined: Fri, 12. Jul 13, 14:08

How do I get value of a ship/station ?

Post by Gqqnbig » Sun, 6. Sep 15, 03:03

How do I get value of a ship, or how much can I get if I sold the ship?

How do I get value of a station, or how much does it cost to buy one?

User avatar
scoutster
Posts: 97
Joined: Sun, 13. Jul 08, 11:45
x3tc

Post by scoutster » Mon, 7. Sep 15, 11:14

Just dock the ship at a shipyard and enter the trade menu, on top you see how much you'll get for a sale. In the same menu the prices for stations are also listed.

Gqqnbig
Posts: 66
Joined: Fri, 12. Jul 13, 14:08

Post by Gqqnbig » Tue, 8. Sep 15, 01:19

Thanks. But this is script forum so I want to do it in script way.

I've found the answer.

Code: Select all

$ware = $ship-> get ware type code of object
$price = get average price of ware $ware

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 8. Sep 15, 11:00

Just be aware that the price wont match the price they are sold at in the shipyard. As a shipyard will also include any upgrades they have included like shields/weapons

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”