06-03-2015, 01:00 AM
That seems excessive even then. You know that the stats will change after an attack/spell/item, so you should just have the refresh for that window there. Otherwise, it's just refreshing every few frames without a need to.
i still can't work out why my item window has a lag/jump when opening ;; ... It doesn't seem to even be any of the edits to it or Window_Selectable, I'm confused...
EDIT: It seems to be the items themselves. I don't know why, but the presence of a bunch of "loot" items, that aren't even included in-battle because they have a Never use condition, is what causes a heavier jump. x -x
EDIT: This is the sequence VXAce seems to go through to check if an item should be drawn in the BattleItem window. Here's each definition, and the definition/s referenced:
And finally the line that obviously matters:
I replaced the initial include? with item.is_a?(RPG::Item) && item.battle_ok?. There's still a minor jump, but as expected there's zero of it if there's no battle-ready items. With the default line you just need a large number of items at all, even if zero are battle-ready, and there's a hiccup.
I don't know if there's a bug in the sequence, or it's just goddamn convoluted.
i still can't work out why my item window has a lag/jump when opening ;; ... It doesn't seem to even be any of the edits to it or Window_Selectable, I'm confused...
EDIT: It seems to be the items themselves. I don't know why, but the presence of a bunch of "loot" items, that aren't even included in-battle because they have a Never use condition, is what causes a heavier jump. x -x
EDIT: This is the sequence VXAce seems to go through to check if an item should be drawn in the BattleItem window. Here's each definition, and the definition/s referenced:
PHP Code:
# Window_BattleItem
def include?(item)
$game_party.usable?(item)
end
PHP Code:
# Game_Party
def usable?(item)
members.any? {|actor| actor.usable?(item) }
end
PHP Code:
# Game_BattlerBase
def usable?(item)
return skill_conditions_met?(item) if item.is_a?(RPG::Skill)
return item_conditions_met?(item) if item.is_a?(RPG::Item)
return false
end
PHP Code:
def item_conditions_met?(item)
usable_item_conditions_met?(item) && $game_party.has_item?(item)
end
PHP Code:
def usable_item_conditions_met?(item)
movable? && occasion_ok?(item)
end
PHP Code:
def occasion_ok?(item)
$game_party.in_battle ? item.battle_ok? : item.menu_ok?
end
I replaced the initial include? with item.is_a?(RPG::Item) && item.battle_ok?. There's still a minor jump, but as expected there's zero of it if there's no battle-ready items. With the default line you just need a large number of items at all, even if zero are battle-ready, and there's a hiccup.
I don't know if there's a bug in the sequence, or it's just goddamn convoluted.