Jump to content

Need help identifying/removing missing teammate


kraag

Recommended Posts

I made an entry on the UESP Console talk page, I'll just copy/paste that.

In game console, typing "GetPlayerTeammateCount" returns to me "Player teammate count > 3", but I have no idea who/what/where these teammates are. Is there a way to remove them or reset the player teammate count?

 

Does this have something to do with player factions/relationships? I use a few different addon followers, Inigo and 3DNPC mainly.

 

I have no followers either, I have tried "set playerfollowercount to 0" and also "set playeranimalcount to 0", both of these did not work.

 

I have also tried waiting in game for up to a week, in hope that the teammates would "get tired of waiting and go home", but this did not work.

 

Any help will be greatly appreciated!

Link to comment
Share on other sites

You should just ignore that value because there's no equivalent Papyrus function and no practical way to use it in a mod.

 

The developers marked that function obsolete. It still gives a count of the actors that currently have the teammate flag set but there's no way to get a list of those teammates and no real point in doing so anyway.

The teammate flag makes changes to the AI of characters when it's turned on but it doesn't mean those characters are actually following the player. (The changes are listed on the CK's SetPlayerTeammate page.)

Link to comment
Share on other sites

In some cases, for some mods, it is useful to find the actual player team mates.

 

It can be done using Papyrus and SKSE.

 

Actor[] teamMates = new Actor[16]
int numFound = 0
Cell c = playerRef.getparentCell()
int num = (c.GetNumRefs(62)) as Int
while num && numFound<16
  num -= 1
  Actor a = c.GetNthRef(num, 62) as Actor
  if a && a.isPlayerTeamMate()
    teamMates[numFound] = a
    numFound += 1
  endIf
endWhile
At the end you will have an array with all the player team mates (followers for all the followers extension mods) and the actual number of them.

 

I hope this helps.

Link to comment
Share on other sites

That won't find all teammates. It will find those in the same cell as the player, but as I said teammates don't actually have to be following the player.

 

And with one exception (Campfires by Chesko) every mod I've seen that tries to find NPCs based on their teammate status ends up breaking the more complex followers. The unique followers like Vilja and Inigo aren't in the standard follower factions specifically so they don't get caught up with mods that try to manage followers. Unfortunately they have to be teammates to work. If you think you need to find all of the player's teammates please consider very carefully whether you really need to do that and why. At the very least provide some mechanism that other modders can use to avoid having their NPCs caught up in your list or you've effectively made your mod incompatible with the advanced follower mods.

Link to comment
Share on other sites

Found one of my missing 'teammates', it was a dog follower [Catbane] that came with the Greater Saarthal mod, in case anyone else has this problem. Selected dog in console, type 'SetPlayerTeammate 0'.

Thanks very much cpuLL for offering help with that script, although it is a little beyond my comprehension, I appreciate it all the same :smile:

Edited by kraag
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...