Page 1 of 1

How to properly define a new wall set?

Posted: Mon Sep 17, 2012 3:14 pm
by Komag
I want to try out a clean dungeon wall set with no decorations. So I opened the wall_sets.lua file and added the lines:

Code: Select all

defineWallSet{
	name = "dungeonclean",
}
After loading my map, I can select the new wallset for the level, but when I PLAY, the editor crashes with this error:
[string "Map.lua"]:0: attempt to index a nil value
stack traceback:
[string "Map.lua"]: in function 'placeCeilingMesh'
[string "Map.lua"]: in function 'placeWalls'
[string "Map.lua"]: in function 'prepare'
[string "Dungeon.lua"]: in function 'loadDungeonFile'
[string "DungeonEditor.lua"]: in function 'playPreview'
[string "DungeonEditor.lua"]: in function 'previewButtons'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
I don't know what I'm doing really. I read the section on Wallsets on the asset definitions reference page:
http://www.grimrock.net/modding/asset-d ... reference/
and I think I might need to define some of those parameters, such as floorDecorations and wallDecorations, but I don't understand how (is there a master list of all the models for these decorations?)

Re: How to properly define a new wall set?

Posted: Mon Sep 17, 2012 5:41 pm
by Montis
well obviously the only thing you have defined is a name, so it shouldn't do anything (besides crash I guess ;))
you'd most likely need to specify stuff like models for the walls, ceiling etc.
since we don't know the filenames of the standard grimrock dungeon, you probably have to wait for a dev answer or some techy guy that can actually pull a list of filenames from the base LoG dat (it would probably help dungeon creators a lot to have this list right now)

Re: How to properly define a new wall set?

Posted: Mon Sep 17, 2012 6:17 pm
by Komag
hmm, any way to have it inherit all the settings from dungeon, except the floorDecorations and wallDecorations?
I don't even know the format really, just that one example:

Code: Select all

walls = {
	"assets/models/env/dungeon_wall_01.fbx", 50,
	"assets/models/env/dungeon_wall_drainage.fbx", 1,
}
I tried an unpacker thing, and seemed to find a huge list when loading the grimrock.dat file into it
example:
assets/models/wall_sets/dungeon/floor_01.model
assets/models/wall_sets/dungeon/floor_01.mesh
but no fbx files, and there is no "env" folder

I guess I could try a bunch of those things maybe

Re: How to properly define a new wall set?

Posted: Mon Sep 17, 2012 6:21 pm
by petri

Re: How to properly define a new wall set?

Posted: Mon Sep 17, 2012 6:32 pm
by Komag
NICE! I'll dig into it and experiment :)

Re: How to properly define a new wall set?

Posted: Mon Sep 17, 2012 7:42 pm
by Komag
To make a Dungeon wallset that is free of plants (to avoid them in the stairs):

- open the file Documents\Almost Human\Legend of Grimrock\Dungeons\MyDungeonName\mod_assets\scripts\wall_sets.lua (use Notepad or another text editor)
- add the lines: (then save the file)

Code: Select all

defineWallSet{
	name = "dungeon2",
	randomFloorFacing = true,

	floors = {
		"assets/models/env/dungeon_floor_01.fbx", 5,
		"assets/models/env/dungeon_floor_02.fbx", 5,
		"assets/models/env/dungeon_floor_03.fbx", 5,
		"assets/models/env/dungeon_floor_04.fbx", 5,
		"assets/models/env/dungeon_floor_05.fbx", 5,
		"assets/models/env/dungeon_floor_06.fbx", 5,
		"assets/models/env/dungeon_floor_drainage.fbx", 1,
	},

	walls = {
		"assets/models/env/dungeon_wall_01.fbx", 50,
		"assets/models/env/dungeon_wall_drainage.fbx", 1,
	},

	pillars = {
		"assets/models/env/dungeon_pillar.fbx", 1,
	},

	ceilings = {
		"assets/models/env/dungeon_ceiling.fbx", 1,
	},

	ceilingShafts = {
		"assets/models/env/dungeon_ceiling_pit.fbx", 1,
	},

	floorDecorations = {
	},

	wallDecorations = {
		"assets/models/env/metal_hooks_wall.fbx", 1,
		"assets/models/env/metal_hooks_chain_wall.fbx", 1,
	},

	pillarDecorations = {
		"assets/models/env/metal_hook_pillar.fbx", 1,
		"assets/models/env/metal_hook_chain_pillar.fbx", 1,
		"assets/models/env/metal_ring_pillar.fbx", 1,
	},
}
This creates a new wall set called dungeon2 that is exactly the same as the original Dungeon set except without plants.
- Reload the map you're working on (save first)(you don't have to restart the editor)
- select a level, right-click, Properties, Wall Set - choose dungeon2
- test in game - all vegetation should be gone