Getting the trade offers on a dock

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
MegaJohnny
Posts: 2239
Joined: Wed, 4. Jun 08, 22:30
x4

Getting the trade offers on a dock

Post by MegaJohnny »

Hi all - been bumbling about with code again and I've hit a snag.

I have an idea for an AI script that makes use of the L/XL trading docks on stations. I want the ship to approach each dock on a station in turn and reveal the associated trade offers to the player (it'll be an M ship or smaller, so no worries about getting right up close to it). I can get the trade docks as so:

Code: Select all

<find_object_component groupname="$tradedocks" multiple="true" class="class.tradeofferdock" object="$station" />
And I can find the trade offers in a zone by merging the results of:

Code: Select all

<find_sell_offer space="this.ship.zone" multiple="true" result="$sellers" />
<find_buy_offer space="this.ship.zone" multiple="true" result="$buyers" />
But I've no idea how to get which trade offer objects are associated with which trade dock objects. I know the link isn't strict, as ships can park up at any free dock, but I just want to get from the trade docks a list of the offers you would see when you click on its icon. Does anyone know a way to do this?
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Not that I want to put you off mate, but I don't get the point of doing this. We already have smalltalk to get constant price data for any station we can land at...
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
User avatar
MegaJohnny
Posts: 2239
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny »

We do - I'm just trying to make an alternative method to get the information. I do like the trade subscription system but I'm not a fan of how it uses none of the player's resources (besides time) and never goes away (compared to the old adv sats that could be destroyed). A system like this would also let us get the trade offers from a remote location. I always liked stuff that lets the player influence things without being physically present - for me that's one of the staples of the X-series.

Return to “X Rebirth - Scripts and Modding”