tModLoader

tModLoader

1,246 vurderinger
Achievement Mod
5
3
10
4
6
2
2
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Mod Side: Client
tModLoader Version: 1.4.3, 1.4.4
Filstørrelse:
Offentliggjort:
Opdateret:
111.774 KB
2. feb. 2023 kl. 17:21
25. maj 2023 kl. 10:36
8 ændringsbemærkninger ( vis )

Abonner for at downloade
Achievement Mod

Beskrivelse
Note: This mod was made back when achievements didn't work for tModLoader, but that has since been fixed and the mod is no longer required to earn achievements in tModLoader.

Allows you to unlock achievements like in vanilla and allows other mods to add achievements.
Contains configuration options like having separate achievements for each player.
Adds the /achievement command which you can use to give/take/reset achievements.
Usage:
/achievement clear
/achievement grant [achievement name]
/achievement revoke [achievement name]

You can also type /achievement unlockvanilla to unlock all vanilla achievements.

Your achievements are saved to a json file which can be found in a folder called AchievementData.
The folder is found in the same place that your player and world folders are located.

For Developers:

If you are a developer and want to add an achievement use Mod.Call in PostSetupContent

Mod.Call("AddAchievement", this (reference to your mod),
Name of your achievement (string, don't put spaces),
Achievement Category (Terraria.Achievements.AchievementCategory),
Texture path (string, the texture should be 128x64, it will contain the unlocked and locked sprite of the achievement),
Custom border texture path (string, can be null, if you add a texture it should be 72x72),
Show progress bar (bool), Show achievement card (bool), Achievement card order (float), Conditions (string array))

Example:

if (ModLoader.TryGetMod("TMLAchievements", out Mod mod))
mod.Call("AddAchievement", this, "AchievementName", AchievementCategory.Collector, "YourMod/Assets/Textures/Achievement", null, false, false, 2.5f, new string[] { "Collect_" + ItemID.RodofDiscord });

This will create an achievement which you unlock by collecting a Rod of Discord

Setting show progress bar to true will show how many conditions are completed.

Achievement card order is the order of your achievement if you set show achievement card to true
The achievement Timber!! has an order of 1, while Champion of Terraria (Defeat the moon lord) has an order of 36
Setting the order will allow you put the achievement in the correct place in terms of progression.

How to add conditons:
To add a condition you simply add a string in the conditions array.
If you want to add a item condition add the string "Collect_" + the item id. Example: "Collect_" + ItemID.RodofDiscord
If you want to add a craft item condition add the string "Craft_" + the item id. Example: "Craft_" + ItemID.OnyxBlaster
If you want to add a mine tile condition add the string "Mine_" + the tile id. Example: "Mine_" + TileID.GrayBrick
If you want to add a kill npc condition add the string "Kill_" + the npc id. Example: "Kill_" + NPCID.Mimic

If you want a custom condition do "Event_ExampleEvent". Use Mod.Call("Event", "ExampleEvent"); to complete the condition.

If you want a custom value condition do "ValueEvent_ExampleValue_100". If the value reaches 100 the condition is completed. Use Mod.Call("ValueEvent", "ExampleValue", 1f); change the value by 1

Complete Example:
new string[] { "Collect_" + ItemID.AbigailsFlower, "Craft_" + ItemID.GoldenDelight, "Kill_" + NPCID.PurpleSlime }

To complete the achievement with those conditions you will need to collect abigails flower, craft a golden delight, and kill a purple slime.

Finally you will need to add an entry in the localization file of your mod for your achievement name and description.

You can type /achievement debuglist if you want the names of all achievements (including modded ones). Typing the command will print the names of all achievements to your client.log file.

You can modify this to create a texture for your achievement.

https://i.imgur.com/sO6F6Mg.png
Oprindeligt skrevet af tModLoader:
Developed By metalkingpig
130 kommentarer
DookieDoingle 23. juli kl. 22:44 
Works great! :D
Pistondamp 21. maj kl. 5:34 
I really wanted to try adding my own custom achievements — first for simple vanilla content (like picking up dirt), and later for Calamity-related goals. I followed the instructions and made my own PNGs for the locked and unlocked icons, but nothing ever showed up in-game.

I thought this could be done by editing the TMLAchievements_Config.json file, but now I think I misunderstood — it looks like it only works via Mod.Call in C# if you're making your own mod? (English isn’t my main language, so maybe I missed something obvious.)

If that’s the case, I’d really appreciate it if you could clarify that in the description — or even better, make a short video showing how to set up a working custom achievement with Mod.Call and texture placement.

Also, when I change the config file, it gets wiped when launching the game, which added to the confusion, hehe..
SakuraFallmoon 15. maj kl. 5:08 
What a retarded mod, I lost most of my in-game achievements and no extra achievements of other mods. This is useless and dumb. :steamthumbsdown:
Yusuf 2. maj kl. 7:30 
blamderx you press T in-game and it opens the chat bar
blamderx 2. maj kl. 4:07 
This mod still works for me. Here is the solution:
1. add this mod and another mod "Steam Achievement Fix"
2. launch the game, and enable the mods
3. you will find a diractory TerrariatModLoaderAchievementData with achievement data in json
4. open the data file achievements.json, replace all "false" into "true"
5. restart the game, now all the achievements have been unlocked
6. quit the game, and Steam Achievement Fix will sync these achievements to original game

Anyway, I still don't know where to type these commands. Funny, right?
CharisardTT 28. mar. kl. 15:59 
Does this work?
Poobear 10. mar. kl. 17:40 
DO NOT SUBSCRIBE TO THIS (THIS IS WARNING)
CrazyTren 7. mar. kl. 14:58 
that's a you problem also don't cheat in your vanilla world
Gandonas 7. mar. kl. 3:07 
Worst mod ever, resetted my whole vanilla game map and made so that i gained all the achievements in steam. Horrible, don't downlaod
eoinhoward3210 11. feb. kl. 23:21 
TMLAchievement
Hate/Unlike: v1.1