MineColonies

MineColonies

53M Downloads

Wrong citizen being removed or replaced in a house when moved as a guard and/or when a child is born.

Knaxia opened this issue ยท 6 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.17.1 (Forge 37.1.1)
  • MineColonies Version: 1.17.1-1.0.201-ALPHA, 1.17.1-1.0.275-ALPHA & 1.17.1-1.0.312-BETA (beta being the most up to date)
  • Structurize Version: structurize-1.17.1-0.13.264-ALPHA & structurize-1.17.1-1.0.311-BETA
  • Related Mods and their Versions: [None that I know that affects that)

Expected behavior

When a Citizen is moved as a guard, they are the only one removed from their assigned house. When an empty spot is available and childs are turned on, that empty spot will be used.

Actual behavior

I've had this issue since I started my colony in 1.17.1, which was on alpha 201, even today, on beta 312, which is newer than current alpha, the issue persist. It creates a lot of issues with bed assignations and is annoying to fix.

I have Housing set to MANUAL, and Child will be born set to ON.

When a guard is moved to a tower or barrack, their spot and sometimes a random other spot will also be freed in their house. It does not happen all the time, but I've been so often, I have to keep a spreadsheet up to date to fix the issue manually and it's time consuming. This issue will also affect any newly assigned child that will be born in that house.

The wrongly removed citizen will still acts as if it's their house, and their assigned bed in the house, and will go sleep there during the night, but the UI will not show it. If you open the UI when the guard left, but no child is born, their name will be missing from assigned citizens, and when you select the "assign citizen" button, their name will NOT appear in the list. If you go to another house and remove anyone, you can then add the citizen that is "missing" from the other house then return and assign them back.

Now if a child is born in that said house, it will do so because the mod behavior will check if there are empty spots in that house, it will then check who lives there in order to give them a name and assigns them a bed in that house. That child can end up, if it wasn't fixed before, being assigned to that ghosted citizen, which is still assigned to that house and a bed. Sometimes the child will be assigned to the same bed as that previous citizen, making it impossible for both of them to sleep at night.

I've had a recent occurrence where I had 2 citizen from 2 different houses sent as guards on the same day. So there was one spot empty in 2 different houses. But with that issue, both children were born in the same house and were both assigned ghosted citizen, so I ended up with 4 citizen in a level 3 house (max 3 citizen).

This behavior has been going on with any houses (any level) , and the tavern (any level). The only real way to fix it is to kick out all the current residents of another house, assign all of those from the bugged house, then kick them again, assign back the original people and then go back to the bugged out and re-assign everyone.

I am not sure if the guard being removed and the child being born are both independent issues, or if they're the result of each other.

Steps to reproduce the issue

  1. Have a colony set up, housing set to MANUAL - Child will be born to ON
  2. Build a tavern and assign all your citizens (faster than having to make a house on level 2 or 3)
  3. Make a guard tower
  4. Assign guard for the tower
  5. Wait for a child to be born
  6. Check the Tavern UI and check for assigned citizen, there might be a missing name from someone who wasn't set as a guard, and you can't assign them back. The child might also be there, but still have an empty spot (it might NOT always happen ,but it does frequently.)

Logs

Apart from a lot of [Server thread/WARN]: Could not find iterator for value: using default instead! , I don't see anything in the latest.log that could point to anything.

I did not have a crash related to that, the only crashes I had were related to the miner position on ladder when I was connecting to the server. Which seems gone since I updated version, I will post something different if it happens again.

  • crashlog: NONE

Notes

I've waited before reporting this because it took me a while to figure out what was happening. Each time I was having new children, I would often not get the colonists being all tucked into bed message, and I often saw weird empty spots in my tavern when I was going to check, or assign different people.


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

The bed thing can happen here and there. What is important is the actual assignment in the list.

commented

I had the issue happen again last night, but this time, I didn't put anyone as a guard at all, it was after I upgraded a house, meaning that it only happens once a house spot has been added, which means it happens when a child is born. The guard issue isn't directly related, but it does clear up a slot, which I thought was the issue.

In all, it seems that once a child is born into house which already has someone living in it, has a chance to overwrite an existing spot from the house.

Here's how it happened:
-I built a new house (Level 1)
-A new child was born in that house, taking slot 1
-I upgraded the house to level 2
-The child grew up as an adult
-Another child was born
-I assigned the new adult to a job (Florist)
-Night came, I went to check
-In the Citizen UI, only the newly born child was in the list, the "Assign 1 citizen" button was available, and upon clicking it, the list didn't give the current adult living here, nor the child, only the rest of the town.
-I went up to check the beds and both the Adult and the Child were sleeping in the same bed, overlapping each other

So again, I had to go to another house, remove someone, assign the ghosted Adult, remove him and put the original resident back, then head back to the new house and assign that Adult again.

commented

I believe I am having the same or very similar issues. I am running on minecolonies-1.18.1-1.0.278-RELEASE. I have noticed a few oddities.

  • Sometimes when I reload my game after a night some citizens will show up and complain about not having had a bed for weeks even though before the restart noone was complaining.
  • I had two citizens, who were not assigned to a level 3 house sleep in the same bed while two others were already assigned to it. This happened within automatic assignment adn these two were not assigned anywhere else.
  • The number of citizens listed in the townhall also seems odd to me. It lists that I have 16/20 citizens, even though I have 14 beds in different houses and 7 beds in guard towers and the barracks. However, I am not sure how that number 20 is calculated, since I currently dont have all of the guards beds occupied.
  • Lately, I have the issue that I dont get the chat message indicating that all colonists have been tucked into bed anymore. Perhaps this indicates there has been a missassignment.

Overall I am not sure however how to reproduce this bug

commented
* The number of citizens listed in the townhall also seems odd to me. It lists that I have 16/20 citizens, even though I have 14 beds in different houses and 7 beds in guard towers and the barracks. However, I am not sure how that number 20 is calculated, since I currently dont have all of the guards beds occupied.

I seem to have a similar issue right now too. I have 1 empty guardtower (RIP guard) and 1 empty bed in a house, and it lists 42/43. I can confirm I have 42 citizens in my colony right now, but it should show 42/44 instead, unless the tower doesn't count for an empty bed/house?

commented

Empty towers don't count towards the limit, because no kid can be born in them.

commented

I just had the issue happen live as I was testing it.

I had only 1 house I just upgraded from level 2 to level 3. There were 2 citizen assigned and one empty slot (1st screenshot). I went around, didn't change anyone's job, assign guard or whatever. 2 in-game days later, a child was born. I went to check the house, and both previous citizen are now missing and only the newly born child is assigned to the house, and the 2 previous citizen are not available in the "Assign 2 Citizens" list. You can also clearly see they all go in the building to sleep at night (last screenshot)

2021-12-29_18 21 52
2021-12-29_18 52 21
2021-12-29_18 52 32
2021-12-29_18 57 38