Space Engineers

Space Engineers

Not enough ratings
Advanced Block Renaming
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Other
Tags: hud
File Size
Posted
Updated
164.829 KB
1 Jul, 2020 @ 5:45am
1 Jul, 2020 @ 7:51am
2 Change Notes ( view )

Subscribe to download
Advanced Block Renaming

Description
Regex Renamer
This mod is a spin-off of Meridius_IX's Easy Block Renaming mod, that similarly adds controls to nearly all block types that allow you to rename multiple blocks at once. Instead of prefixing/suffixing/replacing though, this mod works using Regular Expressions (Regex), which are an incredibly versatile tool for manipulating text.

How to use this mod
Once subscribed, add this mod to your save's mod list. After this is done, most blocks will now have a set of options on at the bottom of their terminal entry.

Enter a Regular Expression (or text) into the "Find" box, and then enter what you would like that selection to be replaced with in the "Replace With" box. Then, simply click replace, and the replacement will be applied to the names of all the blocks you have selected.

This is functionally identical to the Find/Replace tools you can find in word processors such as Notepad++.

Using Regular Expressions
If you want to do a simple swap-out, you can enter the word or string of characters you want to replace into the "Find" box, and the replacement in the "Replace With" Box. For example, if you have a block named "Large Hydrogen Thruster", you can Find "Hydrogen" and Replace "Fuel" and the block will be now named "Large Fuel Thruster".
This is applied to every block selected, so if you select all blocks in the terminal and apply the above replacement, all Hydrogen Tanks will now be called Fuel Tanks etc. and all selected blocks without "Hydrogen" in the name will be unaffected.

Regular expressions provide a toolset for doing much more advanced replacements than the above example. They're too complicated to explain in this description, but if you don't already know how they work, then you can check out any of these resources:

Example Usage
Selected Blocks
Find
Replace
Result
Explanation
Door
Vent
^(.*)
Airlock $1
Airlock Door
Airlock Vent
The string "Airlock " was prefixed onto the block names
Battery
Control Seat
^(.*)
$1 (Backup)
Battery (Backup)
Control Seat (Backup)
The string " (Backup)" was suffixed onto the block names
Sci-Fi Ion Thruster
Sliding Door
Sci-Fi
Ion Thruster
Sliding Door
Removed "Sci-Fi" from all block names; leaving the other blocks unaffected
NCC-1701 Jump Drive
NCC-74656 Battery
NCC-[0-9]*
NX-74205
NX-74205 Jump Drive
NX-74205 Battery
If you're like me, you add ship registries to block names to tidy the terminals of docked ships. With this Regex, you can replace a general substring with a new one; in this case updating the registries of blocks.

Limitations
Since this mod uses the same mechanism as Meridius's to rename blocks, some blocks were not able to receive these controls. In particular: the Contracts Block and Survival Kit. Remember to deselect these blocks when trying to rename large amounts at once.
5 Comments
Fox 14 May @ 4:05pm 
Would it be possible for you to update this mod to include the new blocks added?
Storm 20 Jun, 2021 @ 8:41pm 
Awesome. Easiest way to tag everything with a ship name, keep numbering. Excellent. Just want I really needed to keep things straight!
Kuntish 2 Dec, 2020 @ 1:46pm 
This mod seems to break the warheads
Darks33d 4 Jul, 2020 @ 6:13am 
Seems like a pretty powerful tool. Time to check it out.
Meridius_IX / Lucas 1 Jul, 2020 @ 1:14pm 
Great remix of the original! :)