Page 1 of 1

A way to export single floor into a file?

Posted: Sun Oct 07, 2012 1:04 am
by Trollmann
As the topic says. Is there a way?

I started doing a test dungeon where I just did another floor for each test I had in mind, but some of them grew to be pretty large and awesome in the terms of classic Grimrock game play feeling,
so I was thinking to add them in my another non-test dungeon which already has a few ~complete floors.

Now, I will re-create everything I've done from scratch if I have to, but it would help greatly if there is a way to export and import single floor into dungeon.

At least copying the assets to another project works :) Would be nice if we could copy and paste the wall layout too. Just suggestions!

Re: A way to export single floor into a file?

Posted: Sun Oct 07, 2012 1:06 am
by crisman
you can try oper dungeon.lua in script folder, and copy and paste the data of the level you are interested into the dungeon.lua of your choice.

Re: A way to export single floor into a file?

Posted: Sun Oct 07, 2012 1:07 am
by JohnWordsworth
You should just be able to copy the dungeon floor definition from dungeon.lua in your mod_assets/scripts. Copying the 'spawn('...')' messages and the like should even copy all of the objects on that floor. You might want to close the Dungeon Editor first (so it doesn't overwrite your new dungeon.lia script while you work on it.

Edit: Haha, @crisman you must have pipped me to the post (button) by a few seconds! Lol

Re: A way to export single floor into a file?

Posted: Sun Oct 07, 2012 1:11 am
by Trollmann
Oh, sweet. Didn't know the actual maps are also in .LUA format :) I just started creating my own dungeons few days back, but I'm learning quick!

Would still be nice if the feature to import / export was added, maybe in the same box where your current levels are listed. Right-click -> Export / Import etc. Maybe in future :)
Thanks, I will try out copying the dungeon data from the .LUA files.

Re: A way to export single floor into a file?

Posted: Sun Oct 07, 2012 10:33 am
by Montis
also make sure all level references from scripts or teleports refer to the correct levels when moving them up/down or into another dungeon :)

in scripting it is advised anyway to use self.level (self always refering to the script entity until otherwise defined)