[MOD] MT Station Logistics - Last update: v1.36 - 01 January 2017

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

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

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

v1.21 - Fixes newly added ships crashing the UI (introduced in v1.20)
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »


+++++ ANNOUNCEMENT 27th March 2015 +++++


v1.25 - Further fixes, optimisations and mod compatibility changes.

New Feature:
v1.25 introduces tracking of ships from other trading mods. Your list of available ships will now show YAT and JLP Unitraders tagged and locked so they cannot be selected as MT Logistics ships. Support for Euclid's Autotraders is also included but only if you have Vim Razz's HumanResources mod installed (I couldn't figure out how to tag AutoTraders without breaking HumanResources - Fix soon hopefully if doable) To be honest having HR installed is highly recommended as it allows the use of AutoTrader and JLP Unitrader anyway since the latest changes to the radial command menu!

Note that you also now have a global options menu: select "configure" from the main menu then select "global options". Here you can turn on or off displaying ships that are locked out by other mods.

Enjoy!
Wysi :)

PS thanks to Sparky for the new announcement banner :D
Last edited by wysiwyg on Fri, 3. Apr 15, 18:57, edited 1 time in total.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

NICE! (I mean mostly the banner. Although the update's nice too.)

Thanks for the update!
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Haha, you're welcome :D

Looking forward to trying this mod post-vanilla post. Thanks!
Conbadicus
Posts: 217
Joined: Sat, 13. Feb 10, 09:31

Post by Conbadicus »

Ok, Good Mod, I know what its SUPPOSED to do but Im a little confused by the wording in the Manual when trying to make waypoints..
The “Minimum Amount” is the lowest amount of cargo that the ship will consider the waypoint is valid

The grammar here is a bit off so I'm confused as to whether it is lowest amount of cargo that the ship has or the station has or... ?
Assuming I want my Hauler to fill up as much energy cells as he can from his energy home base. I should set min to 0% and max to 100% ??

Then, lets say he fills up and goes to way point 2, one of my stations that requires energy cells. What % do I set to have him unload as many as possible. Like, a fill option.



I'm beginning to think it was talking about the current cargo on the ship right? lol[/quote]
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

Conbadicus wrote:Ok, Good Mod, I know what its SUPPOSED to do but Im a little confused by the wording in the Manual when trying to make waypoints..
The “Minimum Amount” is the lowest amount of cargo that the ship will consider the waypoint is valid
.....
Hi Conbadicus - You're pretty much right what you said: I'll expalin a little better for the benefit of anyone else who might struggle with my old fashioned use of english :D

The minimum amount relates to that particular waypoint - Here's an example:

I set a waypoint to load/buy MINIMUM 10% and MAXIMUM 100% - let's say from an ecell station.

When the trader analyses the waypoint (s)he will only fly to the station and load up if there is at least a 10% cargo load of ecells available for sale at the station. Any less and the waypoint will be skipped. If the station has between 10% and 100% the trader will fly and load as much as the station has. If the station has over 100% then yes you will end up with a full cargo hold.

I then set a second waypoint to unload/sell at another station that needs ecells. I set the MINIMUM to say 5% and the maximum to 20%:
Now if that station needs at least 5% cargo hold load of the ecells then the trader will go and unload/sell - the maximum transfer will be 20% of the cargo hold IFF the station needs that much. If the station needs less than 5% then the waypoint will be skipped.

This means that you can push wares to several stations that need them having already loaded up at a single station:

Waypoint 1 - Load as much as possible at station 1
Waypoint 2 - Sell up to 20% of cargo at station 2
Waypoint 3 - Sell up to 20% of cargo at station 3
Waypoint 4 - Sell up to 20% of cargo at station 4
Waypoint 5 - Sell up to 20% of cargo at station 5
Waypoint 6 - Sell up to 20% of cargo at station 6
goto WP 1

etc. there are lots of ways you can do this - it's up to you.

tl;dr the MINIMUM setting is the lowest amount that a trader will fly a waypoint - any less and the waypoint is skipped. The MIN setting is available to prevent traders wasting time dealing in ridiculously small amounts of low value wares.
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz »

Thank you for the endorsement! :D

Spotting AutoTrade ships to avoid breaking them is always going to be a challenge unless euclid decides to take an interest in improving the tracking himself, but I think you took a rather interesting approach here.

Also, I've been very much enjoying the CV support feature lately!
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

Hi wysiwyg (or other experts of this mod usage)

I'm interested in giving this mod a go... looks like a fun and interactive way to manage station logistics without micro managing every trade.

Due to my lack of XML understanding I wonder if I could ask a couple of questions...

Does this mod work by creating an external list of trade tasks which the mod executes one at a time in a loop, using the same move and trade scripts that a ship would use, if I issued each way point instruction separately using vanilla functionality?

... or have you replaced them with a mod specific version of said scripts?

Either way, are the instructions a ship follows subject to all the same universe interruptions? (such as being attacked, defending and re-commencing initial task).

Even though we can all agree Manager AI is still being improved...does the addition and removal of station wares using this mod confuse the station manager?

You have a dedicated un-installer. What hooks does this mod have which would require a save game search and purge upon uninstall?

Thanks
-LC-
Always expect the unexpected, and you will never be surprised.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

Hi Leafcutter - thanks for your interest in this mod.
Does this mod work by creating an external list of trade tasks which the mod executes one at a time in a loop, using the same move and trade scripts that a ship would use, if I issued each way point instruction separately using vanilla functionality?
... or have you replaced them with a mod specific version of said scripts?
The mod creates a series of custom trade "actions" that are stored in a global list. As you rightly said these are executed in a loop using a custom script to manage each iteration of the loop and a custom script to look for matching trade offers. Movement is achieved using Egosoft's move.generic script - all the custom scripts have the same handler sections for responding to attacks etc as the vanilla trade scripts. Also the custom scripts feature proper graceful <abort> nodes to ensure the ship/npc running the script is left in a sane state if, for example you call the ship back into your squad.
Either way, are the instructions a ship follows subject to all the same universe interruptions? (such as being attacked, defending and re-commencing initial task).
See above - yes they should be - in my game I've had Logistics traders report in when under attack for example.
Even though we can all agree Manager AI is still being improved...does the addition and removal of station wares using this mod confuse the station manager?
The only thing the manager does (as far as I can tell) is to assign ships to certain duties. In the case of trade ships he/she gives them a list of wares that the station needs or sells and the rest is handled by the aiscript running on the captain of the ship. This mod has a small patch in the manager's script that makes the manager ignore logistics ships when assigning new duties. My stations in Devries are flat out producing goods that I can't sell fast enough in Albion and OL (and that's without the hostile PMC stations)!
You have a dedicated un-installer. What hooks does this mod have which would require a save game search and purge upon uninstall?
I'm a bit of a perfectionist and I like to leave stuff the way I found it :D . The uninstaller stops all running custom scripts, removes any global data, and removes any blackboard variables that have been written to NPCs. When used as described you should end up with a clean savegame that has no evidence that the mod has ever been used (other than a stupidly high bank balance :D ) If the uninstall procedure was not followed it's possible that there could be a lot of confused ships around that you would have to one-by-one find and order back into your squad. (incidentally the uninstall scripts are lifted directly from Mad Joker's UFO mod)

Hope this helps - feel free to ask any further questions and I'll do my best to help.

Cheers
Wysi :)
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

Thanks for the explanation. Sounds good.

Like you say this will be most useful (initially at least) in setting up loops for refined metals and silicon wafers produced in the plot URV as in my game at least there is nowhere in Devries to sell them.. I will subscribe and test for this purpose.

I haven't read the accompanying manual...does it describe the crew requirement verses trade range - as I have only picked up snippets from this thread about that?

May I suggest as I previously mentioned that in all likelihood the station manager AI will be updated more often by Egosoft and as such you will need to keep an eye on updating this as necessary in order to keep in sync :-)

Thanks again.

-LC-
Always expect the unexpected, and you will never be surprised.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

The manual doesn't explicitly state the crewskill requirements for the various ranges but the range of all ships that appear in the select screen is shown so that you can pick the best ship/crew for the job. As a rough guide a crew of all 4 stars in the relevant skills will be good for galaxy trading. If you want a galaxy trader you could put your best crew on the same ship and it should be good for galaxy range. I'll update the manual to make this clearer when I've finished working on the next update which should improve the method for adding waypoints.

I'll also keep a keen eye on manager AI although as I said the logistics traders and vanilla traders should be unaffacted by each other and work together just fine.
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

Hi

Well perhaps I'm doing something wrong, but when I set my first waypoint to LOAD MAX water onto an empty Hermod (Bulk/Liquid) and selected SAVE the corresponding amounts were not being updated or saved.

The pick up station was it's home station and water was the only ware option.

I checked container ships, other stations...same problem... I did try and start it with a destination waypoint in case it was an UI issue, but it never picked up from a full station.

Any ideas?

[edit]

screenshot https://www.dropbox.com/s/zhowow8kn7c05 ... 4.rar?dl=0

-LC-
Always expect the unexpected, and you will never be surprised.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

Hi Leafcutter
This is very odd. I haven't been able to reproduce this in any of my test saves. The only thing I see different in your game is that you're using the "turn-to-the-side" monitor. I'm at work just now but I'll test with this setting when I get home.

If you could supply a copy of your debug log that would be a great help. This does seem to be a bug , but I've never seen it before. Sorry for the inconvenience - this is a complex mod and testing takes a long time with so many potential set-ups, game styles and save game legacies.

Wysi :)
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

