Space Engineers

Space Engineers

Not enough ratings
NDS Inventory Manager 5 Guide
By nicknds
Guide for using NDS Inventory Manager v5. Guide is being worked on.
3
   
Award
Favorite
Favorited
Unfavorite
Panel Settings
Generation
Text Panels
A blank Custom Data will be populated with all the panel settings
Cockpits
A section inside Custom Data will be populated with all the panel settings for each panel in the cockpit

Ignored Settings
Universal
//The script ignores lines that begin with//
//These lines are optional settings with examples and potential options generated for you
Cockpits
Settings outside each panel's tagged section are ignored

Setting List
  • Type
    Applies To: Universal; Required Accepts: (1) Item, Cargo, Output, Status, Span Sets: Panel type
  • Font
    Applies To: Item, Cargo, Output, Status Accepts: (1) Font found under the Font drop down box Sets: The font used on panels
  • Categories
    Applies To: Item, Cargo Accepts: (∞) Item categories; separated with a vertical bar '|' Sets: The categories to display
  • Items
    Applies To: Item Accepts: (∞) Item search string with no numbers e.g. Ingot:Uranium:Platinum|Ore:Ice. Supports multiple lines for readability Sets: The items to display
  • Item Display
    Applies To: Item Accepts: (1) Standard, Detailed, CompactAmount, CompactPercent Sets: The information displayed for each item
  • Sorting
    Applies To: Item Accepts: (1) Alphabetical, AscendingAmount, DescendingAmount, AscendingPercent, DescendingPercent Sets: The order of displayed items
  • Options
    Applies To: Item Accepts: (∞) BelowQuota, HasActivity; separated with a vertical bar '|' Sets: Behavior settings
  • Minimum Value
    Applies To: Item Accepts: 0-∞ Sets: The lowest count item to display on the panel
  • Maximum Value
    Applies To: Item Accepts: 0-∞ Sets: The highest count item to display on the panel
  • Number Suffixes
    Applies To: Item, Cargo, Output, Status Accepts: (∞) Suffixes for each 1000 separated by a vertical bar e.g. K|M|B|T Sets: The suffixes used when shortening a number e.g. 1000000 => 1.00M
  • Text Color
    Applies To: Item, Cargo, Output, Status; Sprite Only Accepts: Red:Green:Blue:Alpha (0-255) e.g. 0:80:160:255 Sets: The color of most text
  • Number Color
    Applies To: Item, Cargo, Output, Status; Sprite Only Accepts: Red:Green:Blue:Alpha (0-255) e.g. 0:80:160:255 Sets: The color of most numbers
  • Back Color
    Applies To: Item, Cargo, Output, Status; Sprite Only Accepts: Red:Green:Blue:Alpha (0-255) e.g. 0:80:160:255 Sets: The color of the texture behind each object
  • Rows
    Applies To: Item, Output, Status, Span Accepts: -1-∞ Sets: The number of rows to display
  • Name Length
    Applies To: Item, Status Accepts: 3-∞ Sets: Formats item names to be as long as this value, either shortening or padding the name as needed
  • Decimals
    Applies To: item, Status Accepts: 0-∞ Sets: Sets the number of decimals to show for most numbers
  • Update Delay
    Applies To: Universal Accepts: 0-∞ Sets: The minimum number of seconds between repainting the panel
  • Offset Multiplier
    Applies To: Universal; Sprite Only Accepts: 0-∞ Sets: The multiplier applied to the vertical offset necessary for most panels. 1 for most, 0.5 for the rest (for now)
  • Text Multiplier
    Applies To: Universal; Text Only Accepts: 0.1-∞ Sets: The multiplier applied to the size of text when resizing panels. 1 for most, 4 for corner panels (for now)
  • Span ID
    Applies To: Span Accepts: Any identifying value Sets: The input channel for spanned objects
  • Span Child ID
    Applies To: Item, Output, Status, Span Accepts: Any identifying value Sets: The output channel for spanned objects
Item Quotas and Settings
Each item is stored in two lines with identifiers for each setting
These can be found in the Custom Data of the main Programmable Block

Identifiers are in bold with the setting on the right side of the =
Settings are automatically generated for each item


First Line Settings

Name=Computer||Category=Component||Quota=0

Name=Computer
  • This is the name you see on panels and the name you reference with filters, limits, loadouts, etc
Category=Component
  • This is the category the item is under. You can change this freely
