[HELP] Station ware stock limit calculation XML, et al.

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

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

Post Reply
XATSUB
Posts: 5
Joined: Wed, 12. Dec 18, 13:05

[HELP] Station ware stock limit calculation XML, et al.

Post by XATSUB » Wed, 12. Dec 18, 13:40

Hello, new modder and X player here

i want to mod my stations so that they keep less stock of certain wares in their storage. Non-warehouse stations generate this stock limit automatically depending on the number of wares and the total amount of storage (i know this because i've modded my storage module capacities, and this caused stock limit to change). What is the XML file that calculates this stock limit? I've been searching for it for a while and using the find function for individual XML files but i haven't had luck finding this one.

also, i've been digging through XML files with Notepad, and using Internet Explorer to view them. i don't have an XML editor.

i have almost 70 mods in use by now (i haven't been to Olmekron in the plot yet), and have several that're unique creations, but Nexus make's it very hard to post new mods and i don't have the game on steam. How do i post my mods on Nexus?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [HELP] Station ware stock limit calculation XML, et al.

Post by euclid » Thu, 13. Dec 18, 16:25

Hi XATSUB :-)

I think the storage is managed via UI and not XML.

Concerning adding mods to the Nexus you just need to register for free (no need to pay anything). Then go to the X Return mod page and check the top buttons. One of them is called "Mods" and mouse over will open a bitmap with the option to add a mod.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

XATSUB
Posts: 5
Joined: Wed, 12. Dec 18, 13:05

Re: [HELP] Station ware stock limit calculation XML, et al.

Post by XATSUB » Sat, 15. Dec 18, 05:10

Hello, thanks replying and for the tip about the information location.

I've looked through the UI for it, however it seems both menu_property.lua and menu_production.lua (in directory ego_detailmonitor) only display pre-existing data about stock and limit (i want to find the calculation for "limit" and modify it in this case).

However, it doesn't seem like they do the calculations themselves. I'm also having trouble finding references or any import function for how they'd get such a limit value. I only have basic notepad to look through LUA with so looking through LUA files is harder than XML.

I want to modify the limit value so that not as many trade offers are generated by the increased storage. An alternative is to find how trade offers are generated from current storage versus desired amount (limit) and modify the calculations for that. However, i can't find that either.

(right now i'm getting pretty insane stuff in my game, like my cell-recharge fac asking for 1 million energy cells. I need those energy cells to be distributed evenly among my stations so i'd like to re-write the limit (or trade offer generation) calculation to be based on existing station resources and possibly time left before they run out, instead of maximum storage space).

also, I don't know how to patch LUA files either. i'm guessing it's not as easy as XML.

Tyrant597
Posts: 299
Joined: Wed, 9. Apr 08, 05:52
x4

Re: [HELP] Station ware stock limit calculation XML, et al.

Post by Tyrant597 » Mon, 17. Dec 18, 05:17

If you can get by with modifying trade orders routine, then for station traders, that would be in aiscripts\trade.find.commander.xml. IF my understanding of it is correct, it actually chooses what to sell based on relative price, so setting the sell price higher will make it less likely to be sold, regardless of how much is in stock. Also if you need something light and free to poke around in the .xml, you could try Notepad++.
You don't talks about X:Rebirth...
X4 Mods: Collect Inventory Wares Stations Supply Build Storage Mass Move Marines

XATSUB
Posts: 5
Joined: Wed, 12. Dec 18, 13:05

Re: [HELP] Station ware stock limit calculation XML, et al.

Post by XATSUB » Mon, 17. Dec 18, 22:10

Tyrant597 wrote:
Mon, 17. Dec 18, 05:17
aiscripts\trade.find.commander.xml
I cannot find that file. After searching similar files, only trade.findtraderun.xml has "commander" in it.

Selling my wares aren't a problem because i plan to make a warehouse that buys at max and only trades with my stations; i'll have much more room to pool resources and manually sell at strategic times then. However, supplying my stations is the major issue and hassle.

I don't want to change ships' trade AI, but rather how the trade offers are generated. This is because right now i manually supply my stations; the increased storage simply means i don't have to do this often, but i want to mod trade offer generation because sometimes the stations don't need that much.The worst affected are cell recharge facs where energy and fuel storage are merged; plus, stock limit creation only uses 40% of the container storage.

I've found the AI to be unreliable when trading outside of random trades using the Autotrader.

Even if i modded the trade searching for the AI, i'd still need to do some manual trading like for quests or sales of key expensive products, so the problem isn't solved. If i don't mod the trade offer generation, the NPC station's natural "buy order" of a million items stays on top of the "mission trade order" in the trade menu, and i cannot complete the quest.

XATSUB
Posts: 5
Joined: Wed, 12. Dec 18, 13:05

Re: [HELP] Station ware stock limit calculation XML, et al.

Post by XATSUB » Thu, 20. Dec 18, 15:57

Hello, i'm not sure if i'm allowed to double-post or not but i seem to have found a unconventional work-around to my little problem.

Stations like the fuel recharge fac demand 1mil energy cells because the fuel and energy storage are mixed, but the MAX storage amount isn't the only parameter that determines stock limit. Seems stock limit is also determined by consumption rate for that resource.

Therefore, to lower the energy cell demand for this particular station, i lowered the per-cycle cost of energy cells for fuel cells from 800 to only 100, and increased the production cost in another medium of storage by doubling the food ration and bofu cost.

Container storage is separate from fuel storage and these stations only need food and spacefuel for that storage so it should work out. Also shouldn't affect the economy too much because everything needs energy cells, and those extra food needed will need energy cells to produce.

Post Reply

Return to “X Rebirth - Scripts and Modding”