Re: Ask a simple question, get a simple answer
Posted: Fri Oct 14, 2016 7:35 pm
I don't think so, I never found a way to do it myself...zimberzimber wrote:I don't have the time to experiment with it right now, but can it fade in/out?
Official Legend of Grimrock Forums
http://grimrock.net/forum/
I don't think so, I never found a way to do it myself...zimberzimber wrote:I don't have the time to experiment with it right now, but can it fade in/out?
Cheers!! I do like your way of managing this issueAndakRainor wrote:You can see the onTick is used to read values and store them until the next frame. The previous value is substracted to get only the value without the previous contribution of might. When it's time for the next frame, all stat modifiers are cleared and all recomputes are redone, and during that process, at any time, might gives the value stored from the previous frame. So you could say, might is always one frame late when a stat changes. It is still better than my previous 1 second refresh interval and when trying to give bonuses to champions that also depend on other present bonuses, I think it is logically the best thing you can do. Again because, unless I'm proven wrong, when all recomputes are done, it is too late to add another modifier.
Couldn't find a way to get that value and use it where I need it.minmay wrote:Are GraphicsContext.width and GraphicsContext.height not enough?
Code: Select all
dialogueTopForm = {
name = dialogueTopFormName,
type = "GWindow",
size = {836*0.75, 386},
bgImage = "gtk-dialogue-top",
bgDrawMode = GTK.Constants.ImageDrawMode.Stretched,
gravity = GTK.Constants.Gravity.NorthWest,
offset = {0, 10},
layout = {
type = "GBoxLayout",
direction = GTK.Constants.Direction.Horizontal,
gravity = GTK.Constants.Gravity.NorthWest,
spacing = {10, 8},
margin = {30, 40, 30, 30}
},
children =
{
{
name = "mainImageView",
type = "GImageView",
image = "gtk-dialogue-top",
drawMode = GTK.Constants.ImageDrawMode.ShrinkToBox,
imageGravity = GTK.Constants.Gravity.NorthWest,
size = {380, 340},
minSize = {380, 340},
maxSize = {770, 900},
},
{
name = "mainMessageLabel",
type = "GLabel",
text = "",
size = {380, 340},
minSize = {380, 340},
maxSize = {770, 900},
font = GTK.Constants.Fonts.Medium,
}
}
}
dialogueBottomForm = {
name = dialogueBottomFormName,
type = "GWindow",
bgImage = "gtk-dialogue-bottom",
size = {836*0.75, 302},
gravity = GTK.Constants.Gravity.SouthWest,
offset = {0, -10},
lockKeyboard = true,
freezeAI = true,
layout = {
type = "GBoxLayout",
direction = GTK.Constants.Direction.Vertical,
spacing = {8, 12},
margin = {24, 24, 24, 24}
},
children =
{
{
name = "speakerContainer",
type = "GWidget",
position = {0, 0},
size = {770*0.75, 92},
bgImage = "gtk-dialogue-bottom-speaker-box",
minSize = {770*0.75, 92},
maxSize = {770*0.75, 92},
layout = {
type = "GBoxLayout",
direction = GTK.Constants.Direction.Vertical,
spacing = {2, 2},
margin = {2, 10, 2, 10}
},
children =
{
{
name = "speakerLabel",
type = "GLabel",
text = "[Speaker]",
position = {5, 4},
size = {750*0.75, 30},
minSize = {750*0.75, 30},
maxSize = {750*0.75, 30},
font = GTK.Constants.Fonts.Large,
textColor = {255, 192, 64, 255}
},
{
name = "messageLabel",
type = "GLabel",
text = "[Message]",
position = {5, 38},
size = {750*0.75, 48},
minSize = {750*0.75, 48},
maxSize = {750*0.75, 86},
font = GTK.Constants.Fonts.Medium,
textColor = {255, 192, 64, 255}
},
}
},
{
name = "responseContainer",
type = "GWidget",
position = {34, 124},
size = {780*0.75, 140},
minSize = {780*0.75, 100},
maxSize = {780*0.75, 100},
layout = {
type = "GBoxLayout",
direction = GTK.Constants.Direction.Vertical,
gravity = GTK.Constants.Gravity.SouthWest,
hideOverflow = true,
spacing = {4, 4},
margin = {4, 4, 4, 4}
},
children =
{
}
},
}
}
Much appreciated minmay, thankyouminmay wrote:stat recompute order:
Do you know where traits onComputeCooldown, onComputeCritChance and onComputeAccuracy functions should appear in this ordered list?minmay wrote:stat recompute order:
1. items in inventory from 1 to BackpackFirst-1 in order
2. conditions in undefined order (pairs)
3. skills in undefined order (pairs)
4. traits in undefined order (pairs)
applied after all onRecomputeStats are called:
- protection is rounded to the nearest integer
- leadership and nightstalker
- light and heavy armor penalties
- strength, dexterity, vitality, willpower bonuses to max load, evasion, health and health regen, energy and energy regen, resistances
- after strength/dexterity/vitality/willpower are applied, resistances are clamped between 0 and 100, health is clamped at max_health, energy is clamped at max_energy
- when resting, evasion is decreased by 100