Jump to content

Werebear animations on GemRB


Caillean

Recommended Posts

I wrote a code that seems to work. At least, it appends new data rows and sorts the file.

For convenience, I will use an array to append new lines. What I need is the meaning of the last 4 column contents. After studying all avatars files, I came to this:

TYPE
 

Quote

 

0 = CHARACTERS (BG2)

1 = TOWN STATIC

2 = BG1 SIMPLE CASTER

3 = AMBIENT (animals)

4 = BG2 SPLIT

5 = used by OGRE BG1 (MONSTER LONG). I guess this type is for what IA calls "paletted' animations (i.e. colors set by cre file).

6 = CHARACTERS (BG1)

7 = FLYING

8 = BG1 MONSTER LONG ( used by WYVERN and CARRION_CRAWLER)

9 = IWD

10 = used by HORSE and COW (AMBIENT_STATIC). I guess it is for large or non-human animations ?

11 = BG1 MONSTER LONG 4 PARTS

12 = DRAGONS (9 PARTS)

13 = EFFECT

14 = BG1 SIMPLE MONSTER

15 = used by GOLEM_IRON, KUO-TOA_LARGE, SPIDER_SMALL (but also a BG2 SPLIT type). Why ?

17 = BROKEN ANKGHEG

16 = used by MARILITH, ORCS, and YUANTI3 (but also IWD). Why ?

18 = AMBIENT_STATIC

19 = BG2 UNSPLIT EXT.

20 = BG2 SPLIT 4 PARTS

21 = used by MELISSAN (but also a BG2 UNSPLIT EXT. type). Why (maybe because of a vanilla display glitch that does not display BG2 UNSPLIT animations sleep and get up actions, but only die ones ?

 

 

SPACE

Seems to be personal space. I would appreciate the values meanings.

 

PALETTE

As I understand the way bmp files are set, I really don't understand the 0 and 1 values meanings. I guessed 0 = un paletted, 1 = paletted. But so many unpaletted animations get a 1 value.

 

SIZE

Seems to be used only for CHARACTERS animations, except 0x2200 OGRE_MAGE (which is also a paletted animation and nothing mention it in the file ?)

 

 

Edited by Gwendolyne
Link to comment
On 10/1/2019 at 6:49 PM, Gwendolyne said:

So, let's say I want to install a IA component (or install a mod) using 0x1002 FIEND_BLUE (4AB) animation in a GemRB install. How would I proceed? I guess you use avatars.2da file as a database and the engine handles the animation type to display it correctly in game?

If it is correct, IA main component might append avatars.2da  with all new animations compatible with GemRB engine, then sort it the way you need it.

I use IA in gemrb for a long time now and the only thing i did is modify the avatars.2da. You don't need a patch like the original engine. I ended up also modifying the bgmain patch and the file prefixes but only because i use linux and the μ and other prefixes wouldn't work.

The only problem that remains is that gemrb uses the frame count as speed for the animations (which works for some of the original animations) but i suppose the IA animations have more frames and so many creatures have lightning speed :) I modified the gemrb code to read the speed from a 2da file (in the fashion of EE) but i couldn't get the speed of the animations. The plan was to use scripting in the original engine to measure how long it takes for a creature to travel between two specific points but i couldn't get it.

Do you know how fast each animation should go or do you have any way to find out ? If yes, then IA will be able to run fine in GemRB.

Edit: Here is a diff of the changes i made. Disregard the prefixes as they correspond only for my filenames. I set the type / space / size by trial and error to make the animations be the same as the originals. I think that i made an area with all the changed creatures and verified that they appear the same between original engine and gemrb but i may remember wrong.

Edited by khelban12
Link to comment

khelban12, is that all for IA or are there any vanilla fixes in between?

btw, the walking speed stuff is tracked here: https://github.com/gemrb/gemrb/issues/129 (waiting for kmfrick to finish the pathfinder upgrade)

Gwendolyne:

  • space is for foot circle size and searchmap blocking — so mostly visible as the circle size.
  • palette of 1 skips the special handling used for two-character suffixes (like with the bears) and only checks if a global color mod is needed
  • size of 0 skips equipment animations for all; where set it's for getting the same thing; only two animation types use it

We want to move to pst-style system eventually, since there are many exceptions all over the place and this is one of the most annoying pieces of code we have. I can't imagine how horrible the original must've looked with all the hardcoded logic for this. Partly we managed to extract it (that's how dltcep got this feature), but it's a lot of custom work and testing on top. All the games share the same types, so some may not have interesting representatives in bg2. There are many animations that look identical to a clean type and then it doesn't have the casting stance, missing some orientations or some other crap. Like yetis vs winter wolves (ca). We're  a bit fragile in that regard, so bad animations usually don't get drawn and so they're easy to spot.

So if some creatures and their animation types don't make sense to you, please make a list — you know the animations much better and it could be worthwhile for us to double check them. 5 we would call clown-colored, for obvious reasons, but the type names are generally pretty boring: https://github.com/gemrb/gemrb/blob/master/gemrb/core/CharAnimations.h#L68

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...