Space Engineers

Space Engineers

28 人が評価
Copy Private Text to Custom Data
   
アワード
お気に入り
お気に入り
お気に入りから削除
タグ: development
ファイルサイズ
投稿日
更新日
1.093 KB
2016年12月14日 16時33分
2016年12月15日 21時43分
4 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Copy Private Text to Custom Data

解説
In-game script by MMaster

This script will copy original Private Text from LCD blocks that existed before
the Private Text was removed to the Custom Data of the LCD.
So in other words if you've got old ship that had Automatic LCDs commands written in
Private Text then this script will help you get the original contents of the Private Text and
write it to Custom Data of the LCD.
Additionally it will also copy original Private Title to Title of the LCD.

Be careful as this script will overwrite your current Public Title of the LCDs with whatever was in the Private Title before. (it will not overwrite it if Private Title was empty)

HOW TO USE:
1. Load this script to programmable block as usual (don't forget to check ownership)
2. Run the programmable block with argument "[LCD]" (without quotes)
3. Script will find all LCDs on all connected ships that contain "[LCD]" in their name and try to
copy the original Private Text to Custom Data.
NOTE:
If your LCDs were named differently you can use anything instead of "[LCD]".
Usual modifiers used in name filtering from Automatic LCDs DO NOT apply!
So you cannot use { } or {G:} or {T:} etc.
This is just simple check if the name of LCD contains the words you write.

Hope this helps! Enjoy!
24 件のコメント
Titan Nya 2019年10月12日 3時17分 
Sorry to revive an old script, but it's the closest to what i'm searching...
Is there a possibility to make the script to copy custom data from 1 block to others?
I'm currently using a script using custom data for configuration and for the test i'm doing for proof of concept i have 8 with 1 config and 8 with another one and my last idea may add 3 other...
So changing 16 (19 if last idea is final) one by one for only 1 out of maybe 6 sub part is... tedious
So well i'm asking here... no idea if it'll come out positively or not...

If not possible don't worry i'll do it manually...
Golden Dragon 2016年12月17日 10時25分 
Additional request.
Can you clear custom text and title after copy?
Kham 2016年12月16日 6時42分 
Thanks again for this man. I was able to convert all 50+ LCDs over my ships and stations to the new custom data field. I was a little worried that I'd have to spend the next week looking through old screenshots while setting them all up again to make sure they were correct. This saved me so much time.
MMaster  [作成者] 2016年12月16日 5時45分 
Visual Studio Intellisense helps a lot. Its as simple as accessing lcd.CustomData ;)
Sleeper 2016年12月15日 22時49分 
Ok it worked great for me idk what happened before :D MMaster I would love to pick your brain now about how to read and parse the customdata field seems to be no documentation on it yet if you know a place i would appreciate greatly a link for reference. Thanks for your time and mods.:steamhappy:
MMaster  [作成者] 2016年12月15日 21時57分 
Happy to help! Enjoy! :)
Golden Dragon 2016年12月15日 21時51分 
Work! You saved me :) thx a lot!
MMaster  [作成者] 2016年12月15日 21時45分 
I updated the script so it now also copies Private Title to Public Title.
Be careful as this will overwrite your public title with whatever was in the private title before unless it was empty.
Golden Dragon 2016年12月15日 21時39分 
Oh... My fault :( i really use private title before.
Sorry :(
MMaster  [作成者] 2016年12月15日 21時37分 
From what you've shown me so far you didn't use Private Text, but Title .. but until now I was not sure if it was Private Title or Public Title. I assume that you used Private Title.

It's hard to help if you tell me that you used Private Text when you used Private Title ;)
Let me update the script so it copies any Private Title to Public Title.