Vanilla Fixes - MSUTeam/MSU GitHub Wiki
MSU fixes various vanilla bugs. These fixes are listed below along with links to the respective bug reports. Once these bugs are fixed in vanilla, they will be removed from MSU. In MSU codebase, vanilla fixes are marked with a comment that starts with VanillaFix
(not case sensitive), so you can search for that in the codebase to find the relevant code.
- onCombatStart for AI characters
- onLeave not called when fast traveling from towns
- Plain variants of helmets
- Missing road brushes
onCombatStart for AI characters
Bug report: http://battlebrothersgame.com/forums/topic/oncombatstarted-is-not-called-for-ai-characters/
In vanilla the onCombatStart
function is not present in actor.nut
and is only present in player.nut
. Therefore, it is only called for players. This also leads to the issue that the skill_container onCombatStarted
event is not called for skills present on AI characters. We consider this a bug and have fixed this in MSU as follows:
- Added
onCombatStart
toactor.nut
. - Overwritten
spawn
function oftatical_entity_manager
to callonCombatStart
for all actors. This function now calls theonCombatStarted
functions ofitem_container
andskill_container
. - Overwritten
onCombatStart
ofplayer.nut
to remove the calls toonCombatStarted
ofitem_container
andskill_container
as that is handled by our hook onactor.nut
. - Removed the
perk_inspiring_presence
fromstandard_bearer
entity because that perk has anonCombatStarted
function defined in it in vanilla. In vanilla this doesn't do anything as this function isn't called for AI entities, but with our fix it would be called. So we remove the perk to ensure the final gameplay behavior is identical to vanilla.
onLeave not called when fast traveling from towns
Bug report: https://steamcommunity.com/app/365360/discussions/1/4334231842064065638/
In vanilla when you use the port to fast travel from a town to another one, the onLeave
function is not called for the original settlement. We have fixed this in MSU as follows:
- Hooked the
fastTravelTo
function intown_travel_dialog_module
to manually call theonLeave
function of the settlement.
Plain variants of helmets
Bug report: https://battlebrothersgame.com/forums/topic/wrong-variant-in-setplainvariant-of-sallet_helmet/ Bug report: https://steamcommunity.com/app/365360/discussions/1/4408543140360563731/
In vanilla helmets which come in painted variants have a setPlainVariant
function defined in them which is supposed to set the sprite of the helmet to its non-painted variant. For certain helmets in vanilla this function sets the wrong sprite. We have fixed these in MSU as follows:
- Hooked
sallet_helmet
functionsetPlainVariant
to set the variant to 163. - Hooked
barbute_helmet
functionsetPlainVariant
to set the variant to 158.
Missing road brushes
Bug report: https://steamcommunity.com/app/365360/discussions/1/3436829654723733817/
In vanilla the sprites for some road brushes are missing leading to errors in the log. These do not cause any gameplay issue but are still technically bugs. We have fixed them in MSU by manually adding these brushes.