GMDprivateServer icon indicating copy to clipboard operation
GMDprivateServer copied to clipboard

CCGameManager and CCLocalLevels

Open Myshy-Official opened this issue 2 years ago • 1 comments

So in the gdps where I am Server Maintener, a backup was made on the 3rd of June. Some days after that, gdpsfh closed down and we lost data. The problem is, some people created accounts before the corruption and after the backup. Some created levels and since their accounts don't exist in the server, they will have to delete the save data to create a new account. I suceeded to backup CCGameManager and CCLocalLevels but in the backup folder in the servers, data are just files with an accountID as the name. How to convert CCGameManager and CClocallevels to this type of file ?

Myshy-Official avatar Jul 08 '22 10:07 Myshy-Official

if your issue is just converting CCGameManager and CCLocalLevels to a cloud save backup, then doing that is pretty simple - you need to XOR every byte in the file by 11 (0xB) and then paste the content of CCLocalLevels right after the content of CCGameManager with a ; in between, so the resulting file is just CCGameManager;CCLocalLevels

this python script might work, didn't test it though

def xor_game_manager(game_manager_bytes):
	i = 0
	for byte in game_manager_bytes:
		game_manager_bytes[i] = byte ^ 11
		i+=1
	return game_manager_bytes

game_manager = None
local_levels = None
with open('CCGameManager.dat','rb') as f:
	content = f.read()
	game_manager = xor_game_manager(content)

with open('CCLocalLevels.dat','rb') as f:
	content = f.read()
	local_levels = xor_game_manager(content)
	
with open('420','w') as f:
	f.write(f"{game_manager.decode()};{local_levels.decode()}")

Cvolton avatar Jul 08 '22 19:07 Cvolton