Quota=0
  • The script will try to keep each item at their set quota
  • Can end with <X to keep the count within that range e.g. Quota=100<150

Second Line Settings

^Type=MyObjectBuilder_Component||Subtype=Computer||
Blueprint=ComputerComponent||Assembly Multiplier=1||
Disassembly Multiplier=1||Assemble=True||
Disassemble=True||Fuel=False||Display=True

Type=MyObjectBuilder_Component
  • This is the type of the item
Subtype=Computer
  • This is the subtype of the item
Blueprint=ComputerComponent
  • This is the blueprint of the item
Assembly Multiplier=1
  • Enter the number of items received from crafting 1 blueprint. If you craft 10 items per blueprint, set this to 10
Disassembly Multiplier=1
  • Same as assembly multiplier except multiplies the amount disassembled
Assemble=True
  • Permit this item to be assembled (items with blueprints only)
Disassemble=True
  • Permit this item to be disassembled (items with blueprints only)
Fuel=False
  • Toggles the script trying to put this item into reactor type blocks
Display=True
  • Display on item panels
Refine=True
  • Permit this item to be refined (ores only)
BasicRefine=False
  • Can this item be refined in Basic Refineries (ores only)
Ore Keys
  • This contains the list of Item Subtype ID's of Ores that process into this Ingot. Requires exact match (only ingots have this option)

Sorting
Storage Settings
Options=Storage Storage=Ingot|Ore
  • This will specify any block as storage for Ingot and Ore categories
Options=
  • Cargo containers with a blank Options will default to storage
//Storage=Ingot Storage=
  • Cargo containers defaulting to storage with commented or blank Storage will default to all categories
Options=None Storage=None
  • This will prevent the Containers from being used as storage, so the script will empty them into the main storages
  • This is useful for mining ships or emptying containers

Storage Categories
Storage containers can store any of the categories set on items
The wildcard all can be used to specify all categories

Storage
Any block can now be specified as storage using the setting Options=Storage
  • This is not needed for Cargo Containers

Priority
Sorting prioritization is controlled with the setting Priority=1
  • Higher values are put at the top of the list and used first
  • Can use decimals and negative values from ±5.0 × 10−324 to ±1.7 × 10308

Sorting Between Storage Containers
Cargo Priority Sorting sorts items from low priority storage to high priority storage when possible
Does not enable until there is a range of priorities in the storage category
  • Toggled with setting sortCargoPriority
  • Delayed with setting delaySortCargoPriority
Loadouts
A loadout is a custom set of items
Any block with an inventory can accept a loadout

Syntax
Loadout=Amount:Category:Name:Name:Name|Amount:Category:Name
Loadout=150:ingot:silver:gold:uranium|1000:ingot:iron:silicon:nickel

  • Amount accepts numbers and decimals
  • Category accepts any set category and the wildcard *
  • Name accepts the beginning of names, exact name matches, and the wildcard *
    • Make exact name matches by surrounding the name with 'apostrophe'
  • Case insensitive

Features
  • Use multiple lines if desired each beginning with Loadout=
  • Subsequent loadouts overwrite past existing loadouts
    • Loadout=1000:ingot:*|150:ingot:uranium
      • This will set a loadout of 1000 of every ingot except uranium
  • Loadouts with negative values remove matches
    • Loadout=1000:ingot:*|-1:ingot:platinum
      • This will set a loadout of 1000 of every ingot except platinum
  • Case and space insensitive
  • Items exceeding the set loadout will be returned to storage
  • (optional) Loadouts increase the quota
    • For example, when your welding ship docks with a loadout of 10000 steel plates, the script will produce those steel plates even if your quota is set to 100 steel plates
  • Support partial and exact name matches

Examples
This requests 500 of every ingot except Gravel. The loadout for -1 Gravel removes the loadout for that 500 Gravel
Loadout=500:ingot:*|-1:ingot:gravel
This requests 1000 of every item; 10 of every tool; and 2000 Steel Plate, Small Steel Tube, Computer, and Construction Component. The later loadouts overwrite their items
Loadout=1000:*:* Loadout=10:tool:* Loadout=2000:component:'steel plate':'small steel tube':'computer':'construction component'
Feel free to request more examples or a loadout written by me.
Notes
  • Names: changing the name you see on panels through Custom Data changes the matches these systems rely on. If you rename 'Steel Plate' to 'Hard Square' a loadout for 1000 Steel Plate won't fill
  • Categories: changing the categories on items changes the matches these systems rely on. If you categorize 'Steel Plate' as 'Junk' then a loadout asking for 'Steel Plates' categorized as 'Component' won't fill
