Author Topic: Replacing colorsets without restarting server  (Read 1133 times)

Want to change those pesky colors? Sick and tired of just one colorset??? Follow this simple guide to change your colorset!
Step 1. Replace colorSet.txt with the desired colorset.
Step 2. Type setModPaths(getModPaths()); in console.
Step 3. Type setSprayCanColors(); in console.
Rejoin, and BAM! You will have the new colors! (will apply to all the bricks you see btw, you could theoretically use this as a esp to view bricks)

If you want to replace the color set in a multiplayer game without anybody having to rejoin:

1. Modify it with setColorTable or setSprayCanColors.
2. For all %clients that have reached phase 3 of loading: %client.transmitStaticBrickData();
3. For all %clients that have spawned: commandToClient(%client, 'PlayGui_LoadPaint');

If you want to go all the way, modify the spray can datablocks and transmit datablocks so that the particles have the new colors as well.

If you want bricks to update color in real time, set each brick to another color and immediately set it back to the original to let clients update it.

If you want to replace the color set in a multiplayer game without anybody having to rejoin:

1. Modify it with setColorTable or setSprayCanColors.
2. For all %clients that have reached phase 3 of loading: %client.transmitStaticBrickData();
3. For all %clients that have spawned: commandToClient(%client, 'PlayGui_LoadPaint');

If you want to go all the way, modify the spray can datablocks and transmit datablocks so that the particles have the new colors as well.

If you want bricks to update color in real time, set each brick to another color and immediately set it back to the original to let clients update it.
I tested this before and PlayGUI_LoadPaint didn't work for me tho, it seems like you have to transmit the static brick data then loadpaint

it seems like you have to transmit the static brick data then loadpaint

Yes, that's why the steps are in that order.

Yes, that's why the steps are in that order.
i mean, for already loaded clients

i mean, for already loaded clients

Yes. When you finish loading you have already reached phase 3. :P

would be great if someone wrote this into a script or a copy-pastable bit of code *ahem*

would be great if someone wrote this into a script or a copy-pastable bit of code *ahem*
whipped this up really quickly, replace colorset.txt on the server then run reloadColorset();
http://pastebin.com/yMMqhVLh