![]() |
|
|
|
#1
|
||||
|
Quote:
__________________
| |||
|
|
||||
|
#2
|
|||
|
Yay for simulated patch days!
| ||
|
|
|||
|
#3
|
||||
|
I am pretty sure when fay troll went out one of the guides told me that they knew when the mob would spawn.
The logical place to apply variance would be when the respawn is calculated (you can even apply extended variance then).
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| |||
|
|
||||
|
#4
|
|||
|
There are plenty of people reading this that know how it works, but I don't. I think the spawn is determined from the moment the mob dies with a /random generated number, and is therefore set. This number or time is then accessible by a GM with a command, like /spawntimer #. I'm also sure extended windows screws some of this up and it is re-randomed at the end of the window. But, like I said, I don't know... these are guesses. Jeremy, Loly, etc would know (or a P99 coder if they can share).
| ||
|
Last edited by Raavak; 12-23-2013 at 03:00 PM..
|
|
||
|
#5
|
|||||
|
Quote:
Code:
int respawn_ticks(base, variance)
{
int window = random(0, variance);
if(variance-window < ONE_DAY && random(0, 100) > 75)
return respawn_ticks(base+window, ONE_DAY);
else
return base+window;
}
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| ||||
|
|
|||||
|
#6
|
|||||
|
If you want I can get in IIRC and maybe help somewhat . . somehow
also: Quote:
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| ||||
|
Last edited by Splorf22; 12-23-2013 at 03:21 PM..
|
|
||||
|
#7
|
|||
|
the database will have the time the mob is supposed to spawn stored...the server doesnt perform checks every tick to see if spawns. Therefor all you need to do is create a command to update the database time of spawn. Which in this case appears to be easily done by calling SetTimer(newTime);
| ||
|
|
|||
|
#8
|
||||
|
Quote:
__________________
Doraf - 60 Cleric
| |||
|
|
||||
|
#9
|
|||||
|
Quote:
And SetTime sets the server time iirc which has no effect on spawntimes. Like, none of the times in game, server or spawn times are interconnected in the least. Oh and to answer an earlier question, spawn time info is not really viewable. And there isn't a GM command to see spawn times.
__________________
I have walked my way since the beginning of time. Sometimes I give, sometimes I take & it is mine to know which and when.
Quote:
| ||||
|
|
|||||
|
#10
|
||||
|
The way I read that function is that it is not so simple:
Each zone will have a timer for each mob (presumably a 4 byte integer that is checked every tick). Updating those timers is complicated by the fact that they may be in different processes running on different computers. Also, mobs that matter will be in the database so that their repop timers will persist through reboots and zone crashes and such. Fortunately, that code appears to do exactly what is necessary: first it updates the SQL database, then it modifies any local zone timers, and then it sends update messages over the network to tell the other zone servers to update the spawn timers if necessary. Granted, I could be wrong about all this - it's never easy to jump into a decently sized piece of code and figure out what's going on.
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| |||
|
|
||||
![]() |
|
|