SM5 has two systems for calculating the number of calories burned during a song.

The first system simply uses the weight of the player and adds a small amount for every step.  This does not require any specific support from the theme and is the default for new profiles.


The second system uses age, gender, weight, heart rate, and song duration to calculate the amount used during a song.  This requires a theme to support it, and the relevant parts of Editable.ini to be set for the profile.

Editable.ini fields:
The default theme provides a profile editing screen for setting these fields in Stepmania without needing to edit Editable.ini by hand.
BirthYear, -- defaults to 1995
IgnoreStepCountCalories, -- Must be set to 1 to use the second system.
IsMale, -- Defaults to 1.  Set to 0 for females.
Voomax, -- VO2max.  Optional.  Calorie calculation is more accurate if it is set, but it is not necessary.  0 means unset.  http://www.shapesense.com/fitness-exercise/calculators/vo2max-calculator.aspx is a site for estimating V02max, and the source of the equations used.
WeightPounds -- Weight in pounds.

Lua API functions:  (names only, details are in Docs/Luadoc/Lua.xml)
GetWeightPounds()
SetWeightPounds()
GetVoomax()
SetVoomax()
GetAge()
GetBirthYear()
SetBirthYear()
GetIgnoreStepCountCalories()
SetIgnoreStepCountCalories()
GetIsMale()
SetIsMale()
AddCaloriesToDailyTotal()
CalculateCaloriesFromHeartRate()

Intended usage:
A theme that supports heart rate calorie calculation should take the following steps:
1.  Create ScreenHeartEntry as described in Themerdocs/Examples/Example_Screens/ScreenHeartEntry.lua.  _fallback's branching logic will take care of checking whether the screen should be used.

Side notes:
CalculateCaloriesFromHeartRate and AddCaloriesToDailyTotal are separate functions so that a theme can display or use the calorie amount in other ways easily.
If IgnoreStepCountCalories is true for a profile, but the theme in use does not provide support using the steps listed above, that profile will not accumulate calories.
Note that calories will not accumulate during gameplay for a profile that has IgnoreStepCountCalories set to true.  PlayerStageStats:GetCaloriesBurned() will also return 0 for that player.  You'll have to store the value returned by CalculateCaloriesFromHeartRate in a global variable if you want to display it later on ScreenEvaluation.
