Space Engineers

Space Engineers

Blueprint Component Requirements
the-phil  [developer] 4 Mar, 2016 @ 3:26am
"Block Name" is not in the dictionary, this block will not be calculated
Part of this fork is being able to ignore blocks that weren't added to the programs dictionary!
At the time of this writing there are many blocks that aren't in the dictionary or the component list is wrong!

The formatting in the code looks something like this
{"Small Hydrogen Thruster", new Dictionary<string, int> {{"SteelPlate", 25}, {"Construction", 60}, {"LargeTube", 8}, {"MetalGrid",40}}},

If you can write that, or even reply to this post about objects you've found or want added please do it here!

Known Blocks to be added or in the works: (o in next version, - to do)
None yet! :)


Added 2016030309
Large Blocks Dictionary
o Small Hydrogen Thruster Fixed
o Large Hydrogen Thruster Added
o Hydrogen Tank Added
o Small Atmospheric Thruster Added
o Large Atmospheric Thruster Added
o Light Armor Corner 2x1x1 Tip
o Light Armor Corner 2x1x1 Base
o Light Armor Slope 2x1x1 Base
o Light Armor Block
o Light Armor Corner
o Light Armor Slope

Small Blocks Dictionary
o Small Curved Conveyor Tube
o Small Atmospheric Thruster
o Large Atmospheric Thruster
o Small Hydrogen Thruster
o Large Hydrogen Thruster
o Hydrogen Tank Small
o Gatling Turret
o Air Vent
o Light Armor Corner 2x1x1 Tip
o Light Armor Corner 2x1x1 Base
o Light Armor Slope 2x1x1 Base
o Light Armor Block
o Light Armor Corner
o Light Armor Slope

Fixed 2016040401
Large Blocks Dictionary
o Large Ion Thrusters
o Small Ion Thrusters
Small Blocks Dictionary
o Large Ion Thrusters
o Small Ion Thrusters
Last edited by the-phil; 4 Apr, 2016 @ 10:08pm
< >
Showing 1-8 of 8 comments
Arbiter1223 12 Dec, 2019 @ 2:46pm 
In response to my comment on the workshop item, I am compiling a list of missing vanilla blocks and incorrect component lists and will submit a link to it here when I am done.

First on the agenda is adding the missing vanilla blocks. At the time of writing, I have already identified the missing blocks (55 Large grid, 23 Small grid) and have even gotten the raw component data for each of them. Just need to put it into the correct format, add it to the script, and test it out.