No problem... I have mods too which may affect.

likewise, I will PM you relevant info when I get home from work.

cheers
-LC-
Always expect the unexpected, and you will never be surprised.
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

Sent you mu save game via PM

ta.
Always expect the unexpected, and you will never be surprised.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

v1.26 - Fixed not being able to set waypoints for Hermods and Leptons.

Thanks to Leafcutter for helping me find and fix this bug.
User avatar
eMYNOCK
Moderator (DevNet)
Moderator (DevNet)
Posts: 2061
Joined: Thu, 21. Aug 03, 10:37
x4

Post by eMYNOCK »

wysiwyg wrote:v1.26 - Fixed not being able to set waypoints for Hermods and Leptons.

Thanks to Leafcutter for helping me find and fix this bug.
Because today is April the 1st, i hope your Update is a serious Fix....

In any way... sweet that the Leptons are fixed...

Regards and happy Fools Day.
MynoCorp Technologies - We build it, you're stuck with it.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

eMYNOCK wrote:
wysiwyg wrote:v1.26 - Fixed not being able to set waypoints for Hermods and Leptons.

Thanks to Leafcutter for helping me find and fix this bug.
Because today is April the 1st, i hope your Update is a serious Fix....

In any way... sweet that the Leptons are fixed...

Regards and happy Fools Day.
HeHe - yes it did occur to me that posting a fix for a flying oil drum might be seen as an April Fool's Day gag! :D I can confirm, now it's after midday, that it was indeed a genuine fix ;)
User avatar
Leafcutter
Posts: 244
Joined: Wed, 2. Apr 03, 18:23
x4

Post by Leafcutter »

These ships have their place ;-)

Followed the old girl from her observation deck and she worked perfectly.
Thanks for fixing.

[screenshots]
Waypoint 1: https://www.dropbox.com/s/vqvuns8ymaeg2t6/wp1.jpg?dl=0

Waypoint 2: https://www.dropbox.com/s/kxkukpalf24fg6b/wp2.jpg?dl=0

-LC-
Always expect the unexpected, and you will never be surprised.
User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg »

v1.30 - New add waypoint method:

Enter waypoint type (load, unload, buy, sell), ware type, max and min trade caps, price (if buy or sell)

Hit "Get Waypoints" and you will be given a list of stations sorted by distance from the Logistician's home base.

Select the ones you want and hit save and waypoints will be added to the list for each station selected.

It's a lot easier than faffing about hunting for stations on every waypoint add.

NOTE: If you select Load or Unload the list will only contain player stations
if you select Buy or Sell the list will only contain NPC stations.
Wares selectable are only those dealt with by the homebase.
You can switch back to the old method for adding waypoints to add Fly To and Refuel waypoints.

There's also improvements to the tracking log display so that you can now see the actual in progress waypoint details as well.

Enjoy
Wysi :)

Return to “X Rebirth - Scripts and Modding”