[SCR] Ship Browser v1.2 - In Game Ship Comparison Tool [UPDATED: 11/2/2014]

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

BlackArchon
Posts: 1002
Joined: Wed, 4. Feb 04, 18:37
xr

Post by BlackArchon » Sun, 7. Dec 14, 22:41

Thank you, it's working fine now. :)

mc74
Posts: 23
Joined: Sat, 6. Dec 14, 00:27

Post by mc74 » Fri, 12. Dec 14, 16:26

Does it modify game? AP?

zanzal
Posts: 309
Joined: Sat, 15. Sep 12, 07:42
x3tc

Post by zanzal » Sat, 13. Dec 14, 05:45

Not automatically. You would have to mark your game modified before the Ship Browser would load. It does only function under a modified game.

RayF
Posts: 416
Joined: Wed, 22. May 13, 12:30

Post by RayF » Wed, 18. Feb 15, 20:33

hmm,

i have v1.2.1 installed on XRM+AP.

I was searching for discoverer explorer and browser said i could buy at from Light of Heart(shipyard) for around 500,000 cr.
Went there, checked, and the price is 1.5 mil !!


err,,ideas as to why!?
gonna check for other ships also to see if its only this exception...

BlackArchon
Posts: 1002
Joined: Wed, 4. Feb 04, 18:37
xr

Post by BlackArchon » Thu, 19. Feb 15, 18:37

I can confirm this. Maybe this is a problem with the military scanner which is an already built-in device for the M5 explorer ships? However, since this scanner costs about 1.3 million credits, it wouldn't completely fit to this theory. According to the Ship browser, an Argon Discoverer Explorer has an equipped price of 492,226 credits. The shipyard at Light of heart offers the S variant for 1,691,965, so the difference is not exactly the scanner's price.

RayF
Posts: 416
Joined: Wed, 22. May 13, 12:30

Post by RayF » Sat, 21. Feb 15, 14:04

BlackArchon wrote:I can confirm this. Maybe this is a problem with the military scanner which is an already built-in device for the M5 explorer ships? However, since this scanner costs about 1.3 million credits, it wouldn't completely fit to this theory. According to the Ship browser, an Argon Discoverer Explorer has an equipped price of 492,226 credits. The shipyard at Light of heart offers the S variant for 1,691,965, so the difference is not exactly the scanner's price.
you are right :wink:

User avatar
solarahawk
Posts: 257
Joined: Sun, 23. Dec 07, 00:18
x4

Post by solarahawk » Sat, 30. May 15, 08:31

I sent zanzal some updates for Ship Browser. I haven't heard from him, so I'm posting the updated package here for anyone wanting to use this tool in LU.

Small Package Update: v. 1.2.1

This update just adds some version checks to the Ship Browser for Litcube's Universe. A vanilla script used in Ship Browser has been replaced with a new MSCI script command, and a laser ware ID changed in LU. This update just makes sure that the Browser remains fully functional in LU.

SPK:
Image

ZIP:
Image

BlackArchon
Posts: 1002
Joined: Wed, 4. Feb 04, 18:37
xr

Post by BlackArchon » Fri, 1. Jan 16, 00:49

I'm using Solarahawk's version for LU with LU 1.5.2. The script seems to be unable to get the OTAS' ships purchase locations.

http://imgur.com/VbQqnS2

User avatar
solarahawk
Posts: 257
Joined: Sun, 23. Dec 07, 00:18
x4

Post by solarahawk » Fri, 1. Jan 16, 01:44

Just to make sure, you have already visited those sectors, correct? If i remember right, the Ship Browser only shows you info on ships that are available for sale in the sectors you have visited.

BlackArchon
Posts: 1002
Joined: Wed, 4. Feb 04, 18:37
xr

Post by BlackArchon » Fri, 1. Jan 16, 01:58

