Space Engineers

Space Engineers

IQueue Production, Resource and Inventory Manager
 This topic has been pinned, so it's probably important
jTurp  [developer] 25 Feb, 2020 @ 12:52pm
Using the script with Modded Items
The script does support modded items! You'll need to follow these steps to get it working:

  1. Add the proper information to the "Modded Items" section of the PB Custom Data
    • There are detailed instructions as to how everything goes together in the PB Custom Data, just above the aforementioned section name
    • This entails knowing the items MyDefinitionId.SubtypeId, BlueprintId.SubtypeId, and the resources needed to create the item. All of these can be found in the SBC files of the mod.
    • If you get one of the blueprint id wrong, it will throw an error when trying to queue it up in an assembler, so be sure you type everything EXACTLY as found in the SBC file (mything != MyThInG)
  2. Recompile the script so it can be read in and added to the internal dictionary
  3. Once the script takes the info, it will automatically add it as a line item to the "Inventory Management" section, at which point you can give it whatever tag you want
    • If you already have the item listed there, it won't overwrite the tag you've already given
Last edited by jTurp; 25 Feb, 2020 @ 12:53pm
< >
Showing 1-15 of 29 comments
xomm 16 Mar, 2021 @ 5:01pm 
Do you have an example of a modded item line next to the blueprint definition in the .sbc file? I see the example in the custom data, but I don't think I'm getting it right.
For example I added this line:

C30Ammo=C30Ammo, AmmoMagazine, 30mm Standard Ammo, 1000: iron = 50, nickel = 8, magnesium = 6

Based on this entry in NorthWind Weapons Data/ammoBPs.sbc:

<Blueprint> <Id> <TypeId>BlueprintDefinition</TypeId> <SubtypeId>C30Ammo</SubtypeId> </Id> <DisplayName>30mm Standard Ammo</DisplayName> <Icon>Textures\icons\30mmAmmoCan.png</Icon> <Prerequisites> <Item Amount="50" TypeId="Ingot" SubtypeId="Iron" /> <Item Amount="8" TypeId="Ingot" SubtypeId="Nickel" /> <Item Amount="6" TypeId="Ingot" SubtypeId="Magnesium" /> </Prerequisites> <Result Amount="1" TypeId="AmmoMagazine" SubtypeId="C30Ammo" /> <BaseProductionTimeInSeconds>5</BaseProductionTimeInSeconds> </Blueprint>

I hit recompile and run, and it removes some spaces around the =, but it doesn't add it to the inventory management section, and it doesn't show up on the LCD or assembler queue.

Thanks in advance.
jTurp  [developer] 16 Mar, 2021 @ 5:58pm 
@xomm

I’ll take a look at this when I get home tomorrow and get you fixed up
jTurp  [developer] 17 Mar, 2021 @ 2:34pm 
@xomm

Use "AMMO" instead of "AmmoMagazine"

Sorry for the confusion - I know it says to get the type from the SBC, but it's my internal type that needs to be on the line (Component, Ammo, Tool, HydrogenGas, OxygenGas).

C30Ammo=C30Ammo, Ammo, 30mm Standard Ammo, 1000: iron=50, nickel=8, magnesium=6
Last edited by jTurp; 17 Mar, 2021 @ 2:34pm
xomm 17 Mar, 2021 @ 10:26pm 
Nice, thanks. Works like a charm now.
xomm 19 Mar, 2021 @ 9:16pm 
One more thing, what's the difference between definition ID and blueprint ID? I tried this line and it ends up infinitely producing flare boxes, I'm guessing the inventory manager part is incorrect.


[Inventory Management] PGI_SmallFlareBox_Blueprint=Ammo

[Modded Items] PGI_SmallFlareBox_Blueprint=PGI_SmallFlareBox_Blueprint, AMMO, Small Flare Box, 250: IRON = 20, MAGNESIUM = 10, SILICON = 2

Paragon Industries - Countermeasures Data/Blueprints_Flares.sbc:

