Author Topic: Activated Add-Ons in Game: Myth or Real?  (Read 2008 times)

Title Pretty Much says it all, However i was told this would work:
(Although it just crashed my blocklanD...)

Code: [Select]
setmodpaths(getmodpaths());

exec("Add-Ons/ZipFileNameHere/server.cs");

(Entered one at a time in the blockland Console)

The add-on I tried to activate was the Item_Parachute...Does this code really work?

It would work for you. However, anyone else in your server would crash when you used the item. Using GameConnection::transmitDatablocks() would let you stop this, however it's a bit unstable and anyone else without the mod or DTS files that go with it would always crash.

For updating your server, there is a few things you can do.
This list probably doesn't include all of them, but it has the common ones.
Also, these are typed in in the server console. Not the client one.
So if you're hosting a dedi, careful where you type this in.



Have Blockland refresh the file contents (but not re-execute):
Code: [Select]
setModPaths(getModPaths());
Execute a specific file, but note: contents won't auto-refresh:
Code: [Select]
exec("Add-Ons/Script_Name/server.cs");
Send all datablock files to the clients so they won't crash:
Code: [Select]
TransmitDatablocks();
Have their wrench dialogs update (spawning items, etc):
Code: [Select]
commandToAll('Wrench_LoadMenus');
Have their wrench event lists update / refresh:
Code: [Select]
for($var=0;$var<ClientGroup.getCount();$var++) { serverCmdRequestEventTables(ClientGroup.getObject($var)); }

Send all datablock files to the clients so they won't crash:
Code: [Select]
TransmitDatablocks();
... will still crash people who don't have your Add-On or the required files/models for it.

Oh, So there is no way to activate them in-game, without crashing you or everyone else who doesn't have it? o_O

It is really inadvisable to activate Add-Ons in-game because they can be unstable, not work right (depending on packages or order of loading) or crash people. Just restart the server, it's much easier...

It is really inadvisable to activate Add-Ons in-game because they can be unstable, not work right (depending on packages or order of loading) or crash people. Just restart the server, it's much easier...

Alright, well I tried.  Thanks for all the input and help guys.

... will still crash people who don't have your Add-On or the required files/models for it.

Eh, from my experience, it's never crashed a single person / crashed me.