As title states, if you have an 8v8 server will egg spawning stay at a static rate or does the rate at which eggs spawn increases with larger server i.e. 10v10?
<!--quoteo(post=2063210:date=Jan 19 2013, 01:16 PM:name=Solarity)--><div class='quotetop'>QUOTE (Solarity @ Jan 19 2013, 01:16 PM) <a href="index.php?act=findpost&pid=2063210"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->As title states, if you have an 8v8 server will egg spawning stay at a static rate or does the rate at which eggs spawn increases with larger server i.e. 10v10?<!--QuoteEnd--></div><!--QuoteEEnd-->
<!--quoteo(post=2063235:date=Jan 19 2013, 05:51 PM:name=DamDSx)--><div class='quotetop'>QUOTE (DamDSx @ Jan 19 2013, 05:51 PM) <a href="index.php?act=findpost&pid=2063235"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I thought commander spawned eggs?<!--QuoteEnd--></div><!--QuoteEEnd--> A Hive spawns eggs, but the commander can spawn eggs from the Shift.
I remember in the beta they mentioned that more players on the team would increase the egg spawn rate. Spawning isn't any worse for me on teams with less players than it is with more however. After looking through the Lua though I haven't found anything relating egg spawns to player count so my guess would be no it doesn't.
Correction to my last, the code does suggest that player count does matter. <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local function GetEggSpawnTime(self)
if Shared.GetDevMode() then return 3 end
local numPlayers = Clamp(self:GetTeam():GetNumPlayers(), 1, kMaxPlayers) local numDeadPlayers = self:GetTeam():GetNumDeadPlayers()
local eggSpawnTime = CalcEggSpawnTime(numPlayers, GetNumEggs(self) + 1, numDeadPlayers) return eggSpawnTime<!--c2--></div><!--ec2-->
that's the reason why with higher player count aliens have ridiculous spawn times. Esspecially in the early game, due to one hive only.
<a href="http://gaming.stackexchange.com/questions/91702/what-determines-spawning-rates" target="_blank">Source: 27.11.2012</a> "Each hive automatically creates one egg every 4 seconds, up to a maximum of 9 per hive. Aliens spawn in waves, which occurs every 13 seconds. All dead aliens (up to the number of active eggs) are randomly assigned an egg, which they spawn from 3 seconds later."
But I think it is not ALL dead aliens but only 3 per hive per wave.
edit: ^really great that you can copy code, but have no idea what it means. What are we supposed to do with that information now?
I think they removed the 3 cap a few build ago and it does scale better than it used to, though still sucks on 24 player servers until the second hive is up.
Thankfully most marines dont know how fragile the alien spawn system is....otherwise we would see more base rushes early.
<!--quoteo(post=2063467:date=Jan 19 2013, 06:24 PM:name=derWalter)--><div class='quotetop'>QUOTE (derWalter @ Jan 19 2013, 06:24 PM) <a href="index.php?act=findpost&pid=2063467"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->if he would post CalcEggSpawnTime() and Clamp() we would know how it works :)<!--QuoteEnd--></div><!--QuoteEEnd--> Yea not sure where those functions are located, all files are in your ns directory then ns2/lua/
Kouji_SanSr. Hινε UÏкεεÏεг - EUPT DeputyThe NetherlandsJoin Date: 2003-05-13Member: 16271Members, NS2 Playtester, Squad Five Blue
<!--quoteo(post=2063511:date=Jan 20 2013, 02:54 AM:name=Davil)--><div class='quotetop'>QUOTE (Davil @ Jan 20 2013, 02:54 AM) <a href="index.php?act=findpost&pid=2063511"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yea not sure where those functions are located, all files are in your ns directory then ns2/lua/<!--QuoteEnd--></div><!--QuoteEEnd--> open up the NS2 project in decode, you can search for them much easier using that :)
<!--quoteo(post=2063522:date=Jan 19 2013, 08:28 PM:name=Kouji_San)--><div class='quotetop'>QUOTE (Kouji_San @ Jan 19 2013, 08:28 PM) <a href="index.php?act=findpost&pid=2063522"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->open up the NS2 project in decode, you can search for them much easier using that :)<!--QuoteEnd--></div><!--QuoteEEnd--> Ah good call
It means having more alien players speeds up the egg spawn rate but having more existing eggs slows it down. Refer to <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=127304&st=0&p=2063256&#entry2063256" target="_blank">this post</a> for details.
Static egg generator with the 25% lowered egg spawn from hives and the insanely expensive eggs from the shift, this is why we don’t see 32 slot servers anymore. Aliens get owned every single team at respawn.
<!--quoteo(post=2063580:date=Jan 19 2013, 11:51 PM:name=Salt)--><div class='quotetop'>QUOTE (Salt @ Jan 19 2013, 11:51 PM) <a href="index.php?act=findpost&pid=2063580"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Clamp is a base lua function which works like this in psuedo / lua
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function math.clamp(input, min_val, max_val) if input < min_val then input = min_val elseif input > max_val then input = max_val end return input end<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd--> All it does is set a min/max value for the first argument based off the other 2.
To go into detail about what everything does will be tricky so I'll use the important parts.
clampedEggNumber variable, ensures that eggNumber doesn't exceed max eggs per hive clampedNumPlayers variable, used to make sure that the NumPlayers value doesn't go above half the server total population.
calcEggScalar variable, as soon as I see sin or cosin my eyes generally roll into my head but I believe since this mentions scalar it has something to do with vectors calcSpawnTime variable, this holds the calculated spawn time I don't know what AlienEggPlayerScalar is so can't go into much detail other than that.
in the end it returns a value based on the calculated spawntime but also it is "clamped" between min/max egg spawn times which I also don't know.
Interestingly I see an extra argument in the call to CalcEggSpawnTime from the GetEggSpawnTime function, weird. I don't see how that can't be causing an error, but then again I'm not a Lua expert.
Edit: Someone pointed out to me that if an extra value is passed it discards the extra argument.
Comments
I thought commander spawned eggs?
A Hive spawns eggs, but the commander can spawn eggs from the Shift.
Here's what it looks like:
Printing out egg spawn times:
1 players: 1 eggs = 7.00 2 eggs = 31.31 3 eggs = 54.88 4 eggs = 60.00 5 eggs = 60.00 6 eggs = 60.00 7 eggs = 60.00 8 eggs = 60.00 9 eggs = 60.00
2 players: 1 eggs = 7.00 2 eggs = 19.16 3 eggs = 30.94 4 eggs = 42.00 5 eggs = 52.00 6 eggs = 60.00 7 eggs = 60.00 8 eggs = 60.00 9 eggs = 60.00
3 players: 1 eggs = 7.00 2 eggs = 15.10 3 eggs = 22.96 4 eggs = 30.33 5 eggs = 37.00 6 eggs = 42.75 7 eggs = 47.41 8 eggs = 50.85 9 eggs = 52.96
4 players: 1 eggs = 7.00 2 eggs = 13.08 3 eggs = 18.97 4 eggs = 24.50 5 eggs = 29.50 6 eggs = 33.81 7 eggs = 37.31 8 eggs = 39.89 9 eggs = 41.47
5 players: 1 eggs = 7.00 2 eggs = 11.86 3 eggs = 16.58 4 eggs = 21.00 5 eggs = 25.00 6 eggs = 28.45 7 eggs = 31.25 8 eggs = 33.31 9 eggs = 34.57
6 players: 1 eggs = 7.00 2 eggs = 11.05 3 eggs = 14.98 4 eggs = 18.67 5 eggs = 22.00 6 eggs = 24.87 7 eggs = 27.21 8 eggs = 28.93 9 eggs = 29.98
7 players: 1 eggs = 7.00 2 eggs = 10.47 3 eggs = 13.84 4 eggs = 17.00 5 eggs = 19.86 6 eggs = 22.32 7 eggs = 24.32 8 eggs = 25.79 9 eggs = 26.70
8 players: 1 eggs = 7.00 2 eggs = 10.04 3 eggs = 12.99 4 eggs = 15.75 5 eggs = 18.25 6 eggs = 20.41 7 eggs = 22.16 8 eggs = 23.44 9 eggs = 24.23
9 players: 1 eggs = 7.00 2 eggs = 9.70 3 eggs = 12.32 4 eggs = 14.78 5 eggs = 17.00 6 eggs = 18.92 7 eggs = 20.47 8 eggs = 21.62 9 eggs = 22.32
10 players: 1 eggs = 7.00 2 eggs = 9.43 3 eggs = 11.79 4 eggs = 14.00 5 eggs = 16.00 6 eggs = 17.72 7 eggs = 19.12 8 eggs = 20.16 9 eggs = 20.79
11 players: 1 eggs = 7.00 2 eggs = 9.21 3 eggs = 11.35 4 eggs = 13.36 5 eggs = 15.18 6 eggs = 16.75 7 eggs = 18.02 8 eggs = 18.96 9 eggs = 19.53
12 players: 1 eggs = 7.00 2 eggs = 9.03 3 eggs = 10.99 4 eggs = 12.83 5 eggs = 14.50 6 eggs = 15.94 7 eggs = 17.10 8 eggs = 17.96 9 eggs = 18.49
13 players: 1 eggs = 7.00 2 eggs = 8.87 3 eggs = 10.68 4 eggs = 12.38 5 eggs = 13.92 6 eggs = 15.25 7 eggs = 16.33 8 eggs = 17.12 9 eggs = 17.61
14 players: 1 eggs = 7.00 2 eggs = 8.74 3 eggs = 10.42 4 eggs = 12.00 5 eggs = 13.43 6 eggs = 14.66 7 eggs = 15.66 8 eggs = 16.40 9 eggs = 16.85
15 players: 1 eggs = 7.00 2 eggs = 8.62 3 eggs = 10.19 4 eggs = 11.67 5 eggs = 13.00 6 eggs = 14.15 7 eggs = 15.08 8 eggs = 15.77 9 eggs = 16.19
16 players: 1 eggs = 7.00 2 eggs = 8.52 3 eggs = 9.99 4 eggs = 11.38 5 eggs = 12.62 6 eggs = 13.70 7 eggs = 14.58 8 eggs = 15.22 9 eggs = 15.62
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local function GetEggSpawnTime(self)
if Shared.GetDevMode() then
return 3
end
local numPlayers = Clamp(self:GetTeam():GetNumPlayers(), 1, kMaxPlayers)
local numDeadPlayers = self:GetTeam():GetNumDeadPlayers()
local eggSpawnTime = CalcEggSpawnTime(numPlayers, GetNumEggs(self) + 1, numDeadPlayers)
return eggSpawnTime<!--c2--></div><!--ec2-->
This is found in the hive_server file.
Esspecially in the early game, due to one hive only.
<a href="http://gaming.stackexchange.com/questions/91702/what-determines-spawning-rates" target="_blank">Source: 27.11.2012</a>
"Each hive automatically creates one egg every 4 seconds, up to a maximum of 9 per hive.
Aliens spawn in waves, which occurs every 13 seconds.
All dead aliens (up to the number of active eggs) are randomly assigned an egg, which they spawn from 3 seconds later."
But I think it is not ALL dead aliens but only 3 per hive per wave.
edit: ^really great that you can copy code, but have no idea what it means.
What are we supposed to do with that information now?
Thankfully most marines dont know how fragile the alien spawn system is....otherwise we would see more base rushes early.
Yea not sure where those functions are located, all files are in your ns directory then ns2/lua/
open up the NS2 project in decode, you can search for them much easier using that :)
Ah good call
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function math.clamp(input, min_val, max_val)
if input < min_val then
input = min_val
elseif input > max_val then
input = max_val
end
return input
end<!--c2--></div><!--ec2-->
Source: i'm a programmer
edit:
I looked up the CalcEggSpawnTime() it was in NS2Utility.lua and it looks like this;
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function CalcEggSpawnTime(numPlayers, eggNumber)
local clampedEggNumber = Clamp(eggNumber, 1, kAlienEggsPerHive)
local clampedNumPlayers = Clamp(numPlayers, 1, kMaxPlayers/2)
local calcEggScalar = math.sin(((clampedEggNumber - 1)/kAlienEggsPerHive) * (math.pi / 2)) * kAlienEggSinScalar
local calcSpawnTime = kAlienEggMinSpawnTime + (calcEggScalar / clampedNumPlayers) * kAlienEggPlayerScalar
return Clamp(calcSpawnTime, kAlienEggMinSpawnTime, kAlienEggMaxSpawnTime)
end<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function math.clamp(input, min_val, max_val)
if input < min_val then
input = min_val
elseif input > max_val then
input = max_val
end
return input
end<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
All it does is set a min/max value for the first argument based off the other 2.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec--><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function CalcEggSpawnTime(numPlayers, eggNumber)
local clampedEggNumber = Clamp(eggNumber, 1, kAlienEggsPerHive)
local clampedNumPlayers = Clamp(numPlayers, 1, kMaxPlayers/2)
local calcEggScalar = math.sin(((clampedEggNumber - 1)/kAlienEggsPerHive) * (math.pi / 2)) * kAlienEggSinScalar
local calcSpawnTime = kAlienEggMinSpawnTime + (calcEggScalar / clampedNumPlayers) * kAlienEggPlayerScalar
return Clamp(calcSpawnTime, kAlienEggMinSpawnTime, kAlienEggMaxSpawnTime)
end<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
To go into detail about what everything does will be tricky so I'll use the important parts.
clampedEggNumber variable, ensures that eggNumber doesn't exceed max eggs per hive
clampedNumPlayers variable, used to make sure that the NumPlayers value doesn't go above half the server total population.
calcEggScalar variable, as soon as I see sin or cosin my eyes generally roll into my head but I believe since this mentions scalar it has something to do with vectors
calcSpawnTime variable, this holds the calculated spawn time I don't know what AlienEggPlayerScalar is so can't go into much detail other than that.
in the end it returns a value based on the calculated spawntime but also it is "clamped" between min/max egg spawn times which I also don't know.
Interestingly I see an extra argument in the call to CalcEggSpawnTime from the GetEggSpawnTime function, weird. I don't see how that can't be causing an error, but then again I'm not a Lua expert.
Edit: Someone pointed out to me that if an extra value is passed it discards the extra argument.