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!

[RunUO 2.0 RC1] Courageous Random Encounter System

Kitchen_

Sorceror
Raymanred;762257 said:
It's not working... Again :(

Could you try with Winrar, Winace, or something different than a .zip?

It's definitely you and not the file itself. I went ahead and uploaded a repackage one in .rar format for you.
 

Attachments

  • RandomEncounters-1.3.rar
    67.8 KB · Views: 26

Courageous

Wanderer
1.3 has bits and pieces of Nerun's in it. It doesn't use a lot of the Random Encounters features, though. Random can do encounters if you're on the road, encounters that scale up to match your level, ... the Nerun's stuff doesn't do any of that. I simply wrote a parser to dumb-dump it into Random, so that you could have a starting point for spawning your world.

Joe.
 

datguy

Sorceror
I'm noticing it lagging me so I removed the folder, no lag, put folder back in & the lag returned. is it constantly checking stuff? I thought the timer put it basically in limbo till it fired. I Did use the RandomEncounters.xml Sample file.


Edit***
I think you can disregard, I restarted server and it appears to have healed itself.
 

Courageous

Wanderer
Random Encounters basically does nothing between encounter checks, except for a periodic check to see if you updated the encounters file itself. If you have updated it, the system uploads the new encounters file and re initializes, without requiring a server reboot.

C//
 

rexxz

Page
Oh my, this is a monumental script! There's a bit of a problem though;

