Great job. I wish i could use it though, i get to open it through command prompt, but its always errors and gets impossible after being opened, Really nice, but I'm going to have to sit back until a GUI is out, I'm on XP and i don't want python.
Anyway, Good work, Keep it up.
Okay, here's a simple batch file that SHOULD make this program -much- easier to use for the end-user if they're running a Windows system. Copy and paste it into a new text file then save that file as MCDungeon_Launcher.bat in the same director as mcdungeon.exe!
@echo off
Name: MCDungeon_Launcher.bat
Author: SoNick
Date: 3/31/2011
Description: A simple batch file for running Eggplant!'s MCDungeon program
:setNorSou
cls
SET /P norSou=Please enter the number of rooms North/South (No less than 3):
if %norSou% GEQ 3 (
goto :setEasWes
) else (
echo That number is too small!
pause
goto :setNorSou
)
:setEasWes
cls
SET /P easWes=Please enter the number of rooms East/West (No less than 3):
if %easWes% GEQ 3 (
goto :setFloors
) else (
echo That number is too small!
)
pause
goto :setEasWes
:setFloors
cls
SET /P floors=Please enter the number of floors (No less than 2):
if %floors% GEQ 2 (
goto :setWorldName
) else (
echo That number is too small!
)
pause
goto :setFloors
:setWorldName
cls
SET /P worldName=Please Enter the name of the World to add a Dungeon to:
if exist (%worldName%) (
goto :setHTML
) else (
echo %worldName% does not exist!
)
pause
goto :setWorldName
:setHTML
cls
SET /P setHTML=Would you like to the program to generate HTML maps of the dungeon? (Y/N)
if /i %setHTML%==Y (goto :mcDungeon_html)
if /i %setHTML%==YES (goto :mcDungeon_nohtml)
:mcDungeon_html
@echo on
mcdungeon -w "%worldName%" %norSou% %easWes% %floors% --html "%worldName%" --force --t %floors% --write
@echo off
pause
GOTO:EOF
:mcDungeon_nohtml
@echo on
mcdungeon -w "%worldName%" %randNorSou% %randEasWes% %randFloors% --t %floors% --write
@echo off
pause
GOTO:EOF
Quote from Eggplant! »
Don't bother scripting the random dungeon sizes. I've already added it! I've also added cookies, and other stuff from 1.4. I should have a small update posted later tonight.
Ha, I really should have checked the topic before replies before going to work on the project!
I do have a randomized one written and ready to go, but I'll hold off on releasing it here in favor of waiting on you to release the updated version of the program.
Oh, and feel free to include the launcher above with future releases of the Windows EXE release if you'd like; it may reduce the number of "How do I use this program?" questions in the future.
Nice! A couple of things... if you can fix them, I'll include it.
[*:1wlnhp36] The actual minimums are 2 x 2 and one level deep.
[*:1wlnhp36] I had problems with the script always telling me the map dir did not exist. I had to comment that part out to get it to run.
[*:1wlnhp36] It always generates HTML pages, even if you say no.
[*:1wlnhp36] the _nohtml routine uses the wrong variables for Z, X, and LEVELS
Also... the way I did randomness for Z, X, and LEVELS was to enter them as -1. So, in the next version valid entries are--
[*:21w6fhf2] Added the HTML images to the winexe zip file (forgot these in v0.0.1)
[*:21w6fhf2] Added Cookie and Locked Chest to items.txt.
[*:21w6fhf2] Added Cookie to default loot tables.
[*:21w6fhf2]Reworked the --offset option. It now takes three args instead if just one.
[*:21w6fhf2]Z, X, and LEVELS args now accept -1 as a value. This will cause the tool to pick random values for these. Z and X will between 2 and the maximum distance between dist_min and dist_max in the .cfg file. Levels will be between 2 and 8. This should maximize the chance that the dungeon will fit into the map, unless the map has a ton of very shallow chunks around spawn.
Rollback Post to RevisionRollBack
MCDungeon - Procedural Dungeons
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
Nice! A couple of things... if you can fix them, I'll include it.
[*:2gr85cuc] The actual minimums are 2 x 2 and one level deep.
Ah, oops! I was -close- at least..! =P
[*:2gr85cuc] I had problems with the script always telling me the map dir did not exist. I had to comment that part out to get it to run.
Hm... I played with it a bit and noticed that the way I had it previously broke on names without spaces. I've fixed this and done some extensive testing and I -think- It's fixed for good. Typing out the long name for a directory works fine as well; I hadn't tested that on the previous version but it should be fine. Quotation marks around the name would also have broken the previous version, and that's also fixed.
[*:2gr85cuc] It always generates HTML pages, even if you say no.
Ah, found the cause of that and fixed it!
It was a rather simple mistake in my "re-teach myself batchfile scripting;" one variation of ("Y") would lead to HTML, one ("Yes") no HTML; entering neither would continue past that, right into where the "HTML" stuff starts. I've fixed the checks as well as moving the "No HTML" lines up in the file so that if something does manage to make it past the checks it will simply flow into the "No HTML" stuff.
[*:2gr85cuc] the _nohtml routine uses the wrong variables for Z, X, and LEVELS
Haha, oops! I really should use copy-paste and Find&Replace more often to reduce the likelihood of stuff like this happening! It's fixed now
Also... the way I did randomness for Z, X, and LEVELS was to enter them as -1. So, in the next version valid entries are--
@echo off & setLocal enableDelayedExpansion
Name: MCDungeon_Launcher.bat
Author: SoNick
Date: 3/31/2011
Description: A simple batch file for running Eggplant!'s MCDungeon program
Version: 1.1
:setNorSou
@echo off
cls
SET /P norSou=Please enter the number of rooms North/South (No less than 2, or enter -1 for random):
if %norSou% GEQ 2 (
goto :setEasWes
) else (
if %norSou% NEQ -1 (
echo That number is too small!
pause
goto :setNorSou
) else (
goto :setEasWes
)
)
:setEasWes
@echo off
cls
SET /P easWes=Please enter the number of rooms East/West (No less than 2, or enter -1 for random):
if %easWes% GEQ 2 (
goto :setFloors
) else (
if %easWes% NEQ -1 (
echo That number is too small!
) else (
goto :setFloors
)
)
pause
goto :setEasWes
:setFloors
@echo off
cls
SET /P floors=Please enter the number of floors (Enter -1 for random):
if %floors% NEQ 0 (
goto :setWorldName
) else (
echo I'm sorry, but 0 is not a valid number of floors!
)
pause
goto :setFloors
:setWorldName
@echo off
cls
SET /P worldName=Please enter the name of the World to add a Dungeon to:
SET worldName=%worldName:"=%
if exist (%cd%\%worldName%\level.dat) (
goto :setHTML
) else (
echo %worldName% does not exist!
)
pause
goto :setWorldName
:setHTML
@echo off
cls
SET /P setHTML=Would you like to the program to generate HTML maps of the dungeon? (Y/N)
if /i %setHTML%==Y (
goto :mcDungeon_html
) else (
if /i %setHTML%==yes (
goto :mcDungeon_html
) else (
goto :mcDungeon_nohtml
)
)
:mcDungeon_nohtml
@echo on
mcdungeon -w "%worldName%" %norSou% %easWes% %floors% --write
@echo off
pause
GOTO:EOF
:mcDungeon_html
@echo on
mcdungeon -w "%worldName%" %norSou% %easWes% %floors% --html "%worldName%" --force --write
@echo off
pause
GOTO:EOF
Thanks for the bug report there!
EDIT: Wow, a single % missing was hampering fully random dungeon generation.
I've fixed it and looked over the code; it was the only one missing. This should work fine now!
Desktop\mcdungeon-winexe-0.0.2\mcdungeon-winexe-0.0.
2\mcdungeon.exe -w "%APPDATA%\.minecraft\saves\111" 4 4 8 --term 8 --write
Reading items database: items.txt ...
Error reading items file: [Errno 2] No such file or directory: 'items.txt'
Traceback (most recent call last):
File "<string>", line 69, in <module>
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 436, in importHo
ok
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 521, in doimport
File "mcdungeon\build\pyi.win32\mcdungeon\outPYZ1.pyz/cfg", line 2, in <module
>
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 436, in importHo
ok
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 521, in doimport
File "mcdungeon\build\pyi.win32\mcdungeon\outPYZ1.pyz/materials", line 4, in <
module>
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 436, in importHo
ok
File "c:\Users\Tyler\Desktop\pyinstaller-1.5-rc1\iu.py", line 521, in doimport
File "mcdungeon\build\pyi.win32\mcdungeon\outPYZ1.pyz/items", line 63, in <mod
ule>
File "mcdungeon\build\pyi.win32\mcdungeon\outPYZ1.pyz/items", line 29, in Load
Items
UnboundLocalError: local variable 'items_txt' referenced before assignment
The Meaning of Life, the Universe, and Everything.
Location:
Ponderay
Join Date:
3/15/2011
Posts:
63
Member Details
I have no idea why it won't work for me, I have the standalone version.
I should be able to just unzip it to an empty directory, yes? When I click to run it, it says "too few arguments" then the window immediately closes. I am sure it says more, but it pops up and closes before I can read much more than that.
I will wait to see what the next release has. xD
btw, I am really quite sure this is just an issue I have. Not a complaint post, just wanted to say how neat this mod looked, and how I am looking forward to seeing myself being able to figure out how to get it to work. xD
**EDIT**
I thought I read all the comments from the first page, but obviously I did not, I apologize! I do end up with this as my error on my command prompt:
Would you like to the program to generate HTML maps of the dungeon? (Y/N) y
C:\Games\Minecraft\mcdungeon-winexe-0.0.2>mcdungeon -w "don't die" 10 10 3 --htm
l "don't die" --force --write
Reading items database: items.txt ...
Loaded 230 items.
Reading config from mcdungeon.cfg ...
Reading loot tables...
Dungeon size: 10 x 10 x 3
Failed to open world: don't die
Press any key to continue . . .
Do I need to alter the permissions for the world? I have minecraft closed when running this.
Hmmm.. the parenthesis around the path in your IF EXIST statement seem to confuse it on my system. If I remove them, it works.
Ah, the reference documents I read didn't have them on any of the if statements but it looks messy to me without them. Still, if removing them got it to work then that's clearly more important than a stylistic thing..! Removing them didn't cause any errors on my 32-bit XP install either, so that looks like that's the last major bug ironed out!
Xanadar: That's in the python script and not my simple batch file, so I can't help you with that; my best guess is that as you stated the post you don't have the permissions for your world set correctly? If that doesn't fix it then I'm lost; I haven't even peeked at Eggplant!'s code yet.
Anyway, Good work, Keep it up.
I'd really like to help you out here, but I don't know what you mean by "gets impossible after being opened"
Can you copy/paste the error?
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
Could you add an option to generate a road that goes from your spawn point to the dungeons?
Ha, I really should have checked the topic before replies before going to work on the project!
I do have a randomized one written and ready to go, but I'll hold off on releasing it here in favor of waiting on you to release the updated version of the program.
Oh, and feel free to include the launcher above with future releases of the Windows EXE release if you'd like; it may reduce the number of "How do I use this program?" questions in the future.
Nice! A couple of things... if you can fix them, I'll include it.
[*:1wlnhp36] The actual minimums are 2 x 2 and one level deep.
Also... the way I did randomness for Z, X, and LEVELS was to enter them as -1. So, in the next version valid entries are--[*:1wlnhp36] I had problems with the script always telling me the map dir did not exist. I had to comment that part out to get it to run.
[*:1wlnhp36] It always generates HTML pages, even if you say no.
[*:1wlnhp36] the _nohtml routine uses the wrong variables for Z, X, and LEVELS
Z: -1 (random), 2, 3, 4, etc...
X: -1 (random), 2, 3, 4, etc...
LEVELS: -1 (random), 1, 2, 3, 4... 18.
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
Interesting... Might be tricky. What if the tower ends up on the edge of a cliff, like in one of the screenshots above?
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
Yeah, i used the example on the forum, Please help with this.
The blacked out areas are my name, i don't really want to post it here so i removed them.
You *almost* have it. Because your path to the world directory contains spaces, you need to enclose it in quotes. Try this:
(I should update my example)
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
EDIT: I have my test map backed up, and can put a dungeon on it, if you need some pics, just ask!
[*:21w6fhf2] Added the HTML images to the winexe zip file (forgot these in v0.0.1)
[*:21w6fhf2] Added Cookie and Locked Chest to items.txt.
[*:21w6fhf2] Added Cookie to default loot tables.
[*:21w6fhf2]Reworked the --offset option. It now takes three args instead if just one.
[*:21w6fhf2]Z, X, and LEVELS args now accept -1 as a value. This will cause the tool to pick random values for these. Z and X will between 2 and the maximum distance between dist_min and dist_max in the .cfg file. Levels will be between 2 and 8. This should maximize the chance that the dungeon will fit into the map, unless the map has a ton of very shallow chunks around spawn.
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
Ah, oops! I was -close- at least..! =P
Hm... I played with it a bit and noticed that the way I had it previously broke on names without spaces. I've fixed this and done some extensive testing and I -think- It's fixed for good. Typing out the long name for a directory works fine as well; I hadn't tested that on the previous version but it should be fine. Quotation marks around the name would also have broken the previous version, and that's also fixed.
Ah, found the cause of that and fixed it!
It was a rather simple mistake in my "re-teach myself batchfile scripting;" one variation of ("Y") would lead to HTML, one ("Yes") no HTML; entering neither would continue past that, right into where the "HTML" stuff starts. I've fixed the checks as well as moving the "No HTML" lines up in the file so that if something does manage to make it past the checks it will simply flow into the "No HTML" stuff.
Haha, oops! I really should use copy-paste and Find&Replace more often to reduce the likelihood of stuff like this happening! It's fixed now
Okay, the prompts are updated!
Here's Version 1.1:
Thanks for the bug report there!
EDIT: Wow, a single % missing was hampering fully random dungeon generation.
I've fixed it and looked over the code; it was the only one missing. This should work fine now!
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
It can't find the items.txt file. Be sure you run the .exe from within the mcdungeon directory. cd into Desktop\mcdungeon-winexe-0.0.2 first.
I need to improve the error checking here.
Or try SoNick's batch file. :smile.gif:
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
I do not quite understand, you can detail Tell instructions. or an instruction video
I use the Standalone Windows version:
Sorry, please wait for the next release. This will be easier.
The volume of a pizza of thickness a and radius z can be described by the following formula: pi*z*z*a
damn I really want to try this program. Okay wait following items release. At least can give me a map to see how these caves?
I should be able to just unzip it to an empty directory, yes? When I click to run it, it says "too few arguments" then the window immediately closes. I am sure it says more, but it pops up and closes before I can read much more than that.
I will wait to see what the next release has. xD
btw, I am really quite sure this is just an issue I have. Not a complaint post, just wanted to say how neat this mod looked, and how I am looking forward to seeing myself being able to figure out how to get it to work. xD
**EDIT**
I thought I read all the comments from the first page, but obviously I did not, I apologize! I do end up with this as my error on my command prompt:
Do I need to alter the permissions for the world? I have minecraft closed when running this.
Ah, the reference documents I read didn't have them on any of the if statements but it looks messy to me without them. Still, if removing them got it to work then that's clearly more important than a stylistic thing..! Removing them didn't cause any errors on my 32-bit XP install either, so that looks like that's the last major bug ironed out!
Xanadar: That's in the python script and not my simple batch file, so I can't help you with that; my best guess is that as you stated the post you don't have the permissions for your world set correctly? If that doesn't fix it then I'm lost; I haven't even peeked at Eggplant!'s code yet.