Glew wrote:Isaac wrote:The way that I have done this is to define the specific custom architectural objects I needed and place them where the dungeon should never be random. This includes floors, pillars, and walls; possibly ceilings. I had a balcony that would spawn drains in the floor, and had to place custom tiles set to replace the floor.
You mentioned since, of it being a small room instead. for that my first post would be the best solution I think. Define decoration objects for a floor, wall, and ceiling. Use the official game models for those, and place them in your map where the random embellishment mustn't appear.
I don't want to be annoyingly stupid, but this doesn't give me too much... How do I do this? I am _very_ inexperienced in any kind of scripting, programming. What does "defining specific custom architectural objects" mean? How is it different from Skuggasveinn's suggestion. Is that not defining a custom wallset?
And anyway, how do I do any of this step by step, please? What file do I modify and how etc.?
Thanks.
Sure.
The first thing you should do is download the Grimrock asset pack. This give you access to all of Grimrock's public assets, and lets you study its scripts and a copy of its internal file system. Everything listed in the asset pack, exists in the game under the path "assets/"; where as user mod files exist under the path "mod_assets/". A modder can refer to grimrock internal assets by using the path seen in the extracted asset pack from AH. These files do not have to be included in your mod, as they are used in the base game.
Once you have the asset pack extracted (somewhere convenient), navigate to the scripts folder and you will see the heart of the game's assets defined in the scripts contained. Open the 'objects.lua' file to see all of the dungeon's architectural features defined. This is what the game reads to create the assets it uses to display the game maps.
In your mod folder [default: (in your document folder) is 'Almost Human/dungeons/%name of your mod%'], there is a scripts folder that has several blank scripts by default. You can open any of these and define new assets using the same format as seen in the asset pack's scripts, and those items will exist in the editor (once perfectly defined ~without syntax or path errors ).
To define a new floor [for instance], you would follow the format seen in the asset pack script for the floor; just copy/paste the entry initially, and change the name.
Search the object.lua file for a floor decoration... like the drain; a search for "dungeon_floor_drainage", reveals this entry:
Code: Select all
defineObject{
name = "dungeon_floor_drainage",
class = "Decoration",
model = "assets/models/env/dungeon_floor_drainage.fbx",
placement = "floor",
replacesFloor = true,
editorIcon = 136,
}
Copy and paste that into a text editor. [Notepad.exe in Windows works fine, but there are better free editors online; Notepad++ is good, and will color code the scripts to make them easier to read.]
Change the line: name = "dungeon_floor_drainage",
to: name = "my_custom_floorTile",
Then change the line: model = "assets/models/env/dungeon_floor_01.fbx",
- [Or use "assets/models/env/temple_floor_01.fbx" instead; this will make it easy to see on the floor using the dungeon wallset.]
Save the script and reload your mod; mods have to be reloaded fresh to reflect out any of editor changes. If all went well, you will see a new prop in the list called "my_custom_floorTile". Place it on the floor anywhere, and it will prevent drains appearing, without eliminating drains on the level.
* A quirk that you'll need to know is that the model assets in the asset pack are stored in AH's .model format, but in scripts, they must be referred to as .fbx files.
- So the file "dungeon_floor_01.fbx" actually exists in the asset pack as "dungeon_floor_01.model".
**Because we didn't change the icon in the definition, the custom floor tile displays with a drain icon in the editor.
A handy utility to actually view the model files in the asset pack is John Wordsworth's Grimrock Model Toolkit.
http://www.johnwordsworth.com/legend-of ... l-toolkit/