Jump to content

Werebear animations on GemRB


Caillean

Recommended Posts

A little guide for those interested in playing Ulb's wonderful Bearwalker ranger kit mod on the GemRB engine (including future me). Infinity Animations core is not needed for this.

 

1. Extract the mod to your game folder

2. To be on the safe side use any rename tool to rename the animation files,  e. g. KRename on Linux: Replace 'µ' with '_' in all file names contained in the BearWalker/Animations folder. Do this because tolower would make a mess of those filenames otherwise.

3. Open Setup-BearWalker.tp2 in your editor of choice and use the Find / Replace function to also change 'µ' to '_' - should be two instances.

4. Install the mod. You can ignore the warning about IA not being installed.

5. Only needed for GemRB versions older than from October 2019: Copy gemrb/unhardcoded/bg2/avatars.2da (exact location depends on your OS) to your installation's override folder and add the following line:

0x5294		_DJ		_DJ		_DJ		_DJ		9		2		1		*

The animations should now work in GemRB.

Edited by Caillean
Link to comment

Will do.

As a general question - is this character 'µ' problematic, other than causing a mess if you try to tolower the files? Just wondered, because some Infinity Animations components just work, some don't. Perhaps that's the cause? If not, the Windows people wouldn't need to bother with renaming files at all.

Link to comment

I do. With Sam's help (who rewrote the engine patch).

What do you need exactly? Patching a 2da file? It could be easily done at the same time I patch ANIMATE.ids, ANISND.ids and ToBeX externalized aniwksnd.2da.

Just send me the file to be patched and tell me what you need.

Edit: sorry, but as I never installed GemRB, please forgive me if I ask silly questions. ;)

Edited by Gwendolyne
Link to comment

Great! It's a bit trickier, since the place of insertion in the table matters — it's sorted by animation ID:

https://github.com/gemrb/gemrb/blob/master/gemrb/unhardcoded/bg2/avatars.2da

AT1-AT4 are the various armor levels, TYPE is animation type (you can't know this), SPACE is the foot circle size, PALETTE is for clowncolored/specials, SIZE I forgot (maybe for equipment placement on the paperdoll). @zelazko, @Caillean and maybe @khelban12can hook you up with the rows to be added. They have to be inserted in the right spots, since animation ids have ranges with shared properties. But INSERT_2DA_ROW can insert anywhere, so it's mostly a chore.

The next weidu version* will have "ENGINE_IS gemrb", but since the file name is unique, maybe that's not needed. Since I guess the IA release will come sooner than the weidu one, you can test for avatars.2da existing (you can't know the path, so maybe through a test with COPY_EXISTING). If it is, you know you have recent enough weidu and gemrb and can do the patching. Otherwise just do nothing. But I'm sure you know much more weidu than me, so perhaps there are better ways ...

 

* gory details here, but as a mod author you don't need to care about this, it will be magic: https://github.com/WeiDUorg/weidu/issues/153

Link to comment
44 minutes ago, lynx said:

Great! It's a bit trickier, since the place of insertion in the table matters — it's sorted by animation ID:

No problem. I already wrote a WeiDU function to sort ids and 2da files by animation ID once appended. Just for convenient purpose (I hate reading unsorted data files). ;)

Just a question: does IA correctly patch GemRB game exe file? I mean, since now, how do you install IA in GemRB game?

Edited by Gwendolyne
Link to comment

It only patches BGMain.exe, which hasn't any effect on GemRB. Still, some components just worked for me (IWD shadows e. g.) while others wouldn't (like the werebear). Perhaps it's the non-latin characters in the filenames. I think copying the animation files to the installation, patching the necessary ids files (animate and anisnd, probably some others, dunno) - EDIT: what you're doing anyway - and GemRBs  2da's should be enough to work on GemRB?

Edited by Caillean
Link to comment

Yeah, we don't care about the exe mods. Any relevant changes can be coded properly, if needed. Most of the patching, I imagine, is for the iwd/pst animation types, which we don't need at all.

So yeah, after all the changes in question, things should work out of the box. If they don't, we just need to fix them (like if you introduce a yet non-existent animation type, let's say out of 16 stitched bams). I'm sure our players will let us know.

 

BTW the fact that nobody knows what the 1PP deva glow patch is annoying, since they're still broken for us, even in vanilla:

https://github.com/gemrb/gemrb/issues/134

Link to comment

In fact, IA does a lot of thinks. But basically, it first patches bgmain.exe to get rid of the animation slots number limitation.

In this process, it allows modders to install new animations prefixed according to their type:
 

Quote

 

- BGI MONSTER LONG 4 PART (0x1001 ==> 0x11ff) : prefix 4

- DRAGONS (0x1209 ==> 0x1234) : prefix XDR

- BGII SPLIT 4 PART (0x1301 ==> 0x13ff) : prefix -

- BGI SIMPLE CASTER (BOW) (0x2001 ==> 0x21ff) : prefix 2

- BGI SIMPLE CASTER (S1) (0x2201 ==> 0x22ff) : prefix 6

- BROKEN ANKHEG (0x3001 ==> 0x31ff) : prefix 4

- BGI MONSTER LONG (0xa001 ==> 0xa1ff) : prefix 2

 

special cases:

- IWD LARGE (0x5000==>  0x523b) : prefix 3

- IWD SMALL (0x523d ==> 0x5478) : prefix 3

- BGI SIMPLE MONSTER (0x547a ==> 0x58f3) : prefix 1

- BGII UNSPLIT EXT. (0x5b00 ==> 0x5f78) : prefix 3

- BGII SPLIT (0x5f7a ==> 0x5fff) : prefix 8

- CHARACTER BGII (0x6600 ==> 0x6aff) : prefix 0

-  CHARACTER BGI (0x6b00 ==> 0x6fff) : prefix 0

 

 

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.

Edited by Gwendolyne
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...