[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

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

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

Post by zanzal » Mon, 10. Feb 14, 05:49

Ship Browser

Using this tool you can more easily compare ships to determine how ships of the same class stack up against each other or to quickly filter ships by transport ware class, weapon, or missile capability. No longer will that new purchase of yours reveal an unexpected weakness*. By default the ship browser only lets you compare ship types that are known to the player to prevent any spoilers. Ships highlighted in green can be purchased based on current notoriety.

Image

The current version has two information pages:

General page - Shows Race, Purchase Location and Price
Combat page - Shows Main Guns/Turret Counts, Weapon Energy Pool, and Shield Generator strength.

Closing and reopening the ship browser should remember the last settings chosen.

See additional details and play around with possible loadouts by selecting a ship:

Image

Instructions

Install the script archive using the plugin manager. Under controls set a hotkey for the 'Ship Browser.'

Recommended Uses

1. Purchasing the best ship you can buy for a given task - great early on when purchase options are limited and you don't feel like grinding notoriety.
2. Planning your next 'acquisition' or deciding which race you want to grind notoriety for next.
3. Great for total conversions where ship stats no longer match the vanilla and may not be easily googled.
4. Useful for those working on their own ship mods to balance stats and quickly spot mistakes.

Spoiler Mode

To enable spoiler mode to see all ships regardless of whether or not you know where to purchase them, you must edit the T file 8103-L044.xml (8103-L049.xml for German language) and change:

Code: Select all

<t id="14">0(Spoiler Mode)</t>
TO:

Code: Select all

<t id="14">1(Spoiler Mode)</t>
* The only weakness a ship might have that can't be determined quickly via script is the weapon energy reload rate.
** Weapon filter not limited to main guns. Keep that in mind when looking at M6/M7s.
*** Docking class types has nothing to do with docking counts. At this time there is no quick way to determine how many ships of a given type can be docked. If the docking class is not a M5-M3 assume the ship may only be able to dock at most 1 of the shown types. For example, the screen shot shown above the Tepukei only docks 1 M1. You cannot dock 23 of them.

Docking Port Notes:

For brevity anything that can dock an M1 can also dock any other ship type in that same slot. So if you dock a TM you may not be able to dock an M1 if the ship in question only has that one cap ship docking port. Also, anything that can dock a TS can also dock a TP.
Last edited by zanzal on Mon, 15. Dec 14, 01:26, edited 15 times in total.

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

Post by zanzal » Mon, 10. Feb 14, 05:50

Links

Download Version 1.2.1 for AP
Download Final Version for TC
GitHub Page

Compatibility

X3AP Vanilla: Yes
X3AP XRM: Yes
X3AP LU: Yes
X3AP Other Total Conversions: Yes - Probably
X3TC Any: Yes - Download Final Version for TC

License

This version of the Ship Browser is licensed as CC-BY-SA version 4.0 International. You have the right to modify and release modifications without asking me. You don't need to get my permission or notify me in any way. You are obligated to mention Zanzal as the origin of the script and to provide others with these same rights and obligations to your modified version (they would have to mention your name as well as my name in their modified versions). You may only combine this script with a larger work if your larger work also shares a compatible license that meets these obligations and confers these rights. Modified versions must not be released under the exact same name to avoid confusion (You must call your modified version of the script something other than 'Ship Browser').

Version History

v1.0 - Initial release

v1.1 - Released 10/26/2014

+ Added t file for German language
+ Optimized ship querying logic
+ Changed rules so that being known to the player will allow the ship to be shown rather than requiring the player to know where to purchase the ship.
+ Fixed visibility issue where Terran owned shipyards might sell an ATF ship
+ The ship details screen is shown in this version, but it is a work in progress. More to come in future versions.

v1.2 - Released 11/2/2014

+ Greatly expanded the ship details screen
+ Added marine count and hull hp to comparison list
+ Fixed bug in Vanilla showing XRM's ware transport classes.

v1.2.1 - Released 12/7/2014

+ Fixed sorting by Dock Size
Last edited by zanzal on Sun, 7. Dec 14, 21:26, edited 13 times in total.

User avatar
RoverTX
Posts: 1426
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Mon, 10. Feb 14, 06:02

Very cool idea!

User avatar
Spectre01
Posts: 453
Joined: Tue, 23. Dec 08, 10:15
xr

Post by Spectre01 » Mon, 10. Feb 14, 08:43

I'd fraking kiss ya. This really saves tons of time moving around in the ingame encyclopedia when compare bunch of ships.

One more question before I actually try this. I'm running XRM with a modded Tships since I've added some ships that didn't come with XRM. Will this script still works?

builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 » Mon, 10. Feb 14, 11:08

This is awesome! Now we just need one for weapons and missiles :D lol

Just kidding man, but thanks for this!

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

Post by zanzal » Tue, 11. Feb 14, 00:13

Spectre01 wrote:One more question before I actually try this. I'm running XRM with a modded Tships since I've added some ships that didn't come with XRM. Will this script still works?
It should work fine with custom ships since it doesn't make any assumptions about the game files.

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

Post by zanzal » Tue, 11. Feb 14, 00:25

builder680 wrote:This is awesome! Now we just need one for weapons and missiles :D lol
Well you never know what might show up in a future version. ;)