<Blueprint> <Id> <TypeId>BlueprintDefinition</TypeId> <SubtypeId>PGI_SmallFlareBox_Blueprint</SubtypeId> </Id> <DisplayName>Small Flare Box</DisplayName> <Icon>Textures\GUI\Icons\component\BatteryComponent.dds</Icon> <Prerequisites> <Item Amount="20" TypeId="Ingot" SubtypeId="Iron" /> <Item Amount="10" TypeId="Ingot" SubtypeId="Magnesium" /> <Item Amount="2" TypeId="Ingot" SubtypeId="Silicon" /> </Prerequisites> <Result Amount="1" TypeId="AmmoMagazine" SubtypeId="PGI_SmallFlareBox" /> <BaseProductionTimeInSeconds>2</BaseProductionTimeInSeconds> </Blueprint>
jTurp  [developer] 19 Mar, 2021 @ 10:14pm 
@xomm

The blueprint id is what the assembler uses, whereas the definition id is what the actual item is to the game. For example, in your blueprint xml there, the Blueprint SubtypeId is "PGI_SmallFlareBox_Blueprint" and the Definition SubtypeId is "PGI_SmallFlareBox" (which is found on the "Result" line)
Last edited by jTurp; 19 Mar, 2021 @ 10:15pm
xomm 20 Mar, 2021 @ 5:24pm 
That fixed it, thanks again.
Pops 16 May, 2021 @ 7:03am 
@JTurp do the new character weapons and ammo need to be added to the script like this? After the update the script broke for me. I added all of the mod items like you describe above, but it is still throwing an exception.
jTurp  [developer] 16 May, 2021 @ 7:45am 
Originally posted by Pops:
@JTurp do the new character weapons and ammo need to be added to the script like this? After the update the script broke for me. I added all of the mod items like you describe above, but it is still throwing an exception.

Probably. I’ll take a look sometime today. Thanks for the heads up
jTurp  [developer] 16 May, 2021 @ 4:54pm 
@Pops

I'm not getting any errors on my end. Can you paste in the exception info? Or upload your world so I can run tests?

I'll get the new ammos added to the script, though.
Pops 17 May, 2021 @ 3:55pm 
Id love to, but the window won't let me copy or select. Is there a place that I can do this?

The error is Object reference not set to an instance of an object.

I am fairly sure it is due to the new weapons. I see you added the ammo, but don't the guns need added as well?
jTurp  [developer] 17 May, 2021 @ 4:09pm 
Oh I forgot the pistols lol the launchers and rifles are there. I’ll add the pistols when I get a chance
jTurp  [developer] 17 May, 2021 @ 4:11pm 
You can upload your custom data config and I’ll try using that - might be something you’re missing as I couldn’t get it to error out for me
Pops 17 May, 2021 @ 6:24pm 
; Welcome to the IQueue Production and Resource Manager by JTurp!
; Scroll passed the Settings section and you'll find the item lists.
;
[Settings]
;
; REQUIRED! Set your world's 'Assembler Efficiency' as found in
; the Advanced World Settings).
; NOTES: The game defaults to 3. 'Realistic' = 1
;
Assembler Efficiency Multiplier=3
;
; There are three ways IQueue can grab blocks, pick -ONE-
;
; OPTION 1: Place -ALL- blocks (inventories, refineries,
; assemblers, and LCDs) you want this script to use in this group.
;
Inventory Group Name=Production Group
;
; OPTION 2: Set 'Use This Grid' to TRUE, and the script will
; use all appropriate blocks on the same grid as the PB.
; NOTE: This includes blocks on grids connected by rotor/piston.
;
; OPTION 3: Set 'Use This Grid' to FALSE, and the script will
; use all appropriate blocks from everywhere.
;
Use This Grid=false
;
; If using option 2 or 3, you MUST specify a tag so the script
; knows which LCDs to grab.
;
LCD Tag=[IQueue]
;
; If you want the display to stretch across 2 LCDs, set this delimeter.
; The script will append the delimeter to the LCD Tag, above, creating
; a Multi-Display Tag that must be added to the NAME or CUSTOM
; DATA of the lcds to be used.
; Format:
; <LCD Tag><Delimeter><Set Identifier><Position Identifier>
; Example:
; Upper LCD: [IQueue]:A1
; Lower LCD: [IQueue]:A2
;
; NOTE: Set Identifier must be a single character, and Position
; Identifier must be a '1' or '2'
;
Multi Display Delimeter=:
;
; Set whether or not to display info using Sprites instead of Monospace
; text.
;
Use Sprite Mode=true
;
; Set this to TRUE and the script will automatically resize the
; LCD font to try and fit everything on the screen.
; NOTE: If the fontsize drops below 0.3, the script will revert
; to scrolling text mode.
;
Auto Resize LCDs=true
;
; Set whether or not to show character tools on the inventory output.
;
Show Tools=false
;
; Set whether or not to show the percentage icon legend on the display.
;
Show Legend=true
;
; Set whether or not to show resource counts on the display.
;
Show Resources=true
;
; Set the number of lines the display skips when scrolling.
;
Scroll Line Skip=1
;
; Set whether the script should place assemblers with an empty queue
; into co-op mode.
;
Enable Co-op Mode=true
;
; Set whether the script should automatically disassemble items that
; go over their set quota.
;
Auto Disassemble=true
;
; Set whether the script should sort inventory items into designated
; cargo containers.
; NOTE: See Inventory Management section for details on how this works.
;
Manage Inventory=false
;
; If the script will be managing inventory, any issues that are
; detected will be displayed on an LCD with this tag in its Name
; or Custom Data.
; NOTE: This tag is required regardless of which block fetching option
; you choose
;
Inventory LCD Tag=[IQ Inv]

