Space Engineers

Space Engineers

934 ratings
Control Module - basically key binding for ships
2
3
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
230.681 KB
Mar 30, 2016 @ 6:44am
May 8 @ 9:14pm
39 Change Notes ( view )

Subscribe to download
Control Module - basically key binding for ships

In 1 collection by Digi
Digi's Space Engineers mods
50 items
Description
This mod adds the ability for Timer Blocks and Programmable Blocks to be triggered/ran when the input (key/mouse/gamepad/game control) is pressed and/or released by a player controlling a cockpit/RC/seat in the same grid system.

The system is very flexible and you can make from a one key toggling a light to a really complicated mouse and keyboard coordination controllable by specific seats in the ship.


Vanilla PB can read movement and rotation
IMyShipController has MoveIndicator/RotateIndicator/RollIndicator which are now synchronized in all cases (SE v200), so if you don't need more than those you don't really need this mod.
Also IMyShipToolBase has IsActivated, useful to detect clicks.

How to use
I have a guide with various examples and blueprints to get you guys started.

Please read: http://steamcommunity.com/sharedfiles/filedetails/?id=656456032

But if you want a really quick tutorial then just see the tooltip in the "Quick Introduction" buton in a PB or timer block.


The video is only a presentation, not a tutorial
The video by w4stedspace should be treated as a demonstration of what the mod can do, because the version used in the video is way older than the current one which is configured and coded differently, that's why you shouldn't use it as a tutorial, instead use the text guide I linked above.


Chat commands
  • /cm help
    Shows all inputs (keys, mouse buttons/axes, gamepad butons/axes and game controls).
  • /cm showinput
    Toggles printing in the HUD the inputs you're currently pressing, very useful for quickly finding the name of something specific.
  • /cm updatetype
    Testing command, this changes how the code executes internally, before or after simulation. By default it's set to before simulation and I left it there for people to experiment. Please try it and let me know if input feels laggy with before or after sim.


mod io?
Please read[gist.github.com]
Popular Discussions View All (5)
1
Jun 16 @ 11:43pm
Better explanation
jrepel
7
Sep 17, 2023 @ 5:33am
Reading inputs in a unaccessable ProgBlock through an accessable Cockpit/Remote
Djelle
5
Dec 31, 2019 @ 5:54am
[Mod Suggestion] Building Tool - Construct new grids from afar
Acarii
373 Comments
DragoF1sh Jun 4 @ 11:10pm 
this looks handy - Might use in future scenarios
ManedWolf May 8 @ 11:10pm 
Thanks. My VTOL ships are working again now. Took me some headbutts to the wall as I don`t understand anything about programing.
Digi  [author] May 8 @ 9:16pm 
Ah yes this has Dictionary property, it's fixed but it requires PB scripts to be updated by replacing:

Dictionary<string, object>
to
IReadOnlyDictionary<string, object>

it should be only 2 places, one in the field and one in the As<...> method.

I've also fixed the lack of terminal refresh which apparently I broke back in oct 2023 with an inverted check, ops xD
ManedWolf May 4 @ 10:40pm 
Don't know if it's just me, but it doesn't work anymore sinse the may 2 hotfix.
Swann Mar 17 @ 6:41pm 
This is really the best keybinding solution, thank you Digi. Is there any way you could make this a Plugin so we could use it in multiplayer? There are pure scripts available but they don't have as much flexibility.
Djelle Nov 9, 2024 @ 6:37am 
Ahh. I did get the controls to show by ur little refresh trick... In both fields :steamhappy:

You are right that the problem is in my world. I went into Sandbox_config.sbc and moved ur mod to the top of the list, so it will load first (I assume). And that made the double field problem go away. The weird thing is that if I now move it back to the bottom, it doesn't double up anymore.

Thanks for pointing me in the right direction :cozybethesda:
Digi  [author] Nov 8, 2024 @ 7:47pm 
I don't get the duplicated controls so the only difference now I guess is the world.
Can you send your world?

I do get the issue with controls not adding but that is from a lack of realtime refresh, which is a new game bug in 205 (was reported by other modders that have the same problem on their mods).
You can force a refresh by clicking the block again on the left terminal list.
Djelle Nov 8, 2024 @ 3:19pm 
I did try removing the two other mods I had. No change. It could look like this mod was aded two times. Tho I did not do that.
Digi  [author] Nov 8, 2024 @ 3:00pm 
Did you try it by itself? As it sounds like a problem with another mod or it's simply this mod added multiple times.
Djelle Nov 8, 2024 @ 1:59pm 
Is not working anymore. In the blocks menu, there are two of each field. And you can not add the keys u want to monitor.