How to use a python script to make a bunch of dungeons at once...

Maps How to use a python script to make a bunch of dungeons at once... 1.0

No permission to download
This is well worth getting it all set up as it saves you from having to try being creative. Its a really creative script. The amount of clicking involved in the creation of the squares would take a long time and its done in the blink of an eye! Here are the instructions for getting it to run.

  • Python installed on your system
  • PIL (Python Imaging Library) installed
Step 1: Install Python

  • Visit the official Python website ( and download the latest version of Python for your operating system.
  • Follow the installation instructions provided on the website.
Step 2: Install PIL

  • Open a command prompt or terminal.
  • Run the following command to install PIL using pip (Python package installer):

    Copy code
    pip install pillow
  • Wait for the installation to complete.
Step 3: Save the script

  • Open a text editor (e.g., Notepad, Sublime Text, or Visual Studio Code).
  • Copy and paste the entire script into the text editor.
  • Save the file with a .py extension (e.g.,
Step 4: Run the script

  • Open a command prompt or terminal.
  • Navigate to the directory where you saved the script file using the cd command. For example:

    Copy code
    cd C:\path\to\your\script
  • Run the script by executing the following command:

    Copy code
  • The script will generate a dungeon map and save it as "dungeon_map_large.bmp" in the same directory.
Step 5: View the generated dungeon map

Once you get the script running just chop out a section with all 4 colors and paste it into your uo landscaper map under RGB mode the first time full size. Now set the mode to Exact mode. This will allow you to shrink the dungeons without artifacts around the edges. Now cut out the colors you pasted in while still remaining in this exact mode. Save the image as "terrain 3" or whatever you would like to call it.


Now start generating dungeons cutting them, pasting them in, and resizing them... 2.5 inches seems to be a nice big dungeon. You can rotate and flip the image too dont forget to try that but also dont forget to keep the lines strait, so the transitions work properly.

Once you have the desired amount of dungeons you can now paint them with the desired tiles. I recommend the dungeon cave transition folder stuff.


You can be uniform with you dungeons and turn of contiguous so your dungeons all resemble eachother only different layouts or you can try to use your own ideas. I simply used swamp, marble, green marble, shallow water, lava, and small dirt with contiguous off then i went through and fixed it up a bit to my liking.


So in the picture above you can see there is a line around the edge you wont have that yet and for good reason... You dont want that yet. Set your map as indexed color and set it to the terrain aco. Save as "terrain.bmp" as 8bit.

Now if you have a currently working altitude map you will want to cut this section of the terrain map into your altitude map but if you are starting from scratch or are still just building the terrain like me just save the terrain as altitude.bmp so you have a perfect outline.

No go back to terrain.bmp because we need to make that line.

Sellect all your dungeons and then go to the "Select" tab... Go to "Modify"... Go to "Contract"... Enter "2" hit enter. Select inverse... Now carefully fill in those lines with the paint bucket tool and the dungeon cave color. You can do this in about 4 clicks if you deselect everything except your dungeons and turn off contiguous.

Now save as Terrain.bmp again and head back to altitude.bmp where there is no line to deal with! You will thank yourself for this later.

Now all you have to do is set the altitudes. You can use my smooth map modded UOL or use the original UOL its up to you! I honestly dont know if it matters I havent really messed with the origina I only mess with the modded version now so here is what mine looks like... You cant really cheat with the contiguous tool with the altitude but it goes pretty quickly! just go down 22 shades for each block!


Thats it! Save in index mode with the custom altitude aco and BOOM you have a but load of deco and spawning to do! :p

First release
Last update
0.00 star(s) 0 ratings