Mayhem - Sanctuary Scraper command v0.11 - DEPRECATED

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Mayhem - Sanctuary Scraper command v0.11 - DEPRECATED

Post by lostProfitssssArrgh » Fri, 25. Aug 17, 06:16

The 'Scraper' command attempts to collect all excess wares from Sanctuaries and bring all of those to a central station (with potentially a future warehouse addition in mind...). As it is, any ware for a which a capacity was not set or any ware stocked over 100% will get picked up. Stations that don't meet the aforementioned criteria are ignored. The script is trying to supplement IDN/local DA's and freighters where those fall short.

This is my first attempt at a script going beyond the useful 1-liners one can throw together so it still has a very long way to go before it can be considered 'release worthy'. Which is why I humbly request some feedback towards proper functionality and integration from any experienced modder with a few minutes to spare.

Change log:

v < 0
initial post

v .01
added basic comments and to-dos
freighter name and color
main loop, uses randomWait in between iterations
available cargo check at pickup

v .05
command integration (uses 461)
fixed main loop
idling feedback text

v .10
- checks for updated script version, behavior will change after current station run
- prerequisites checks now actually work as expected
- skips the home-base when the home-base is a sanctuary (duh!)
- checks the home-base ware amount at loading time. Skips if full or only loads what the home-base is capable of storing (uses max storage so it will overstock where possible)
- checks the home-base ware amount upon arrival, in case it increased during the return flight. Offloads whatever possible, sends a message to the player and stops the command if needed.

v .11
- fixed auto-jump check, it would always disable the scraper command due to the test command returning a value different than true/false.
- added a total ware volume check (currently at 100) so that the scraper doesn't constantly fly to pick-up negligible ware amounts.


---> FILES <---


install:
files in addon/scripts go into %yourInstallPathToX3AP.exe%/addon/scripts
files in addon/t go into %yourInstallPathToX3AP.exe%/addon/t
(overwrite files with latest when upgrading)
restart the command for users upgrading from versions older than 0.10

In-game requirements:
- LU 1.7.2 and Mayhem 2.1.3
- Trade Command softwares mk1 & mk2
- Trading System Extension
- Station Agent Software
- Any ship with a jump-drive, auto-jump and refuel settings turned on (100 jumps should be enough for everybody)
- a home base that is a dock

TO DO:
Menu to choose which Sanctuaries will get scraped if not all
Add a way to set the minimum volume threshold that\ll trigger a run
Find a way to add the warehouse station without asking the users to fiddle with TDocks
Make a warehouse model instead of using the Boron Equipment Dock
Figure out how to integrate the warehouse into Mayhem without changing Joubarbe's files.
'Balance' the warehouse : probably by making it outrageously expensive and making it a priority target for enemies (esp. OCV)
Pray that the Panda doesn't rip me to shreds for offering to make ware management in Mayhem less of a headache

Comments welcomed,
LPA
Last edited by lostProfitssssArrgh on Sat, 16. Sep 17, 14:49, edited 8 times in total.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 25. Aug 17, 08:00

Have you noticed it hangs on you?

lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Post by lostProfitssssArrgh » Fri, 25. Aug 17, 16:19

I does indeed from time to time, although it did go through the station list once in its current state. I'm guessing the fly commands are absolutely not handled correctly..?

lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Post by lostProfitssssArrgh » Fri, 25. Aug 17, 19:50

Checked again. As it is, the freighter docks to 3 sanctuaries out of 5 picks up wares and drops them off correctly.

What caught your attention..?

Thx,
LPA

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Fri, 25. Aug 17, 21:34

Use the X-Studio macros man... "for each", "dim", "do if", etc.

Code: Select all

inc $count

lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Post by lostProfitssssArrgh » Fri, 25. Aug 17, 23:15

I'm still mostly using the in-game script editor ( i know, i know : dumb newb).

Even though I've installed Litcube's library, x-studio is still missing a few things that are in-game and vice-versa. I need to sort that out :/

EDIT > posted v .01 above

lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Post by lostProfitssssArrgh » Sat, 9. Sep 17, 07:26

version 0.11 posted

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”