Jump to content


Photo

So the Infinity Animation update..


  • Please log in to reply
190 replies to this topic

#81 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 08 May 2022 - 05:18 PM

Do you think the IA Reference Picker should help modders further tweak their animations using the GUI?
I'm thinking yes.  Do we A) just assume everyone is using ToBEx and ToBEx Afterlife, or do we B) add controls in the interface that require the user to specify that they are using the new ToBEx and/or Afterlife every time they want to claim an animation?
 
So previously when you went to claim an animation, you had to specify
  • The animation "Type".  I assume this is still needed.
  • The Foot circle size.  The options were HUGE A|HUGE D|LARGE 5|NORMAL 3, and selecting one also claimed slots with the same prefix but different foot circle size.  I assume selecting a size should not longer claim other slots?  What is the valid range of foot circle size, and what number do these entries correspond to?
  • Paperdoll.  The options were No|Yes.  For example, some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll.  If neither used a paperdoll, you got to use both slots.  If one needed a paperdoll, it also claimed the other corresponding slot.  Is this still relevant or has it/can it be externalized?
  • Subtype.  Options were paletted|unpaletted|WPL paletted|WPM paletted|WPS paletted|WQL paletted|WQM paletted|WQS paletted.  Is this still relevant or has it been externalized?
  • 2DA Soundset, No|Yes.  A great many slots have been claimed just to avoid soundset conflicts.  You claimed this was externalized, but I'm not seeing where...
 
-Sam.

Edited by Sam., 08 May 2022 - 05:19 PM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#82 skellytz

skellytz
  • Staff
  • 576 posts

Posted 08 May 2022 - 06:36 PM

A great many slots have been claimed just to avoid soundset conflicts.  You claimed this was externalized, but I'm not seeing where..

Yes, relying on TobEx AfterLife to override the soundset codes would free up those slots.

 

TobEx AfterLife allows to override the hardcoded soundset codes; the 2DA soundset filename can now be different and longer than the animation code:

 

APPEND ~anisndex.2da~ ~0x54B8 S@WENDIG WENDIGO~ UNLESS ~^0x54[Bb]8~

 

Where s@wendig is the soundset code override with my modder prefix pointing to s@wendig.2da

 

----- Externalise Animation Sound Reference Override [M]
Each animation sound 2da contains soundset information associated with each animation with the same 4-letter animation code (see reference ANIMSND.2DA). Unfortunately engine doesn't use ANIMSND.2DA, instead all 4-letter soundset filenames hardcoded to game code. Option externalises animation_id->sound_2da_filename mapping to ANISNDEX.2DA for override hardcoded values:

 

2DA V1.0
****
       File     Description
0x7101 MBAS2    BASILISK_GREATER
0x7200 MBER4    BEAR_BLACK
0x7202 MBER3    BEAR_CAVE
0x7203 MBER2    BEAR_POLAR
0x7401 MDOG2    DOG_WAR
0x7501 MDOP2    DOPPLEGANGER_GREATER
0x7702 MGHL2    GHOUL_GHAST
0x7B01 MWLF5    WOLF_WORG
0x7B02 MWLF6    WOLF_DIRE
0xA000 MWYV2    SMALL_WYVERN


As you can see, with Insomniator we've already added a list of codes fixing the remaining BG1 anims soundset conflicts. This also means the slots claimed by RBG1MPV will be freed up. Assuming the new IA would depend on TobEx AfterLife, I could also add the few IWD-BG2 conflicting soundsets (MMIN, MTAN, MMAR, MTRO, MLIC) that I'd previously attempted to solve by rather crude exe hacks.

 

 

Do we  just assume everyone is using ToBEx and ToBEx Afterlife

In my opinion, if we really want to offer a complete animation toolset, IA should require the prior installation of TobEx AfterLife.

 

