Random spawn point

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
RosT
Posts: 143
Joined: Fri Mar 14, 2008 3:46 pm
Location: Ukraine
Contact:

Random spawn point

Post by RosT »

RSP - Random spawn point.

As many probably know at official server Lineage2 used random spawn. But in l2jserver each monster has a "fixed" point of spawn. I don't know java programming language and I can't realize it, but I can suggest how this might work.

Create a special file format *. xml (similar to zone) which recorded the coordinates of the square, the circle(points of boundaries).
A further set of monsters that spawns ID in the area, their number and respawn time.


For example, take a zone Gorgon Flawer Garden (near Giran Castle), in:
Turak Bugbear - 15 mobs, it respawn lasted 20 seconds.
Turak Bugbear Warrior - 10 mobs, 30 seconds respawn time.
Harpy - 18 mobs, 15 sec respawn time.


it might look like this:

Code: Select all

zone name = "Gorgon Flawer Garden 1_1 (or 1_2, 1_3, etc ..., depending on the number of zones in which spawns various monsters) points: 104031, 140054, -3624; 103572, 138398, -3624;102855, 136861, -3616;104027, 135637, -3608;105309, 135943, -3528;106315, 138535, -3528; 20248;15;20; # Turak Bugbear 20249;10;30; # Turak Bugbear Warrior 20145;18;15; # Harpy 
As a result, we get something similar to the hexagon in which the random field spawns different mobs.

EDIT: Subject changed by Aikimaniac
User avatar
DrHouse
L2j Inner Circle
L2j Inner Circle
Posts: 912
Joined: Mon Jan 22, 2007 12:14 am
Location: Spain

Re: Random spawn point

Post by DrHouse »

If on retail respawns are not like a list on each zone, we could handle this server side creating zones on server startup so that each spawn is owned by a zone and on every time a mob is killed it can be spawned on any point of the zone (calculated randomly)

This is exactly the same as seting a min/max x,y,z for every spawn
Image

Leadership and management are not talk and talk, but talk and do

Proud of being a part of this project
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Random spawn point

Post by Aikimaniac »

retail works like there are "milions" of spawn zones and each zone has defined how many mobs with defined ID can be spawned in one moment... this way is also done the check when mob is too far from his zone (not spawnpoint) that he returns after some time of inactivity on the shortest path back...so he doesnt come back to his spawnpoint but to border of his zone (im talking about mobs and not RBs...) :)
Image
User avatar
Reimu
Posts: 40
Joined: Wed Apr 15, 2009 9:56 am
Location: Rus

Re: Random spawn point

Post by Reimu »

spawn zones
This is circles around some basic points or rectangles? Or may be abstract predefined areas? You have idea how they define zones?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Random spawn point

Post by MELERIX »

In retail mobs have static spawn, but random when they death in radius like 150~200 obviously checking geodata XD

is like this...

Code: Select all

# This will allow random re-spawning in towns if enabled based on a maximum random offset from the base re-spawn coordinates.# DEFAULT NEEDS TO BE VERIFIED, MUST BE CHANGED HERE AND IN CONFIG.JAVA IF NOT CORRECT# Default: True, 50RespawnRandomInTown = TrueRespawnRandomMaxOffset = 50
But for mobs :P
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Random spawn point

Post by Aikimaniac »

Reimu wrote:
spawn zones
This is circles around some basic points or rectangles? Or may be abstract predefined areas? You have idea how they define zones?
no....npoly...various shapes...
MELERIX wrote:In retail mobs have static spawn, but random when they death in radius like 150~200 obviously checking geodata XD

is like this...

Code: Select all

# This will allow random re-spawning in towns if enabled based on a maximum random offset from the base re-spawn coordinates.# DEFAULT NEEDS TO BE VERIFIED, MUST BE CHANGED HERE AND IN CONFIG.JAVA IF NOT CORRECT# Default: True, 50RespawnRandomInTown = TrueRespawnRandomMaxOffset = 50
But for mobs :P
Melerix..open your favorite files and check npcpos.txt and there are zones listed...there is no fix spawnpoint on retail..zone based system is more difficult and better but hard to code since we dont have all needed zones...
Image
toastgodsupreme
Posts: 750
Joined: Sun Dec 07, 2008 7:01 pm
Location: Poland

