This is great, but i cant figure it out its fairly complicated when you provide a download i suggest including all the stuff that we need because i downloaded the wrong python win because it says i need python 3.0 but you recommended python 2.7. I dont have alot of bandwidth so i cant download to much :/
If you're on windows you only need to download the mcmerge-win32 zip file (currently latest version). If it doesn't work right out of the box you'll also need the relevant Microsoft distributable, but more than likely those files already live on your system. That's it, everything you need is packaged up in there.
... 0/284 (0.0%)
... 10/284 (3.5%)
... 20/284 (7.0%)
Traceback (most recent call last):
File "mcmerge.py", line 832, in <module>
File "mcmerge.py", line 556, in erode
File "mcmerge.py", line 319, in reshape
File "mcmerge.py", line 275, in remove
UnboundLocalError: local variable 'new' referenced before assignment
Background info:
I used this tool (which is spectacular, by the way) previously to merge an old world to a prerelease one, and it worked fine. I tried to be clever and change my world seed this time, and everything seemed to be working correctly (I was able to spawn in the world, run around and explore my borders, and use MCEdit to move the spawn point back to a central location. Nothing else seems to be wrong, but I can't figure out what to do with this error.
Suggestions?
Edit: I've managed to get to this point on two different Windows machines as well as a Mac, so it doesn't appear to be a prerequisites problem.
Would switching out my level.dat for a new seed have caused this problem?
I have to say thank you, and excellent work. This is exactly the solution everyone with an older world needs to continue into the future.
One bug I found, however, with 0.4: it did not properly relight tall grass after shifting the world down. I had to use MCEdit to relight it and it took about 7 hours to relight the whole world (old world with 3.5 million chunks). MCEdit simply isn't designed with this kind of massive editing in mind, and, in fact, threw a memory error when I tried to use it to nudge the world down. Your tool is the ONLY viable option for fixing this.
I believe I speak for all of us, when I say, THANK YOU!
Nomad7 - That's actually a bug in my code but only triggered in some specific circumstances, so it's specific to your world. I'm actually really surprised it's taken this long for someone to report it, it looks like it's been there since at least version 0.2.
I don't have time to fix/test/push a new release right now so bear with me for a couple days. It's probably a good idea to push this out as 0.4.2 so look out for that.
WardenWolf - That's interesting, I'll look into the relighting issue, I've never had any problems with relighting tall grass when doing the merge phase and there really should not be any difference between them (though I didn't look at the shift phase results as carefully so I'll have to investigate).
I'm a bit scared my tool has better memory utilisation than MCEdit, because I could have put a lot more effort into getting this right but figured I'd tackle it if it was becoming a real problem for anyone. Perhaps there's a lot more cleverness in pymclevel than I anticipated.
I'm going to have to reword the cover-depth description, but wasn't able to think of something succinct that would do it better at the time. Basically the tool takes a layer of blocks from the surface of the original edge areas, and then they become the top most layer of those areas once the river valley is carved out. This option defines how deep that layer should be. This is a way of avoiding exposing the bare rock that you'd normally find if you just carved out the river valley and didn't cover it with anything.
Wish I knew about this tool before I started trying to 'smooth out' chucky areas on my own.
Is there any hope in getting this to be an MCEdit filter, for ease of use reasons?
I've been playing on the same map since Alpha-something, so going back to delete chunks for the contour trace, 'reloading' the original world for merging, then doing that over again 4-5 times seems less fun/tedius than, say, finding areas of the map i wanted 'merged', selecting a large enough area, then hitting the filter button.
Keep in mind your tool is written in Python, which is a lot lighter weight than Java and pretty much eliminates the memory handling issues associated with it. It's MUCH more efficient at what it does.
Lighting issues occur in 2 instances with MCMerge: one, during lowering the map, and two, on border areas generated by the tool. It doesn't just occur on grass, but also on snow and any other half-block spots.
Once you fix the lighting problem on newly generated merge areas, I recommend you add a relight function to your tool that will simply relight the whole world. Your tool could do it in an hour or so, whereas MCEdit took approximately 7 hours. This will allow people to clean up any previous errors.
Update: I don't think the problem is necessarily with your tool. I've noticed intermittent lighting bugs in Minecraft 1.0 on newly generated chunks. However, if you would be willing to implement a command to specifically relight the world (shouldn't be hard, as the functionality is already there), this will help tremendously.
Nomad7 - The issue you experienced with the crash should be resolved now.
Fase - Unfortunately no plans for an MCEdit filter. That would require a complete rewrite in a different language and I don't have the time for that. If MCEdit could supports it, perhaps someone could write an extension to generate the contour.dat file, replacing the trace step. This would be far simpler. The syntax is simple and human readable so the extension could be fairly independent. Once again I'm not sure if I would have the time to tackle this.
WardenWolf - I couldn't identify a relighting issue, it seems to be working fine when I try it here so for now I think we can assume you're right about bugs being somewhere else. If the issue persists I'd need some kind of sample world on which this occurs to look further into this.
I have added a new relight mode to the tool so let me know how you go with it.
Regarding the memory efficiency. Java's memory management is considerably more advanced than CPython, and I certainly wouldn't call the latter light weight :tongue.gif: Java tends to eat up a lot of memory because the optimising JIT means less code sharing, but that shouldn't be a big issue when it comes to loading large MC maps. I think the credit here must go to the author of pymclevel, from what I've seen in the source there's a bit of cleverness in how the data is managed and packed.
Nomad7 - The issue you experienced with the crash should be resolved now.
Spectacular! Thanks so much for the quick turnaround! I was out of town over Thanksgiving, and come back to see you've already put out a fix.
Awesome work, and thanks again for such an excellent tool!
(I just successfully merged our server's world to 1.0 without issue :smile.gif:)
Traceback (most recent call last):
File "./mcmerge.py", line 3, in <module>
from pymclevel import mclevel
File "/home/minecraft/server/mcmerge/pymclevel/__init__.py", line 1, in <module>
from mclevel import fromFile, loadWorld, loadWorldNumber, saveFileDir, minecraftDir
File "/home/minecraft/server/mcmerge/pymclevel/mclevel.py", line 177, in <module>
from mclevelbase import *
File "/home/minecraft/server/mcmerge/pymclevel/mclevelbase.py", line 21, in <module>
from materials import *
File "/home/minecraft/server/mcmerge/pymclevel/materials.py", line 12, in <module>
import yaml
ImportError: No module named yaml
is there a yaml lib required? I tried to install libyaml but it would not work.
I had the same problem, but solved it by installing both libyaml and python-yaml
thanks a lot for the reply!
Unfortunately this did not help. I still get the same message.
I wonder if this is because I am running Python 2.6? I am using CentOS and the default python install is even older than that. I have 2 version running and use the commandline "python26 ... " to start the script.
Unfortunately I am not sure what I need to do to make sure that all of this works, and if I can use this with 2.6 anyhow. The other alternative I have is installing 3.1 but I guess that does not make it better?
Traceback (most recent call last):
File "./mcmerge.py", line 3, in <module>
from pymclevel import mclevel
File "/home/minecraft/server/mcmerge/pymclevel/__init__.py", line 1, in <module>
from mclevel import fromFile, loadWorld, loadWorldNumber, saveFileDir, minecraftDir
File "/home/minecraft/server/mcmerge/pymclevel/mclevel.py", line 177, in <module>
from mclevelbase import *
File "/home/minecraft/server/mcmerge/pymclevel/mclevelbase.py", line 21, in <module>
from materials import *
File "/home/minecraft/server/mcmerge/pymclevel/materials.py", line 12, in <module>
import yaml
ImportError: No module named yaml
is there a yaml lib required? I tried to install libyaml but it would not work.
This should be fixed now, it affected the mcmerge-script.zip package. The pymclevel module now includes its own yaml sub-module but the packaging process was happily ignoring it.
This should be fixed now, it affected the mcmerge-script.zip package. The pymclevel module now includes its own yaml sub-module but the packaging process was happily ignoring it.
Thanks! Now I get this though:
Traceback (most recent call last):
File "./mcmerge.py", line 5, in <module>
import ancillary, vec, carve, filter
File "/home/minecraft/server/mcmerge/carve.py", line 4, in <module>
import numpy, scipy.interpolate, numpy.random
ImportError: No module named scipy.interpolate
Traceback (most recent call last):
File "./mcmerge.py", line 5, in <module>
import ancillary, vec, carve, filter
File "/home/minecraft/server/mcmerge/carve.py", line 4, in <module>
import numpy, scipy.interpolate, numpy.random
ImportError: No module named scipy.interpolate
I installed scipy however
Ok, that looks like a problem with your scipy installation. Are you sure you installed it for the correct version of Python? When installing through a package manager, libraries may not install for the version of Python you're expecting. Also, what happens when you run this:
Just wanted to say thanks for this amazing utility. Just the sea level fix alone was worth the download. That's been bugging me since I happened on it one fine day out in my boat.
Anyway.... the merge worked flawlessly as well, after 3 hours of trimming and editing in MCEdit to get the world back to it's Alpha 1.1.2 (yes ALPHA) state, the rest of the merge ran fine. I think I will go back into MCEdit again an re-cut some of the boundaries so I don't have straight rivers all over the place, need to make the edges more wandering to mimic real rivers.
Thanks again.
Rollback Post to RevisionRollBack
D_B
To tell them how to live is to prevent them living.
I want to say thank you. Your lighting fix also worked flawlessly. The lighting issue appeared to be with the version of Bukkit I was running on the server, but your fix solved any remaining issues. My world dates way back to Alpha and now I can take it to the future. The world of EtherCraft thanks you.
If you're on windows you only need to download the mcmerge-win32 zip file (currently latest version). If it doesn't work right out of the box you'll also need the relevant Microsoft distributable, but more than likely those files already live on your system. That's it, everything you need is packaged up in there.
By coincidence I was uploading it just as you posted this. Enjoy! :smile.gif:
I went straight to giving it a try but got an error on the trace step (on both an old world, and a brand new world even):
Traceback (most recent call last):
File "mcmerge.py", line 748, in <module>
File "mcmerge.py", line 69, in trace_world
File "mcmerge.py", line 43, in __trace_edge
TypeError: __surrounding() takes exactly 2 arguments (1 given)
Thanks for the bug report. I've uploaded the fixed version.
Getting saved world contour...
Loading world...
Merging chunks:
... 0/284 (0.0%)
... 10/284 (3.5%)
... 20/284 (7.0%)
Traceback (most recent call last):
File "mcmerge.py", line 832, in <module>
File "mcmerge.py", line 556, in erode
File "mcmerge.py", line 319, in reshape
File "mcmerge.py", line 275, in remove
UnboundLocalError: local variable 'new' referenced before assignment
Background info:
I used this tool (which is spectacular, by the way) previously to merge an old world to a prerelease one, and it worked fine. I tried to be clever and change my world seed this time, and everything seemed to be working correctly (I was able to spawn in the world, run around and explore my borders, and use MCEdit to move the spawn point back to a central location. Nothing else seems to be wrong, but I can't figure out what to do with this error.
Suggestions?
Edit: I've managed to get to this point on two different Windows machines as well as a Mac, so it doesn't appear to be a prerequisites problem.
Would switching out my level.dat for a new seed have caused this problem?
One bug I found, however, with 0.4: it did not properly relight tall grass after shifting the world down. I had to use MCEdit to relight it and it took about 7 hours to relight the whole world (old world with 3.5 million chunks). MCEdit simply isn't designed with this kind of massive editing in mind, and, in fact, threw a memory error when I tried to use it to nudge the world down. Your tool is the ONLY viable option for fixing this.
I believe I speak for all of us, when I say, THANK YOU!
I don't have time to fix/test/push a new release right now so bear with me for a couple days. It's probably a good idea to push this out as 0.4.2 so look out for that.
WardenWolf - That's interesting, I'll look into the relighting issue, I've never had any problems with relighting tall grass when doing the merge phase and there really should not be any difference between them (though I didn't look at the shift phase results as carefully so I'll have to investigate).
I'm a bit scared my tool has better memory utilisation than MCEdit, because I could have put a lot more effort into getting this right but figured I'd tackle it if it was becoming a real problem for anyone. Perhaps there's a lot more cleverness in pymclevel than I anticipated.
I'm going to have to reword the cover-depth description, but wasn't able to think of something succinct that would do it better at the time. Basically the tool takes a layer of blocks from the surface of the original edge areas, and then they become the top most layer of those areas once the river valley is carved out. This option defines how deep that layer should be. This is a way of avoiding exposing the bare rock that you'd normally find if you just carved out the river valley and didn't cover it with anything.
Is there any hope in getting this to be an MCEdit filter, for ease of use reasons?
I've been playing on the same map since Alpha-something, so going back to delete chunks for the contour trace, 'reloading' the original world for merging, then doing that over again 4-5 times seems less fun/tedius than, say, finding areas of the map i wanted 'merged', selecting a large enough area, then hitting the filter button.
FASEworld | Capitalism, Hoooo! | Allods Yasker's Tower
Lighting issues occur in 2 instances with MCMerge: one, during lowering the map, and two, on border areas generated by the tool. It doesn't just occur on grass, but also on snow and any other half-block spots.
Once you fix the lighting problem on newly generated merge areas, I recommend you add a relight function to your tool that will simply relight the whole world. Your tool could do it in an hour or so, whereas MCEdit took approximately 7 hours. This will allow people to clean up any previous errors.
Fase - Unfortunately no plans for an MCEdit filter. That would require a complete rewrite in a different language and I don't have the time for that. If MCEdit could supports it, perhaps someone could write an extension to generate the contour.dat file, replacing the trace step. This would be far simpler. The syntax is simple and human readable so the extension could be fairly independent. Once again I'm not sure if I would have the time to tackle this.
WardenWolf - I couldn't identify a relighting issue, it seems to be working fine when I try it here so for now I think we can assume you're right about bugs being somewhere else. If the issue persists I'd need some kind of sample world on which this occurs to look further into this.
I have added a new relight mode to the tool so let me know how you go with it.
Regarding the memory efficiency. Java's memory management is considerably more advanced than CPython, and I certainly wouldn't call the latter light weight :tongue.gif: Java tends to eat up a lot of memory because the optimising JIT means less code sharing, but that shouldn't be a big issue when it comes to loading large MC maps. I think the credit here must go to the author of pymclevel, from what I've seen in the source there's a bit of cleverness in how the data is managed and packed.
Spectacular! Thanks so much for the quick turnaround! I was out of town over Thanksgiving, and come back to see you've already put out a fix.
Awesome work, and thanks again for such an excellent tool!
(I just successfully merged our server's world to 1.0 without issue :smile.gif:)
is there a yaml lib required? I tried to install libyaml but it would not work.
thanks a lot for the reply!
Unfortunately this did not help. I still get the same message.
I wonder if this is because I am running Python 2.6? I am using CentOS and the default python install is even older than that. I have 2 version running and use the commandline "python26 ... " to start the script.
Unfortunately I am not sure what I need to do to make sure that all of this works, and if I can use this with 2.6 anyhow. The other alternative I have is installing 3.1 but I guess that does not make it better?
Uncovery
This should be fixed now, it affected the mcmerge-script.zip package. The pymclevel module now includes its own yaml sub-module but the packaging process was happily ignoring it.
Thanks! Now I get this though:
I installed scipy however
Ok, that looks like a problem with your scipy installation. Are you sure you installed it for the correct version of Python? When installing through a package manager, libraries may not install for the version of Python you're expecting. Also, what happens when you run this:
Anyway.... the merge worked flawlessly as well, after 3 hours of trimming and editing in MCEdit to get the world back to it's Alpha 1.1.2 (yes ALPHA) state, the rest of the merge ran fine. I think I will go back into MCEdit again an re-cut some of the boundaries so I don't have straight rivers all over the place, need to make the edges more wandering to mimic real rivers.
Thanks again.
D_B
To tell them how to live is to prevent them living.