RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Courageous' Random Encounter Engine

Jarrod

Sorceror
Has anyone had an issue with the spawns attacking each other?

I dont mean the spawns from 2 diverse players, I mean the mobs from a single spawn (orc lord, 3 orcs, 1 orc mage) all attacking each other.

I dont think it would be due to this script, but rather something in an AI. I just want to make sure that Im the only one experiencing this issue.
 

Courageous

Wanderer
Hmmm. It could be that there is some way to make AI team members "friends" of eachother. If there is, I haven't implemented it. I haven't seen the behavior you describe, but perhaps there is an additional required step here. There is a framework for it in random encounters, in the way that sub mobs are parented off a leader, and are all common to an encounter. I did the leader thing in part because I plan on touching the AI soon, to develop coordinated team behavior... nasty things where the leader tells his teammates to kill the mage first kind of stuff. :)

C//
 

Chinook

Wanderer
Just a note for your next update, could you include a check to make sure the mobile isn't spawned outside the region it's meant for.

Example, a player runs into a cave that has a different region then the area outside, but the mobiles will spawn at times outside the cave in the region they just came from and are still standing near, within the random distance set in the xml.

No biggy, just thought you'd like to know.
 

Courageous

Wanderer
I think what you mean is that you want me to make certain that the spawn finder--the algorithm that finds an admissable spawn point for any given mobile--excludes points from consideration that are not in the named region the spawn is for. Is this correct?

C//

p.s. sorry this next update hasn't snapped out. I'm swamped under the LOS code at the moment; it's been quite hard.
 

Chinook

Wanderer
Courageous said:
I think what you mean is that you want me to make certain that the spawn finder--the algorithm that finds an admissable spawn point for any given mobile--excludes points from consideration that are not in the named region the spawn is for. Is this correct?

Thats correct.

Courageous said:
C//

p.s. sorry this next update hasn't snapped out. I'm swamped under the LOS code at the moment; it's been quite hard.

No problem, just happy to have a system like this around.
 

Courageous

Wanderer
I'm about to begin work on a new release of this system. As always, I'm willing to take suggestions. As of right now, the work items are these:

1. Fix the cleaner so that it cleans properly after a shard crash. In order to achieve this, I'll be using XmlAttachments, to give items created by the system a unique timer tag. Later, when the shard is rebooted, items can be polled to see if they have this tag and then removed on schedule.

2. Investigate the spawn finder issue, seeing if it is possible to make it so that spawns always spawn within the spawn region for which they apply. Currently, spawns are targeted at players in named regions, but aren't set up to force the spawns to actually occur in those regions.

3. Allow authors to restrict spawns to day or night in the server.

C//
 

Greystar

Wanderer
Courageous said:
I'm about to begin work on a new release of this system. As always, I'm willing to take suggestions. As of right now, the work items are these:

1. Fix the cleaner so that it cleans properly after a shard crash. In order to achieve this, I'll be using XmlAttachments, to give items created by the system a unique timer tag. Later, when the shard is rebooted, items can be polled to see if they have this tag and then removed on schedule.

2. Investigate the spawn finder issue, seeing if it is possible to make it so that spawns always spawn within the spawn region for which they apply. Currently, spawns are targeted at players in named regions, but aren't set up to force the spawns to actually occur in those regions.

3. Allow authors to restrict spawns to day or night in the server.

C//


Since your adding potential timed triggers, how about adding a detect road TileID and so if people are on a road have it trigger a brigand ambush or an orc ambush well you get the picture... I hope. I think I remember you mentioning this able to detect water already, but maybe not but if it detects water adding detection for Road Tiles shouldn't be any more difficult. And too bad the sand tiles are the same for beaches as they are for deserts cause then you could have spawns based on tiles standing on... like I want sand votexs to spawn and attack players in deserts but not on beaches (dont think thats really possible but an Idea) or ice elementals spring up and ambush players in snow areas... once again tile based detection. (Then I could steal the tile ids (heh, oops did I type that))
 

Jarrod

Sorceror
i fixed my AI so the mobs arent attacking each other anymore, buuuuut I did find one possible "oops".

The spawns really shouldnt be attacking young players.

in RandomEncounters.cs around line 1235, change the code in this manner if you dont want young to be attacked.

