PDA

View Full Version : Spawn variables


Bluddy
11-10-2011, 12:09 PM
Shadow, could you explain how spawning works? Especially (my guesses are in comments):

MonsterRespawnTime 500 // 8 minutes until a new monster spawns?
MonsterRespawnTimePlayerKilled 660 // if the player killed the mob, it'll take more time?
RespawnTimeChangePerKill 4 // To give the player a sense of accomplishment, the more he kills the longer it'll take to respawn?

SpawnSteps 2 // ?
SpawnStepDistance 200 // ?

Shadow
11-10-2011, 02:17 PM
MonsterRespawnTime - how long respawn takes if monster/npc kills it
MonsterRespawnTimePlayerKilled 660 - how long respawn takes if player kills it
RespawnTimeChangePerKill - each kill shorts respawn a little (assumes the player is looking for something)
SpawnSteps/SpawnStepDistance - how far around the player to spawn things

Bluddy
11-10-2011, 04:44 PM
1. A player kills one monster, and then proceeds to kill another 30. Will RespawnTimeChangePerKill apply to every single monster killed previously (so the first monster's respawn will be shortened by 4*29) or is a monster chosen at random to be shortened every time you kill?
2. I noticed that MonsterChancePerBlock was increased from 0.25 in DoP to 0.5 in DC. Was there a particular reason to increase the monster chance per block? 3. I'm not entirely sure how big blocks are, but I think they're about 1 small room...?

Shadow
11-10-2011, 06:28 PM
1) It will effect every previously killed but not spawned monster.
2) Off hand I'm guessing it probably had something to do with being in a dungeon rather than open land. You can't spawn as many monsters in open land without getting mobbed.
3) Blocks are about a small room. It's hard to tell sometimes but they are 8x8 tiles.

Bluddy
11-10-2011, 06:48 PM
Regarding point 2, I think some of the dungeons with huge open areas e.g. Forgotten Crypt are adversely affected by the spawn chance. 0.5 chance * 1/4 (for the 4 possibilities) * (2+3+4+5) = 1.75 mobs per average per block, vs. half of that (0.875) in DoP. The dungeons in DoP, in contrast, had 0.33 * 1/3 * (3+4+5) = just 1.32.

So I think I'm going to play around and try adjusting the MonsterChance and range per dungeon. The problem is I'm not sure which dungeons are wide open. The comments in world2.gdb don't mention that DungeonDW3 is open, but it really is quite open. And I'm doing a terrible job trying to read the level files. I understand that they're split up into block, exits (I think) and... hallways?

Shadow
11-16-2011, 09:58 AM
You can kind of tell which dungeons are open by looking at the level in the editor and seeing which blocks have a higher than normal change to be spawned. If the open blocks have a higher chance then they will be more open. If the hallways or closed rooms have a higher chance it won't be very open.

Bluddy
11-16-2011, 12:35 PM
Thanks. Um... how do you open a level in the editor again? I've never done it before.

Shadow
11-16-2011, 02:11 PM
In the console type in developer 1 and then there should be an editor button on the opening screen. Then you just have to use the menu to load one of the levels.

Bluddy
11-16-2011, 04:48 PM
In the console type in developer 1 and then there should be an editor button on the opening screen. Then you just have to use the menu to load one of the levels.

Great. Thanks. Really neat editor, and now that I've been able to match it to the data, the data's pretty easy to read.

desophos
02-08-2012, 06:35 AM
Sorry to revive an old thread, but I'd like a bit more explanation of how the spawn distance variables work. The names are a bit ambiguous.

Shadow
02-08-2012, 10:02 AM
Sorry to revive an old thread, but I'd like a bit more explanation of how the spawn distance variables work. The names are a bit ambiguous.

If you mean the SpawnSteps/SpawnStepDistance stuff basically multiply them together to get how far away the game spawns stuff around the player.

I really should have just exposed that final distance number because if you make each step too large you can actually skip spawning blocks. Basically it uses the steps/distance numbers to create a grid based on the player's position and spawns all blocks that those grid points land in.

Bluddy
02-08-2012, 11:02 AM
If you mean the SpawnSteps/SpawnStepDistance stuff basically multiply them together to get how far away the game spawns stuff around the player.

I really should have just exposed that final distance number because if you make each step too large you can actually skip spawning blocks. Basically it uses the steps/distance numbers to create a grid based on the player's position and spawns all blocks that those grid points land in.

So SpawnSteps 2, SpawnStepDistance 200 means that monsters spawn 200 and 400 game feet away from the player? That seems like an awfully small radius.

A block is 8x8 tiles, which is what -- 400x400 feet?

desophos
02-08-2012, 02:27 PM
So what is RespawnMinPlayerDistance?

Shadow
02-08-2012, 03:01 PM
So SpawnSteps 2, SpawnStepDistance 200 means that monsters spawn 200 and 400 game feet away from the player? That seems like an awfully small radius.

A block is 8x8 tiles, which is what -- 400x400 feet?

A block is 384x384 units (I wouldn't say feet).

So what is RespawnMinPlayerDistance?

That makes it so monsters don't respawn too close to the player.

desophos
02-08-2012, 03:37 PM
Do the SpawnSteps start at the RespawnMinPlayerDistance?

Shadow
02-08-2012, 07:31 PM
Do the SpawnSteps start at the RespawnMinPlayerDistance?

No they start at the player position. The SpawnSteps/SpawnStepDistance stuff are used for the original spawn. RespawnMinPlayerDistance is only used when they respawn. It works this way because the original spawn is based on where the player goes (except quest stuff), but the respawn happens whenever the timer is done.

desophos
02-08-2012, 08:01 PM
Ohhhhh... I see. Monsters can respawn anywhere when the player isn't on the floor though, right? And are SpawnStepDistance and RespawnMinPlayerDistance in the same units?

Shadow
02-09-2012, 10:15 AM
Ohhhhh... I see. Monsters can respawn anywhere when the player isn't on the floor though, right? And are SpawnStepDistance and RespawnMinPlayerDistance in the same units?

Yes, monsters can respawn even if the player isn't around.

Yes, both of those use the same units. I can't remember ever using any other kind of distance unit in the data.