Author Topic: [Resolved] Quick Execute for Shape Files  (Read 1698 times)

It would be better for me to just restart the client everytime I do shape updates. Thank you Conan for the pointers and clarification.




OP:

I'm looking for a client/script to quickly execute a addon with a server.cs or client.cs, in-game, without having to restart Blockland. I have found a mod from this addon archive (Quick Execute), but the download link is broken (Dropbox 404).

There's a batch of commands I've heard of to transmit datablocks, but I cannot get it to work without having the game crash.

Does anyone have this mod, or can kindly direct me to another version that is practical? Thanks in advance.

« Last Edit: May 14, 2020, 05:22:10 PM by Night_Hawk »


quick execute just lets you exec through chat, but you can also do it through the console ~ without having to restart blockland. transmitdatablocks(); is required to update most datablock fields, though image states, particles, texture changes and shape changes will require a restart or a script that forces all clients on the server to re download the datablocks

if your game is crashing when you exec a script then quick execute won't fix that:
- it has an infinite loop in it
or
- you're hosting dedicated and the script declares local variables outside a function

quick execute was made to make it slightly easier to execute scripts, but it's no more or less prone to crashing your game than the default exec(); is. keep this in mind if frequent crashing is a problem for you
« Last Edit: May 09, 2020, 11:58:28 PM by PhantOS »

I basically need something like that for when I update my models after small optimizations. Is that something the mod can do or something in the console that can do it?

in order to update shapes, everyone on the server needs to redownload the datablocks. they can either disconnect to do so, or, i believe there's a script that does it for you without forcing you to reconnect. you should ask conan about that because he's the only one i've seen to have that script.

you should shoot him a PM

It would be fine to additionally use in single player, which is what I would prefer.

This is what I had in a text file for mod making notes:

clientCmdMissionStartPhase3();
e(ADDON NAME HERE);transmitDataBlocks();
clientCmdMissionStartPhase3();

its hard to say if that will work. e(); isnt a default function

yes it is

e(); executes all addons but I don't know why it accepts an argument

probably accepts an arg and ignores it?

Just doing e(Vehicle_Vortex);transmitDataBlocks(); alone would work if the mod was not updated with new shape files. That is what is crashing the game.

I messaged Conan, but I am awaiting a reply still.

do not use e. that is not what you need.

i replied to your pm, next time contact me in bcc/over discord if you want a faster reply

the transmitnewfiles(); script was created by zeblote and is shared among coders, you can find a copy of it on here: https://github.com/ConanODoyle/conans-prison-break/blob/7984e06cb53ea6df1478df0773b5ff04bc1e21fa/exec.cs#L103-L166
all it does is just force every client to restart loading while ingame, so any new assets (like models or sounds) will be loaded without needing the client to rejoin. it will not update existing models.
« Last Edit: May 13, 2020, 06:09:56 PM by Conan »

Thank you for the helpful information, Conan. I think in this scenario we have discussed, it would be better if I restart the client every time. Locking the topic now.