ServUO Art API

Jack

Squire
Sep 23, 2014
163
33
28
Auckland, New Zealand
Shard Name
Lost Lands
Thanks, Milva.

I don't want to crash the thread, but the issue I had with the Bestiary was to do with the path in the registry not being picked up correctly by Ultima.Dll and instantly causing a crash on shard start-up. I am not sure if this has come up before on the ServUO forums, but I posted about this over on RunUO a while back. http://www.runuo.com/community/threads/bestiary-generator-ruo2-5.537391/
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Working on something. API will be unavailable in the meantime.
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Sorry no, this is very platform specific and is not as simple as releasing the source. The database alone is a few hundred mb.
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Yes I do have the source for that since I made it :p

I am sorry I won't be sharing the source for this one. It is an exclusive to the ServUO website.
 

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
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.
Use CSS to resize the <img> :) You only need to set one dimension for images in browsers, the style rendering will automatically scale the other axis proportionately. By default, UO Assets are 44x44, but most artwork is taller than it is wide, so the best best way to display it is by modifying the max-width property instead of width.
Take a look at this page http://www.uofreedom.com/features/imbuing/ (generated by SQL data which is updated on every shard boot-up)

Although, I doubt you need this advice, your website looks really amazing... the bestiary is really, REALLY nice.
 

Jack

Squire
Sep 23, 2014
163
33
28
Auckland, New Zealand
Shard Name
Lost Lands
Use CSS to resize the <img> :) You only need to set one dimension for images in browsers, the style rendering will automatically scale the other axis proportionately. By default, UO Assets are 44x44, but most artwork is taller than it is wide, so the best best way to display it is by modifying the max-width property instead of width.
Take a look at this page http://www.uofreedom.com/features/imbuing/ (generated by SQL data which is updated on every shard boot-up)

Although, I doubt you need this advice, your website looks really amazing... the bestiary is really, REALLY nice.
I ended up finding a resource on the RunUO forums which generates the images using PHP, and adding a small trim/resize function to it. But you are right, I should have just resized with CSS, I did it the hard way for no real benefit because I didn't fully understand what I was trying to do.

Thanks for the kind words, your shard's website looks great too.
 

Saboo UOAC

Citizen
May 20, 2015
5
0
1
120
Great work with the API! Are we allowed to make API calls from external sites? Are there any terms & conditions to use it?
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Great work with the API! Are we allowed to make API calls from external sites? Are there any terms & conditions to use it?
You can use it as much as you want in any application you need. So long as you aren't hammering the API there won't be any problems/.
 

Saboo UOAC

Citizen
May 20, 2015
5
0
1
120
Hi,

do you have an API for body value? looks like it uses the different set from item. E.g., I can't get that neon human paperdoll from prior post, it turned into a wall/pole instead.

Thank you!
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
Do you mean the paperdoll gump? If so it is gumpID 12.

http://services.servuo.com/uoapi/gump/12

If you mean the actual bodies then no, they are animations and there is like 700 frames for some of the body values. Maybe in the future I will support it but right now we don't.
 

Saboo UOAC

Citizen
May 20, 2015
5
0
1
120
I see.. I was hoping to get something /body/212 <--- grizzly bear or /body/116 <-- nightmare..

but no biggie :) just wondering. Thanks!
 

dmurphy

Admin
ServUO Developer
Feb 10, 2014
1,013
232
63
31
I see.. I was hoping to get something /body/212 <--- grizzly bear or /body/116 <-- nightmare..

but no biggie :) just wondering. Thanks!
No we don't have that right now as it's not as simple as the rest. Bodies are comprised of multiple animations such as walking/running , idle, bowing etc and each animation has many frames. In the future when I have time I might come up with a solution for this but right now it is not available.