# IdleKit Changelog

## Version 3.1 2022-11-16
* *BUGFIX* Adding AddressableKey to `GeneratorEntityData` instead of `GeneratorData`.

## Version 3.0 2022-09-09
* *CHANGE* Broad changes to implement Nakama as a Backend solution.
* *CHANGE* `BeamableSerializer` replaced by `NakamaSerializer`
* *CHANGE* `Beamable.cs` replaced by `Nakama.cs`
* *CHANGE* Update Unity to 2021.3.9f1
* *CHANGE* Disabled LeaderboardService for now.
* *CHANGE* Changed the way Addressables are loaded, deprecated `AddressableAssetCache`.


## Version 2.1.2 2022-07-20
* *BUGFIX* Fix colors on debug messages
* *BUGFIX* Connection display now displaying "No Connection" message.
* *CHANGE* Added a try catch block for parsing serialized data in `BeamableSerializer`
* *CHANGE* Added local cache for `BeamableSerializer`
* *BUGFIX* Generators info button now interactable
* *BUGFIX* SessionBegin event now firing only once between sessions
* *CHANGE* `StoreRewards` now able to hold multiple `RewardsId` to account for Promos with multiple items.
* *BUGFIX* `NullReferenceException` fixed when entering in events after ascending to new stage.
* *CHANGE* Added IdleKit repository as part of ESG's NPM package registry, as well as other packages.
* *CHANGE* Multiple minor bugfixes on Kraang Events and Beamable serialization.

## Version 2.1.1 2022-05-04
* *CHANGE* Changed `MilestoneClaimableAction` to `MilestoneClaimableStateAction`. Now all calls to this action requires the `Milestone` entity. 
* *CHANGE* Improvements to the `IPayoutEntity` interface to be able to pay out more than just currencies.
* *CHANGE* Improvements to decrease strain on the backend, generator saved data is not sent with every automated generator collection.
* *BUFIX* Fixes related to load phases being unable to complete if Beamable hasn't loaded.
* *BUGFIX* Deserializing in beamable will only return true when returning valid save data.
* *FEATURE* A user description string has been added to the `IProgressable` interface which can be used to display information about what is currently happening in load phases. 
## Version 2.1 2022-03-16
* *BUGFIX* Fixes issue saving analytics events to json. 
* *CHANGE* Kraang Analytics package has been split into its own package, and is now pulled in as a dependency of IdleKit.
* *CHANGE* Kraang Analytics classes have been refactored to be less dependent on IdleKit.
* *CHANGE* Story Sequence Tool has been split into its own pacakge, and is now pulled in as a dependency of IdleKit.
* *BUGFIX* Fixed a bug where random rewards for sometimes unevenly weighted to omit the lowest and the highest values in the rewards list.
* *CHANGE* Refactored the `ActivityTrackingService` to make use of the `ProjectionService` instead of using its own logic for calculations. This change also
introduced a new `OfflineProgressAction` which replaced the previous `OfflineProgressActionStart` and `OfflineProgressActionEnd`.
* *CHANGE* The `Startup` class now has 2 separate methods for switching to main game content and to event content: `SwitchToMainGame` and `SwitchToEvent`. Both methods have clearer signatures.
* *FEATURE* Added `CheckVersionLoadPhase` as well as `VersionMismatchAction` and `VersionService`  for reacting to client's version mismatch. The data about current client version is stored inside of the `VersionData` class.
* *CHANGE* `UserSavedData` now has a clear separation between `ContentId` and `EventSettingsId`.
* *BUGFIX* A bunch of bugfixes for the Story Sequence Tool.
* *CHANGE* Added an `IsForceShowed` property to the `IPromoSavedData` so the promo system can now tell whether a force shown promo has already been shown to the player.

## Version 2.1 2022-03-16
* *BUGFIX* Fixes issue saving analytics events to json. 
* *CHANGE* Kraang Analytics package has been split into its own package, and is now pulled in as a dependency of IdleKit.
* *CHANGE* Kraang Analytics classes have been refactored to be less dependent on IdleKit.
* *CHANGE* Story Sequence Tool has been split into its own pacakge, and is now pulled in as a dependency of IdleKit.
* *BUGFIX* Fixed a bug where random rewards for sometimes unevenly weighted to omit the lowest and the highest values in the rewards list.
* *CHANGE* Refactored the `ActivityTrackingService` to make use of the `ProjectionService` instead of using its own logic for calculations. This change also
introduced a new `OfflineProgressAction` which replaced the previous `OfflineProgressActionStart` and `OfflineProgressActionEnd`.
* *CHANGE* The `Startup` class now has 2 separate methods for switching to main game content and to event content: `SwitchToMainGame` and `SwitchToEvent`. Both methods have clearer signatures.
* *FEATURE* Added `CheckVersionLoadPhase` as well as `VersionMismatchAction` and `VersionService`  for reacting to client's version mismatch. The data about current client version is stored inside of the `VersionData` class.
* *CHANGE* `UserSavedData` now has a clear separation between `ContentId` and `EventSettingsId`.
* *BUGFIX* A bunch of bugfixes for the Story Sequence Tool.
* *CHANGE* Added an `IsForceShowed` property to the `IPromoSavedData` so the promo system can now tell whether a force shown promo has already been shown to the player.

