Checking Trade Goods OXP

From Elite Wiki
Revision as of 19:31, 29 June 2026 by Phkb (talk | contribs) (License: New version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
F4 screen - starting the process

Utility: Visit all systems in chart and output trade good data to Latest.log

Overview

Checking Trade Goods is a utility designed to aid OXP developers (or just the curious) when building and testing commodity-related OXPs. It automates the process of jumping to every system in a chart, collecting trade good information from the main station, and producing a summary report (in your Latest.log) at the end.

Detail

This is a utility I put together that will automate the task of checking on prices around a chart. What it does is automate the process of jumping into every system in the chart, collecting prices and quantities for all trade goods, and then jumping to the next system. At the end, it auto-docks the player and dumps summary information into the latest.log. You can specify what types of things to output via an F4 interface screen. That interface screen is also where you initiate the process from.

By default, it's set to check the main station market. But if you extract the contents, in the script.js file, you can set the "this._stationRole" value to be the role of your station, and it will then check the market there.

Important things to note

1. Don't run this with lots of OXP's installed. The best method is to have *just* the OXP's you need to check the market. This might include a single station OXP, for example.
2. It will take about 15 minutes to jump to every system (on my rig, at least), so once it starts, just sit back and watch it go. You can check the status in the log file - you'll get a running commentary on how far through the process you are.
3. If you find yourself drifting through space and nothing is happening, it was probably something that stopped a jump - best idea at that point is just to stop the game and restart. You might still need to decant some OXPs.
4. It will jump to other galaxies if you have the latest version of 1.91 installed. You can select the galaxy you want to check from the F4 Interface screen.
5. It *won't* check multiple galaxies at a time. Do one galaxy, then restart the game and do another.
6. It *will* automatically jump into the systems of the Great Rift in G7. But it *won't* jump to any of the other unreachable systems in other galaxies.
7. There is no point 7.

There are some more notes in the script.js file about the process. Hopefully it all makes sense.

F4 screen - fine-tuning the process (Oolite v.1.90)
The process!
The results (inside the Latest.log)

Usage

You can select:

  • "Galaxy-wide summary" (which collates everything in the chart to one data set)
  • "Summary by Economy" (which collates everything in the chart to one data set per economy type)
  • "Summary by Government" (which collates everything in the chart to one data set per government type)

The round trips assume Lave is always the starting point, and the starting points in the other charts are where you end up if you use a galactic jump from Lave. There are some duplicates in the routes as there is occasionally a need to backtrack. Data collection will exclude these duplicate jumps. Also, unreachable systems in galaxy ID 2, 5 and 8 will not be visited and their values not included in the results.

Starting system

G1 Lave
G2 Inoran
G3 Divera
G4 Cebitiza
G5 Zaxeed
G6 Oratedge
G7 Tiared
G8 Soladiar

Comment

Objection: I never understood why this OXP was needed: in theory one should be able to pull sample prices out of System.infoForSystem() without ever leaving the comfort of home.
Response: "In theory" being the key point. Given the number of ways commodity prices can be adjusted, the only way the guarantee you’re seeing the full result of all changes is to visit the system itself. That was the logic behind this OXP. (From here (2026))

Also, the sample price function only returns a price. There is no way to check quantities without visiting the system.

License

  • Author: Phkb
  • License: CC-BY-NC-SA 4.0
  • Oolite version: 1.79 or newer
  • OXP version: 1.2

Credits

With thanks to Switeck for sharing his method of rapidly jumping from system to system.

Download

CheckingTradeGoods.oxz

Links

Wiki pages for OXP programmers

This utility is useful for people faffing about with the following!