[Linux] Editor doesn't export properly

Have trouble running Grimrock 1 or you're wondering if your graphics card is supported? Look for help here.
edgleyUK
Posts: 6
Joined: Wed Jan 23, 2013 3:37 pm
Location: UK
Contact:

[Linux] Editor doesn't export properly

Post by edgleyUK » Wed Jan 23, 2013 3:51 pm

Hello,

I've been playing LoG for a while now and I absolutely love it! I've always tried to have a go with any editors the games have and the dungeon editor in Grimrock is really nicely done.

However, I can't seem to get my own Dungeons to load in game -- I can test them out in the editor without a problem -- they always error with the same thing:

=====
File not found: mod_assets/scripts/init.lua
stack traceback:
[C]: in function 'error'
[string "Dungeon.lua"]: in function 'loadInitFile'
[string "GameMode.lua"]: in function 'loadDungeon'
[string "GameMode.lua"]: in function 'newGame'
[string "GameMode.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'startGame'
[string "NewGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
=====

I can see the init.lua file in the mod_assets folder of my mod/dungeon and custom dungeons downloaded from the nexus etc all work fine so I'm assuming this is a bug related to the editor itself and not the game. Any ideas?

Something else I noticed that may or may not be related, but my custom dungeon dat file is always massive compared to others -- the default 3x3 square with a torch exports to about 260M.

I'm running Arch x86_64 with a i7 (950), 24GB of RAM, GTX460 and using SSD's for everything relevant here (though I don't think this is driver related) -- kernel is 3.6.11.

Also, not big issues but something of an annoyance -- the export dialog box that asks for the .dat file to save to is always under my other windows and the main menu bar acts as a separate window and gets messed up on my tiling window manager (subtle).

Any help would be greatly appreciated as this is the one thing I can't do at the moment (besides using mouse look I suppose).

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

Re: [Linux] Editor doesn't export properly

Post by Neikun » Wed Jan 23, 2013 4:31 pm

Well the size of your exported .dat file is dependent on everything in your mod_assets folder, not what is mapped out in the editor.

As for your error, I would start by checking that everything in the init.lua is spelled as it should be, and has all it's necessary quotation marks.

Another thing I would check for is any definitions you had made that use capital letters where the file referenced does not, and vice versa.

For instance if you defined a lever with the path:
mod_assets/models/levers/This_is_my_lever"
but the file is called,
this_is_my_lever
It will play in the editor, but crash on exporting.
Last edited by Neikun on Wed Jan 23, 2013 7:04 pm, edited 1 time in total.
"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
petri
Posts: 1898
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: [Linux] Editor doesn't export properly

Post by petri » Wed Jan 23, 2013 5:13 pm

If you create a new dungeon and export it without any modifications, does it still crash? A freshly created dungeon should be only a few KB in size...

edgleyUK
Posts: 6
Joined: Wed Jan 23, 2013 3:37 pm
Location: UK
Contact:

Re: [Linux] Editor doesn't export properly

Post by edgleyUK » Thu Jan 24, 2013 1:55 am

Hi,

Thanks for the replies.
petri wrote:If you create a new dungeon and export it without any modifications, does it still crash? A freshly created dungeon should be only a few KB in size...
Yep, brand new dungeon crashes.
Neikun wrote:Well the size of your exported .dat file is dependent on everything in your mod_assets folder, not what is mapped out in the editor.
I was actually reading the output of ls wrong, whoops -- turns out the .dat file is 295 bytes -- opening it in nano gives about 50 unreadable characters (suspect this is some kind of compression) and then the description of the dungeon. The only reason a new dungeon file size is different is because I was making it without a description -- the total number of lines is 4.

On checking Toorums Quest II.dat, that's 5706 lines and 1.6M, so this suggests there's something seriously wrong with the dat creation.
Neikun wrote:As for your error, I would start by checking that everything in the init.lua is spelled as it should be, and has all it's necessary quotation marks.

Another thing I would check for is any definitions you had made that use capital letters where the file referenced does not, and vice versa.
I'm just using the default init.lua generated by the editor -- working in Linux for a few years now, so capitalisation is one of the first things I check when I get a "file not found" or similar error. I've included the default file below, just in case anyone can see something immediately wrong.

As a test, I tried changing "items.lua" to "Items.lua" and the editor fails to open the dungeon and gives a file not found error.
-- This file has been generated by Dungeon Editor 1.3.6

-- import standard assets
import "assets/scripts/standard_assets.lua"

-- import custom assets
import "mod_assets/scripts/items.lua"
import "mod_assets/scripts/monsters.lua"
import "mod_assets/scripts/objects.lua"
import "mod_assets/scripts/wall_sets.lua"
import "mod_assets/scripts/recipes.lua"
import "mod_assets/scripts/spells.lua"
import "mod_assets/scripts/materials.lua"
import "mod_assets/scripts/sounds.lua"

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

Re: [Linux] Editor doesn't export properly

Post by Neikun » Thu Jan 24, 2013 2:11 am

Oh dear. I'm stumped. I hope someone can help you with this!
"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!

edgleyUK
Posts: 6
Joined: Wed Jan 23, 2013 3:37 pm
Location: UK
Contact:

Re: [Linux] Editor doesn't export properly

Post by edgleyUK » Fri Jan 25, 2013 12:37 pm

Hey,

Not a problem, thanks for your time! Hopefully someone else has an idea.

User avatar
RaumSchiff
Posts: 2
Joined: Mon Jan 28, 2013 1:17 pm

Re: [Linux] Editor doesn't export properly

Post by RaumSchiff » Mon Jan 28, 2013 1:30 pm

Hi,

The problem has to do with "white spaces".
The editor issues copy or move commands without double-quoting or backslashing paths ... fatal for Linux !

Try to export your dungeon in your home, or any folder path with no spaces, it will work ...

I am guessing that editing a dungeon in Linux should require a "safe" working directory and a good naming of assets ( No spaces or escape characters ...)
Up to the developers to confirm my guess or not !

Best Regards,

edgleyUK
Posts: 6
Joined: Wed Jan 23, 2013 3:37 pm
Location: UK
Contact:

Re: [Linux] Editor doesn't export properly

Post by edgleyUK » Mon Jan 28, 2013 10:03 pm

RaumSchiff wrote:The problem has to do with "white spaces".
The editor issues copy or move commands without double-quoting or backslashing paths ... fatal for Linux !

Try to export your dungeon in your home, or any folder path with no spaces, it will work ...

I am guessing that editing a dungeon in Linux should require a "safe" working directory and a good naming of assets ( No spaces or escape characters ...)
Up to the developers to confirm my guess or not !
Thanks for the reply, but it didn't work. I even created a brand new Dungeon (named "testdun") in my home folder, then exported to the same folder (/home/edgley/).

File size is still broken, moving into the Dungeons folder and trying to launch it, it still fails with the same error.

Just in case, the Grimrock.bin.x86_64 file is in /mnt/games/grimrock/, so there's no escaping characters there either.

User avatar
RaumSchiff
Posts: 2
Joined: Mon Jan 28, 2013 1:17 pm

Re: [Linux] Editor doesn't export properly

Post by RaumSchiff » Mon Jan 28, 2013 11:45 pm

edgleyUK wrote: Thanks for the reply, but it didn't work. I even created a brand new Dungeon (named "testdun") in my home folder, then exported to the same folder (/home/edgley/).
File size is still broken, moving into the Dungeons folder and trying to launch it, it still fails with the same error.
Just in case, the Grimrock.bin.x86_64 file is in /mnt/games/grimrock/, so there's no escaping characters there either.
Sorry to hear that. I ran with the same problem (except the file size).

A backtrace for Almost Human:

--> Project created in a folder with no special caracters and exported in a folder with no special caracters
= Crash AFTER character creation.

--> Project created in default folder (with spaces) and exported in a folder with no special caracters OR default
= Crash In the "Choose Menu" BEFORE character creation.


The error message is the same as yours in any cases ...
Software Failure, Error: File not found: mod_assets/scripts/init.lua
I have no problems of broken filesize though, in you case, the problem must be deeper.

Anyway I still guess, ( wildly ??? :) ) this is a path problem.
Your binary is in "/mnt/games/grimrock/" and mine is in "/home/me/GAMES", ie: not standard (root) install paths.
I installed my version as standard user (not root). Perhaps you did the same.

Well, apart from that, I'm running out of ideas ...

At least i can binary dump my .dat file with the od command :
My dungeon is description is "ffffff", I see also "mod_assets/scripts", But no idea with GRA2 ?

Code: Select all

me@home:~/.local/share/Almost Human/Legend of Grimrock/Dungeons$ od -c zz.dat 
0000000   G   R   A   2 001  \0  \0  \0 337 305 331 365 034  \0  \0  \0
0000020  \0  \0  \0  \0   0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040 002  \0  \0  \0   z   z 003  \0  \0  \0   f   f   f 005  \0  \0
0000060  \0   f   f   f   f   f 022  \0  \0  \0   m   o   d   _   a   s
0000100   s   e   t   s   /   s   c   r   i   p   t   s
0000114
Any Idea Almost Human ?

Best Regards,

edgleyUK
Posts: 6
Joined: Wed Jan 23, 2013 3:37 pm
Location: UK
Contact:

Re: [Linux] Editor doesn't export properly

Post by edgleyUK » Tue Jan 29, 2013 1:44 pm

RaumSchiff wrote: --> Project created in a folder with no special caracters and exported in a folder with no special caracters
= Crash AFTER character creation.

--> Project created in default folder (with spaces) and exported in a folder with no special caracters OR default
= Crash In the "Choose Menu" BEFORE character creation.
It's not quite the same for me -- it makes no odds where I export it from or what the name of the file is etc (so regardless of special characters), I always get the crash *after* character creation.
RaumSchiff wrote: The error message is the same as yours in any cases ...
Software Failure, Error: File not found: mod_assets/scripts/init.lua
I have no problems of broken filesize though, in you case, the problem must be deeper.
No matter what I do to export it, I still end up with pretty much the same content of the file. Opening it in nano gives:

Code: Select all

GRA2^A^@^@^@����^\^@^@^@^@^@^@^@:^@^@^@^@^@^@^@^@^@^@^@^G^@^@^@testdun^F^@^@^@edgley^G^@^@^@Testing^R^@^@^@mod_assets/scripts
So the author, dungeon name and description are all exported, but after it gets to the scripts folder, it doesn't appear to include anything else.
RaumSchiff wrote: Anyway I still guess, ( wildly ??? :) ) this is a path problem.
Your binary is in "/mnt/games/grimrock/" and mine is in "/home/me/GAMES", ie: not standard (root) install paths.
I installed my version as standard user (not root). Perhaps you did the same.
Yep -- installed as standard user. Will try installing a clean copy as root when I get home, but I don't hold out much hope for it and it is far from being ideal.
RaumSchiff wrote: At least i can binary dump my .dat file with the od command :
My dungeon is description is "ffffff", I see also "mod_assets/scripts", But no idea with GRA2 ?

Code: Select all

me@home:~/.local/share/Almost Human/Legend of Grimrock/Dungeons$ od -c zz.dat 
0000000   G   R   A   2 001  \0  \0  \0 337 305 331 365 034  \0  \0  \0
0000020  \0  \0  \0  \0   0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040 002  \0  \0  \0   z   z 003  \0  \0  \0   f   f   f 005  \0  \0
0000060  \0   f   f   f   f   f 022  \0  \0  \0   m   o   d   _   a   s
0000100   s   e   t   s   /   s   c   r   i   p   t   s
0000114
Pretty much identical for me -- description is "Testing":

Code: Select all

edgley@longbow Dungeons$ od testdun.dat -c
0000000   G   R   A   2 001  \0  \0  \0 337 305 331 365 034  \0  \0  \0
0000020  \0  \0  \0  \0   :  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040  \a  \0  \0  \0   t   e   s   t   d   u   n 006  \0  \0  \0   e
0000060   d   g   l   e   y  \a  \0  \0  \0   T   e   s   t   i   n   g
0000100 022  \0  \0  \0   m   o   d   _   a   s   s   e   t   s   /   s
0000120   c   r   i   p   t   s
0000126
Thanks for the reply!

Post Reply