Let me do a little bit more research about the other points. I'll touch base with Insomniator to prepare TobEx AfterLife for compatibility with IA, as the soundset override hack is currently disabled by default. At first, it was supposed to be enabled and used by Infinity Sounds, but I also believe it could easily be a slot-saver for IA classic.


Edited by skellytz, 16 May 2022 - 01:51 PM.


#83 Graion Dilach

Graion Dilach
  • Modder
  • 105 posts

Posted 09 May 2022 - 12:12 AM

Keep in mind that the next version of IA should also be EE compatible and it should provide a foundation to both.



#84 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 09 May 2022 - 01:14 AM

Do we  just assume everyone is using ToBEx and ToBEx Afterlife


In my opinion, if we really want to offer a complete animation toolset, IA should require the prior installation of TobEx AfterLife.

We can have TobEx installed only with one required option. Any TobEx options can be disabled except Externalise Animation Sound Reference Override or any other.sound option. With all options disabled, TobEx has no impact on engine, only has separate console window



#85 skellytz

skellytz
  • Staff
  • 576 posts

Posted 09 May 2022 - 06:39 PM

I'll touch base with Insominator to prepare TobEx AfterLife for compatibility with IA, as the soundset override hack is currently disabled by default.
We can have TobEx installed only with one required option. Any TobEx options can be disabled except Externalise Animation Sound Reference Override or any other.sound option. With all options disabled, TobEx has no impact on engine, only has separate console window

We need these features enabled by default in TobEx AfterLife, so that IA and content mods can append animations to anisndex.2da and extanim.2da without all the hassle with REPLACE_TEXTUALLY on TobEx INI files. 

 

IA and animation content mods will be installed after TobEx AfterLife but before Infinity Sounds. It would be best if TobEx AfterLife enabled these by default:
 
Externalise Animation Sound Reference Override=1 (currently =0)
Externalise Animation Config Override=1 (currently =0)
 