Second on the agenda will be verifying the component lists are correct for blocks in the library. Will get to that once I've added the missing blocks to the dictionary.
Arbiter1223 12 Dec, 2019 @ 3:14pm 
Also in addendum to my previous posts, I've noticed that things like the Rotor Heads, Piston Top Part, etc. are included in the component list for their respective parent part. However, when loading a blueprint with those parts in them, it still gives an error message saying that the heads and tops don't exist in the dictionary explicitly. Therefore, I'm going to go ahead and include the component lists for the heads and tops as well to try to avoid that error from displaying.
Arbiter1223 12 Dec, 2019 @ 4:10pm 
Alright, I've got good news and bad news. The good news is that I've finished formatting the additions to the dictionary and have added them to the script (with the exception of the Safe Zone at the moment; it includes a new component that I should be able to add to the script once I've taken a closer look at the rest of it). The bad news is that this increases the total character count to over 100,000, which means the game won't accept it. I'll need to cut it down somehow before I can continue.

I can remove some of the whitespace in the dictionary entries as well as remove any deprecated lines (Arc Furnace, Oxygen Generator, etc). Also, since the names of the components appear to be used purely for string purposes, I might be able to cut down on the character count significantly by using a shorthand method I used for manually writing down component lists before I found this script. The shorthand would make changes that would look like:

"plt" - SteelPlate
"cpu" - Computer
"dis" - Display
"int" - InteriorPlate (since these are string literals this shouldn't be mistaken as an integer datatype (I hope))
"lg" - LargeTubes ("lg" for "large")
"sml" - SmallTubes ("sml" for "small")
etc...

I'll do what I can do lower the character count without affecting the functionality of the script if at all possible (might have to add something to change back to proper names when it's writing to the LCD, but that's the only core change I can think of at this moment). If I can get it below 100,000, I'll start testing the component counts of all the blocks and see if there are any adjustments needed. I'll send another reply if anything major happens, and if everything checks out in the end, I'll share a link to the raw paste data of the script. I'll keep you posted.
Arbiter1223 13 Dec, 2019 @ 8:57am 
Update: I've made the adjustments to the whitespace, cleaned up the code a little bit, and also implemented the shorthand notation for the component dictionaries. In doing so, I've reduced the character count from 108,000 to 88,000, which should leave PLENTY of space for users to add component lists from mods and such.

At the top of the script where it sets the component volumes, I've made comments next to each component saying what its shorthand means. I've also made sure the output to the LCD AND the echo to the Programmable Block both have the actual component names, so there shouldn't be any noticeable changes to the output.

I should point out that in modifying the whitespace, I ended up replacing the four-space indentation with tab indentation. While this doesn't look good in the editor for the programmable block, you can copy and paste the script from the PB editor into a regular text editor (I'm using Notepad++ for this btw), and the indentation should be displayed correctly there. Just copy and paste the code back into the PB editor when you're done adding your component lists, and you should be good to go.

With that being said, all the vanilla blocks (minus the Safe Zone, which I will get to after this) are being registered with the script. The second phase of testing I'm going to do will be to validate the component lists for the blocks and adjust the lists if needed.
Arbiter1223 14 Dec, 2019 @ 11:24am 
Alright, I've got the script updated! Script should now recognize pretty much all vanilla blocks for game version 1.193.022, both large grid and small grid (with the exception of the armor blocks and interior walls; KEEN, PLEASE FIX!!).

You can view/download the updated script here[drive.google.com]. Just copy the script contents and paste it into the Programmable Block you're going to use to calculate the component requirements. (Note: the indentation in the PB will not look correct as it doesn't render tabs like it should; this shouldn't affect the performance of the script, though.) There shouldn't be any changes in the core of the script, so you should be able to use it like you have previously. :)

The format for adding blocks DID change slightly, however. When adding the missing blocks to the dictionaries, the script went over the 100,000 character limit that the game has. So in order to save space, I switched the naming convention of the components to a shorthand variant. If you're wanting to add your own blocks into the script, please refer to the comments next to the components in the Component Volume list near the top of the script. The shorthand notation is what you want to use when specifying the names of components when adding blocks to the dictionary. It (hopefully) shouldn't be too hard to figure out, though. And don't worry, I made sure the Programmable Block and the LCD screen still output the full component names, so this is only relevant if you want to add new/modded blocks to be calculated in the script.

A changelog of everything I changed from the original script can also be found here[drive.google.com]. I made this for @the-phil so he'd know exactly what I did if he chooses to push the updates I made to the workshop script. I also saved a backup of the original script as a failsafe if anything needs to be reverted.

Everyone is free to use the updated script (unless the-phil wants me to take it down for some reason D: ). If there are still any problems with the script for vanilla blocks, let me know, and I'll link the fixed script here. Have a nice day! :)
Last edited by Arbiter1223; 14 Dec, 2019 @ 11:26am
the-phil  [developer] 14 Dec, 2019 @ 11:49am 
@Arbiter1223 awesome stuff, I'll take a look at it later this week and see if I can remember how to update the workshop script! I want to say the naming convention was to match the sbc files XML data.
Arbiter1223 14 Dec, 2019 @ 11:56am 
@the-phil good to hear from you!

If you need to convert the shorthand to the component names the game uses or vice-versa, I included a couple of functions in the script that allow you to do that ("ShortToLongNotation(string)" and "LongToShortNotation(string)" respectively) If you have any other concerns or questions, feel free to let me know. :).
Arbiter1223 20 Dec, 2019 @ 10:09pm 
I think Keen just pushed an update (1.193.101) that added some more blocks to the game... specifically, small grid Windows, a new large grid Control Seat, more blocks in the Deco 2 DLC pack, etc. Once I get some time, I'll take a closer look at this and add the new vanilla blocks to the script dictionaries.
< >
Showing 1-8 of 8 comments
Per page: 1530 50