Blockland Forums > General Discussion

How does downloading add-ons work?

Pages: (1/2) > >>

Altiris:

Alright so I just have a few questions about addons/mods that are downloaded when you select "Join a Server" and it downloads all of the files before you spawn in. If I have lets say Weapon_Machinegun that I downloaded manually and the server uses it also, will it download again because of how online mods work (they go in the cache.db file?). My other question is, how does Blockland know when there is a new version of that addon?

Thanks guys!

otto-san:

i'm definitely not an expert and i'll probably be corrected by kalphiter but i'm p sure it works by comparing file CRCs

Pecon:

I'm pretty sure that the server sends the file CRC values in the file manifest. And if the values for a specified file are the same as a file you have, the game will just copy the local file into the database instead of downloading it.

Ephialtes:

When the server starts it generates a "manifest" of all the shapes and resources it uses. It does that by taking a hash of the contents of the file (that's like a long string of numbers and letters) which it uses to refer to that particular file - it doesn't use filenames at all.

So when you join, the server just makes sure you have a file that matches the same contents as the file it uses as the model for Gun A, for example. The important bit is that files are identified/referenced by their contents and not their name.

Altiris:


--- Quote from: Ephialtes on August 22, 2013, 07:15:39 PM ---When the server starts it generates a "manifest" of all the shapes and resources it uses. It does that by taking a hash of the contents of the file (that's like a long string of numbers and letters) which it uses to refer to that particular file - it doesn't use filenames at all.

So when you join, the server just makes sure you have a file that matches the same contents as the file it uses as the model for Gun A, for example. The important bit is that files are identified/referenced by their contents and not their name.

--- End quote ---
Alright sounds cool but I am a little confused. By "the server just makes sure you have a file that matches the same contents as the file it uses as the model for Gun A" does it only check in the cache.db file or also locally too (add-ons folder)? (I dont think it checks locally because then it would require that all of  those addons generate a manifest?) Sorry if this takes me a while to understand.

Pages: (1/2) > >>

Go to full version