and copied anisndex.2da and extanim.2da to override (currently they aren't copied and used at all)
 
Those ten BG1 animations already present in anisndex.2da will be silent if Infinity Sounds isn't installed. So, TobEx AfterLife will also have to include and copy their 2DA soundsets:
Attached File  2da-soundsets.zip   3.68K   107 downloads
 
Alternatively, the anisndex.2da could be initially empty (only the header and column descriptions). Infinity Sounds would then append the BG1 animations and provide 2DA soundsets on its own.

 

Your decision, Insomniator.

 

The animation "Type". I assume this is still needed.
Subtype. Options were paletted|unpaletted|WPL paletted|WPM paletted|WPS paletted|WQL paletted|WQM paletted|WQS paletted. Is this still relevant or has it been externalized?

Insomniator, you were kind enough to go through the existing data in the executable and externalize the features that were sort of "on the way" while fixing other things. You also said you wouldn't add any new features to TobEx; bug fixes and conflict-solving only. So, I guess this means the features above can't be externalized without a lot of busy work involving the whole animation system, right? This would essentially mean externalizing the animation system just like BGEE INI.

 

The Foot circle size.  The options were HUGE A|HUGE D|LARGE 5|NORMAL 3, and selecting one also claimed slots with the same prefix but different foot circle size.  I assume selecting a size should not longer claim other slots?  What is the valid range of foot circle size, and what number do these entries correspond to?

Sam, correct me if I've misinterpreted something, but if the prefix is the same, then removing this restriction would introduce conflicts between BAM filenames of these slots anyways. Unless these are different animation types with file naming patterns that can coexist.

 

In any case:

Normal = 3 (typical creature footcircle size)

Large = 5 (eg ankheg)

Huge A = 10

Huge D = 13 (eg dragon)

 

The valid range is 1-255, but values other than the typical ones (3-13) will often cause lots of selection and/or collision problems.

 

In the classic engine, personal_space determines both collision space and ellipse size (calculated together). In BGEE, these are separated into personal_space (collision space) and ellipse (the visual footcircle size).
 

Paperdoll. The options were No|Yes. For example, some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll. If neither used a paperdoll, you got to use both slots. If one needed a paperdoll, it also claimed the other corresponding slot. Is this still relevant or has it/can it be externalized?

What do you think, Insomniator? Would it be easy enough to trace animation and paperdoll links in the classics and externalize them to extanim.2da? (resref_paperdoll in BGEE INI for reference) (example classic animation: werewolf)


Edited by skellytz, 16 May 2022 - 01:51 PM.


#86 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 10 May 2022 - 03:13 PM

Hi skellytz

IA and animation content mods will be installed after TobEx AfterLife but before Infinity Sounds. It would be best if TobEx AfterLife enabled these by default:

 
Externalise Animation Sound Reference Override=1 (currently =0)
Externalise Animation Config Override=1 (currently =0)
 
and copied anisndex.2da and extanim.2da to override (currently they aren't copied and used at all)
 
Those ten BG1 animations already present in anisndex.2da will be silent if Infinity Sounds isn't installed. So, TobEx AfterLife will also have to include and copy their 2DA soundsets:
attachicon.gif2da-soundsets.zip
 
Alternatively, the anisndex.2da could be initially empty (only the header and column descriptions). Infinity Sounds would then append the BG1 animations and provide 2DA soundsets on its own.

 

Your decision, Insominator.

OK, these two options will be enabled by default

Both files will be empty, i can not maintance content-related things. If 3rd party mod adds some to ANISNDEX.2DA like

0x7203 MBER2  BEAR_POLAR

this mod must care MBER2.2DA and its *.wav sounds
 

The animation "Type". I assume this is still needed.
Subtype. Options were paletted|unpaletted|WPL paletted|WPM paletted|WPS paletted|WQL paletted|WQM paletted|WQS paletted. Is this still relevant or has it been externalized?

Insominator, you were kind enough to go through the existing data in the executable and externalize the features that were sort of "on the way" while fixing other things. You also said you wouldn't add any new features to TobEx; bug fixes and conflict-solving only. So, I guess this means the features above can't be externalized without a lot of busy work involving the whole animation system, right? This would essentially mean externalizing the animation system just like BGEE INI.

I dont know about animation BAMs, as i can see WPL/WQL/.. used in 0x5000 animation only. What is "paletted|unpaletted" ?

You asked me about new thing to me, i can not answer without explanation what you request

 

 

Paperdoll. The options were No|Yes. For example, some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll. If neither used a paperdoll, you got to use both slots. If one needed a paperdoll, it also claimed the other corresponding slot. Is this still relevant or has it/can it be externalized?

What do you think, Insominator? Would it be easy enough to trace animation and paperdoll links in the classics and externalize them to extanim.2da? (resref_paperdoll in BGEE INI for reference) (example animation: werewolf)

each animationID has separate filename calculation algo, 0x5000 example

Group00: anim->sPrefixPaperDoll+ anim->cArmorCode + patched fourth char

Group10: anim->sHeightCode + anim->sWeaponPrefix + patched second char

Group20: anim->sHeightCodeShieldPaperDoll/sHeightCode + anim->sShieldPrefix

Group30: anim->sHeightCode + anim->sHelmPrefix+ patched second char

 

I dont understand how this can be externalized, i need example of "some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll. If neither used a paperdoll, you got to use both slots"
 


Edited by Insomniator, 13 May 2022 - 02:52 AM.


#87 skellytz

skellytz
  • Staff
  • 576 posts

Posted 10 May 2022 - 04:24 PM

What is the valid range of foot circle size, and what number do these entries correspond to?

I've found out the value of Huge A. Here's the updated list:

 

Normal -> personal_space = 3

Large -> personal_space = 5

Huge A -> personal_space = 10

Huge D -> personal_space = 13

 

For BGEE, we also need to set ellipse size separately:

Normal -> personal_space = 3 -> ellipse = 16

Large -> personal_space = 5 -> ellipse = 32

Huge A -> personal_space = 10 -> ellipse = 56

Huge D -> personal_space = 13 -> ellipse = 72

 

How about renaming Huge A to Huge 10 and Huge D to Huge 13?

 

Paperdoll.  The options were No|Yes.  For example, some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll.  If neither used a paperdoll, you got to use both slots.  If one needed a paperdoll, it also claimed the other corresponding slot.  Is this still relevant or has it/can it be externalized?

There is a small caveat in BGEE: "resref_paperdoll=" can be added to new animations (ie paperdolls can be enabled for new animations by adding the key to the INI), but must point to the same prefix as "resref=" in the INI file; if these two are set to different prefixes, even if the files are named and referenced in the INI properly, the animation gets messed up in-game. In other words, if the animation prefix is "123", the paperdoll file will have to be named "123INV.BAM".



#88 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 10 May 2022 - 04:45 PM


The Foot circle size. The options were HUGE A|HUGE D|LARGE 5|NORMAL 3, and selecting one also claimed slots with the same prefix but different foot circle size. I assume selecting a size should not longer claim other slots? What is the valid range of foot circle size, and what number do these entries correspond to?

Sam, correct me if I've misinterpreted something, but if the prefix is the same, then removing this restriction would introduce conflicts between BAM filenames of these slots anyways.[...]

You are correct; I didn't think it all the way through.

 

I dont understand how this can be externalized, i need example of "some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll. If neither used a paperdoll, you got to use both slots"

Here's how to test.  It requires only oToB, no Infinity Animations, no TobEx.  Place this paperdoll in the override folder.  EnableCheatKeys, and summon a Marilith (DEMOSUM1.CRE) and a Tanar'ri (TANARI01.CRE).  Force them to join your party with Ctrl+Q, and look at their inventories.  These two animations both use the MTAN prefix, one with an IWD type slot, and one with a BG type slot.  Both animations coexist with the same prefix, but because they share the same prefix, they share a paperdoll.  Infinity Animations works essentially the same way; except that it will prevent anyone from claiming the second slot if the first needed a paperdoll.

Attached File  MTANINV.bam   4.47K   80 downloads


Edited by Sam., 10 May 2022 - 04:48 PM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#89 skellytz

skellytz
  • Staff
  • 576 posts

Posted 10 May 2022 - 04:52 PM

 

The animation "Type". I assume this is still needed.

Subtype. Options were paletted|unpaletted|WPL paletted|WPM paletted|WPS paletted|WQL paletted|WQM paletted|WQS paletted. Is this still relevant or has it been externalized?

I dont know about animation BAMs, as i can see WPL/WQL/.. used in 0x5000 animation only. What is "paletted|unpaletted" ?
You asked me about new thing to me, i can not answer without explanation what you request
 

 

I think we can forget about externalizing animation types. If I'm not mistaken, even though BGEE INI includes the "animation_type" key, the animation types are still hardcoded in the executable. If you pick an animation offset with a wrong hardcoded type, overriding it in the INI apparently doesn't work. It won't make much sense to externalize those if the same cannot be done for BGEE.

 

IESDP on BGEE INI confirms that:

Animation slots are limited to the numeric 16-bit range (0x0000 - 0xffff) and are further divided into subranges for different animation types. These subranges are hardcoded by the engine, most likely to retain backwards compatibility with the original games

 

I dont understand how this can be externalized, i need example of "some BG slot types could coexist with IWD slot types with the same prefix, but they shared a paperdoll. If neither used a paperdoll, you got to use both slots"

What we meant was externalizing the animation's ability to have a paperdoll.
 
Some animations are hardcoded to have a paperdoll in the inventory screen, eg all player character animations, brown bear, black bear, greater werewolf, etc. (druid shapeshifter's abilities and polymorph). The engine looks for xxxINV.bam, where xxx is the hardcoded prefix, eg black bear has MBER0, brown bear MBER1, greater werewolf MGWE. It would be great if we could externalize this to extanim.2da as an override: resref_paperdoll -> animation prefix (which means enable paperdoll for this animation offset and look for animation prefix + INV.bam)
 

                  SPEED   SND_FREQ    PERSONAL_SPACE   COLOR_BLOOD   CHUNK_DEATH   RESREF_PAPERDOLL
0x7B00            9       140         5                48            *             MWLF

 

Even better: externalizing (overriding) the animation resref as well (the prefix for all the animation BAM files). Thanks to that, modders would be claiming offsets in IA, but providing their own animation codes with their modder prefixes, eg "s@01". Conflicts solved and lots of animation slots freed up.
 

                  SPEED   SND_FREQ    PERSONAL_SPACE   COLOR_BLOOD   CHUNK_DEATH    RESREF  RESREF_PAPERDOLL
0x1103            9       8           3                *             *              s@01    s@01

 

This would instruct the engine to look for s@01xxxx.bam animation files and enable the paperdoll for this animation as s@01INV.bam

 

BGEE externalized the animation prefix and paperdoll as "resref=" and "resref_paperdoll=" in the INI system.


Edited by skellytz, 11 May 2022 - 05:43 PM.


#90 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 11 May 2022 - 09:49 AM

Hi skellytz, Sam

Even better: externalizing (overriding) the animation resref as well (the prefix for all the animation BAM files). Thanks to that, modders would be claiming offsets in IA, but providing their own animation codes with their modder prefixes, eg "s@01". Conflicts solved and lots of animation slots freed up.

SPEED   SND_FREQ    PERSONAL_SPACE   COLOR_BLOOD   CHUNK_DEATH    RESREF  RESREF_PAPERDOLL0x1103            9       8           3                *             *              s@01    s@01
 
This would instruct the engine to look for s@01xxxx.bam animation files and enable the paperdoll for this animation as s@01INV.bam

Yes, it is possible
 
I made litle test (without IA installed) with 0x1100 TANARRI:

                 SPEED   SND_FREQ    PERSONAL_SPACE  COLOR_BLOOD CHUNK_DEATH RESREF  RESREF_PAPERDOLL
0x1100    *               *                         *                                     *                              *                             MTAM     MWYV

1) Copied 24 files MTANG11.BAM-MTANG34E.BAM as MTAMG11.BAM-MTAMG34E.BAM
2) No animation fails on area screen
3) After joining party, in inventory i see Wyvern paperdoll
 
