Space Engineers

Space Engineers

565 个评价
Whip's Block Renamer
2
3
3
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
1.039 MB
2018 年 1 月 30 日 下午 11:17
2023 年 12 月 18 日 下午 6:07
9 项改动说明 ( 查看 )

订阅以下载
Whip's Block Renamer

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
Whip's Group Based Block Renaming Code

Howdy!

This program makes renaming large groups of blocks easy! You can use this script to rename, prefix, or suffix block names. Additionally, there are built in functions to prefix or suffix the grid name to your blocks (Incredibly helpful for multi-grid ships!).

Also, unlike some similar scripts, this script will allow you to rename blocks to their default names with little hassle!


  • Can replace certain phrases with new phrases
  • Can prefix, suffix, and rename blocks
  • Can also rename blocks to their default names
  • Can prefix or suffix blocks based on grid name!
  • Renamed blocks can be numbered automatically
  • Ships with many blocks will have preceeding zeroes attached to the block number to make them show in order in terminal
  • Can configure numbering and behavior in the custom data.


  1. Place this script in a programmable block
  2. Group blocks that you want to rename with the GROUP RENAME TAGS in the section below
  3. (Optional) Configure custom data of the programmable block how you like.
  4. Run the program once. This will rename/prefix/suffix all blocks in recognized rename groups.
  5. You can now delete these groups if you desire
  6. Enjoy!


Group Rename Tag
Description
default
Renames all blocks in group to their default name
default prefix
Prefixes all blocks with their default name
default suffix
Suffixes all blocks with their default name
prefix [desired prefix]
Prefixes all blocks in group with desired prefix
suffix [desired suffix]
Suffixes all blocks in group with the desired suffix
rename [desired name]
Renames all blocks in group to specified name w/ optional numbering
grid prefix
Prefixes all blocks in group with the name of their grid
grid suffix
Suffixes all blocks in group with the name of their grid
replace "[old phrase]" with "[new phrase]"
Replaces the specified old phrase with the new phrase in all blocks contained within the group


This is one of my simpler codes, but also one if my most used ones. I figured this may be helpful for others as I oft get tired of manually renaming large groups of blocks.

If y'all have any questions, feel free to ask!

(Do not reupload without permission, not even to mod.io)
热门讨论 查看全部(1)
3
2020 年 11 月 29 日 下午 7:08
置顶: Bug Reports
Whiplash141
202 条留言
Absolarix 11 月 11 日 下午 2:11 
I've been playing this game for over a decade now and have heard of this script over the years, but never bothered to look into it myself until now. This is amazingly helpful, why did I sleep on this for so long?! Fantastic work, Whiplash!
FarNiche 8 月 1 日 下午 6:30 
Finally got it to work...
The Block Group is named:
replace "FNAD" with "FNAD-0"
which contains the Control Panel Grid blocks that were selected to make up that group.
Then:
Run the PB with the Argument using the same name AS the block group, i.e.:
replace "FNAD" with "FNAD-0"
Result: the phrase in the first quote is replaced with the phrase in the second quote.
Very nice, thank you. It makes a carrier of Attack Drones easily distinguishable from one another.
Whiplash141  [作者] 1 月 6 日 下午 7:12 
Read the description above @Duke3D
Duke3D 1 月 6 日 下午 6:10 
who work ? pls a example
SioxerNikita 2024 年 11 月 1 日 下午 4:58 
As long as it just numbers them appropriately, I wouldn't even mind not having a "direction" parameter, and instead your script just arbitrarily uses a default direction.
Whiplash141  [作者] 2024 年 11 月 1 日 下午 4:22 
That is non trivial to do because a players conception of direction is entirely arbitrary.
SioxerNikita 2024 年 10 月 31 日 上午 10:16 
There is actually one feature I noticed missing for arrays of stuff. Walls of welders, grinders, etc.

Could be nice to have where if you have the group, it'll choose one corner as offset (perhaps with a modifier to choose which, like T/BL/RF/B (Top/Bottom, Left/Right, Front/Back ex. TLF for top left front) start that block as 00 (or what ever leading zeroes) and then if all the blocks are in a single plane, it just starts naming them 00 to Whatever based on the offset from the first "origin" block, and if there is 2D plane of them, they'll be named based on offset in 2D (00-00->00-01->01-00->01-01) and in 3D, add one more. If there is multiple blocks in between, it'll just "skip" the numbers, so if I had arranged like
X0X
XXX
X0X (Xs being my renamed blocks)

They'd be named, if I start top left, they'd be named:
0-0, 0-1, 0-2
1-0, , 1-2
2-0, 2-1, 2-2

Orientation could be based on main cockpit.

This one feels like it has genuine use cases outside of preference
Whiplash141  [作者] 2024 年 10 月 25 日 下午 6:37 
"Would be nice to number blocks"
It does. You can configure that in custom data
Into 2024 年 10 月 25 日 上午 5:22 
Would be nice to number blocks
StikShift4Life 2024 年 9 月 10 日 上午 1:07 
Could you add a feature to append a number sequentially in hexadecimal?