CPU/Computer block for simple logic

Beetle Bug shared this feedback 4 years ago
Submitted

As the title says: logic blocks or computer blocks that have the ability to perform actions or check the status of a certain block. I know this has been suggested a few times before, but I just thought of a solution to make this a possibility even on large grid ships.


Now we have a Programmable Block, which is awesome in and on itself for scripts and performing complex actions using very little space. A lot of people love using it, but there's a part of the community who don't know how to write scripts themselves or simply don't want to copy/paste scripts for whatever reason. Personally, I prefer using visual or physical logic blocks in order to make certain things happen on a ship or station. It's more fun to me than simply writing down a few lines of code. Besides, I barely know how to write scripts anyways!


Now the base of this idea is indeed using physical blocks to make the magic happen, but seeing how large grid ships use 2.5x2.5x2.5 meter wide cubes for everything, this will inevidably take up MUCH more space than it's worth. For this, however, I have a solution: A Mainframe/CPU/Computer block. Now instead of needing one of these for every block you wish to control, this little thing could have a built-in interface. The important difference between a programmable block and this thing would be that this block has an inventory. Or perhaps, 3 rows of seperated inventories for the base block. You'd have to craft each OR, AND, IF etc. as well as EQUAL TO, LESSER THAN, BIGGER THAN etc. as an item, allowing you to simply pop them in that inventory. The way you'd tell the computer which block a statement should be about is by crafting a special item, let's call it RAM for simplicity's sake. This RAM, once popped in, can be used to select a certain block on the grid, as well as specify what part of the block to check (VOLUME, TURNED ON, VISIBLE ON HUD, etc). Additionally, yet another box after this allows you to write down a specific number or set the state of whatever part of the block you selected to true or false. It'll read the rows you pop in there from left-to-right, and each row visible in the computer can be given a name so they can interact with each other and other systems.

Now the interesting part and a way to make programmable blocks still more space-efficient than this block, is that it's possible to upgrade the CPU using new Server blocks. Each Server block could add 5 or so extra rows to the attached CPU block, allowing for more actions to be performed by a single CPU as well as it now taking up more space.


I know this all seems like a lot of complicated information, perhaps I can make it more clear using a simple example in text:


Row name: Example. [IF-item] [RAM-item, selected block, selected part, true/false/numerical value] [THEN-item] [RAM-item, selected block, selected part, true/false/numerical value]

Now if certain conditions are met on the first block, then the CPU will change something about the second block mentioned.


In order to tell the CPU that something needs to be bigger/lesser/equal than something else, you'd do it like this.

Row name: Example 2. [IF-item] [RAM-item: hydrogen tank, volume, - (cpu reads box left empty as current volume)] [LESSER THAN-item] [RAM-item: hydrogen tank, volume, 2000] [THEN-item] [RAM-item, Sound Block, On, true]


I hope my explanations were clear. I'm not very familiar with writing code and trying to explain this made my head hurt a little, so my examples may not make sense at all. I just hope you get the general idea.

Replies (2)

photo
4

I love making scripts for the Programmable Block, but I do agree that there are significant problems with it.


Like a lot of people don't know how to do programming in C#, so the Programmable Block for them is a dead block, unless they find the script they need in the workshop. I think that we should have some logic/task planner block in the game, that everyone can use.


Also, the other major problem with the Programmable Block, is that it's possible to lag a server to eternity with it. It's not the best idea to use them in servers, unless the writer of the script knows how to write efficient scripts. A lot of servers are not even enabling scripts for this very reason.


The block that you are describing is not bad, but the thing that you should craft the logical elements would just make it a hassle.


The Server Block, as an Upgrade Module for this kind of block is a pretty good idea tho! :D

photo
2

I had proposed before some Custom version of Industry standard Programing languajes like Grafect ( Wikipedia article with examples here ) or Logic gate based programs like the Siemens LOGO! uses ( Example here ). They are both higly visual and anyone can start doing stuff winout any knolege at all. Also Siemens software has a build-in help enciclopedia wich allow anyone to learn Withing the IDE how everything works from the most basic functions to a complex examples wich I would REALLY recomend including.

The nice thing about a program running on a IDE is that Keen keps control of what can and canot be done whit the program, this can prevent programs to overload a server or at least make it a lot harder to happen.

Leave a Comment
 
Attach a file