Author Topic: Loading bricks via console on a dedi?  (Read 3195 times)

Trying to load on a dedicated server and I run into this problem: http://forum.blockland.us/index.php?topic=130086.0
wat do

I tried everything trying to fix this, creating the loading group manually and stuff. Refused to work.

Unless someone comes in with detailed code to fix this you might have to write your own dedicated load command.

Well as far as I can tell, the only vanilla way to load bricks on a dedi is to upload a save file.

So... anyone happen to know how I might trick it into opening a save file and treating it as if it were uploaded?

Well as far as I can tell, the only vanilla way to load bricks on a dedi is to upload a save file.

So... anyone happen to know how I might trick it into opening a save file and treating it as if it were uploaded?
fileCopy("PATHTOSAVE", "base/server/temp/temp.bls");
Then, type /reloadbricks as an admin

Obviously you're required to be there, though.

Sweet! Thanks  :cookie:

You're sure it will accept a script that touches "base/server/temp/temp.bls"? It's hard to stay informed on badspot's arbitrary permissions on read/write and execution
« Last Edit: January 08, 2011, 01:39:57 AM by Mr. Wallet »

Sweet! Thanks  :cookie:

You're sure it will accept a script that touches "base/server/temp/temp.bls"? It's hard to stay informed on badspot's arbitrary permissions on read/write and execution.
The only files that are untouchable are locked files (by Windows to prevent modifying admist executing), and normally there are two, Blockland.exe and console.log.

hey, as far as needing to be in the server, do you think I could just call serverCmdReloadBricks(%obj) where (%obj.isSuperAdmin == true)? Kinda hard to test this stuff right now since a buncha people are on my server and I don't wanna kick them off.   :panda:

If %obj is you (as a client), then yes.

If %obj is you (as a client), then yes.
I think he means like this:
$obj = 0;
$obj.isSuperadmin = true;
$obj.isAdmin = true;
servercmdreloadbricks($obj);

I've also wondered if that would work.

Try adding a .brickgroup, then see what happens.

Block Bastion auto-load-save-on-map-loaded code:
Code: [Select]
   %path = filePath(%map) @ "/" @ fileBase(%map) @ ".bls";
   fileCopy(%path, "base/server/temp/temp.bls");
   %cl = new AIConnection() {
      name = "Block Bastion";
      bl_id = 12;
      isAdmin = 1;
   };
   if(!isObject(BrickGroup_12)) {
      new SimGroup(BrickGroup_12) {
         name = "Block Bastion";
         bl_id = 12;
         client = %cl;
      };
      MainBrickGroup.add(BrickGroup_12);
   }
   %cl.brickGroup = BrickGroup_12;
   MainBrickGroup.add(BrickGroup_12);
   serverCmdReloadBricks(%cl);
   %cl.schedule(10,delete);

Block Bastion auto-load-save-on-map-loaded code:
...
I tried doing something similar but it didn't appear to work. Has this been tested?

I ended up using an idea Xalos gave me to use a random client on the server and have them reload the bricks. If they're not admin they have to be given it when they do the serverCmd and have it removed immediately after. Then every time the server loads a brick they are given admin again and when the brick is planted they have it removed. This is repeated for every brick. Very inefficient.

It has been tested, and works perfectly. All Block Bastion maps incorporate this feature.

-loadbls "savename"
?
Plus you have to have a little helper to load it.