What about all possible animation ranges for RESREF overriding?

0xxx ignored, non-pc animation
4xxx ignored, non-pc animation
5xxx skip ? (mainPrefix + ArmorLevelPrefix)
6xxx skip ? (mainPrefix + ShadowGroundPrefix(CSHD/SSHD/...))
7F3B MSOL + MSOG(glow ?)
7F3C MSAL + MSAG(glow ?)
Bxxx ignored, non-pc animation
Dxxx ignored, non-pc animation

RESREF_PAPERDOLL currently works only for simple animation as RANGE_BODY(Group00), engine just use main prefix as paperdoll prefix

0x5xxx/0x6xxx/0x7xxx and probaly more uses dynamic paperdoll prefix generation depending on armor code or exact animation ID


Edited by Insomniator, 11 May 2022 - 09:57 AM.


#91 skellytz

skellytz
  • Staff
  • 576 posts

Posted 12 May 2022 - 05:41 PM

What about all possible animation ranges for RESREF overriding?

IA classic will definitely need:

 

10xx - 11xx   BGI MONSTER LONG 4 PART (examples: big wyvern, tanarri)

13xx          BGII SPLIT 4 PART (examples: demogorgon)

5000 - 5478   IWD (replaces all vanilla _LOW character animations) (same type as vanilla Exxx) (examples: ice golem, orc)

