Attributes

## Overview

**Attributes** are the different skills and aspects of playing sports given to all playable characters in each of the *Backyard Sports* games. The combination of these attributes are used to calculate the *ratings*, as seen on the player cards. Many of these had been estimated or theorized until the full list of attributes for every player was found in the game's code.

## Background

Ever since the revolution of Save State Hacking of *Backyard Baseball*, and the methodology behind creating Custom Players, it was theorized that there were many more statistics than just batting, running, pitching, and fielding. TheMajesticYeti and Yurya were vital in determining the workings of the Custom Player. The line of code for the custom player in the coach file (listed under `backupstats0`) contained 37 bits of information. This included trivial aspects like their birthday and nickname, but at least 25 of these bits determined the skills of the player. There were simple skills such as running, and more complex ones such as stamina, all of which appeared to be on a scale of 1-159. Changing the value of any of these bits could alter one or more of the four "core" stats: batting, running, pitching, and fielding.

The conclusion from this information followed shortly thereafter: If this line of code existed for the custom player, then surely, somewhere in the code of *Backyard Baseball*, this string of attributes existed for every player in the game, and this must be how the game calculated their four core stats. GSchlim was perhaps the member of the *Backyard Baseball* community who was most motivated to find these attributes.

## Searching the Code

Within the file folder of *Backyard Baseball*, or any computer game, there are many files that make the game run. For most of the *Backyard Sports* from the Humongous Entertainment era, these files were written in hexadecimal, or hex code. Traversing these files for the possibility of finding the attributes proved difficult, as they were not written in the same language as the coach files. To find the attributes, one would have to, in theory, know the string of attributes for at least one of the players, convert it into hexadecimal, and then search for it within the files. GSchlim, among others, searched for this code within the .(a), .(b), .he0, .he1, .he2, .he3, .he4, and .he9 files, to no avail.

With little success in finding the so-called "holy grail" of Backyard Baseball, GSchlim tried to find similar code in other *Backyard Sports* games. He ended up finding what he was looking for in *Backyard Basketball* on February 20, 2021 (Discord link). Within the file folder of *Backyard Basketball*, there was a file entitled "players.plr", and other similar files named for a coach in the game, with the **.plr** extension. This file contains the names of each Backyard Kid, the two pros, and all the generic players. After each person's name was a long, illegible string of random numbers and letters, written in hexadecimal form. GSchlim realized that when he changed some of the hex codes, it actually changed the values of the stats on the player card! He had found the long lost dream: the hidden attributes of every player in the game.

This brought up an issue. There is no "players.plr" file, or any other anologous file within the folder of *Backyard Baseball*. So where did the hidden attributes lie in that code?

## The Discovery

Fellow Backyard Baseball community member Vissery was also interested in diving deeper into the game files, and downloaded Cheat Engine to mess with some functions of the game while it was playing. On July 5, 2021 (Discord link), after figuring out how to unlock a generic player in batting practice, he stumbled across something revolutionary. Using prior knowledge of the backupstats0 line from the custom player, he searched for the backupstats0 string in hex form in the Cheat Engine. Cheat Engine found the string, and Vissery was able to edit the custom player's attributes instantly, without opening the coach file! The reason this was not found previously is that Cheat Engine opens the executable file, a file previously thought to be inaccessible with a hex editor.

After finding the custom player's attributes within the **.exe**, he looked immediately above the custom player for the stat line of Mr. Clanky, since the custom player has the last ID number, and Mr. Clanky has the second to last ID. Sure enough, Mr. Clanky was right there! The holy grail of *Backyard Baseball* had been found. Each player's attributes were listed one after another. They were separated by ID number and not by name, so this was also a factor in what made them so difficult to find.

## The Attributes

Each player has these attributes listed within the game's files, similar to the **backupstats0** line used for the custom player. Each attribute is given by a two-digit hexadecimal code. If it is a categorical variable, the number determines which option is picked. If it is a numerical variable, the values are typically between 1-100. Everyone has their own stats, except for the clones of the MLB players, who simply refer to said MLB players' stats instead of having unique attributes. This means players like Susan Gore are different between 2001 and 2003, as in 2001 she is Ken Griffey Jr., while in 2003 she is Ichiro.

Not every stat below is 100% certain, there is still a lot to discover within the code of the game, mostly to do with the AI programming. Batting is the most looked into, as well as speed. The order of the attributes are as follows:

