GameBanana shows no ads to members. Sign up now!
Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Unique Weapon Animations

A Tutorial for The Legend of Zelda: Breath of the Wild (WiiU)

This tutorial covers the basics on creating unique animations for weapons, allowing mod creators to better differentiate their mods from others. We will not cover how to create new animations but that may (or may not) be covered in a future tutorial. Special thanks to Czarpos for the video above.

This tutorial is not designed to be used alone but rather in tandem with the video Tutorial. It may be expanded upon at a later time.

Please ensure that when creating mods, you are working on copies of files and not your backups/Cemu files. The tutorial assumes you already know this.

Note: At the time this tutorial has been created it is currently impossible to add unique subtype animations to Bows and Shields.

1. Tools Used

 
Switch Toolbox

Wildbits

SARC or BOTW Unpacker

Note: When you install Wildbits it comes with SARC

Special Note: Whilst the video tutorial uses BOTW Unpacker it is generally recommended to use the SARC Command Line tool or Wildbits to perform the same function. These tools are more up to date and produce faster/more accurate results.

2. Subtypes


Every weapon, shield, armour, etc has a SARC file that we call actors, generally found in the content/Actor/Pack folder. These actors contain information about the objects used in game including model information, shop data, physics and their general parameters. For this tutorial we’re focusing on the general parameters.

With Wildbits, open a Sword, Spear or Long Sword actor and navigate to the weapons bgparamlist file.



Right click the file and select the Open as YAML option.

Once the data has loaded, scroll down until you reach one of the following sections which will depends on the type of weapon you’re editing:

  • SmallSword
  • LargeSword
  • Spear


At the bottom of this section you’ll see a property called WeaponSubType.

This property is used in the Players animation settings to determine if a special animation should be played. This is the same setting that allows the Windcleaver to use a different charge animation compared to other Long Swords. When creating new subtypes, you are free to enter any 32-character name, however the name chosen and referenced in the bas files are case sensitive.

3. Elements and Indexes

 
Every animation that the player performs is referenced from a series of bas files found within GameROMPlayer, which is the name of the actor used to represent the player. This actor can be found in TitleBG.pack a form of SARC file used to contain files that the came commonly references.  

To reach this file it is recommended to do one of the following methods.

1 – Command Line

Open PowerShell in the same folder as your TitleBG.pack and enter the following command sarc extract TitleBG.pack. This should create a new folder with your extracted contents. The actor can then be opened with Wildbits by navigating to the Actor/Pack folder within TitleBG and opening the actor similar to a standard weapon.

When you’ve finished performing changes, you’re ready to put everything back together you can use the command sarc create -b TitleBG TitleBG.pack to create your updated TitleBG. 

Ensure that you’ve removed any unnecessary extracted folders from your mod pack before distribution.

2 – Wildbits

Wildbits allows you to extract and create pack files without needing to resort to command line. Simply open Wildbits and on the main page you’ll see two buttons at the bottom of the window. The first one will be used to extract your TitleBG and the second will create your new one when you’re ready.



Once you’ve opened your GameROMPlayer you’ll see a number of files ending with bas.



Depending on the change you want to make you’ll need to edit a different file, however the basic attack animations for the typical combo are found in:

  • Player_CutS1
  • Player_CutS2
  • Player_CutS3
  • Player_CutS4
  • Player_CutSF.

Like before right click and Open as YAML on the file you want to edit.

BAS files are structured with Elements. Each element will generally do one of two things; it’ll either check for some condition (e.g the type of weapon you’re using) or it will tell the game to load and play a specific animation.

Elements are stored in an ordered list, therefore when making modifications that add new elements ensure that no two elements have the same number.

3.1. Branch Elements

 

Branch elements are defined with two parts Parameters and Children. Parameters determine the main purpose of the element. This is done via the use of an IndexType that the game uses to perform specific kinds of checks (i.e If Link is on the ground, the type of weapon he’s using, the temperature, etc). The children are a list which tells the game the next element to go to if a condition is met. Beneath the Children are a list of objects that define the different conditions used in the branching process of an animation file. Much like elements themselves these are listed in order and coincide with the list of children.

