Improving Razor - Razor Development

Discussion in 'Renaissance Discussion' started by Quick, Apr 22, 2018.

  1. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Here's something interesting I just noticed in Razor, which I think is a bug that has existed for years. All the targeting hotkeys, when they try to find a random target or the closest, will execute a function that says "Give me all the mobiles within 12 tiles". In fact, it's hardcoded like this:

    Code:
    List<Mobile> mobiles = World.MobilesInRange(12);
    Here's the thing though, the code doesn't actually use that "12" number at all. It completely ignores it and uses the server's visible range (which is 18). So when you hit Target Closest Murder" it could potentially target one 18 tiles away.

    Since it's been this way for so long, I'm not just going to change it without some discussion. But clearly the devs who came before me intended those hotkeys to target mobiles within 12 tiles, but due to a bug in that specific code, it has always looked at the server visible range.

    If they wanted it to be the server visible range, the code would simply be:

    Code:
    List<Mobile> mobiles = World.MobilesInRange();
    I guess I could always make it a checkbox. "Range check Target Closest/Random: [ ] tiles" similar to the range check on last target. Or I just fix the bug, and those hotkeys look for mobiles within 12 tiles like it was intended.

    NOTE: This bug doesn't effect the range check on last target. That properly uses the number you have typed in.
  2. Baler

    Baler Well-Known Member

    Joined:
    Nov 15, 2015
    Messages:
    718
    Likes Received:
    564
    Leave it at 18 or people will riot.
    However maybe people want the option to search 1 tile or 18 tiles away. :) (yet another option request, lol)
    Quick and BabyGerald like this.
  3. dissident

    dissident Active Member
    UO:R Subscriber

    Joined:
    May 25, 2014
    Messages:
    479
    Likes Received:
    162
    I think checkbox similar to check LastTarget Range would be ideal.
  4. Labeler

    Labeler Well-Known Member
    UO:R Donor

    Joined:
    Jul 18, 2016
    Messages:
    3,075
    Likes Received:
    1,546
    why dont you put those commands in your razor macro itself?
    BabyGerald likes this.
  5. Labeler

    Labeler Well-Known Member
    UO:R Donor

    Joined:
    Jul 18, 2016
    Messages:
    3,075
    Likes Received:
    1,546
    @Quick i d love a uniform size that doesnt change depending on the tab you select. this said, your .14 version gave me errors on MAC.
    can we debug this asap?
    (just reporting so MAC users are aware).
  6. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Can you post some screenshots?

    I really need to find a used Mac.
  7. Labeler

    Labeler Well-Known Member
    UO:R Donor

    Joined:
    Jul 18, 2016
    Messages:
    3,075
    Likes Received:
    1,546
    1st :
    the razor intro (cutting edge UO assistance) keeps blinking (i cant screenshot cause it doesnt capture fast enough) this can be disabled if you uncheck the "show welcome screen"
    the 2 below issue are persistent.

    2nd:
    Screen Shot 2019-02-04 at 16.29.49.png
    i can mail you the error log. its a pdf

    3rd: upon opening it looks like this
    Screen Shot 2019-02-04 at 16.33.27.png

    once i change tab, the size goes back to "normal"
    Quick likes this.
  8. Erza Scarlet

    Erza Scarlet Well-Known Member
    UO:R Donor

    Joined:
    May 24, 2015
    Messages:
    1,896
    Likes Received:
    2,197
    Just made the upgrade from x.10 to x.14, good stuff man!
    Leopold and Quick like this.
  9. Leopold

    Leopold Well-Known Member
    UO:R Subscriber

    Joined:
    Jul 29, 2017
    Messages:
    675
    Likes Received:
    912
    3 features for your consideration, if feasible to code:

    1. Auto-open doors only opens, but never closes. This could be difficult since Razor may not be able to tell which state the door is in at the time. This would eliminate that irritating "slam the door in your own face" experience that happens all the time.

    2. Option for a restock agent to check the contents of a bag and actually remove surplus items. For example: I want a bag with only 50 of each reg, nothing more. the bag has 30 of some, and 55 of others, plus a few extra items. Restock agent reduces the 55 down to 50 and drops the extra 5 in my pack. When determining whether an item is "surplus" you could either have it check against the list (so items not on the list are left as-is) or, preferably remove all items in the hotbag that are not on the list or in quantities above what the list says and drop them into your main pack.

    3. Some way for organizer agent to move from one bad to another, totally outside of your pack. I believe right now if you want to organize lots of items from a container on the ground, you first have to restock, then use organizer agent into other containers on the ground.
  10. Erza Scarlet

    Erza Scarlet Well-Known Member
    UO:R Donor

    Joined:
    May 24, 2015
    Messages:
    1,896
    Likes Received:
    2,197
    I would love to have a feature that gives you the current last target as a quick overhead message when using "target next" in addition to the colour highlight.

    This would make targeting the right target in larger pvp battles a lot easier.
  11. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    1) As you mention, I can't really track door state. I could in theory have Razor "remember" a door for X period of time, and if that door is on the list, don't open it. You could also just make a macro that double-clicks on a door once, but of course that wouldn't be auto-open.

    2) You sort of can do this today, with a mix of organizer agents and restock. Would be interesting to have a specific agent that did this. Let me explore that a bit more.

    3) Hmm, I rarely use the organizer agent. Can you give me an example of the issue?
  12. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Do you mean the name of the person above your head when you acquire a new target?
    Erza Scarlet likes this.
  13. Leopold

    Leopold Well-Known Member
    UO:R Subscriber

    Joined:
    Jul 29, 2017
    Messages:
    675
    Likes Received:
    912
    For 3, if I am not mistaken, the organizer agent will ONLY organize items that are in your pack, into a bag that you set as the hotbag (which can either be in your pack or within reach). So as with item 2, it can be accomplished using both restock and organizer. One example of where it would be handy is when doing lots of treasure maps. You use restock to loot the chest, and once you have done a few and you are starting to get overweight, you quickly drop the hotbag on the ground, pick up another bag and keep going. After a session you have a bunch of bags full of stuff. You could use restock and then organizer to sort everything, but it would be handy to be able to organize everything outside of your main pack so you don't have to deal with weight limitations (you could fill locked down bags to 125 on the floor of your house). Another example would be when you use a pack horse to hold many items (maybe from a Christmas scroll) or something and you want to empty the contents into containers. You could again use restock and then organizer, but organizer directly from packhorse to containers would be nice. So this isn't really a must-have but a "would sort of be nice" type of thing.
  14. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Yep, you're right, the organizer agent only will work on your own bag. It's coded this way specifically, so there must have been some reason for it.

    My only concern here is that this would have some unforeseen consequences, and enable even more automation somehow.
  15. Erza Scarlet

    Erza Scarlet Well-Known Member
    UO:R Donor

    Joined:
    May 24, 2015
    Messages:
    1,896
    Likes Received:
    2,197
    yeah, exactly.

    Something like: [Target: XXX] overhead
  16. Southpaw

    Southpaw Active Member

    Joined:
    Oct 29, 2018
    Messages:
    198
    Likes Received:
    82
    What version of Razor should we be running?
  17. JohnM

    JohnM Well-Known Member
    UO:R Donor

    Joined:
    Mar 27, 2015
    Messages:
    2,245
    Likes Received:
    1,556
  18. Southpaw

    Southpaw Active Member

    Joined:
    Oct 29, 2018
    Messages:
    198
    Likes Received:
    82
  19. dissident

    dissident Active Member
    UO:R Subscriber

    Joined:
    May 25, 2014
    Messages:
    479
    Likes Received:
    162
    Feature modification:

    Can we have a single list of absolute targets, instead of separate ones for "TargetAbsolute" and "Doubleclick", and different buttons to add them as Target, as Doubleclick or Lift/Drop to the macro? this would save us having to add the same object to all the different lists, i.e. a mount can be used as absolute target to heal it or double click to mounts it, also runebooks, etc.

    Thanks!
  20. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Hey @Erza Scarlet this feature already exists. Go here to enable it:

    [​IMG]
    Erza Scarlet likes this.

Share This Page