UO:EC - A small mod to make scavenging for eggs easier.

Arroth_ThaielArroth_Thaiel Posts: 1,030
edited March 2022 in General Discussions
By now most EC users probably know to go into the Actions>Other and drag Switch Object Handle to a hotbar, then left-click on Switch Object Handle to set a filter, such as "curious". Left click on Switch Object Handle again and select Item Only and only object handles with curious in the name will appear on screen.



In addition to the above, you can run a Scavenger Agent to pick up eggs whenever you are close enough (2 tiles I believe) and the eggs' Object Handle appears on screen.

Since there are 5 styles of egg, with 56 colors for each style (data from uo-cah.com), you normally would have to add all 280 egg variants into the Scavenger Agent for it to pick up all eggs. Many EC players are probably just adding egg variants as they come across them, and that's fine. However, there is a simple way to make your life a bit easier.

First write a scavenger that has all 5 egg icon types (the hues are irrelevant, since that is what we will mod). The agent should look something like this:


Next, open ObjectHandle.lua and find the line highlighted in the image below:


Remove "and itemL.hue == itemData.hueId" from the highlighted line, so that the line appears as in the image below.


Save the file. Make sure your modified ObjectHandle.lua is in your custom UI directory and remember to select your custom UI from the UO Login Screen.

If done correctly, your modified Scavenger Agent will now pick up any of the 5 icon types of eggs, in any color.

Remember to add "and itemL.hue == itemData.hueId" back into the specified line of code to return the Scavenger Agent to normal functionality when you're done collecting eggs.

-Good luck!
-Arroth

