Page 372 of 400
Re: Ask a simple question, get a simple answer
Posted: Sun Jan 24, 2021 8:28 am
by minmay
Leaving the line out will make it inherit its minimalSaveSate value from its baseObject (if any). Perhaps you defined base_door with minimalSaveState = true?
Re: Ask a simple question, get a simple answer
Posted: Sun Jan 24, 2021 10:17 am
by Lorial
minmay wrote: ↑Sun Jan 24, 2021 8:28 am
Leaving the line out will make it inherit its minimalSaveSate value from its baseObject (if any). Perhaps you defined base_door with minimalSaveState = true?
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
Posted: Sun Jan 24, 2021 11:31 am
by kelly1111
Quick Question: Is there a way to scale a model ingame ?
Re: Ask a simple question, get a simple answer
Posted: Sun Jan 24, 2021 3:25 pm
by 7Soul
kelly1111 wrote: ↑Sun Jan 24, 2021 11:31 am
Quick Question: Is there a way to scale a model ingame ?
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)
If the entity has animations though, this wont work most of the time
Re: Ask a simple question, get a simple answer
Posted: Sun Jan 24, 2021 4:43 pm
by ratman
7Soul wrote: ↑Sun Jan 24, 2021 3:25 pm
kelly1111 wrote: ↑Sun Jan 24, 2021 11:31 am
Quick Question: Is there a way to scale a model ingame ?
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)
If the entity has animations though, this wont work most of the time
Does this work on items? (I've noticed if you shrink an altar the items on it shrink as well!)
Re: Ask a simple question, get a simple answer
Posted: Sun Jan 24, 2021 8:40 pm
by kelly1111
7Soul wrote: ↑Sun Jan 24, 2021 3:25 pm
kelly1111 wrote: ↑Sun Jan 24, 2021 11:31 am
Quick Question: Is there a way to scale a model ingame ?
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)
If the entity has animations though, this wont work most of the time
Thanks alot
Re: Ask a simple question, get a simple answer
Posted: Sat Jan 30, 2021 4:45 pm
by ratman
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?
Re: Ask a simple question, get a simple answer
Posted: Sat Jan 30, 2021 7:26 pm
by Isaac
ratman wrote: ↑Sat Jan 30, 2021 4:45 pm
...but whatever I put the gesture as, the party can cast it even if it is set to hidden.
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
Posted: Tue Feb 09, 2021 3:17 am
by ratman
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?
Re: Ask a simple question, get a simple answer
Posted: Sun Feb 21, 2021 4:07 pm
by Cerv
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