Let's say you join a Blockland server, and you need to download a GUI or client-sided script in order to play properly.
Isn't it annoying to have to get a new add-on, and
restart Blockland?
Server hosts, don't you think you could retain more players if the GUI could just be transferred to them automatically?
I know Blockland Glass does this, but isn't it kind of a dead mod?
And what if you just want code transferring without everything BLG offers?
I was thinking of making an add-on where Blockland servers could transfer scripts and GUI's to the client.
ClientWhen a player joins, it tells them that a client-sided mod is available. The code is transferred immediately. A GUI pops up, giving the client 4 options:
- Install and run: The code is saved into a file in the /config/code transfer/ folder, and it is executed. Every time the game s
tarts up, the script is executed again. - Install only: The code is saved to a file, but not executed. It will not auto-execute on startup. To do that, the player must modify their preferences.
- Run only: The script is saved to a file and executed. But after execution, the file is deleted.
- Do not use: The code is not installed or ran.
When the client connects to the server, a 'handshake' is initiated by the server. It sends the required names of the scripts.
The client checks if it has each script. If a script is installed but not enabled (the "Install only" option was used on it), a prompt tells the client to either execute it now, make it auto-execute on startup, or don't run it.
If a script is missing, the client adds it to a list of scripts it doesn't have.
The client then sends the list, and the server tells the client to display prompts (with the 4 options above) in order to handle the missing code.
In order for the configurations to work, each script will have some properties:
- Name: The name of the script. This is also the filename the script has on both the server and the client.
- Version: The version of the script. I would probably not have versions and updating in the first release of the add-on.
- Auto-execute: This can either be true or false, and says whether the script should be executed on Blockland startup. This is only controlled by the client when they install it.
These 3 attributes will be defined in a configuration file. Auto-execution can be changed by the client.
ServerThe server-side part of the application has a folder with scripts which should be transferred to the client. There are preferences for choosing which scripts to transfer.
Do you think a code-transfer system would be useful?