Limits
A limit can prevent the script from putting items in a block
Place limits with the setting Limit=Amount:Category:Name

Syntax
Limit=Amount:Category:Name:Name:Name|Amount:Category:Name
Limit=150:ingot:silver:gold:uranium|1000:ingot:iron:silicon:nickel

  • Amount accepts numbers and decimals
  • Category accepts any set category and the wildcard *
  • Name accepts the beginning of names, exact name matches, and the wildcard *
    • Make exact name matches by surrounding the name with 'apostrophe'
  • Case insensitive

Features
  • The script will not move items into the container over the limit
  • Items over limit will be processed and sorted
    • Processing limits requires setting processLimits enabled
      • Delayed by setting delayProcessLimits
    • Excess is sorted when found
  • Limits with negative values remove matches

Examples
Limit=100:component:*
  • Limit to 100 of each component
Limit=0:*:*|250:component:*|0:component:superconductor:medical:explosive
  • Limit to 0 of each item, 250 of each component, and 0 superconductors, medical components, and explosives
  • Each match overwrites previous entries. The last components requested have their limit changed in each subgroup but end with a limit of 0
Refining
Sorting Ores
The order of Ores in Refineries is sorted by:
  • Percentage of filled quotas for the Ingots
  • Position of each Ore in each Ingot's Ore Keys list
Controlling the Order
  • Produce an Ingot faster
    1. Increase its Quota
    2. Add the Subtype(s) of the Ore(s) that refines into the Ingot to its Ore Keys list
    3. Sort the Subtypes in the Ore Keys list by the amount refined, with the Ores that refine into the largest amount first
  • Refine an Ore faster
    1. Increase the Quota for any Ingots which contain the Ore in their Ore Keys lists
    2. Move the Subtype of the Ore to the beginning of the Ore Keys lists

Details and Example
The Ores in Refineries are sorted in ascending order according to a calculated number using the below formula
(Amount / Quota) + (Ore Keys Position * 0.00001)
  • An Ingot with an Amount of 50 and a Quota of 100 will have the initial value of 0.5 or 50%
  • An Ingot can have multiple Ores which refine into it, e.g. Iron Ore, Scrap, and Stone refine into Iron Ingot
  • The position of each Ore in the Ore Keys list starts from 0. Iron Ore is 0 and Scrap is 1
Using the above example, this is the number calculated for each Ore that Refines into Iron
Item is Iron Ingot Ore Keys=[Iron|Scrap|Stone] Amount = 50 Quota = 100 Iron Position = 0 (50 / 100) + (0 * 0.00001) = 0.5 Scrap Position = 1 (50 / 100) + (1 * 0.00001) = 0.50001
In this example, Iron Ore would be refined first because it has a lower value than Scrap
  • To change which Ore in the Ore Keys list is refined first, move the Subtypes around
    • Ore Keys=[Scrap|Iron|Stone] will refine Scrap then Iron then Stone
Stone refines into Silicon and Nickel also, each Ingot will have its Ore Keys list checked for each Ore and the lowest will be used for each Ore
Continuing with the last example
Item is Nickel Ingot Ore Keys=[Nickel|Stone] Amount = 10 Quota = 100 Stone Position = 1 (10 / 100) + (1 * 0.00001) = 0.10001
Nickel Ingot will give Stone a priority of 0.10001 which will be lower than Iron Ore's priority of 0.50001, so Stone will be put first in each Refinery to produce Nickel Ingot

Distribution and Auto Limiting
Each Refinery has automatic limits placed for each Ore in the system
  • Automatic limits apply to all Refineries
  • Manual limits override matching automatic limits
Each Ore in the system supported by the Refinery will have a limit placed on how much of that Ore can be in the Refinery
The limits for each Ore rise with priority and portioned by shares
  • With three Ores in the system, there will be (1 + 2 + 3 = 6) shares in total
  • The Ore most in demand will have (3 / 6 = 50%) reserved
  • The Ore least in demand will have (1 / 6 = 17%) reserved
