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

Courageous

Wanderer
*scribbles in his notes*

This means I'm going to have to review the map.CanSpawnMobile() method in the core in great detail.

In the base world, if you build near a spawner, do mobiles spawn in houses sometimes?

C//
 

stormwolff

Knight
Courageous said:
In the base world, if you build near a spawner, do mobiles spawn in houses sometimes?

C//

Ive never noticed anything like that or had any reports of that sort in the 2 years my shard has been using runuo, but I use xmlspawners and mega spawners for my world spawns.
 

Courageous

Wanderer
Looked at it extensively; I'll have to put some diagnostics in and do runs at this point. But I don't see how a path other than map.CanSpawnMobile() will execute. OTOH, as far as I can tell, in the base distribution the AllowSpawn() virtual of BaseRegion is never overriden. So I'm going to have to get into it to figure out what's happening.


C//
 

Courageous

Wanderer
Ravon. I don't seem to have those "Web" items. In the code, things are placed incrementally as individual entities, out of the pick. Here's what I used to see if things are working (and they are, in the below case):

Code:
        <Region type="Wilderness" name="Covetous Entrance">
            <Encounter p="1.0" distance="5">
                <!--<Item n="5" pick="SmallWebEast,SmallWebWest,SmallWebSouth,SmallWebNorth,SmallWebLeft,SmallWebRight,EggCaseWeb,Cocoon,SmallWebHole"/>-->
                <Item n="5" pick="WoodenTreasureChest,WoodenBox,GildedWoodenChest"/>
            </Encounter>
        </Region>
Since I don't know what your web things are, I can't really know what's not working.

EDIT: Looking at the code, I'm guessing that the Web entities are passable. CanSpawn allows items to be placed on top of eachother in that condition.

The spawn finder picks a random 16 point starting location on a circle for a spawn probe. It then cycles around the circle looking for more, either spiraling inwards, or outwards, depending on the option. I don't see why everything would "stack" using that approach, but I could imagine how it might sometimes happen that items would land on the same place in a situation like this if you were using the system in narrow corridors. One possible solution to this would be to make the spiral finder not start "over" for any given spawn set, but rather keep a "memory" of the last location probed, until the full spawn set was finished. The side effect of this would be pretty deterministic, however: instead of appearing randomly, things would be "sequential, first available space". I can't see how that would be better. I'll have to think about this.

Another technique I can think of would be to simply reject a spawn location if it contains an item of that type already...

C//
 

Attachments

  • screen1.jpg
    screen1.jpg
    21.8 KB · Views: 16

Courageous

Wanderer
Stormwolff:

Was this a PLAYER OWNED house that you saw mobiles spawn in? This should be entirely impossible. The core bounces any mobile that spawns inside a player house right out your front door. Ordinary structures don't block spawns at all. Player houses do.

C//
 

Greystar

Wanderer
Courageous said:
Stormwolff:

Was this a PLAYER OWNED house that you saw mobiles spawn in? This should be entirely impossible. The core bounces any mobile that spawns inside a player house right out your front door. Ordinary structures don't block spawns at all. Player houses do.

C//

In a default spawner I HAVE had spawns appear in house but only under ONE specific instance... The house was Public. I know for a fact there was a spawner sitting not more then 3 tiles from where the house was placed but they chose the location. That is the only cercumstance that I have seen that happen unless you are using the Custom Regions in a Box script where it was set to allow for spawning anywhere in the region including inside of houses.

Edit: Now keep in mind this didnt happen 100% of the time but it would happen. Was funny when a direwolf spawned inside their house and killed them while they where AFK macroing. Yes, yes I know I have a warped sense of humor. (It took me 3 days of watching to catch a single animal of anykind spawn in that house so i almost thought the player was lying when he originally reported it, and yes the DireWolf spawned inside, normally i've seen em spawn nearby and run inside if they didn't have doors on their house).
 

Courageous

Wanderer
Ahhhh. Yes. Doing a fix for this would be fairly straightforward. I can mod myself to not try to spawn in houses; however it appears that I can't allow the specialized housing spawns without a mod to HouseRegion. As I personally really dislike mods that require edits or force mods of apparently unrelated distribution code, I don't think I'll go with the House spawning capability. But I can always make certain that nothing ever spawns in player houses... easy schmeasy.

