OSRS Exp Drops [B42.13.2 FIX]
О материале
«OSRS Exp Drops [B42.13.2 FIX]» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
Barra de XP Não Atualizando – Correção para a Build 42
Na Build 42, o evento Events.AddXP mudou de comportamento ou deixou de ser disparado de forma confiável no lado do cliente, especialmente em Multiplayer. Como consequência, o mod acabava perdendo a informação de ganho de XP, fazendo com que a barra de XP não fosse exibida corretamente.
Essas falhas eram silenciosas, sem qualquer erro no console, indicando que o evento simplesmente não estava ocorrendo como esperado.
Correção Aplicada
A lógica antiga baseada no Events.AddXP foi substituída por um sistema de monitoramento ativo usando OnPlayerUpdate.
Em vez de depender do jogo para avisar quando o XP é ganho, o mod agora verifica o XP do jogador a cada tick, comparando com um cache interno. Isso garante 100% de precisão e compatibilidade, inclusive em ambientes Multiplayer.
Alterações em RUNE-EXP.lua Cache de XP
Foi adicionado um sistema que armazena o XP atual de todas as habilidades no momento em que o personagem é carregado.
Monitoramento Ativo (Polling)
A lógica antiga baseada em onAddExp foi substituída por OnPlayerUpdate. A cada tick, o script percorre todas as skills da PerkFactory, compara o valor atual de XP com o valor armazenado no cache e, ao detectar ganho, chama a função de efeito visual (barHandle:expDrop).
Filtragem e Proteções
Foram adicionadas proteções para ignorar:
Variações minúsculas de XP causadas por erros de arredondamento
Resets inesperados ou valores inválidos de XP
Resultado
Ao ler diretamente os valores reais de XP do personagem, essa abordagem ignora as inconsistências da API de eventos da Build 42 e garante detecção confiável de ganhos de XP.
Barra de XP funcionando corretamente em Singleplayer e Multiplayer
Eliminação total de falhas silenciosas
Independência de eventos instáveis
Compatibilidade total com a Build 42
Essa solução garante feedback de XP consistente e preciso, independentemente das mudanças internas do jogo ou do sistema de eventos.
XP Bar Not Updating – Build 42 Fix
In Build 42, the Events.AddXP event changed behavior or is no longer being triggered reliably on the client side, especially in Multiplayer. As a result, the mod was losing XP gain information, causing the XP bar to not update visually.
These failures were silent (no console errors), indicating that the event itself was simply not firing as expected.
Applied Fix
The old logic based on Events.AddXP was replaced with an OnPlayerUpdate-based monitoring system.
Instead of waiting for the game to notify XP gains, the mod now actively checks the player’s XP every tick by comparing it against an internal cache. This guarantees 100% accuracy and full compatibility, even in Multiplayer environments.
Changes in RUNE-EXP.lua XP Cache
A cache system was added to store the current XP of all skills when the character is loaded.
Active Monitoring (Polling)
The previous onAddExp logic was replaced with OnPlayerUpdate. Each tick, the script iterates through all skills from PerkFactory, compares the current XP with the cached value, and when an increase is detected, triggers the visual drop handler (barHandle:expDrop).
Filtering and Safety Checks
Additional safeguards were added to ignore:
Extremely small XP changes caused by rounding glitches
XP resets or invalid values
Result
By reading the actual XP values directly from the character, this approach completely bypasses Build 42 event API inconsistencies and ensures reliable XP detection.
XP bar updates correctly in Singleplayer and Multiplayer
No dependency on unreliable XP events
Silent failures fully eliminated
Fully compatible with Build 42 changes
This solution ensures consistent and accurate XP feedback regardless of internal engine or event system changes.
Workshop ID: 3650883381 Mod ID: RUNEXP
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.