NPC disappeared, can't figure out how to bring him back

While playing with the latest experimental, I found myself clearing a mansion at night whith two npcs following and helping me. Those two npcs were always going in and out of my vision (it was dark) and after some time one of them disappeared completely, I checked her position on the map and searched the rooms there but I couldn’t find her. Since we both had two ways radios I tried calling her with the faction interface (#) but this showed up:

I then used the debug console clairvoyance artifact thing to see if she still existed on this phisical realm but apparently she’s not.

I already searched for other people that experienced similiar problems and tried their solutions but none of them worked and I was wondering where is the npc stuff stored in the files. I already searched for them in the o.0.0 file (there I searched the names of the npcs but I didn’t find them, I then searched for posx and posx and changed them to 1 as I read in another post but that didn’t work either) and the .sav file in the save folder but I still couldn’t find them.

I found the data regarding the npc in the o.-1.-1 file, I modified her coordinates and that moved her to those coordinates, but she is still visible only on the map, I will try something else tomorrow.

hmmm, they are on a companion_mission() which is weird if you didnt send them on one.

WHilst on a companion mission, they live in the overmapbuffer , i.e on a different plane of existence, until they are called back from their mission - and in your screenshot it shows them as travelling, which is doubly weird.

If you can find some marker in the save file for them has_companion_mission or something and remove it, and change their attitude to NPCATT_NULL which should be 0 , and mission to NPC_MISSION_GUARD_ALLY which should be 6, then they might reappear…

Well, I searched for all those terms but found none, however I found this line here.
"comp_mission_id":"","comp_mission_pt":[0,0,0],"comp_mission_role":"","companion_mission_role_id":"","companion_mission_points":[],"companion_mission_time":-1,"companion_mission_time_ret":-1,"companion_mission_inv":[],"restock":-1,"last_updated":238531,"complaints":{}}]

I tried messing around with it, setting some values to 0 or 6 but without knowing what to do I didn’t conclude anything.

If you got that far, solution seems to be simple as mission just seems to be broken for this instance. Send another companion to a mission and copy 2nd NPC’s mission detail value into 1st.

Huh, that could work.

I travelled away from my other npc and told him to come to me (through the radio) but I’m not figuring out how to copy one stuff onto the other and the file formatting doesn’t help either. If anyone knows how to make the file more legible or I could upload it here so someone else better than me can do it I’ll be very grateful.

It’s the bit you posted above regarding comp_mission and so on.

if you have a basecamp, send another NPC on a mission to forage for plants or something, then save the game.

THen open up that NPCs file to find the bits you posted above, paste them to replace the same bits in the missing NPCs file.

Basically, all the entries you pasted, comp_mission_id, comp_mission_pt and so on, make sure they are equal to the NPC out on a propre normal mission, then load, go to basecamp, go to “recover foragers” and you should ( hopefully ) see the missing NPC there to recall and they should appear.

I do not have a base camp, but calling the NPC and making him come to me seems to work too.
I copied this in the missing NPC file
"comp_mission_id":"travelling","comp_mission_pt":[-26,271,0],"comp_mission_role":"TRAVELLER","companion_mission_role_id":"","companion_mission_points":[],"companion_mission_time":-1,"companion_mission_time_ret":-1,"companion_mission_inv":[],"restock":-1,"last_updated":259801,"complaints":{"look_for_player":253861,}

But it seems like I’ve missed something since when I try to load the game I get this error
ERROR : src/cata_utility.cpp:446 [bool read_from_file(const string&, const std::function<void(std::basic_istream&)>&)] Failed to read from “./save/New Baden/o.-1.1”: line 31:286585: separator not strictly allowed at end of object

n_role":“TRAVELLER”,“companion_mission_role_id”:"",“companion_mission_points”:[],“companion_mission_time”:-1,“companion_mission_time_ret”:-1,“companion_mission_inv”:[],“restock”:-1,“last_updated”:259801,“complaints”:{“look_for_player”:253861,
^
}
,“camps”:[]
,“overmap_special_placements”:[{“special”:“Acid Anthill”,“placements”:[{“points”:[{“p”:[116,59,0]},{“p”:[51,59,0]},{“p”:[3,170,0]}]}]},{“special”:“Anthill”,“placements”:[{“points”:[{“p”:[170,160,0]},{“p”:[42,93,0]},{“p”:[123,2

That means theres a comma where there shouldn’t be. At this point it’s gonna be tough to recover the NPC , all I can suggest is making sure the two save files are identical between the one that is on a mission and the one that is missing, except for their stats skills inventory, name etc.

OR just keep tinkering with it, if you really want them back.

If someone is trying to solve this problem then here is the solution:
1)You should find NPC file in save directory by his\her name. I found my in o.1.1.
2)Now you need to find line starting with “comp_mission_id”.You should check after NPC’s name, not before. (My example: “comp_mission_id”:“travelling”,“comp_mission_pt”:[296,263,0],“comp_mission_role”:“TRAVELLER”)
3)Now make it look like this “comp_mission_id”:"",“comp_mission_pt”:[0,0,0],“comp_mission_role”:""
4)Tickle your nipples.
5)Why are you here? Your NPC waiting for you!

Or you can just select “emergency recall” from the basecamp bulletin board, which will do the same thing but in-game.

omg, I didnt get to the board. solution was so simple…