Ores over the limit will be removed when limits are processed
This system allows removing Ores that you do not need refined to make more room for Ores you do need
Commands
  • Clear Queue
    Clears the queue from all Assemblers
  • Save
    Saves the settings manually
  • Load
    Loads the settings manually
  • Reset
    Resets all settings and known items returning to default, requires a recompile
  • Clear Functions
    Restart all active functions
  • Merge
    Toggle mod item merge process
  • Update
    Reset specific options in the Custom Data of the main programmable block
    Once started, remove any settings you want to be reset to the current default
    Recompile the script to finish the update
  • Full
    Returns toggles to default with all functions enabled
    • Disabled: survivalKitAssembly and useConveyor*
  • Basic
    Disables advanced toggles and enables basic control toggles
    • Enabled: countItems, countBlueprints, sortItems,
    • queueAssembly, queueDisassembly, sortBlueprints,
    • distributeItems, sortRefineries, and autoLoadSettings
  • Monitor
    Disables all control toggles, enables vanilla conveyor usage
    • Enables: countItems, countBlueprints, and useConveyor*
  • Scan
    Restarts all functions and reset the scan delay forcing an immediate scan
    Comparable to a recompile
    Helps to force finding new blocks, processing changed tags, or stopping a stuck function
  • Echo
    Toggles the Echo function
    Helps if you are having trouble selecting options in the terminal for the main programmable block
  • Error
    Toggle the error filter
    Past errors will also be displayed
  • Set [Name] [Value]
    Set quotas by command
    Category accepts any category; e.g. Ingot, Ore, Component, Fuel, Food
    Name accepts the beginning of names or exact matches with 'apostrophe'
    Values accepts any number
    Examples
    Set Co 500
    • This command will set quotas for all items starting with "Co" to 500; these include Computer and Construction Component
    Set welder 4 10
    • This command will set the quota for Welder 4 to 10, the spaces are accounted for
    Set SteelP 2000
    • This command will set quotas for all items starting with "SteelP", since spaces are also ignored this includes Steel Plate
    Set 'Motor' 200
    • This command will set the quota for 'Motor' to 200. This is an exact match, ignoring casing, this will exclude items like "Motor T2" and so on
Simulating matches can be done with panels set to Item
Type=Item Items=category:name:name|match:string
Mod Items
Merge Instructions
  1. Enter the command Merge
    • Requires at least 1 mod item and 1 mod blueprint or it will cancel
  2. Enter the number on the left of the Item
  3. Enter the number on the left of the matching Blueprint

Requirements
  • Mod Item and Blueprint count greater than 0
    • Merging will cancel itself if there is not at least one of both
    • The script will find Mod Blueprints when queued in any assembler once per cycle
      • Turning off the assembler will keep the blueprint queued so the script can find it before it is assembled
    • The script will find Mod Items, if they exist in any inventory, once per cycle
  • Matching item and blueprint IDs
    • You can see items and blueprints ready to merge in the merge help list by looking for similar blueprints and items
    • Open the merge help list with the command merge?
    • From this list, you can determine what the script hasn't found yet and what you need to provide for the script to finish the merge

Additional Help With Instructions and Merging
  1. The command Merge toggles the merge menu. It will cancel a merge in progress if used again
  2. All Mod Items will be displayed with numbers next to them, enter the number next to the Item you want to merge
  3. After choosing a Mod Item, your menu may change in size preventing you from scrolling up. If that happens, select any other block in the Terminal then select the Programmable Block again.
    When choosing a Mod Blueprint, the item you chose will be displayed at the top to help you match the items
    Entering the number for the Mod Blueprint finalizes the merge and saves it in the Custom Data of the main Programmable Block. From here you can change its name and quota, as well as other settings if needed

Information
The script automatically saves exact matches between Blueprint and Subtype
Ingots and Ores are automatically saved

To find Mod Items, the setting findModItems must be enabled (enabled by default)

When Mod Items or Blueprints are found, a counter will show in the main Programmable Block for Items and Blueprints. At a quick glance, you can tell if there are items to merge

Entering the command Merge? toggles the merge help list
  • This list will further help you determine if there are items to merge
  • You need a blueprint and an item to merge together. Items will be shown with the prefix ITM: and blueprints BPT:

Mod Ingots
Mod ingots are automatically saved with its own subtype used as the ore key. This assumes the ore and ingot have the same subtype

