Connect the dressing room with character API

Added by vl over 9 years ago

With the information inside the character API and the ballistic website:

http://ballisticmystix.net/?p=dressingRoom

It should be possible to display the character body


Replies (22)

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

any pointers how to handle hair type or 'trial and error' ? ;-)

tattoo will probably translate directly to fy_hof_tatoo# ?

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

never mind... i figured it out ;-)

RE: Connect the dressing room with character API - Added by vl over 9 years ago

lol, you are too fast :)

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

well... armor color is nowhere to be found. hat/jacket/trousers/feet/arms/hands do not change
but for testing, link is
http://ballisticmystix.net/api/armor_image.php?key=1224Z0Z1728C7C7
or with redirect
http://ballisticmystix.net/api/armor_image.php?key=1224Z0Z1728C7C7&redir=1

... and xml seems to be updated every time character gets saved in game.

RE: Connect the dressing room with character API - Added by vl over 9 years ago

nimetu wrote:

well... armor color is nowhere to be found. hat/jacket/trousers/feet/arms/hands do not change

You mean that the color that are in the character xml is not good? not used?
Have you an example of character with the color id that should be setuped and the color id that is in the xml?

... and xml seems to be updated every time character gets saved in game.

Yes, I removed the cache on character to be able to test the API faster. So it's temporary until the API become public.

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

vl wrote:

You mean that the color that are in the character xml is not good? not used?
Have you an example of character with the color id that should be setuped and the color id that is in the xml?

color does not update in character xml and it's with all chars. one char has colors as 0, second as 1, one in silan has 6.
using this page http://atys.ryzom.com/characters/index.php?key=268465Z3Z2072A842 (char has full green armor+helmet, with white gloves.
gloves should be 'arms' under color and different than 'feet' for example.

if i change armor to different color and wait for update and reload, color values stay the same (played time is updated so xml data is new)

RE: Connect the dressing room with character API - Added by vl over 9 years ago

Ok, I checked in the code and in fact these colors are not used at all :-)
The color is in the crafted parameter of the item, i'll export it ASAP.

Btw, don't you have the armor&co texture in higher resolution or in more color (currently it s 256colors/gif)?

RE: Connect the dressing room with character API - Added by vl over 9 years ago

Okay, I did some changes in the xml.

I removed the <color> and put in <body> the 2 used colors (hair and eyes).

<equipments> now contains generic <item> (so it contains the color) and added a special attribue "part" to know the part of the armor.
<hands> are the same format as <equipments>.

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

vl wrote:

Btw, don't you have the armor&co texture in higher resolution or in more color (currently it s 256colors/gif)?

350x700 in gif is the max i have. i'll see if i can recreate them. layer's madness needs to be fixed anyway.

--

script changed for new xml. works alot better hehe.
dont have (yet) images for refugee and temple kami/karavan 'pants'. everything else should display nicely

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

moved the translation layer to dressing room and now it's simpler.
script on http://ballisticmystix.net/api/armor_image.php?key=API_KEY should work too
php class included

--

still working on armor images... or now working on armor images, finished linux app and scripts hehe.
layering still gives a headache. using single color textures for the 'other' shapes is not quite what i was hoping for

dressingroom.php (1.5 kB) Magnifier

RE: Connect the dressing room with character API - Added by vl over 9 years ago

Nice!

I created a new wiki page explaining an easy way to know display the API Key in the url (since it's not secure).

Here => SecureAPIKey.

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

Better images in here i hope. some layering errors still, but most of those can be corrected when i get new dressing room ready hehe.

dressingroom.class.php has updated url and eye color

http://ballisticmystix.net/api/armor_image.php?ckey=I8T8SRkZGRn%2FbeQKF%2FbDqM%2F7Ihny%2F9uJmxTZ

--

some note should be added to wiki that with AES encrypted key, it is neccessary to use urlencode() on the ckey before using it in html, but not urldecode() when reading it from URL, as that is automatic for $_GET/$_REQUEST

btw, http://atys.ryzom.com/api/banner.php is affected by this too.

RE: Connect the dressing room with character API - Added by vl over 9 years ago

Wow.

What did you change on the texture? You re screenshot them?

I have one request if you want: Make the texture the size of the body. Currently there's lot of empty space on top/left/botttom/right of the body (blue area http://clip2net.com/clip/m9195/1241339152-clip-18kb.jpg ).

One possibility (slow) is, at the end of process, you read pixel after pixel and when you see the first pixel, you keep the Y. for other direction it the same and then when you have xmin/max and ymin/max you can do a copy in a new image of the perfect size.

RE: Connect the dressing room with character API - Added by nimetu over 9 years ago

vl wrote:

What did you change on the texture? You re screenshot them?

still directly from game files, but instead scrpting object viewer, i built minimal application for linux. texture colors are changed from shell script moving links to right 'texture sets', so it really is minimum that's needed hehe.

with ObjectViewer i was using 1024x768 resolution (or so), now however, i rotated the screen (randr in linux) and that gave me nice 1050x1680 resolution to fit the avatar. and using png's ofcourse.

I have one request if you want: Make the texture the size of the body. Currently there's lot of empty space on top/left/botttom/right of the body

yeah, i dont like the empty space either, but trykers do take less space in game too ;-)

heres two images to see 4 races.
web size: http://ballisticmystix.net/cache/dressing-room-sample/ryzom_male_s.png (~400K)
'work' size: http://ballisticmystix.net/cache/dressing-room-sample/ryzom_male.png (~1.7M)

RE: Connect the dressing room with character API - Added by vl over 9 years ago

Just amazing!

nimetu wrote:

with ObjectViewer i was using 1024x768 resolution (or so), now however, i rotated the screen (randr in linux) and that gave me nice 1050x1680 resolution to fit the avatar. and using png's ofcourse.

NeL openGL drivers has an offscreen mode that render directly in a back buffer so the resolution of the offscreen buffer can be what you want and doesn't depends of your screen resolution. setDisplay() uses a CMode and CMode contains a bool offscreen.

I have one request if you want: Make the texture the size of the body. Currently there's lot of empty space on top/left/botttom/right of the body

yeah, i dont like the empty space either, but trykers do take less space in game too ;-)

Of course they have different size, but with the small after process I gave you, you can remove the empty space dynamically after the render.

heres two images to see 4 races.
web size: http://ballisticmystix.net/cache/dressing-room-sample/ryzom_male_s.png (~400K)
'work' size: http://ballisticmystix.net/cache/dressing-room-sample/ryzom_male.png (~1.7M)

Perfect rendering!

RE: Connect the dressing room with character API - Added by Fang about 9 years ago

Hi nimetu,

i test http://ballisticmystix.net/api/dressingroom.php and i notice a bug on matis female waring only zorai light boots on her feet.(Nude legs are not diplayed but replaced by nude feet over zorai boots).Anyway, your api is great, thx !

regards :)

RE: Connect the dressing room with character API - Added by nimetu about 9 years ago

Fang wrote:

i test http://ballisticmystix.net/api/dressingroom.php and i notice a bug on matis female waring only zorai light boots on her feet.(Nude legs are not diplayed but replaced by nude feet over zorai boots).

it would be great if you could provide the link.

RE: Connect the dressing room with character API - Added by Nepherkaan about 9 years ago

it's amazing what you've done.
Here is what i create with your API Nimetu.

I create the final image at each update of your character...
Amazing!

(i move the tryker a little bit higher, or we will see only his hair ^^)

charSelection.png (57.8 kB)

RE: Connect the dressing room with character API - Added by arc almost 9 years ago

Works like a charm, thank you :)

(1-22/22)