Plugin Override
All formids in conditions usually refer (and are checked against) to the plugin defined in the root structure, however, there is a way to override the plugin per-condition. As example, say that actor 01A67B is in "MyPlugin.esp", you can simply use:"conditions": [
{
"type": "ActorDeath",
"formID": "01A67C",
"pluginOverride": "MyPlugin.esp"
}
],
Working with localizations
If you want to localize your achievements, you can put your localizations in [code single]Data/AchievementsData/Localizations[/code].
The localization must have the same name of your JSON file and also contain the first two letters of the language to localize, so for [code single]SkyrimSE.json[/code], my english localization will be [code single]SkyrimSE_EN.txt[/code].
Localization files are text files that contain a key/value pair for each line, where the key starts with a $ sign, and the separator between key and value is a tab, so as example:$Unbound Name Unbound
$Unbound Desc Complete "Unbound"
$Bleak Name Bleak Falls Barrow
$Bleak Desc Complete "Bleak Falls Barrow"
is a proper localization for the first two skyrim achievements.
In your JSON file you can call localization by simply inserting $key inside strings. Note that while name and description are always localized, the conditions properties are only localized in those context where they are supposed to be localized.
As example there is no reason for formids to support localization, however if a condition depends on a specific location NAME that can therefore change based on the language, that property supports localization, and while it's not necessary for you to localize it, it would probably be best practice to do so. Examples of such conditions are BaseActorDeath, LocationDiscovery and BookRead, that depend respectively on the name of the base actor, the name of the location and the name of the book.
Hidden descriptions
Most of the achievement platforms support one way or another to hide the description of your achievement until unlocked. I've implemented the same in achievement injector. All you have to do is add:"hideDescription": true
to the structure of your achievement. The users will be able to see the description, if they choose to do so by enabling "Show Hidden Achievements" in the MCM menu.
Example:{
"achievementName": "The last one standing",
"description": "Defeat all members of the Sinister Seven",
"hideDescription": true,
"conditions": [
{
"type": "QuestStageDone",
"formID": "0130D4",
"stage": 20
}
]
}
Custom rewards
It's possible to setup custom rewards for unlocked achievements. Adding these structures to [code single]onUnlock[/code].{
"type": "command", // Run a command on unlock
"command": "coc qasmoke" // Command to run
},
{
"type": "papyrus", // Run a function inside a papyrus script on unlock (doesn't work yet)
"script": "scriptname", // Name of the script
"function": "function_name" // Name of the function
}
This structure can be assigned both inside an achievement, in case you want this to run when an achievement is unlocked, or inside a condition, if you want this to trigger when that specific condition is unlocked.
Icons
It's possible to define your own icons for your achievement groups. To do so, place a .dds file with a size of 512x512 (px) and the same name as your json file as shown in the folder structure. The compression should be at most BC3. If your icon isn't displayed make sure you're using at most BC3. BC5 and BC7 are currently not supported.
This is recommended to make your groups appear more unique to the end user, however, the framework will use a default icon in case one isn't found.
0 comments