## Version 2.0.0 2021-12-13
* *FEATURE* Beamable backend framework has been integrated into IdleKit to handle saving player data.
* List of features added to IdleKit since 1.4.1:
* App Review Request Service
    * Handles opening the app review native dialogue for ios/android
* Avatar Service for Manager Avatars
    * Handles retrieving avatars available to the player, unlocking new avatars
* Beamable Backend
    * Game server for syncing player/game state to the cloud
* Data Pipeline
    * Designer-friendly game data management
* Gacha Odds Calculation Service
    * Generates odds for gacha rewards in game
* IAP Purchase Service with Receipt Validation
    * Real money purchases integrated with backend validation
* Kraang Analytics V2
    * Updated standard game analytic events within IdleKit
* Leaderboard Service with Rewards
    * Handles event and main game leaderboards and gives out rewards based on leaderboard rankings and points
* Localization Service
    * Localization service for accessing translation dictionaries for multiple languages
* Local Notification Service
    * Show local notifications on device at a specific time in the future
* Navigation Service for Android Inputs
    * Android back button navigation mapping with view layering
* Network Connection Status Service
    * Service which detects when the game loses connection to the backend servers
* New events structure based on phases
    * Introduces an announcement phase and a main phase to alert players about upcoming events
* Plot Points deprecated in place of the Story Sequence Tool
    * Replaced by the new narrative engine for authoring story moments - Story Sequence Tool
* Presentation Service
    * A service for queueing several visual elements in the game one after the other
* Promos with Timed Durations and Triggers
    * Provide promos to the player for in-app purchases which can be triggered based on a varity of rules
* Single Unified Repository
    * Idlekit repositories have been consolidated into easy to manage repository
* Story Sequence Tool Integration
    * Story Sequence tool is now integrated into IdleKit for narrative moments.
* User Stats Service for saving simple player data remotely
    * Simple player data can be stored in the server and used between sessions
* Views Service
    * Optional service for controlling the lifecycle of UI views in IdleKit
* Activity Tracking Service
    * Automatically detect and account for a player’s break from the game.

* *CHANGE* Added `RankRewardsSpritePath` property into `EventSettingsData` for adding unique sprites for event rewards on rewarded leadeboards.
* *CHANGE* `Promo` now inherits from `StoreReward` so it can be bought by in-game currency.
* *FEATURE* Added `PromoPurchasedStateAction` for saving `PromoSaveData` when a promo is purchased.
* *FEATURE* Rename CurrencyUnlockReward to CurrencyAvailableReward

## Version L.5.1 2021-11-12
* *FEATURE* Updates to `Beamable 0.17.1`
* *FEATURE* Added support for receipt validation for iOS
* *FEATURE* Added support for Generic In App Purchases
* *FEATURE* Added `beamableConnect_error` Kraang event which fires whenever the app loses connection to Beamable servers throughout gameplay.
* *BUGFIX* Advance stage action serialization fixed.
* *BUGFIX* Event key missing from dictionary causes crash.
* *BUGFIX* Fixed a warning which would appear when Beamable-only class would not be cast to an IdleKit type.
* *BUGFIX* Change All Instance of Actions Being Applied but not Dispatched

## Version L.5.0 2021-10-25
* *FEATURE* Added `EventLeaderboardsService` for setting and retrieving leaderboard score in events. By default the score is tied to the currency specified in the new `_leaderboardCurrencyId` field in `EventSettingsData`.
* *FEATURE* Added `LeaderboardsService` for setting and retrieving leaderboard score. By default the score is tied to the currency specified in the new `_leaderboardCurrencyId` field in `StandardContentData`. The leaderboard id used for the main game content is defined in the `_leaderboardId` field in `StandardContentData`.
* *FEATURE* Added `EventLeaderboardsService` for setting and retrieving leaderboard score in events. By default the score is tied to the currency specified in the new `_leaderboardCurrencyId` field in `StandardEventContentData`. The leaderboard id used for the event content is automatically generated and linked in the backend, so the `_leaderboardId` field in the `StandardEventContentData` is unused.
* *FEATURE* Leaderboards username selection.
* *FEATURE* Promos now support duration function, which is a new field that defines how long a promo will be active after being activated.
* *FEATURE* Story Sequence tool integration added
* *FEATURE* Plot Point system integration deprecated - to be fully removed in 2.0
* *BUGFIX* Fixed bug in converting double to string at FormatData in KraangEvents

## Version L.4.0, 2021-08-09
* *FEATURE* Added `AvatarService` for managing avatars available to the player. With this feature also come `AvatarsCollection` and `AvatarsUnlockReward`.
* *FEATURE* Kraang spec V2 has been implemented. The spec can be found here: https://docs.google.com/spreadsheets/d/1LuYnpHMyenBh6xReK8pR6clD8Poo7wRdCaq5cV5Cjfs/edit#gid=0

For changes made in previous versions of IdleKit please refer to `CHANGELOG.md` files inside each of the folders in the package.
