ServUO Art API

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
PLEASE NOTE THAT THE URL TO THE API HAS CHANGED TO http://services.servuo.com/uoapi

Another great release from ServUO :)

Since marks art API went down a while back and didn't contain the latest graphics I recreated it for us here at ServUO

It is quite simple to use.

http://services.servuo.com/uoapi/item/{ItemID}/{HUE}
http://services.servuo.com/uoapi/gump/{GumpID}/
http://services.servuo.com/uoapi/multi/{MultiID}/
http://services.servuo.com/uoapi/land/{LandID}

The {HUE} param is optional.

For example:
http://services.servuo.com/uoapi/item/10/2
aservices_servuo_com_uoapi_item_10_1260_.png

I have also fixed the UO art bbcode.
Code:
[uogump=100][/uogump]
[uogump=100][/uogump]

Code:
[uoitem=100,4][/uoitem]
[uoitem=100,4][/uoitem]

Code:
[uomulti=10][/uomulti]
[uomulti=10][/uomulti]

Code:
[uoland=50][/uoland]
[uoland=50][/uoland]
 
Last edited:

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Basically, you can call any art asset (aside from animations at this time) in png format by following the URL structure above. These assets can be used in your own apps or on your website. One person is creating a vendor index for their website and using the art generated from the api to show the items on their website for instance.
 

Milva

Admin
Moderator
Mar 3, 2013
4,495
573
113
Donate
Donate money to this user
Agree I can see how this would be pretty great for any website! Just one question :)
Take for example this code https://www.servuo.com/uoapi/item/{ItemID}/{HUE}
while I don't see an actual item id number, how is this knowing the exact item your looking to add?
For those of us who have never really worked with api just wondering
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Agree I can see how this would be pretty great for any website! Just one question :)
Take for example this code https://www.servuo.com/uoapi/item/{ItemID}/{HUE}
while I don't see an actual item id number, how is this knowing the exact item your looking to add?
For those of us who have never really worked with api just wondering
You replace {ItemID} and {HUE} with the ItemID you want and the Hue you want.

For instance say you wanted to get a wooden wall with item ID ten and wanted to hue it bright orange with hue ID 1260 you would simply follow this url.

https://www.servuo.com/uoapi/item/10/1260/

This will generate an image with the required hue and item id and will look like this

 

tass23

Moderator
Aug 28, 2013
1,021
148
63
43
St. Petersburg, FL
www.uoexpanse.com
Shard Name
The Expanse
Donate
Donate money to this user
Okay, awesome, that makes MUCH more sense! (It's Revenge of the Fifth and it's messing with me :p )

This means we're one step closer to being able to link items in chat in-game, like WoW. Very awesome :)
 
  • Like
Reactions: dmurphy

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,327
253
83
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
Testing new BBCODE feature using New Graphic Releases in the latest UO Client:

[uoitem=39592]Blacksmith Machine[/uoitem]

Animated:
[uoitem=39561][/uoitem][uoitem=39562][/uoitem][uoitem=39563][/uoitem][uoitem=39564][/uoitem][uoitem=39565][/uoitem][uoitem=39566][/uoitem][uoitem=39567][/uoitem][uoitem=39568][/uoitem]

[uoitem=39579]Owl Town Crier[/uoitem]
 
  • Like
Reactions: dmurphy

Po0ka

Knight
Aug 19, 2014
733
93
28
Antarctica
[uogump=][/uogump]
Tried to find flaws, so far found nothing :p
Adding nothing after the = revert to 0/0/

Also, it seems the last / matters in the links xD
 
  • Like
Reactions: Milva

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
[uogump=][/uogump]
Tried to find flaws, so far found nothing :p
Adding nothing after the = revert to 0/0/

Also, it seems the last / matters in the links xD
I always wondered why that gump was upside down in the client :p

The the trailing slash is required. Just the way I have the rewrite rule set up.
 
  • Like
Reactions: Milva

Vorspire

Vita-Nex: Core
Admin
ServUO Developer
Jul 29, 2013
1,168
272
83
33
United Kingdom
core.vita-nex.com
Shard Name
Ultima Shards: Multiverse
Donate
Donate money to this user
They added all the expansion artwork upside-down like this, I have no idea why, but those are the images the client uses for the background at the login screen, except they obviously coded it to flip the images the right way up, lol.

Thought I'd throw this out there again since I converted it to use DMurphy's API: http://www.vita-nex.com/uodev/gumpdesigner

Take a look at the source code, the entire thing is written in HTML and JavaScript (jQuery) so if you save the page to your HDD, you can still run it in your browser (so long as it can access the internet to import jQuery and the API images). - No web server needed!
The bulk of the API images are used by CSS to apply them to elements.
This project is alpha, so it's not yet functional, but you can see the direction I want to take with it :)

There is no license or copyright on the source code, so have at it and learn something new today!
 
  • Like
Reactions: Greed

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
They added all the expansion artwork upside-down like this, I have no idea why, but those are the images the client uses for the background at the login screen, except they obviously coded it to flip the images the right way up, lol.

Thought I'd throw this out there again since I converted it to use DMurphy's API: http://www.vita-nex.com/uodev/gumpdesigner

Take a look at the source code, the entire thing is written in HTML and JavaScript (jQuery) so if you save the page to your HDD, you can still run it in your browser (so long as it can access the internet to import jQuery and the API images). - No web server needed!
The bulk of the API images are used by CSS to apply them to elements.
This project is alpha, so it's not yet functional, but you can see the direction I want to take with it :)

There is no license or copyright on the source code, so have at it and learn something new today!

This is an excellent example of what is possible by leveraging this API. Excellent work as usual Vorspire :)
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
This is great. Any chance of allowing max dims to be set when the image is generated?
I could do that, but I feel it would be better done on the client end. Are you making a web application that uses the api?
 

Jack

Squire
Sep 23, 2014
163
33
28
Auckland, New Zealand
Shard Name
Lost Lands
Specifically it would just be a PHP page reading itemids/hues from a database and placing them into a table on my shard website. This table includes all items in the world, itemids, amounts and all hues that exist for that item (well, the info/hues would be a sub-page).

I generated images of all itemids from the Ultima SDK so the max dimension X or Y can be is 40 and it's scaled from there, as these fit nicely into a table while remaining low in size, similar to how I have generated thumbnails for this page: http://uolostlands.com/bestiary/

The problem comes with hueing the items since they are just .png files, I cannot hue them on the fly, they must be generated from the SDK. Instead I will use your API to display these, resizing is just a minor inconvenience.
 

Milva

Admin
Moderator
Mar 3, 2013
4,495
573
113
Donate
Donate money to this user
Nice website :) so you were also able to get the bestiary script working