• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[Tool] Maze Creator

RStijn

Emulation Addict
This tool lets you easily create a maze you can import into your world database.

Features:
- Build a maze with gameobjects & place it anywhere in the game
- Easy to use
- Tools to help you build the maze faster
- Save maze for later editing
- 3D mazing & stairs (new)
- Secrets & traps (new)

This video shows how the tool works and the result. (video has older version)
This tool is still in development so check back for updates soon!


Download Maze Creator (latest version)
Example Maze - On the top of GM Island mountain.
Source Code
 
Last edited:

slp13at420

Mad Scientist
while trying this out I found a glitch.
it wont support `float` values :
using
TC 3.3.5a
map 0, x -13193.594727, y 272.216614, z 21.857849
15, 15
height 2

this is the value that is generated into the sql :
Code:
INSERT INTO `gameobject`(`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(745000,0,1,1,-13193594727,272216614,21857849,0,0,0,0,0,0,0,0),
(745000,0,1,1,-13193594727,272216614,21857874,0,0,0,0,0,0,0,0),
so I tryd again with only the whole value
map 0, x -13193, y 272, z 21
15, 15
height 2

and they spawned in the near proper xyz buti noticed rather than adding 0.100 its adding 100 so the box's are spaced apart:
IrdeW3K.png


this is definitely a tool I want keep up the good work n hope to see a finished end product :D


but then I think I fixed it ... or more precise the float for xyz...

and now I have this :
wZbdFAF.png


ok I edited Form1.cs line 23 to 33
Code:
            mazeConfig[0] = textBox1.Text;
            mazeConfig[1] = textBox2.Text;
            mazeConfig[2] = textBox3.Text;
            mazeConfig[3] = textBox4.Text;
            mazeConfig[4] = textBox5.Text;
            mazeConfig[5] = checkBox1.Checked.ToString();
            mazeConfig[6] = checkBox2.Checked.ToString();
            mazeConfig[7] = textBox6.Text;
            mazeConfig[8] = textBox7.Text;
            mazeConfig[9] = textBox8.Text;
            mazeConfig[10] = textBox9.Text;

then I edited Creator.cs line 18,19
Code:
        string         X_COUNT;
        string         Y_COUNT;
line 33,34
Code:
            X_COUNT = string.Parse(mazeConfig[3]);
            Y_COUNT = string.Parse(mazeConfig[4]);

:cheers:

this tool is shweeet double thumbs up :D

oh an idea for tools. `fill whole board` so its easier for some to just unclick for the path.
 
Last edited:

RStijn

Emulation Addict
That's odd. I had this issue in an earlier revision..
I'll look into that and add a tool for filling the whole board. :)
Thanks for reporting!
 

RStijn

Emulation Addict
I added fill maze / clear maze tools.

As for the issue you're having, is it possible you have an earlier version?
This issue is caused by double values not being parsed correctly since . isn't being changed to , like so:

Code:
 mazeConfig[0] = textBox1.Text;
            mazeConfig[1] = textBox2.Text.Replace('.',',');
            mazeConfig[2] = textBox3.Text;
            mazeConfig[3] = textBox4.Text;
            mazeConfig[4] = textBox5.Text;
            mazeConfig[5] = checkBox1.Checked.ToString();
            mazeConfig[6] = checkBox2.Checked.ToString();
            mazeConfig[7] = textBox6.Text.Replace('.', ',');
            mazeConfig[8] = textBox7.Text.Replace('.', ',');
            mazeConfig[9] = textBox8.Text.Replace('.', ',');
            mazeConfig[10] = textBox9.Text;

During the input, double values should have a comma.
Only when exported to SQL do they need to become a period.
 
Last edited:

slp13at420

Mad Scientist
oooh now this idea hmmm dunno ... since there is nooooooo size limit woooohooooo :D I want to do a 500x500 maze buuutt my idea is to be able to save your map project and reopen it later to continue to edit/change in the easy use click the box interface.

ohh a select your core feature for configs first screen/setup screen. TC, Mangos, ArcEmu, ....

you got a kick-ass tool :D now to add some features and make Just !!INSANE!!

again triple thumbs up to this !!
 

slp13at420

Mad Scientist
Sorry for the delay.
Working on open/save feature now.

yea you don't rush things like this lol you let them simmer and acquire flavor.

yea I think that would be awesome to be able to trade map files with each other lol or save bigger projects for editing later.

on another note something to think over . 3d maze . or better , floors. I've been thinking it over and I think it could be done but my C++ skills are nooooooooooooooobish lol.
rather than storing each position value as (no gameobject/yes gameobject) rather store as: No GO, GO, stair up point, stair down point, No floor GO.
Stair up point could be spawned 4 or 5 chairs vertical to go up with.
stair down point would line up with lower stair up point.
no floor Go would remove the floor GO creating a whole in the floor to fall thru to the lower level.

default would be yes GO but right click a selected block to change.

its an idea I had that kept rolling around in my head.
ughh think of the mind fuck mazes to get lost in :rofl:

Still awesome job tnx.
 
Last edited:

RStijn

Emulation Addict
The lastest version now supports Opening / saving a maze for later editing. :D
I also like the floors idea, I'd like to implement that too.

My problem with that is though, if too many objects are spawned too close to eachother, it can cause massive server lag. Especially with multiple players in the maze.
It's managable in 2d but I think 3d might be too much.
I'll clean up the code i have first, then do some tests to see how many floors it can handle without causing too much lag.
 
Last edited:

slp13at420

Mad Scientist
:D luvin this tool !!

k I cloned your repo and compiled the tool.
starting with a simple 15x15 using default GO and make floor and roof , wall height 2.

selected fill maze and then clicked out a simple pathand saved:
9oIAvMJ.png


then I opened maze file:
Hc9Q2r1.png

just clears the last row , nothing major . the generated sql file seems to have the last row proper.

now ppl can make there own kewl custom maps and share them with there buddies!!

I cloned the repo this morning. I had to edit Form1.cs to allow `.` floats:
Code:
            {
                string mazeConfig = textBox1.Text+
                '|' + textBox2.Text +
                '|' + textBox3.Text +
                '|' + textBox4.Text +
                '|' + textBox5.Text +
                '|' + checkBox1.Checked.ToString() +
                '|' + checkBox2.Checked.ToString() +
                '|' + textBox6.Text +
                '|' + textBox7.Text +
                '|' + textBox8.Text +
                '|' + textBox9.Text;
                this.Hide();
                Creator c = new Creator(mazeConfig);
            }

and now it does floats :D
 
Last edited:

RStijn

Emulation Addict
I just looked into it and you're right, those lines shouldn't be there.The double values get parsed correctly either way.
It's only when adding too many numbers that the output gets corrupted.
Adding some protection for that and allowing the config to be modified after maze is created.
 
Last edited:

slp13at420

Mad Scientist
:jaw:

and cloning.

saved and reloaded. no glitch with the last row being cleared. :rock:

!! And I can edit the coords !!

I created an sql file and it dropped the float again:
Code:
INSERT INTO `gameobject`(`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(745000,1,1,1,15400604980,-4736559082,339959930,0,0,0,0,0,0,0,0),

NE of Orgrimmar.
x 1540.0604980
y -4736.559082
z 339.959930
 
Last edited:

RStijn

Emulation Addict
That's very strange. I input those same coordinates and they export just fine:
(745000,0,1,1,1540.060498,-4736.559082,339.95993,0,0,0,0,0,0,0,0),

It currently has a very detailed check to ensure this doesn't happen at all.
I don't know how this issue is caused or why it doesn't happen on my end.
I suggest you just live with using rounded integer numbers with no comma. :/
 
Last edited:

slp13at420

Mad Scientist
let me clone your repo again and try again.
I might have grabbed it too soon lol.

ok I cloned your repo again (https://github.com/RStijn/MazeCreator), compiled release, and made a 15x15:
PLQNDAi.png


and yes those are comma's in that pic.
and I retried step by step today:

XwjIlGy.png


and it changed the `.` to `,` period's to comma's weird .

but then I rem'd out ConfigForm.cs line 133:
Code:
//            p = p.Replace('.', ',');

JhHcWOh.png
 
Last edited:

RStijn

Emulation Addict
I think I know why this happens.
It has to do with the language of your PC, that's why it works fine on my end and not on your end.
Also the SafeDouble() I put in before is pointless and terrible in every way, what was i thinking. <<
Uploaded a fix. Please let me know if that solves it.
 
Last edited:
Top