Author Topic: What does the Player Persistence addon actually do?  (Read 1068 times)

In all my years of playing blockland I have never enabled this addon and I have never known what it does. What is it for?

Support_Player_Persistence is a support add-on for add-ons that want to automatically save/load values on clients and players when they leave/join.

Script_Player_Persistence has some examples in it. Such as position, scale, datablock, health, score, tools and such.
Brick_Treasure_Chest also uses it.

Brick_Treasure_Chest also uses it.
Doubt it as when I click my chests, rehost the server, I click it again and it unlocks it

Doubt it as when I click my chests, rehost the server, I click it again and it unlocks it
I'm pretty sure it only works during one... uh, instance...? of the server
what I'm saying is that, I think if you close the server, it deletes the information it had

Then it would be useless. As said before, Player Persistence saves player's position, health, energy, tools, etc in a text file in config/server/persistence/blid.txt and loads the data in that file when the player spawns.

To be even more precise, let's brown townyze the contents of a said file.
Code: [Select]
>CLIENT
inventory1 brickMusicData
inventory5 brickMouseData
inventory9 brickDisplay6Data
currInvSlot -1
inventory0 brick1x1RampFFData
inventory2 brickHandle1x1fData
inventory6 brickBlockStationData
instantUseData brickDisplay6Data
currInv -1
inventory3 brickHandle1x1x2Data
inventory7 brickAshtrayData
score 98
inventory4 brickHandle1x1Data
inventory8 brick5xMusicData
>PLAYER
datablock PlayerLobby
transformPerMap -60.3706 -155.611 0.00545979 0 0 1.00001 0.0814682
velocity 0 0 0
damagePercent 0
scale 1 1 1
tool1 WrenchItem
tool2 PrintGun
currTool 1
tool3 0
tool4 0
tool0 hammerItem

It seems to save what bricks you have in your inventory, which brick you had selected and score for the client, and regarding the player, the playertype, location, even current velocity, health, scale of the player, all weapons and which weapon you had in your inventory.

That, in theory at least. I didn't really see it do any good job at loading those values.