Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

[Feature Request] Visual Range diff set sphere.ini settings #1144

Closed canerksk closed 3 months ago

canerksk commented 1 year ago

m_iVisualRange = UO_MAP_VIEW_SIZE_DEFAULT;

The fixed setting may be different for each server or separate for authorized accounts, or it may be desired to increase it with an additional item. Here, instead of this being a constant, it can be added so that the maximum VisualRange value can be adjusted in Sphere.ini. Unless this setting is present, sphere will not allow this even if we enter the .visualrange 40 command.

eg; m_iVisualRange = g_Cfg.m_iVisualRange;

The codes here are purely examples. Although many have been tested, some may need to be rewritten.

cbnolok commented 1 year ago

That's just a default value, you can change it using VISUALRANGE via scripts. Is it worth it, in your opinion, to add a ini setting to change the default value? 16 or 18 is the maximum value supported by the official clients, do custom ones support higher visual range?

canerksk commented 1 year ago

With advanced clients (ClassicUO/ClassicUO Web & OrionUO & RazorUO etc.), the visual range limit of the client can be increased, but this is limited by the sphere side. Currently, it can be increased with the .visualrange command, but this can only be 28 at most, and it is prevented from going above it by sphere. Also, the only purpose here is not to see a wide area. Since some pathfinding packages also work with visualrange, we are stuck with this visualrange limit when we want to write an automatic pathfinding system. I think it should be adjustable as desired.