[Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

The place to discuss scripting and game modifications for X4: Foundations.

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

tizubythefizo
Posts: 18
Joined: Sun, 14. Apr 19, 10:50
x4

[Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by tizubythefizo »

Hey all,

I'm new to modding X4 (but am a software developer by profession, so not noob to the entire concept of modding, heh) and am trying to plan out a concept I have for a logistics mod.

I've got a more in depth synopsis here: https://github.com/tizubythefizo/X4-Aut ... nLogistics

The cliff notes is I'm aiming to create a logistics mod where the player is more focused on the macro level. Assign enough trade ships/freighters to a station, make sure production is sufficient and goods available in range, and the "station managers" will sort out the rest (transferring wares between player stations instead of relying on buy/sell orders when possible, placing buy orders when goods can't be obtained from other player stations, etc...).

In looking at how things are currently done with traders attached to stations, my mod more or less becomes a redesign of that entire system.

I've found most of the ship specific stuff (when a player assigns a ship to trade for a station, lib.request.orders aiscript gets called via some voodoo I don't understand, and that sets up an order.trade.routine aiscript using the stations resources as the wares list, more or less).

But I can't for the life of me find where the station figures out how much stock it needs and creates buy/sell orders. That's the most critical issue I have right now, since conceptually that's the code I need to work with/replace/modify to get station logistics up.

Does anyone know where that code/scripting lives?

Also, if anyone reads the technical issues part of the readme on the github and has answers or comments on anything else, or heck even any comments on my concept itself, please feel free to comment on those as well.
XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by XTC0R »

There is an unofficial egosoft discord server where most modders hang out. I bet they can help you.

https://discord.gg/e4qmmJT
tizubythefizo
Posts: 18
Joined: Sun, 14. Apr 19, 10:50
x4

Re: [Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by tizubythefizo »

XTC0R wrote: Sun, 21. Apr 19, 23:40 There is an unofficial egosoft discord server where most modders hang out. I bet they can help you.

https://discord.gg/e4qmmJT
Thanks, just joined up there.

For others reading the thread, still please feel free to offer advice and/or comments on the mod concept.
language
Posts: 73
Joined: Mon, 9. Dec 13, 10:55
x4

Re: [Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by language »

Hi, I have created a mod, which is similar to what you are talking about, check it out, maybe it will help:
RandomSupply
also check out my other 2 mods, RandomTrade and RandomMine

But about the part with creating the buy orders: from what I have heared its hard coded with C++.
However if the Station has no money on it, then it wont create the buy orders. Then you could access the stocks of the stations with $station.cargo, however then you should be aware of food rations and medicaments, if there are none if them in stock, then it wont be in the cargo list afaik, you then would need to deliver some of them (like few hundreds of each) for them to appear in the cargolist.
Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: [Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by Misunderstood Wookie »

Thanks this reminded me to write a thread
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image
nickolaiproblem
Posts: 246
Joined: Mon, 5. Nov 18, 23:12
x4

Re: [Help][Mod Concept] Automated Player Station Logistics - Need some help getting started

Post by nickolaiproblem »

tizubythefizo wrote: Sun, 21. Apr 19, 22:07 Hey all,

I'm new to modding X4 (but am a software developer by profession, so not noob to the entire concept of modding, heh) and am trying to plan out a concept I have for a logistics mod.

I've got a more in depth synopsis here: https://github.com/tizubythefizo/X4-Aut ... nLogistics

The cliff notes is I'm aiming to create a logistics mod where the player is more focused on the macro level. Assign enough trade ships/freighters to a station, make sure production is sufficient and goods available in range, and the "station managers" will sort out the rest (transferring wares between player stations instead of relying on buy/sell orders when possible, placing buy orders when goods can't be obtained from other player stations, etc...).

In looking at how things are currently done with traders attached to stations, my mod more or less becomes a redesign of that entire system.

I've found most of the ship specific stuff (when a player assigns a ship to trade for a station, lib.request.orders aiscript gets called via some voodoo I don't understand, and that sets up an order.trade.routine aiscript using the stations resources as the wares list, more or less).

But I can't for the life of me find where the station figures out how much stock it needs and creates buy/sell orders. That's the most critical issue I have right now, since conceptually that's the code I need to work with/replace/modify to get station logistics up.

Does anyone know where that code/scripting lives?

Also, if anyone reads the technical issues part of the readme on the github and has answers or comments on anything else, or heck even any comments on my concept itself, please feel free to comment on those as well.
I have a question does this mod allow for you to setup trade warehouses that can distribute goods across the map?

Return to “X4: Foundations - Scripts and Modding”