C//
 

RavonTUS

Sorceror
Greetings,

I played around with the stacking issues a little more last night and would agree, it is the size of the area.

I moved (moving a whole spawned area in one easy step - a very nice feature of your system BTW) that section of my script to a large dungeon area and it placed things better - not stacking them. The smaller the area the bigger chance of stacking.

I'll simply find a bigger area.

NOTE: The "webs" are custom scripted items, since I can't place static items for decorum.

-Ravon
 

ShadowCrow

Wanderer
This system is AWESOME !!!


You said it is for D&D shards, but I think you are wrong !!

This is a MUST HAVE for all the shards !!!

IT IS PRETTY COOL and gives more fun to the " Monster Killing "

Thank you very much and keep up the good work !!!!
 

stormwolff

Knight
Courageous said:
Stormwolff:

Was this a PLAYER OWNED house that you saw mobiles spawn in? This should be entirely impossible. The core bounces any mobile that spawns inside a player house right out your front door. Ordinary structures don't block spawns at all. Player houses do.

C//

Yup player owned custom house plot set to public.
 

Courageous

Wanderer
You said it is for D&D shards,...

No I didn't. :) I said it was a "D&D style random encounter system." I.e., I was inspired initially by the old "random encounter tables" in the original Dungeon Master's Guide. As to what it is for, I'm supposing that the various early adopter's are figuring that out as they go along.

My initial thoughts were just to spice things up a bit, create some uncertainty in the wilderness, and maybe decorate towns with cats dogs and birds without having to go to a lot of trouble. Others have figured out that they can design custom regions, and reference them in the description files, and do things like move the regions around; I.e., very easy to establish governance for entire spawning regions.

Anyway. I'm glad you like it. Have fun!

C//

p.s. a third party is exploring setting up a "base distro" to complement the system, so that someone can start with more than the test file that the system comes with.
 

Courageous

Wanderer
Yup player owned custom house plot set to public.

Yes. This will cause a problem in both the base UO with distribution spawners, as well as Random Encounters. There will be a fix in the next release. Tonite, I'll post a one-liner that will fix the problem in the interim for anyone running the system on an active shard.

C//
 

ShadowCrow

Wanderer
Courageous said:
You said it is for D&D shards,...

No I didn't. :) I said it was a "D&D style random encounter system." I.e., I was inspired initially by the old "random encounter tables" in the original Dungeon Master's Guide. As to what it is for, I'm supposing that the various early adopter's are figuring that out as they go along.

My initial thoughts were just to spice things up a bit, create some uncertainty in the wilderness, and maybe decorate towns with cats dogs and birds without having to go to a lot of trouble. Others have figured out that they can design custom regions, and reference them in the description files, and do things like move the regions around; I.e., very easy to establish governance for entire spawning regions.

Anyway. I'm glad you like it. Have fun!

C//

p.s. a third party is exploring setting up a "base distro" to complement the system, so that someone can start with more than the test file that the system comes with.

That is what I did.. and the players are loving it!!! they go around in the cities and found birds, parrots, dogs, cats. .....

I did something different....

I run a easy shard ( a shard where you get 0.1 of skill each time you use the skill)

so, everybody has all the skills in the maximum, the hard part is getting good itens...

but before the system everybody had all the pets possible... because of their skill in ANIMAL TAMING everybody had hiryus and all kind of STRONG animals.. I did´nt want that, so set all the animals : "TAMABLE: FALSE"

but with your system,

I made a copy of every strong animal, i left the untamable ones in the spawner and the tamable ones I set it up to appear randonly...

THE PLAYERS ARE LOVING IT ...

because you have to go the the right area, keep walking there and have lucky to find a animal like a hyriu...

Thank you very much for the script.,...
 

Courageous

Wanderer
For those of you needing to shut down spawing in Public houses (which is a problem with .95B as well as the runuo main distro), add these two lines just after line 125 in SpawnFinder.cs:

Code:
                Tile        landTile  = map.Tiles.GetLandTile( centerPoint.X, centerPoint.Y );

                Tile        spawnTile   = map.Tiles.GetLandTile( currentPoint.X, currentPoint.Y );

 :125         Tile[]      staticTiles = map.Tiles.GetStaticTiles( currentPoint.X, currentPoint.Y, true );[B]

