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
    I'm going to look into why it behaves that way now that I can reproduce the issue and (hopefully) make it so the next person doesn't have to deal with it. Long term, I'd like to move Razor away from using %AppData%\Razor and the registry to a self contained "portable" application that can be ran from any location, all the macros and profiles would be in a subfolder of your Razor folder.
  2. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    I personally run version 1.0.14.9. Based on what I can see, Razor 1.0.13.13 was the last version to be release in that version number by the original developer. He released that version on Feb 24, 2014. Two month later, he released version 1.4.0.3 which is the last release by the original developer. This is the version I'm forked off of.

    The version you reference I believe is the same version line that you can find here -- https://www.uorazor.com. The source code for the 1.0.14.* line isn't available, the person on that site you referenced doesn't appear to have it open source. It's also still on the older .NET 2.0 Framework.

    What's weird is that the version 1.4 seems to have some of those changes in 1.0.14.* but not all of them.

    Adding more agents is on the main list of things to look at. I haven't yet but I want to look into why they have a hard coded number and if that number can be as many as you want.

    I like your idea for the Heal/Cure macro. I'll add it to the list. Right now it looks like it's hard coded as HP 30 less than your max will get you a greater heal, as long as you also have more than 12 mana else you're getting a mini-heal.

    Ah yeah, I always wanted a skill countdown timer. Added.
    Last edited: Apr 28, 2018
    JimmyTheHand likes this.
  3. JimmyTheHand

    JimmyTheHand Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 27, 2017
    Messages:
    513
    Likes Received:
    517
    This bums me out sometimes too, I wish I could heal to full hp sometimes but it only fires the miniheal. I understand this might fall under the pvp "skill" concept, but it'd be nice if the system was smarter.

    Timers could definitely be improved, I have a fairly sexy mouse that has macro functions as well as timed vibration responses which helps me with this, ie. I can hit skill X, and I get a vibration on my mouse when 10 second skill timer is up, so I know when I can use skill Y.
    Whilst handy for me, a simple implementation in razor for chosen skills would be awesome for everyone!
    BlackEye likes this.
  4. JimmyTheHand

    JimmyTheHand Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 27, 2017
    Messages:
    513
    Likes Received:
    517
    I wonder if this is that version I heard about that was from a new developer who took over, seems specifically closed source and potentially shifty. Not sure, it was only mentioned in passing but some folks thought was suspect!

    *shrug* I'll take an open source / public git version over anything from a new developer who keeps it closed any day! :)
    Last edited: Apr 28, 2018
    Quick likes this.
  5. JimmyTheHand

    JimmyTheHand Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 27, 2017
    Messages:
    513
    Likes Received:
    517
    @Quick Regarding @BlackEye suggestion for hp.
    A simple "greater heal" value that we can enter in seems best. Absolute and relative please!

    If hp < value
    Gheal

    Im not 100%, but this shouldnt fall in the disallowed category. No scripting or automation for advantage. Just a bit of control over an existing function.
    Quick likes this.
  6. Lightshade

    Lightshade Well-Known Member
    UO:R Subscriber

    Joined:
    Sep 12, 2013
    Messages:
    1,894
    Likes Received:
    2,448
    Its a Razor thing and not the server's fault from what I've seen. I de-sync'd on other servers in the past, also. Even non-RunUO based servers.

    Someone mentioned macros calling macros...this is already possible via razor.
    Quick and JimmyTheHand like this.
  7. Lightshade

    Lightshade Well-Known Member
    UO:R Subscriber

    Joined:
    Sep 12, 2013
    Messages:
    1,894
    Likes Received:
    2,448
    I would definitely love a way to store absolute targets, with its in-game name, and the ability to give it your own nickname. This would save incredible amounts of time combined with the copy/paste function.

    Also, more functionality to the title bar would be great. Adding in the ability to hue the graphics and to be able to differentiate between items by name would be worth entertaining, also. Something that can tell the difference between a "gold coin" named a platinum coin and a "gold coin" named a holiday coin, for example.
    Last edited: Apr 29, 2018
    Quick likes this.
  8. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    Yep, since Razor is analyzing every packet when it gets flooded with tons of packets (ie. in a scenario where you're frozen from casting but you keep trying to run) something happens.

    One thing I did change in most of the app was using List instead of ArrayList and Dictionary instead of Hashtable for storing a lot of different data, which should help in overall app performance. Dictionary and List's (when you specify a type) have better performance than a Hashtable or Arraylist for value types because the elements don't need to be boxed and unboxed since you already defined them. They were used all over.

    Looking at that is on my list of things to do. Anyway, I'm hoping a some folks here will be willing to do some beta testing for me when I get it out on GitHub.
    JimmyTheHand likes this.
  9. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    I'm still debating with myself the approach I want to take. Do I want you to be able to maintain a master list of AbsoluteTargets and when you build your macro, you reference one of the targets in the list or do I want it to work as it does today, when you set an AbsoluteTarget for macro, in the background, it will just store that per profile. So if you have a Recall macro, and set AbsoluteTarget on one character, and AbsoluteTarget on another using that same macro, it will know which one to use.

    The second one seems a bit more seamless with less overhead, but the first does give you a bit more control and flexibility.

    You can do this today in Razor. Create a custom counter and be sure the Color is set to the holiday coin (it should do that with Target). If you just {gold} which is built in, it will count them all together with no way to tell the difference.

    I did add {skill} to the titlebar, so if you use a skill via a hotkey in Razor it will count up to 10 for the skill timer.
    JimmyTheHand likes this.
  10. JimmyTheHand

    JimmyTheHand Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 27, 2017
    Messages:
    513
    Likes Received:
    517
    As quick said, you can do this. It requires using the customizing aspect of the counters. I have plat, hc and gold in my title bar. All are the colour they are in game, achieved by targetting that type of coin when creating the entry.
    I also separate sections on my title with "|" but you actually type whatever you want in there. You could type "Plat" next your custom entry.

    Eg. Plat {pl} | HC {hc} | Gold {gp}
    Or whatever :)

    If you meant actually selecting items by name via razor... not sure its easily doable, but even though for this it'd be innocent, introducing any targetting at all by name enters fishy territoy.

    Finally; if you meant being able to change the hue in the counter creation, from say -1 (all of that type)

    [​IMG]

    to something else... that'd be a cool feature, a "display" colour. But it'd have to be in addition to what is already in place, as items are identified by both type and hue. So it'd mess things up. You can do it currently, but its useless, as say, Sulfurous Ash tinted bright green isn't recognized as that reg anymore. The coins though, just target them specifically :)
    Last edited: Apr 29, 2018
  11. JimmyTheHand

    JimmyTheHand Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 27, 2017
    Messages:
    513
    Likes Received:
    517
    Suggestion:

    Not sure how many people would use this, but if it's easy and you're already tinkering with the counters aspect...

    We can already do the following in counters: ~#FFC300 GOLD~#~ That sytax tells it to render the enclosed text in HTML Hex colour values, which turns as out as below:

    [​IMG]

    Not sure if it'll be possible, but how about some formatting options :D Bold and italics specifically could be nice :)
    Likely some format akin to: ~BTextToBoldHere~B~

    *shrug* Not sure many would use it.... although... @Imbol :D
    Last edited: Apr 29, 2018
  12. snap dragon

    snap dragon Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,944
    Likes Received:
    3,218
    Razor had a nice balance of functionality. If you start letting people select an absolute target based on name, or pathfind, and things like that... well mine as well just allow EUO and Steam to be used at that point.
    JimmyTheHand likes this.
  13. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    I agree. It's a fine balance which is why I'm relying on UOR community feedback to keep that balance. If someone suggested what you used as an example, I would agree with you, that would cause the balance to be off.
  14. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    Uhh except those allowed scripting no? Apple and oranges.
  15. snap dragon

    snap dragon Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,944
    Likes Received:
    3,218
    And razor doesn't allow scripting how?
    RIN likes this.
  16. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    You are right that they are related remotely as they are both forms of code, right? But anyone who has dabbled in both can tell you that the macro language in razor is far inferior to scripting. Now I am not an expert in scripting in either EUO or UOS, but I know some other programs and can say it is truly apples and oranges between those.

    EDIT: Let me just add while I'm here :) But all I am asking for is some ease of interface with razor. Copy/pasting ease, Resizing the razor window, and a pause in place button for macros. The rest of these requests, I dunno. I'm not too interested. I sure hope they don;t ask for stuff that makes Chris not approve it. And as I said in one of my first comments here, make sure you run it past him @Quick before you release your beta copy on github.
  17. snap dragon

    snap dragon Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,944
    Likes Received:
    3,218
    You can create conditionals for detecting specific players with razor using target absolute, create loops with not only finite iterations but conditionals and break statements using items as counters, detect the distance of mobiles from your character using range check last target, act only on specific items based on their name by using item id skill and referencing the sysmessage, and the list goes on... There has basically been nothing that I haven't been able to script with razor, from script to auto sort magical items based on their item name, create an assembly line crafting items, and even down to a basic AI that can attack monsters, heal itself, and drop loot.


    The difference is razor keeps all the things most rule abiding players want easy to use, while putting things that we all pretty much agree shouldn't be macrod behind a very steep learning curve and also at the cost of efficiency because the work arounds for some of the conditionals are tied to skills or item use that have delays. This is great, because if you just REALLY need to figure out if a player is 5 tiles away for some macro to gain skill, you can do it. But if you want to do it to afk earn money 24/7 it's not quite efficient enough with the delays to make it worthwhile.
    JimmyTheHand likes this.
  18. Quick

    Quick Well-Known Member
    UO:R Donor

    Joined:
    Jan 6, 2018
    Messages:
    534
    Likes Received:
    1,136
    The source code has been online for years (4+ years), so nothing has prevented people from making their own versions of Razor to do things they exactly want, regardless if it's considered legal here or not. In fact, the 1.0.14.* version a lot of people used is closed source and not the version that comes with the UOR package. I don't believe the changes I've listed in the OP in any way change the balance of Razor. If I wanted to make a version of Razor that went against the rules here I wouldn't have started this thread in the first place.

    I've said it a few times but I'll say it again, I've been making what I believe are overall improvements that make using Razor a bit easier to use, not radically change the balance/spirit of the application. You guys can keep my check.

    @RIN -- Along with being open on this thread, I've sent him a few messages on IRC but haven't heard any response so we'll see. I would definitely love his feedback and support for this. If my changes are just too objectionable then it will still be on GitHub but this thread can be deleted and any references to UOR would be removed. This version isn't made to ONLY work here, anyone who uses Razor would be able to take advantage of the updates.
    RIN likes this.
  19. Lightshade

    Lightshade Well-Known Member
    UO:R Subscriber

    Joined:
    Sep 12, 2013
    Messages:
    1,894
    Likes Received:
    2,448
    I already have a list of absolute targets that I save in a .txt file of all things. It gets old re-targeting everything in a macro and its fun to have a hot key for certain people, too. :p

    I also have a "junk" razor macro that has them all listed out with comments to tell me what they are. Yes, you can do code comments in Razor. So yes, you can just save an absolute target in Razor already. Its just clunky to re-use it. Having a file in the Agents Tab to save them to so that you can copy/paste/insert from would make it less of a waste of everyone's time.

    You all have pretty unanimously agreed that having a way to view the Razor Code and copy/paste/insert is an agreeable thing. Adding a label to that code, though, above and beyond the Razor comments that are already a function of Razor is out of bounds? You have all essentially agreed to this by effective use of what you have proposed.

    The question is whether you want it to be a clean functionality or clunky and wasteful of people's time.

    Last edited: Apr 29, 2018
  20. RIN

    RIN Well-Known Member
    UO:R Donor

    Joined:
    Jan 4, 2017
    Messages:
    1,030
    Likes Received:
    1,003
    Well I can't wait to see a more polished razor. Gonna be great :D

Share This Page