Skip to content

Anyone with any experience/help on Modding the Animation Files?

ReddbaneReddbane Member Posts: 222
About a week I started a thread asking about changing the equipment appearance on a character Avatar, and after a few rounds of questions and answers and engine experiments, I’ve come to the conclusion that I’m actually going to have mod the individual animation set, not anything major, just moving some already created animations around.

So now I need to ask, does anyone have any experience with how the animation sets (that in the ones you’re assigned in the beginning of the game, and can apply to your avatar in EEkeeper) in BGEE work, or know anyone? I know specifically most classes-gender-race combos have a specific set applied to them, like a male human cleric uses the animation slot “0x6000 CLERIC_MALE_HUMAN” and that determines not only what the character looks like in on the field and in the inventory screen, but also what the character looks like when an item with a certain equipment script is applied (leather, chainmail, plate, mage robe 1, 2, 3, etc.) The thing is that certain Animation slots do not change appearance when certain item scripts are applied, like a mage avatar’s appearance doesn’t change when equipping armor, and the cleric, fighter, and thief slots don’t change when equipping robes. What would I have to mod/add/edit in the animation files so that, “mage robe 1, 2, or 3” does apply a change to the huma male cleric slot, like say changes it to the “chainmail” appearance?

For clearness sake, I will mention that I don’t want to simply change the robe itm files so that they apply the chainmail appearance, as several people already bright this; I don’t want to change the qualities of the robe items themselves, which would make it so the Mage avatars lose their fancy appearances. I want to edit the actual animation slots, improve them if you will, so that they react to the mage robe scripts just as they react to armor scripts.

If anyone could offer any advice or point to people who do? As there currently does not seem to be any tutorials on editing animation files that I can find similar to the ones provided on Infinity Engine coding.

