Ask a simple question, get a simple answer

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!
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Hey guys,
i have a quick question. I noticed there a LoG1 models in the asset pack. So i thought i try to Import some of the assets to my Project. I tried it with some statues and other obstacles, but there is no texture, just the model. Do i miss something here? What do I have to do to get the texture working?
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Ask a simple question, get a simple answer

Post by Skuggasveinn »

Xardas wrote:Hey guys,
i have a quick question. I noticed there a LoG1 models in the asset pack. So i thought i try to Import some of the assets to my Project. I tried it with some statues and other obstacles, but there is no texture, just the model. Do i miss something here? What do I have to do to get the texture working?
if I remember correctly some of the materials are inside this one
import "assets/scripts/grimrock1/grimrock1_materials.lua"

but I think it was just the monster materials for Log1, however you can copy the textures from the LoG1 asset pack to your project and define the missing materials (AH are cool with us taking assets from LoG1 into LoG2)

kind regards.
Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Yep i supposed, that the textures are missing from the Folder. Thank you
Last edited by Xardas on Mon Sep 11, 2017 9:43 pm, edited 1 time in total.
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Ask a simple question, get a simple answer

Post by Skuggasveinn »

Here is the asset pack for LoG1
http://www.grimrock.net/modding_log1/asset-pack/
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Whoops just found it :lol:
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Thanks for that. Looks like a lot of work, so i´m going to stick with the normal assets for now.

Is there a way to Change the Entity of an object, once it was set?
It would simplify a long function i have
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Isaac
Posts: 3191
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Xardas wrote:Thanks for that. Looks like a lot of work, so i´m going to stick with the normal assets for now.
That is the problem. The —normal— assets for LoG1 do not use the same format as LoG2.
Is there a way to Change the Entity of an object, once it was set?
It would simplify a long function i have
How exactly do you mean; specifically? You can certainly destroy an object and then spawn a new one using the same Id for it.
User avatar
Xardas
Posts: 83
Joined: Fri Jul 28, 2017 12:30 am

Re: Ask a simple question, get a simple answer

Post by Xardas »

Oh i´m sorry, yes i meant the id of Course. Can i Change it when it was set already? It´s for spawning random types of the wooden_floor_break_away, with "instantly" and "never" in the id. For now i have 3 different spawn cases which spawn an instantly breaking, a never breaking and a normal floor used depending on a random number, which is rolled first. It would be nicer, if i could spawn the Floor and then Change the id depending on the number rolled.
Destroying the old object an spawning a new one could work, but i´m not sure how to do it, because i don´t know the Floors Position:

Could this work?
SpoilerShow
local Floor = findEntity("wooden_floor"..i)
spawn("wooden_floor_break_away", Floor.go.level, Floor.go.x, Floor.go.y, Floor.go.facing, Floor.go.elevation, "wooden_floor_never_breaking"..i)
Floor.go:destroy()
In order to get to the other side of the pit you have to get hit by the fireball and die....
Yep.....moving on!
User avatar
Isaac
Posts: 3191
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

I don't think that will work—as such. How do you plan to use this? Is it that you want the floor's behavior to change with every new game started(?), or is it needed to fill out whole rooms/elevation levels(?), or is it that you just plan to use too many tiles (all over) to update them all manually?

The demo has a custom script in it called wooden_floors. It's not part of the floor asset; it was just a convenience for me. It is what places most of the wooden floors in the room. A variation based on that script could be used in any large room, and have it randomly decide the floor behavior for each before spawning the floors; it already does this for facing, it could be changed to include either 'instantly', 'never', or—nothing into the floor id.
Post Reply