Code:
                if ( state.Mobile is PlayerMobile )
                {
                    Mobile          mobile          = state.Mobile;
                    AccessLevel     accessLevel     = mobile.AccessLevel;
                    PlayerMobile asyoung = mobile as PlayerMobile;

                    if (accessLevel != AccessLevel.Player)                  continue; // staff doesn't qualify
                    if (asyoung.Young != false)                  			continue; // young dont qualify
                    if (!mobile.Alive)                                      continue; // no randoms for dead players
                    if (RandomEncounterEngine.SkipHidden && mobile.Hidden)  continue; // skip hidden players

                    mobiles.Add ( state.Mobile );
                }
 

Courageous

Wanderer
The spawns really shouldnt be attacking young players.

I'll do that, Jarrod. Thanks for the pointer.

(Then I could steal the tile ids (heh, oops did I type that))

Ha. I was going to ask you if you knew what all the road tiles were. :)

C//
 
actualy in the house building cs files - they have the road ones listed - because can not set houses on them

just helping you make a good system even better :D
 

RavonTUS

Sorceror
Greetings,

Road tiles?? Agh, you mean I didn't have to make a hundred little regions and name them all "road". :eek:

-Ravon
 

Greystar

Wanderer
Lord_Greywolf said:
actualy in the house building cs files - they have the road ones listed - because can not set houses on them

just helping you make a good system even better :D

Doh, I've been overlooking it all this time, even after all my changes to that silly file...
 

Courageous

Wanderer
Jarrod... I don't understand something. The code in question decides whether or not a (young) player has an encounter, but how could this decide whether or not the player is attacked? I'm asking, because someone using the system may very well want a young player to have encounters... for example with squirrels and deer, so that they can have opportunity hunts... but may want engagements to be voluntary. I don't understand how it is the random encounter system is making the engagements involuntary for young players. What am I missing?

C//
 

Jarrod

Sorceror
that wont keep them from being attacked by monsters. That would need to be changed in the baseAI's as well if you want them un-attackable by mobs in general.

I dont have those changes in, as for us "young" is the same as saying "the server wont ambush you while you are young, but if you decide to run through britain GY with your tailor, you are probably gonna get wasted"

:)
 

Jarrod

Sorceror
Courageous said:
Jarrod... I don't understand something. The code in question decides whether or not a (young) player has an encounter, but how could this decide whether or not the player is attacked? I'm asking, because someone using the system may very well want a young player to have encounters... for example with squirrels and deer, so that they can have opportunity hunts... but may want engagements to be voluntary. I don't understand how it is the random encounter system is making the engagements involuntary for young players. What am I missing?

C//


Also I was going to suggest another addition to the script.

for example, you have 2 players (and a shard with a 700 skillcap).
One has 240 total skill (obviously new or not capable of defending themselves properly.
The other has 650 skill (more advanced or near completed char)

A nice addition would be to handle the players "total skill level". I did this in a custom daily quest where the players would be offered contracts to kill certain monster types. newbies cant kill balrons...

I have 5 divisions of "newbie, moderate, advanced, expert, elite" and different monster groups set to those accordingly. This makes it possible to ensure that players are being sent random encounters that they at least have a chance to deal with.
 

Courageous

Wanderer
Good suggestion, Jarrod. I've been toying with the notion of an "equivalent" level system, where I break out various skills into categories, and then sum them up to create a "level," like maybe 1-10 or something. With that information, you could exclude certain players from some encounters; you could also use the level information to scale the encounter. So, for example, if the encounter was base level 3, players of level 1 and 2 simply wouldn't qualify. The encounter could be doubled for a player of level 6, though. Or something like that.

I still don't understand your young comments. I thought that a young player was never attacked by a monster until he initiated the attack.

C//

p.s. work is in progress; the cleaner for possible item pollution is done, properly restricting the spawn finder to the region spawns are designated for now works, and the xml allows one to say roads and time of day. I'm working on the spawn controls for roads and time of day right now. A new release this weekend perhaps.
 

Jarrod

Sorceror
Courageous said:
I thought that a young player was never attacked by a monster until he initiated the attack.

That is correct. However I have removed that check in the AI on our shard.
 

Courageous

Wanderer
Updated to 0.9.6B.

Includes fixes for cleanup, time controls for spawning, and the ability to pin-point water and road positioning.
 
Top