STEAM GROUP
Potato's Custom MvM Servers potatomvm
STEAM GROUP
Potato's Custom MvM Servers potatomvm
1,691
IN-GAME
8,204
ONLINE
Founded
31 March, 2017
Language
English
Location
United States 
Braindawg 1 Apr, 2019 @ 7:00am
Where Behind/Ahead/Anywhere
Does anyone know how this determines where to spawn bots? I was assuming it picked a spot on the nav between players and the bomb hatch but it seems more simplistic and inconsistent than that.

On larger maps Behind seems to work decently (Underground works alright, Steep is kind of consistent as well where it spawns things), while others it seemingly spawns wherever it wants in predetermined spots that aren't behind anyone (mostly smaller maps like waterfront and hideout).

My theory was that it spawns bots in pre-determined areas and periodically moves further back, but I'm not entirely sure

I haven't messed with Ahead or Anywhere enough to know if they're worth anything but I'm guessing they have the same issues.

Populators with Behind/Ahead/Anywhere also seem to not like listening to spawncount and cooldowntime

I also haven't really messed around with it on valve maps, but it might be more consistent on those as far as I know. Has valve used those Where values in any of their missions?
Last edited by Braindawg; 1 Apr, 2019 @ 7:10am
Originally posted by Kenzzer:
CUtlVector<CNavArea *> aCollectedAreas; // collect nav area bullshitery from blu spawn points // end of collect bullshitery int iTotalNavAreas = aCollectedAreas.Count(); if ( iTotalNavAreas ) { int iAreaArrayIndex = 0; if (this->m_where == 2) // Behind { iAreaArrayIndex = ffloor((1.0 - fmaxf(RandomFloat(0, 1), RandomFloat(0, 1))) * (float)iTotalNavAreas); } else if (this->m_where == 3) //Anywhere { iAreaArrayIndex = ffloor(RandomFloat(0, 1) * (float)iTotalNavAreas); } else if (this->m_where == 1) // Ahead { iAreaArrayIndex = ffloor(fmaxf(RandomFloat(0, 1), RandomFloat(0, 1)) * (float)iTotalNavAreas); } else { iAreaArrayIndex = 0; } if ( iAreaArrayIndex >= iTotalNavAreas ) // Avoid out of array bound crash iAreaArrayIndex = iTotalNavAreas - 1; aCollectedAreas.Get(iAreaArrayIndex); }
Already posted my finding on discord, but for future reference posting here as well.
Nav Areas are collected from the given spawn point name, as long a robot can walk there, or drop down (18 HU max up, 100 HU max down)
If using AnyWhere attribute, then a random nav area will be picked from the list of nav areas collected.
If using Behind then it picks a random nav area at the end of the list of nav areas collected.
If using Ahead then it picks a random nav area at the beginning of the list of nav areas collected.

And if not using any attribute it takes the first nav area collected (so usually the nav area right under the spawn point entity)

Note: There's also other conditions for which nav areas get picked or not, but it's not really that relevant.
< >
Showing 1-8 of 8 comments
Sntr 1 Apr, 2019 @ 7:10am 
those Where values are unused entirely, there's not a single valve mission that uses them
Braindawg 1 Apr, 2019 @ 7:14am 
Well that makes things slightly more confusing
Sntr 1 Apr, 2019 @ 7:18am 
chances are they are unused because of the way they went with the level design? The maps being that straightforward don't add a lot of wiggleroom for those Where values

- Ahead and Behind probably use very similar placement methods and having bots spawn right next to you isn't very fun to deal with
- Anywhere, I have no idea but is probably going to fall under the same issue as the above two
Braindawg 1 Apr, 2019 @ 7:25am 
From what I've noticed Behind spawns bots on Steep in a few specific locations consistently

~right around/next to the traincar near the front
~near the front upgrade station
~either in the tunnel bombpath or on the elevated platform right before the tunnel
~spawnbot_high if all else fails

It also seemingly spawns in these locations at random, regardless of where players are

