punkice3407 / ObjectBuilder

MIT License
52 stars 38 forks source link

Outfits/Animation editor #7

Open EPuncker opened 2 years ago

EPuncker commented 2 years ago

I think lots of users would benefit of a way to convert new outfits (with 9 animations) to old outfits (3 animations)

I've added two outfits as example: (old outfit) old outfit_740

(new outfit) new outfit_741

punkice3407 commented 2 years ago

I did some modifcations in current converter(old outfits to new outfits) Removing frame groups is still in TODO hah

image

Berzekz commented 2 years ago

GOD !

punkice3407 commented 2 years ago

Okay, I have added this feature, you can test it here ObjectBuilder_0_5_5-dev.zip

While importing OBD it will automaticaly convert frame groups(and mounts) considering the client's version

EPuncker commented 2 years ago

you can test it here

it kind of works, but seems like its taking the wrong frames:

purple demon, crown outfit (and last is how they should look like)

Animação

btw thank you a lot, I really appreciate it

on a side note: would it be hard to add this function as menu option? in case we want to use it on already imported outfits?

punkice3407 commented 2 years ago

Currently the converter works like this:

  1. Adds first frame from walking
  2. Checks if there is a fifth one and adds it
  3. If there is not fifth then checks for second
  4. If there is not second then adds one more time first frame

The problem is that not every outfit has a standard frame settings for walking, I checked out some outfits and they were good. Take a look on outfit 12.

What do you mean by in case we want to use it on already imported outfits?

EPuncker commented 2 years ago

The problem is that not every outfit has a standard frame settings for walking, I checked out some outfits and they were good. Take a look on outfit 12.

Indeed, tibia files still have outfits with both 3 (old) and 9 (new) frames. you are correct, and yes, importing outfit 12 works fine, but seems like some outfits don't really work, specially human outfits: Animação (first and second worked fine, but human (jersey outfit) just display first and second frames (even thought the original sprite had 8 frames + 1 idle)

What do you mean by in case we want to use it on already imported outfits?

an option so we could convert already existing sprites: 2022-03-04 14_28_20-Object Builder - Outfit 12_

punkice3407 commented 2 years ago

Indeed, tibia files still have outfits with both 3 (old) and 9 (new) frames. you are correct, and yes, importing outfit 12 works fine, but seems like some outfits don't really work, specially human outfits:

I will check it later, can you give me outfit ID?

I can easily make something like that, but why do you need it? Your client doesn't have frame groups but your outfit have? Impossible hah

EPuncker commented 2 years ago

I will check it later, can you give me outfit ID?

outfit id 609 - fine outfit id 620 - wrong outfit id 1468 - wrong outfit id 1456 - wrong

I think it is because of addon frames maybe? (but 1468 doesn't have addons and don't work either) and here is the dat/spr file from newest tibia so you can test: https://github.com/EPuncker/1098extended

<version value="1285" string="12.85" dat="4A10" spr="59E48E02" otb="0"/>

Your client doesn't have frame groups but your outfit have? Impossible hah

yeah my bad, I'll have to reimport all outfits again, there is no workaround

punkice3407 commented 2 years ago

I think it is because of addon frames maybe? (but 1468 doesn't have addons and don't work either)

I found the problem, it's with removing mounts, I have improved the code a bit and commented out the part with removing mounts. I checked on your client and it's looking good on most outfits.

Now im trying to deal with outfits that have different idle and walking width/height...

EPuncker commented 2 years ago

I think it is because of addon frames maybe? (but 1468 doesn't have addons and don't work either)

I found the problem, it's with removing mounts, I have improved the code a bit and commented out the part with removing mounts. I checked on your client and it's looking good on most outfits.

Now im trying to deal with outfits that have different idle and walking width/height...

by the way while you are at it, I think you may have noticed that lots of new items (and also old ones), got "improved" animations... they have lots of frames now: 20, 39, etc. and they look ugly when importing to older versions (look item client id: 35910), while on most of old items had 4 frame animations, so my optional suggestion is:

when importing items that have more than 10 frames, to reduce frame count in 50% for example: 12.x item have 30 frames animation, when imported to 8.6 v3, it will have only 15 frames (make it optional of course)

EPuncker commented 2 years ago

I think it is because of addon frames maybe? (but 1468 doesn't have addons and don't work either)

I found the problem, it's with removing mounts, I have improved the code a bit and commented out the part with removing mounts. I checked on your client and it's looking good on most outfits.

Now im trying to deal with outfits that have different idle and walking width/height...

can i test it please? 😄 I don't care about some outfits not work as long as most of humans outfit works

Silba93 commented 2 years ago

Okay, I have added this feature, you can test it here ObjectBuilder_0_5_5-dev.zip

While importing OBD it will automaticaly convert frame groups(and mounts) considering the client's version

I've been converting some outfits manually recently and while this converter sometimes works you're right that there's no standard and the converter just won't work correctly for a lot of outfits. If this feature is worked on more i would suggest letting the user configure the converter in some way so that we can select which animations from which frames we use.

A very good example would be the demon outfit(id35) it's not possible to make a good looking conversion by just selecting frames alone, no matter which frame groups you select the feet will be either be wonky or the animation will look like it's taking tiny steps.