Add achievement icons and setup achievement config file. Add in unlock area achievements.

Release Build 8524.
pull/57/head
sigonasr2 10 months ago
parent 3256a686a3
commit 68e4934355
  1. 1
      Adventures in Lestoria/Adventures in Lestoria.vcxproj
  2. 3
      Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
  3. 7
      Adventures in Lestoria/AdventuresInLestoria.cpp
  4. 29
      Adventures in Lestoria/TODO.txt
  5. 14
      Adventures in Lestoria/Unlock.cpp
  6. 2
      Adventures in Lestoria/Version.h
  7. BIN
      Adventures in Lestoria/assets/Achievements/BronzeBorder.xcf
  8. BIN
      Adventures in Lestoria/assets/Achievements/armor_10.png
  9. BIN
      Adventures in Lestoria/assets/Achievements/armor_10_locked.png
  10. BIN
      Adventures in Lestoria/assets/Achievements/armor_5.png
  11. BIN
      Adventures in Lestoria/assets/Achievements/armor_5_locked.png
  12. BIN
      Adventures in Lestoria/assets/Achievements/blacksmith_unlock.png
  13. BIN
      Adventures in Lestoria/assets/Achievements/blacksmith_unlock_locked.png
  14. BIN
      Adventures in Lestoria/assets/Achievements/camp_unlock.png
  15. BIN
      Adventures in Lestoria/assets/Achievements/camp_unlock_locked.png
  16. BIN
      Adventures in Lestoria/assets/Achievements/chapter1_complete.png
  17. BIN
      Adventures in Lestoria/assets/Achievements/chapter1_complete_locked.png
  18. BIN
      Adventures in Lestoria/assets/Achievements/fully_decked_out.png
  19. BIN
      Adventures in Lestoria/assets/Achievements/fully_decked_out_locked.png
  20. BIN
      Adventures in Lestoria/assets/Achievements/ranger_level5.png
  21. BIN
      Adventures in Lestoria/assets/Achievements/ranger_level5_locked.png
  22. BIN
      Adventures in Lestoria/assets/Achievements/slime_king.png
  23. BIN
      Adventures in Lestoria/assets/Achievements/slime_king_destroyer.png
  24. BIN
      Adventures in Lestoria/assets/Achievements/slime_king_destroyer_locked.png
  25. BIN
      Adventures in Lestoria/assets/Achievements/slime_king_locked.png
  26. BIN
      Adventures in Lestoria/assets/Achievements/ursule_destroyer_unlock.png
  27. BIN
      Adventures in Lestoria/assets/Achievements/ursule_destroyer_unlock_locked.png
  28. BIN
      Adventures in Lestoria/assets/Achievements/ursule_unlock.png
  29. BIN
      Adventures in Lestoria/assets/Achievements/ursule_unlock_locked.png
  30. BIN
      Adventures in Lestoria/assets/Achievements/warrior_level5.png
  31. BIN
      Adventures in Lestoria/assets/Achievements/warrior_level5_locked.png
  32. BIN
      Adventures in Lestoria/assets/Achievements/weapon_5.png
  33. BIN
      Adventures in Lestoria/assets/Achievements/weapon_5_locked.png
  34. BIN
      Adventures in Lestoria/assets/Achievements/wizard_level5.png
  35. BIN
      Adventures in Lestoria/assets/Achievements/wizard_level5_locked.png
  36. 98
      Adventures in Lestoria/assets/config/Achievements.txt
  37. 3
      Adventures in Lestoria/assets/config/configuration.txt
  38. 43
      Adventures in Lestoria/assets/config/items/Equipment.txt
  39. 10
      Adventures in Lestoria/olcPixelGameEngine.h
  40. 4
      Adventures in Lestoria/util.cpp
  41. BIN
      x64/Release/Adventures in Lestoria.exe

@ -856,6 +856,7 @@
<None Include="steam\steam_api.json" />
</ItemGroup>
<ItemGroup>
<Text Include="assets\config\Achievements.txt" />
<Text Include="assets\config\audio\audio.txt" />
<Text Include="assets\config\audio\bgm.txt" />
<Text Include="assets\config\audio\environmentalaudio.txt" />

@ -1160,6 +1160,9 @@
<Text Include="assets\config\credits.txt">
<Filter>Configurations</Filter>
</Text>
<Text Include="assets\config\Achievements.txt">
<Filter>Configurations</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<Image Include="assets\heart.ico">

