Author Topic: Saving certain things  (Read 1373 times)

Is it possible to have BL save certain properties of bricks? Because it's annoying when you spend a while adding special things from a mod, but then have to readd them when you restart/reload. It'd be useful if we could add our own properties to save. Is it possible to add this with everything DSO'd and all?

It might be possible to have your own properties saving system so it saves positions and certain properties, then after bricks are loaded the client pushes the Load Decollisioned Bricks button and it checks for bricks at them positions and decollisions them.

In my expirience with this, it may be much better to use the fxDTSBrick::onAdd callback and then check your save file to see the position of this brick, and whether that position exists in your save file, since looping through all the bricks in your server and checking what properties need to be added can actually kill the server depending on the ammount of bricks that you have. I haven't tried the method I suggested, but I tried these two with the following results:

- I tried looping through the brick save file and then for each line, i would loop through the properties save file to check for bricks in the same position as the one I am on in the brick save file. This resulted in a mass disconnection and about 1 minute of standstill.

- I tried looping through the properties save file and then for each line, i would loop through the brick save file to check for bricks in the same position as the one I am on in the properties save file. This resulted in a server crash.

Eventually I tried adding in a bigger gap between the looping through files, but this just resulted in nasty lag for about a minute, and a few people getting disconnected. I hope you can now see that it is much easier for Badspot to do this bit for us.

Right, I agree with that (ask Badspot) because the save system is already there and additions could simply be made. So in that case, might as well move this to suggestions...

You could try looping through the properties file and doing a small radius/point/etc-search at each position, provided that searches aren't too slow.