# How to get the number dinos a tribe currently have?

**URL:** <https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034>\
**Category:** ARK: Survival Evolved\
**Tags:** unreal-engine, Ark:-Survival-Evolved, Modding\
**Created:** [April 30, 2017, 8:38am UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034 "2017-04-30T08:38:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_621537581](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_621537581](https://forums.unrealengine.com/u/anonymous_user_621537581)\
**Post date:** [April 30, 2017, 8:38am UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/1 "2017-04-30T08:38:49Z")

</div>

Hello guys!

I would like to know how much dinos a tribe currently have.  
How could I do it without looping on ALL the dinos in the game?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_621537581](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_621537581](https://forums.unrealengine.com/u/anonymous_user_621537581)\
**Post date:** [May 2, 2017, 5:37pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/2 "2017-05-02T17:37:27Z")

</div>

Found a function “GetAllNPCsOfTeam”, based on the TargetingTeam, with a “GetGameState-\>Cast to ShooterGameState”… but doesnt seems to work in the devkit test-environnement.  
Will take a try on my server tomorrow.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_621537581](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_621537581](https://forums.unrealengine.com/u/anonymous_user_621537581)\
**Post date:** [May 3, 2017, 1:56pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/3 "2017-05-03T13:56:19Z")

</div>

I dont understand why “GetAllNPCsOfTeam-\>Length” returns 0… Any idea? Like if people didnt had any dino in their tribe… :s

Did someone already tried this function?

 ![GetAllNPCsofTeamBug.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/9/fa982e0b82bb00fef1849f431bdac1915a402d0c.png)

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [May 3, 2017, 7:46pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/4 "2017-05-03T19:46:53Z")

</div>

Print out targeting team as well, make sure that isn’t coming out as a 0.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_621537581](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_621537581](https://forums.unrealengine.com/u/anonymous_user_621537581)\
**Post date:** [May 4, 2017, 12:33pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/5 "2017-05-04T12:33:07Z")

</div>

No problem with the Targeting team, it works perfectly, like the other function getting all the players from the targeting tribe (not on the screen).

I did the stuff by looping on all the DinoCharacter. Thought it would do some lag but it doesnt.  
Some arrays and counters did the job.

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [May 4, 2017, 8:39pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/6 "2017-05-04T20:39:19Z")

</div>

> [@Zholtar;704071](#):
>
> No problem with the Targeting team, it works perfectly, like the other function getting all the players from the targeting tribe (not on the screen).
> 
> I did the stuff by looping on all the DinoCharacter. Thought it would do some lag but it doesnt.  
> Some arrays and counters did the job.

Wait until you have a server with 3,000 tames 😛 I had to create a GetAllLinkedStructure loop due to me not being able to find a native function for this. Now that caused some lag on the larger bases, noticeable stalls every time I looped. Fun times.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_621537581](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_621537581](https://forums.unrealengine.com/u/anonymous_user_621537581)\
**Post date:** [May 5, 2017, 8:50am UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/7 "2017-05-05T08:50:04Z")

</div>

I loop only on demand.

And that’s to avoid tribes have too much dinos that I put a “limit by player” and a “limit by tribe”. I’m on a PvE with rules server.  
This tool was to check if there is no cheaters about the dino limit 😉

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [May 5, 2017, 8:43pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/8 "2017-05-05T20:43:08Z")

</div>

Do you plan on adding anything to deal with tribes that have quit? I have auto decay on my server, but not claimable dinos. The dinos of players who quit just sit there for months if nobody kills them. If I log in and delete them, I get blown up in chat 😜

---

<div class="post-metadata">

**Author:** ![SkyeEden](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/skyeeden/32/1116094_2.png) [@SkyeEden](https://forums.unrealengine.com/u/SkyeEden)\
**Post date:** [March 9, 2022, 9:15pm UTC](https://forums.unrealengine.com/t/how-to-get-the-number-dinos-a-tribe-currently-have/91034/9 "2022-03-09T21:15:50Z")

</div>


