Open Koumajutsu opened 4 years ago
It should be df.mood_type.Baby
going by the enum definition (i.e. not MoodType
). It's actually 8 years old, so the script has probably just been broken in this case the whole time. Thanks for the fix!
Ahh, ok. the only place I found an enumeration defining Baby as 8, was in ruby-autogen-win.rb which names the enum "MoodType", and all of the other enums defined there appeared to match the naming syntax used in the lua scripts, so I foolishly made the assumption that it was correct
Ruby actually changes the case of quite a lot of names from snake_case to camelCase - I'm not sure how much of that is necessary and how much is for the sake of being consistent with other Ruby code. I would suggest looking at gui/gm-editor in the future - it will give you the type name of an enum if you try to edit an enum field.
Babies specifically now have a special mood set (8) that causes them to behave like a baby Forcing them to 20 years old, but not clearing their mood to -1 causes them to starve and dehydrate, and not perform any tasks.
I fixed this in my personal copy by adding the following lines after changing profession:
I tried using df.MoodType enums, but I guess I got the syntax wrong
I additionally checked and changed unit.profession2 for housekeeping purposes