That got me started, so thanks... but looks like changing the game mode technically closes the server and returns you to the main menu, instantly starting up a server with the new game mode before it has a chance to draw the menu on the screen.
I think it's curious how there has NEVER ONCE been a patch for BL that made life easier for modders, and usually quite the opposite. Badspot's a better troll than I'll ever be.
Anyway, when you change the game mode, it does this:
- delete datablocks
- deactivate packages
- delete datablocks
- deactivate packages
So I can't even package a thing to re-add the datablocks because that package gets turned off and then the datablocks get deleted again.
So here's the final workaround I came up with, in case anyone ever wonders how to get around this:
function DeactivateServerPackages()
{
//do nothing
}
package doNotDeleteMyDBs {
function onDatablocksDeleted()
{
Parent::onDatablocksDeleted();
exec("this selfsame file that the datablocks are also in");
}
};
activatepackage(doNotDeleteMyDBs);
I figured re-running packages was safer than re-running datablocks because I didn't know if it would have a stufffit at me for occupied namespaces or something. Obviously you can't switch between two complex gamemodes but if you're debugging and coding you're not doing that anyway. copy/pasting the above once is still faster than dealing with .zip files.
Also I found another "feature" of the new BL: bricks don't collide or work properly in general if their bottom is below height zero. This was the main problem with my brick creation code. This is a particularly soft spot for me because my #1 favorite thing to do in beta was to make a hole in the terrain and build underground; I was super-annoyed when BL retail was released and those bricks were disallowed for being "buried". Now I can't even have bricks script-planted to be even partially underground. I would post a picture of a reaction face if a human face could possibly convey the myriad emotions I am going through right now.
So, everything is solved. Well, as far as they can possibly be. Thanks.