;
; The script can automatically sort items into designated cargo boxes.
; If you wish it, set Manage Inventory to TRUE and edit the values for
; the items below to be the TAG for the corresponding inventory item
; NOTE: Tags must be placed somewhere in the Custom Name or Custom
; Data of a cargo box - the script doesn't do this for you!
;
[Inventory Management]
Iron=Iron
Nickel=Nickel
Silicon=Silicon
Uranium=Uranium
Platinum=Platinum
Magnesium=Magnesium
Silver=Silver
Cobalt=Cobalt
Gold=Gold
Stone=Stone
IronOre=IronOre
NickelOre=NickelOre
SiliconOre=SiliconOre
UraniumOre=UraniumOre
PlatinumOre=PlatinumOre
MagnesiumOre=MagnesiumOre
SilverOre=SilverOre
CobaltOre=CobaltOre
GoldOre=GoldOre
StoneOre=StoneOre
Ice=Ice
Missile200mm=Missile200mm
NATO_5p56x45mm=NATO_5p56x45mm
NATO_25x184mm=NATO_25x184mm
Datapad=Datapad
BulletproofGlass=BulletproofGlass
Canvas=Canvas
Computer=Computer
Construction=Construction
Detector=Detector
Display=Display
Explosives=Explosives
Girder=Girder
GravityGenerator=GravityGenerator
InteriorPlate=InteriorPlate
LargeTube=LargeTube
Medical=Medical
MetalGrid=MetalGrid
Motor=Motor
PowerCell=PowerCell
RadioCommunication=RadioCommunication
Reactor=Reactor
SmallTube=SmallTube
SolarCell=SolarCell
SteelPlate=SteelPlate
Superconductor=Superconductor
Thrust=Thrust
HydrogenBottle=HydrogenBottle
OxygenBottle=OxygenBottle
AngleGrinderItem=AngleGrinderItem
AngleGrinder2Item=AngleGrinder2Item
AngleGrinder3Item=AngleGrinder3Item
AngleGrinder4Item=AngleGrinder4Item
HandDrillItem=HandDrillItem
HandDrill2Item=HandDrill2Item
HandDrill3Item=HandDrill3Item
HandDrill4Item=HandDrill4Item
AutomaticRifleItem=AutomaticRifleItem
PreciseAutomaticRifleItem=PreciseAutomaticRifleItem
RapidFireAutomaticRifleItem=RapidFireAutomaticRifleItem
UltimateAutomaticRifleItem=UltimateAutomaticRifleItem
WelderItem=WelderItem
Welder2Item=Welder2Item
Welder3Item=Welder3Item
Welder4Item=Welder4Item
ShieldComponentBP=ShieldComponentBP
AdvancedThrustModule=AdvancedThrustModule
LargeHydrogenInjector=LargeHydrogenInjector
AutomaticRifleGun_Mag_20rd=AutomaticRifleGun_Mag_20rd
UltimateAutomaticRifleGun_Mag_30rd=UltimateAutomaticRifleGun_Mag_30rd
RapidFireAutomaticRifleGun_Mag_50rd=RapidFireAutomaticRifleGun_Mag_50rd
PreciseAutomaticRifleGun_Mag_5rd=PreciseAutomaticRifleGun_Mag_5rd
SemiAutoPistolMagazine=SemiAutoPistolMagazine
ElitePistolMagazine=ElitePistolMagazine
FullAutoPistolMagazine=FullAutoPistolMagazine
BasicHandHeldLauncherItem=BasicHandHeldLauncherItem
AdvancedHandHeldLauncherItem=AdvancedHandHeldLauncherItem