If the ore and ingot do not have the same subtype, you will have to set the ore key of the ingot to the matching ore
  1. Make sure the script has saved both the mod ingot and ore
  2. Navigate to the Custom Data in the main Programmable Block
  3. Find the mod ore in the Ore quotas under Ores
  4. Copy the Subtype from the second line
  5. Find the mod ingot in the Ingot quotas under Ingots
  6. On the second line find the Ore Keys setting and replace the key inside the [square brackets] with the copied Ore subtype
  7. If done correctly, you can now close the Custom Data and wait for the script to finish loading the new settings
Logic
This function triggers Timers and toggles blocks On/Off according to user set logic

Instructions
Enter the desired comparisons after the logic type of your choice, LogicAnd or LogicOr
  • Choose only one
Hint: Toggle many blocks On/Off with a Timer dedicated to turning them On and a Timer dedicated to turning them Off with opposite logic

Suggested Comparisons
  • Item Count vs Quota
  • Item Count vs Number
  • Item Count vs Item Count

Comparison Syntax
Case and space insensitive
It uses the Loadout processing system to match items with categories and names
Wild cards generate multiple comparisons e.g. LogicOr=component:*>quota will create a comparison for every component and will trigger for any one component

And comparisons requires every comparison to be true

LogicAnd=category:name [>/</>=/<=/=] [compare against]
  • LogicAnd=ingot:iron > 100000
  • LogicAndore:* > 50
  • LogicAnd=ore:iron >= ingot:iron | ore:iron > 500 | ingot:iron < quota

Or comparisons only require one comparison to be true

LogicOr=category:name [>/</>=/<=/=] [compare against]
  • LogicOr=ingot:iron > quota
  • LogicOr=ore:* > 50
  • LogicOr=ore:iron >= ingot:iron | ore:nickel > ingot:nickel | ingot:iron < 300

Comparison types
  • > Greater than
  • < Less than
  • = Equal to
  • >= Greater than or equal to
  • <= Less than or equal to

Math
The system supports basic math on both sides
Math is solved linearly, not following PEMDAS
Supported operations
  • *x Multiply
  • /x Divide
  • +x Add
  • -x Subtract
Recoded to remove operation limits
Technically this supports directly comparing numbers e.g. LogicAnd=5+1*2/4-1>6-1*3/2+5

More Help
  • This feature is controlled by the setting triggerLogic
  • Performing Logic is delayed by the setting delayTimerLogic
  • Comparisons set by the user are analyzed when the script processes all blocks on the grid
    • This is delayed by the setting scanDelay
  • Each block's Logic supports multiple groups so you aren't stuck on one lengthy line
  • Turning a Timer off prevents the comparison and trigger of that Timer
  • Timers will be triggered once every so often, make your Timer actions Set not Toggle
    • If your timer toggles something On/Off, it will repeatedly switch between on and off. Make one Timer turn it On, and another Timer turn if Off
  • To compare against the quota for the same item, just enter "quota"

Examples
  • LogicAnd=component:'steelplate'>=quota
    • Using an exact match for an item named "Steel Plate", trigger this if the count of that item is greater than or equal to its set quota
  • LogicOr=ore:stone < quota | ingot:nickel < quota | ingot:silicon < quota | ingot:iron < quota
    • This might control a drill. If Stone or any of the ingots Nickel, Silicon, or Iron fall below their quota, then trigger this
  • LogicAnd=ingot:iron > 5000000
    • If there are more than 5 million Iron Ingots, then trigger this. Great for activating ejection
  • LogicAnd=ingot:iron <= 5000000
    • If there are less than or equal to 5 million Iron Ingots, then trigger this. Great for stopping ejection
  • LogicAnd=Ingot:Iron < Quota / 3 * 2
    • Trigger if Iron Ingot is less than 2/3 of its quota
  • LogicOr=Component:* < Quota / 2 | Ingot:* < Quota / 4
    • Trigger if any component is less than half of its quota or any ingot is less than a quarter of its quota
