Ceiling problem fixed

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Ceiling problem fixed

Post by LordGarth »

When I have been making different elevations in a dungeon floor, putting in a lower elevation ceiling manually has been removing the higher elevation ceiling that the brush puts in.

To solve this I put in the manually placed ceiling object code under base_object
dungeon_floor_decoration.

Now the editor should see the ceiling object that is put in manually as a decoration and now displays both ceilings.

Hope this makes sense.

LordGarth
Dungeon Master and DOOM will live forever.
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ceiling problem fixed

Post by Isaac »

A screenshot of this might make a bit clearer...

Do you mean overlapping and underlaping pathways that do not use the bridge asset? (but appear as stonework)
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: Ceiling problem fixed

Post by LordGarth »

Here is the text

Original code
defineObject{
name = "dungeon_ceiling",
baseObject = "base_ceiling",
components = {
{
class = "Model",
model = "assets/models/env/dungeon_ceiling.fbx",
staticShadow = true,
},
{
class = "Occluder",
model = "assets/models/env/dungeon_ceiling_1111_occluder.fbx",
},
},
minimalSaveState = true,
}

new code
defineObject{
name = "dungeon_ceiling",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/env/dungeon_ceiling.fbx",
staticShadow = true,
},
{
class = "Occluder",
model = "assets/models/env/dungeon_ceiling_1111_occluder.fbx",
},
},
minimalSaveState = true,
}

this the new part of the code
baseObject = "base_floor_decoration",


As for visuals
Looking up at the manually install ceiling, it is there and can be seen.
The higher ceiling is just a solid black.

LordGarth
Dungeon Master and DOOM will live forever.
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ceiling problem fixed

Post by Isaac »

"A picture says a thousand words" ;)

Any asset derived from "base_ceiling", will replace the ceiling above it (leaving a black hole if its own model does not fill the empty space); this is because its definition includes: replacesCeiling = true
The altered [second] object you posted does not replace the ceiling above.

I guess what I had missed, was whether your post was intended as a question or a solution...
If you are asking how to automatically plug the black hole in the ceiling, then obviously the object should not define: replacesCeiling = true

But is that your issue? (or is the hole a side effect of what you've constructed, and needs a different fix?)

**It's possible to automatically spawn a ceiling plug at runtime where your custom object is placed. I had a similar problem with a custom staircase, that erased ceiling tiles several elevations above it.
Post Reply