ChunkWorx V6 (rev. 787 compatible)
#1
Brick 
What it does:
Grab a rectangular area, defined by start X,Z and end X,Z chunks, and forces server to generate/regenerate it.
It also reports it's progress every 100 chunks, and don't causes generator queue overflow.
v2 features:
  • World selection;
  • Point regeneration (including 3x3 for inaccurate chunk selection);
  • Player-based regeneration (including 3x3 for inaccurate chunk selection);
v3 features:
  • Compatible with Rev 787;
  • Better (one click) world selection;
  • Radial (re)generation (not exactly radial, it's just another way to set rectangle);
  • INI setting storage;
  • Slightly simplified interface;
v6 features:
  • Operation details and progress reporting;
  • "Stop" functionality;

How to use:
  1. Put .zip inside your "Plugins" folder;
  2. "Extract here";
  3. Go to your settings.ini OR use web control panel, and add "ChunkWorx";
  4. Go to web control panel, specify region/point and operation;
  5. Press "start"!
  6. ...
  7. PROFIT!!!

I think it could be helpful: generating a world before your players explore it could boost perfomance (dunno how fair is that related to MC-server, but it's quite fair for "regular" minecraft servers)

One more note: you would better to kick all your players and yourself to give your server just one job to do - GENERATE!!!!11111
Use it at your own pleasure, no credits needed. Cheers.


Attached Files Thumbnail(s)
       

.zip   ChunkWorx.zip (Size: 3.65 KB / Downloads: 448)
Reply
Thanks given by: xoft
#2
Congratulations!
I like web pluginsBig Grin
Reply
Thanks given by:
#3
(05-31-2012, 07:58 AM)Taugeshtu Wrote: GENERATE!!!!

For no apparent reason I read that in a Dalek voice.... Exterminate! Exterminate! Wink

Nice plugin.
Reply
Thanks given by:
#4
I have an improvement proposal for you Smile
It would be smart for the plugin to start pre-generating in the middle of the specified coords and work its way out spiral-wise, instead of going line by line. So if the process is stopped, you still get a reasonable area pregenerated.
Then you could play with things such as stopping the pregeneration when too many players join, and restarting once they disconnect, etc.
Reply
Thanks given by:
#5
Quote:I have an improvement proposal for you
Right after point regen. Probably today)
Reply
Thanks given by:
#6
I'm doing a 60x60 chunk generation and MCServer spikes in memory usage - easily reaching 1 GiB RAM and crashing due to insufficient free RAM. I think it'd be a good thing to queue all chunks for saving and unload saved chunks each time you get 100 chunks generated.

Also you might want to check the world storage queue length if it isn't too overtaxed.

You need to utilize cWorld:SaveAllChunks() (already exists) and cWorld:UnloadUnusedChunks() (Not yet exported to Lua, I'll be committing that soon to the svn and uploading a nightbuild with that support)
Reply
Thanks given by:
#7
Quote:I'm doing a 60x60 chunk generation and MCServer spikes in memory usage - easily reaching 1 GiB RAM
Weird enough... I had 30 MiB RAM usage while generating same ammount of chunks...

Quote:I think it'd be a good thing to queue all chunks for saving and unload saved chunks each time you get 100 chunks generated.
Also you might want to check the world storage queue length if it isn't too overtaxed.
Sure. Just let me know when that commit will land Wink
Reply
Thanks given by:
#8
Already done.
You can see a current list of the commits here (just in case you didn't know Wink )
http://code.google.com/p/mc-server/source/list

RAM usage: It might have something to do with my machine being quadcore, so the generation and saving run in parallel. Also I've been testing some generator-related things, so I limited the generated stuff to minimum, which made the generator run about three times faster. Or maybe it's because of it being a Debug build. Who knows.
Reply
Thanks given by:
#9
Updated ChunkWorx version is there as well Smile Try it, please (I really have no idea if I did it properlyBig Grin)
Reply
Thanks given by:
#10
I'm not using the additional features much, so I didn't test them.

But I'm sorry to tell you that I broke your plugin in Rev 534 Wink

I removed the obsolete cRoot:GetWorld() function with no argument. Everyone should use cRoot:GetDefaultWorld() instead for getting the default world; cRoot:GetWorld() takes a string parameter for the world name.

Also I added world enumeration to the cRoot API. It works similarly as player enumeration in cWorld - you call a ForEachWorld function with a callback parameter and then MCServer calls your callback once for each world, with the world as a parameter. Simple usage example (in your chunkworx_web.lua's HandleRequest_Generation() function):
Code:
    local WorldTable = {}
    local AppendToTable = function(World)
        Content = Content .. ", " .. World:GetName()  -- debug - output directly to Content
        table.insert(WorldTable, World:GetName() )
        return false
    end

    cRoot:Get():ForEachWorld(AppendToTable);
You can use this to populate a combo of worlds instead of the users having to type in the exact world name Smile

Two more things that would really help me:
- remember the coords that I enter for generation. Store them in an INI file, I see you know how to do that already Smile
- besides the (StartX, StartZ, EndX, EndZ) coords, allow the user to enter (CenterX, CenterZ, Radius) coords as well. Much easier Smile

Your plugin is extremely helpful for my development right now - when I change a generator, instead of having to walk around with a player in MC, I just let your plugin generate an area and see it in a map nicely Smile
Reply
Thanks given by: Taugeshtu




Users browsing this thread: 7 Guest(s)