Help! My dungeon won't load!

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
SharinaDarkstar
Posts: 29
Joined: Fri Jun 29, 2012 1:47 pm

Help! My dungeon won't load!

Post by SharinaDarkstar »

I've been working on this huge 24 level dungeon for weeks, and today have spent the entire day designing a new level.

Just now, I pressed the play button in the editor to test my latest changes and a message immediately appeared saying "Software failure - attempt to index a nil value" and the editor crashed.
Now, I can't load my dungeon. Every time I try to do so in the editor, it says something like "map.lua: 0 attempt to index a nil value" and won't load.
What do I do?

:(
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Help! My dungeon won't load!

Post by Neikun »

Something like that happened to me today when I changed a part of the physical model of an ogre. I figured the animations didn't like that. Did you change the model of anything that animates?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Help! My dungeon won't load!

Post by msyblade »

When u built the most recent level, did you make changes to your external scripts? Like items.lua/objects.lua/materials.lua? If so, delete the changes, save the file and rerun the dungeon. This problem is (Hopefully!) the result of a small error in an external script, but the offending object is placed in the dungeon so the dungeon cannot load. The problem is that any objects you have placed already, must be defined perfectly to load the dungeon, so think hard about any small changes you made to a scripted object you have already placed in your dungeon.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
SharinaDarkstar
Posts: 29
Joined: Fri Jun 29, 2012 1:47 pm

Re: Help! My dungeon won't load!

Post by SharinaDarkstar »

Unfortunately, I haven't made any changes to scripts or anthing else outside the editor all day. The only thing I did between the dungeon running and it failing to load was place some standard doors on the map in the editor.
I guess that, because the editor crashed when pressing play, it has trashed my dungeon - although I don't know why it would've been saving while pressing play. Perhaps it trashed the dungeon the last time I pressed save?

Luckily, I had the foresight to backup the entire dungeon folder this morning before I started on the new level - and although it's taken all day to create the new level I do, of course, now know what I did and how may lua script entities were working so it shouldn't take another day to redo it.

Where does the editor save the on map lua script entities for the dungeon? Perhaps there's an error in the map script entities that stops it loading, and if I could find the lua file that contains in map entities, I could edit it?
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: Help! My dungeon won't load!

Post by Brodie301 »

If I'm not mistaken its the dungeon.lua in scripts. If you post a pic of crash screen I'm sure someone can give a better answer.
The FORCE is with me!!!
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Help! My dungeon won't load!

Post by msyblade »

I am SO glad to hear you had it backed up. That is such a relief. I would be pained to hear the tale of the modder that lost a 24 floor dungeon. Would lose a little part of my soul.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
SharinaDarkstar
Posts: 29
Joined: Fri Jun 29, 2012 1:47 pm

Re: Help! My dungeon won't load!

Post by SharinaDarkstar »

Thank you - I'm looking forward to releasing it, although you're likely to get a preview with a few levels to start with as there are lots of multilevel puzzles which would simply confuse without all the levels done.

The dungeon is designed to feel like a true sequel to Grimrock and begins with the party waking up in prison with no knowledge of how they got there. You MUST import a fully rounded party from Grimrock and the party should be level 14ish ideally with access to high level fireball spells. This is because the first level is all about escaping from the prison and literally the only weapons available are spears you salvage from fallen skeletons - so nothing substantial. The creatures are designed for high level players so without fireballs and other high level spells you're not getting much further than your cell...

On the other hand, by the time you've completed 24 levels of intriguing puzzles and battles, you're going to have one hell of a party. In playtesting, it took me several hours to get out of level 1 and I designed the thing - you're going to have to think on your feet.
I'm using all of Daniv's wallsets and much more besides. Anyway, back to work :)
SharinaDarkstar
Posts: 29
Joined: Fri Jun 29, 2012 1:47 pm

Re: Help! My dungeon won't load!

Post by SharinaDarkstar »

Lucky I'm a programmer :)

Once I knew where to look, I delved into the code in duneon.lua and cut and paste all the stuff from the new level to the backup and now I have my days work back. Fascinated to discover that the entire dungeon is just a load of lua code in dungeon.lua
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Help! My dungeon won't load!

Post by JKos »

I recommend version control tool for everyone who does some serious modding. Mercurial is free and really easy to use and it has saved my day couple of times.

TortoiseHg is a gui for mercurial.
http://tortoisehg.bitbucket.org/

Just install it and right click your mods directory -> select TortoiseHg -> Create repository here -> create
then right click the directory again and select Hg commit -> select all files, enter some commit message and press ok.

Next time you edit your dungeon just do a commit again and Mercurial will keep track of your changes. It can show you all differences between versions and you can go back to any version any time.
And I also recommend to use DropBox or Google drive for external backups and source distribution.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
SharinaDarkstar
Posts: 29
Joined: Fri Jun 29, 2012 1:47 pm

Re: Help! My dungeon won't load!

Post by SharinaDarkstar »

Time Machine would do that automatically on my iMac if I didn't have to boot it into Windoze to edit my dungeons :)
Post Reply