547a - 58f3   BG1 SIMPLE MONSTER (same type as vanilla 7xxx BG1 simple monsters) (examples: werewolf, brown bear)

5b00 - 5f78   BGII UNSPLIT EXT. (same type as vanilla 7xxx BG2 unsplit-BAM monsters) (examples: Melissan, death tyrant)

5f7a - 5fff   BGII SPLIT (same type as vanilla 7xxx BG2 split-BAM monsters) (examples: solar, troll)

a0xx - a1xx   BGI MONSTER LONG (examples: carrior crawler, small wyvern)


The following legacy ranges should probably keep the hardcoded IA prefixes and won't need the resref override. These particular animation types cannot be added to BGEE at all (no unlocked slots available), so they won't be very useful to most modders if they can't maintain compatibility between the classic and BGEE.

 

12xx          DRAGONS

20xx - 21xx   BGI SIMPLE CASTER (BOW)

22xx          BGI SIMPLE CASTER (S1)

30xx - 31xx   BROKEN ANKHEG

 

The character animation ranges need specific prefix naming to get everything working (BAMs and paperdolls), so it's probably best to keep the hardcoded IA prefixes. The resref override won't be needed for them.

 

6600 - 6aff   CHARACTER BGII

6b00 - 6fff   CHARACTER BGI

 