; Vanilla items are stored in the following format:
; <DefinitionId> = <BlueprintId>, <ItemType>, <DisplayName>, <Quota>
; You may update the <DisplayName> and <Quota> to your liking.
;
; WARNING: Changing the <DefinitionId>, <BlueprintId>, or <ItemType>
; WILL BREAK THE SCRIPT!
;
[Vanilla Items]
Missile200mm=Missile200mm, AMMO, 200mm Missile, 50
NATO_5p56x45mm=NATO_5p56x45mmMagazine, AMMO, 5.56 x 45mm Ammo, 50
NATO_25x184mm=NATO_25x184mmMagazine, AMMO, 25 x 184mm Ammo, 50
Datapad=Datapad, COMPONENT, Datapad, 0
BulletproofGlass=BulletproofGlass, COMPONENT, Bulletproof Glass, 500
Canvas=Canvas, COMPONENT, Canvas, 150
Computer=ComputerComponent, COMPONENT, Computer Component, 2500
Construction=ConstructionComponent, COMPONENT, Construction Component, 5000
Detector=DetectorComponent, COMPONENT, Detector Component, 500
Display=Display, COMPONENT, Display, 500
Explosives=ExplosivesComponent, COMPONENT, Explosives, 100
Girder=GirderComponent, COMPONENT, Girder, 500
GravityGenerator=GravityGeneratorComponent, COMPONENT, Gravity Generator, 150
InteriorPlate=InteriorPlate, COMPONENT, Interior Plate, 5000
LargeTube=LargeTube, COMPONENT, Large Tube, 5000
Medical=MedicalComponent, COMPONENT, Medical Component, 250
MetalGrid=MetalGrid, COMPONENT, Metal Grid, 500
Motor=MotorComponent, COMPONENT, Motor Component, 2500
PowerCell=PowerCell, COMPONENT, Power Cell, 500
RadioCommunication=RadioCommunicationComponent, COMPONENT, Radio Comms Component, 250
Reactor=ReactorComponent, COMPONENT, Reactor Component, 150
SmallTube=SmallTube, COMPONENT, Small Tube, 5000
SolarCell=SolarCell, COMPONENT, Solar Cell, 500
SteelPlate=SteelPlate, COMPONENT, Steel Plate, 25000
Superconductor=Superconductor, COMPONENT, Superconductor, 100
Thrust=ThrustComponent, COMPONENT, Thruster Component, 1000
HydrogenBottle=HydrogenBottle, HYDROGENGAS, Hydrogen Bottle, 5
OxygenBottle=OxygenBottle, OXYGENGAS, Oxygen Bottle, 5
AngleGrinderItem=AngleGrinder, TOOL, Grinder, 0
AngleGrinder2Item=AngleGrinder2, TOOL, Enhanced Grinder, 0
AngleGrinder3Item=AngleGrinder3, TOOL, Proficient Grinder, 0
AngleGrinder4Item=AngleGrinder4, TOOL, Elite Grinder, 0
HandDrillItem=HandDrill, TOOL, Drill, 0
HandDrill2Item=HandDrill2, TOOL, Enhanced Drill, 0
HandDrill3Item=HandDrill3, TOOL, Proficient Drill, 0
HandDrill4Item=HandDrill4, TOOL, Elite Drill, 0
AutomaticRifleItem=AutomaticRifle, TOOL, Automatic Rifle, 0
PreciseAutomaticRifleItem=PreciseAutomaticRifle, TOOL, Precise Rifle, 0
RapidFireAutomaticRifleItem=RapidFireAutomaticRifle, TOOL, Rapid-Fire Rifle, 0
UltimateAutomaticRifleItem=UltimateAutomaticRifle, TOOL, Elite Rifle, 0
WelderItem=Welder, TOOL, Welder, 0
Welder2Item=Welder2, TOOL, Enhanced Welder, 0
Welder3Item=Welder3, TOOL, Proficient Welder, 0
Welder4Item=Welder4, TOOL, Elite Welder, 0
SemiAutoPistolMagazine=SemiAutoPistolMagazine, AMMO, SemiAutoPistolMagazine, 0
AutomaticRifleGun_Mag_20rd=AutomaticRifleGun_Mag_20rd, AMMO, MR-20 Magazine, 50
UltimateAutomaticRifleGun_Mag_30rd=UltimateAutomaticRifleGun_Mag_30rd, AMMO, MR-30E Magazine, 50
PreciseAutomaticRifleGun_Mag_5rd=PreciseAutomaticRifleGun_Mag_5rd, AMMO, MR-8P Magazine, 50
RapidFireAutomaticRifleGun_Mag_50rd=RapidFireAutomaticRifleGun_Mag_50rd, AMMO, MR-50A Magazine, 50
ElitePistolMagazine=ElitePistolMagazine, AMMO, S-10E Magazine, 50
FullAutoPistolMagazine=FullAutoPistolMagazine, AMMO, S-20A Magazine, 50
BasicHandHeldLauncherItem=BasicHandHeldLauncher, AMMO, Basic Launcher, 1
AdvancedHandHeldLauncherItem=AdvancedHandHeldLauncher, AMMO, Adv Launcher, 1

