Pathos14489 / Pantella

GNU General Public License v3.0
4 stars 1 forks source link

Remove a Silent Exit Condition - NPC Not Found #4

Open jonathonbarton opened 8 months ago

jonathonbarton commented 8 months ago

Mantella can exit silently if playing full screen and an NPC is not found. This means that full-screen players can have Mantella die and never know...not the best user experience.

Suggestion: Mantella should instead:

  1. call the "end conversation" function to loop back to a ready state
  2. switch to a voice that user can designate as their character's own voice or a Narrator Voice and say something like "that person doesn't look like they want to be interrupted right now" or something similar.
  3. Append the details that can be gathered (name, RefID, BaseID, Voicetype, Race, Gender, etc.) to the bottom of the skyrim_characters.csv OR to a separate file...

    if character is None:
        logging.warning(f"Could not find character '{character_name}' in character database using name lookup.")
        logging.warning(f"Could not find character '{character_ref_id}' in character database using ref_id lookup.")
        logging.warning(f"Could not find character '{character_base_id}' in character database using base_id lookup.")
        logging.error(f"Could not find character '{character_name}' in character database.")
    
        # Create a CSV file in the data directory named for the character
        with open(f'data/Add_{character_name}_Bio.csv', 'w', newline='') as file:
            writer = csv.writer(file)
            writer.writerow(["bio_url", "bio_name", "voice_model", "skyrim_voice_folder", "race", "gender", "species", "ref_id", "base_id", "author", "lang_override"])
            writer.writerow(["Not Found", f"{character_name} is a stranger", character_name, "NordRadiant", "NordMale", "Unknown", "Unknown", "unknown", character_ref_id, character_base_id, "unknown", "en"])
        # Append to skyrim_characters.csv, instead.
        # with open('data/skyrim_characters.csv', 'a', newline='') as file:
        # writer = csv.writer(file)
        # writer.writerow(["Not Found", f"{character_name} is a stranger", character_name, "NordRadiant", "NordMale", "Unknown", "Unknown", "unknown", character_ref_id, character_base_id, "unknown", "en"])
    
        input("Press enter to continue...")
        exit(0)

But then loop back to "ready" instead of exit(0)...

        input("Press enter to continue...")
        exit(0)