Script Settings - Switches and Toggles
  • autoKeyCargoContainers=True
    Cargo Containers with empty Custom Data will be tagged for storing all item types
  • autoLoadSettings=True
    Periodically check the settings to see if anything was changed and load them automatically
  • countBlueprints=True
    Count blueprints found in Assemblers
  • countItems=True
    Count items
  • distributeItems=True
    Distribute items; Ice to H2/O2 Gens, Ore to Refineries, Fuel to Reactors, etc
  • doLoadouts=True
    Fill Custom Loadouts and calculate excess items for sorting
  • dynamicQuota=True
    Enables the dynamic quota
  • findModItems=True
    Find mod items and blueprints
  • processLimits=True
    Calculate excess items for sorting according to manually set limits
  • queueAssembly=True
    Queue items for assembly in Assemblers
  • queueDisassembly=True
    Queue items for disassembly in Assemblers
  • removeExcessAssembly=True
    Remove excess items queued for assembly
  • removeExcessDisassembly=True
    Remove excess items queued for disassembly
  • resetIdleAssemblers=True
    Check Assemblers and reset any that stall by removing all queued items and sorting away the contents
  • sortBlueprints=True
    Order blueprints in Assemblers by the most needed items
  • sortCargoPriority=True
    Sort items between storages according to priorities
  • sortItems=True
    Sort items to storage as needed
  • spreadBlueprints=True
    Spread blueprints queued between Assemblers
  • spreadGravelSifters=True
    Spread Gravel between Gravel Sifters
  • spreadGuns=True
    Spread ammo between guns
  • spreadH2/O2Gens=True
    Spread Ice between H2/O2 Gens
  • spreadParachutes=True
    Spread Canvas between Parachutes
  • spreadReactors=True
    Spread Fuel between Reactors
  • spreadRefineries=True
    Spread Ore between Refineries
  • triggerLogic=True
    Trigger Timer logic
  • useConveyorGuns=False
    Enable 'Use Conveyor System' for guns
  • useConveyorH2/O2Gens=False
    Enable 'Use Conveyor System' for H2/O2 Gens
  • useConveyorReactors=False
    Enable 'Use Conveyor System' for Reactors
  • useConveyorRefineries=False
    Enable 'Use Conveyor System' for Refineries
Script Settings - Numbers
Delays are in seconds
  • actionLimiterMultiplier=0.5
    Percent of the actions performed allowed per tick; 0.5 is 50%
  • allowedExcessPercent=0.1
    Percentage of the quota an item can go over before getting disassembled; 0.1 is 10%, with a quota of 100 you can have 110 before they start getting disassembled and return to 100
  • ammoPerGun=10
    Ammo desired in each weapon. Also affects the auto-quota function for ammo
  • balanceRange=0.05
    Percentage used to determine how equal spread inventories must be; 0.05 is 5%, if the average is 100 then balancing is unnecessary between 95-105
  • delayCheckIdleAssemblers=7.5
    How frequently should Assemblers be checked for stalling
  • delayDistributeItems=15
    How frequently should items be distributed
  • delayFillingBottles=20
    How frequently should Oxygen and Hydrogen bottles get filled
  • delayFindModItems=5
    How frequently should mod items and blueprints be scanned for
  • delayLoadouts=15
    How frequently should the loadout function run
  • delayProcessLimits=10
    How frequently should excess over limits be processed
  • delayQueueAssembly=5
    How frequently should items be queued for assembly
  • delayQueueDisassembly=10
    How frequently should items be queued for disassembly
  • delayRemoveExcessAssembly=10
    How frequently should excess items for assembly be removed
  • delayRemoveExcessDisassembly=15
    How frequently should excess items for disassembly be removed
  • delayResetIdleAssembler=15
    How long does an Assembler have to stall to be reset
  • delaySortBlueprints=10
    How frequently should items queued for assembly get sorted
  • delaySortCargoPriority=20
    How frequently should storages sort between each other by priority
  • delaySortItems=10
    How frequently should item be sorted
  • delaySpreadBlueprints=20
    How frequently should queued items be spread between Assemblers
  • delaySpreadItems=15
    How frequently should items be spread
  • delayTimerLogic=10
    How frequently should Timers get triggered by logic
  • dynamicQuotaNegativeThreshold=3
    Affects the frequency of the dynamic quota increasing
  • dynamicQuotaPercentageIncrement=0.05
    The flat percentage added to the dynamic quota multiplier
  • dynamicQuotaPositiveThreshold=9
    Affects the frequency of the dynamic quota returning to normal
  • fuelPerReactor=500
    Fuel amount per Reactor
  • icePerO2/H2Generator=5000
    Ice amount per H2/O2 Gen
  • overheatAverage=0.6
    If the average runtime of the script exceeds this value (in Milliseconds) then the script will stop everything except the basic Echo function until the average drops below this value
  • runTimeLimiter=0.5
    Limit the time the script can run for to this value (in Milliseconds)
  • scanDelay=10
    How frequently should the script scan for new blocks, process data, and clear old blocks
  • outputLimit=15
    Will be phased out with the sprites, this only applies to the "old out" panel I left in the script for debugging
  • updateFrequency=1
    Frequency, in Ticks, that the script should update. Options are: 1, 10, and 100