I'm also fairly certain these where values do not work properly at all in WaveSpawn populators, only Mission and old populators like PeriodicSpawn
Last edited by Braindawg; 13 Apr, 2019 @ 10:56am
Kenzzer 1 Apr, 2019 @ 8:11am 
From memory I believe those spawn attributes use hiding spots on the nav based on their distance from the hatch. I did some research about these 2 years ago I'll try to find the files tonight.
Braindawg 1 Apr, 2019 @ 8:50am 
That would be appreciated. I haven't got a clue at all as to how it works and Where Behind at least seems useful for weapons that benefit from behind attacks (back scatter, backburner, holiday punch, etc.)

EDIT:
I might know how Behind is done at least. Hell-met mentioned last night that Behind is based on spy teleport spots. It still seems pretty inconsistent for a spy teleport spot, but it would explain why behind tends to spawn things much closer to players on smaller maps.
Last edited by Braindawg; 2 Apr, 2019 @ 6:21am
The author of this thread has indicated that this post answers the original topic.
Kenzzer 2 Apr, 2019 @ 12:36pm 
CUtlVector<CNavArea *> aCollectedAreas; // collect nav area bullshitery from blu spawn points // end of collect bullshitery int iTotalNavAreas = aCollectedAreas.Count(); if ( iTotalNavAreas ) { int iAreaArrayIndex = 0; if (this->m_where == 2) // Behind { iAreaArrayIndex = ffloor((1.0 - fmaxf(RandomFloat(0, 1), RandomFloat(0, 1))) * (float)iTotalNavAreas); } else if (this->m_where == 3) //Anywhere { iAreaArrayIndex = ffloor(RandomFloat(0, 1) * (float)iTotalNavAreas); } else if (this->m_where == 1) // Ahead { iAreaArrayIndex = ffloor(fmaxf(RandomFloat(0, 1), RandomFloat(0, 1)) * (float)iTotalNavAreas); } else { iAreaArrayIndex = 0; } if ( iAreaArrayIndex >= iTotalNavAreas ) // Avoid out of array bound crash iAreaArrayIndex = iTotalNavAreas - 1; aCollectedAreas.Get(iAreaArrayIndex); }
Already posted my finding on discord, but for future reference posting here as well.
Nav Areas are collected from the given spawn point name, as long a robot can walk there, or drop down (18 HU max up, 100 HU max down)
If using AnyWhere attribute, then a random nav area will be picked from the list of nav areas collected.
If using Behind then it picks a random nav area at the end of the list of nav areas collected.
If using Ahead then it picks a random nav area at the beginning of the list of nav areas collected.

And if not using any attribute it takes the first nav area collected (so usually the nav area right under the spawn point entity)

Note: There's also other conditions for which nav areas get picked or not, but it's not really that relevant.
Last edited by Kenzzer; 2 Apr, 2019 @ 12:36pm
Braindawg 2 Apr, 2019 @ 3:03pm 
Yeeting everything I said before since it was basically repeating what Beno said and dumb shit. Plus I found what I think was the intended way to use this:


As it turns out, the old and crusty where values work pretty well with old and crusty populators. While this does run the risk of hitting the bot limit, a long enough interval should be fine. Since this will continually attempt to spawn, and has no DesiredCount/SpawnCount to worry about, this should be considerably more consistent (also these can actually grab bomb).

If only PeriodicSpawn had wave limits. I could see this being useful for 666 or a mission with bots across every wave.

PeriodicSpawn { Where Behind When 30 TFBot { Class Scout ClassIcon "scout_backscatt_h" //won't appear on wavebar Name "Bomb Stealing Scout" Skill Expert Item "The Back Scatter" WeaponRestrictions PrimaryOnly } }

EDIT: if Behind dies it will occasionally spawn bots in the tank spawn as well
Last edited by Braindawg; 15 Apr, 2019 @ 8:08am
< >
Showing 1-8 of 8 comments
Per page: 1530 50