Hi all, I had a problem with a person's house not showing up on the map when I learned it. Here is how I found and fixed it.
I am running an older version of the beta from gitgud, so if it has already been fixed, good.
So, this problem occurs when you learn the home of a girl with only a sister (does not happen with mother/daughter as far as I have seen).
1. Every girl is created first with their own last_name and their home is set using this last_name.
2. Later, if she is randomly chosen to have a sister and neither of them are married, the code gives one girl the other girl's last_name.
3. However, because the first girl's home has the old last_name, it does not correctly get added when it is learned.
4. Adding the "change_home_location" line to the code should hopefully fix it.
Code:
def update_sister_relationship(sister, other_sister):
town_relationships.update_relationship(sister, other_sister, "Sister")
# when not married, their last names should be identical
if other_sister.relationship != "Married" and sister.relationship != "Married":
other_sister.last_name = sister.last_name
other_sister.change_home_location(sister.home) // Add this to fix the home
Once a game has started and you learn the girl's home, if it does not show up on the map, go to the_person and open the console and type these lines to see if you have my problem:
Code:
the_person.name + " " + the_person.last_name + " home"
the_person.home.name
sorted(town_relationships.get_relationship_type_list(the_person, visible = True), key = lambda x: x[0].name)
sorted(town_relationships.get_relationship_type_list(the_person, visible = True), key = lambda x: x[0].name)[0][0].home.name
If line 3 returns more than just one sister and the sister's last_name does not match you may need to change the [0][0] to [1][0] on line 4
If lines 1 and 2 do not match, but the sister's home name from line 4 matches the last_name, run these lines:
Code:
mc.known_home_locations.remove(the_person.home)
the_person.change_home_location(sorted(town_relationships.get_relationship_type_list(the_person, visible = True), key = lambda x: x[0].name)[0][0].home)
mc.known_home_locations.append(the_person.home)
(adjust the [0][0] if needed)