UO:EC - A small mod to make scavenging for eggs easier.
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!
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
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.
How I wish I had known this 276 clicks ago!!
with
I wish there was a "Add by name" feature
(so it wouldn't matter what the hue is)
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!
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.
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.
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.
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.
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.
ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
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".
Up really late again, heading to bed before I wind up becoming nocturnal. <span></span>
Never be afraid to challenge the status quo