Space Engineers

Space Engineers

Not enough ratings
(ModTool) Reload Definitions
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
14.393 KB
18 Jan, 2021 @ 8:54am
25 Nov, 2023 @ 9:49pm
8 Change Notes ( view )

Subscribe to download
(ModTool) Reload Definitions

In 1 collection by Digi
Digi's Space Engineers mods
46 items
Description
Ctrl+Alt+R or /reload all in chat.

This will reload all SBC definitions as if you reloaded world... mostly. Needs lots of testing.

Definition instances from before the reload can be identified by their "(OLD) " prefix, they will stick around in blocks, tools, etc unless re-spawned.

There are commands that also respawn grids and planets respectively, type /reload in chat for the list of all commands+hotkeys.

This should not be used in servers/MP unless you want to test changes on downloaded mods only clientside or break stuff if you're doing this as server-player... just don't do it xD


So far confirmed to reload:
- blocks's DisplayName, MountPoints, Components, IsAirTight, BuildProgressModels.
(requires re-placing or using /reload all+grids chat command)
- particles, tested on "AngleGrinder" particle by removing and re-adding effects.
- planet atmosphere settings
(requires re-placing or using /reload all+planets chat command).
- character health from stats.sbc (requires character respawn).
- HUD definitions (toolbar font, positions... likely everything that can be changed normally can be reloaded with this).
- transparent material but depends:
- it can reload on cockpits but not on windows for example, it's very odd.
- it can change texture but not reload the actual texture, recommended to give it a new name every time you make changes to the texture then reset it back once done tweaking.


Let me know what things you find that are or are not reloaded properly.


Things this can't reload:
- Models' subparts/empties/colliders/animations (requires full game restart).
- Models' visual mesh (use Reload Models from F11 menu).
- Textures (use Reload Textures from F11 menu).
- C# scripts (inaccessible, requires world reload).


Notes:
- Blocks/planets/etc in world will still use their old definitions, you must use the available commands to respawn them or re-place them manually.
- F11's error list will grow from every reload's errors so don't panic, this mod does add a warning at every reload so you can know where to ignore errors from (always start reading from the bottom). While I can clear errors it would also clear other non-SBC errors like script compile errors.


mod io?
Please read[gist.github.com]
14 Comments
kickformoney 14 May @ 4:11am 
This came in really handy when I was updating several blocks yesterday. Thanks!
Digi  [author] 25 Nov, 2023 @ 9:53pm 
Updated with toolbar crash fixed :]
Digi  [author] 18 Nov, 2023 @ 6:03pm 
Actually if you have other mods too, remove those as well =) only test this mod with the world.
Digi  [author] 18 Nov, 2023 @ 6:02pm 
Try it without the mod you want to reload but in the same world as that error, to see if it's the mod or an actual toolbar having weird stuff.
And once you find which it is send it to me and I'll see what I can dig up on its issue :}
Sardaukai 18 Nov, 2023 @ 6:21am 
Hey Digi, you are everywhere ;)
Great idea to reload instead of start the game everytime.
But maybe it is broken... I got a nullpointer

Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
at Sandbox.Game.Screens.Helpers.MyToolbarItemCubeBlock.Update(MyEntity owner, Int64 playerID)
at Sandbox.Game.Screens.Helpers.MyToolbar.Update()

or is it a failure of my mod(s)?
=_= 5 Feb, 2022 @ 8:03am 
Many thanks!
Digi  [author] 5 Feb, 2022 @ 8:02am 
Fixed :}
=_= 5 Feb, 2022 @ 4:56am 
Looks like it doesn't working after last update =(
Digi  [author] 4 Feb, 2021 @ 10:07pm 
@AbeAlpha
It seems I can respawn planets with code, I've also added the same thing for grids, both as optional commands/hotkeys tho as they do slow down the process.
See /reload for them :}
AbeAlpha 1 Feb, 2021 @ 1:24pm 
Yep confirmed! Amazing work and very usefull.
Do you think that in the future we can use this without having to place it back? it would be really amazing