RESREF_PAPERDOLL currently works only for simple animation as RANGE_BODY(Group00), engine just use main prefix as paperdoll prefix

0x5xxx/0x6xxx/0x7xxx and probaly more uses dynamic paperdoll prefix generation depending on armor code or exact animation ID

What's the paperdoll generation code for 7xxx? For example, black bear uses MBER0INV and brown bear MBER1INV. Are the 0 and 1 hardcoded armor levels for these specific animations?
 

We'll need resref_paperdoll override support at least for the animation ranges that also need resref override (the first list + 7xxx and Exxx).


Edited by skellytz, 12 May 2022 - 07:12 PM.


#92 Andrea C.

Andrea C.
  • Modder
  • 464 posts

Posted 13 May 2022 - 12:53 AM

Keep in mind IA assigns BG1 character sprites to the 5000 range, if memory serves, where LOW sprites normally are. Those will need the same treatment as other slots with player character sprites unless IA defaults to a different range for them.

#93 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 13 May 2022 - 12:56 AM



RESREF_PAPERDOLL currently works only for simple animation as RANGE_BODY(Group00), engine just use main prefix as paperdoll prefix
0x5xxx/0x6xxx/0x7xxx and probaly more uses dynamic paperdoll prefix generation depending on armor code or exact animation ID

What's the paperdoll generation code for 7xxx? For example, black bear uses MBER0INV and brown bear MBER1INV. Are the 0 and 1 hardcoded armor levels for these specific animations?

1)

0x7Bx0 Prefix + "0"
0x7Exx "MGWE"
0x7Ax3 Prefix + "3"
0x72x1 Prefix + "1"
0x72x0 Prefix + "0"
0x79x2 Prefix + "2"
 
0x7F0F "MTRO"
0x7310 "MFIE"
0x7302 "MEAE"
 
0x7xxx Prefix (if not special ID above)

 

2) Armor code used in 0x5xxx and 0x6xxx paperdoll prefixes, see http://www.shsforums...e-5#entry612472

 

3) RESREF_PAPERDOLL  must override Prefix before possible calculation or override final value ?

  • 0x7Bx0 Prefix + "0" : RESREF_PAPERDOLL=MTAM, filename will be  MTAM0INV.BAM
  • 0x7B10 Prefix + "0" : RESREF_PAPERDOLL=MTAM, filename will be  MTAMINV.BAM

Edited by Insomniator, 13 May 2022 - 02:35 AM.


#94 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 13 May 2022 - 02:01 AM

skellytz

10xx - 11xx   BGI MONSTER LONG 4 PART (examples: big wyvern, tanarri)