@ -232,6 +232,9 @@ AiL::AiL()
std::string CREDITS_CONFIG = CONFIG_PATH + "credits_config"_S;
utils::datafile::Read(DATA,CREDITS_CONFIG);
std::string ACHIEVEMENT_CONFIG = CONFIG_PATH + "achievement_config"_S;
utils::datafile::Read(DATA,ACHIEVEMENT_CONFIG);
utils::datafile::DEBUG_ACCESS_OPTIONS="debug_access_options"_I;
sAppName = "GAME_NAME"_S;
@ -2461,6 +2464,7 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){
});
LoadingScreen::AddPhase([&](){
if(SteamUserStats())SteamUserStats()->StoreStats();
ClearGarbage();
return true;
});
@ -2693,6 +2697,9 @@ bool Steam_Init(){
LOG(std::format("STEAM[{}]: {}",severity,std::string(message)));
});
}
if(SteamUserStats()){
SteamUserStats()->RequestCurrentStats();
}
return true;
}
#endif

@ -22,9 +22,10 @@ Ursule, Mother of Bears Destroyer (<1 Minute Kill)
Tough as Steel - Obtain Level 5 on Warrior
Skilled Marksman - Obtain Level 5 on Ranger
Controller of Elements - Obtain Level 5 on Wizard
Maxed out a Weapon in Chapter 1
Maxed out an Armor piece in Chapter 1
Wear a full set of maxed out gear
+5 a Weapon
+5 an Armor piece
+10 an Armor piece
Fully Decked out - Wear a full set of maxed out gear
Beat the Devs - Obtained a Time Medal
Speedrunner - Obtained 11 Time Medals
@ -32,6 +33,28 @@ SetAchievement
File Hash on Save/Load.
Movement still possible when alt-tabbing
KILL_SLIME_1
KILL_SLIME_2
KILL_SLIME_3
CAMP_UNLOCK
BLACKSMITH_UNLOCK
CHAPTER1_COMPLETE
SLIME_KING
SLIME_KING_DESTROYER
URSULE
URSULE_DESTROYER
WARRIOR_LV5
RANGER_LV5
WIZARD_LV5
WEAPON_LV5
ARMOR_LV5
ARMOR_LV10
FULLY_DECKED_OUT
Include a Reset Achievements button in Settings
============================================
Make another actions config file for the main build (The app # is different)

@ -38,6 +38,13 @@ All rights reserved.
#include "Unlock.h"
#include "State_OverworldMap.h"
#include "config.h"
#include "olcUTIL_DataFile.h"
#include "DEFINES.h"
#ifndef __EMSCRIPTEN__
#include <isteamuserstats.h>
#endif
INCLUDE_DATA
std::set<std::string>Unlock::unlocks;
@ -48,6 +55,13 @@ void Unlock::Initialize(){
void Unlock::UnlockArea(std::string mapName){
if(mapName=="NPCs.Sherman.Potion Crafting Unlock Condition"_S&& //When we beat the bonus chapter 1 fight, before sherman's potion crafting is unlocked, if the current map we just unlocked for is the bonus boss stage we will notify the Hub connection point and reset it so the player has a notification to go there again.
!Unlock::IsUnlocked("NPCs.Sherman.Potion Crafting Unlock Condition"_S))State_OverworldMap::ConnectionPointFromString("HUB").value()->ResetVisitedFlag();
if(SteamUserStats()){
datafile&areaUnlocks=DATA.GetProperty("Achievement.Area Unlocks");
for(auto&[key,size]:areaUnlocks){
datafile&unlock = areaUnlocks[key];
if(mapName==unlock["Unlock Name"].GetString())SteamUserStats()->SetAchievement(unlock["API Name"].GetString().c_str());
}
}
unlocks.insert(mapName);
}
bool Unlock::IsUnlocked(std::string mapName){

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_BUILD 8515
#define VERSION_BUILD 8524
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

@ -0,0 +1,98 @@
Achievement
{
Area Unlocks
{
# Area Unlocks are automatically checked when a new map unlock is achieved.
Camp Unlock
{
API Name = "CAMP_UNLOCK"
Unlock Name = "STORY_1_1"
}
Blacksmith Unlock
{
API Name = "BLACKSMITH_UNLOCK"
Unlock Name = "STORY_1_2"
}
Chapter 2 Unlock
{
API Name = "CHAPTER1_COMPLETE"
Unlock Name = "STORY_1_3"
}
}
Kill Unlocks
{
Kill Monsters 1
{
API Name = "KILL_SLIME_1"
Monster Kill Count = 100
}
Kill Monsters 2
{
API Name = "KILL_SLIME_2"
Monster Kill Count = 250
}
Kill Monsters 3
{
API Name = "KILL_SLIME_3"
Monster Kill Count = 1000
}
Slime King
{
API Name = "SLIME_KING"
}
Slime King Destroyer
{
API Name = "SLIME_KING_DESTROYER"
Time Limit = 60s
}
Ursule
{
API Name = "URSULE"
}
Ursule Destroyer
{
API Name = "URSULE_DESTROYER"
Time Limit = 60s
}
}
Class Unlocks
{
Warrior Lv5
{
API Name = "WARRIOR_LV5"
Level Requirement = 5
}
Ranger Lv5
{
API Name = "RANGER_LV5"
Level Requirement = 5
}
Wizard Lv5
{
API Name = "WIZARD_LV5"
Level Requirement = 5
}
}
Equip Unlocks
{
Weapon Lv5
{
API Name = "WEAPON_LV5"
Upgrade Requirement = 5
}
Armor Lv5
{
API Name = "ARMOR_LV5"
Upgrade Requirement = 5
}
Armor Lv10
{
API Name = "ARMOR_LV10"
Upgrade Requirement = 10
}
Fully Decked Out
{
API Name = "FULLY_DECKED_OUT"
}
}
}

@ -28,6 +28,9 @@ player_config = Player.txt
# Monster Properties Loading Config
monsters_config = Monsters.txt
# Achievement Config
achievement_config = Achievements.txt
# NPC Loading Config
npc_config = NPCs.txt

@ -151,99 +151,78 @@ Equipment
{
# When this crafting recipe is available.
AvailableChapter = 1
Item[0] = Green Slime Remains,5
Gold = 5
Gold = 1
Level[1]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Green Slime Remains,7
Gold = 12
Gold = 1
}
Level[2]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[1] = Red Slime Remains,1
Item[2] = Blue Slime Remains,1
Gold = 18
Gold = 1
}
Level[3]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Red Slime Remains,3
Item[1] = Green Slime Remains,6
Gold = 24
Gold = 1
}
Level[4]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Blue Slime Remains,3
Item[1] = Green Slime Remains,7
Gold = 32
Gold = 1
}
Level[5]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[1] = Red Slime Remains,4
Gold = 40
Gold = 1
}
Level[6]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Yellow Slime Remains,1
Item[1] = Red Slime Remains,6
Gold = 50
Gold = 1
}
Level[7]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[1] = Yellow Slime Remains,2
Gold = 65
Gold = 1
}
Level[8]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Red Slime Remains,8
Item[1] = Green Slime Remains,4
Gold = 80
Gold = 1
}
Level[9]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Wolf Skin,2
Item[1] = Yellow Slime Remains,3
Gold = 100
Gold = 1
}
Level[10]
{
# When this enhancement is available.
AvailableChapter = 1
Item[0] = Green Gemstone,1
Item[1] = Wolf Skin,1
Gold = 150
Gold = 1
}
}
}

@ -4690,7 +4690,15 @@ namespace olc
{ bHasMouseFocus = state; }
void PixelGameEngine::olc_UpdateKeyFocus(bool state)
{ bHasInputFocus = state; }
{
if(!state){
for (uint32_t i = 0; i < 256; i++)
{
olc_UpdateKeyState(i,false);
}
}
bHasInputFocus = state;
}
void PixelGameEngine::olc_DropFiles(int32_t x, int32_t y, const std::vector<std::string>& vFiles)
{

@ -148,7 +148,10 @@ std::u32string util::WrapText(PixelGameEngine*pge,std::u32string str,int width,F
return newStr;
}
#pragma region std::string util::GetHash(std::string fileName) //DO NOT MODIFY!
std::string util::GetHash(std::string fileName){
//WARNING! This function is used to save/load files! This means if we ever modify this function all previous save files
//will no longer work! IN OTHER WORDS: DO NOT MODIFY THIS FUNCTION!
std::ifstream file(fileName);
std::string hash="";
uint8_t hashIndex=0;
@ -172,6 +175,7 @@ std::string util::GetHash(std::string fileName){
}
return hash;
}
#pragma endregion
long double operator""_Pixels(long double unitDist){
return unitDist/100*24.;

Loading…
Cancel
Save