Please let me know if there are various changes or additions you'd like.
Instructions:
1. You must have Python (3.x) installed, go get it if you don't http://www.python.org/download/.
2. Save (or copy) the script and interface module to the folder where your maps are (usually .../.minecraft/saves).
3. Open the script with a text editor.
4. Change the settings at the top of the file to your liking (the file includes extensive instructions). Save it.
5. Make a backup of your world (just in case!)
6. Double click the script (for debugging open it in IDLE). Wait for it to finish (can take a while, for long railroads).
7. If you had loaded the file since you started Minecraft, restart Minecraft. This prevents caching errors which could corrupt the save file!
8. Load up the map in Minecraft and and enjoy!
EDIT: Now works as a filter in MCEdit! Download this filter wrapper along with the other two files and put them all in your "MCEdit\MCEditData\filters" folder. It will make the rails at the top of the selection box (lowered with clearance for tunneling), along the longest axis. Pretty straightforward, if I do say so myself!
I like it. Adds more of a "Humans were here, but were was I?" Type of feeling.
Like Steve was set to sleep until the day he was spawned. However civilization as seceded. So he must survive in the remains of the land as long as he can. But monster threaten him in his death, so he must kill to survive, and build a house again, and re-start civilization!
I'm sorry Did I get carried away there?
Interesting script, but not really useful in it's current form. How about making it accept an array of waypoints and then make the rail system on them?
That is an excellent idea! I'm not sure how to structure the algorithm though... I'll have to think about it for a bit. Let me know if you have any implementation ideas.
UUMM me need help... could u give me a step by step tutorial on how to make it even work... im new to python
ty
EDIT: what i mean is I NEED MORE DETAIL with the instructions... sorry for any confunsion i may have caused..
First refer to this post for a philosophy overview. Then, please give me some details as to where you are stuck. Did you get Python installed? Do you know how to use a text editor? Which number on the numbered instructions in the first post did you reach?
The Meaning of Life, the Universe, and Everything.
Join Date:
3/24/2011
Posts:
59
Minecraft:
Zachzab
Member Details
This looks awesome so I want to try it. I just downloaded Python [Windows binary in some three-point-something number] and then went to download this but I don't know if I need the script,, the interface thing, or both. Help?
Could you provide this script as a filter for mcedit?
After thinking about it for a bit, I'm not sure how to make this into a filter. I'll have to think about it a bit more... give me some time, and any suggestions you can come up with.
This looks awesome so I want to try it. I just downloaded Python [Windows binary in some three-point-something number] and then went to download this but I don't know if I need the script,, the interface thing, or both. Help?
Thanks for asking! You need both the script and the interface file. If you installed Minecraft in the normal place, then you'll put them both in the "C:\Documents and Settings\<your username here, seriously fill it in>\Application Data\.minecraft\saves" folder. Refer to this post, and then follow the numbered steps and let me know where you get stuck. Good luck!
The Meaning of Life, the Universe, and Everything.
Join Date:
3/24/2011
Posts:
59
Minecraft:
Zachzab
Member Details
Okay so I got both things, double-clicked the script, then a command prompt box thing popped up [the black thing with grey text], but there wasn't text. It stayed up for maybe three seconds then closed itself. There was a new folder called "__pycache__" and when I looked in it, there was a file called "mcInterface.cpython-32" and the filetype was a "Compiled Python File". It had a different icon from the normal python things, so I thought it was weird. I double-clicked it and the same black command box thing popped up but this time it went away after only a half second. Now nothing happens when I click any of the three files. My worlds are completely unaltered.
Okay so I got both things, double-clicked the script, then a command prompt box thing popped up [the black thing with grey text], but there wasn't text. It stayed up for maybe three seconds then closed itself. There was a new folder called "__pycache__" and when I looked in it, there was a file called "mcInterface.cpython-32" and the filetype was a "Compiled Python File". It had a different icon from the normal python things, so I thought it was weird. I double-clicked it and the same black command box thing popped up but this time it went away after only a half second. Now nothing happens when I click any of the three files. My worlds are completely unaltered.
Okay, good progress! The "__pycache__" is normal, and creates a compiled version of the python script, so that it runs faster. Unfortunately, it sounds like you're getting an error of some sort. The window closes immediately when this happens, which makes the error really hard to read :tongue.gif:
Try right clicking on LineRail.py and selecting "Edit with IDLE". This should bring up a window with the script text in it. Hit F5 to run the script, which will bring up another window (which will stay open, instead of closing immediately when there's an error). The text and/or error in this new window is generated while the script runs, and should help you to figure out what is going on. If you have trouble, just post the error here, and we'll go from there.
In other news, I have a new version of the script with an McEdit filter interface all ready for testing. Should be released tonight some time.
Could you provide this script as a filter for mcedit?
As a matter of fact, yes! Version 2 is up with the associated MCEdit filter wrapper. Simple, intuitive, straightforward, and fast! What more could you ask for? (please don't answer that, I'm going to be busy playing Minecraft)
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\LineRail.py", line 141, in <module>
import mcInterface
ImportError: No module named mcInterface
>>>
I'll bet this is because you forgot to download mcInterface to the same folder where the script is. There's a link in the first post... but here it is again.
Thanks for the complete debug info! Makes it much easier to diagnose!
>>> ================================ RESTART ================================
>>>
Importing the map
Traceback (most recent call last):
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\LineRail.py", line 407, in <module>
standalone()
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\LineRail.py", line 392, in standalone
the_map = mcInterface.SaveFile(LOADNAME)
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\mcInterface.py", line 666, in __init__
self.read_dat()
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\mcInterface.py", line 963, in read_dat
this_data = NbtData(dat_data)
File "C:\Users\Grant\AppData\Roaming\.minecraft\saves\mcInterface.py", line 415, in __init__
new_tag = tag_list[key](self)
TypeError: list indices must be integers, not str
>>>
This one is, I think, because you are using Python 2.x instead of Python 3.x. Make sure you're using Python 3.1 or 3.2 and let me know if the error still shows up.
Hm, seems another problem where you have to have already explored the area for the tracks to work, otherwise the script errors. This is a little annoying as I'm trying to make a track over 11k.
Yes, the script only edits existing portions of the map. If you want to put a rail there, you need to have already generated the world in that area. I'm sure there's a way to force Minecraft to generate chunks, but this script doesn't do that.
First refer to this post for a philosophy overview. Then, please give me some details as to where you are stuck. Did you get Python installed? Do you know how to use a text editor? Which number on the numbered instructions in the first post did you reach?
i believe i got it working after wasting an hour screwin around with it lol
Add straight line rail roads to your maps. I set up customization for most of the parameters.
Download the script: http://www.peripheralarbor.com/minecraft/LineRail.py (latest version, 2)
Download the interface module: http://peripheralarbor.com/minecraft/mcInterface.py (latest version, 6)
Please let me know if there are various changes or additions you'd like.
Instructions:
1. You must have Python (3.x) installed, go get it if you don't http://www.python.org/download/.
2. Save (or copy) the script and interface module to the folder where your maps are (usually .../.minecraft/saves).
3. Open the script with a text editor.
4. Change the settings at the top of the file to your liking (the file includes extensive instructions). Save it.
5. Make a backup of your world (just in case!)
6. Double click the script (for debugging open it in IDLE). Wait for it to finish (can take a while, for long railroads).
7. If you had loaded the file since you started Minecraft, restart Minecraft. This prevents caching errors which could corrupt the save file!
8. Load up the map in Minecraft and and enjoy!
EDIT: Now works as a filter in MCEdit! Download this filter wrapper along with the other two files and put them all in your "MCEdit\MCEditData\filters" folder. It will make the rails at the top of the selection box (lowered with clearance for tunneling), along the longest axis. Pretty straightforward, if I do say so myself!
Like Steve was set to sleep until the day he was spawned. However civilization as seceded. So he must survive in the remains of the land as long as he can. But monster threaten him in his death, so he must kill to survive, and build a house again, and re-start civilization!
I'm sorry Did I get carried away there?
Hmm. It shouldn't be adding extra folders in the save folder. Something is going wrong here, but I'm not sure what. Can you give me more details?
That is an excellent idea! I'm not sure how to structure the algorithm though... I'll have to think about it for a bit. Let me know if you have any implementation ideas.
I'm gonna try it.
ty
EDIT: what i mean is I NEED MORE DETAIL with the instructions... sorry for any confunsion i may have caused..
First refer to this post for a philosophy overview. Then, please give me some details as to where you are stuck. Did you get Python installed? Do you know how to use a text editor? Which number on the numbered instructions in the first post did you reach?
After thinking about it for a bit, I'm not sure how to make this into a filter. I'll have to think about it a bit more... give me some time, and any suggestions you can come up with.
Thanks for asking! You need both the script and the interface file. If you installed Minecraft in the normal place, then you'll put them both in the "C:\Documents and Settings\<your username here, seriously fill it in>\Application Data\.minecraft\saves" folder. Refer to this post, and then follow the numbered steps and let me know where you get stuck. Good luck!
Okay, good progress! The "__pycache__" is normal, and creates a compiled version of the python script, so that it runs faster. Unfortunately, it sounds like you're getting an error of some sort. The window closes immediately when this happens, which makes the error really hard to read :tongue.gif:
Try right clicking on LineRail.py and selecting "Edit with IDLE". This should bring up a window with the script text in it. Hit F5 to run the script, which will bring up another window (which will stay open, instead of closing immediately when there's an error). The text and/or error in this new window is generated while the script runs, and should help you to figure out what is going on. If you have trouble, just post the error here, and we'll go from there.
In other news, I have a new version of the script with an McEdit filter interface all ready for testing. Should be released tonight some time.
As a matter of fact, yes! Version 2 is up with the associated MCEdit filter wrapper. Simple, intuitive, straightforward, and fast! What more could you ask for? (please don't answer that, I'm going to be busy playing Minecraft)
Enjoy!
I'll bet this is because you forgot to download mcInterface to the same folder where the script is. There's a link in the first post... but here it is again.
Thanks for the complete debug info! Makes it much easier to diagnose!
Edit: Drat, you beat me to it!
This one is, I think, because you are using Python 2.x instead of Python 3.x. Make sure you're using Python 3.1 or 3.2 and let me know if the error still shows up.
Yes, the script only edits existing portions of the map. If you want to put a rail there, you need to have already generated the world in that area. I'm sure there's a way to force Minecraft to generate chunks, but this script doesn't do that.
i believe i got it working after wasting an hour screwin around with it lol
Keep calm and carry on!
Dlljs.