MoraleReports crash and workaround

A place for discussion of making game modifications.
AMX
Posts: 66
Joined: Fri Nov 24, 2017 10:41 pm

MoraleReports crash and workaround

Postby AMX » Sat Mar 05, 2022 10:58 am

Had a crash on the current in-development version (r38808).
Apparently it was triggered by a report about unhappy Harmonized Humans becoming content again - I think the problem is that there's no Chibi for harmonized populations, so the notification icon can't be built.

I worked around it by making a modified version of @MoraleReports.lua that doesn't try to load the correct chibi, it just shows a Human.
Attachments
ChibiWA.7z
(1.63 KiB) Downloaded 551 times

gaerzi
Posts: 210
Joined: Wed Jul 10, 2019 1:30 pm

Re: MoraleReports crash and workaround

Postby gaerzi » Sun Mar 06, 2022 10:57 am

AMX wrote:Had a crash on the current in-development version (r38808).
Apparently it was triggered by a report about unhappy Harmonized Humans becoming content again - I think the problem is that there's no Chibi for harmonized populations, so the notification icon can't be built.

I worked around it by making a modified version of @MoraleReports.lua that doesn't try to load the correct chibi, it just shows a Human.


Using

Code: Select all

      return notification_icons.chibi[report.race] or notification_icons.chibi![remove_race_suffix | report.race]
at line 85 does the trick better. For reference, this is basically the same code that's used in other places, it was just forgotten about in Morale Reports.


Return to “Modding”

Who is online

Users browsing this forum: No registered users and 33 guests