RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Region Editor for RunUO SVN 663

Region Editor for RunUO SVN 663
Version 1.7

While working on implementing custom maps, I found that region editors online were obsolete and non-functional. Since I have quite a bit of region work to do, I decided to design a new region editor for RunUO. This project was just completed today and even though I have tested every feature, there may be scenarios I just didn't plan for. If you run into any bugs, please let me know and I will correct them.

Setting up this application is rather easy. Just launch the program and specify the location of your mul files and the regions.xml file on your system.

The region map is initially displayed in a full sized grid. There is a slider to adjust the scaling of the map. Just keep in mind that as you decrease the scale of the map, the time to render each chunk takes a bit longer.

Areas can be selected on the map in two ways. For small areas, simply click and drag to highlight a section of the map on screen. For larger areas that cannot appear on screen all at once, you can simply left click on one corner of the area and then shift-click on the other corner and the whole area will highlight.

On the right, you have the Facet combobox and the list of defined regions for the selected facet. When you change facets, the map and region list is updated on the window. The bottom buttons allow you to add, modify and delete regions, sub-regions, region spawns and rectangular areas that make up the region.

At the top of the window is a Map Display button. This button will render the entire map of the selected facet into a new window. This process can be lengthy. However, the rendered image is saved to file for future use. The Map Display button will use the rendered image from that point on unless you specifically instruct the image to render again. You can double click anywhere on the large map and the small map on the main window will move to that location.

If you make a mistake with region editing, you can click the File menu and instruct the application to reload the regions from file.

Hopefully this application will help everyone that needs to work on their region files for custom worlds. Please let me know if you run into any problems with this application.

Changes in Version 1.1:
Fixed problems that required the application to be restarted after setting your mul file path and path to regions.xml.​
The application will now track when changes are made and ask you if you want to save changes when you close the application.​
The original regions.xml file will be backed up as regions.xml.bck_{timedatestamp) so you can restore any previous version of the file if needed.​
Altered the application to require .NET Framework 2.0 to comply with other applications and utilities available. The application previously required .NET Framework 4.0.​
Cleaned up some internal coding to make record tracking more efficient.​

Changes in Version 1.2:
Minor cosmetic changes in how the large map view is displayed.​
Changed the alpha highlight for region selection from orange to yellow.​
Modified the region type field to only allow characters that would be valid to use as a class name. This allows you to specify region types that may be custom to your shard. The drop-down of the combobox still contains the predefined region types in the RunUO SVN.​

Changes in Version 1.4:
Corrected errors that would cause the Region Editor to lose track of the number of regions on a facet when removing them.​
Added the ability to allow users to go directly to a specified location on the map.​
Added the ability to allow users to manually enter the coordinates and size of new areas if an area was not highlighted.​
Added a button that allows the user to remove all regions from the current facet. This is ideal for shards that are compiling regions for an entirely custom map.​

Changes in Version 1.5:
Fixed bug that would allow you to scroll the map beyond the visible area showing No Draw tiles.​
Added a compatibility option in the Options menu that will allow compatibility with older clients that only use map0.mul with a size of 6144x4096.​
Removed the 'Set Z Min' button and replaced it with a 'Modify Area' button. This button allows you to modify all the settings on the area including the Z Min.​
Changes in Version 1.6:

Significantly improved the display and scrolling speed of the main map display.​
Changes in Version 1.7:

Added additional levels of scale reduction.​
Added the ability to double-click on the main display to center the display at the selected point.​
Dougan Ironfist


  • Britain Graveyard.jpg
    Britain Graveyard.jpg
    113.6 KB · Views: 328
  • Region Modification Window.jpg
    Region Modification Window.jpg
    34.1 KB · Views: 242
  • Rendered Ter Mur.jpg
    Rendered Ter Mur.jpg
    19.5 KB · Views: 236
  • Region Editor
    416.6 KB · Views: 425


I knew procrastinating setting up new regions would pay off eventually. Nice work.

It throws this error when removing regions at times. You can ignore it a few times, but then it will throw it every single time (I was using it to remove all of RunUOs standard regions). Probably related, but it doesn't actually delete all the regions in the xml file that it says it does.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at Region_Editor.RegionEditor.removeRegion_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Also, it is very hard to navigate around on the map. Double clicking the large map will send you to the wrong place depending on the map scale you're using, and there is no place to type in coordinates manually.

It'd be nice to be able to manually input an area as well, so you don't have to use the map if you don't want to.
Thank you for your feedback! I was able to replicate the error you received and I have corrected it. The conditions that caused this error also prevented the deletion of all regions you specified.

I have posted version 1.4 of the application. I liked your ideas and I have incorporated them all. I have also added a new button that will allow you to wipe all regions from a facet.

Let me know if you run into any additional problems or have more suggestions.


Great. That works fine, haven't run into any more issues.

Any chance you can add an option to modify an existing area, like you have with regions? Currently have to delete and remake the area to adjust it.

Also, and this may be very personal, I run a horribly outdated client version where Trammel and Felucca uses the same map file. Right now, Trammel won't display at all because it can't find the map obviously. A checkbox for changing functionality to work with old clients would be appreciated.
Done and done. New version posted above. Added an Options menu where you can enable a compatibility mode. Also replaced the 'Set Z Min' button with a 'Modify Area' button.



Added a compatibility option in the Options menu that will allow compability with older clients that only use map0.mul with a size of 6144x4096.

There's a range of clients that only use map0 but has the new map size still, the 4.0-5.something clients, as well. But this works nicely. :)


Works much better, thanks.

Since it actually loads in a usable time now at a high map scale, any chance you can make it zoom out even further?
Added more levels of scaling and added the ability to double click on the main map display to center on the selected point. I tried to improve the rendering more, but graphics are far from my strong suit. This will probably be the last update for new features for the time being. I will continue to correct any errors if they are found.


Perfect. I wouldn't worry too much about the rendering, on the new max scale it takes just a second or two to render on the junk laptop I use for development. On any decent machine it won't be an issue for speed.

Haven't found any errors with it since the delete exception, and the only feature I thought of that may be nice is the ability to highlight an area without having to center on it (IE, single click highlights, doubleclick centers.) Minor though, otherwise I don't think it really needs more features.
You can highlight like that. Just left click one corner of the rectangle, then hold shift while left clicking on the other corner. You can scroll to wherever the far corner will be located. You could even highlight the entire map that way.


No, I meant already existing areas that you've already added. The only way to light them back up on the map is to double click them, which centers the map on them as well.


Suggestion: when you doubleclick the region rectangle in the list, instead of showing the region highlit on the left top corner of the map, show the region at the map center
and would be nice if we had a mouse movement or buttons to fine-tune our movement around the map

anyway, this is a great tool
thanks for sharing


I've never messed with the regions.xml file before, mostly due to the fact that I'd be afraid I'd mess something up lol. This will certainly make tinkering with it a lot easier. Great job!


I just wanted to say that I just grabbed this program and it looks awesome so far! Thanks so much for adding a much needed utility!! Karma++