• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

I'm working on a new Animal Lore gump for KR

  • Thread starter imported_Sarphus
  • Start date
  • Watchers 0
I

imported_Sarphus

Guest
Please feel free to give me ideas of other features I could add. I don't expect to have this gump done anytime soon. I'd rather build a great gump than a quick gump


Objectives:
*Create a gump that gives the tamer easy access to data a tamer cares about most
*Display more than 4 digits of hitpoint data if possible
*Make it easy for players to get statistical data of new creatures with new expansions
*Minimize clicking required to get to data (to 2 clicks or less for ANY data)
*Hilight stats that are high for a specific creature type

The general layout will be a tabbed interface with 2 tabs.

Tab 1 will have
str,dex,int,hp,stam,mana
resistances
skill levels

Tab 2 will have the rest.


My gump design will be a tamer's gump! It will give tamers quick, easy access to data tamers are interested in frequently and will encapsulate data that is less frequently accessed in another window where tamers can quickly check it but don't have to look around it to see the data they want.

I plan to make a version of the gump that does data logging of all critters you lore (probably seperate file for each type of critter), so you can collect information pertaining to the stat and skill ranges. I hope to have that feature in by the ML release, so we can collect data efficiently with ML.

About the creature stat hilighting. I hope to have a built in system where you can set thresholds of how high you want stats to be. The gump will then mark all stats for that type of creature that meet or exceed your threshold. Since all the critical data for farming quality critters is on the first page, tamers will know at a glance whether to kill or tame a critter.

Please feel free to let me know if you come up with any other ideas of cool things I can add to the gump. I started the layout last night and will probably have the layout mostly working by the end of the weekend if I have enough time to work on it. I'm going to design the whole gump using placeholder data because I really don't know how to get the animal lore data yet and I think it will be easier to get data like that after the devs give us more documentation.

I'm kinda learning LUA as I go, so my design may get even cooler as I learn how to do cooler things (I only designed in stuff that I'm confident I can do)
 
I

imported_Sarphus

Guest
I don't think the max values are exposed in the animal lore data, but I don't know for sure because I don't know how to query that data


Functionality like you request could be done using hard-coded max values, but doing that kind of work for every creature in the game is definitely more work than I'm interested in (also storing all those stat values in memory is probably not a good idea)
 
I

imported_Sarphus

Guest
The layout is coming along nicely. The next step will take a lot of time for a little eye candy, but it will really dress up the gump nicely.



As you can see from the screenshot I can hilight fields, but the logic to hilight fields based on how high they are isn't in yet.

When it is, I will be able to specify stat ranges I'm looking for and the gump will hilight stats that exceed the thresholds I set. In other words, it will help me make kill/keep decisions when I'm farming a pet. I have most of the design in place to actually do that, but decided I'll do the layout of page 2 first. I also want to add the eye candy you can't actually see yet (the img fields are actually there, but empty)

This is an edit... I posted another pic, but then decided it would be easy to just finish the layout.
 
G

Guest

Guest
Very nice job so far Sarphus. It will be this type of addition to KR that will get me to use it.
 
I

imported_Leto

Guest
<blockquote><hr>

It will be this type of addition to KR that will get me to use it.

[/ QUOTE ]You said it! The ability to do things like these, and legally!, is actually getting me excited about KR.
 
J

JoyousGard

Guest
This sounds like a great idea. Please let me know how and when I can use it.

How the stats are organized might. I keep a log of pets I want to keep. A lot of times I skip stam to look at mana. If you had them listed with their associated stat it would be easier for me.
HP then STR
STA then DEX
MANA then INT

But I mean, getting all the importants on one page would be an amazing improvement. Please keep us informed!
 
I

imported_Sarphus

Guest
<blockquote><hr>

This sounds like a great idea. Please let me know how and when I can use it.

How the stats are organized might. I keep a log of pets I want to keep. A lot of times I skip stam to look at mana. If you had them listed with their associated stat it would be easier for me.
HP then STR
STA then DEX
MANA then INT

But I mean, getting all the importants on one page would be an amazing improvement. Please keep us informed!

[/ QUOTE ]

Oh yes... this gump will definitley help with that. You can basically just adjust your criteria for the type of critter you're taming. At first the gump will require you to manually switch the criteria in the LUA file, but eventually I want to have it auto-sense the type of critter you're taming and "pull the file" for that critter. My only concern so far is the memory footprint of what I'm trying to do. It's only a minor concern