13xx          BGII SPLIT 4 PART (examples: demogorgon)

5000 - 5478   IWD (replaces all vanilla _LOW character animations) (same type as vanilla Exxx) (examples: ice golem, orc)

547a - 58f3   BG1 SIMPLE MONSTER (same type as vanilla 7xxx BG1 simple monsters) (examples: werewolf, brown bear)

5b00 - 5f78   BGII UNSPLIT EXT. (same type as vanilla 7xxx BG2 unsplit-BAM monsters) (examples: Melissan, death tyrant)

5f7a - 5fff   BGII SPLIT (same type as vanilla 7xxx BG2 split-BAM monsters) (examples: solar, troll)

a0xx - a1xx   BGI MONSTER LONG (examples: carrior crawler, small wyvern)

Only 7 ranges for RESREF ?



#95 skellytz

skellytz
  • Staff
  • 576 posts

Posted 13 May 2022 - 02:29 AM

Only 7 ranges for RESREF ?

Give me some more time to put everything together now that I understand how the paperdoll prefixes work. Also, BGEE paperdoll support is finicky at best, so I'll do a few more tests.
 



#96 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 13 May 2022 - 02:46 AM

Only 7 ranges for RESREF ?

Give me some more time to put everything together now that I understand how the paperdoll prefixes work. Also, BGEE paperdoll support is finicky at best, so I'll do a few more tests.


In one of my prev post i found mistake

 

each animationID has separate filename calculation algo, 0x5000 example

Group00: anim->sPrefix + anim->cArmorCode + patched fourth char

must be

each animationID has separate filename calculation algo, 0x5000 example

Group00: anim->sPrefixPaperDoll + anim->cArmorCode + patched fourth char

Only 0x5xxx has separate field sPrefixPaperDoll to store paperdoll prefix, only few 0x5xxx rare anims has different main and paperdoll prefix (e.g. 0x5312 CDMB + CDFB / 0x5315 CHFB + COFB). Remains 0x5xxxx anims has same prefix for anim and paperdoll.


 


Edited by Insomniator, 13 May 2022 - 02:51 AM.


#97 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 13 May 2022 - 03:15 AM

5000 - 5478   IWD (replaces all vanilla _LOW character animations) (same type as vanilla Exxx) (examples: ice golem, orc)

547a - 58f3   BG1 SIMPLE MONSTER (same type as vanilla 7xxx BG1 simple monsters) (examples: werewolf, brown bear)

5b00 - 5f78   BGII UNSPLIT EXT. (same type as vanilla 7xxx BG2 unsplit-BAM monsters) (examples: Melissan, death tyrant)

5f7a - 5fff   BGII SPLIT (same type as vanilla 7xxx BG2 split-BAM monsters) (examples: solar, troll)

0x5000 range is problematic, vanilla set it to Playable BG2 Human Chars, shield/armor/weapon prefixes and more fields.

IA hacks and cheats engine to handle animID other way, at same time IA doesn't have patches/injects sources&documentation.

I afraid Tobex needs to cheat IA after cheating original engine, this is not what i want to do.
 



#98 skellytz

skellytz
  • Staff
  • 576 posts

Posted 13 May 2022 - 03:49 AM

TobEx can simply assume IA animation type remapping for the 5xxx subranges, because the original engine doesn't use the range in practice. I'll double check everything we've discussed so far tonight after work.


Edited by skellytz, 13 May 2022 - 01:57 PM.


#99 Insomniator

Insomniator
  • Modder
  • 358 posts

Posted 13 May 2022 - 12:21 PM

TobEx can simple assume IA animation type remapping for the 5xxx subranges, because the original engine doesn't use the range in practice. I'll double check everything we've discussed so far tonight after work.