* **Lock.** This determines whether the AI will lock that player into a certain defensive position. This is used to get the pro players and their clones at the correct positions, and is a 0 for every other player. In the original version of *Baseball* (and every other game in the series), this stat technically exists, but does nothing. It's likely a nameless placeholder that just so happened to find a good use in the *2001* and *2003* games.
* **Stamina.** A lower value indicates they tire easily, while a higher value indicates they can last a long time on the field. Also affects how much stamina they lose when pitching (and not the actual pitching ratings).
* **Intelligence.** This is basically how smart the player's AI is. Smart players are typically better with most logical decisions, although it's not fully known what they all are. Examples are things like "choosing pitches they're good in more often", and "being more likely to swing with certain swings."
* **Coordination.** A measurement of how well the player can catch the ball, if it's sent to them. This also seems to affect how well the player reactively throws as an AI player. Players hit in the head or the legs by the ball will still drop it, however, which creates a lot of confusion as to how useful they are. With Errors Off this stat is seemingly not checked at all, as every player catches the ball perfectly (unless hit with a Screaming Line Drive).
* **Running.** Self-explanatory. This is the only attribute that influences the "running" stat on the player card. 1-9 is a speed of 1, 10-19 is a speed of 2, and so forth. 90-100 is a speed of 10. Speed "tiers" are grouped into stats of 20, meaning 0-19 is the worst, 20-39 is second worst etc. Any running stat above 95 is coded to be one "tier" higher, making a 96-99 faster than 80-95, and 100s of course are even faster. The actual stat of each player does matter, though, as higher ones in each "tier" take longer to fall out of it. The field type you're on makes kids slower, with all the grass and dirt fields (not including Parks Dept. #2, Big City Stadium and Super Colossal Dome) decreasing your "tier" by 1, and Sandy Flats and Casa de Pablo decrease your speed "tier" by 2. All concrete and playoff/season mode fields have no modifier, meaning you run faster there.
* **Arm.** How far the player can throw from without losing stamina. Players with weak arms notably can only throw super hard extremely close to their target, while strong arms can throw farther.
* **Throwing.** How often the player throws it as far or as fast as they need to. A lower number means they will often "spike" or "flub" the throw, or throw much weaker. On hard mode this is changed to have a chance of always being 100.
* **Swing.** The batting power stat. Affects how far the player can hit.
* **Hitting.** The batting contact stat. How reliably the player can hit the ball in play. A low number causes the player to often foul off good pitches or swing and miss completely.
* **Vision.** This is how well the player can "see". A lower number means they will have a large swing spot when batting and a large green circle when fielding. A higher number means they will have a small swing spot when batting and a small green circle when fielding.
* **Attention.** This attribute appears to correlate with how often a player misses a catch or lets the ball go past them. A higher number means they will be less likely to get distracted and do idle animations or fall over. This stat is affected by stamina. On Hard mode, this stat is always set to 100 regardless of how tired the players get.
* **Appearance.** Used in-game to determine what the character looks like. Doesn't appear to have an actual gameplay function in any way.
* **Aggression.** This attribute appears to control how likely they are to run after the ball in the field. Hard mode appears to affect this stat in some way, but if you ever see players running away from the ball for whatever reason it means they have a low aggression stat.
* **Handedness.** A categorical variable determining their handedness. (1 = right handed batter and thrower. 2 = left handed batter and thrower. 6 = bats right, throws left. 9 = bats left, throws right. 13 = switch hitter, throws right)
	+ No players in the game are switch hitters who throw left handed, which is a value of 3. This is not programmed to work properly and always results in them acting as if they're right handed.
* **Heat.** High stats will result in extremely fast throws.
* **Slowball.** High stats typically have extremely slow pitches.
* **Left Hook.** High stats typically have much wider curves.
* **Right Hook.** High stats typically have much wider curves.
* **Corkscrew.**
* **Zig-Zag**
* **Big Freeze**
* **Fireball**
* **Spitball**
* **Crazyball**
* **Slo-Mo**
* **Elevator.** Each of the previous 12 attributes control how accurate that pitch is for that player. The accuracy decreases as stamina decreases.
* **Batting Stance.** Determines what stance they start out in. 1 = open. 2 = squared. 3 = closed.
* **Height.** On a scale of 1-5, 1 being shortest and 5 being tallest. Taller players have more range both horizontally and vertically, allowing them to grab the ball more easily. This creates the general conception that having taller players makes them more useful as fielders, as they are harder to hit with the ball. With Errors Off, everyone's horizontal range is increased to that of 5 Height players.
* **Gender.** 1 = girl. 2 = boy.
* **Birthday Month.** The value is indexed: 0 = January, ..., 11 = December
* **Birthday Day.** A mere integer: 1 = 1, and so on.
* **Tiredness.** Affects how tired the player has gotten throughout the game. This correlates to the stamina stat. Starts at 0, caps at 100. This stat is technically what makes other stats worse over the game, like speed or throwing.
* **Good/Bad Day Background.** Affects the background of the player if they're having a good or bad day. This is purely cosmetic.
* Pairs 34-36 are currently unknown. It's entirely possible they do nothing.
* **Nickname.** Will be a value from 1-8 for custom players, but may be different for Backyard and Pro kids with specific nicknames, and for generic players who have no nicknames.

## External Link

The full list of attributes for all players in Backyard Baseball 2003 can be found here.