In the server console I can see that the script is working and it's telling me that it's searching for region keys, generating encounter checks, picking encounters... But nothing ever spawns! I don't have any idea what's going on :(

Also, where do I go to turn off that information that is feeded to the server console? :D Thanks!
 

RavonTUS

Sorceror
rexxz;769916 said:
In the server console I can see that the script is working and it's telling me that it's searching for region keys, generating encounter checks, picking encounters... But nothing ever spawns! I don't have any idea what's going on.

Make sure your a player, not admin/staff.

-Ravon
 

rexxz

Page
Yeah I did that.

Actually there's a new development in the ordeal. I moved the player from Trammel to Felucca, and now all I get are spawns of sewer rats. I downloaded the latest version which is apparently supposed to have a full spawn distro with it..

Well anyway, in wilderness areas all I get are sewer rats, but in dungeons nothing spanws.

Oh! And after I kill a sewer rat, it immediately sets up another encounter! I think that's a bit much. I'm not opposed to working and editing things myself but I'm not sure that's supposed to happen even with the standard install of the encounter generator.
 

Courageous

Wanderer
You need to read the documentation about the timings of encounters and the like. The baseline test system was set up so that you see things very quickly. It was never meant to be a "stock" system. Nerun's was thrown in there on a lark.

C//
 

rexxz

Page
Oh I figured it was a working distro, my mistake. I was sort of thrown off from the wording in the original post. Still, why do I only see the sewer rats? There are two files named RandomEncounters.xml and I see that one of them is a ORIG file and the other is actually an XML document (and the XML document is the one that lists only the sewer rat, so I assume this has something to do with it). Can I take the data for all the other encounters from the ORIG file and put them in that, and maybe it will work (with some tweaking of course) ?
 

Courageous

Wanderer
You have to see which one is Nerun's and activate it. One is for an example, one is for Nerun's.

Random Encounters really isn't meant to be a "drop in distro". It's a tool for creating region based (instead of point-based) encounters on your shard, with all sorts of special rules to account for where the player is, his level, time of day, and so forth.

Nerun's was thrown in as a starter, but isn't even a particularly good example of what Random can do.

For example, Random can: see that the player is on-road, that it is twilight, pick a specific encounter for that player by shard or by region, and see that the player is too strong for mentioned encounter, and using that information, make that encounter tougher.

Another variation can see that a player is an animal trainer, and increase animal-type encounters specifically for that player.

That goes way beyond what's in the Nerun's example file.

C//
 

rexxz

Page
Ok, I noticed that and I changed it to the other. You're right it's not particularly what I'm looking for. Is there a way to have a range of times to choose between for the interval, rather than a static number?
 

Courageous

Wanderer
rexxz;770932 said:
Ok, I noticed that and I changed it to the other. You're right it's not particularly what I'm looking for. Is there a way to have a range of times to choose between for the interval, rather than a static number?

No, there isn't. It would be just a little tricky, because the timers themselves are pulled off in fixed intervals, I think. There is a way to only check a subset of the shard population for encounters to begin with. This was done for shards that might have lots of players: you don't want the encounter system to bog the shard. Of course most shards don't have that problem, so here's an alternative:

Set the frequency to be high. Set encounter probability to be very low. Your chances of an encounter might only work out to be once an hour, but it could be in any five seconds...

C//
 

WizardingOne

Sorceror
I just updated to RC2, and I am getting these errors:

+ Custom/RandomEncounters/EncounterEngine.cs:
CS0103: Line 560: The name 'Helpers' does not exist in the current context
CS0103: Line 616: The name 'Helpers' does not exist in the current context
CS0103: Line 617: The name 'Helpers' does not exist in the current context
CS0103: Line 702: The name 'Helpers' does not exist in the current context
CS0103: Line 720: The name 'Helpers' does not exist in the current context
CS0103: Line 938: The name 'Helpers' does not exist in the current context
CS0103: Line 940: The name 'Helpers' does not exist in the current context
+ Custom/RandomEncounters/Import.cs:
CS0103: Line 305: The name 'Helpers' does not exist in the current context
CS0103: Line 374: The name 'Helpers' does not exist in the current context

I would assume that something just got named something else. What should it be?

Thanks
 

Courageous

Wanderer
The class Helpers is in the file Helpers.cs. If you open it, you will find it is in the namespace Server.Misc. Perhaps RC2 tweaked with the namespaces? I am not currently maintaining an environment to check.

C//
 

WizardingOne

Sorceror
I got it, I had extracted the searches over the directory, thereby replacing two of the files. Simply renaming Commands.cs and Helpers.cs to Commands2.cs and Helpers2.cs (or a merge) will take care of any problems.

Thanks, I didn't realize the files were different in the archives.
 

hughesdylan

Sorceror
Couple of quick questions, though i know you are bogged down by them.

1. How many decimal places does the random chance of happining go out to? IE: can i use a 0.01% chance and still expect it to ever happen? how about .0001?

2. Is there a way to delay individual encounters? like XXX encounter only happens once every day at most?

3. Also, is there a way to group the encounter together? right now it spawns in a giant ring around the player. I would like a tight formation of enemies if possible (not litterally)

4. Is there a way to check if the player is in caves? do these count as dungeons? I would like to add random encounters to certain caves, and this would help greatly.

5. What happens to pets that get tamed? Do they despawn after the grace period? What about hireable mercenaries?
 

Courageous

Wanderer
hughesdylan;784777 said:
Couple of quick questions, though i know you are bogged down by them.

1. How many decimal places does the random chance of happining go out to? IE: can i use a 0.01% chance and still expect it to ever happen? how about .0001?

2. Is there a way to delay individual encounters? like XXX encounter only happens once every day at most?

3. Also, is there a way to group the encounter together? right now it spawns in a giant ring around the player. I would like a tight formation of enemies if possible (not litterally)

4. Is there a way to check if the player is in caves? do these count as dungeons? I would like to add random encounters to certain caves, and this would help greatly.

5. What happens to pets that get tamed? Do they despawn after the grace period? What about hireable mercenaries?

1. I believe the decimal places are limited only by the parser... which is to say not at all. BTW, I'm not sure why you would want chances so low: if you want to keep things rare, tie them to player "level".

2. There is no way to keep an encounter from occurring the way you say, although the modification would be pretty simple (there is an encounter record for every encounter type).

3. I believe that n something will spawn around the player, but if you give the n something a leader, then they will spawn around the leader and not the player. A "leader" does not have to be a more powerful spawn, it is just the top record, with child records.

4. Best way to do what you want is define wilderness regions for your caves, and use named regions. It would, however, be possible to have "cave" spawns just in the same way we have "road" spawns: I would have to have a list of all possible cave tiles, and use that as a detector.

5. Pets that are tamed should not despawn. This was requested and added a long time ago. I'm not sure about mercenaries, we never did anything special to address that, so they probably despawn... the fix would be to look at the way that we excluded tamed pets from despawning; there is probably a "hired" variable on the mercenary... if they are hired, you don't despawn them.

C//
 
Top