Looks fine.
I would not use a constant number of achievements though.
Who knows how many we might get in the future.
Maybe something like this (untested)?
Lua Code:
local function ExportTitle(achievementId)
-- your export code here
end
for topLevelIndex=1, GetNumAchievementCategories() do
local _, numSubCategories, numAchievements = GetAchievementCategoryInfo(topLevelIndex)
for achievementIndex=1, numAchievements do
local achievementId = GetAchievementId(topLevelIndex, nil, achievementIndex)
ExportTitle(achievementId)
end
for subCategoryIndex=1, numSubCategories do
local _, numAchievements = GetAchievementSubCategoryInfo(topLevelIndex, subCategoryIndex)
for achievementIndex=1, numAchievements do
local achievementId = GetAchievementId(topLevelIndex, categoryIndex, achievementIndex)
ExportTitle(achievementId)
end
end
end