As for keeping a log of pets... Logging could be built into the gump. I plan to keep a log of min/max of each dynamic stat for each type of critter you've lored. This will require the gump to write to your hard drive, which might slow it down a little... we'll see. My goal is to have that feature in the gump by the release of SA, because that will make gathering critter data for SA a LOT easier.

About ordering stats... I have the stats ordered the way I prefer to see them. I realize that not everyone will want their stats ordered that way and I took that into consideration when writing the code. Instead of looping through a datasource and drawing to the gump in one fel swoop, this gump will loop through a data source to plug values into internal variables. That way I can hard code all the display logic off those variables and the end user can easily move the stats around.

Each stat group is organized in a seperate code block. To move the stats as you have requested would literally involve copy/pasting the 6 code blocks for the stats you've mentioned into a text file (to have coordinates to look off of) and then going to the code page and adjusting what variables are displayed in each respective code block. It's going to be a while till it's done, but once you see it, I think you'll find that even a non programmer can modify where data shows up on the gump with a minimal learning curve.

The differences you'll find in this gump as opposed to the EA version are that this gump was designed by a tamer for tamers that use animal lore a lot and this gump was coded specifically to make it easy for non-programmers to modify. The EA gumps are coded to use minimal code (generally a good thing)

I think modifying this gump will actually be a good entry point for new modders that don't really know how to program. There are lots of places where you can edit a couple small things and immediately see the impact. Also, I compacted a lot of the tab-handling logic into one place because I only have 2 tabs. That makes it easier for people to understand how to build a tabbed interface. More on that later. I don't think I'm anywhere near being ready to release the gump. It doesn't even pull real game data yet lol
 
G

Guest

Guest
That's awesome

I'd like to see the loyalty when it's first opened.
 
I

imported_Sarphus

Guest
I'm having a little trouble getting this gump to recognize my script when it's called by using the animal lore skill. I think I'm either missing a callback (which I don't know how to do yet) or I'm having a script conflict with the existing AL gump. I can display the animal lore window just fine with window show commands, but if I let animal lore open it, the script doesn't load... just the xml


I might have to wait till a patch or 2 exposes more of the lua before my script can override the existing AL script. I'll try a few more things and research callbacks before I back burner the project, though.

If any of you guys have been able to get a gump to load it's script when it's replacing the animal lore gump, please let me know what you did
 
M

minificelle

Guest
Great job you do there.

I like KR a lot, only thing i dont like is the new lore gump.
Yours is exactly what tamers need, all important stats in the same screen.

Great.
 
I

imported_Sarphus

Guest
I made massive progress on the gump over the weekend. I figured out how to get the debug window to load in KR, which then told me what was blowing up. I tracked down the issue to being that every time you use the animal lore skill, it kicks off a new gump. The reason you don't see that happen on the existing gump is that it's killing the previous instance as soon as it loads (which mine does too... now
). The reason this was an issue was that some of my code was specifically referencing xml nodes by name, which only works on single instance windows.

I didn't know any of that was even possible... I actually figured it out by looking through the containers gump (of all places) and seeing code to handle multiple instances. I used similar code and voila my animal lore gump was displaying when I use my animal lore skill.

Now the only issue I have is figuring out how to get the creature data to display on the gump. I don't have any reference point to know how to request animal lore data because the lua source for the animal lore gump wasn't released in the last patch. It's kind of hard to ask for data when you don't know what the data is called. I've guessed about 8 different, logical names. So far I'm batting 0, but I only have to guess right once... It's also possible that I've guessed wrong as to how the C code sends the animal lore data to the lua script in which case I'm not even trying to do something that's possible.

I pm'd Jeremy to see if I can get the information I need to finish the gump. I'm amazed I got as far as I did last weekend, but doubtful that I can get any further without someone telling me where to request the lore data.
 
I

imported_Sarphus

Guest
We'll call this the v .7 alpha screenshot. I made a ton of progress today. I spent probably 3 hours trying everything I could think of to get lore data... then I wrote one line of code and data just came pouring out. It took me probably an hour to find animal lore data in the flood that my query produced, but I found it...

Then I had to process the data, which was pretty messy, but still easy. Then I wrote a quick routine to plug the data into my gump and here is the end result.



That's a live pic of my one bake. Everything that says "not in yet" is stuff I haven't figure out how to retrieve yet. I suspect healing isn't returned from the server unless the critter you lore is a cu. That really complicates things because of how the data is returned... The cu is a special case and his data returns differently, which breaks my gump


I just tested it... poisoning takes the place of healing, so actually my gump will be easy to fix... I'm kinda testing it as I write this.