Yes, I can see all sectors (including Legend's Home) and I have satellites everywhere. As you can see from the screenshot, I also have activated the spoiler mode. And since the entry for the Argon Titan and the Argon Atlas is shown in green color while the Argon Excalibur entry is in white color, I have an Argon reputation of 9. This is sufficient for buying a Boreas or an Astreaus.

So there are two errors here: the purchase location for OTAS ships is unknown for the script, and it is unable to get the correct reputation for them.

User avatar
solarahawk
Posts: 257
Joined: Sun, 23. Dec 07, 00:18
x4

Post by solarahawk » Fri, 1. Jan 16, 03:19

Oh... Ok, now I see what you're saying. I really haven't used the Ship Browser much in actual play. I only patched a couple lines of code to support LU by switching from a vanilla script no longer present to a new array command added in LU.

Regarding the notoriety requirements, as far as I can tell, the Excalibur just needs you to push your notoriety score (points) up a bit with the Argon. You are probably sitting on the threshold and the notoriety check (which is handled by the game itself, not the Browser) is evaluating you as not exceeding the minimum score requirement for that ship.

I tested for several races and corps, and as long as one's notoriety is pushed up high enough, all the ships eventually become available, except for the OTAS vessels. The OTAS are being listed under Friendly Race instead of Argon, which is messing up the Browser.

So it looks like the Browser will need a bit more adjusting to allow it to handle the OTAS ships correctly. I'll see what I can figure out and pass that on to zanzal.

EDIT: Oh, by the way, I just verified that the Excalibur requires you to be 10 - Hero of the Federation. So a rank of 9 is not enough to purchase.

User avatar
dizzy
Posts: 1011
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Fri, 1. Jan 16, 20:50

The OTAS ships reputation requirement was also a bug in LU's Ship compendium for the same reason (that OTAS ships belong to Friendly Race). You essentially need to hack that one out, if you got ships belonging to Friendly Race, make the reputation check as if they belong to Argon. Messy but effective.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
Image

Xo3oToC
Posts: 24
Joined: Sat, 27. Apr 13, 01:19

Post by Xo3oToC » Wed, 29. Jun 16, 22:27

I am running X3LU and using ShipBrowser-1.2.2.zip. Ship equipped price calculation appears to be wrong.

I installed these mods in the following order, so I am not sure if there is any conflict:

Code: Select all

X3LU v1.7.0: http://litcube.xtimelines.net/wiki/index.php/Download
Small Improvements and Fixes: http://forum.egosoft.com/viewtopic.php?t=376568
... some minor improvements/fixes v2, weapon group hotkeys v60: http://forum.egosoft.com/viewtopic.php?t=380493
ShipBrowser-1.2.2: http://forum.egosoft.com/viewtopic.php?p=4527544#4527544
Alternate Ringless Gates: http://forum.egosoft.com/viewtopic.php?t=380471
Repair Laser Rate Pack v1.0: http://forum.egosoft.com/viewtopic.php?t=381439
Satellites Monitoring 1.6b: http://forum.egosoft.com/viewtopic.php?t=380611
X-Missions Reloaded (XM-R) v1.59b: http://www.egosoft.com/x2/forum/viewtopic.php?t=368692 (concurrent installation of EMS not recommended)
  The script is disabled by default. Go to Options -> Gameplay -> Artificial Life Settings to enable it and be able to assign the hotkeys. 
Anarkis Defense System - Joubarbian Edition: http://forum.egosoft.com/viewtopic.php?t=388549
Phanon Plus 4.04: http://forum.egosoft.com/viewtopic.php?t=381078
Revelation Plus  v1.06: http://forum.egosoft.com/viewtopic.php?t=382460
Below is my modification to plugin.zanzal.getshipvalue.xml.

Code: Select all

* ************************************************
* SCRIPT NAME: plugin.zanzal.getshipvalue
* DESCRIPTION: Try and calculate the value of $ship
* 
* AUTHOR: Zanzal          DATE: 3 January 2014
* ************************************************

* Version info for Litcube`s Universe when present
$LU.Installed = get global variable: name='zanzal.lu.version'

$old = [TRUE]
$old = [FALSE]

if $old

$ware = $ship-> get ware type code of object
$value = get max price of ware $ware
if not $LU.Installed
$mt.laser = get maintype of ware {Energy Bolt Chaingun}
else
$mt.laser = get maintype of ware {Phased Repeater Gun}
end
$mt.shield = get maintype of ware {1 MJ Shield}
$mt.equipment = get maintype of ware {Transporter Device}
$mt.upgrade = get maintype of ware {Cargo Bay Extension}

dim $maintypes = $mt.laser, $mt.shield, $mt.equipment, $mt.upgrade
for each $mt in array $maintypes
$subtypes = get number of subtypes of maintype $mt
$sub = 0
while $sub < $subtypes
$ware.item = get ware from maintype $mt and subtype $sub
$units = $ship-> get true amount of ware $ware.item in cargo bay
if $units > 0
if is upgrade: ware=$ware.item
$upgrade.price = $ship-> get upgrade price: cargo-speed-rot $ware.item units:$units
$value = $value + $upgrade.price
else
$price = get average price of ware $ware.item
$value = $value + ($units * $price)
end
end
inc $sub
end
end

return $value

else

$ship.value = 0
* $ship = [PLAYERSHIP]-> get user input: type=[Var/Ship], title='Pick a ship'
$info = array alloc: size=0

* Ship Value (Max ship price is the price to buy the ship from shipyard)
$ship.type = $ship-> get ware type code of object
$ship.price.max = get max price of ware $ship.type
$text = sprintf: fmt='%s (%s) cost %s', $ship, $ship.type, $ship.price.max, null, null
add non selectable menu item: $info, text=$text

* Ship Equipment Value
dim $maintypes = [SSTYPE_LASER], [SSTYPE_SHIELD], [SSTYPE_MISSILE], [SSTYPE_W_TECH]
for each $mt in array $maintypes
$subtypes = get number of subtypes of maintype $mt
$text = sprintf: fmt='Main Type: %s', $mt,null, null, null,null
add non selectable menu item: $info, text=$text
$sub = 0
while $sub < $subtypes
$ware = get ware from maintype $mt and subtype $sub
$ware.amount = $ship-> get amount of ware $ware in cargo bay
if $ware.amount > 0
if is upgrade: ware=$ware
$ware.value = $ship-> get upgrade price: cargo-speed-rot $ware units:$ware.amount
else
$ware.price = get average price of ware $ware
$ware.value = $ware.amount * $ware.price
end
$text = sprintf: fmt='%s of %s cost %s', $ware.amount, $ware, $ware.value, null,null
add non selectable menu item: $info, text=$text
$ship.value = $ship.value + $ware.value
end
inc $sub
end
end

$ship.value.max = $ship.price.max + $ship.value
$ship.value.max.str = convert number $ship.value.max to string
$text = sprintf: fmt='Total Ship Value Excluding Cargo: %s', $ship.value.max.str, null,null, null, null
add non selectable menu item: $info, text=$text
$info.count = size of array $info
$text = sprintf: fmt='%s', $info.count, null, null, null, null
* $Info.menu = open custom info menu: title='Wares' description=$text option array=$info maxoptions=null

return $ship.value.max

end

Note:
Comment out "$old = [FALSE]" to use the code that comes with 1.2.2
Uncomment "* $ship = [PLAYERSHIP]-> get user input: type=[Var/Ship], title='Pick a ship'" to try this script on any ship
Uncomment "* $Info.menu = open custom info menu: title='Wares' description=$text option array=$info maxoptions=null" to see the value of each item/ware/ship.

Post Reply

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