Space Engineers

Space Engineers

28 voti
Copy Private Text to Custom Data
   
Premio
Aggiungi ai preferiti
Preferito
Rimuovi dai preferiti
Mostra gli oggetti etichettati con tutti i termini selezionati: development
Dimensioni del file
Pubblicato in data
Aggiornato in data
1.093 KB
14 dic 2016, ore 16:33
15 dic 2016, ore 21:43
4 note di rilascio ( visualizza )

Sottoscrivi per scaricare
Copy Private Text to Custom Data

Descrizione
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 commenti
Titan Nya 12 ott 2019, ore 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 17 dic 2016, ore 10:25 
Additional request.
Can you clear custom text and title after copy?
Kham 16 dic 2016, ore 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  [autore] 16 dic 2016, ore 5:45 
Visual Studio Intellisense helps a lot. Its as simple as accessing lcd.CustomData ;)
Sleeper 15 dic 2016, ore 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  [autore] 15 dic 2016, ore 21:57 
Happy to help! Enjoy! :)
Golden Dragon 15 dic 2016, ore 21:51 
Work! You saved me :) thx a lot!
MMaster  [autore] 15 dic 2016, ore 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 15 dic 2016, ore 21:39 
Oh... My fault :( i really use private title before.
Sorry :(
MMaster  [autore] 15 dic 2016, ore 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.