Upgrade Notes
Version 2.1.0, 2022-03-16
- Please check the CHANGELOG file for further notes on what's changed in this release.
Version 2.0.0, 2021-12-13
Version 1.4.1 to 2.0.0
- Please contact the IdleKit support team, as this upgrade is much more involved than can be explained in this document.
Version L.5.X to 2.0.0
- The upgrade should be simple as there are minimal code changes between those version.
Version 1.4.0 to 1.4.1, 2021-01-13
- No special steps required
Version 1.3.0 to 1.4.0, 2020-10-16
idlekit-framework
Base Collector
IBaseCollectorBalanceData.basePayouthas been changed tobasePayoutAmountdue to the introduction ofIPayoutEntity.IBaseCollectorBalanceData.payoutCurrencyIdhas been changed topayoutEntityIddue to the introduction ofIPayoutEntity.IBaseCollectorEntity.payouthas been renamed toIBaseCollectorEntity.payoutAmountdue to the rename ofIBaseCollectorBalanceData.payoutCurrencyId.IBaseCollectorEntity.GetPayout(bool, IModifier[])has been renamed toIBaseCollectorEntity.GetPayoutAmount(bool, IModifier[])due to the rename ofIBaseCollectorBalanceData.payoutCurrencyId.
Generator
IGeneratorEntity.payoutCurrencyPerMillisecondhas been changed toIGeneratorEntity.payoutAmountPerMilliseconddue to the introduction ofIPayoutEntity.
Random
IRandomService.InitializeRandomhas been deprecated useInitializeRandom(int)withint GetRandomSeed()to obtain a random seed.
Reward
IReward.CalculateRewards(int)has been changed toIPayoutEntity.CalculatePayouts()since nowIRewardsimplementsIPayoutEntity.- User should set the seed using the
IRandomService.InitializeRandom(int)first before callingCalculatePayout().
idlekit-implementation
State Action
GrantRewardStateAction.rewardResultshas been renamed toGrantPayoutsStateAction.payoutResultsdue to the introduction ofIPayoutEntity.
Version 1.2.0 to 1.3.0, 2020-08-31
idlekit-logging
- N/A
idlekit-ioc
- N/A
idlekit-framework
Economy Service
IEconomyService.GetPayout(IBaseCollectorEntity baseCollectorEntity)has been deprecated, useIBaseCollectorEntity.GetPayout()instead.IEconomyService.GetPayout(IBaseCollectorEntity baseCollectorEntity, bool applyModifiers, IModifier[] excludedModifiers = null)has been deprecated, useIBaseCollectorEntity.GetPayout(bool applyModifiers, IModifier[] excludedModifiers = null)instead.IEconomyService.GetDuration(IBaseCollectorEntity baseCollectorEntity)has been deprecated, useIBaseCollectorEntity.GetDuration()instead.IEconomyService.GetDuration(IBaseCollectorEntity baseCollectorEntity, bool applyModifiers, IModifier[] excludedModifiers = null)has been deprecated, useIBaseCollectorEntity.GetDuration(bool applyModifiers, IModifier[] excludedModifiers = null)instead.IEconomyService.GetAffordableUnitsToNextTarget(IGeneratorEntity generatorEntity, bool applyModifiers, IModifier[] excludedModifiers = null)has been deprecated, useIGeneratorEntity.GetAffordableUnitsToNextTarget(bool applyModifiers, IModifier[] excludedModifiers = null)instead.IEconomyService.GetMaxAffordableUnits(IGeneratorEntity generatorEntity, bool applyModifiers, int maxCap = -1, IModifier[] excludedModifiers = null)has been deprecated, useIGeneratorEntity.GetMaxAffordableUnits(bool applyModifiers, int maxCap = -1, IModifier[] excludedModifiers = null)instead.IEconomyService.GetIncrementGeneratorUnitCost(int unitsToIncrease, IGeneratorEntity generatorEntity, bool applyModifiers, IModifier[] excludedModifiers = null)has been deprecated, useIGeneratorEntity.GetIncrementGeneratorUnitCost(int unitsToIncrease, bool applyModifiers, IModifier[] excludedModifiers = null)instead.
Event Content
IEventContentSavedDataandIStandardEventContentSavedDatahave been removed along its tracking ofmilestoneIndex.- Use the
IContent.contentSavedDatato access content saved data information onIEventContent. - Use the
IEventContent.GetCurrentMilestone()to access the currentIMilestone. - Use the newly added
IEventContent.GetCurrentMilestoneIndex()to replicate the previousmilestoneIndexfunctionality.
- Use the
Event Settings
IEventSettings.CanCompleteMilestone(string);has been changed toIEventSettings.CanCompleteMilestone(IMilestone);as the method implicates that theIMilestonein parameter should be loaded.IEventSettings.SetMilestoneCompletionTime(string, long);has been changed toIEventSettings.SetMilestoneCompletionTime(IMilestone, long);as the method implicates that theIMilestonein parameter should be loaded.IEventSettingsSavedData.CompleteMilestone(string,long);has been changed toIEventSettingsSavedData.SetMilestoneCompletionTime(string, long, bool);.
Generator Entity
GeneratorStateTypeenum has been converted into a static class that contains constantstate string. This is done so newstringstate type can be added easily.GeneratorStateType generatorStateType { get; }has been changed tostring generatorStateType { get; }due to the change toGeneratorStateType.IGeneratorEntity.ChangeState(GeneratorStateType)has been changed toIGeneratorEntity.ChangeState<TGeneratorState>()using the type of theIGeneratorStatehas the generic function parameter.IGeneratorEntity.Collect(long count=1)now returnsboolinstead ofvoid. Any overriding implementations will need to be updated accordingly.
Generator State
IGeneratorState.Enter(IGeneratorState)has been changed toIGeneratorState.Enter(IGeneratorEntity, IGeneratorState)to fully implement the state (strategy) pattern and work with the container.
Milestone Completion
MilestoneCompletionInfo.completionTimehas been changed toMilestoneCompletionInfo.projectedCompletionTimeto denote the fact the value can be changed by projection or actual completions.
Timer Subscription
bool hasInitialTimehas been changed tobool hasStartTimeto coincide with the usage ofendTime.DateTime initialTimehas been changed toDateTime startTimeto coincide with the usage ofendTime.long initialTimestamphas been changed tolong startTimestampto coincide with the usage ofendTime.
idlekit-implementation
Action
CompleteMilestoneStateActionhas been deprecated asIEventContentno longer keeps track fo the currentmilestoneIndex. CallIEventSettings.SetMilestoneCompletionTime(IMilestone, long)to set theMilestoneCompletionInfo.SetProjectedMilestoneCompletionStateActionhas been renamed toSetMilestoneCompletionInfoStateAction. It is now called fromIEventSettings.SetMilestoneCompletionTime(IMilestone, long)to project completion of theIMilestoneor actually complete theMilestone.- The
ClearContentStateActionhas been renamedClearContentIdStateActionand a newClearContentActionhas been added. Any game code listening to the previousClearContentStateActionwill need to be updated to one of these two new actions. Which action to listen to depends on the desired behaviour: ClearContentIdStateActionis called at the end of the process of wiping downIContentandIContentDatawhen switching content. It is not called whenStartup.ResetGameis called.ClearContentActionis called when theIContententity is unloaded. Most game code/UI code that is interested in theIContentshould now listen to this event. It is called when switching content and whenStartup.ResetGameis called.
Generator Entity
- The
EventContentconstructor now takes astring[] collectorEntityIdsas a parameter. Any extending implementations will need to have their constructors updated accordingly. GeneratorEntity.Collect(long count=1)now returnsboolinstead ofvoid. Any overriding implementations will need to be updated accordingly.- The
GeneratorEventhas been removed. Use any of the following events instead: GeneratorInitializedEventGeneratorPayoutChangedEventGeneratorStateChangedEventGeneratorSpeedChangedEvent
Startup
- The
Startup.ResetGameflow now does not result in theIUserSavedData.contentInstanceIdbeing wiped. This means when the app is restarted via this flow, the player will re-enter theIContentpreviously loaded. To retain the previous behaviour whereResetGameresulted in always loading into main game Content, theStartup.SetClearContentLoadPhasesmethod can be overridden to always queue theIClearContentIdLoadPhase.
Standard Content
- The
StandardContentDataandStandardEventContentDataconstructors now takes astring[] collectorEntityIdsas a parameter. Any extending implementations will need to have their constructors updated accordingly.
idlekit-tools
Simple Entities Database
- The grouping of data in the
SimpleEntitiesDatabasehas been updated to reflect how data is grouped in the IdleKit CSVs. OldSimpleEntitiesDatabaseassets will have to be updated since references will be lost. The affected fields are as follows:Reward Datahas been split intoAscension Reward DataandCurrency Reward DataTag DataandRarity Datahas been combined intoTag Data
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 1.1.0 to 1.2.0, 2020-07-02
idlekit-logging
- N/A
idlekit-ioc
- N/A
idlekit-framework
Event Settings
eventDurationhas been removed fromEventSettingsData. Please set event end time (and duration effectively) usingEventSettings.SetEventEndTime(long timestamp). It is recommended that this is called via a backend command, similar toEventSettings.StartEvent()andEventSettings.EndEvent(). If this is not preferred, the duration can be set using a default value from a UI prefab - seeCanvasEventView.csfor an example.
Goal
- Any
IGoalimplementations must now implement aReset()method. This method should deactivate theIGoaland reset it's saved data. Goal.Deactivate()no longer resets the saved data for aIGoal. If you are callingDeactive()directly from game-code, the previous behaviour can be retained by calling the newGoal.Reset()method.Goal.canClaimnow checks iftargetProgressionhas been set, soGoal.canClaimreturns false if the goal has not been activated.
Milestone
- Any
IMilestoneimplementations must now implement aActivate()method, which overloads the existingActivate(double initialProgress)method. IMilestoneSavedDataimplementations must now implementisActive,Activate(), andDeactivate().
Standard Content
IStandardContent.HasValidActiveTrade()has been deprecated, use getterIStandardContent.standardContentFeatures.activeTradeto get the activeITradeto see if it is null.IStandardContent.ActivateTrade()has been deprecated, useIStandardContent.RefreshTrade()to activate a new validITrade.IStandardContentSavedData.InitializeTradeTimer(long)has been deprecated, useIStandardContentSavedData.Deactivate(long)to set theIStandardContentSavedData.lastActiveTradeDeactivationTime.
idlekit-implementation
Action
TradeActivatedActionandTradeDeactivatedActionhave been deprecated, subscribe toToggleActiveTradeStateActionand use the propertybool activated {get;}to see if theITradeis activated or deactivated.
PlotPoint Runtime
IPlotPointSequenceData IPlotPointController.sequence { get; }has been renamedIPlotPointSequenceData activeSequence { get; }.bool IPlotPointController.canPlayhas been removed from the interface usebool IPlotPointController.isPlayingor the concrete implementationPlotPointController.canPlay.
PlotPoint Activation
MilestoneCompletedActivationCondition.ctor(string, string)has been changed toMilestoneCompletedActivationCondition(string).
Reward
IGachaItems andIRandomWeighteditems with 0 weight will no longer be chosen as part of aGachaReward.
Standard Content and Standard Event Content
StandardContent.timerSubscription,StandardContent.UpgradeProgressionandStandardContent,OnTimerEndedhave been deprecated. They were moved toStandardContentFeatures.timerSubscription,StandardContentFeatures.UpgradeProgressionandStandardContentFeatures.OnTimerEnded. CallIStandardContent.standardContentFeaturesto access the functions.StandardEventContent.timerSubscription,StandardEventContent.UpgradeProgressionandStandardEventContent,OnTimerEndedalso require the same upgrades asStandardContent.
idlekit-tools
LoadPhase
CanvasInitializeUILoadPhase.Initialize(CanvasContentView)has been changed toInitialize(CanvasUI)to be consistent withCanvasCleanupUILoadPhase.Initialize(CanvasUI).
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 1.1.0 to 1.1.1, 2020-06-01
idlekit-logging
- N/A
idlekit-ioc
- N/A
idlekit-framework
- N/A
idlekit-implementation
- N/A
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 1.0.1 to 1.1.0, 2020-05-25
idlekit-logging
- N/A
idlekit-ioc
- N/A
idlekit-framework
Action
dispatchAsis deprecated. UsetypesToDispatchAsinstead.
Data Loader
void LoadData(IStaticData data, bool contentSpecific = true)is deprecated. Usevoid LoadData(IStaticData data)instead.void LoadData(IStaticData[] data, bool contentSpecific = true)is deprecated. Usevoid LoadData(IStaticData[] data)instead.
Event Settings
IEventSettings.CompleteMilestonehas been removed as it manipulated saved data directly. This functionality can be performed via theCompleteMilestoneStateActioninstead.
Load Phase
IContentDataLoadPhase.Initialize(string, Func<string, IStaticData[]>)is deprecated. UseIContentDataLoadPhase.Initialize(Func<string, IStaticData[]>)instead as thecontentInstanceIdis loaded from theIUserSavedDatainstead of being passed in.ILoadContentLoadPhase.Initialize(string)is deprecated. ThecontentInstanceIdis loaded from theIUserSavedDatainstead of being passed in.
Startup
void StartGame(IContext)has been changed tovoid StartGame().- Starting from version 1.1.0, if the player was going to start the game in an expired/complete EventContent, the game would now start the player in the MainGame. Override the implementation in
SetContentIdLoadPhaseto retain the old behaviour.
Timer Listener
void OnTimerEnd(int count)has been changed tovoid OnTimerEnd(long count)to support a larger number of collections. Any classes that implementITimerListener.OnTimerEndwill need to be updated accordingly.
idlekit-implementation
Action
StaticDataAddedActionandStaticDataRemovedActionhave hadbool contentSpecific { get; set; }removed as content specific is only a concept related to theISavedDataProvider. However, you can still get the information from theIStaticData[] dataif they can be casted toISavedDataProviders.dispatchAsis deprecated. UsetypesToDispatchAsinstead. All actions and state actions will have to be updated to reflect this change.- Passing a null instance to
ActionService.Unsubscribewill now result in a warning being generated. If you were doing this previously, null check the instance before callingUnsubscribe.
Event Settings
EventSettings.CompleteMilestonehas been removed as it manipulated saved data directly. This functionality can be performed via theCompleteMilestoneStateActioninstead.
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 1.0.0 to 1.0.1, 2020-04-20
idlekit-logging
- N/A
idlekit-ioc
- N/A
idlekit-framework
- N/A
idlekit-implementation
- N/A
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.20.8 to 1.0.0, 2020-03-10
idlekit-framework
Action
- All
IEvents have been renamed toIActions. - All
IPlayerEvents have been renamed toIStateActions. IPooledEventhas been removed as pooling is done in the dependency container. Subsequently,IPooledEvent.OnReturnToPool()has been renamed toIAction.ResetEvent().- All
IActionshave been refactored to work with dependency injection and implementIInjectable.
Action Service
IEventServicehas been renamed toIActionService.- If you were subscribing with a null instance, using
IEventService.Subscribe<T>(handler, instance), the request to subscribe will now fail whereas previously the subscription was unintentionally added to the global list. UseIEventService.Subscribe<T>(handler)to subscribe globally or pass a non-null instance to the original subscription call to subscribe to that instance only.
Character
- All classes related to
ICharacter,ICharacterData,ICharacterSavedDataandICharacterDataAssethave been removed.IGeneratorEntityandIGeneratorDatahad references to the above interfaces removed. The same functionality can be achieved by usingModifierService.GetModifiersAffectingModifiable()andModifierService.GetModifiablesAffectedByModifier().
Content
IContent.BeginStage()is removed and merged intoIContent.Initialize(), which is executed when theIContentgets loaded by theIEntityLoader.IContent.EndStage()is no longer public and an interface method as its functionality is now inside theIContent.AdvanceStage()orIContent.Cleanup(IEntityLoader)methods.IContentData.startingCurrencyAmountsand their overrides have been renamed toIContentData.initialCurrencyAmountsin all places in the codebase.- In
IStandardContentandIStandardContentData,missingResourcesExchangeRateMultiplierhas been split intosoftCurrencyMissingResourcesMultiplierandupgradeableCurrencyMissingResourcesMultiplier
Currency Service
- This service was renamed from
ICurrencyManagertoICurrencyService. T[] GetAllCurrencies<T>(Predicate<T>)has been removed. UseIResolver.ResolveAll<TContract>(Predicate<TContract>)instead.IUpgradeableCurrencyManagerhas been removed. Use the genericICurrencyService.GetAllCurrencies<T>()method instead.ICurrencyService.ValidateAddCurrencyAmount(string id, double amount)andICurrencyService.ValidateRemoveCurrencyAmount(string id, double amount)have been removed. This was done to remove unused methods from theICurrencyServiceinterface. If your project used these methods you will need to extendICurrencyServiceand re-implement them.
Dependency Container
IDependencyContainerandDependencyContainerhas been renamed toIContainerandContainerthat implements theIResolverandIBinder. Refer to the documentation site for more information.IContextandContexthave been refitted to contain the newIContaienrandIInstaller, which is now the location of all the binding information.- Binding with the new
IDependencyContaineris now located inIInstallerand its implementations.
Entity
- All
IEntityhave been refactored to work with dependency injection and implementIInjectable. IEntityControllerhas been renamed toIEntity.IEntityData.Create<T>(IDependencyContainer)has been change toIEntityData.CreateEntity(string)so the entity created only takes ininstanceIdandstaticDataIdand have its other dependency injected.ISavedDataProvider.CreateSavedData(string, IDependencyContainer)has been changed toISavedDataProvider.CreateSavedData(string)due to the introduction of the dependency container.IStaticData.isContentSpecificis moved toISavedDataProvideras it affects the way saved data being saved.IEntity,IEntityData, andISavedDataall have minimal constructors as the dependencies are now injected inInjectable.Injectinstead.- Now an
IEntityis created with thector(string, string),Injected(IResolver)with all the dependencies, setup withInitialize(), and cleaned up withCleanup(IEntityLoader). Please refer to theUnderstanding Entitiespage in the manual section of the documentation website. IEntity.Initializemethod is introduced that means all implementation would require to implementvoid Initialize().IEntity.Cleanupis now required to be implement if theIEntityholds any reference - loading any subIEntities(i.e:IStageloading allIGenerators. Therefore thoseIGeneratorsneed to be unloaded withloader.UnloadEntity(generators)), or obtain object references (i.e:IStageholding reference ofIStageData).IEntityCacheis now deprecated and replaced by the dependency container.ILoaderServicehas been renamed toIEntityLoaderas it no longer stores the references of the loadedIEntities.IStaticDataManagerhas been renamed toIStaticDataLoaderas it no longer stores the reference of the loadedIStaticData.- All
IEntityDataAssetclasses now need to pass a generic data Type through to a baseIGuidReferencable<T>.
Event
IEvents and all related classes have been renamed toIActions.
Event Content Service
IEventContentServicehas been renamed toIEventService. Note that what used to beIEventServiceis now namedIActionService.
Event Service
IEventContentServicehas been renamed toIEventService. Note that what used to beIEventServiceis now namedIActionService.IEventService.RegisterEventSettings(IEventSettings[])andIEventService.RegisterEventSetting(IEventSetting)have been deprecated asIEventSettingsare now cached in theIContainer.bool CanClaimRewards(string)andvoid ClaimRewards(string)have been removed from theIEventService. UseIEventSettings.CanClaimRewards(string)andIEventSettings.ClaimRewards(string)directly on the associatedIEventSettingsinstead.
Generator
- The following fields have moved from
IGeneratorBalanceDatatoIGeneratorEntityData. All implementations and references of these fields will need to be updated accordingly, and allIGeneratorBalanceDataAssets andIGeneratorEntityDataAssets will need to be regenerated.costToBuybuyCurrencyIdupgradeableCurrencyBuyRequirementscostToAutomateautomateCurrencyIdupgradeableCurrencyAutomationRequirements
Goal
IGoal.normalizedProgressandIGoalSavedData.normalizedProgressnow return a double instead of a float
Logging
- All Logging related classes and interfaces including
IdleKitLoghave been moved into a separate repository atgit@github.com/Idlekit/idlekit-logging.gitand different namespace underIdleKit.Logging. Users utilizing the Unity Package Manager should include"com.idlekit.idlekit-logging": "ssh://git@github.com/Idlekit/idlekit-logging.git"as part of thedependencies.
Milestone
IMilestoneData.rewardIdhas been removed. The reward Id for aMilestonecan instead be found viaIEventSettingsData.GetMappedRewardId(IMilestoneData.id). However in a production title, a display name would usually be located in the game's view data for the Milestone.IMilestoneSavedData.progresshas been renamed toIMilestoneSavedData.progressionfor consistency withIGoalSavedData.progression.IMilestone.normalizedProgressnow returns a double instead of a float
Modifiers
ModifierSearchResulthas been removed and its functionality is now handled byIModifierGroupDataandIModifierFormula. All usages of this class must be updated accordingly.- Added
IModifierFormula,IModifierFormulaData,IModifierFormulaDataAsset, andIModifierFormulaParser IModifierCategoryDataandIModifierCategoryDataAssethave been renamed toIModifierGroupDataandIModifierGroupDataAsset.- Methods in
IModifierCacheandIModifierServicethat used to useIModifierCategoryDatatypes now useIModifierFormulatypes. IModifierData.Initialize(IModifierCategoryData modifierCategoryData)has been removed since it no longer keeps a reference toModifierCategoryData.IModifierData.priorityhas also been removed since the newIModifierFormulahandles priority implicitly.
- Added
Namespaces
- The following namespaces within
idlekit-frameworkhave been changed. Any game code referencing these will need to be updated.IdleKittoIdleKit.FrameworkIdleKit.PlotPointtoIdleKit.Framework
PlotPoint
- All classes that implemented
IPlotPointDataAssethave been converted to implementIPlotPointDataAsset<T> where T : IPlotPointDatainstead so theirdatacan be of the derived type instead of the baseIPlotPointData. IPlotPointActivationConditionhas been incorporated into theIContainerand becameIInjectabletherefore the previousIPlotPointActivationCondition.Startmethod has been eliminated.IPlotPointActivatorData.StartandIPlotPointActivatorData.Cleanuphave been removed as theIPlotPointServiceis now in charge of creating and injecting theIPlotPointActivationCondition.IPlotPointSequenceCollectionData.StartActivatorsandIPlotPointSequenceCollectionData.Cleanuphave been removed as it is now a pure data class. The functionality is moved intoIPlotPointService.IPlotPointService.QueueSequencehas been refactor to. InvokeIPlotPointService.ActivatePlotPoint(IPlotPointActivationCondition)directly instead.IPlotPointService.hasQueuedSequenceshas been removed. Perform a null check onIPlotPointController.sequenceinstead.IPlotPointService.GetNextSequencehas been removed. As thePlotPointSequenceDatacan be triggered in arbitrary order.IPlotPointController.framesandIPlotPointController.actionshave been removed. You can get the same information fromIPlotPointController.sequenceto get theIPlotPointSequenceDatawhich contains theframesandactionsinformation.IPlotPointController.currentActionIndexhas been removed. However, it is still available in thePlotPointControllerconcrete class.IPlotPointController.isPausedhas been removed. UseIPlotPointController.canPlayinstead.
Reward
ITimedRewardSavedDatahas been refactored to be consistent with other timed relatedISavedData.long timedCompleted { get; }was replaced bylong timedStarted { get; }. The start time of the timedReward can still be found by checkingITimedReward.timerSubscription.initialtimestamp.bool neverClaimed { get; }was replaced bybool hasStarted { get; }, which is a a better indication ifITimedRewardData.durationorITimedRewardData.initialDurationshould be used.
RandomTagsCurrencyRewardhas been renamed toRandomObtainedCurrencyReward. TheallowUnobtainedoption in the data has also been removed. This changes the behaviour of this reward. There is now no support to reward from a pool of both obtained and unobtained currencies. Instead you must be explicit about the kind of currency you want to reward. If you need to reward an unobtained currency, use aRandomUnobtainedCurrencyReward,CurrencyUnlockRewardorCurrencyRewardinstead. To reward an obtained currency, you can useRandomObtainedCurrencyReward,CurrencyUnlockRewardorCurrencyReward.- Any custom implementations of
IRewardmust now support theignoreFallbackargument in theirCanClaimmethod. The same argument must be implemented in any custom implementations ofIGachaReward.GetValidItems.
Service
IService.Load(Action<IService>)has been renamed toIService.Initialize(Action<IService>)following the newInject -> Initialize -> Cleanuploading paradigm. Please refer to the documentation site for more information.- All
IServiceshave been refactored to work with dependency injection and implementIInjectable. - Renamed the following Service interfaces to better fit naming conventions. Any custom implementations of these Services will need to be updated.
ICurrencyManagerwas renamed toICurrencyServiceIEconomywas renamed toIEconomyServiceIEntityLoaderwas renamed toIEntityLoaderServiceIEventManagerwas renamed toIActionServiceIEventContentManagerwas renamed toIEventServiceIModifierManagerwas renamed toIModifierServiceIPlotpointManagerwas renamed toIPlotpointServiceIRewardManagerwas renamed toIRewardServiceIStaticDataLoaderwas renamed toIStaticDataLoaderService
Stage
IStageData.startCurrencyIdandIStageData.startCurrencyAmounthave been deprecated. UseIStageData.startingCurrencyAmountsinstead.
Time Service
- The following functions have been renamed:
DateTime now { get; }was renamed toDateTime gameTime { get; }long timestamp { get; }was renamed tolong gameTimestamp { get; }void SetTime(long)was renamed tovoid SetGameTimestamp(long)
- All the time related functionality in the game should still interact with
gameTime. The newly addedDateTime systemTimecan be overridden by the user so an official time value can be provided from a backend.
Trade Service
- The method
GetRandomValidTradehas been moved out of the UI and added to theITradeService. Any UI elements getting a random valid trade should now callITradeService.GetRandomValidTradeFromPool()and pass in an array ofITrades or an array ofITradestring IDs.
Unlockable
- The
IUnlockableinterface now requires thatSetAvailabilityandSetObtainedmethods now be implemented. These should set theavailableandobtainedflags respectively. - The
IUnlockableSavedDatainterface now requires thatSetObtainedmethod be implemented. This should set theobtainedflag. - The
IUnlockableDatahas been removed. To make aCurrencyavailableby default when aContentorStagestarts, use theContent.initialCurrencyAmountsorStage.availableCurrencyIds.
idlekit-implementation
Action
Events have been renamed toActions.PlayerEvents have been renamed toStateActions.EventPoolshave been removed inIActionManager. It now uses the container to pool and cache theIActions.StageSelectedActionhas been removed as it has never been used. Entities should subscribe toStageInitializedActionorContentInitializedActioninstead.- The order of firing of
ContentInitializedAction>>>StageInitializedActionhas been reversed. The current order now isSetContentStateAction>>>StageInitializedAction>>>ContentInitializedAction. - Actions surrounding Generator unit targets have been refactored. Saving the final unit target hit and the reward logic was moved from
IncrementGeneratorUnitStateActionto the newGeneratorUnitTargetHitStateAction. If you need access to the final unit target in the saved data or the reward information you will need to listen to the new action. OpenTimerTrunkStateActionhas been removed. UseClaimTimedRewardStateActioninstead.- Goal and Generator data are now cleared at a later point when ascending. This allows for a more flexible UI flow.
OfflineProgressActionhas been renamed toOfflineProgressStartActionin order to maintain consistency with the newOfflineProgressEndAction. References to this action will need to be updated.IdleKitInitializedevent must now be initialized with a validIContent.EventStartedEventandEventEndedEventare nowIStateActions and have been renamedEventStartedStateActionandEventEndedStateAction.AdvanceStageStateActionwill no longer set theContentSavedData.currentStageIdto null whenContent.nextStageIdis null. Instead, the previouscurrentStageIdwill be retained. This means on ascending the finalIStagewithin the content, theIStagewill not change, whereas previously the firstIStageof the Content would be loaded. SeeCanvasAscendViewinidlekit-toolsas an example of how to present this to the player or the Looping Content example inidlekit-examplesif you want Stages to loop.
Boost
- The
_modifierDatasfield inBoostDatahas been renamed to_boostModifierDatas. - The
_duration&_maxDurationfields inTimedBoostDatahave been renamed to_durationInSecondsand_maxDurationInSeconds. TheTimedBoostDataconstructor has been updated to match. - The
durationandmaxDurationproperties inTimedBoostDatanow represent milliseconds rather than seconds. Any client code using these values must be updated accordingly.
Content
- We no longer use
IContentSavedData.timeModifiedto store user's last activity time as it is done now inIUserSavedData.SetLastActivityTime(long) ContentData.isContentSpecifichas been set totruefromfalse. This change will result in the filename of the serializedContentSavedDatato be changed.- In
StandardContent,StandardContentData,StandardEventContent, andStandardEventContentData,missingResourcesExchangeRateMultiplierhas been split intosoftCurrencyMissingResourcesMultiplierandupgradeableCurrencyMissingResourcesMultiplier - In
StandardContentDataandStandardEventContentDataconstructors,missingResourcesExchangeRateMultiplierIdis replacedsoftCurrencyMissingResourcesMultiplierIdandupgradeableCurrencyMissingResourcesMultiplierId
Core
- All
IEntity,IAction, andIServiceimplementations have been refactored to work with dependency injection and implementIInjectable.
Currency Service
- This service was renamed from
CurrencyManagertoCurrencyService. - All
ValidateCurrencylogic has been removed as they are just empty. OverrideCurrencyServiceif you wish to perform validation logic.
Entity Data
- All
IEntityDatahave the dependency resolving logic (in methodIEntityData.Create<T>) using the previousIDependencyContainerremoved. They are now being resolved inIEntity.Resolve(IResolver). - All
EntityParametersclasses that were previously being passed in the constructors of allIEntityhave been removed due to the introduction of the dependency container.
Entities Database
void AddStaticData<TStaticData>(ScriptableObject[])has been renamed toTStaticData[] FetchStaticData<TStaticData>(ScriptableObject[]).EntitiesDatabasehas been renamedSimpleEntitiesDatabaseand moved intoidlekit-tools. Reimporting balance data will generate an updated database.PlotPointDatabasehas been renamedSimplePlotPointDatabaseand moved intoidlekit-tools.
Events
Events have been renamed toActions.PlayerEvents have been renamed toStateActions.
Event Service
EventContentServicehas been renamed toEventService. Note that what used to beEventServiceis now namedActionService.
Goal
- The abstract class
MakeTradeGoalnow subscribes to aTradeAcceptedActioninstead of aMakeExchangeAction. All implementations will need to be updated accordingly. Goal.normalizedProgressandGoalSavedData.normalizedProgressnow return a double instead of a float
JsonSerializer
- The
JsonSerializerhas been renamedSimpleJsonSerializer.
Main
Mainhas been completely refactored and moved toidlekit-tools. It is now an abstract class that implements one potential way of providing static data to the new startup flow. Any extensions ofMainwill need to be changed to work with the new startup flow. Refer to the documentation website for more information.Main.contenthas been removed as it is now being fetched from theIContainerwith_container.Resolve<IContent>(userSavedData.contentId).
Milestone
MilestoneData.rewardIdhas been removed. The reward Id for aMilestonecan instead be found viaIEventSettingsData.GetMappedRewardId(IMilestoneData.id). However in a production title, a display name would usually be located in the game's view data for the Milestone.- All previous subscribers or dispatchers of
MilestoneProgressActionshould now switch to useProgressMilestoneStateActionMilestoneCompletedStateActionshould now switch to useCompleteMilestoneStateAction
normalizedProgressnow returns a double instead of a float
Modifier Cache
- The cache now uses HashSets to store
IModifiers,IModifiables, andIModifierFormula. _specificModifierLookup,_globalModifierLookup,_specificModifiableLookup, and_globalModifiableLookuphave been consolidated into_modifierLookupand_modifiableLookup. Methods have been updated to use the new lookup structure.
Modifier Service
- The
ModifierServiceno longer automatically loads allIBoostEntities in the Entities Database. Instead, anyIBoostshould be loaded by it's owning Entity. For example, theShowcaseContentis now responsible for loading theIBoostused for video ad bonuses. If required, the previous behaviour can be retained by reinstating the call_entityLoader.LoadAllEntities<IBoost, IBoostData>()when theSetContentStateActionis broadcast. IModifierFormulaandIModifierFormulaDataare now binded as singletons to their concrete type, which means only one instance of a type ofIModifierFormulaandIModifierFormulaDatais available.- Added
ModifierService.GetModifierFormulato retrieve theIModifierFormulaof a specified type
Namespaces
- The following namespaces within
idlekit-implementationhave changed. Game code using classes within these will need to be updated.IdleKittoIdleKit.ImplementationIdleKit.PlotPointtoIdleKit.Implementation
NPM
- The sub-dependencies in
package.jsonhave been removed. These should now be specified only at the top levelpackage.jsonfile within your Unity project.
PlotPoint
BasePlotPointActivationConditionnow requires thestaticDataIdpassed into the constructorctor(string).BasePlotPointActivationCondition.Initializehas been renamed toBasePlotPointActivationCondition.Subscribe().PlotPointSetPlaybackAvailabilityActionhas been renamed toSetPlotPointPlaybackAvailabilityAction.PlotPointPlaybackAvailabilityChangedActionhas been removed. Subscribe toSetPlotPointPlaybackAvailabilityActioninstead.PlotPointSequenceProgressActionhas been renamed toPlotPointFramePlayedAction.- Previous implementation of
PlotPointDataProviderhas been moved toPlotPointEditorDataProvider. AscensionActivationConditionhas been renamed toAscensionCompleteActivationCondition.
Reward
AscensionReward.Initialize(double score)has now been renamed toAscensionReward.SetAscensionScore(double score)due to the introduction ofIEntity.Initialize().
Services
- Renamed the following Services to better fit naming conventions. Any custom extensions of the below Services will need to be updated.
CurrencyManagerwas renamed toCurrencyServiceEconomywas renamed toEconomyServiceEntityLoaderwas renamed toEntityLoaderServiceEventManagerwas renamed toActionServiceEventContentManagerwas renamed toEventServiceModifierManagerwas renamed toModifierServicePlotpointManagerwas renamed toPlotpointServiceRewardManagerwas renamed toRewardServiceStaticDataLoaderwas renamed toStaticDataLoaderService
Timer Trunk
- The
TimerTrunkimplementation has been renamed toTimedReward. RelatedIActions andIStateActions have been renamed accordingly. Code that previously derived fromTimerTrunkshould now inherit fromTimedReward.
Timer Subscription
- The overloaded constructor for
TimerSubscriptionno longer accepts aDateTimeendTime without an initial timestamp. Any constructors using this parameter will need to be updated appropriately.
idlekit-tools
Actions
Events have been renamed toActions.PlayerEvents have been renamed toStateActions.AutoUnlockBuyGeneratorStateActionhas been removed. The functionality has been moved into the baseBuyGeneratorStateAction.
Asset Importer
- The following headers have moved from the
GeneratorBalanceDataAsset Creator to theGeneratorEntityDataAsset Creator. Custom implementations will need to be updated accordingly.costToBuybuyCurrencyIdupgradeableCurrencyBuyRequirementscostToAutomateautomateCurrencyIdupgradeableCurrencyAutomationRequirements
Core
- All
IEntity,IAction,IService, andCanvasViewhave been refactored to work with dependency injection and implementIInjectable.
Namespaces
- The following namespaces have changed within
idlekit-tools. Any code referencing classes within these will need to be updated:IdleKit.Tools.Editor.GuidReferencetoIdleKit.Tools.EditorIdleKit.Tools.Editor.PlotPointtoIdleKit.Tools.EditorIdleKit.Tools.Editor.DataAssetImportertoIdleKit.Tools.EditorIdleKit.Tools.CommontoIdleKit.ToolsIdleKit.Tools.TesttoIdleKit.Tools.Tests
Number Formatter
NumberFormatter.FormatDoublewill now round values under 1000 as specified via theroundDownargument. This makes the behaviour consistent with values above 1000, UI using this may need to be updated accordingly.
NPM
- The sub-dependencies in
package.jsonhave been removed. These should now be specified only at the top levelpackage.jsonfile within your Unity project.
Prefabs
- All prefabs are now nested prefabs which require a minimum Unity version of 2018.3.
idlekit-examples
- N/A
idlekit-showcase
General
- All entity interface classes have been moved into
idlekit-framework. - All entity concrete classes have been moved into
idlekit-implementation. - All importer classes have been moved into
idlekit-tools.
Asset Importer
ShowcaseDataAssetImporterhas been moved intoidlekit-toolsand merged, merged withBasicDataAssetImporterand renamed toSimpleDataAssetImporter.- All data asset headers and creator files have also been moved to
idlekit-toolsand renamed as follows:ShowcaseContentDataAssetHeadertoStandardContentDataAssetHeaderShowcaseEventContentDataAssetHeadertoStandardEventContentDataAssetHeaderShowcaseTimerTrunkDataAssetHeadertoTimerTrunkDataAssetHeaderShowcaseContentDataAssetCreatortoStandardContentDataAssetCreatorShowcaseEventContentDataAssetCreatortoStandardEventContentDataAssetCreatorShowcaseTimerTrunkDataAssetCreatortoTimerTrunkDataAssetCreator
Events
Events have been renamed toActions.PlayerEvents have been renamed toStateActions.
Event Content
void IShowcaseEventSettingsSavedData.EndEvent()has been removed. Usevoid IEventSettingsSavedData.CompleteEvent()instead.
NPM
- The sub-dependencies in
package.jsonhave been removed. These should now be specified only at the top levelpackage.jsonfile within your Unity project.
Prefabs
- All prefabs are now nested prefabs which require a minimum Unity version of 2018.3.
Showcase Content
IShowcaseContentnow requires avideoAdBoostproperty. This boost is intended to be used when the player views a video ad.IShowcaseContentDatanow requires avideoAdBoostIdproperty.IShowcaseContentSavedDataandIShowcaseEventContentSavedDatahave been added, which serialize aCurrencyAmountto theIContentSavedData. Deserialization of the saved data should be updated accordingly.ShowcaseContentandShowcaseEventContent, along with their interfaces, have been moved toidlekit-implementationandidlekit-framework, and renamedStandardContentandStandardEventContent.
Showcase Upgradeable Currency
ShowcaseUpgradeableCurrencyDatahas been removed. Theavailableflag of aUpgradeableCurrencyis now set viaStageData.availableCurrencyIdsorContentData.initialCurrencyAmounts, either of which will make aCurrencyorUpgradeableCurrencyavailable at the start of theContentorStage.- As a result of the above change,
ShowcaseUpgradeableCurrencyManagerhas been removed. It's functionality, of setting theUpgradeableCurrency.availableflag is now performed by theNewStageStateActionandNewContentStateAction.
TimerTrunk
ShowcaseTimerTrunkand it's interface have been moved toidlekit-frameworkandidlekit-implementation. The classes have been renamedITimerTrunkandTimerTrunk.
Version 0.20.7 to 0.20.8, 2020-04-13
idlekit-framework
- N/A
idlekit-implementation
- N/A
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.20.6 to 0.20.7, 2020-01-28
idlekit-framework
- N/A
idlekit-implementation
- N/A
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.20.5 to 0.20.6, 2019-12-11
- N/A
Version 0.20.4 to 0.20.5, 2019-11-20
idlekit-framework
EventSettingsSavedData.completedMilestoneIds { get; }has been deprecated. Instead of string ids, this data now saves a list of more complexMilestoneCompletionInfoobjects. These objects allow for the future projection of Milestone completion times that handle players being away from the game when an Event is ended. Update your code to useEventSettingsSavedData.milestoneCompletionInfo { get; }instead. This change will break any existing saved data so it is recommended to either introduce this change between events or migrate existing data to the new format.EventSettingsSavedData.CompleteMilestone(string milestoneId)has been deprecated for the same reasons outline above. UseEventSettingsSavedData.CompleteMilestone(string milestoneId, long timestampInMilliseconds)instead.- Since
EventSettings,EventSettingsDataandEventSettingsSavedDatahave had time related functionality moved into them, any custom code that added time related functionality should be inspected to ensure there are no conflicts.
idlekit-implementation
IdleKitInitializedEventhas been added to signify that all Entities within IdleKit have been initialized. If your integration of IdleKit does not useMain.StartGamethis event must be sent afterContent.BeginStagehas been called.
idlekit-tools
- N/A
idlekit-examples
-
- N/A
idlekit-showcase
-
- N/A
Version 0.20.3 to 0.20.4, 2019-11-04
idlekit-framework
- N/A
idlekit-implementation
Goal
GoalData.isContentSpecificis now set to true by default. This allows for GoalData to be shared between different Contents while still ensuring that GoalSavedData is unique. When using the defaultISerializerimplementation, this will result in a filename change of the serialized JSON.
idlekit-tools
- N/A
idlekit-examples
-
- N/A
idlekit-showcase
-
- N/A
Version 0.20.2 to 0.20.3, 2019-09-16
- N/A
Version 0.20.1 to 0.20.2, 2019-09-03
idlekit-framework
Generator
GeneratorEntity.payoutCurrencyPerSecondhas been deprecated and replaced byGeneratorEntity.payoutCurrencyPerMilliSecond. This resolves a bug which meant thatGeneratorEntity.payoutCurrencyPerSecondwas actually reporting back in milliSeconds while also avoiding any precision issues related to converting Payout to a float when reporting back in Seconds. To account for this change, any gameplay logic which requires absolute precision should be converted to work in milliseconds. Any UI code where precision is not required can convert the payout value to seconds.
idlekit-implementation
ToggleTimedBoostPlayerEvent
- In order to avoid the possibility of a runtime error when passing the incorrect Boost type into the
ToggleTimedBoostPlayerEvent, this event no longer derives from theToggleBoostPlayerEvent. Any code that was previously listening toToggleBoostPlayerEventwhen requiring aTimedBoostshould now listen toToggleTimedBoostPlayerEvent.
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.20.0 to 0.20.1, 2019-07-18
- N/A
Version 0.19.1 to 0.20.0, 2019-07-08
idlekit-framework
Content
void Ascend()has been deprecated due to the implementation of the new ascension flow.- Instead, use
void BeginAscension(), which signals the start of the ascension gameplay. - Then, use
void EndAscension(), which concludes the ascension gameplay and grants the rewards. - Please refer to
docs.idlekit.iofor additional information.
- Instead, use
IContentSavedData.lastActiveTimestamphas been deprecated, useISavedData.timeModifiedinstead. This is due to theISavedDatarefactor that addedtimeCreatedandtimeModifiedto allISavedData.IContentSavedData.SetLastActiveTimestamp(long)has been deprecated, useISavedData.Save()instead. This is due to theISavedDatarefactor that addedtimeCreatedandtimeModifiedto allISavedData.
Currency
bool ContainsTagIn(string[])has been moved to the newly addedITagService, useITagService.ContainsAnyTag(ITagData[], string[])instead.bool ContainsTag(string)has been moved toITagService, useITagService.ContainsTag(ITagData[], string)instead.
CurrencyManager
ICurrency[] GetAllCurrenciesOfTagOrRarity(string)has been deprecated.GetCurrenciesWithTagshould be used instead. This method is expected to returnICurrencywith both the specified tag or rarity Id.
Economy
IEconomy.GetSpeed()and it's overloads have been deprecated. UseIEconomy.GetDuration()and it's overloads instead. These methods return values in milliseconds now.
Gacha
GachaSlot.csandGachaItem.cshave been moved toidlekit-implementationdue to the introduction ofIGachaSlotandIGachaitem.GachaSlot.HasClaimableItemhas been moved toGachaReward.CanClaim(IGachaSlot).GachaItem.cachedRewardhas been removed asIRewardManageralready caches theIRewards.IGachaReward.GetValidItems(GachaSlot slot)has been replaced to work with interfaceRewardGetValidItems(IGachaSlot slot).IGachaRewardData.gachaSlots { get; }has been replaced to work with interfaceIGachaSlot[] gachaSlots { get; }.
Generator
double baseSpeed { get; }has been deprecated inIGeneratorBalanceData. Uselong baseDuration { get; }instead. This value is in milliseconds now. Data import is still in seconds.double speed { get; }has been deprecated inIGeneratorEntity. Uselong duration { get; }instead. This value is in milliseconds now.IGeneratorEntitySavedData.BuyGenerator(IGeneratorUnitTargetSequence)has been deprecated. Usevoid Buy(int)andvoid SetGeneratorUnitTargetHit(int)instead. This is to simplify dependency during the usage of the function.IGeneratorEntitySavedData.IncrementGeneratorUnit(int, IGeneratorUnitTargetSequence)has been deprecated. Usevoid IncrementGeneratorUnit(int)andvoid SetGeneratorUnitTargetHit(int)instead. This is to simplified dependency during the usage of the function.IGeneratorEntitySavedData.isUnlockedandIGeneratorEntitySavedData.Unlock()have been removed as they are legacy features and similar functionality is now achieved by using combination ofIUnlockable.availableandIUnlockable.obtainedon theIUpgradeableCurrencyassociated with theIGeneratorEntity(i.e: the cards representing theIGeneratorEntity).GeneratorUnitTargetProgressionhas been deprecated please useIGeneratorUnitTargetSequence.GetProgression(int)instead.IGeneratorUnitTargetSequence.GetGeneratorUnitTargetLevel(int, int)has been renamed toIGeneratorUnitTargetSequence.GetGeneratorUnitTargetIndex(int).IGeneratorUnitTargetSequence.GetGeneratorUnitTargetProgression(int)has been renamed toIGeneratorUnitTargetSequence.GetGeneratorUnitTargetAmount(int).
Goals
double seconds { get; }has been deprecated inIDynamicGoalData. Uselong duration { get; }instead. This value is in milliseconds now. Data import is still in seconds.
Modifiers
IModifierCachemust now be bound along with other dependencies so theModifierManagercan resolve it.IModifier.modifierIdmust be implemented on any Entities that implementIModifier. In most cases this should point to the static data id of theIModifier.IModifierCategoryData.targetModifiableTypesneeds to be implemented on any customIModifierCategoryDataobjects. This should return a list ofIModifiabletypes that are allowed to be affected by thisIModifierCategoryData.
Timed Rewards
float durationInSeconds { get; }has been deprecated inITimedRewardData. Uselong duration { get; }instead. This value is in milliseconds now. Data import is still in seconds.double timeRemaining { get; }has been deprecated inITimedReward. Uselong durationRemaining { get; }instead. This value is in milliseconds now.ITimedRewardSavedDataclass has been deprecated. This is due to theISavedDatarefactor that addedtimeCreatedandtimeModifiedto allISavedData.
Trade
- The behaviour of when a
ITradeis valid has changed. Previously theavailableandobtainedflags of theICurrencywould only be checked for input/outputIUpgradeableCurrency. These flags will now be checked onICurrencyas well. - The implementation of Trades has been extensively refactored. Whereas previously only
ITradeDataexisted inidlekit-framework, trades are now a full entity with anITradecontroller interface. Any trade specific logic should now be encapsulated within implementations ofITradesuch asTradewhich can be found inidlekit-implementation. - As
ITradeDatais now anIEntityDatarather thanIStaticDataany derived classes must implement aCreatemethod that generates theITradeEntity controller. - Input and output tags for
ITradeDataare now specified asITagDataarrays to allow for multipleICurrencytags to be specified.
Saved Data Provider
CreateSavedData(string, ISerializer)has been changed toCreateSavedData(string, IDependencyContainer)due to theISavedDatarefactor and preparation for the dependency container integration.- The classes (and the ones that extend them) listed below have been switched to use the new method
CreateSavedData(string, IDependencyContainer)to create theISavedData. - The following classes are affected in
idlekit-implementation:BoostData,TimedBoostData,CharacterData,ContentData,CurrencyData,UpgradeableCurrencyData,GeneratorEntityData,GoalData,TimerTrunkData, andStageData. - The following classes are affected in
idlekit-examples:RewardGeneratorEntityData, andLoopingContentData. - The following classes are affected in
idlekit-showcase:ShowcaseTimerTrunkData.
idlekit-implementation
TimerTrunkData.initialDurationInSecondshas been deprecated. UseTimerTrunkData.initialDurationinstead. This value is in milliseconds now.
Events
AscensionCompleteEventhas been renamed toAdvanceStageEventfor more clarity.AscendPlayerEventhas been renamed toAscensionCompletePlayerEventwhich concludes the ascension gameplay and grants rewards.BuyGeneratorPlayerEventhas had functionUpdateGeneratorState()renamed toBeginProduction()for clarity, andUnlockGenerator()deprecated due to the removal ofIGeneratorEntitySavedData.Unlock()method.LogLastActiveTimePlayerEventhas had constructor changed fromctor(ITimerService)toctor()asITimerServiceis no longer needed whenISavedData.Save()would modify thetimeModified.
Generators
AutoCollectState.collectDurationis now alonginstead of afloat. This value is in milliseconds now.GeneratorUnitTargetSequenceData's default constructorctor()has been removed but without aSystem.Obsoletetag because it is still use by the ScriptableObject internally and thus will throw an error.
Goals
-
The following
IGoals' constructors have been changed toctor(string, TGoalData, IGoalSavedData, IEventManager, IEntityCache, ITagService, ITagData[])due to the tag refactor:CollectCurrenciesWithTagsGoalDynamicCollectCurrenciesWithTagsGoalSpendCurrenciesWithTagsGoalUpgradeCurrenciesWithTagsGoal
-
The following
IGoalDatas' constructors have been changed toctor(string, string, double, string[])due to the tag refactor:CollectCurrenciesWithTagsGoalDataDynamicCollectCurrenciesWithTagsGoalDataSpendCurrenciesWithTagsGoalDataUpgradeCurrenciesWithTagsGoalData
Main
- Due to deprecation of
AscensionCompleteEventtheMain.csnow listens toAdvanceStageEventto load the newIStage.
Modifiers
- If
ModifierManagerhas been extended, or a customModifierCachehas been implemented, the following applies:ModifierManagerhas been completely refactored and is no longer a partial class. Any custom solutions that made use of the partial class will now have to be reworked to implementIModifierManageror extendModifierManagerand be bound into the dependency system.
ModifierCache.GetModifiersAffectingModifiable(string modifiableId)andModifierCache.GetModifiersAffectingModifiable<TModifierCategoryData>(string modifiableId)have been changed to returnIModifiersthat affect the givenIModifiableviaModifierData.affectAll. Previously these would not be returned. These methods also have new strictIModifierCategoryDataverification that will not returnIModifierobjects that can not be affected by a givenIModifierCategoryData.
Plot Point Manager
- Constructor
ctor(IPlotPointDataProvider, IEventManager, ISerializer)has been changed toctor(IDependencyContainer)for simplicity.
Saved Data
- The constructor signature changed from
ctor(string, ISerializer)toctor(string, IDependencyContainer)due to theISavedDatarefactor. - The classes (and the ones that extend them) listed below have been switched to use the new constructor
ctor(string, IDependencyContainer). - The following classes are affected in
idlekit-implementation:BoostSavedData,TimedBoostSavedData,CharacterSavedData,ContentSavedData,CurrencySavedData,UpgradeableCurrencySavedData,GeneratorEntitySavedData,GoalSavedData,PlotPointSequenceCollectionSavedData,TimerTrunkSavedData,StageSavedData, andUserSavedData. - The following classes are affected in
idlekit-examples:RewardGeneratorEntitySavedData, andLoopingContentSavedData. - The following classes are affected in
idlekit-showcase:ShowcaseTimerTrunkSavedData.
Time Management
TimerSubscription(float durationSeconds, bool loop = false)has been deprecated. UseTimerSubscription(long duration, bool loop = false)instead.TimerSubscription(float durationSeconds, long initialTimestamp, bool loop = false)has been deprecated. useTimerSubscription(long duration, long initialTimestamp, bool loop = false)instead.TimerTrunkData.durationInSecondshas been deprecated. UseTimerTrunkData.durationinstead. This value is in milliseconds now.
Trade
- With the extensive refactor of the Trade system, a full
TradeEntity controller has been added containing much of the logic that used to live inTradeSet.TradeServicehas also been added, replacing the functionality for accessing differentTradeDatathat was previously available throughTradeSet. - The functionality of
TradeSet.GetValidTradescan now be achieved viaTradeService.GetTradeorTradeService.GetTradesand then callingTrade.IsValid. In the same way calls toTradeSet.GetValidTradesWithInputTagandTradeSet.GetValidTradesWithOutputTagshould be replaced byTradeService.GetTradesWithInputTagorTradeService.GetTradesWtihOutputTagand then callingTrade.IsValid. - The
MakeExchangePlayerEventnow longer has to be called directly from UI. InsteadTrade.MakeTradeshould be used.
idlekit-tools
Asset Importer
- Asset Creators for the following Entity Datas now require a
targetTagIdsarrays and atargetAllflag in the input csv data: RandomTagsCurrencyRewardCollectCurrenciesWithTagsGoalDynamicCollectCurrenciesWithTagsGoalSpendCurrenciesWithTagsGoalUpgradeCurrenciesWithTagsGoalDataRandomTagsCurrencyReward- The Asset Creator for
TradeDatanow requireinputCurrencyTagIdsandoutputCurrencyTagIdsarrays in the input csv data.
Trade
TradeSethas been deprecated, see information above for more detail.
idlekit-examples
- N/A
idlekit-showcase
Showcase Content
- The
ShowcaseContentDataAssetCreatorrequires that input csv data now contain atradeCooldownDurationfield. ShowcaseContentParametersnow take an array ofTrades rather than the deprecatedTradeSet.
Event
AutoUnlockBuyGeneratorPlayerEvent.UnlockGeneratorhas been changed toAutoUnlockBuyGeneratorPlayerEvent.Applydue to theBuyGeneratorPlayerEventchange.
Event Content
- All Content data associated with events has been changed to
ShowcaseEventContentwhich derives fromEventContent. This showcases the ability to trackMilestoneprogress while in an event. - A new global
EntitiesDatabasehas been added toMain. The idea behind this data is that it is always loaded no matter whatContentis loaded. Only globally required data should be stored here to reduce memory use. - A
ShowcaseEventSettingsclass has been added to the project to showcase one potential method for implementing limited time events. Ideally the actual implementation would use a backend to supply the time related data.EventSettingsis a nice place to save event related data because it is globally accessible and can be read even when not in the Event Content.
Version 0.18.1 to 0.19.0, 2019-05-27
idlekit-framework
Generator
double baseSpeed { get; }has been deprecated inIGeneratorBalanceData. Uselong baseDuration { get; }instead. This value is in milliseconds now. Data import is still in seconds.double speed { get; }has been deprecated inIGeneratorEntity. Uselong duration { get; }instead. This value is in milliseconds now.
Goals
double seconds { get; }has been deprecated inIDynamicGoalData. Uselong duration { get; }instead. This value is in milliseconds now. Data import is still in seconds.
Economy
IEconomy.GetSpeed()and it's overloads have been deprecated. UseIEconomy.GetDuration()and it's overloads instead. These methods return values in milliseconds now.
Timed Rewards
float durationInSeconds { get; }has been deprecated inITimedRewardData. Uselong duration { get; }instead. This value is in milliseconds now. Data import is still in seconds.double timeRemaining { get; }has been deprecated inITimedReward. Uselong durationRemaining { get; }instead. This value is in milliseconds now.
idlekit-implementation
Time Management
TimerSubscription(float durationSeconds, bool loop = false)has been deprecated. UseTimerSubscription(long duration, bool loop = false)instead.TimerSubscription(float durationSeconds, long initialTimestamp, bool loop = false)has been deprecated. useTimerSubscription(long duration, long initialTimestamp, bool loop = false)instead.TimerTrunkData.durationInSecondshas been deprecated. UseTimerTrunkData.durationinstead. This value is in milliseconds now.TimerTrunkData.initialDurationInSecondshas been deprecated. UseTimerTrunkData.initialDurationinstead. This value is in milliseconds now.
Generators
AutoCollectState.collectDurationis now alonginstead of afloat. This value is in milliseconds now.
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.18.1 to 0.19.0, 2019-05-27
idlekit-framework
Currency
ICurrency.ContainsTagOrRarityhas been renamed toICurrency.ContainsTagfor simplicity
idlekit-implementation
Goal
DynamicCollectCurrencyTypeGoalData'sdouble secondsUntilComplete { get; }has been renamed todouble seconds { get; }
Events
- The constructors for the following
IEvents must now be passed anIEventManager: ClaimGoalPlayerEventCheckGeneratorUnitTargetHitClaimTimedRewardPlayerEventOpenTimerTrunkPlayerEvent
Rewards
AscendPlayerEvent.GetRewardIdscan now be found on the newAscensionRewardclass.
idlekit-tools
- N/A
idlekit-examples
- N/A
idlekit-showcase
- N/A
Version 0.17.0 to 0.18.0, 2019-04-15
idlekit-framework
Generator
void RefreshCache()has been deprecated onIGeneratorEntitybut it is still available in the implementationGeneratorEntity. It was removed because the function was too specific.
Managers
void RegisterCurrency()and other similar functions have been removed fromICurrencyManagerbut they are still available in the implementation of the interfaceCurrencyManager. They were removed because the functions were too specific to theidlekit-implementation.void RegisterModifier(),void UnregisterModifier()and other similar functions have been removed fromIModifierManagerbut they are still available in the implementation of the interfaceModifierManager. They were removed because the functions were too specific to theidlekit-implementation.void RegisterReward()and other similar functions have been removed fromIRewardManagerbut they are still available in the implementation of the interfaceRewardManager. They were removed because the functions were too specific to theidlekit-implementation.
Time
- All time stamp related fields, properties, or parameters have had their names changed to
timestampin milliseconds format for consistency. ITimerListener'sOnUnSubscribe()has been removed because the object should be responsible for its own un-subscribing.- All
ITimerServicemethods that previously worked with an(out uint requestId)and other parameters have been refactored to work with anITimerListeneronly to clean up the API. While the time subscription (i.e:duration, initialTime, looping) information can be found atITimerListener.ITimerSubscription.
User Saved Data
IUserSavedDatahas been removed fromISavedDataManagerto reduce coupling. Use theIEntityCache.Resolve<IUserSavedData>()to retrieve and use theIUserSavedData.
idlekit-implementation
Event Manager
ActionManagerhas been removed due to the confusion it created as it shared too many similar functionality withEventManager. Please useEventManagerin place ofActionManager.ActionManager's action queue system makes it very difficult to debug and would easily introduce execution order dependent bugs. The queue has been removed and allIEventare dispatched immediately.
Goals
- The following
Goalrelated name changes include the renaming of all theGoalDataAssetinvolved. Therefore, all theGoalDataAssetsrelated to theGoalsmentioned below need to be re-imported. CollectCurrencyGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toCollectCurrencyTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.CollectUpgradeableCurrencyGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toCollectUpgradeableCurrencyTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.DynamicCollectCurrencyGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toDynamicCollectCurrencyTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.SpendCurrencyGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toSpendCurrencyTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.
Unity Event Listener
UnityEventListeneris no longer anIServiceas it derives from aMonoBehaviour; therefore, it goes through a different create and initialize sequence compare to regular C#IServices.
Timer Trunk
- As the unlock functionality of the
TimerTrunkis specific to the showcase game, it has been moved to a newShowcaseTimerTrunkimplementation that can be found in the Showcase repo. - A new
initialDurationfield has been added to allow the duration of the initial subscription to the timer service to vary from subsequent subscriptions. - The
TimerTrunkno longer has to be initially claimed before it will be subscribed to the timer service. To retain the previous behavior, where the trunk would be immediately available on the first initialization, set the newinitialDurationdata field to0.
idlekit-tools
CanvasView
void CanvasStageView.SetStage(IStage)is nowprotectedinstead ofpublicas theIStageis set by listening to theStageInitializedEvent.
Plot Points
- The
PlotPointEditor.SaveSequencefunctionality has changed significantly. If you are utilizing this functionality, re-read the method to make sure you still get the intended results.
idlekit-examples
- N/A
idlekit-showcase
Data
- Timed Rewards
TimerTrunkheader and data types are nowShowcaseTimerTrunk.idanddataNamefields changed tomg01_showcase_timer_trunk.initialDurationInSecondshas been added.unlockStageIdhas been added. Previously this existed in the Content data.- Content
timerTrunkUnlockStageIdhas been removed. This now exists in Timed Rewards data.timerTrunkIdhas changed tomg_01_showcase_timer_trunk.
Version 0.16.0 to 0.17.0, 2019-3-15
idlekit-framework
Entity
ICurrencyGoalhas been deprecated asIGoalno longer needs to have all theICurrencyinjected due to the introduction ofIEntityCacheIGeneratorGoalhas been deprecated asIGoalno longer needs to have all theIGeneratorinjected due to the introduction ofIEntityCacheIEntityController'svoid Cleanup(ILoaderService loaderService);has been changed tovoid Cleanup(IEntityCache entityCache);to avoid having too much responsibility being injected- All
IEntityData'sT Create<T>(IDependencyContainer dependencyContainer, string instanceId)method shas been moved toidlekit-examples. This is done to avoid confusion sinceidlekit-implementationdoes not utilize the instancing feature, please useT Create<T>(IDependencyContainer dependencyContainer)or check outIInstanceEntityDatain theInstanceexample
Goal
IGoalData'sfloat[] difficultyIncrement { get; }has been removed from the project due to the removal ofIDifficultyManager
Loader
TReturn LoadEntity<TReturn,TData>(string dataId, string instanceId)has been moved toidlekit-examples. This is done to avoid confusion sinceidlekit-implementationdoes not utilize the instancing feature inidlekit-implementation, please useTReturn LoadEntity<TReturn,TData>(string dataId)or check outIInstanceLoaderServicein theInstanceexample
idlekit-implementation
Exception & Error Events deprecated
ExceptionEventandErrorEventhave both been deprecated. The newIdleKitLogshould be used in place of these, for example:
ExceptionEvent exceptionEvent = eventManager.GetEvent<ExceptionEvent>();
exceptionEvent.caller = this;
exceptionEvent.exception = new InvalidGoalDataException(this, "exception message");
eventManager.DispatchEventImmediate(exceptionEvent);
is replaced by:
IdleKitLog.LogException(new InvalidGoalDataException(this, "exception message"));
If you were previously listening to ExceptionEvent or ErrorEvent, this functionality can be replicated via Unity's Application.logMessageReceived. More information is available in the Unity documentation.
Goals
- The following
Goalrelated name changes include the renaming of all theGoalDataAssetinvolved. Therefore, all theGoalDataAssetsrelated to theGoalsmentioned below need to be re-imported.IGoalData.amountis no longer an optional field (has to be > 0) forAutomateGeneratorTypeGoalandBuyGeneratorTypeGoal.
AutomateSpecificGeneratorGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toAutomateGeneratorTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.BuySpecificGeneratorGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toBuyGeneratorTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.CollectCurrenciesOfRarityGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toCollectCurrenciesWithTagsGoalto work with allITagDatainstead ofIRarityData.CollectFromSpecificGeneratorGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toCollectFromGeneratorTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.GetGeneratorUnitsForSpecificGeneratorGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toGetGeneratorUnitsForGeneratorTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.GetUpgradesForSpecificCurrencyGoaland its correspondingIGoalDataandIGoalDataAssethave been renamed toGetUpgradesForCurrencyTypeGoaldue to the introduction of instancing. TheIGoalno longer targets just one instance but multiple instances of the same staticDataId.GoalEventis removed because theIGoalSavedDataalteration should only be in anIAction. UseProgressGoalActionandSetProgressGoalActioninstead.
StaticDataManager and LoaderService errors
- All varients of the
GetDatamethods inStaticDataManagernow adds an entry to the log rather than hard failing when a requested Entity or type does not exist. As a result execution will now continue when a requested Entity or collection of Entities do not exist.
This means that code calling the LoaderService also no longer needs to check for possible invalid entries before calling LoaderService.LoadAllEntities, for example:
ICharacter[] characters = characterIds.Length > 0 ? loaderService.LoadAllEntities<ICharacter, ICharacterData>(characterIds) : new ICharacter[0];
Can be replaced by:
ICharacter[] characters = loaderService.LoadAllEntities<ICharacter, ICharacterData>(characterIds);
GetData methods that can return arrays will now return empty arrays when the requested Entity type does not exist in the Entities Database. Previously the behavior was inconsistent with some methods returning empty arrays and others returning null/default. -
The
GetDataForIdsmethod will now return an array with elements for every valid Id that is passed as an argument. Previously the behavior was for the method to return an empty array if any Id passed was invalid. -
For consistency
GetData<T>(Predicate<T>)an array rather than aIEnumerable.
idlekit-tools
idlekit-examples
idlekit-showcase
ShowcaseContent
- Data class now requires that you have a "timerTrunkUnlockStageId" which will dictate when the UI should allow the user to interact with the Timer Trunk as well as when the Timer Trunk should activate.
Version 0.15.0 to 0.16.0, 2019-02-19
idlekit-framework
Repository Restructure
- The Idlekit repositories have been restructured to make the division of code responsibility more obvious. Idlekit now contains the following repositories:
Framework: Containing only the interface classes of Idlekit. Previously these classes were found in the Idlekit repository.Implementation: The implementation classes of the interfaces found in Framework. Previously this code was found in the Idlekit repository.Tools: Common and tools code, such as the Data Importer and Plot Point Editor. Previously this code was found in both the Idlekit and Idlekit-Example repositoriesExamples: A set of small, self contained example scenes that show how core concepts within Idlekit operate. Previously this functionality was found in the Idlekit-Example repository.Showcase: A game implementation that showcases the features of Idlekit. Previously this functionality was found in the IdleKit-Example repository.- As part of this restructure, the namespaces within Idlekit have been rationalized. The following changes have been made:
Idlekit.Showcasehas been added. All code specific to the Showcase project now exists within this namespace.Idlekit.Showcase.Testhas been added and holds any tests specifically for the Showcase project.Idlekit.Showcase.DataAssetImporterhas been added and contains the Showcase specific importer code.Idlekit.Exampleshas been renamed fromIdlekit.Exampleand now contains only code that is specific to the examples.Idlekit.Examples.Testhas been renamed fromIdlekit.Example.Testand now only contains tests specific to the examples.Idlekit.PlotPointhas been renamed fromIdlekit.PlotPointsand now contains all runtime code for Plot Points.Idlekit.Tools.PlotPointhas been added. All editor and non-runtime Plot Point code now resides in this namespace including the contents ofIdlekit.Example.PlotPoints.Editorwhich has been removed.Idlekit.Example.PlotPointshas been removed.Idlekit.Editorhas been added for general code used only in editor.Idlekit.Tools.Editorhas been added for tools specific editor code.Idlekit.Tools.Commonhas been added. Code shared between the examples and showcase, mostly UI related, now resides here.Idlekit.Tools.Common.Debughas been renamed fromIdlekit.Example.Debug.Idlekit.Tools.DataAssetImporterhas been renamed fromIdlekit.DataAssetImporter.Idlekit.Tools.Testhas been renamed fromIdlekit.Test. This is now the only namespace for core Idlekit tests.
Entity Refactor
- The
IEntityDatainterface has been added: - All Static Datas that are owned directly by Entity Controllers should inherit from this interface.
- This interface requires that a
Create<T>method be implemented on derived types.- This method is responsible for creating the Entity Controller (
IEntityController) along with any other dependencies for the Controller such asISavedData. SeeStageData.Create<T>for an example. - This creation functionality previously lived in the
ILoaderServicefor each Entity type.
- This method is responsible for creating the Entity Controller (
- The
IEntityyControllerinterface has been added. Each Entity Controller should now inherit from this interface. - The interface requires that getters be implemented for
instanceIdandstaticDataId. Both of these members should be set via theIEntityData.Create<T>method.- The
staticDataIdshould be taken from theIEntityDatathat is creating the Entity Controller - The
instanceIdshould be unique if you wish to allow for instancing of your Entity Controller
- The
- The interface also requires that a
Cleanup(ILoaderService)method be implemented. This method is called when the object (and any entities it is the owner of) should be unloaded from the loader service. - The following Entity Controllers are now
IEntityControllers: - IBoost
- ICharacter
- IContent
- ICurrency
- IExchangeRate
- IGeneratorUnitTargetSequence
- IGeneratorEntity
- IGoal
- IModifier
- IReward
- ITimedReward
- IStage
- All instances of
Load,Begin, andEndthat existed in Entities or Actions have been converted toInitializeandCleanupcalls. This is only a naming consistency refactor.
Loader Service Refactor
- As a result of the changes to Entities described above, the
ILoaderServiceinterface has been simplified and genericized. - All Entity specific load methods have been removed.
- This functionality is instead now found within each Entities
IEntityData.Create<T>method which is invoked directly by theILoaderService. - For example, a call
_loaderService.LoadStage(_stageId)would be replaced with_loaderService.LoadEntity<IStage, IStageData>(_stageId, _stageInstanceId). ILoaderServicenow implements the following methods:UnloadEntityLoadEntity<TReturn, TData>LoadAllEntities<TReturn, TData>LoadAllEntitiesOfType<TReturn, TData>Clear
Generator Refactor
IGenerator:- Renamed to
IGeneratorEntity. IGeneratorEntityrequires (and is created by) theIGeneratorEntityData.- Be sure to implement the
generatorEntityData(all data) andgeneratorData(defining data) separately as they are.- Because the
generatorDatadefines the generator conceptually, it will likely be a constant between many differentIGeneratorEntityobjects. The balance and the rewards might change, but the idea, relationships, definition, and look of the 'same' generator (GeneratorData) from stage to stage should stay consistent. IE: The idea of a "Gas Station" being a generator in a game needs only oneIGeneratorDatabut will have manyIGeneratorEntityDatato allow different rewards and/or balances depending on the stage. - Because of the above,
modiableDatashould returngeneratorDataso that a single relationship between modifier and modifiable can be made but still persist from stage to stage despite each stage likely having uniqueGeneratorEntityDatareferences.
- Because the
IGeneratorStageData:- The data held within this class now lives in
IGeneratorEntityData. - As a result,
IStageno longer needs aGeneratorStageDataarray and instead only needs to reference an array ofIGeneratorEntityDataids to define which generators will run in the stage. IGeneratorData:- Data input where this object is used is now in the
IGeneratorEntityDataassets instead of theIStageDataassets. No longer has anisContentSpecificboolean. - Still implements the
IModifiableDatathat will be used by theIModifiableportion of theIGeneratorEntity(instead of passing that responsibility off toIGeneratorEntityData). This is becauseIGeneratorDatais the constant between the same generator concept from stage to stage (IE: "Gas Station", "Pet Store", etc). This way, referencing aGeneratorDataas a modifier's target will persist that relationship from stage to stage. See theIGeneratorUpgradeNotes for extra details. IGeneratorBalanceData:- Is now referenced by
IGeneratorEntityDataassets instead of theIStageDataassets. IGeneratorUnitTarget:- This object was doing nothing but holding a reference to its data and is removed. Reference a
IGeneratorUnitTargetDatainstead. IGeneratorUnitTargetSequenceData:- Is now referenced by
IGeneratorEntityDataassets instead of theIStageDataassets. IGeneratorSavedData:IGeneratorSavedData.BeginProductionwas doing extra calculations due to its param being a DateTime. This param has changed tolong timestampMs.- Due to the above change,
IGeneratorSavedData.startProducingTimehas been deprecated. UsetimestampMsinstead. _startProductionTotalMsis removed asIGeneratorSavedDataimplementsITimedSavedData.
IUnlockable Implementation
- This new interface can be used as a way of marking an Entity that can be both
available(the player can earn or be rewarded the Entity) andobtained(the player has aquired the Entity). - Both
ICurrencyandIUpgradeableCurrencynow inherit fromIUnlockableand implement getters foravailableandobtained. - On
IUpgradeableCurrencytheisOwnedflag is now replaced byobtainedto reflect the changes to the new available and obtained logic. - Also on
IUpgradeableCurrencytheisUnlockedflag is replaced byavailableto reflect the changes to the new available and obtained logic. IUpgradeableCurrencySavedData.isUnlockedis replaced byIUnlockable.availableto reflect the changes to the new available and obtained logic.
Goal Refactor
IGoalhas been refactored so that Goals can operate in isolation. They no longer have any reference to sequences or other indicies related to the ordering of goals within aIStage.- As a result,
IGoalSequenceSavedDatahas been renamed toIGoalSavedDatawith eachIGoalowning it's ownIGoalSavedData. IStageSavedDatano longer handles goal saved data as a result.IGoalSequenceSavedData.slotIndexandIGoalSequenceSavedData.goalIndexhave been removed and this goal tracking functionality is now handled byIStageSavedData.activeGoalIndicies.
IBoostData
- As a result of the Entity refactor,
IBoost CreateBoost(ISavedDataManager savedDataManager, IActionManager actionManager)has been deprecated please call IEntityData.Createinstead.
IBoostSavedData
IBoostSavedData.isActiveis moved toIBoost.isActive.
IRewardData
- As a result of the Entity refactor,
CreateReward(ICurrencyManager, IRewardManager, IActionManager)has been deprecated, please useCreateReward(ICurrencyManager, IRewardManager).
IUpgradeableCurrency
IUpgradeableCurrency.currentLevelis replaced byIUpgradeable.levelfor consistency.
idlekit-implementation
ClearContentAction
- The constructor now requires
ILoaderServiceto be passed as a dependency.
CollectFromGeneratorAction
- The constructor no longer requires
IEconomyto be passed as a dependency.
CurrencyUnlockedEvent
CurrencyUnlockedEventis renamed toCurrencyObtainedEventto reflect the changes to the new available and obtained logic.
GrantRewardAction
GrantRewardAction.GrantRewardsdeprecated all but one signature:GrantRewards(string[] rewardIds, int randomSeed).
LoaderService
- The constructor now requires that only the
IDependencyContaineris passed as a dependency.
RandomRarityCurrencyReward
RandomRarityCurrencyRewardalong with itsIStaticDataandISavedDatahave been renamed toRandomTagCurrencyReward.
TimedBoost
durationhas been renamed totimeRemainingfor consistency with other similar calls.
UpgradeLevelData
- As
UpgradeLevelDatanow inherits fromIUpgradeLevelDatathe return type ofUpgradeLevelData.upgradeRequirementsis nowIUpgradeRequirement. Functionality which relied on this property returningUpgradeRequirementmust now cast the returned object to this type.
idlekit-examples
- N/A
idlekit-tools
RandomCurrencyRewardDataAssetCreator
RandomCurrencyRewardDataAssetCreatoris renamed toRandomTagCurrencyRewardDataAssetCreatorfor consistency.
DataAssetImporter
DataAssetImporterand related classes have been renamed toBaseDataAssetImporter. These classes have also been virtualized to allow derived implementations ofBaseDataAssetImporter. Constants header scripts have also been moved into Showcase repo.- The importer no longer supports the generation of sparse arrays in data structures. If csv data contains empty entries between populated entries (eg. ) these entries must be consolidated (eg. ,currency1, currency2, , ,currency3, should become ,currency1, currency2, currency3,). If this is not done the importer will cease generating data for a given structure on the first empty entry found.
ExampleContent
ExampleContenthas been renamedShowcaseContentand moved into Showcase repo.
idlekit-showcase
DataAssetImporter
ShowcaseDataAssetImporterand related classes have been implemented based on the base classes in the tools repo. Constants header scripts have been moved into Showcase repo.
ExampleContent
ExampleContenthas been renamedShowcaseContentand moved into Showcase repo.
Version 0.14.0 to 0.15.0, 2019-01-07
BuyMissingResourcesAction
- BuyMissingResourcesAction has been deprecated in v0.15.0, please use MakeExchangeAction instead, which functions identically.
Example Project
- A new
ExampleContenttype which derives fromContenthas been added into the Example Project. WhereContentaims to showcase an in-game implementation of each core idlekit concept, theExampleContentis designed to show extended functionality which may be of use in your game. Extended functionality such as Trades and TimerTrunk has been implemented in theExampleContentand the Missing Resource ExchangeRate functionality that was previously inContenthas been moved toExampleContent.
ExampleContentDataAssetCreator
ExampleContentDataAssetCreatornow inherits from aBaseContentDataAssetCreatorto allow for shared functionality between it and theContentDataAssetCreator. If you have implemented a custom ContentDataAssetCreator it should now inherit fromBaseContentDataAssetCreator.
GachaItem
GachaItem.weighthas been deprecated in 0.16.0, useGachaItem.randomWeightinstead.
IContent
IContentandIContentDatahadmissingResourcesExchangeRateandmissingResourcesExchangeRateIdremoved as they were to specific to the example project. For reference, seeExampleContentin idlekit-example.IContentpreviously had two constructors where it shouldn't have (one was unused). The removed constructor was one that ignored thestageIdsfield ofIContent.
ICurrencyManager
GetAllCurrenciesOfRarityis deprecated in v0.15.0. Please useGetAllCurrenciesOfTagOrRarityinstead.ICurrencyManagernow requires a GetAllCurrenciesOfTagOrRarity() method. If you have a custom class that derives fromICurrencyManagerit must now implement this function. See CurrencyManager.cs for a sample implementation.
ICurrency
ICurrencyManagernow requires a ContainsTagOrRarity() method. If you have a custom class that derives fromICurrencyit must now implement this function. See Currency.cs for a sample implementation.
IGlobalUpdateManager -> IUnityEventListener
IGlobalUpdateManagerhas been replaced withIUnityEventListener.IUpdateable,ILateUpdateable, andIFixedUpdateablehave been removed. Listeners for those methods should register with the corresponding eventsOnUpdate,OnLateUpdate, andOnFixedUpdateonIUnityEventManager.
ITimerService
long GetUnixTimeStampInSecondsandlong GetUnixTimeStampInMillisecondshave been changed todouble timestampInSecondsanddouble timestampInMillisecondsto avoid casting.Tick(float elapsedTime)has been changed toProcessSubscriptions().
LoadContentAction
- No longer begins the content automatically by calling
IContent.Load, that responsibility now lies in the class that fired this action. In our case, Main.cs.
Version 0.13.2 to 0.14.0, 2018-11-23
GrantRewardAction
rewardsis deprecated and renamed torewardResultsfor clarity.
IContent
CanAscendhas been deprecated, please useIStage.CanAscendonthe currentStageinstead.
IContentData
stageSequenceDatashas been deprecated and moved to example specificLoopingContentData. IdleKit now only contains a basicContentDatadata class that holds a list of stage ids.stagePlaythroughStylehas been deprecated as we now subclassContentDatawithLoopingContentDatafor different playstyles.GetStageDatahas been deprecated in, please callIContent.currentStageIdinstead.GetNextStageDatahas been deprecated in, please callIContent.nextStageIdinstead.GetNextStageDataIndexhas been deprecated in, please callIContent.nextStageIdinstead.
IContentSavedData
playthroughAmountshas been deprecated since it is too specific for an interface implementation.IncrementPlaythroughhas been deprecated since it is too specific for an interface implementation.SetCurrentStageIndexhas been deprecated since it is too specific for an interface implementation.- The above variables have been moved to the example specific
LoopingContentSavedData. currentStageIndexhas been deprecated since it is too specific for an interface implementation, please callcurrentStageIdinstead.BeginContenthas been deprecated, please use setter ofhasStartedinstead.
ICurrency
Has(double amount)has been deprecated since we want to support a gameplay that the user canAddorRemovea positive or negative amount, please callGet()and compare the values instead.
ICurrencyManager
HasCurrencyAmount(string id, double amount)has been deprecated since we want to support a gameplay that the user canAddorRemovea positive or negative amount, please callGetCurrencyAmount(string id)and compare the values instead.ICurrencyManagerno longer listens toStaticDataAddedevent. Instead,ICurrenciesare now loaded and registered toICurrencyManagerinLoadContentAction.
IEconomy
- Some methods related to the cost of generator units have been refactored to improve usability and functionality.
IEconomy.GetMaxGeneratorUnithas been renamed to the more accurateGetAffordableUnitsToNextTarget.Economy.GetMaxGeneratorUnithas been moved toIEconomyand renamedGetMaxAffordableUnits. A 'max' argument has been added which allows for a cap on the maximum number of units the be specified, a default of -1 can be passed for no cap. The 'reserve' argument has been removed as the currency reserve is now calculated internally.- See
CanvasGeneratorView.csin idlekit-example for an example of how this functionality is used. GetPayout(IGenerator generator, bool applyModifiers, int additionalLevels)has been deprecated in, please useGetPayout(IGenerator generator, bool applyModifiers)insteadGetSpeed(IGenerator generator, bool applyModifiers, int additionalLevels)has been deprecated in, please useGetSpeed(IGenerator generator, bool applyModifiers)instead
IExhangeRates
IExchangeRatehas been added to allow a conversion rate to be calculated between two exchangable items.- As
ICurrencynow inherits fromIExchangableallCurrencytypes must implement aGetExchangeValue()method to allow for exchange rates to be calculated. SeeCurrency.GetExchangeValue()as an example implementation. IContentnow contains a missing resourcesExchangeRatethat can be used to calculate an exchange rate. As a result,IContentDatanow contains an Id for the missing resources exchange rate asset.
ILoaderService
LoadStage(IContentData contentData)has been deprecated, please callLoadStage(string stageId)instead.LoadGoals(IStagedata stageData), please callLoadGoal(string goalId, IGoalSequenceSavedData goalSequenceSavedData.
IModifierData
Init(string guid, IModifierCategoryData modifierCategoryData)has been deprecated, please callLoad(IModifierCategoryData modifierCategoryData)
IModifierManager
IModifiables no longer registered to theIModifierManageronStaticDataAddedevents.IModifiers no longer registered to theIModifierManagerthemselves, instead they are now registered toIModifierManagerinLoadContentActionandLoadStageAction.- constructor
ModifierManager(IStaticDataManager staticDataManager, IEventManager eventManager)has been deprecated, please callModifierManager(IEventManager eventManager)instead
IRarity
ICurrencynow containsITagDataandIRarityDatamembers to hold tag and rarity information. While tags are optional, allCurrencytypes must have aRarity. As a resultICurrencyDatanow requires Ids for both tags and rarity. SampleRarityassets can be found in the IdleKit-Example Data folder.- The
EntitiesDatabasenow contains functionality to loadIRarityDataandITagDatainEntitiesDatabase.Load(). If using a custom loader process thenITagDataandIRarityDataassets must be loaded prior to otherEntitiesas they may depend on them.
IRewardManager
IRewardManagerno longer listens toStaticDataAddedevent. Instead,IRewardsare now loaded and registered toIRewardManagerinLoadContentAction.
IStaticDataManager
AddDataCollection(string[] ids, T[] data)has been deprecated, please callAddDataCollection(T[] data)insteadAddDataCollection(string[] ids, object[] data, Type entityType)has been deprecated, please callAddDataCollection(T[] data)insteadStaticDataAddedEventevent is not used anymore in the IdleKit framework as IdleKit loads the entities withILoaderServiceand registers them with their respective IServices directly.