diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index a0c250f7bdc2d..4661a5f13545b 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -3539,6 +3539,7 @@ static void spawn_npc() temp->getID() ) ); std::string new_fac_id = "solo_"; new_fac_id += temp->name; + new_fac_id += std::to_string( temp->getID().get_value() ); // create a new "lone wolf" faction for this one NPC faction *new_solo_fac = g->faction_manager_ptr->add_new_faction( temp->name, faction_id( new_fac_id ), faction_no_faction ); diff --git a/src/game.cpp b/src/game.cpp index 2bc24e0d30967..42481446aca29 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -12875,6 +12875,7 @@ void game::perhaps_add_random_npc( bool ignore_spawn_timers_and_rates ) std::string new_fac_id = "solo_"; new_fac_id += tmp->name; + new_fac_id += std::to_string( tmp->getID().get_value() ); // create a new "lone wolf" faction for this one NPC faction *new_solo_fac = faction_manager_ptr->add_new_faction( tmp->name, faction_id( new_fac_id ), faction_no_faction ); diff --git a/src/npctalk_funcs.cpp b/src/npctalk_funcs.cpp index 07ca718c7ea0e..7b9c0d416d14c 100644 --- a/src/npctalk_funcs.cpp +++ b/src/npctalk_funcs.cpp @@ -944,6 +944,7 @@ void talk_function::leave( npc &p ) g->remove_npc_follower( p.getID() ); std::string new_fac_id = "solo_"; new_fac_id += p.name; + new_fac_id += std::to_string( p.getID().get_value() ); p.job.clear_all_priorities(); // create a new "lone wolf" faction for this one NPC faction *new_solo_fac = g->faction_manager_ptr->add_new_faction( p.name,