It looks like adding pet loyalty, pack instincts and favorite foods is going to be a real pain. I think favorite foods is represented as a bitmask, which kinda sucks because I don't have the key. I guess I could trial and error map it out, but that will take a while.

I am going to hone the gump a little bit and then I'll probably be looking for testers. I assure you the gump is still a bit buggy being as I just got the first live data into it about 30 min ago.
 
I

imported_Leto

Guest
Thanks for reporting your progress. I'm very interested!
 
I

imported_Sarphus

Guest
Thinking about the layout, I think the final layout will more closely resemeble the layout without icons. I'm still planning to use graphics to hilight critters who's stats exceed thresholds, but I plan to do it via a background image that appears IN the table.

I'm going to condense the layout considerably. Poisoning and healing will share the same slot in the display because they share the same slot in the dtat that's passed down from the server.

I want to add a checkbox to disable threshold hueing, but I can't really do that well because I can't write server-side code to store the result. At the very least, I will add a flag to bypass hueing. If I can think of an elegant way toggle the hueing feature off from the UI, I'll do that. There are a few technical reasons this may be a difficult task.

I want to look into the possibility of a second lore gump that displays current/max for hp, stamina and mana. This gump will hover over the last critter you lored and display hp/mana/stamina bars for that critter with the last-lored data. This is just a clever idea of mine... it's very much a back burner mod for me.

I have a bunch of other ideas, but most of them are more techincal in nature. I'm not going to release the gump to others until I'm pretty sure there aren't serious problems with it.

I will probably wait till after the weekend to release any beta versions because I'll be out of town at the in-laws over the weekend, so I will not be getting on the internet to fix any problems that arise. We'll shoot for early next week and see what happens
 
G

Guest

Guest
This looks great and I commend you on your efforts.

When we're looking for the "perfect" critter is it possible to have your gump show the percentage of maximum for each stat, resist and skill? That would be more user friendly (imo) than showing the numbers that I rarely remember.

So instead of

str 801

you'd see

str 99%

Does that make sense?

Thanks again! I hope EA/Mythic throws out some ingame reward for useful UI add-ons. You'll get my vote.
 
I

imported_Sarphus

Guest
Yes. All it would mean is that the gump would have to maintain a table of max resists for each critter. I could then display that data in the same label that displays stats. So you could see something like 152 (95%) in a stat.

I'll take this into consideration as I tweak the gump. I have a feeling that the gump could keep me busy for a few weeks with all the potentially cool features that could be added.

Thanks for the idea.
 
I

imported_Sarphus

Guest
I redid the layout and how I do formatting. I also added a flag to disable hilighting. This is what the new build looks like. I like it. I'm probably going to disable the dragons on the title bar every now and then because they take up too much of the title bar's width.



I MUCH prefer the silver hilighting on resists. I'm having a problem where the text color changes to white sometimes for no apparent reason when it's hilighted. I'm really not sure why it does that because my gump is done processing and just sitting there stagnant when it happens. I suspect other gumps are somehow communicating with mine and screwing it up
 

Llewen

Grand Inquisitor
Stratics Veteran
Stratics Legend
Campaign Supporter
Looks terrific Sarphus. I can't wait to try it out, and as someone else said, it is this kind of thing that will get me to switch to KR.
 
I

imported_Sarphus

Guest
So far I've mostly done code organization stuff and implemented localization. Unfortunately, localization forces me to make things say what they do on the standard gump. In one situation I compared the localized string to the english string that comes back and changed the value to something else, which is a kludgey way to see what language the player is using and if it's English, make the label say what I want it to say.

The data I was missing on the gump came in with the localization stuff.



My gump is now beta version .9

It's not open beta yet. I still have a couple annoying bugs to squash first.
 
J

JoyousGard

Guest
Well keep plugging away. IT sounds like everyone is excited to see something by a tamer for tamers.
 
M

Mormgeil

Guest
Nice work.

Is it possible to remove the tabs and simply display all the fields at once?
 
I

imported_Sarphus

Guest
<blockquote><hr>

Nice work.

Is it possible to remove the tabs and simply display all the fields at once?

[/ QUOTE ]

Yes. It's much easier to not use tabs than to use tabs. I don't plan to support a feature like that because I don't like seeing all the animal lore data on the same page. The stuff on the front page is stuff I check regularly and want to see all at once. The rest is stuff I'd rather have out of the way.

On the other hand... Flutter was right... Loyalty really belongs on the front page, so I moved it there. You win Flutter





