Space Engineers

Space Engineers

评价数不足
Advanced Block Renaming
   
奖励
收藏
已收藏
取消收藏
Type: Mod
Mod category: Other
标签: hud
文件大小
发表于
更新日期
164.829 KB
2020 年 7 月 1 日 上午 5:45
2020 年 7 月 1 日 上午 7:51
2 项改动说明 ( 查看 )

订阅以下载
Advanced Block Renaming

描述
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.
6 条留言
aviator1280 9 月 30 日 上午 8:46 
Sorry, how to add a number as suffix? Can?
Fox 5 月 14 日 下午 4:05 
Would it be possible for you to update this mod to include the new blocks added?
Storm 2021 年 6 月 20 日 下午 8:41 
Awesome. Easiest way to tag everything with a ship name, keep numbering. Excellent. Just want I really needed to keep things straight!
Kuntish 2020 年 12 月 2 日 下午 1:46 
This mod seems to break the warheads
Darks33d 2020 年 7 月 4 日 上午 6:13 
Seems like a pretty powerful tool. Time to check it out.
Meridius_IX / Lucas 2020 年 7 月 1 日 下午 1:14 
Great remix of the original! :)