In inventory_info.lua there's a property boost_highlight_time = 60, to affect how long a changed attributed is displayed. In my experiments at changing this number, it doesn't seem to have any effect, so I'm not sure it's actually working?
What does this actually do / how does this work? Does it affect the box around the eye, or the how long the boosted stat is displayed in red/green? Even after changing this number, the eye box and the stat only show in changed colours for as long as the condition is in place, at least that how it appears...?
How does boost_highlight_time work?
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Re: How does boost_highlight_time work?
It seems to work to me? I set it ridiculously short/long, spawned a character with no skills but a bunch of mana, and cast potions till they got a level up. I can have the level up greenbox either vanish near immediately or loiter for a minute or so.
How are you testing it? Note that this variable *only* affects level up notifications. Not eg buff potions...
How are you testing it? Note that this variable *only* affects level up notifications. Not eg buff potions...
Friends don't let friends eat worm round
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: How does boost_highlight_time work?
Oh! I see. I thought it also applied to attribute boosts, but if I set an attribute boost programmatically, this delay seems to be ignored. For example:
Code: Select all
for i=0,3 do
local char = dsb_ppos_char(i)
dsb_set_maxstat(char, STAT_WIS, dsb_get_stat(char, STAT_WIS) + (dsb_rand(1,3) * 10))
end
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: How does boost_highlight_time work?
Yeah, it applies to leveling up only. Stats that are above/below their maximum are only shown in red or green until they're back to the normal maximum value.
It may not be the best approach but I should note that the stat being shown in red after an increase to the maximum value is also what DM does.
It may not be the best approach but I should note that the stat being shown in red after an increase to the maximum value is also what DM does.
Re: How does boost_highlight_time work?
Have a look at base/xp.lua/perform_stat_increase(who, stat_num, value_up) for stat bumps with highlight
Friends don't let friends eat worm round