Pooling station budgets

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

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

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Pooling station budgets

Post by jth »

I have been thinking about how stations pay for goods for a while and I have been reading other people's comments

Its probably the major factor that is preventing my little production empire from making me lots of money

The present system of individual station budgets is a nuisance as the highest tech stations are constantly crying out for massive amounts of money while the low tech water distillery only need small sums but still keeps running out. Just about every station that I own has a yellow ! beside it :(

I want to be able to leave the game going on a laptop un-attended and have it make me money like previous versions of the game.

UniTrader made some comments recently about using the players money instead and I have been thinking along those lines too but there are pros and conns.

Pros to using the player account
No more yellow ! at least for money
money would be used far more efficiently

Conns to using the player account
Seriously spammed logs and event log as the money constantly pops in and out
I suspect that ther is quite a bit of code that would need tweaking

Then I thought about pooling all station manager accounts as an alternative. Essentially allow the station managers to get money from each other.

It would need a mechanism to move money from one station manager to another plus one to remove the budget messages for all station managers. Also something to return money to the player when the manager pool exceeds a certain value.

The basic idea is to operate in a short time scale and just inject enough money to keep the wheels turning in the same way as previous versions of the game where it was more about matching production rates than having enough money for two hours production.

When a ship is just about to trade there is an event_trade_order_started and if these were intercepted then the money could be borrowed from another station to pay. Call it money recycling :) Not sure if the event_trade_order_started appears for OOZ trading though.

When a manager decides to buy goods then the available money could be calculated as including say 10% of the manager pool

It might need less changes than switching over to using the player account. There would be a sort of virtual corporate account that the managers share and the player would retain their own personal account.

I haven't dug into trading before so What have I missed ?

jth
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

you could also use <share_actor_account/>
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 ;)
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

UniTrader wrote:you could also use <share_actor_account/>
I guess a "super general" manager or company accountant might be an answer. Hireable for xxx credits, salary yyy That would provide something to hook the configuration of the manager pool into although I doubt that there are any spare manager comms slots :(

I think its probably a bit cleaner than using the player account as it would still avoid all the notifications but would have to be fairly conclusively bolted into the manager scripts.

How difficult would it be to bolt it in and how much damage would that do to other trading scripts ?

I thought that running some manager to manager transfers in the background might be less intrusive to other code.

jth
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Thanks for thinking about this one :)
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

jth wrote:
UniTrader wrote:you could also use <share_actor_account/>
I guess a "super general" manager or company accountant might be an answer. Hireable for xxx credits, salary yyy That would provide something to hook the configuration of the manager pool into although I doubt that there are any spare manager comms slots :(

I think its probably a bit cleaner than using the player account as it would still avoid all the notifications but would have to be fairly conclusively bolted into the manager scripts.

How difficult would it be to bolt it in and how much damage would that do to other trading scripts ?

I thought that running some manager to manager transfers in the background might be less intrusive to other code.

jth
Thinking about what I just said does using <share_actor_account/> mean that the manager trading scripts don't need to change at all ? All that would have to be done is to attach all the managers to the shared account

If so then that is a very good way of doing it :)

The mechanism for adding money to a manager is already there in the gui too. That would make it more of a bolt it all together job.

Alternatively - using a bit of lateral thinking Is Betty or Yisha any good with money ?

jth
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

about sharing:

afaik not really intrusive, you just have to do it to the Managers subordinates, too from what i have seen because there this command is already used in Vanilla for the managers subordinates and when telling the manager to share his account with someone else the subordinates may still use the old managers account..

only problem would be to find a free Slot in the Managers Dialogue Tree, thats all ^^

about intrusiveness i would say both are about the same, but sharing is simpler to implement (i would say almost trivial)
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 ;)
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth »

UniTrader wrote:about sharing:

afaik not really intrusive, you just have to do it to the Managers subordinates, too from what i have seen because there this command is already used in Vanilla for the managers subordinates and when telling the manager to share his account with someone else the subordinates may still use the old managers account..

only problem would be to find a free Slot in the Managers Dialogue Tree, thats all ^^

about intrusiveness i would say both are about the same, but sharing is simpler to implement (i would say almost trivial)
I will give serious thought to making this number 3 or 4 in my queue :)

I have some thoughts about how to deal with the free Slot in the Managers Dialogue Tree issue and thats currently number 2 in my list. Unfortunately it requires some lua scripting which I am just starting to play with for number 1 (a rewrite of the Ship Recycling user interface using lua)

jth

EDIT UniTrader has released a mod to do this as part of the Advent series. So I will be using that.

Return to “X Rebirth - Scripts and Modding”