I checked bugbear 0x500E on live installation:
1) IA detects 0x5000-0x5479 range, jump to creating 0xExxx animation
2) Constructor of 0xExxx animation (BioWare's original name AnimationTypeMonsterIcewind) was patched, it checks for 0x5000-0x523D range, if YES, load sPrefix from hardcoded array inside .EXE, for 0x500E select "µAO" + set footsize=5. For 0x523D-0x5479 range select same sPrefix, but footsize=3
3) CAnimationE000() continues original code, convert sPrefix to many sub-suffixes for different BAMs/cases:
sPrefix+"A1", A2, A3, A4, Gu, Sl, De, GH, Sd, Sc, Sp, Ca, Tw, Wk +
sPrefix+"A1E", A2E, ..., WkE
 
TobEx injects before step 3) to override sPrefix (same place to inject as on original engine), so Yes, IA already did job to convert initial animID to proper animationtype and no need care about animID mistmatches
 
Finaly TobEx can:
1) RESREF_PAPERDOLL override final sPrefix for BODY paperdoll, ignores any calculation, filename = RESREF_PAPERDOLL + "INV", support any animid range (useless for Human Playable Chars with many *INV BAMs per one animid)
2) RESREF override sPrefix for animation BAMs, keep original suffix calculation, injects to most animation type, except:
 
 

0xxx ignored, non-pc animation
4xxx ignored, non-pc animation

6xxx ignored, original BG2 and BG1 animation
Bxxx ignored, non-pc animation
Dxxx ignored, non-pc animation


Edited by Insomniator, 13 May 2022 - 01:29 PM.


#100 skellytz

skellytz
  • Staff
  • 576 posts

Posted 13 May 2022 - 01:46 PM

 RESREF override sPrefix for animation BAMs, keep original suffix calculation, injects to most animation type

Did you just-- Ladies and gentlemen, this is a historic moment! If all of this works out, new animation prefixes will no longer be hardcoded (except for BG1/BG2 character anims) and modders will be able to name their animation files using their own reserved modder prefixes instead! This means a lot of slots will be freed up, as claiming animation offsets won't be limited by shared hardcoded animation IDs.

(We need to test 12xx dragons, though, because our dev notes say the game is supposed to crash if you use a prefix with fewer than 4 characters for this specific type. If that's still the case, the select few modders claiming offsets in this tiny range for the classics will be advised to use 4-character prefixes or simply the IA-hardcoded ones for draggies. Note: BGEE doesn't support adding new dragon animations in this range at all.)
 
New TobEx test version, Insomniator?
 

RESREF_PAPERDOLL override final sPrefix for BODY paperdoll, ignores any calculation, filename = RESREF_PAPERDOLL + "INV", support any animid range

Nice! Your implementation is ahead of BGEE paperdolls, then.
 
I've done some tests with all the anim type ranges available in BGEE, and unfortunately the paperdolls still follow the classic hardcoded filename calculations, eg with the armor levels taken from the last digit of the offset number, etc. Because of this, resref_paperdoll is kind of useless in BGEE for anything other than character animations. When you override resref_paperdoll in the INIs, the engine also internally overrides the resref. So, resref_paperdoll must match all your BAM animation filenames anyways. And then modders will still have to name their BGEE paperdoll BAMs with the added armor levels (0, 1, 2, 3) based on the offset number, like S@AB1INV.bam if my prefix is s@ab and offset number ends with xxx1 eg in the BG1 simple monster range. Character animations are an exception; resref_paperdoll works for those.
 
We're not hacking BGEE exe, so modders will have to be additionally advised on BGEE paperdoll filenames. On the other hand, BGEE INI resref override seems to work fine for the ranges which accept new animations.

 

Keep in mind IA assigns BG1 character sprites to the 5000 range, if memory serves, where LOW sprites normally are.

Thanks for staying sharp, Andrea. I've checked again: BG1 character anims are added to 6xxx, not 5xxx. IA replaces 5xxx LOWs with new IWD slots. So, we're good.


Edited by skellytz, 16 May 2022 - 01:52 PM.