Re: Random spawn point

Post by toastgodsupreme »

Talk to Elektra. She's done quite a bit of research on this recently. And Aiki is sort of right, each mob has a number of designated spawns, then from each of those spawn points, it has a random x and random y generated off of that (this is based on her intentional observations on an area over a specific time period).

Either that or every mob has a stationary spawn and a massive random x and random y.

BUT... our biggest issues are:
1. Mobs, when randomized, need to have proper z coords, this is especially true in hilly areas and whatnot. How do we automate this? How does the server know not to spawn a mob in the ground or stuck halfway in a hillside or floating if the z axis changes for the ground level?

2. Mobs also need to check for walls and know where to spawn so as to avoid them.

Until these two problems are solved, we will need to either NOT implement randomx/randomy values, OR we need to do it ONLY for mobs in areas where those issues are not present (flat terrain with few or no walls).
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Random spawn point

Post by Aikimaniac »

in some special files is defined zone and for this zone are defined mobids,count of this mobs and respawn time..there is no spawnpoint at all...on retail are mobs spawns checked by geodata and cant be spawned in texture.. check some special files which ive mentioned and you will see...if you need example, we can talk on IRC in 12 hours or PM...
Image
toastgodsupreme
Posts: 750
Joined: Sun Dec 07, 2008 7:01 pm
Location: Poland

Re: Random spawn point

Post by toastgodsupreme »

Aikimaniac wrote:in some special files is defined zone and for this zone are defined mobids,count of this mobs and respawn time..there is no spawnpoint at all...on retail are mobs spawns checked by geodata and cant be spawned in texture.. check some special files which ive mentioned and you will see...if you need example, we can talk on IRC in 12 hours or PM...
Sadly it doesn't seem that there can be a solution then until we get 100% geodata. :(
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Random spawn point

Post by Aikimaniac »

toastgodsupreme wrote: Sadly it doesn't seem that there can be a solution then until we get 100% geodata. :(
lets say we have 100 percent geodata files (even if those are not 100 percent)...the geoengine we use compared to retail is kinda "lite" version with many bugs...to work on it needs alot experiences and since Sami is kinda KIA, we need to wait until some specialist appears (to be honest, there is no one experienced as Sami was even on forks) who has a bit experiences with "other platform" of freeservers and can help with doing it retail like or somebody else to do it from scratch after he has been on retail observing behaviour of spawnsystem there...
Image
User avatar
RosT
Posts: 143
Joined: Fri Mar 14, 2008 3:46 pm
Location: Ukraine
Contact:

Re: Random spawn point

Post by RosT »

If there is a problem geodata, then there can not use this system, and let there spawn mob from `spawnlist`. Until this problem is not corrected.
User avatar
Reimu
Posts: 40
Joined: Wed Apr 15, 2009 9:56 am
Location: Rus

Re: Random spawn point

Post by Reimu »

Dont forget about monsters witch "spawned in order" like: good monster (good drop\exp\...) + bad agro monsters always near them, so you newer can kill good monster without agros. How it possible if spawn points absolutely random in some zone? I think spawn behavior is more difficultly.
If there is a problem geodata, then there can not use this system, and let there spawn mob from `spawnlist`. Until this problem is not corrected.
No, we need new spawn behavior depend on enabled\disabled geodata :)
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Random spawn point

Post by _DS_ »

Still no volonteers to fix Z coords for spawns and move invalid spawns (in the walls and stones), that are you talking about ? :D
I remember only Droppo's fix for it.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
Aikimaniac
L2j Inner Circle
L2j Inner Circle
Posts: 3048
Joined: Sun Aug 07, 2005 11:42 pm
Location: Slovakia

Re: Random spawn point

Post by Aikimaniac »

_DS_ wrote:Still no volonteers to fix Z coords for spawns and move invalid spawns (in the walls and stones), that are you talking about ? :D
I remember only Droppo's fix for it.
no were talking about something totaly different :) read all posts :P
Image
Post Reply