About Razor's "Feature negotiation"-feature

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

About Razor's "Feature negotiation"-feature

Post by Xuri »

Recently Zippy added "feature negotiation" to Razor (UOAssist-type program), which allows servers to tell Razor what features to allow/disallow using on those servers. There's currently no way (i know of) to block people from using Razor on your shard, but with support for this it would be possible to limit what features of Razor they could use).

More detailed information about it, should anyone figure out they want to implement support for it:
Zippy wrote:[Flags]
public enum RazorFeatures : ulong
{
None = 0,
FilterWeather = 1 << 0, // Weather Filter
FilterLight = 1 << 1, // Light Filter
SmartTarget = 1 << 2, // Smart Last Target
RangedTarget = 1 << 3, // Range Check Last Target
AutoOpenDoors = 1 << 4, // Automatically Open Doors
DequipOnCast = 1 << 5, // Unequip Weapon on spell cast
AutoPotionEquip = 1 << 6, // Un/Re-equip weapon on potion use
PoisonedChecks = 1 << 7, // Block heal If poisoned/Macro IIf Poisoned condition/Heal or Cure self
LoopedMacros = 1 << 8, // Disallow Looping macros, For loops, and macros that call other macros
UseOnceAgent = 1 << 9, // The use once agent
RestockAgent = 1 << 10,// The restock agent
SellAgent = 1 << 11,// The sell agent
BuyAgent = 1 << 12,// The buy agent
PotionHotkeys = 1 << 13,// All potion hotkeys
RandomTargets = 1 << 14,// All random target hotkeys (Not target next, last target, target self)
ClosestTargets = 1 << 15,// All closest target hotkeys
OverheadHealth = 1 << 16,// Health and Mana/Stam messages shown over player's heads
All = 0xFFFFFFFFFFFFFFFF // Every feature possible
}

Razor listens for packet: 0xF0 [length 0x0008] 0xFE [8 bytes for razor feature bits from the enum]
when it gets this, if "negotiate" is checked, it responds with
0xF0 0x00 0x04 0xFF
thats all. pretty simple
The recommended RunUO approach is to disconnect all client who don't respond.
That would, of course, require that everyone connecting to the server is running Razor.
-= Ho Eyo He Hum =-
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

Short answer yes, long answer ... it depends.

I don't know Razor nor how it works. Does it listen on the same port? If it's just another packet, sending a packet is easy. Making it meaningful is another matter (as in, do you actually want to respect the settings in the enum?)
punt
VIP
Posts: 244
Joined: Wed Mar 24, 2004 7:46 pm
Has thanked: 0
Been thanked: 9 times

Post by punt »

yup, same socket. One could have a conf file, that says what razor settings to support , and then have it respond based on that.

I think that is what Xuri was driving at.

Just a packet, compare to what is set, and respond.

I guess one could go as far as if no response, and Razor is required (ugh), then disconnect.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

If it's really that simplistic, it's probably not too hard, really. I think going so far as to say "No razor no connect" is remarkably silly to my mind. Is this actually wanted? The packet support that is.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

As an optional thing (ini-setting?), it would be very nice, as it would give those who wanted it a form of control over which Razor-features they could allow on their shard and which they wouldn't - for instance to avoid a few players using Razor gaining a huge advantage over the rest of the playerbase.
-= Ho Eyo He Hum =-
Post Reply