Skip to content

[Help] Issue with dual-classed characters' sprites

Hello.

@RVNS and @jonusiescu have been so kind as to help me test the mod I'm working on, and they've run into a most vexing issue I can't seem to wrap my head around. After installing the component that restores the original BG1 character sprites, dual-classing any characters results in a sprite change that seemingly makes no sense.

For example, dual-classing Imoen gives her a BG2 male sprite.

Other cases they tested revealed that Female Human Fighter changed to BG2 Male Dwarf, regardless of class.
Female Human Cleric changed to BG2 Male Fighter (or Cleric; they look pretty similar.)
Male Human Fighter or Mage changed to BG2 Male Fighter.


It's been forever since the last time I played through the game, let alone dual-classed a character, but IIRC dual-classing should leave sprites unaffected.


I guess the first step would be to double-check my WeiDU code?

This is a copy of the tph with the code I'm using to apply the BG1 sprites.


Thanks in advance to anyone who can help me.

Comments

  • AndreaColomboAndreaColombo Member Posts: 5,530
    Calling on @Avenger_teambg who may be able to shed some light on how the engine handles dual-classing.
  • sarevok57sarevok57 Member Posts: 6,002
    well what happens in the vanilla game is that when you dual class, your sprite will change in the dominant order of fighter-> cleric -> thief -> mage

    so if you were a mage and dualed over to a fighter you sprite would turn into a fighter sprite, but if you were a fighter originally then you sprite does not change

    also if you were a thief and dualed into a mage, then you keep your thief sprite, but if you were a thief and dualed into a fighter then your sprite would change over into a fighter

    my assumption that this is happening because there is something perhaps in the .2da files that determines what you change into when you dual class over into a different class, so maybe this mod that you have to give the original BG sprites didnt take into account a .2da file that also needs to be changed for the proper sprites, and since maybe you dont have the sprites that match the .2da file ( because of your mod ) or maybe the BG 1 sprites have names that confuse the .2da file, that is why you are getting some weird sprite changes when you dual class
  • AndreaColomboAndreaColombo Member Posts: 5,530
    That’s a very good point. I didn’t do anything about dual-classing for lack of better knowledge; if there’s a file that governs that and someone could point me to it, I’d be grateful.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    If this happens only after the mod's install, I would ask the modder who made this restore mod.
  • kjeronkjeron Member Posts: 2,368
    edited March 2018
    I tried dual-classing a non-standard animation, and this is what happened:
    Only the 2nd character(class) of the animation was altered when dual-classing to create the new animation.
    0x4001 -> 0x4201
    The first, third(gender), and fourth(race) were not changed, even if they did not match the characters current gender/race.
  • AndreaColomboAndreaColombo Member Posts: 5,530
    edited March 2018
    Thank you, @kjeron.

    I received the same info from Scott at about the same time you posted.

    Unfortunately that's exactly where the problem lies, and the reason why it can't be helped unless this behavior is externalized (I'll log a redmine feature request for it.)

    For those interested (and anyone potentially running into this issue and googling it): BG1 sprites require an "old" animation slot and won't work with any "new" ones. The only "old" animation slots in the game are found within the 5000 and 6000 series at the following intervals:

    0x0600
    0x0700
    0x0800
    0x0900
    0x0A00
    0x0B00
    0x0C00
    0x0D00
    0x0E00
    0x0F00

    which means it's impossible for BG1 sprites to be assigned slots that abide by the standard enumeration (i.e. there's no way to assign them slots that have 0/1/2/3 as the second figure in their reference number, which is what the engine uses when you dual-class.)

    As a result, for as long as this behavior is hard-coded, the only way around this is issue is to use EE Keeper after dual-classing your character and manually assign it the correct sprite. I'll make sure I include this in my mod's readme.
    Post edited by AndreaColombo on
  • The user and all related content has been deleted.
  • AndreaColomboAndreaColombo Member Posts: 5,530
    I'm afraid that would be way beyond my (admittedly limited) WeiDU skill. :(
  • [Deleted User][Deleted User] Posts: 0
    edited March 2018
    The user and all related content has been deleted.
  • AndreaColomboAndreaColombo Member Posts: 5,530
    If anybody's willing to coach me through the process, I'm game :)
Sign In or Register to comment.