Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Leaving the line out will make it inherit its minimalSaveSate value from its baseObject (if any). Perhaps you defined base_door with minimalSaveState = true?
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: Ask a simple question, get a simple answer
No, I did not define the base_door nor gratings or any other base game object so it should all refer to the original ones. The code below is directly taken from the asset pack which I now copy&pasted to manually define it for the mod. Not sure if this will suffice, though.
The aforementioned gates and alcoves were set to "minimalSaveState = true" once which caused the issues, however, the lines are removed and the problem solved with these. The question is why any door/fence/grate works as intended without the minimalSaveState added or manually added definitions for the base objects while this particular one does not.
If the line "secretDoor = true" were the problem (not manually defined as its own object), wouldn't all secret doors from other tile sets close themselves upon re-entering levels as well?
Code: Select all
defineObject{
name = "forest_ruins_secret_door",
baseObject = "base_door",
components = {
{
class = "Model",
model = "assets/models/env/forest_ruins_wall_02.fbx",
staticShadow = true,
},
{
class = "Door",
openVelocity = 1,
closeVelocity = -1,
openingDirection = "down",
maxHeight = 2.88,
killPillars = false,
secretDoor = true,
openSound = "wall_sliding",
closeSound = "wall_sliding",
lockSound = "wall_sliding_lock",
},
},
editorIcon = 120,
automapIcon = -1,
}
Re: Ask a simple question, get a simple answer
Quick Question: Is there a way to scale a model ingame ?
Re: Ask a simple question, get a simple answer
Code: Select all
local m = entity:getWorldRotation()
local scale = 0.5
m.x = m.x * scale
m.y = m.y * scale
m.z = m.z * scale
m.w = m.w * scale
entity:setWorldRotation(m)
Re: Ask a simple question, get a simple answer
Does this work on items? (I've noticed if you shrink an altar the items on it shrink as well!)7Soul wrote: ↑Sun Jan 24, 2021 3:25 pmIf the entity has animations though, this wont work most of the timeCode: Select all
local m = entity:getWorldRotation() local scale = 0.5 m.x = m.x * scale m.y = m.y * scale m.z = m.z * scale m.w = m.w * scale entity:setWorldRotation(m)
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: Ask a simple question, get a simple answer
Thanks alot7Soul wrote: ↑Sun Jan 24, 2021 3:25 pmIf the entity has animations though, this wont work most of the timeCode: Select all
local m = entity:getWorldRotation() local scale = 0.5 m.x = m.x * scale m.y = m.y * scale m.z = m.z * scale m.w = m.w * scale entity:setWorldRotation(m)
Re: Ask a simple question, get a simple answer
In my mod the scrolls are a one-time use to cast a powerful spell, like a scroll of meteor storm, but when I use the champion:castSpell function, it takes away energy and requires the champion to have the skill levels for the actual spell. So I tried defining my own meteor storm with no requirments and energy cost of zero, but whatever I put the gesture as, the party can cast it even if it is set to hidden. So I tried with the gesture as zero, and the spell just fizzles and this would never work with multiple scrolls because they would all summon the same spell. So how would I either make a spell that the party can't cast, or make the base meteor storm spell have no requirements but only for the scroll?
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: Ask a simple question, get a simple answer
Use a valid, but impossible gesture.
eg. "12321"
Code: Select all
defineSpell{
name = "spell_scroll_meteor_storm",
uiName = "Scroll of Meteor Storm",
gesture = 12321,
manaCost = 0,
onCast = "meteorStorm",
skill = "fire_magic",
icon = 99,
hidden = true,
spellIcon = 8,
description = "Unleashes a devastating storm of meteors on your foes.",
}
defineObject{
name = "spell_scroll_meteor_storm",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/scroll.fbx",
},
{
class = "Item",
uiName = "Scroll of Meteor Storm",
gfxIndex = 112,
weight = 0.1,
},
{
class = "UsableItem",
uiName = "Scroll of Meteor Storm",
onUseItem = function(self, champion) champion:castSpell(12321) end,
},
},
}
Re: Ask a simple question, get a simple answer
is there a relatively easy way to make a sky object so that it is the orange-ish color like at sunrise and sunset the whole day, but still has a nightime?
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: Ask a simple question, get a simple answer
Hello all,
I am new in modding here and have to say you are doing great jobs with all the advices and tutorials. There is my question. Is there any call I can make inside of game to outside? Reason is simple. I did made shop to my mod and want to know if I can put table with shop items outside of dat file...
This is first question, but i am afraid lot more will follow...
Cerv
I am new in modding here and have to say you are doing great jobs with all the advices and tutorials. There is my question. Is there any call I can make inside of game to outside? Reason is simple. I did made shop to my mod and want to know if I can put table with shop items outside of dat file...
This is first question, but i am afraid lot more will follow...
Cerv