Space Engineers

Space Engineers

Not enough ratings
PB Script Replacer
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
File Size
Posted
Updated
230.598 KB
29 May, 2020 @ 11:44am
29 May, 2020 @ 12:04pm
2 Change Notes ( view )

Subscribe to download
PB Script Replacer

Description
This Mod assist in replacing PB scripts for blueprint and world setup.

PB script replacement is an extremely expensive operation as it triggers script compilation. Therefore, mod is strictly for local setup use only. On MP, only the host can access this mod. On DS, no one can access this mod.


How To Use

All PBs will have the following controls. Load the script into the currently accessed PB, then use the following buttons to duplicate the scripts to other PBs based on search criteria.



Below are the list of "Selection Modes" available for the search criteria on which PBs to replace the scripts. You can also use the checkboxes to "Include Subgrids" or "Include Projections" (grids stored inside Projectors) for the operation.



You can click the "Query Only" button to perform a query and ensure your criteria is correct first, then click the "Replace Scripts" button to actually perform the script replacement. When a query or replace operation is in progress, the status will show accordingly, and runs on a separate thread to avoid hanging your interface (as the operation can take a long time).



A list of affected PBs are listed for your review. Tooltip will also provide where the affected PB is located.



One of the useful feature is filtering by "Script First 1000 Char Contains". This allows you to target scripts based on its header (assuming the author includes it). Below is an example of a script header, and the "Matching String" entered according to the header.




Status bar will show how many PBs are affected and list the affected PBs. The status bar will also show the "Projector" the PB being replaced is on, if "Include Projections" is selected.



Only one PB in the entire world can run the operation one at a time. If one PB is currently executing an operation (query or replace), all other PBs will show the following message, with the operation buttons disabled:


4 Comments
Alysius  [author] 5 Jul, 2022 @ 7:58pm 
I felt the PITA when doing script development. Imagine you have a warship with 32 missiles, and you made a mistake in your new script. You need to update them. W.... T.... F..... all 32 missiles plus recreating the projector of everything needs to be updated. Its f**king painful and a total waste of time. Thats why i created this mod. I feel this should be in Vanilla.
Blackwater Canyon 31 Jan, 2022 @ 11:38pm 
Makes script development sooo much faster! Thanks!
[B.A.C.M] jason_goodrich2001 25 Feb, 2021 @ 10:48am 
this is extremely helpful thank you
Dr. Distortion 29 May, 2020 @ 12:10pm 
Awesome, thanks! 👌