gastovski
Posts: 152
Joined: Tue, 3. Dec 13, 11:20

Post by gastovski » Tue, 11. Feb 14, 12:54

+1 Rep.

Kinnison
Posts: 159
Joined: Wed, 11. Feb 04, 00:18
x3ap

Post by Kinnison » Tue, 11. Feb 14, 21:23

Thank you. Very nice, very useful.

R2dical
Posts: 4
Joined: Fri, 7. Feb 14, 19:40

Post by R2dical » Tue, 11. Feb 14, 22:24

Great idea for script! Maybe I am doing something silly, but after install with plugin manager there is so control option for 'Ship Browser' in game. This is for X3:TC.

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

Post by zanzal » Wed, 12. Feb 14, 02:22

R2dical wrote:Great idea for script! Maybe I am doing something silly, but after install with plugin manager there is so control option for 'Ship Browser' in game. This is for X3:TC.
I normally don't support TC, but I have posted a special 'TC Edition' that contains some quick fixes to make the current version of the ship browser work under TC. Feel free to report back any problems. The TC version is a final version and will not receive any enhancements since I don't ever play TC myself.

R2dical
Posts: 4
Joined: Fri, 7. Feb 14, 19:40

Post by R2dical » Wed, 12. Feb 14, 07:37

Thanks for taking the time to do this! So far its working perfectly :)

gilboa
Posts: 260
Joined: Sat, 28. Apr 07, 10:33
x4

Post by gilboa » Sat, 1. Mar 14, 22:28

Works fine in X3AP/XRM. Thanks!

- Gilboa
X2 Linux (LGP).
Heavily modified X3:R Linux w/ XTM (LGP).
Heavily modified X3:TC w/ XRM (under wine).
Heavily modified X3:AP Linux w/ XRM.
Modified X4 Linux w/ VRO.
Machine: 2 x E5-2658V2, 32G, 8TB RAID10, 1080GTX, Dell UP3216Q 4K LCD.
OS: Fedora 33/x86_64.

BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon » Sat, 25. Oct 14, 18:08

I just tested your script with X3: AP 3.1 and the latest XRM 1.30. I copied the content of https://github.com/Zanzal/ShipBrowser/b ... p?raw=true to my addon folder. Now if I bind a key to the new ReadText entry in the control options and use it, I see only ReadText messages: https://imgur.com/wycKcTM

What may be the problem here?

Edit:
I found it. To solve this problem (which seems to be language related and so only relevant for a non-english game), you have to copy the file 8103-L044.xml to 8103-L049.xml (in the addon\t folder) and change the id attribute of the language tag in line 3 from "44" to "49". Now I can see the text correctly within my german X3: AP game. Maybe you want to use this for the next version of your script. :)

Edit 2:
I can't see any ATF ships in the ship browser. Why is that?

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

Post by zanzal » Sun, 26. Oct 14, 07:24

Good idea. I've just started rebuilding a custom setup for a new X3AP game start. I'll give the mod a quick update in a couple days. There are a few improvements I want to add as well. So next version will add a german language text file for the next version update.

BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon » Sun, 26. Oct 14, 09:15

Thanks for your reply. :)
Have you seen my last edit about the missing ATF ships?

Edit:
It would also nice if I'm able to select "Any" in the class selection - this would be useful if I want to have a complete ship list which could use a certain weapon like gauss cannons, for example.

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

Post by zanzal » Sun, 26. Oct 14, 11:36

Regarding ATF ships I would suppose its because you don't have a known location for an ATF shipyard. In spoiler mode, the fact that you don't know where to purchase the ship isn't a limitation. Regarding the suggestion I cannot suggest a work around at this time. Specifically with Gauss cannons I guess most players should know that it is an M7+ weapon.

I won't rule out the addition to bypass the class filter, but I would need to test the impact of less ideal scenarios like if you had no filters chosen and you selected any ship. Would it crash, lock-up, etc. You probably don't realize that the class filter serves a purpose to limit the number of ships that need to be deeply inspected by only attempting to evaluate ships in a given class at a single query.. At the very least it would take much longer than you would want to examine every ship in the game.

BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon » Sun, 26. Oct 14, 14:08

I already bought ATF ships on their shipyards in The Moon (AGI Task Force Headquarters) and ATF Forseti (AGI Task Force Flight School), so I do know their yards.

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

Post by zanzal » Sun, 26. Oct 14, 23:42

I'll look into it. I have a few ideas what might be going wrong but it may be a few days before I can setup an XRM game to go look for it. I think you've given me the info I need to start investigating though. Let me know if you notice anything else missing.

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

Post by zanzal » Mon, 27. Oct 14, 05:05

Thank you for letting me know about those problems BlackArchon. The issues with ATF ships and the German language file should be corrected in the 1.1 release which is available for download now.

For the 1.1 version I also changed the rules a little bit so knowing about the ship was enough to make it show in the ship browser. This brings the behavior of the mod in line with what I think most players would expect.

Post Reply

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