Space Engineers

Space Engineers

Nanobot Build and Repair System Queuing / Display / Scripting
324 Comments
SKO85 Apr 29 @ 1:00pm 
Fixed version of the script for Nanobot Build and Repair:
https://steamcommunity.com/sharedfiles/filedetails/?id=3472701905
SKO85 Apr 29 @ 10:39am 
I will try fix it and upload a maintained version as Dummy08 has not been reacting over several years.
Max Warden Apr 29 @ 10:08am 
o7
Static Apr 29 @ 8:36am 
After 6 Years, they finally broke the script; Hope Summy08 can fix and update it
Keienmahazli Apr 29 @ 7:16am 
Same here to
Celica71 Apr 29 @ 6:59am 
Broken here too...
JoeHan Apr 28 @ 7:42pm 
Same here - script broke with the newest SE Update. Same errors.
Lord Mortangol Apr 28 @ 7:32pm 
The Script broke with the newest SE Update.

Program (1446,169): Error: Cannot implicitly convert type 'System.Collections.Generic.List<VRage.Game.ModAPI.Ingame.IMySli mBlock>' to 'VRage.Scripting. Memory SafeTypes.MemorySafeList<VRage.Game.ModAPI.Ingame.IMySlimBlock>'. An explicit conversion exists (are you missing a cast?)

Program (1478,169): Error: Cannot implicitly convert type 'System.Collections.Generic.List<VRage.Game.ModAPI.Ingame.IMySli mBlock>' to 'VRage.Scripting. Memory SafeTypes.MemorySafeList<VRage.Game.ModAPI.Ingame.IMySlimBlock>'. An explicit conversion exists (are you missing a cast?)

Program (1510,169): Error: Cannot implicitly convert type
'System.Collections.Generic.List<VRage.Game.ModAPI.Ingame.IMyEnt ity>' to
'VRage.Scripting. MemorySafeTypes.MemorySafeList<VRage.Game.ModAPI.Ingame.IMyEntity>'. An explicit conversion exists (are you missing a cast?)
TechCoder Mar 12 @ 11:09am 
@Vorg "a few servers" doesn't mean much when "several hundred" work (the vagueness...)

and the same for "throws exception errors and crashes" - with no DATA to support the claims, there is nothing anyone can do to assist, other than to say IT MUST BE SOMETHING ON THE SERVERS YOU HAVE ISSUE WITH. Most likely they are running Torch and a PB Limiter, etc. (see loads of posts here and Discord - - - - well, it is well known about these script killer issues)
Vorg Feb 23 @ 11:35pm 
Tried this on a few servers and it throws exception errors and crashes. Does que up some stuff right before it crashes.
TechCoder Jan 27 @ 10:52am 
You really don't need to know how many of each item to make - that is what this script does for you.

