Spawn Conditions

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Spawn Conditions

Post by Jabantiz » Sun Jun 24, 2018 5:41 pm

I added the ability to restrict when a spawn can actually spawn into the world. There is a `condition` field in the `spawn_location_entry` table now, it is a bit mask and if left as 0 it will always spawn like it does now. If it is set to anything it will be held to those restrictions. So far it can be limited by night and day and raining and not raining. Here are the values

Code: Select all

#define SPAWN_CONDITIONAL_NONE			0
#define SPAWN_CONDITIONAL_DAY			1
#define SPAWN_CONDITIONAL_NIGHT			2
#define SPAWN_CONDITIONAL_NOT_RAINING		4
#define SPAWN_CONDITIONAL_RAINING		8
Please note that all conditions need to be set, for example if you want a spawn to only show up at night no matter the weather then the value would be 14 (8 + 4 + 2)

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spawn Conditions

Post by John Adams » Sat Jul 07, 2018 10:37 am

Nice Jab.
There was also an "original concept" of this many, many years ago, similar to how EQEmu had their conditionals, where it could be either an in-game date/time, or a real world date/time, or a mixture of defined conditions as you have done above. There was to be a `spawn_conditions` table that held these configurations in a many-to-one relationship (which hadn't been designed yet) so a spawn could literally belong to multiple conditional groups.

For example, all the Holiday spawns would never show up until real-world calendar dates for Halloween or Christmas. But there may be some instances where you'd want certain holiday spawns to pop into the world outside that calendar restriction, so it would be given a second conditional criteria.

Check out how old this post is :) and thank you for implementing Spawn Conditions!
viewtopic.php?f=7&t=2316

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Spawn Conditions

Post by Ememjr » Sun Jul 08, 2018 6:36 am

if possible i would suggest that it would be if only one condition was met ie 'day' then it would take effect even without useing the raining, not raining

i could imagine have 100's of conditions and it would be hard to trouble shoot

so

at night should read only a 2 whether raining or not
while raining should be 8 whether day or night

but

if you want night and raining then 2 + 8

would that be possible ?

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Spawn Conditions

Post by alfa » Sat Jul 21, 2018 4:10 pm

Nice Jab, I remember some Gnoll change position when the night come :)
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests