1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ServUO Art API

Discussion in 'Announcements' started by dmurphy, May 5, 2015.

  1. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    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 (C#):
    1. [uogump=100][/uogump]


    Code (C#):
    1. [uoitem=100,4][/uoitem]


    Code (C#):
    1. [uomulti=10][/uomulti]


    Code (C#):
    1. [uoland=50][/uoland]
     
    #1 dmurphy, May 5, 2015
    Last edited: May 19, 2015
    • Like Like x 4
    • Two Thumbs Up Two Thumbs Up x 3
    • Winner Winner x 2
  2. tass23
    Offline

    Moderator

    Joined:
    Aug 28, 2013
    Messages:
    1,018
    Likes Received:
    135
    @dmurphy It may be late in the morning, but I'm not awake yet, so forgive me if this just went completely over my head lol
    Murph, could you explain please, for those of us lacking morning coffee?
     
    • Agree Agree x 1
  3. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    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.
     
    • Two Thumbs Up Two Thumbs Up x 3
  4. Lokai
    Offline

    Moderator ServUO Developer

    Joined:
    Dec 4, 2014
    Messages:
    1,080
    Likes Received:
    157
    If I had three thumbs, they would all be up. (Why does that sound naughty?)
     
    • Funny Funny x 4
  5. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,978
    Likes Received:
    445
    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
     
  6. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    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

    [​IMG]
     
  7. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,978
    Likes Received:
    445
    Oh! this shows me exactly how to do this, thanks! :)
     
    • Like Like x 1
  8. tass23
    Offline

    Moderator

    Joined:
    Aug 28, 2013
    Messages:
    1,018
    Likes Received:
    135
    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 Like x 1
  9. Lokai
    Offline

    Moderator ServUO Developer

    Joined:
    Dec 4, 2014
    Messages:
    1,080
    Likes Received:
    157
    Testing new BBCODE feature using New Graphic Releases in the latest UO Client:

    Blacksmith Machine

    Animated:


    Owl Town Crier
     
    • Like Like x 1
    • Two Thumbs Up Two Thumbs Up x 1
  10. Po0ka
    Offline

    Po0ka Active Member

    Joined:
    Aug 19, 2014
    Messages:
    692
    Likes Received:
    82

    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 Like x 1
    • Funny Funny x 1
  11. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    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 Like x 1
  12. tass23
    Offline

    Moderator

    Joined:
    Aug 28, 2013
    Messages:
    1,018
    Likes Received:
    135
    Likely it's another graphic someone at EA screwed up and no one ever get round to fixing it. So it's just stayed there all these years lol
     
    • Agree Agree x 2
  13. Vorspire
    Offline

    Vorspire Vita-Nex: Core
    Admin ServUO Developer

    Joined:
    Jul 29, 2013
    Messages:
    1,077
    Likes Received:
    193
    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!
     
    • Winner Winner x 2
    • Like Like x 1
  14. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196

    This is an excellent example of what is possible by leveraging this API. Excellent work as usual Vorspire :)
     
    • Agree Agree x 1
  15. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,978
    Likes Received:
    445
    Awesome another great idea with the gump designer :)
     
  16. Jack
    Offline

    Jack Active Member

    Joined:
    Sep 23, 2014
    Messages:
    163
    Likes Received:
    32
    This is great. Any chance of allowing max dims to be set when the image is generated?
     
  17. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    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?
     
  18. Jack
    Offline

    Jack Active Member

    Joined:
    Sep 23, 2014
    Messages:
    163
    Likes Received:
    32
    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.
     
    • Creative Creative x 1
  19. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,978
    Likes Received:
    445
    Nice website :) so you were also able to get the bestiary script working
     
    • Agree Agree x 1
  20. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    977
    Likes Received:
    196
    • Two Thumbs Up Two Thumbs Up x 1
Similar Threads: ServUO Art
Forum Title Date
ServUO Discussion Can Mac OSX start ServUo? Dec 13, 2018
New Join Forum New to ServUo difficulty getting started Nov 22, 2018
The Back Room moved to a new HDD, now can't start ServUO May 11, 2018
Script Support Cannot create servuo server startup Nov 2, 2017
Documentation Running ServUO as a service on Ubuntu 16.04 with auto restarts Jan 3, 2017
Announcements ServUO Client API (Replacement for art API) Jun 7, 2016
Custom Releases Artifact Browser (Requires Latest ServUO) May 3, 2016