;
; You may adjust the way resources are displayed by changing
; the values below.
;
[Ingot Display Names]
Iron=Iron
Nickel=Nickel
Silicon=Silicon
Uranium=Uranium
Platinum=Platinum
Magnesium=Magnesium
Silver=Silver
Cobalt=Cobalt
Gold=Gold
Stone=Gravel
Scrap=Scrap
ScrapIngot=Scrap

; You may add values to the dictionary, just ensure you have the
; proper information! Modded items also require the name and number
; of resources (iron, nickel, etc). The format is as follows:
; <DefinitionId> = <BlueprintId>, <ItemType>, <DisplayName>, <Quota>, <Yield>: <Resource1> = <Num1>, <Resource2> = <Num2>
; Example:
; DenseSteelPlate = DenseSteelPlate, Component, Dense Steel Plate, 2000: iron = 400
;
; NOTE: Definition Id, Blueprint Id, Item Type, Item Yield, and Resource
; information can be found in the .sbc files. The Yield value is optional and
; defaults to 1 if missing
;
[Modded Items]
ShieldComponentBP=ShieldComponentBP, COMPONENT, Field Emitter, 200: IRON = 80, SILICON = 20, GOLD = 15, PLATINUM = 8
AdvancedThrustModule=AdvancedThrustModule, COMPONENT, Advanced Thrust Module, 0: IRON = 300, COBALT = 100, SILVER = 100, GOLD = 10, PLATINUM = 4
LargeHydrogenInjector=LargeHydrogenInjector, COMPONENT, Large Hydrogen Injector, 0: IRON = 360, COBALT = 150, SILVER = 40
OKIObserverMAG=OKIObserverMAG, AmmoMagazine, OKI Designator Charges, 200: IRON = 1, SILICON = 1, NICKLE = 100
OKI23mmAmmo=OKI23mmAmmo, AmmoMagazine, OKI 14.5 Ammo Drum, 200: IRON = 40, Magnesium = 3, NICKLE = 5
OKI50mmAmmo=OKI50mmAmmo, AmmoMagazine, OKI 50mm Precision Shells, 200: IRON = 40, Magnesium = 6, NICKLE = 10
OKI122mmAmmo=OKI122mmAmmo, AmmoMagazine, OKI 122mm Assault Shells, 200: IRON = 50, Magnesium = 5, NICKLE = 15, SILICON = 5
OKI180mmHVXammo=OKI180mmHVXammo, AmmoMagazine, OKI 180mm Hyper-X Cannon Shells, 200: IRON = 30, Magnesium = 15, NICKLE = 30, SILICON = 5, URANIUM = 1
OKI75mmHVPammo=OKI75mmHVPammo, AmmoMagazine, OKI 75mm Hyper-P D.U.P. Head Slug, 200: IRON = 30, NICKLE = 45, URANIUM = 5
OKI230mmAmmo=OKI230mmAmmo, AmmoMagazine, OKI 230mm Battlecannon Shell, 200: IRON = 75, NICKLE = 25, URANIUM = 5, MAGNESIUM = 15, SILICON = 10
Pops 17 May, 2021 @ 6:25pm 
;)
< >
Showing 1-15 of 29 comments
Per page: 1530 50