The only known bug left to squash after last night is a bug where if you go through a moongate (and presumably if you recall) with the gump open and then lore something before closing the gump, you will have an uncloseable animal lore gump.

I'm looking into it, but haven't actually tested to see if the existing one does the same thing. If the EA gump has the same problem, it could be a problem I can't fix. I think I could do a release this afternoon... just understand that you may still encounter issues. I haven't done rigorous testing of the gump yet.

PS
Where is a good (free) place I could upload the gump?
 
G

Guest

Guest
Someone posted a link in UHALL to a site for KR UI enhancements that they were working on a couple of weeks ago. I'll search (feel free to beat me to it).

Found it: UOSkins.com
 
I

imported_Sarphus

Guest
It should be UOMods.com

I don't even have a new enough version of photoshop to make skins...
 
I

imported_Sarphus

Guest
ok, I uploaded my gump to uoskins.com

I named the gump "Critter Glitter".

I haven't really tested the gump that much, so you're bound to find bugs... just pm them to me... if you lore something that blows up the gump, try to lore it with the default animal lore gump and write down the stats. I wrote a lot of the data processing stuff kinda fast, so it's entirely possible that I made mistakes.

The last data processing bug I found was caused by loring a rat and breaking the gump. You shouldn't encounter any real issues with the actual architecture of the gump, though.

To use it, just copy the xml and lua up to your "..\UserInterface\Mods\Source\Generic" folder and select the mod once you load up KR.

I won't have internet over the weekend, so I won't be able to field any questions, but I commented things pretty heavily.

UPDATE:
For some reason my single-gump version just stopped working. this happened shortly after I adjusted some of my client files. I think something is messed up in my client files and I have to redo all my macros. well anyway... I don't have time to look into it now and if the feature doesn't work in the current build of the gump then it won't get fixed till after the weekend at some point.

Right now I'm just trying to figure out what's going on.

EDIT:
I forgot to post this last time... this is my old gump killer code, which mostly works.

local strInstance = string.sub(windowName,string.find(windowName,"-")+1)
if strInstance ~= "1" then
local intLastWindowNum = tonumber(strInstance) - 1
local strDeleteThisWindow = "AnimalLore-"..intLastWindowNum
WindowSetShowing(strDeleteThisWindow, false )
end

If you want to just have 1 gump up at a time, you can replace the gump killer function call with that codeblock. That gump killer code fails if you step through a moongate and lore something, but you can always close the extra window.
 
J

JoyousGard

Guest
I DID IT!!! I am looking at your gump. It is awesome! I can't close it though!

EDIT--&gt; Deleted incorrect "How to"

It was trickier than I thought and I am not sure how I got it to work.

2nd EDIT --&gt; I can't close by left clicking "X" but rightclicking anywhere on the gump closes it.

How do I get the gump to open a little bit more to the left? It is opening half on screen, half off screen.
 
I

imported_Sarphus

Guest
sorry, the version I released was actually pretty buggy. The one I use now is much less buggy.

It's a bit of a pain for me to submit new versions of the code.

The version I run remembers where you last had it in between uses and has a ton of features that weren't in the version I originally released. The version I run also doesn't fight with some of the other gumps in the KR client.

I don't remember where you need to edit to make that released version work right, but the edits are pretty substantial. I'm not 100% positive that I've fixed all the memory leaks in the gump either.

So far I have only used the current version to farm bakes. I have a hard time playing in KR right now, so I have to stick with places that are pretty easy. I tried dragons a little bit, but their constantly flying animation was giving me problems when it cam to targeting them. This gump has saved me a LOT of clicking and time when farming bakes. Just this morning I went through at least a couple hundred bakes in the time it would have normally taken me to do about 100 and my hands didn't even hurt because I didn't have to click through the gump constantly. A success


I didn't get a single bake that fit my criteria, but I'm really picky. I'm looking for one heck of a bake.
 
J

JoyousGard

Guest
I think the one you put out there works OK... I just can't get the Main Window to open a little bit more to the left... It is opening up exactly where the default animal lore gump does, and that is making it a little too far to the right. I experimented with the xml but nothing seems to work.

I plugged into Threshold the criteria for my Unicorns and I can go through them a lot faster now too. So I think it is a success as well.
 
J

JoyousGard

Guest
I found a work around... using the default lore gump i moved that to where i wanted yours to open, and then when i switched to yours it opens there
 
I

imported_Sarphus

Guest
Now that's interesting lol

I didn't know that...

apparently I'm inheriting location properties from the existing al gump. I'm not sure the version I have now will do that. It might be doing that because of the bug where it fights with the character window
 
Top