Script Settings - Text and Tags
  • crossGridControlKeyword=crossGrid
    • Tag for including block groups when using sameGridOnly=True
    • Block groups use syntax 'nds crossGridControlKeyword*' e.g. 'NDS CrossGrid Cargo'
  • exclusionKeyword=exclude
    • Tag for excluding block groups
    • Block groups use syntax 'nds exclusionKeyword*' e.g. 'NDS Exclude Drills'
  • globalFilterKeyword=
    • Global name filter keyword for filtering all blocks by a specified tag
  • optionHeader=
    • Option header for using multiple scripts together. Each script will read and write settings from the section between this header
  • panelKeyword=[nds]
    • Panel tag for filtering panels
  • itemAmmoKeyword=ammo
    • Default category for item type Ammo
  • itemComponentKeyword=component
    • Default category for item type Component
  • itemIngotKeyword=ingot
    • Default category for item type Ingot
  • itemOreKeyword=ore
    • Default category for item type Ore
  • itemToolKeyword=tool
    • Default category for item type Tool
  • excludedDefinitions=[DefinitionSubtype|DefinitionSubtype]
    • Excludes blocks by definition
  • gravelSifterKeys=[DefinitionSubtype|DefinitionSubtype]
    • Specify gravel sifters by definition
  • numberSuffixes=[K|M|B|T]
    • Choose suffixes when shortening numbers by the thousands. You can add more if trillion is not enough for you
Filtering by Block and Grid
Blocks and grids can be whitelisted or blacklisted with block Options, block groups, and/or a name tag
They can be combined in any way you can think of
Each keyword is a changeable setting in the script Custom Data. See Script Settings - Text and Tags

Whitelist
Enabling the script setting sameGridOnly activates the grid whitelist
  • By default, it will include the grid with the programmable block running the script
sameGridOnly=True

Whitelisting Grids
Whitelisting another grid is done by placing the include grid tag into the Options of any block the script could control on the target grid
Options=IncludeGrid
  • Just one block will do e.g. a Connector

Whitelisting Blocks
Whitelisting a block is done by placing the cross grid tag into the Options of the desired block
Options=CrossGrid

Whitelisting Groups
Whitelisting groups is done by placing the target block(s) in any group using the following syntax
nds {cross-grid control keyword}* e.g. NDS CrossGrid Drone Containers e.g. nds crossgrid assemblers

Global Tag Whitelist & Blacklist
Using the global-filter keyword makes it so the script will only control blocks containing the keyword in the name of the block
  • Leaving it blank disables it (default behavior)
globalFilterKeyword=[nds] e.g. Cargo Container [NDS] e.g. Missile Turret [nds]

Blacklist
Blacklisting is absolute; whitelisting cannot be used to allow access to a blacklisted block

Blacklisting Block Types
Blocks whose SubType is added to the excluded definitions list will be blacklisted
  • This filter activates early preventing Custom Data from being read/written to during the scan
See Script Settings - Text and Tags
The block definition subtype can be found in the automatically generated Custom Data for each block on the bottom line after the last /forward slash
//Definition=MyObjectBuilder_CargoContainer/LargeBlockSmallContainer excludedDefinitions=[LargeBlockSmallContainer]

Blacklisting Grids
Blacklisting another grid is done by placing the exclude grid tag into the Options of any block the script could control on the target grid
Options=ExcludeGrid
  • Just one block will do e.g. a Connector

Blacklisting Blocks
Blacklisting a block is done by placing the exclusion tag into the Options of the desired block
Options=Exclude

