Space Engineers

Space Engineers

140 人が評価
Logic Block Card Reader
2
2
   
アワード
お気に入り
お気に入り
お気に入りから削除
Type: Mod
Mod category: Block
ファイルサイズ
投稿日
更新日
2.098 MB
2020年12月15日 15時44分
2021年1月7日 19時04分
10 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Logic Block Card Reader

Brisket 作成の 2 件のコレクション
Grenville Games Server Collection
61 アイテム
Grenville Games Ocean World
33 アイテム
解説
This mod adds a Logic Block with some basic scripting functionality to the game, with an LCD SCreen

Place this on a grid you plan on using for an event, or a spawner. You can use a simple in-game script to determine what the card reader does, and with what item to do it with!
By default, any item that is successfully used, is destroyed upon use.

For example: You have a ground installation, and a front door. If the players can find a Security Card somewhere in the world (they aren't craftable by default), they could insert the card and automatically open up doors you designate.

A Higher Level Security card might open ALL doors, and possibly even disable turrets for a preset amount of time.

Included in this mod is a Card Reader, a Card Model, and preset Cards you can use out of the box. Their subtypes are in Brackets:

Blank (BlankKeycard)
Sliced(SlicedKeycard)
T1 (KeycardT1)
T2 (KeycardT2)
T3 (KeycardT3)
T4 (KeycardT4)
Note: ANY item can be accepted, so if you want to allow someone to jam a small pipe into it to cause an assembler to stop working, you can! Just put in the subtype ID of the component.

All have icons, and the card reader can only be built by an admin.


To use the logic, you add it to the "Custom Data" field of the Card Reader, and then Enable/Disable the block (no need to reload anymore)

In a nutshell, the logic is as follows:
Component: Action Variables (1 or many) SEMICOLON;
<ComponentSubtypeId>(Optional:+), <actionType>|<variable1>|<variable(n)>;

To have a card open a single door named "Front Door", and you wanted it to use the T1 keycard that would be destroyed on use, you would:

KeycardT1,open|Front Door;

When the user puts in the keycard, the door will open.

If you DON'T want the Keycard to be destroyed on use, you would add a + to it, like so:
KeycardT1+,open|Front Door;

Say the user has a sliced keycard...you could set up a timer block that turns on a trap after 5 seconds, so you would do:

SlicedKeycard,open|Front Door,runTimer|TimerBlock1;

As you can see, you can have multiple actions on the same line if you want one card to do the same thing.
You could have ALSO done it like so:

SlicedKeycard,open|Front Door;
SlicedKeycard,runTimer|TimerBlock1;

Both would result in the same outcome. It runs all commands at the same time, so order doesn't matter.
If a variable is optional, leave it out. If

Actions Variables Effect

open Door Name Opens a door
runTimer Timer Name|OffsetInSeconds Runs a timer, optional offset in Seconds
runNow Timer Name Run the timer now
disableGroup groupname Disables all functional blocks in a group
enableGroup groupname Enables all functional blocks in a group
SpawnBlackSpider No other variables. Just...spawn a spider that'll attack people

MES Spawner is a bit more complicated:
MESSpawnPrefab GPSOffset|TypeOfPrefab|PrefabGroup(n)...

GPS Offset is in the format {X:0~Y:0~Z:0}. Tidles between EACH XYZ variable. Don't forget to enclose it in Curly Braces {}.
TypeOfPrefab must be filled out correctly:
PrefabGroup is the encounter you want it to spawn.

PCS for Planetary Cargo Ships
PI for Planetary Installations
SCS for Space Cargo Ships
BE for Boss Encounters
RE for Random Encounters.

Note: You *can* attempt to spawn multiple spawn groups IF they are of the same TypeofPrefab, by adding them to the end of the command like so:

MESSpawnPrefab,{X:0~Y:0~Z:150}PI|BaseEncounter|BaseEncounter2|BaseEncounter3|BaseEncounter(n)....;

MES will then randomly pick one of the encounters you entered. If you try to enter a group that is not the correct type, nothing bad will happen it just most likely won't appear.

MES still does it's spawn checks, and if no valid area is not found, or can't spawn a grid due to settings, it won't appear.

If something is not spawning properly, first ensure MES is not failing to do the spawn by checking the log files, located on the MES Wiki.



Update Dec 22 @23:20


Come join me and other amazing mod authors on Discord:

https://discord.gg/G4Qjtfkc7B

That's usually the best place to ask questions about this mod, or submit a bug report!

If you wish to make your OWN model for the card reader, or add new 'card' types, go ahead! It just needs to be a cargo container, and have the subtype CardReader *somewhere* in its name.


You may not, however, reupload this mod without my permission (just ask first, I'm usually OK with it!)


If you're interested in supporting my work, I would ask for donations to: https://www.hospicecareottawa.ca/

56 件のコメント
GodShake 2024年9月6日 7時01分 
the card reader model is bugged and i cant place it. does the mod works rn?
YOSHI-SAN 2022年7月6日 18時10分 
It doesn't work with Dedicated servers either the mod fails to download and closes the serve console, would love to see this working in dedi so i can split up my security :)
High Templar of Allium Cepa 2021年10月8日 17時09分 
I tested the Card Reader in an empty world without any other mods and it works! So now I have to figure out which mod is preventing it from working.
High Templar of Allium Cepa 2021年10月8日 0時46分 
I'm testing it in creative mode and it doesn't take anything, no matter what subtype I use.
Also, I don't see the default card in the G menu and can only see and spawn the Blank and Sliced one using Shift F10. But no matter what it doesn't take those. (BlankCard or Sliced Card used in the Custom Data field. Sad. I was hopeful I could provide services on my station with that.
Makuta Nazo 2021年6月21日 17時15分 
Trying to take the link, but Discord is being a pain...

The inventory size for the card reader is 31,000L So I don't think that is exactly the issue... Though on the other hand that is nearly 15 times more than a freight cargo container so maybe it is?

I'm thinking it's a mod conflict, since our server is extremely large and has an ever growing mod list. Otherwise, my poking around isn't getting a lot of results.
Brisket  [作成者] 2021年6月21日 16時34分 
That's odd. If you drop a single item in, it doesn't disappear right away, but rather, just doesn't accept it?
Might be inventory size.

If you want, you can hop on the discord above and shoot me a message, I can take a peak at the script, maybe something there.
Makuta Nazo 2021年6月19日 22時02分 
Hey, I know it's been awhile since there has been activity here. I've been trying to get this mod implemented on our dedicated server, and I've run into a weird issue I'm not seeing in the comments below.

The inventory space for the card readers are not taking any of the items I put into them, regardless of amount/type etc. I can interact with all other forms of inventories just fine, but the card reader is acting similar to how a weapon rack would if you were trying to put ore or metal into it.

Obviously hard to test if they work if they wont take the key cards, lol. Is this a known issue?
Brisket  [作成者] 2021年2月15日 9時10分 
このコメントは弊社の自動コンテンツチェックシステムによる分析待ちです。有害なコンテンツ(情報を盗もうとするWebサイトへのリンクなど)が含まれていないことが確認されるまで、一時的に非表示になっています。
Exmortis 2021年2月14日 19時37分 
@cKerensky

I am hoping to have it so when players approach a ground based facility, it spawns in Creatures and Drones using the MES spawning.

So my hope is that the Sensor detects the players approach, and triggers the Logic Block to run the MES Spawn.
Brisket  [作成者] 2021年2月14日 17時32分 
@exmortis visuals are fine to me. It supports MES spawning, what would you like the sensor to do?