THE BASICS
Scroll through the code and look for these three lines (if you haven't made any changes to the code, this is likely where your issue is)

BuildAndRepairSystemGroupName = "USETHISNAMEONBARGROUP",
AssemblerGroupName = "USETHISNAMEONASSEMBLERGROUP",
DisplayNames = new [] { "USETHISNAMEONLCD", "Cockpit[0]" },

Use the name in the associated lines (they are not together, but they are the important ones) to make a Group with all the BARs that you want to use in this, another Group for the Assemblers and an LCD for the Display.

That is IT - no need for anything else (unless you have a huge base and/or want to get fancy)

But, you MUST set at least the BAR and Assembler Groups or "the script won't work" (because YOU didn't tell it what it can use!)
wolfcamaro53196 Jan 27 @ 4:35am 
ok maybe im stupid but i need help trying to figure out how to show the queue of how many of each item to make on a LCD cause i just cant seem to get it to work for me
Alcatraz Dec 5, 2024 @ 10:22am 
I can say it works fine. When I got something not seeing in my LCD's, or not queuing it is because of ME. Not grouped, not writed correctly, using strange caracters in the names (I'm Spanish and use to use the accents for every word it has 'em).

1 - Name as simply as you can.
2 - Review all names into the script and make SURE you put them in the right place.

I'm not a programmer at all, and had to spent couple of hours at least figuring out how to make my LCD's not show ALL the vast info, just what I wanted.

(((Sorry, Steam limit to 1000 characters 😢)))
Alcatraz Dec 5, 2024 @ 10:21am 
Leave example here of the first part of the script (names are in Spanish most of them use the Google Translator xD):

static BuildAndRepairSystemQueuingGroup[] BuildAndRepairSystemQueuingGroups = {
new BuildAndRepairSystemQueuingGroup() {
BuildAndRepairSystemGroupName = "BaR System Base Earth",
AssemblerGroupName = "Ensambladores",
Displays = new [] {
new DisplayDefinition {
DisplayNames = new [] { "LCD BaR System 01", "Cockpit[0]" },
DisplayKinds = new [] { DisplayKind.ShortStatus},
DisplayMaxLines = 19,
DisplaySwitchTime = 4
} ,
Alcatraz Dec 5, 2024 @ 10:21am 
new DisplayDefinition {
DisplayNames = new [] { "LCD BaR System 02", "Cockpit[0]" },
DisplayKinds = new [] {DisplayKind.WeldTargets, DisplayKind.MissingItems },
DisplayMaxLines = 19,
DisplaySwitchTime = 4
} ,
new DisplayDefinition {
DisplayNames = new [] { "LCD BaR System 03", "Cockpit[0]" },
DisplayKinds = new [] { DisplayKind.MissingItems },
DisplayMaxLines = 19,
DisplaySwitchTime = 4
}
}
}
};
TechCoder Dec 1, 2024 @ 7:39pm 
"broken and not working" - wow, that is descriptive and helpful to have someone help you (NOT)
and certainly not the experience of those of us that use it all the time.
Amaia Nov 30, 2024 @ 7:51am 
Yaa, this script is currently broken and not working :(
Frogmaster Nov 24, 2024 @ 1:49pm 
Me love you, :) This saves me soooo much time! thank you for creating it.:steamhappy:
TechCoder Nov 15, 2024 @ 10:44am 
@Smackhead Steve - sounds like you don't have scripting allowed in the world.
I did a fast search online and found https://www.youtube.com/watch?v=E_vco_MXSfQ - probably help you get going.
Smackhead Steve Nov 14, 2024 @ 8:34pm 
so i subbed to this so i can have my assemblers auto Q the materials for blueprints, but the script isn't showing up when i go to "edit settings" and "mods" then click the "scripts" area. Also just watched a video tutorial, and on the video tutorial he says "go to the programmable block, and click edit..." but mine just has "customize" no edit, no script, nothing. What am I missing?
Frission Nov 4, 2024 @ 7:21pm 
This compatible with the "Maintained" version of BARS?
TechCoder Sep 19, 2024 @ 2:43pm 
@W1gSplitter & @Dae_break - did you follow step 4? That is really the most important one as it is where you set up YOUR bot and Assembler names/groups. If those aren't your real names, then things won't work (I know that makes sense, but many people miss that important point!)
W1gSplitter Sep 17, 2024 @ 5:10am 
I tried the suggestion below from TechCoder. I am still having an issue. If I enable the script on a base BnR, the block counts the blocks to be produced and BuildInfo lists them as 'to be built'. Nothing is sent to the Assembler, and none of the open blocks go in to the 'to be welded' queue. If I uncheck 'control with script' everhting works fine.
pierce3383 Aug 26, 2024 @ 12:52am 
Bug? Feature? Lets say you're a Noobie with NO DLCs. Some one else has set up a Projector with a Blueprint that uses DLCs and a button anyone can use to turn on/off the Projector. You, the Noobie press the button and it all starts building, then it WILL hang when it gets to a DLC block. You cannot set up a system to print off free vehicles for anyone. You cannot print off a vehicle owned by "Nobody". Faction and DLC rules are enforced at the build level by the Nanobots.
Dae_break Aug 20, 2024 @ 8:52pm 
I cant for the life of me to get it to actually queue things to the industrial assembler
Mercury Jul 26, 2024 @ 11:49pm 
Getting a ton of exception errors in the k menu on server, where as in single player with exact same mods as server it works without complaint.
TechCoder Jul 18, 2024 @ 3:05am 
Just verified that this script it WORKING AS DESIGNED/INTENDED.....

Anyone having issues in the last several days should CHECK OTHER MODS - various ones were broken with a recent SE update, but this one works just like it should.

To verify for yourself:
1. create a new world with ONLY the BaR mod
2. make a small base
3. add the BaR(s) on it
4. add the PB with this script (and set up all the stuff you need for Groups, etc..)
4. stock the base with ore and/or ingots
5. put some blocks for the BaR to build
6. see in the Assemblers that the stuff is queued

Once you verify that this works, then add your other mods one by one until you find the one that causes this script to give you errors.
Toby Jul 7, 2024 @ 1:22pm 
Anyone got a fix for the assembler not queuing items needed
General Madman Jun 11, 2024 @ 8:44am 
Can someone point me to guide for set up the display screen please
Coeptis87 May 5, 2024 @ 9:26pm 
im getting a bunch of errors in the PB lol

"Caught exception during execution of script:Invalid property at Sandbox.MODAPI.Interfaces.TerminPropertyExtensions.CastTValue(ITerminalProperty)

and a bunch more for IMyTerminalBlock etc..
Pixel May 2, 2024 @ 2:08pm 
Same with me. The errors started showing up last few days. I hope it gets fixed. This is such a useful script!
Vorg Apr 20, 2024 @ 10:52pm 
I am also getting exception errors. Been told it's broken by SE updates
OwenForce Apr 14, 2024 @ 2:18am 
Is anyone else getting this error in client side log when trying to use this script on a dedicated server?

MOD_CRITICAL_ERROR: Nanobot Build and Repair System Queuing / Display / Scripting
2024-04-13 19:54:43.114 - Thread: 1 -> in file: Unknown
2024-04-13 19:54:43.114 - Thread: 1 -> MOD PARTIALLY SKIPPED, LOADED ONLY 1/6 PHASES, Following Error occured:
Object reference not set to an instance of an object.
Sandbox.Game
at Sandbox.Definitions.MyDefinitionManager.LoadDefinitions(List`1 contexts, List`1 definitionSets, Boolean failOnDebug, Boolean isPreload)
Chrysaloid Feb 16, 2024 @ 2:30am 
Same as previous person - everything works fine.
One issue though: what is the best way to handle expansion of the base? So far I was manually setting up all new B&R blocks and then adding them to the group. It is becoming quite tedious and I'm wondering if there is some simpler method.
Thelios Feb 7, 2024 @ 10:30pm 
Seems like everybody is reporting this as broken, but it works perfectly fine for me.

Maybe there's some obscure mod conflict or it's being set up incorrectly. Either way, I configured it as described in the description and it works flawlessly.
lowww Feb 1, 2024 @ 5:11pm 
I replaced groups by:
BuildAndRepairSystems-[LOASC1]
Assemblers-all-[LOASC1]
I checked that all BuildAndRepairSystems are managed by the script.
After script compilation I could not change colour by middle mouse click anymore.
Application restart. I could change colour by middle mouse click.
I switched the script on. BuildAndRepairSystems stopped work.
I unchecked that all BuildAndRepairSystems are managed by the script. BuildAndRepairSystems started work.
I could not build any new block by left mouse click after that :(
Application restart. I could build a new block by left mouse click.
P.S. Display works in cockpit as expected.
hugums247 Dec 31, 2023 @ 6:31pm 
I have everything set correct (I hope) and they do nothing . Script shows blocks to grind, And bots wont go.
Zicarius Dec 1, 2023 @ 2:57pm 
@Reece i just subscribed now, and go to my Programmable Block, then refresh it. Searches it, Build, then it shows
Reece Dec 1, 2023 @ 10:14am 
Is this mod still working? For some reason, it doesn't show up in my "script" list when going into the Programmable block.

I'm not sure if it's supposed to appear as a "mod" in the mods list when loading the game, but nothing is there either. I've double checked that it's installed, built a new block afterwards to no avail. Any advice please?
TechCoder Nov 28, 2023 @ 11:55am 
@SwampDragon - just don't put Assemblers in the list......
static BuildAndRepairSystemQueuingGroup[] BuildAndRepairSystemQueuingGroups = {}
nothing in the list, can't assemble anything....

not really 'convoluted' - it is pretty standard csharp programming (which, yeah, THAT makes it convoluted, but it isn't the BaR script's fault!)
SwampDragon Nov 28, 2023 @ 1:52am 
Man... All I want is an LCD to display missing items like it does in the control panel. I don't want convoluted scripts taking charge of my entire production line. Can anyone possibly simplify this?
TechCoder Nov 19, 2023 @ 9:57pm 
I've checked my script (which is the same as this with the ability to make PATTERNS for the Bars {link in previous post - scroll down a bit}) on both my local system and the server I play on a lot and the script works fine to load the Assemblers and puts the items on the LCD for welding/grinding/etc. (i.e., "works as advertised").

Too hard to discuss setup/issues on this forum, but if you'd like to go over it, I have a special channel for #nanobot-build-and-repair-script on my Discord and I'm happy to see if I can help https://discord.gg/HWWKkHk5H9
MrFox Nov 12, 2023 @ 11:51pm 
Dead
TheKurgan Oct 31, 2023 @ 7:01pm 
I am guessing nobody has a fix yet?
0ne Oct 31, 2023 @ 5:24pm 
Hi, the script is broken since the 10th anniversary update. I have no clue about how to fix it. Any help please?
Zaseru Oct 27, 2023 @ 7:26pm 
Script worked for me until today after downloading the 10th anniversary update, now it wont add anything to the assembler to be made, or even recognize that it needs items it looks like.
Drysyn Jul 27, 2023 @ 7:44am 
@Doodle, the script works for me, make sure your build and repair systems are in fly mode, and that you have named the groups properly (BuildAndRepairGroup1 and AssemblerGroup1 ) ect.
Doodle Jul 25, 2023 @ 12:44pm 
whenever i use this it glitches out the bar system and a welding thing appears inside them as well as they just dont do anything either and things dont queue up when i group things i copy and paste directly from the programmable block which i repasted the code in multiple times as well
Drysyn Jul 24, 2023 @ 1:58am 
@Jotaro Depending on if you're on a server or not there could be a stop grid after #minutes in play which stops your assemblers working after you leave, either that or your refineries are dumping resources in to them and filling them up to capacity.
Espiritu Jun 24, 2023 @ 7:33pm 
To display on a LCD, and change what it displays: Look at the top of the code:

DisplayNames = new [] { " BnRLCD ", " BnRCockpit " },
DisplayKinds = new [] { DisplayKind.MissingItems },

In this example:
(A) A LCD with the name "BnRLCD " will display the info we see cycling on the programable block.

(B) A cockpit (or any block with more then one display) with the name "BnRCockpit" will mirror the info we see cycling on the programable block on screen 0. (0 is the first screen)

(C) Since I only care about the missing components, I shortened the "Display Kinds" line to contain only "DisplayKind.MissingItems"