For the list of known Index Types as well as further information on this subject please read the bas page on ZeldaMods

3.2. Animation Elements

These elements tell the game to play specific animations and if there are any conditions or triggers to be used when these animations are playing. An example of a trigger would be the hitbox of a sword activating only in the middle of a sword swing.

Much like branch elements Parameters are used to define the type of animation to play as well as the file name of the animation to use.

The extended list that appears below then defines options for triggers, hold events and more.



Event1: !obj {TypeIndex: 7, Frame: 0.0, Value: FaceCut}
This line would tell the game to use Link’s combat facial animation during the Sword_Blunt_Attack_S1 animation starting from frame 0 (the first frame).

3.3. Subtypes

 
Subtypes are used in Branch Elements. An example of this can be seen in Element15 of the Player_CutChargeWait bas.



This element uses Index 97 which refers to a weapons subtype. The JudgeOnce variable means that this element isn’t checked again until there has been a weapon change. The Children here are elements 16 and 17, which means depending on the conditions set the game will use one or the other.

As noted, the conditions are listed in StringArray0 (used for string comparisons). Here we see Katana as Value0 and default as Value1. When put together this means that if a weapon has a subtype of Katana the element will tell the game to go to Element 16, however if the weapon has any other subtype or no subtype it will use Element 17. It is important to note that any branching element that uses some form of string conditional check must have a default option to ensure the game has an animation to play.

4. New Animations

New animations are referenced in two steps; creating a new Animation.sbfres file and referencing that in Link’s actor.

Animation files for most objects in the game are stored in a file that ends with _Animation.sbfres found in the content/model folder. A common example of this is the Player_Animation.sbfres file.

If your mod has new animation it’s recommended that you copy the existing Player_Animation sbfres, rename it to something else and then within Toolbox you clear all Animations. We do this because using an existing animation file has been shown to cause a number of errors from crashes to T-Poses.



Then you simply right click and import a new skeletal animation.



Ensure that your file is named differently within and externally.

To make this new file available for use you’ll need to open up the GameROMPlayer actor and open the Player.baslist file which can be found after all the bas files.

Edit the AddReses list which is simply a list of animation files used by the bas files to include your new animation file, in this case Player_NewName_Animation. As always ensure you increase the number of the list entry to prevent errors.



With that done you can reference your new animations in any player bas file you wish.

5. RSTB

 

With these kinds of mods due to the changes made in the files the resource size table (RSTB) will need to be updated. The easiest way of doing this is via BCML.

This can also be done manually, however you’d need to use RSTB Tool on the following:

  • Any actor or pack file that was changed
  • Changed bas files
  • Changed baslist files
  • Changed bgparamlist files

6. Credits

 

As always thanks to Czarpos for taking on this topic, doing a lot of research and creating one of the best-looking examples of animation editing that you’ll find for Breath of the Wild.

Thanks to the ZeldaMods team for keeping the wiki as up to date as possible, without you lot we would not have gotten this far.
Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Authors
CEObrainz avatar
CEObrainz username pic Joined 3y ago
TLoZ LA(S) Manager BotW2 Manager
Offline
683 points Ranked 43564th
18 medals 4 rare
  • Achieved Game Manager clearance Medal icon
  • 10 submissions featured Medal icon
  • Returned 1000 times Medal icon
  • Reached 50 subscribers Medal icon
  • Received thanks 5 times Medal icon
  • One month a member Medal icon
Original Authors
Czarpos
Special Thanks
ZeldaMods Team

Submitter

CEObrainz avatar
CEObrainz username pic Joined 3y ago
TLoZ LA(S) Manager BotW2 Manager
Offline
683 points Ranked 43564th
18 medals 4 rare
  • Achieved Game Manager clearance Medal icon
  • 10 submissions featured Medal icon
  • Returned 1000 times Medal icon
  • Reached 50 subscribers Medal icon
  • Received thanks 5 times Medal icon
  • One month a member Medal icon
CEObrainz avatar
CEObrainz

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Advanced

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Today's Pick
    Featured on May 2 2020
  • 9
  • 4.9k
  • 1
  • 25d
  • 25d

More from Submitter