Comments

  • keven2002keven2002 Posts: 2,163
    Very cool. Makes me want to use EC just for this type of ability.
  • TimStTimSt Posts: 1,796
    Is that notepad++ or a different editor?
  • Arroth_ThaielArroth_Thaiel Posts: 1,030
    I'm using ZeroBrane .

    The .lua or .xml files can also be modified with just plain old Notepad for those who don't want to mess with additional software.
    -Arroth
  • ArchangelArchangel Posts: 460
    By now most EC users probably know to go into the Actions>Other and drag Switch Object Handle to a hotbar, then left-click on Switch Object Handle to set a filter, such as "curious". Left click on Switch Object Handle again and select Item Only and only object handles with curious in the name will appear on screen.



    In addition to the above, you can run a Scavenger Agent to pick up eggs whenever you are close enough (2 tiles I believe) and the eggs' Object Handle appears on screen.

    Since there are 5 styles of egg, with 56 colors for each style (data from uo-cah.com), you normally would have to add all 280 egg variants into the Scavenger Agent for it to pick up all eggs. Many EC players are probably just adding egg variants as they come across them, and that's fine. However, there is a simple way to make your life a bit easier.

    First write a scavenger that has all 5 egg icon types (the hues are irrelevant, since that is what we will mod). The agent should look something like this:


    Next, open ObjectHandle.lua and find the line highlighted in the image below:


    Remove "and itemL.hue == itemData.hueId" from the highlighted line, so that the line appears as in the image below.


    Save the file. Make sure your modified ObjectHandle.lua is in your custom UI directory and remember to select your custom UI from the UO Login Screen.

    If done correctly, your modified Scavenger Agent will now pick up any of the 5 icon types of eggs, in any color.

    Remember to add "and itemL.hue == itemData.hueId" back into the specified line of code to return the Scavenger Agent to normal functionality when you're done collecting eggs.

    -Good luck!

    How I wish I had known this 276 clicks ago!!  :D
  • LouveLouve Posts: 13
    Thank you for the tip! :)
  • TimStTimSt Posts: 1,796
    On a similar note to make it easier to find the color of the rabbits using the getHue action instead of having to use an interior decorating tool edit the Actions.lua file and replace the high lighted code:

    with


  • keven2002keven2002 Posts: 2,163
    Maybe a dumb question from a CC player... is that code you guys are showing (and making changes to) provided from EC? Is that like the equivalent of me taking the macro.2d file (from CC) and opening it and making a slight change to it?
  • ArchangelArchangel Posts: 460
    edited March 2022
    keven2002 said:
    Maybe a dumb question from a CC player... is that code you guys are showing (and making changes to) provided from EC? Is that like the equivalent of me taking the macro.2d file (from CC) and opening it and making a slight change to it?
    yes.. or rather more like similar, since on EC the goodies are spread among many files. That;s how you can create "Custom UI" shich is  seen as an option when one opens the EC software. You could also add notices for low health, for boss appearing etc.. (have read about  it but not so savy as to know exactly how.. I just rely on Pincos, and even that goes beyond my understanding)
  • MariahMariah Posts: 2,976Moderator
    The enhanced client permits user made custom UIs. Which is what Pinco's is. There is documentation telling how to do it included in the files - if you've the skill set to understand it. There were several custom UIs developed by players initially, but Pinco's became the most popular.
  • CinderellaCinderella Posts: 1,683
    edited March 2022
    you shouldn't have to go in and change the files.

    I wish there was a "Add by name" feature
    (so it wouldn't matter what the hue is)
  • Arroth_ThaielArroth_Thaiel Posts: 1,030
    edited March 2022
    @keven2002

    Yes, the files are provided with the EC for users to change as they see fit. In the install directory of the EC you will find the folder "UserInterface". In that folder is "Default.zip". If you unzip "Default.zip" you will find the basic, unmodified, versions of many of the files which control the EC.

    If you go back into your EC install directory, into the folder "UserInterface", and create a new subfolder, named something like "Keven's Custom Mod", that "mod" will now appear in the CustomUI list on the EC login screen, even though the "mod" would have nothing in it and therefore wouldn't change the behavior of the EC in any way.

    You can copy any of the files from Default.zip into "Keven's Custom Mod" and change those files in any way you'd like. Now the mod would change the way the EC behaves.



    Which leads to @Cinderella's point. If you want an "Add by Name" button in the Scavenger, you can go ahead and make one - or convince someone else to make one for you. The EC is not locked down - mostly. If you want to add/remove buttons and define what those buttons do, you can. However, it's not magic. It's a computer program. You have to tell the program explicitly (in code) what to do.

    However, what you can't do is expect the development team to anticipate every user's desires and program all of that into the EC. That would be an impossible task. That's why the EC is a foundation (base program) that anyone can build upon (mod). Could the EC be built so that it's easier to mod? Absolutely. When was the last time something in UO couldn't have been made more user friendly?

    Again, the EC, like the CC, is just computer code. How do you expect to change how the EC (computer code) behaves without "going in and changing the files"? You think Bleak has a magic harry potter wizarding wand? Wait... wait... nevermind. 

    Is moding the EC difficult to do? Not really, but it's not simple either. You do have to start learning how code works, specifically Lua and XML.

    More importantly, you have to start learning how UO works...*shudders*.


    Good luck!
    -Arroth
  • Lord_FrodoLord_Frodo Posts: 2,252
    edited March 2022
    Funny how it is legal  for EC users to make UOA on steroids' and all those other illegal programs but CC users can't.
  • keven2002keven2002 Posts: 2,163
    Thanks @Arroth_Thaiel that was a very good explanation!

    I don't want to turn this into a CC vs EC thing but that would certainly be a huge perk of using EC. I'm not even close to a coder but if there was some base stuff there and I just needed to swap a few things around that would be cool. I do wish this was possible in CC though because of personal preference. 
  • Arroth_ThaielArroth_Thaiel Posts: 1,030
    Funny how it is legal  for EC users to make UOA on steroids' and all those other illegal programs but CC users can't.
    It's the other way around. People modified (let's be honest here - cheated) the CC to the point where normal users, even with approved add-on's like UOA, couldn't possibly keep up the with people who were using the illegal programs. In addition to those massive advantages, those programs were intercepting the data stream between the sever and the CC, posing not just game balance problems, but actual security problems.

    The EC (first KR) were partially developed as a means to level the playing field. The EC (KR) was supposed to give legitimate players the ability to modify the client however they wanted, up to and in some cases surpassing the illegal programs, while at the same time maintaining the integrity of the data stream and the security between server and client (and paying customer). Remember, there is a legal component to this. EA doesn't want their service or customers compromised.

    Anyway, like most things UO, the initial idea was solid. The final product is underfunded, a bit wonky, more difficult to work with than hoped (UO - what do you expect), and because of those things, doesn't have nearly as many people moding as I'm sure the original developers thought they would attract.

    Even with those shortcomings, the focus on performance and the attitude of "here's a sandbox at base code level, build what you want" makes the EC faster and, in many cases, more capable than the CC, even when the CC is running illegal third party stuff. Plus, you get the benefit of staying within EA's product pipeline. 
    -Arroth
  • Arroth_ThaielArroth_Thaiel Posts: 1,030
    edited March 2022
    keven2002 said:
    Thanks @ Arroth_Thaiel that was a very good explanation!

    I don't want to turn this into a CC vs EC thing but that would certainly be a huge perk of using EC. I'm not even close to a coder but if there was some base stuff there and I just needed to swap a few things around that would be cool. I do wish this was possible in CC though because of personal preference. 
    I really wish I could say that moding the EC is as easy as swapping a few things around.

    In some cases, it is. Adding icons is pretty easy. What Foreverfun posted, what TimSt and I have posted here, some of the stuff Kyro has posted, those are simple edits. Pretty much anyone who could install the EC and load the game can make those type of changes.


    If you're starting to work on changes in functionality, like adding a button, things escalate quickly. Let's take Cinderella's button example from earlier in the thread. Just off the top of my head, adding that button would require:
    -The core functionality of what pushing the button actually did would need to be written as a function and added to, I'm going to say, Organizer.lua.
    -The size, font, color of the font, color of the button, position of the button in the window, etc., that would all have to be written and/or added to Organizer.xml.
    -You'd have to account for the new functionality of the button in OrganizerMain.lua as well I believe, although I don't remember off the top of my head.

    So, just one button is going to take modification of three files. (I think it's three, it might only be two- or it might be four or five if you have to also modify Interface.lua/xml) Now, if you have experience in XML, building that button is going to be a snap, couple of minutes. With experience in Lua, adding the functionality, again couple of minutes, and your button is done.

    However, if you aren't a pro, as I am not and I'm assuming - yes assuming - the rest of the playerbase is not, adding that button could take quite awhile. Explaining to other users how to add such a button is going to take even longer, and be a daunting task, since you'd be editing in three files, probably in multiple areas.



    And that is the core problem of moding in the EC. Hard, not so much, complicated, yes. Explaining that information to those who just want to play and not code........wowsers.


    Pinco said something once about Lua not having anything to do with the EC. He was exaggerating, but the theme is correct. It's not so much the Lua, or the XML, it's UO. It's the way UO is built. That's going to be the hurdle.
    -Arroth
  • Of_BeastsOf_Beasts Posts: 99
    I use EC for my crafting and house decorating.  But I cannot use it for adventuring as it just randomly crashes every once in awhile.
  • Lord_FrodoLord_Frodo Posts: 2,252
    edited March 2022
    Funny how it is legal  for EC users to make UOA on steroids' and all those other illegal programs but CC users can't.
    It's the other way around. People modified (let's be honest here - cheated) the CC to the point where normal users, even with approved add-on's like UOA, couldn't possibly keep up the with people who were using the illegal programs. In addition to those massive advantages, those programs were intercepting the data stream between the sever and the CC, posing not just game balance problems, but actual security problems.

    The EC (first KR) were partially developed as a means to level the playing field. The EC (KR) was supposed to give legitimate players the ability to modify the client however they wanted, up to and in some cases surpassing the illegal programs, while at the same time maintaining the integrity of the data stream and the security between server and client (and paying customer). Remember, there is a legal component to this. EA doesn't want their service or customers compromised.

    Anyway, like most things UO, the initial idea was solid. The final product is underfunded, a bit wonky, more difficult to work with than hoped (UO - what do you expect), and because of those things, doesn't have nearly as many people moding as I'm sure the original developers thought they would attract.

    Even with those shortcomings, the focus on performance and the attitude of "here's a sandbox at base code level, build what you want" makes the EC faster and, in many cases, more capable than the CC, even when the CC is running illegal third party stuff. Plus, you get the benefit of staying within EA's product pipeline. 
    They didn't mod the CC they made programs to work around the CC.  The EC far exceeds UOA and most if not all of the illegal programs.  So why did UO make it legal to MOD the EC but will not allow us to MOD/Use other programs with the CC and like other I use the EC for house stuff esp sorting crates but I can not use it in normal game play.  If the DEVs really wanted to go to one client then they would allow us to MOD the art files so we can pick which MOB we want to display.  Yes the ECs UI is far superior to the CC but the art leaves a lot to be desired and yes I know art is a matter of taste and I prefer the old CC art over the EC art.
  • PlayerSkillFTWPlayerSkillFTW Posts: 526
    edited May 2022
    So, those of you more experienced with the EC (i mostly play CC, but do run EC with Pinco's UI sometimes), is there an easy way to set up a macro for quest toggling 10 Eggs for the turn in quest? Tired of having to manually click them all.

    Edit: Just asked Pinco about this, and he says there isn't due to how many types/hues there are. It would require a whole new name search function to be implemented before that would work.
  • Arnold7Arnold7 Posts: 1,303
    If you use the enhanced client and you are not too discriminating just follow the instructions in the first paragraph of the initial post and when you click-on set filter type in egg.  I put the icon in a hot bar.  When I log on I just click-on the icon, set the filter to egg and press control shift to use it.  You have to press control shift a lot, and you have to set the filter every time you log on.  It works great.
  • poppspopps Posts: 3,945
    @Arroth_Thaiel ;

    Just a question....

    The MOD that you suggest with the OP, is it for the "non-Pinco" EC or is it also valid for the Pinco UI EC ?

    Or, does Pinco UI EC client already has a Scavenger that pick up eggs on its own, without it being as necessary to modify the ObjectHandle.lua file as you suggest ?

    Thanks.
  • SethSeth Posts: 2,904
    edited May 2022
    EC original scavenger picks up by type and hue.

    This mod only picks up by type regardless of hue. Easy mod and works perfectly. 

    Normally I copy the code and modify, and comment the original line so its easier to revert. 

    I am also going to pick up eggs. 
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • SethSeth Posts: 2,904
    edited May 2022
    How to use Organise in EC to transfer items between containers by TYPE only.

    File: ContainerWindow.lua

    Find this function:
    function ContainerWindow.UpdatePickupTimer(timePassed)
    And delete the hue.
    if (itemL.type > 0 and itemL.type == itemData.objectType and itemL.hue == itemData.hueId) then





    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  •  I've found a whopping two eggs by chance since I learned this was a thing, so I'm tempted to try this..... I am curious though, does this kind of modification violate the EULA or anything? I am guessing not since this is in the official forum.... but I don't want to get in trouble after having just started. 

     The only MMO I know of that actually gives permission to use mods is Elder Scrolls Online (they designed their game for it). I'm also wary because when I played this back in the 1990s I know there was a lot of controversy over something called "UOassist". 
  • MariahMariah Posts: 2,976Moderator
    EC was designed with the intention of allowing user created UI. There is documentation on how to do that, you will find a zip folder "C:\Program Files (x86)\Electronic Arts\Ultima Online Enhanced\UserInterface\Custom_UI_Documentation.zip"  but you do need some understanding of the basics to do any serious modifications. There are limits on what is possible, as you will gather from reading some of these threads.
    You can also make macros using the 'command' function, some examples of which can be seen here: https://uo.com/wiki/ultima-online-wiki/technical/creating-macros/example-macros/


  • Mariah said:
    EC was designed with the intention of allowing user created UI. There is documentation on how to do that, you will find a zip folder "C:\Program Files (x86)\Electronic Arts\Ultima Online Enhanced\UserInterface\Custom_UI_Documentation.zip"  but you do need some understanding of the basics to do any serious modifications. There are limits on what is possible, as you will gather from reading some of these threads.
    You can also make macros using the 'command' function, some examples of which can be seen here: https://uo.com/wiki/ultima-online-wiki/technical/creating-macros/example-macros/


     Thank you for the clarification, and apologies for my ignorance. I was unware of the zip file, and the overall situation, as well as things being a lot more macro friendly now. I remember the UO Assist thing, and also there was some controversy over people AFK training by hitting dummies and the like. 

      Up really late again, heading to bed before I wind up becoming nocturnal. <span>:smile:</span>

  • MariahMariah Posts: 2,976Moderator
    AFK is still against the rules. It's supposed to be YOU playing the game, not your unattended computer.
  • Victim_Of_SiegeVictim_Of_Siege Posts: 1,837
    Mariah said:
    AFK is still against the rules. It's supposed to be YOU playing the game, not your unattended computer.
    But, but, my computer likes it more than I do.
    A Goblin, a Gargoyle, and a Drow walk into a bar . . .

    Never be afraid to challenge the status quo

Sign In or Register to comment.