Comments

  • kjeronkjeron Member Posts: 2,367
    Sadly it cannot be done that way.
    Robes and Armor use separate animation codes within the item, while the various WIZARD_GENDER_RACE animation slots are still hard-coded to use the robe animation codes, and all others are hard-coded NOT to use robe animation codes. One way or another, you have to change the item files if you want any character animation to be able to display both.
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    @subtledoctor Yes, it can easily be done by duplicating/modifying items, I only meant that you cannot achieve such results by altering just the animation slots.

    The animation slots did get some soft-coding in the v2.0 patch, such as increasing the maximum number of armor codes allowed for a given animation slot.
    Instead of just:
    1A: none
    2A: leather
    3A: chain
    4A: plate
    Personally, I have:
    1A:none
    2A:leather/hide
    3A:studded leather
    4A:chain
    5A:splint/scale
    6A:plate
    7A:fullplate
    8A:hooded(thief/none)
    9A:hooded(thief/leather/studded)
    AA:hooded(thief/chain)
    BA:robe1
    CA:robe2
    DA:robe3
    Each with a different animation or paperdoll, by combining all the classes animations and paperdolls to aviod creating new ones.
    Item abilities are used to switch between duplicated hooded and non-hooded versions of leather/chain.
    Any creature using a WIZARD animation is changed to use a CLERIC animation, and some generic clothes to generate the unarmored hood/robe appearance are made available to buy and given to any thieves/mages NPC's without any armor.
  • ReddbaneReddbane Member Posts: 222
    @kjeron
    If all the animation slots have entries for robe 1, 2, 3, why can't someone copy the entries for for, say chainmail appearance, and rename and paste them? Or am I understanding it incorrectly? How exactly are the armor sets applied to an animation set? Are the total armor animations contained within each animation slot or are separate/connected to the item equipment script? How are the Animation (armor) sets hardcoded if someone like Sentrizeal is able to modify and add animations to them by placing files in the override folder. Optionally would it would it be easier to create a new animation slot (for purely personal use, since I know public mods have to reserve a animation set number), identical to the Male Human Cleric in all ways, except that its default unarmored appearance uses the files for Cleric in Chainmail?
  • [Deleted User][Deleted User] Posts: 0
    edited November 2016
    The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    Reddbane said:

    @kjeron If all the animation slots have entries for robe 1, 2, 3, why can't someone copy the entries for for, say chainmail appearance, and rename and paste them? Or am I understanding it incorrectly? How exactly are the armor sets applied to an animation set?
    Are the total armor animations contained within each animation slot or are separate/connected to the item equipment script?

    The animations are determined by the animation slot, the item only tells the creature which "tier" of its animation to display.
    Each item has an animation entry at offset 0x22, with a value of [1A, 2A, 3A, 4A, 1W, 2W, 3W, 4W, or empty].
    1-4 represent the tier of the armor to be displayed.
    Reddbane said:

    How are the Animation (armor) sets hardcoded if someone like Sentrizeal is able to modify and add animations to them by placing files in the override folder.

    The various WIZARD animation slots are hardcoded to only read values ending with "W", defaulting to 1W otherwise.
    All other animation slots are hardcoded to ignore values ending with "W", defaulting to 1A otherwise.
    1W and 1A are the unarmored animations, which is what happens when you have nothing equipped, when a non-WIZARD equips robes, or when a WIZARD equips armor.
    Reddbane said:

    Optionally would it would it be easier to create a new animation slot (for purely personal use, since I know public mods have to reserve a animation set number), identical to the Male Human Cleric in all ways, except that its default unarmored appearance uses the files for Cleric in Chainmail?

    This would work, since the unarmored appearance is the one robes default to using for non-WIZARDS, but you would lose the normal unarmored appearance.
    Copy and rename the Male Human Cleric animation file, "6000.ini", using an available slot number.
    Replace the entry for resref, resref_armor_base and resref_armor_specific to something other than B, C, F, T, or W, for example "D".
    Duplicate and rename all the animation images for Male Human Cleric "CHMC..." to "CHMD...", using Chainmail's "CHMC3...", for both values 1 "CHMD1..." and 3 "CHMD3...".
    Assign your new animation to your character.
  • PeccaPecca Member Posts: 2,174
    I added the functionality to change robe appearances types in-game through item abilities in my MSFM mod (the method subtledoctor talks about). It can be done fully in WeiDU thanks to the ADD_ITEM_HEADER function (by Ardanis I think). You can check the code in the attached file if you want.
  • ReddbaneReddbane Member Posts: 222
    edited November 2016
    @kjeron
    Could you point me in the direction of a tutorial/instructions to adding new animations? I've found all the relevant bams and renamed them but I don't know how to code them into the game. I'm kind of new at this animation coding.
  • kjeronkjeron Member Posts: 2,367
    @Reddbane
    The INI file is the coding for them, its just a simple text file.
    If you copy "6000.INI", rename it, for example "600A.INI", replace the entries I mentioned, and then assign that animation to your character in through EE Keeper or Near Infinity, that should be all that is needed. The filename of the INI file is the animation slot in hexidecimal, so 0x600A = 24586. I don't know if EE Keeper allows custom entries for animations, but Near Infinity does, right-click on the field -> edit as number.
  • ReddbaneReddbane Member Posts: 222
    @kjeron
    I used DD10, with the animation files prefixed by RHMR (is that wrong, do I still need the C in the beginning?) however when I select the animation slot, either through EEkeeper or as an as 0xDD10 applied to the character, the actor in games appears as nothing, no selection circle either, who warps around the map instantaneously whenever told to move, with the selection circle briefly appearing as a column of colored light.

    Here is the text from the file (DD10.ini) if that helps:

    // RHMR redd_male_human

    [general]
    animation_type=DD10
    move_scale=9
    ellipse=16
    color_blood=47
    color_chunks=0
    sound_freq=5
    personal_space=3
    cast_frame=4

    [character]
    armor_max_code=4
    can_lie_down=1
    detected_by_infravision=1
    double_blit=0
    equip_helmet=1
    split_bams=1
    false_color=1
    height_code=WQL
    height_code_helmet=WQL
    height_code_shield=
    resref=RHMR
    resref_paperdoll=RHMR
    resref_armor_base=R
    resref_armor_specific=R

    [sounds]
    attack=
    attack_frame=0
    awake=
    awake_frame=0
    cast=
    cast_frame=0
    conjure=
    conjure_frame=0
    damage=
    damage_frame=0
    die=
    die_frame=0
    head_turn=
    head_turn_frame=0
    ready=
    ready_frame=0
    shoot=
    shoot_frame=0
    twitch=
    twitch_frame=0
    walk=
    walk_frame=0
    attack_slash=
    attack_slash_frame=0
    attack_backslash=
    attack_backslash_frame=0
    attack_jab=
    attack_jab_frame=0
    emerge=
    emerge_frame=0
    hide=
    hide_frame=0
    sleep=
    sleep_frame=0
    battle_cry=
    battle_cry_frame=0
    selection=
    selection_frame=0
    fall=fal_02b
    fall_frame=0
  • kjeronkjeron Member Posts: 2,367
    I believe some animation slots flat-out do not work, but I don't know of a master list of good/bad slots.
    The 6000's range are used for all PC animations, and 6030's are used for Male Cleric's, so they are your best option, 6038-603f are unused.
    But don't change animation_type, it should remain exactly 6000.
  • ReddbaneReddbane Member Posts: 222
    Success!
    Thanks for all your help @kjeron .

    Now I can finally play a Kensai or Fighter/Mage and not look like a naked goober!


    And here is the inventory shot. Note I'm wearing no cloak, but still look cool. Also thanks to the advanced color choices in EEkeeper my character looks like he's wearing some nice threads, plus since I'm not using the chainmail code my character doesn't jingle as he walks.


    Strange these days we take for granted this level of customization in our games.
Sign In or Register to comment.