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 True Line of Sight

Cheetah2003

Wanderer
In your further addendum, Couragous, you describe what's happening on my server, but it doesnt matter if I lose line of sight or not, every step I take, the mob's name is shown AGAIN above it's head. I'll get you a screen shot in prolly an hour or two from this post. Have to go to work where my PC is.

I hope we can fix this, cuz this system ROXXORS!! :)
 

Courageous

Wanderer
If it were happening every step of the way, that would suggest that the remove/incoming packets were being sent over and over again. That would be very bad. I'll see if I can see what might cause this.

Addendum:

Just tried it. To me, it looks really as if you have to see then not see then see a mobile to get the effect Cheetah mentions. I wonder if I can log into Cheetah's server to see what's happening?

Further Addendum:

Although I'm puzzled by Cheetah's described phenomena, and I can't replicate it exactly, I have discovered how to cure the problem that I am seeing. This is a simple matter of sending the MobileUpdate instead of the MobileIncoming packet when the mobile has been recently seen. This will require a little book keeping, but I believe will be straightforward to implement. It should be in the next major release.

I've added some configuration options, and a command set. Items will also be LOSsable in the next release...

Everyone, keep testing and having fun. :)

C//
 

Cheetah2003

Wanderer
Definitely. Let me reapply the patch and put it up on my development server. IP: pkunk.homeip.net PORT: 2693.

Give me about an hour from this post to get it up and running with the mods.
 

Cheetah2003

Wanderer
Hmmmmmm.... well I have it all compiled and copied the last save from my main server, but when I started it up, I got this:
Code:
RunUO - [www.runuo.com] Version 2.0 [SVN 75], Build 2437.34841
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -service
Using: [CoreScripts] Version 1.2.934.34926
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (3816 items, 755 mobiles)
XMLServerOptions.cs -- Version 1.0
Loading configuration file Data/ServerConfig.xml...
Configuration loaded!
FSATS XML Configuration -- Version 1.0
Loading FSATS configuration from Data/FSATSConfig.xml...
FSATS configuration loaded.
ACC Registered: Server.ACC.CM.CentralMemory
ACC Registered: Server.ACC.PG.PGSystem
Regions: Loading...done
World: Loading...done (112399 items, 3810 mobiles) (8.83 seconds)

----------
Loading ACC...
 - Loading Central Memory   - Done.
 - Loading Public Gates   - Done.
Done in 0.1 seconds.
----------