Blacklisting Groups
Blacklisting groups is done by placing the target block(s) in any group using the following syntax
nds {exclusion tag}* e.g. NDS Exclude Station Containers e.g. nds exclude drills
Block Group Cloning
Cloning is a powerful feature for grouping similar blocks
  • Cloned blocks reference the original block's manual and automatic settings
    • Changing the original's settings instantly changes all clones' settings
    • Clones are skipped when processing automatic settings
  • Recommended uses
    • Duplicating a manual Loadout between Assemblers and Guns
      • Saves you the trouble of copying & pasting the settings between blocks
      • Accelerates script scanning by skipping processing clone settings
    • Duplicating the automatic Limit between Refineries
      • Accelerates spreading Refineries by skipping processing clone automatic Limits
    • Duplicating settings for mod blocks with specific needs

    Cloning is done by adding all cloned blocks, including the original, to a group and entering the exact name of the group into the Clone Group in the original block's Custom Data
    Group Assemblers into group 'Assemblers' Clone Group=Assemblers

    Warning: Cloning different type blocks will have unexpected results
87 Comments
ilsa 29 Apr @ 10:56am 
Is there an option to display multiple columns of data on a single LCD? For example, a compact item list?
nicknds  [author] 3 Dec, 2024 @ 2:38am 
I fixed the script overwriting the Custom Data of Programmable Blocks. The script should work alongside other scripts so I rushed that fix out

I added a no-tag keyword for preventing blocks from having their Custom Data auto-generated
Put '[notag]' in the name of the block and the script will never generate Custom Data for it
Its a better solution than turning off auto-generation or excluding the block altogether

No-tag blocks can still read settings if you type them in manually
Aexoyir 2 Dec, 2024 @ 5:53pm 
It is not affecting LCDs. It is affecting some mod blocks like the Nanite Build and Repair station.
nicknds  [author] 2 Dec, 2024 @ 4:33pm 
That's a problem. Must have been caused by removing the limits for panels...

I will be home in 6 hours.
Aexoyir 2 Dec, 2024 @ 2:47pm 
@nicknds
I'm having an issue where Programmable Blocks are having their Custom Data overwritten. This is not the block that has the Script running on it. This includes PBs on connected grids. Tested in creative world with no mods.
Thanks for all the great work!
Aexoyir
nicknds  [author] 1 Dec, 2024 @ 8:34am 
Patched bug in the Loadout function that caused Loadouts to fail to refill partially fulfilled item requests

Testing missed the bug since Loadouts were filling from 0% -> 100% as expected
Aexoyir 29 Nov, 2024 @ 2:20pm 
@nicknds
Tested in new creative with no mods and everything works as expected. Must be a mod conflict somewhere. Testing.

Thanks,
Aexoyir
nicknds  [author] 29 Nov, 2024 @ 4:31am 
@Aexoyir

It should be like 3 minutes max with a 90 second delay and an average size base
The default priority is 1

Do the containers on the production grid have loadouts? Cargo priority sorting will not remove items from storages that have those items in a loadout

Are the containers on the welder ship at 98.5% capacity? Cargo priority sorting stops filling containers at 98.5%

The intended usage is Quotas for buffering, Loadouts for fulfilling item requests, Cargo Priority Sorting for keeping storage consolidated or transferring bases
Loadouts were originally created to fill welder ships
Loadout=100:component:*|1000:component:steel plate

Your application should work the way you want it to though. Just not sure why it isn't
Aexoyir 29 Nov, 2024 @ 2:39am 
@nicknds
It's been several hours. On a container with blank Options and no Storage tag ( just the default text ) what is it's effective priority? I guessed 0, is that correct?

The ship's welder is set with a Loadout, which gets fulfilled and a Cargo Container set with;
Automatic=True
Options=Storage
Storage=Component
Priority=10
If I put items in this container they do not get removed but it does not get filled either. Am I missing something? Is that the intended usage or should I be using Loadout? I thought this would produce the Loadout minimums ( which exceeds system quotas ( and it does )) and then move any excess Components ( IE from a Grinding Station ) to the Cargo Container. Is that what should be happening or am I misunderstanding?

Thanks,
Aexoyir
nicknds  [author] 28 Nov, 2024 @ 10:09pm 
@Aexoyir
I confirmed the cargo priority sorting is working on the current version

The default delay is 90 seconds
Numbers - 1/4 Delays
...
delaySortCargoPriority=90

Process-intensive functions like scanning and sorting cargo by priority have a delay after each run to allow more important functions to run more often

All of the delays can be adjusted so you can set important functions to run more often
Frequent docking, lower scan delay (delayScan=5)
Frequent unloading, lower sort delay (delaySortItems=5)
Frequent loadout filling, lower loadout delay (delayLoadouts=5)
Frequent cargo transfers, lower sort cargo priority delay (delaySortCargoPriority=10)