Yep i menat that it will affect load/save time only if u clone object changing minimalsavestate to true.minmay wrote:I don't think it will affect that either, actually. Just make sure to never use it on assets that are defined with minimalSaveState.
Will o' the wisp
Re: Will o' the wisp
Re: Will o' the wisp
Thank you for pointing that!Granamir wrote:Sure,kelly1111 wrote:Ok, but I still dont understand how you textured the sides of your raised platform/floor. I can look throught the world if I do that ...Granamir wrote:Thank you.
I raised it with heightmap, but monsters get higher than floor so i now changed with an invisible platform and floor tile, rised with ':setWorldPositionY(1.3)'
Can you please explain a bit more?
floor tile i used is: "dungeon_floor_dirt_01"
for sides i used "dungeon_ceiling_wall" with ":setWorldPositionY(-3.2)".
Btw using set world position and sutile offset pay attention to "minimalSaveState" in definition of object u use, if they have = true have to copy them and set as false, otherwise after u save/load they come back to standard position.
I just wanted to ask, what about the offset command? Like the one bellow in the "model field"? Is it affected by the minimalSaveState?
I think I have a couple of model using the offset, without minimalSaveState
SpoilerShow
Code: Select all
defineObject{
name = "marble_ceiling01",
baseObject = "base_ceiling",
components = {
{
class = "Model",
model = "mod_assets/models/palace/marble_ceiling01.fbx",
staticShadow = true,
offset = vec(0, 1, 0),
},
{
class = "Occluder",
model = "assets/models/env/dungeon_ceiling_1111_occluder.fbx",
offset = vec(0, 1, 0),
},
},
minimalSaveState = true,
}
Re: Will o' the wisp
As far as i know settings in "define object" are base settings u have in game; means just placing an item u have those settings, affected by minimal save sate, but nothing happens in game because u just used default settings.bongobeat wrote: Thank you for pointing that!
I just wanted to ask, what about the offset command? Like the one bellow in the "model field"? Is it affected by the minimalSaveState?
I think I have a couple of model using the offset, without minimalSaveState
SpoilerShowCode: Select all
defineObject{ name = "marble_ceiling01", baseObject = "base_ceiling", components = { { class = "Model", model = "mod_assets/models/palace/marble_ceiling01.fbx", staticShadow = true, offset = vec(0, 1, 0), }, { class = "Occluder", model = "assets/models/env/dungeon_ceiling_1111_occluder.fbx", offset = vec(0, 1, 0), }, }, minimalSaveState = true, }
If instead u use code in game to manipulate (offeset, rotate, etc.) object this affect minimal save state and u will see changes after save/load because game uses only defautl settings (those defined in "define object") after a load/save.
So, in this case, unless u change "minimalsavestate" in "define object" your dungeon will look different from what u see in your editor.
Solutions i thinked about are:
1) clone object u manipulate (copy paste object definition changing only minimalsavestate to false; as far as i know this way your definition overwrite game definition)
2) use a script and a timer in game to call periodically a functon that changes all objects u manipulated in game.
Still haven't tried which one is better, maybe solution 1 make save/load time longer, solution 2 can be a problem if u change/delete objects during gameplay (like lift, breakable walls, etc.).
But i'm not an expert, maybe someone with more experience can explain it better and/or find a better solution.
Re: Will o' the wisp
Thanks,
to be sure, if I understand you, if you define an offset in the object definition, there is nothing to worry about in the game, the object will always be at the defined offset, after reloading the game?
to be sure, if I understand you, if you define an offset in the object definition, there is nothing to worry about in the game, the object will always be at the defined offset, after reloading the game?
Re: Will o' the wisp
I believe it works this way: Imagine minimalSaveState as respawning the object when the game is reloaded. So fields in component definitions will be applied again; the ModelComponent will have "mod_assets/models/palace/marble_ceiling01.fbx" for its "model" field, true for its "staticShadow" field, vec(0,1,0) for its "offset" field, any onInit hooks will be run again, et cetera. So long as the object's state never changes from the state it was defined with, you're fine.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Will o' the wisp
As minmay told, yes, object definition=no worryes (but u can use only 1 offset XD).bongobeat wrote:Thanks,
to be sure, if I understand you, if you define an offset in the object definition, there is nothing to worry about in the game, the object will always be at the defined offset, after reloading the game?
Re: Will o' the wisp
thanks