Serverlist.cs: 2.1
Acquiring IP address from: http://ipid.shat.net/iponly/
Internet IP: 71.209.72.199 (http://ipid.shat.net/iponly/)
Account Purge v1.0 Initialized -- Next Purge time in: 08:30:04.7925000
Address: 127.0.0.1:2693
Address: 10.0.0.2:2693
### LOS System: Configuration system initializing
LOS: Loading tiles.
LOS: There appeared to be NO WHITELISTED TILES defined in the configuration file!
LOS: Loading tiles.
Error:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.PlayerMobile.CanSee(Mobile m) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 3133
   at Server.Mobile.AggressiveAction(Mobile aggressor, Boolean criminal) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 2366
   at Server.Mobile.DoHarmful(Mobile target, Boolean indirect) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 7001
   at Server.Mobiles.BaseCreature.DoHarmful(Mobile target, Boolean indirect) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Engines\AI\Creature\BaseCreature.cs:line 3721
   at Server.Mobile.DoHarmful(Mobile target) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6990
   at Server.Mobile.set_Combatant(Mobile value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 2226
   at Server.Engines.Quests.TheGraveDigger.Linda.InternalTimer.OnTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Grave Digging System\Quest\TheGraveDigger\Mobiles\Linda.cs:line 164
   at Server.Timer.Slice() in d:\source\c#\RunUO\RunUO\Timer.cs:line 499
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 501
Crash: Backing up...done
Crash: Generating report...done
I'll erase the save and just import some spawners. Go ahead and check it out, Courageous.
 

Cheetah2003

Wanderer
Ho ho ! I found it. It's RAZOR! I normally use Razor's option to show the names of incoming creatures/people. When I switch it off and use the internal UO client's version of this feature, the name spamming goes away!

Fascinating.
 

Cheetah2003

Wanderer
Sadly, another crash, just after discovering the Razor thing. What did I do? I have an object called a StaffOrb which toggles my AccessLevel between Owner and Player. I double clicked it and took 2 steps and....

Code:
RunUO - [www.runuo.com] Version 2.0 [SVN 75], Build 2437.34841
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -service
Using: [CoreScripts] Version 1.2.934.34926
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (3816 items, 755 mobiles)
XMLServerOptions.cs -- Version 1.0
Loading configuration file Data/ServerConfig.xml...
Configuration loaded!
FSATS XML Configuration -- Version 1.0
Loading FSATS configuration from Data/FSATSConfig.xml...
FSATS configuration loaded.
ACC Registered: Server.ACC.CM.CentralMemory
ACC Registered: Server.ACC.PG.PGSystem
Regions: Loading...done
World: Loading...done (237 items, 1 mobiles) (1.13 seconds)

----------
Loading ACC...
 - Loading Central Memory   - Done.
 - Loading Public Gates   - Done.
Done in 0.1 seconds.
----------

Serverlist.cs: 2.1
Acquiring IP address from: http://www.ipaddy.com/
Internet IP: 71.209.72.199 (http://www.ipaddy.com/)
Account Purge v1.0 Initialized -- Next Purge time in: 08:24:41.7456250
Address: 127.0.0.1:2693
Address: 10.0.0.2:2693
Client: 127.0.0.1: Connected. [1 Online]
Login: 127.0.0.1: Valid credentials for 'cheetah'
Client: 127.0.0.1: Connected. [2 Online]
Client: 127.0.0.1: Disconnected. [1 Online] [cheetah]
Login: 127.0.0.1: Account 'cheetah' at character list
### LOS System: Configuration system initializing
LOS: Loading tiles.
LOS: There appeared to be NO WHITELISTED TILES defined in the configuration file!
LOS: Loading tiles.
Error:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.PlayerMobile.CanSee(Mobile m) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 3133
   at Server.Mobile.SendEverything() in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6716
   at Server.Mobile.set_AccessLevel(AccessLevel value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6168
   at Server.Items.Staff.StaffOrb.SwitchAccessLevels(Mobile from) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Items\StaffOrb.cs:line 139
   at Server.Items.Staff.StaffOrb.OnDoubleClick(Mobile from) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Items\StaffOrb.cs:line 81
   at Server.Mobile.Use(Item item) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 4110
   at Server.Network.PacketHandlers.UseReq(NetState state, PacketReader pvSrc) in d:\source\c#\RunUO\RunUO\Network\PacketHandlers.cs:line 1310
   at Server.Network.MessagePump.HandleReceive(NetState ns) in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 238
   at Server.Network.MessagePump.Slice() in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 108
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 502
Crash: Backing up...done
Crash: Generating report...done
 

Courageous

Wanderer
I went line 3133 in PlayerMobile.cs from the 1.0B release. It appears that you have a different PlayerMobile.cs than I do. Please PM me yours, and I will diagnose. You'll be glad to know that in the next release, you won't be required to twiddle with your PlayerMobile at all. In talking this over in the chat channel, I realized that many people have modded PlayerMobiles, but most don't have a modded Mobile. So I found a way to do it all in Mobile, leaving PlayerMobile intact. In the next release you'll leave your PlayerMobile as-is.

Be that as it may, line 3133 doesn't look like a good line to me in my PlayerMobile (it's a line between functions). Please send me yours. I'll happily diagnose and repair this error if I can, up to and including running your Server and any source you care to have me run...

C//

p.s. I may fiddle around with Razor to see if how it goes there. I know that this is a commonly used add-on.

p.p.s. possibly if this is a world that already has a save state, there might be something I didn't do right, although I do replace the code in my own world quite frequently.
 

Cheetah2003

Wanderer
Courageous said:
p.s. I may fiddle around with Razor to see if how it goes there. I know that this is a commonly used add-on.
[/I]
I strongly recommend you try it with Razor to see what I was experiencing. Be sure to turn off the client's built in 'Show names of approaching creatures/people' and turn on the one in Razor instead.

It's pretty wild. :D

As far as my PlayerMobile.cs. Please don't hurt me, but I think that second time I put the patch in, I forgot to copy over MaybeInvalidateLos() from yours to mine. This time I triple checked all the PlayerMobile diffs and think I got it right, will letcha know after it compiles and I tinker with it.

Edit...
Yeah, that was it. Stupid me. It's working *GREAT* now. Thanks for all your support!!
 

Cheetah2003

Wanderer
New crash... :(

Code:
Error:
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Server.Mobiles.PlayerMobile.MaybeInvalidateLos() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 3156
   at Server.Mobile.SetLocation(Point3D newLocation, Boolean isTeleport) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 8903
   at Server.Mobiles.PlayerMobile.SetLocation(Point3D loc, Boolean isTeleport) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 1444
   at Server.Mobile.Move(Direction d) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 3170
   at Server.Mobiles.PlayerMobile.Move(Direction d) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 1339
   at Server.Network.PacketHandlers.MovementReq(NetState state, PacketReader pvSrc) in d:\source\c#\RunUO\RunUO\Network\PacketHandlers.cs:line 1395
   at Server.Network.MessagePump.HandleReceive(NetState ns) in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 238
   at Server.Network.MessagePump.Slice() in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 108
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 503
Crash: Backing up...done
Crash: Generating report...done

I tamed something and then added it to a BOD (making it disappear.) and it crashed. :( Attached my PlayerMobile.cs to this post.
 

Attachments

  • PlayerMobile.cs
    111 KB · Views: 56

Courageous

Wanderer
Yeah, that was it. Stupid me.

Nah. Not stupid. Stupid me for giving you PlayerMobile deltas. That's why you don't have to do that in the next release, this sort of stuff is bound to happen.

Anyway, the last crash you saw is my error. Your line :3156 should be removed entirely (just comment it out so that our line#'s will match if you have another error). I fixed this a bit back in my own version.

I've also figger'd out what's happening in your Razor. It's the very same thing that's happening in my client when I go around obstructions, it just manifests differently in Razor. It's a packet type problem. The mod I made to the core was modded in an area of code where mobs don't come in and out of existence inside the range perimeter. With them coming into view at a shorter range, a different type of packet must be sent: MobileUpdate.

C//

p.s., those conditional checks you're putting in match something similar I'm doing in the next release or two, FYI.
 

LordHogFred

Knight
Just realised a possible problem.
Some people are using the player statues script but with this the statues wouldn't show up behind walls despite the fact that they are supposed to be statues not mobiles.
Would it be possible to do a Whitelist for mobiles where any mobiles included in the list are uneffected by LOS, that way it would be possible to add things such as the statues or possibly even have a Whitelist property check so anyone with staff status can be seen by any char when visible.
Just a suggestion :).
 

Courageous

Wanderer

Q: Would it be possible to do a Whitelist for mobiles where any mobiles included in the list are uneffected by LOS?


A: If the mobile were of a particular class or otherwise discretely identifiable, it would be possible. Although I don't know why you want to go out of your way to see something that is out of sight. The next release will offer a config option to deny LOS to items...

Q: ...check so anyone with staff status can be seen by any char when visible...

A: Staff members are not LOS'd.
 

Courageous

Wanderer
The fix for the updating mobile title problem, which some users encounter using Razor, and in any case happens when mobs pop in and out of site, has turned out to be a tad trickier than I anticipated. An early easy fix only served to remove titles altogether, which I don't think would work in the long run. I'm having to create a new data structure to do the right thing, and will take until the weekend.

I think I commented on this already, but the next release will not require an (obnoxious) PlayerMobile mod. The mod is strictly in the core, which is less likely to conflict with things other shard owners have integrated. Users who have an unmodded RC1 core will be able to simply drop-in replace the core mod files and recompile. Voila.

The next release will be 1.1 beta. It has optional support for LOS for items as well as LOS for non-player mobs. These settings may impact performance, however, I'll leave the decision to the shard-owner.

There are also some additional commands included: a couple to turn the system on or off at run time, another to reset the cache and all of the arrays, reread the config file, and restart the system entirely.

The 1.1 alpha is probably more stable than the 1.0 beta. If your using the system and want support, feel free to come over to the chat channel.

Expect an update this weekend.

For those readers sending nice karma messages, thank you for all your supporting words.

C//
 

RavonTUS

Sorceror
Greetings,

I finally had a few moments to code this and I get a weird problem.

First, I am using RunUO v2 r83 (from the SVN). Thanks to your fine notes, it was easy to copy sections of code from LOS1.1a. I am also using just the client 5.0.4c (no Razor).

Here is the problem...The server starts normally and loads the world file just fine.

When I log into the world, I can see my NPC mobiles. If I walk away from them, so that they are no longer on the screen, and then return to where they were, they are gone. I can still hear the cows mooing, but don't see them. This seems to happen on every facet.

Any ideas?

-Ravon
 

Attachments

  • Map.cs
    47.8 KB · Views: 52
  • Mobile.cs
    335.5 KB · Views: 51

Courageous

Wanderer
I'll take a peak at what you have. Do you walk all the way away and then they don't come back, or you go around a corner, they go out of LOS, and don't come back?

*peeking: whoa, some areas are a lot different than mine, is this in SVN, or do you have a modded core yourself?*

*looking some more: on line 7920 you comment out the body of CanSee(object), but this isn't right. You need to leave CanSee(object) in, and apply the comments out and deltas to CanSee(Item) and CanSee(Mobile) independently*

*I will do an SVN checkout and check some other stuff for you, please wait*

I do happen to know that someone else fiddling around with SVN latest was having some troubles. I suppose that your way might be the right way: perhaps anyone likely to be willing to try a core mod is also likely to have SVN latest. That's not the way I went, though.

How many people here think it should be against latest instead of RC1?

C//
 

Erica

Knight
Courageous said:
I'll take a peak at what you have. Do you walk all the way away and then they don't come back, or you go around a corner, they go out of LOS, and don't come back?

I do happen to know that someone else fiddling around with SVN latest was having some troubles. I suppose that your way might be the right way: perhaps anyone likely to be willing to try a core mod is also likely to have SVN latest. That's not the way I went, though.

How many people here think it should be against latest instead of RC1?

C//
Should make both that way the ones that has latest svn can use it and for the ones useing the RC1 as well.:rolleyes:
 

RavonTUS

Sorceror
Greetings,

Ah, thank you I missed that. I will recompile and check it later tonight.

I enjoy bleeding edge RunUO SVN. After a long, but not too painful, conversion from v1 to v2, I decided to stay as current as possible.

As for core mods, I only have two - LOS 1.1a and Instance Corpses v1.0.0 written by arul. I have committed this week to adding both of them, as well as updating from SVN r72 to r83.

-Ravon
 

Courageous

Wanderer
Joeku: thank you for your kind words. I appreciate them.

Ravon: with the mentioned fix in place, I cannot replicate your error with svn.r83. I ran several screens north of a set of mobiles with LOS on as an ordinary player, returned and they were there.

Thank you for testing, and have fun. 1.1A appears stable so far, and is probably more stable than 1.0B. There will be a 1.1B this weekend that contains somed additional fixes and a few additional minor features.

For example, I'm including an option where you can only see thru a window if you are close to it. I'm thinking about a variety of interesting options like that. For example, shrubs block LOS at range > N, but not at range 1, and so forth. These will all be configurable, but should provide a nitfy little charge to PvP shards in particular.

[I'm contemplating looking at different ways to decide what you can see versus what you can shoot as well, but that will probably be a bit of work]


C//
 
Top