[COLOR=Red]// new lines:[/COLOR]

               Region r = Region.Find( new Point3D( currentPoint.X, currentPoint.Y, landTile.Z ), map );

                if( r is HouseRegion ) continue;[/B]

If you're not in a hurry, this code will be in the next release.

C//
 

MoreBeer

Sorceror
Hey Courageous.. how goes things?? so far the players who show up on mi shard love this new spawning system.. and i do to.. now that i got it pretty much figured out.. but i do have a problem every once in a while.. im not sure what makes the problem.. its if maybe i leave the shard up with out a reboot or something every couple days.. anyways.. here is what im seein in the server side.. hell i dunno even if it is a problem.. but i thought i bring it up on the forums just in case..

System.DllNotFoundException: Unable to load DLL (zlib).
at Server.ZLibWin32.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.ZLib.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.Multis.DesignStateDetailed..ctor(Int32 serial, Int32 revision, Int32 xMin, Int32 yMin, Int32 xMax, Int32 yMax, MultiTil
eEntry[] tiles)
at Server.Multis.DesignStateDetailed.CompressionThread()


anyways.. if you can point me in the direction of what this is all about .. much appreciated.. thx.. MoreBeer
 

Courageous

Wanderer
I would suggest you try the Server support thread. In your stack trace, not one symbol mentioned belongs to, or is touched by, the RandomEncounter system. If there were some wierd memory problem, indirectly causing this to manifest, because of RE, I'd think that would need to be positively identified first. As is, it looks entirely unrelated.

C//
 

Jeff

Lord
MoreBeer said:
Hey Courageous.. how goes things?? so far the players who show up on mi shard love this new spawning system.. and i do to.. now that i got it pretty much figured out.. but i do have a problem every once in a while.. im not sure what makes the problem.. its if maybe i leave the shard up with out a reboot or something every couple days.. anyways.. here is what im seein in the server side.. hell i dunno even if it is a problem.. but i thought i bring it up on the forums just in case..

System.DllNotFoundException: Unable to load DLL (zlib).
at Server.ZLibWin32.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.ZLib.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.Multis.DesignStateDetailed..ctor(Int32 serial, Int32 revision, Int32 xMin, Int32 yMin, Int32 xMax, Int32 yMax, MultiTil
eEntry[] tiles)
at Server.Multis.DesignStateDetailed.CompressionThread()


anyways.. if you can point me in the direction of what this is all about .. much appreciated.. thx.. MoreBeer
thats from zlib.dll, search your scripts and find something of the sort
Code:
 [DLLImport="zlib.dll"]
thats not 100% what it would look like but close, its a c# compression library, no idea why its referenced in your scripts
 

arul

Sorceror
MoreBeer said:
Hey Courageous.. how goes things?? so far the players who show up on mi shard love this new spawning system.. and i do to.. now that i got it pretty much figured out.. but i do have a problem every once in a while.. im not sure what makes the problem.. its if maybe i leave the shard up with out a reboot or something every couple days.. anyways.. here is what im seein in the server side.. hell i dunno even if it is a problem.. but i thought i bring it up on the forums just in case..

System.DllNotFoundException: Unable to load DLL (zlib).
at Server.ZLibWin32.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.ZLib.compress2(Byte[] dest, Int32& destLength, Byte[] source, Int32 sourceLength, ZLibCompressionLevel level)
at Server.Multis.DesignStateDetailed..ctor(Int32 serial, Int32 revision, Int32 xMin, Int32 yMin, Int32 xMax, Int32 yMax, MultiTil
eEntry[] tiles)
at Server.Multis.DesignStateDetailed.CompressionThread()


anyways.. if you can point me in the direction of what this is all about .. much appreciated.. thx.. MoreBeer
Check your RunUO root directory for the "zlib.dll", if it's not there, get one here http://www.dll-files.com/dllindex/dll-files.shtml?zlib or http://www.winimage.com/zLibDll/

Sorius: It's written in C++, if it would be written in C# you wouldn't need to import the method through the [DllImport] attribute.

Hope that helps and sorry for the thread hijack, mods, please move it to the appropriate forum section, thanks ;)
 
Top