Space Engineers

Space Engineers

Not enough ratings
DeMerge - Auto Convert Station to Ship (unsupported)
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
38.216 KB
19 Apr, 2015 @ 12:59pm
26 Sep, 2015 @ 2:46pm
9 Change Notes ( view )

Subscribe to download
DeMerge - Auto Convert Station to Ship (unsupported)

Description
This mod is not supported. Please try the fixed version by Casper1123 instead:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2927777502

-----------

This small script will automatically convert Station grid to Large Ship grid under certain conditions.
Can automatically rename detached grids.

Useful for making custom airtight hangar doors on stations which is not possible other wise.
Can also be used for merge-landing of large ships on stations or other large ships and taking off without need to manually hit "convert to ship" button or renaming the ship back to something meaningful.
Should work with modded Merge blocks as long as they mimic vanilla Merge Block.

Usage:
Add "[AutoConvert]" tag to one of the Merge blocks that are on side that is expected to be converted to ship. Tag is Case Sensitive.
Automatic Renaming:
If there is # anywhere in the name of the merge block then the name of converted grid will be changed to whatever is following the # sign. Auto renaming will also work for grids detached from other Ships, not just stations

Example:
Merge Block 115 [AutoConvert] #My Very Uniq Named Miner Drone

The following conditions are required for the automatic conversion to happen:
1. Owner of the tagged Merge block must be the direct owner of the detached grid.
2. Merge blocks must be turned off all at once OR block that has "[AutoConvert]" tag must be the last to be turned off.
3. One or more of direct neighbors of Merge block must actually detach from the station when tagged Merge block is turned off.
This condition can be turned off by adding bang sign to tag: "[AutoConvert!]".

Alternative tags (if tags with [] don't work for you): {AutoConvert} / {AutoConvert!}


Hint:
For automatic door you would want to control merge blocks through programming block as Blocks Groups can behave strangely on merge.

Demo world:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=428747064

Upd 3:
Updated for new API.

Upd 2:
Rewrote using Events.
Added multiplayer checks.
Added alternative tags.

Upd 1:
Added ability to automatically rename demerged ship.
56 Comments
Casper1123 3 Feb, 2023 @ 7:39am 
I managed to (mostly) fix this mod (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2927777502) and will attempt to keep it up to date as well. :)
Fvracer_x 25 Nov, 2021 @ 4:21pm 
R.I.P.
Scientwist 1 Nov, 2021 @ 10:21am 
@Ritaelyn It's not a script it's a C# mod thats stored in C:\Users\*Username*\AppData\Local\Temp\SpaceEngineers\428599432.sbm_DeMerge\DeMerge.cs

It's got a ton of errors as it's not making calls correctly to IMyCubeGrid and IMyShipMergeBlock, errors say it doesn't exist in Sandbox.ModAPI

If I knew more about C# or.cs file in general I'd fix it and post it but sadly I just don't.
Ritaelyn 5 May, 2021 @ 8:58pm 
I'm subscribed to this script but it's not showing up in game at all. All my other subscribed workshop scripts are showing up.
Dr. Secks 4 Jan, 2021 @ 11:45am 
doesn´t work
LavaSpringer 17 Apr, 2019 @ 4:44am 
However, only the grid whose merge block is deactivated is renamed.
LavaSpringer 17 Apr, 2019 @ 4:42am 
pjaj 16 Apr, 2019 @ 12:01am 
@LavaSpringer any chance I can get a copy of that? Only for my own personal use, of course.
LavaSpringer 4 Jan, 2019 @ 12:31pm 
I probably solved the problem. I can send you the file if you want Dark.
Dark  [author] 3 Jan, 2019 @ 10:49am 
Well, its been two years since I last touched SE....and judging by the error log - the old API is no more - not sure when I will have time to spend on SE and catch up with updates.

Sources should be included inside the mod package if anyone wants to try to fix it, maybe just namespace address needs changing.

Sorry folks :wat_creep: