buyoffer and selloffer definition

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

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

User avatar
Escaflow
Posts: 25
Joined: Sat, 1. Aug 09, 16:18
x4

buyoffer and selloffer definition

Post by Escaflow »

Since the resource dump (aka Shipyard) isn't working in vanilla I set the shipyards in my
universe to overdrive (so they build a ship whenever they have the resources rather than time based)
and get into the next problem, the shipyards are full.

There aren’t full with useful stuff like building martial they are full with drones and unbalanced piles of wares
(so 1600 fusionreactor but only 20 reinforcedmetalplating and so on) to fix this iv got a look
at trade.station.player.xml and realized how stupid the managers are (I mean... really stupid) so to get them useful I want to go from the
bottom to the top, and the bottom is buy/selloffer to prevent this pile of one ware and the lack of the other, but I cant find the script/lib where it is defined.

Long story short: can we take a look at these calculation or is it hardcoded?
TheDeliveryMan
Posts: 886
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

Maybe you could try to use these and see what happens...

Code: Select all

<create_trade_offer />
<update_trade />
<remove_trade_offer />
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

and here another hint:

a Trade Offer itself is basically a Ware, buy or sell an amount and Price per Unit - it is not bound to a specific station or Ship per definition (although in practice most are) - this means om the other hand that multiple stations can have the same trade offer and fulfilling it for one probably means fulfilling it for all*

*didnt test this yet
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
User avatar
Escaflow
Posts: 25
Joined: Sat, 1. Aug 09, 16:18
x4

Post by Escaflow »

TheDeliveryMan wrote:Maybe you could try to use these and see what happens...
Thank you, where did you find these? The next thing to know would be what kind of input these functions require... I wish egosoft would just release a Documentation :/
UniTrader wrote:[...]
this means om the other hand that multiple stations can have the same trade offer and fulfilling it for one probably means fulfilling it for all
[...]
In XR a trade offer is basic the price of a ware tailed to the amount of ware available per ware and station. The available part isn't on base of the numeric value of wares available, it is number of ware to max storage capacity of its type.
In my save I have lots and lots of -20% for 50 wares sales and +20% for 100 wares bought what indicates that their storage is full, but not with things they can sell or need.
What I want to do among other things is to set the % of prices to a value that reflects the need for production materials for the next xx hours (I think 12h should be sufficient) and stop buying for wares that aren't needed.
TheDeliveryMan
Posts: 886
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

Escaflow wrote:
TheDeliveryMan wrote:Maybe you could try to use these and see what happens...
Thank you, where did you find these? The next thing to know would be what kind of input these functions require... I wish egosoft would just release a Documentation :/
My editor (MS Visual Studio Express 2013) found them in libraries/common.xsd ;)

Return to “X Rebirth - Scripts and Modding”