So I ported the Rot.js Digger Dungeon generator over to Torquescript.
https://github.com/ZSNO/Rot.tqs_DungeonUse it however you like, but if you do please gimme credit for the port.
Execute map.cs to load all scripts.
To initialize RotMap for generating call
RotMap.call(width,height);
Then call
RotMap.create();
For a pretty dungeon to be outputted to your console.
The map is stored via
RotMap.map.m[x,y]
so if you want to access them use that syntax
The doors between features are stored in each room's data.
So you can basically get to them by going through
RotMap.rooms.r[room number].doors.getObject(door number);
(I'm too lazy to convert rooms to a simgroup so get the count of rooms by using rooms.count)
Rooms start at 1 and go up, e.g. r1, r2, r3 . . .
The door coords are stored via .x and .y
EX:
%x = RotMap.rooms.r[1].doors.getObject(0).x;
You can stop it from echoing the map to console by deleting line #82 in digger.cs
dumpMapToConsole();
Btw all the map data is deleted by the end of the .create(); function, so get all the data you wanted by then.
If you need any further explanation on anything, please ask.
Also yes I know somethings could probably have been done in a better way.
Feel free to fix it up if you want.