Describe the bug
The following files
"scripts/events/events/glutton_gets_fat_event.cnut"
"scripts/events/events/good_food_variety_event.cnut"
"scripts/events/events/legends/legend_reserve_gets_fat_event.cnut"
each have a (copy-pasted) statement that looks like so:
This has been placed in the wrong part of the file (the "bro" variable does not exist).
This causes the event to fail, which also causes the event manager to fail, breaking all events from running.
To fix this, I would move the check statement into each events for loop eg (for the reserve brother gets fat event)
foreach( bro in brothers )
{
if (bro.getFlags().get("IsSpecial") || bro.getFlags().get("IsPlayerCharacter") || bro.getBackground().getID() == "background.legend_puppet" || bro.getBackground().getID() == "background.legend_donkey")
{
continue;
}
if (bro.isInReserves())
{
if (!bro.getSkills().hasSkill("trait.gluttonous"))
{
candidates.push(bro);
}
}
}
To Reproduce
Steps to reproduce the behavior:
Start a Battle brothers campaign
Wait a few days
Check BB error log
Have no events fire.
Screenshots
Error log
Further errors are generated like so:
Additional context
The last release notes mention the following
"Player characters, special characters, puppets and donkeys can no longer get 'fat' or 'gluttonous' traits from events related to eating too much (in some cases, these instances may generate with these traits still)."
I believe that this directly relates to the error, this was coded incorrectly.
Versions
Describe the bug The following files "scripts/events/events/glutton_gets_fat_event.cnut" "scripts/events/events/good_food_variety_event.cnut" "scripts/events/events/legends/legend_reserve_gets_fat_event.cnut" each have a (copy-pasted) statement that looks like so:
This has been placed in the wrong part of the file (the "bro" variable does not exist). This causes the event to fail, which also causes the event manager to fail, breaking all events from running. To fix this, I would move the check statement into each events for loop eg (for the reserve brother gets fat event)
To Reproduce Steps to reproduce the behavior:
Screenshots Error log
Further errors are generated like so:
Additional context The last release notes mention the following "Player characters, special characters, puppets and donkeys can no longer get 'fat' or 'gluttonous' traits from events related to eating too much (in some cases, these instances may generate with these traits still)." I believe that this directly relates to the error, this was coded incorrectly.