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.basePayout
has been changed tobasePayoutAmount
due to the introduction ofIPayoutEntity
.IBaseCollectorBalanceData.payoutCurrencyId
has been changed topayoutEntityId
due to the introduction ofIPayoutEntity
.IBaseCollectorEntity.payout
has been renamed toIBaseCollectorEntity.payoutAmount
due to the rename ofIBaseCollectorBalanceData.payoutCurrencyId
.IBaseCollectorEntity.GetPayout(bool, IModifier[])
has been renamed toIBaseCollectorEntity.GetPayoutAmount(bool, IModifier[])
due to the rename ofIBaseCollectorBalanceData.payoutCurrencyId
.
Generator
IGeneratorEntity.payoutCurrencyPerMillisecond
has been changed toIGeneratorEntity.payoutAmountPerMillisecond
due to the introduction ofIPayoutEntity
.
Random
IRandomService.InitializeRandom
has been deprecated useInitializeRandom(int)
withint GetRandomSeed()
to obtain a random seed.
Reward
IReward.CalculateRewards(int)
has been changed toIPayoutEntity.CalculatePayouts()
since nowIRewards
implementsIPayoutEntity
.- User should set the seed using the
IRandomService.InitializeRandom(int)
first before callingCalculatePayout()
.
idlekit-implementation
State Action
GrantRewardStateAction.rewardResults
has been renamed toGrantPayoutsStateAction.payoutResults
due 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
IEventContentSavedData
andIStandardEventContentSavedData
have been removed along its tracking ofmilestoneIndex
.- Use the
IContent.contentSavedData
to access content saved data information onIEventContent
. - Use the
IEventContent.GetCurrentMilestone()
to access the currentIMilestone
. - Use the newly added
IEventContent.GetCurrentMilestoneIndex()
to replicate the previousmilestoneIndex
functionality.
- Use the
Event Settings
IEventSettings.CanCompleteMilestone(string);
has been changed toIEventSettings.CanCompleteMilestone(IMilestone);
as the method implicates that theIMilestone
in parameter should be loaded.IEventSettings.SetMilestoneCompletionTime(string, long);
has been changed toIEventSettings.SetMilestoneCompletionTime(IMilestone, long);
as the method implicates that theIMilestone
in parameter should be loaded.IEventSettingsSavedData.CompleteMilestone(string,long);
has been changed toIEventSettingsSavedData.SetMilestoneCompletionTime(string, long, bool);
.
Generator Entity
GeneratorStateType
enum has been converted into a static class that contains constantstate string
. This is done so newstring
state 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 theIGeneratorState
has the generic function parameter.IGeneratorEntity.Collect(long count=1)
now returnsbool
instead 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.completionTime
has been changed toMilestoneCompletionInfo.projectedCompletionTime
to denote the fact the value can be changed by projection or actual completions.
Timer Subscription
bool hasInitialTime
has been changed tobool hasStartTime
to coincide with the usage ofendTime
.DateTime initialTime
has been changed toDateTime startTime
to coincide with the usage ofendTime
.long initialTimestamp
has been changed tolong startTimestamp
to coincide with the usage ofendTime
.
idlekit-implementation
Action
CompleteMilestoneStateAction
has been deprecated asIEventContent
no longer keeps track fo the currentmilestoneIndex
. CallIEventSettings.SetMilestoneCompletionTime(IMilestone, long)
to set theMilestoneCompletionInfo
.SetProjectedMilestoneCompletionStateAction
has been renamed toSetMilestoneCompletionInfoStateAction
. It is now called fromIEventSettings.SetMilestoneCompletionTime(IMilestone, long)
to project completion of theIMilestone
or actually complete theMilestone
.- The
ClearContentStateAction
has been renamedClearContentIdStateAction
and a newClearContentAction
has been added. Any game code listening to the previousClearContentStateAction
will need to be updated to one of these two new actions. Which action to listen to depends on the desired behaviour: ClearContentIdStateAction
is called at the end of the process of wiping downIContent
andIContentData
when switching content. It is not called whenStartup.ResetGame
is called.ClearContentAction
is called when theIContent
entity is unloaded. Most game code/UI code that is interested in theIContent
should now listen to this event. It is called when switching content and whenStartup.ResetGame
is called.
Generator Entity
- The
EventContent
constructor now takes astring[] collectorEntityIds
as a parameter. Any extending implementations will need to have their constructors updated accordingly. GeneratorEntity.Collect(long count=1)
now returnsbool
instead ofvoid
. Any overriding implementations will need to be updated accordingly.- The
GeneratorEvent
has been removed. Use any of the following events instead: GeneratorInitializedEvent
GeneratorPayoutChangedEvent
GeneratorStateChangedEvent
GeneratorSpeedChangedEvent
Startup
- The
Startup.ResetGame
flow now does not result in theIUserSavedData.contentInstanceId
being wiped. This means when the app is restarted via this flow, the player will re-enter theIContent
previously loaded. To retain the previous behaviour whereResetGame
resulted in always loading into main game Content, theStartup.SetClearContentLoadPhases
method can be overridden to always queue theIClearContentIdLoadPhase
.
Standard Content
- The
StandardContentData
andStandardEventContentData
constructors now takes astring[] collectorEntityIds
as a parameter. Any extending implementations will need to have their constructors updated accordingly.
idlekit-tools
Simple Entities Database
- The grouping of data in the
SimpleEntitiesDatabase
has been updated to reflect how data is grouped in the IdleKit CSVs. OldSimpleEntitiesDatabase
assets will have to be updated since references will be lost. The affected fields are as follows:Reward Data
has been split intoAscension Reward Data
andCurrency Reward Data
Tag Data
andRarity Data
has 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
eventDuration
has 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.cs
for an example.
Goal
- Any
IGoal
implementations must now implement aReset()
method. This method should deactivate theIGoal
and 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.canClaim
now checks iftargetProgression
has been set, soGoal.canClaim
returns false if the goal has not been activated.
Milestone
- Any
IMilestone
implementations must now implement aActivate()
method, which overloads the existingActivate(double initialProgress)
method. IMilestoneSavedData
implementations must now implementisActive
,Activate()
, andDeactivate()
.
Standard Content
IStandardContent.HasValidActiveTrade()
has been deprecated, use getterIStandardContent.standardContentFeatures.activeTrade
to get the activeITrade
to 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
TradeActivatedAction
andTradeDeactivatedAction
have been deprecated, subscribe toToggleActiveTradeStateAction
and use the propertybool activated {get;}
to see if theITrade
is activated or deactivated.
PlotPoint Runtime
IPlotPointSequenceData IPlotPointController.sequence { get; }
has been renamedIPlotPointSequenceData activeSequence { get; }
.bool IPlotPointController.canPlay
has been removed from the interface usebool IPlotPointController.isPlaying
or the concrete implementationPlotPointController.canPlay
.
PlotPoint Activation
MilestoneCompletedActivationCondition.ctor(string, string)
has been changed toMilestoneCompletedActivationCondition(string)
.
Reward
IGachaItem
s andIRandomWeighted
items with 0 weight will no longer be chosen as part of aGachaReward
.
Standard Content and Standard Event Content
StandardContent.timerSubscription
,StandardContent.UpgradeProgression
andStandardContent,OnTimerEnded
have been deprecated. They were moved toStandardContentFeatures.timerSubscription
,StandardContentFeatures.UpgradeProgression
andStandardContentFeatures.OnTimerEnded
. CallIStandardContent.standardContentFeatures
to access the functions.StandardEventContent.timerSubscription
,StandardEventContent.UpgradeProgression
andStandardEventContent,OnTimerEnded
also 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
dispatchAs
is deprecated. UsetypesToDispatchAs
instead.
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.CompleteMilestone
has been removed as it manipulated saved data directly. This functionality can be performed via theCompleteMilestoneStateAction
instead.
Load Phase
IContentDataLoadPhase.Initialize(string, Func<string, IStaticData[]>)
is deprecated. UseIContentDataLoadPhase.Initialize(Func<string, IStaticData[]>)
instead as thecontentInstanceId
is loaded from theIUserSavedData
instead of being passed in.ILoadContentLoadPhase.Initialize(string)
is deprecated. ThecontentInstanceId
is loaded from theIUserSavedData
instead 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
SetContentIdLoadPhase
to 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.OnTimerEnd
will need to be updated accordingly.
idlekit-implementation
Action
StaticDataAddedAction
andStaticDataRemovedAction
have hadbool contentSpecific { get; set; }
removed as content specific is only a concept related to theISavedDataProvider
. However, you can still get the information from theIStaticData[] data
if they can be casted toISavedDataProviders
.dispatchAs
is deprecated. UsetypesToDispatchAs
instead. All actions and state actions will have to be updated to reflect this change.- Passing a null instance to
ActionService.Unsubscribe
will now result in a warning being generated. If you were doing this previously, null check the instance before callingUnsubscribe
.
Event Settings
EventSettings.CompleteMilestone
has been removed as it manipulated saved data directly. This functionality can be performed via theCompleteMilestoneStateAction
instead.
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
IEvent
s have been renamed toIAction
s. - All
IPlayerEvent
s have been renamed toIStateAction
s. IPooledEvent
has been removed as pooling is done in the dependency container. Subsequently,IPooledEvent.OnReturnToPool()
has been renamed toIAction.ResetEvent()
.- All
IActions
have been refactored to work with dependency injection and implementIInjectable
.
Action Service
IEventService
has 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
,ICharacterSavedData
andICharacterDataAsset
have been removed.IGeneratorEntity
andIGeneratorData
had 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 theIContent
gets 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.startingCurrencyAmounts
and their overrides have been renamed toIContentData.initialCurrencyAmounts
in all places in the codebase.- In
IStandardContent
andIStandardContentData
,missingResourcesExchangeRateMultiplier
has been split intosoftCurrencyMissingResourcesMultiplier
andupgradeableCurrencyMissingResourcesMultiplier
Currency Service
- This service was renamed from
ICurrencyManager
toICurrencyService
. T[] GetAllCurrencies<T>(Predicate<T>)
has been removed. UseIResolver.ResolveAll<TContract>(Predicate<TContract>)
instead.IUpgradeableCurrencyManager
has 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 theICurrencyService
interface. If your project used these methods you will need to extendICurrencyService
and re-implement them.
Dependency Container
IDependencyContainer
andDependencyContainer
has been renamed toIContainer
andContainer
that implements theIResolver
andIBinder
. Refer to the documentation site for more information.IContext
andContext
have been refitted to contain the newIContaienr
andIInstaller
, which is now the location of all the binding information.- Binding with the new
IDependencyContainer
is now located inIInstaller
and its implementations.
Entity
- All
IEntity
have been refactored to work with dependency injection and implementIInjectable
. IEntityController
has been renamed toIEntity
.IEntityData.Create<T>(IDependencyContainer)
has been change toIEntityData.CreateEntity(string)
so the entity created only takes ininstanceId
andstaticDataId
and have its other dependency injected.ISavedDataProvider.CreateSavedData(string, IDependencyContainer)
has been changed toISavedDataProvider.CreateSavedData(string)
due to the introduction of the dependency container.IStaticData.isContentSpecific
is moved toISavedDataProvider
as it affects the way saved data being saved.IEntity
,IEntityData
, andISavedData
all have minimal constructors as the dependencies are now injected inInjectable.Inject
instead.- Now an
IEntity
is created with thector(string, string)
,Injected(IResolver)
with all the dependencies, setup withInitialize()
, and cleaned up withCleanup(IEntityLoader)
. Please refer to theUnderstanding Entities
page in the manual section of the documentation website. IEntity.Initialize
method is introduced that means all implementation would require to implementvoid Initialize()
.IEntity.Cleanup
is now required to be implement if theIEntity
holds any reference - loading any subIEntities
(i.e:IStage
loading allIGenerators
. Therefore thoseIGenerators
need to be unloaded withloader.UnloadEntity(generators)
), or obtain object references (i.e:IStage
holding reference ofIStageData
).IEntityCache
is now deprecated and replaced by the dependency container.ILoaderService
has been renamed toIEntityLoader
as it no longer stores the references of the loadedIEntities
.IStaticDataManager
has been renamed toIStaticDataLoader
as it no longer stores the reference of the loadedIStaticData
.- All
IEntityDataAsset
classes now need to pass a generic data Type through to a baseIGuidReferencable<T>
.
Event
IEvent
s and all related classes have been renamed toIAction
s.
Event Content Service
IEventContentService
has been renamed toIEventService
. Note that what used to beIEventService
is now namedIActionService
.
Event Service
IEventContentService
has been renamed toIEventService
. Note that what used to beIEventService
is now namedIActionService
.IEventService.RegisterEventSettings(IEventSettings[])
andIEventService.RegisterEventSetting(IEventSetting)
have been deprecated asIEventSettings
are now cached in theIContainer
.bool CanClaimRewards(string)
andvoid ClaimRewards(string)
have been removed from theIEventService
. UseIEventSettings.CanClaimRewards(string)
andIEventSettings.ClaimRewards(string)
directly on the associatedIEventSettings
instead.
Generator
- The following fields have moved from
IGeneratorBalanceData
toIGeneratorEntityData
. All implementations and references of these fields will need to be updated accordingly, and allIGeneratorBalanceDataAsset
s andIGeneratorEntityDataAsset
s will need to be regenerated.costToBuy
buyCurrencyId
upgradeableCurrencyBuyRequirements
costToAutomate
automateCurrencyId
upgradeableCurrencyAutomationRequirements
Goal
IGoal.normalizedProgress
andIGoalSavedData.normalizedProgress
now return a double instead of a float
Logging
- All Logging related classes and interfaces including
IdleKitLog
have been moved into a separate repository atgit@github.com/Idlekit/idlekit-logging.git
and 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.rewardId
has been removed. The reward Id for aMilestone
can 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.progress
has been renamed toIMilestoneSavedData.progression
for consistency withIGoalSavedData.progression
.IMilestone.normalizedProgress
now returns a double instead of a float
Modifiers
ModifierSearchResult
has been removed and its functionality is now handled byIModifierGroupData
andIModifierFormula
. All usages of this class must be updated accordingly.- Added
IModifierFormula
,IModifierFormulaData
,IModifierFormulaDataAsset
, andIModifierFormulaParser
IModifierCategoryData
andIModifierCategoryDataAsset
have been renamed toIModifierGroupData
andIModifierGroupDataAsset
.- Methods in
IModifierCache
andIModifierService
that used to useIModifierCategoryData
types now useIModifierFormula
types. IModifierData.Initialize(IModifierCategoryData modifierCategoryData)
has been removed since it no longer keeps a reference toModifierCategoryData
.IModifierData.priority
has also been removed since the newIModifierFormula
handles priority implicitly.
- Added
Namespaces
- The following namespaces within
idlekit-framework
have been changed. Any game code referencing these will need to be updated.IdleKit
toIdleKit.Framework
IdleKit.PlotPoint
toIdleKit.Framework
PlotPoint
- All classes that implemented
IPlotPointDataAsset
have been converted to implementIPlotPointDataAsset<T> where T : IPlotPointData
instead so theirdata
can be of the derived type instead of the baseIPlotPointData
. IPlotPointActivationCondition
has been incorporated into theIContainer
and becameIInjectable
therefore the previousIPlotPointActivationCondition.Start
method has been eliminated.IPlotPointActivatorData.Start
andIPlotPointActivatorData.Cleanup
have been removed as theIPlotPointService
is now in charge of creating and injecting theIPlotPointActivationCondition
.IPlotPointSequenceCollectionData.StartActivators
andIPlotPointSequenceCollectionData.Cleanup
have been removed as it is now a pure data class. The functionality is moved intoIPlotPointService
.IPlotPointService.QueueSequence
has been refactor to. InvokeIPlotPointService.ActivatePlotPoint(IPlotPointActivationCondition)
directly instead.IPlotPointService.hasQueuedSequences
has been removed. Perform a null check onIPlotPointController.sequence
instead.IPlotPointService.GetNextSequence
has been removed. As thePlotPointSequenceData
can be triggered in arbitrary order.IPlotPointController.frames
andIPlotPointController.actions
have been removed. You can get the same information fromIPlotPointController.sequence
to get theIPlotPointSequenceData
which contains theframes
andactions
information.IPlotPointController.currentActionIndex
has been removed. However, it is still available in thePlotPointController
concrete class.IPlotPointController.isPaused
has been removed. UseIPlotPointController.canPlay
instead.
Reward
ITimedRewardSavedData
has 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.duration
orITimedRewardData.initialDuration
should be used.
RandomTagsCurrencyReward
has been renamed toRandomObtainedCurrencyReward
. TheallowUnobtained
option 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
,CurrencyUnlockReward
orCurrencyReward
instead. To reward an obtained currency, you can useRandomObtainedCurrencyReward
,CurrencyUnlockReward
orCurrencyReward
.- Any custom implementations of
IReward
must now support theignoreFallback
argument in theirCanClaim
method. 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 -> Cleanup
loading paradigm. Please refer to the documentation site for more information.- All
IServices
have 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.
ICurrencyManager
was renamed toICurrencyService
IEconomy
was renamed toIEconomyService
IEntityLoader
was renamed toIEntityLoaderService
IEventManager
was renamed toIActionService
IEventContentManager
was renamed toIEventService
IModifierManager
was renamed toIModifierService
IPlotpointManager
was renamed toIPlotpointService
IRewardManager
was renamed toIRewardService
IStaticDataLoader
was renamed toIStaticDataLoaderService
Stage
IStageData.startCurrencyId
andIStageData.startCurrencyAmount
have been deprecated. UseIStageData.startingCurrencyAmounts
instead.
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 systemTime
can be overridden by the user so an official time value can be provided from a backend.
Trade Service
- The method
GetRandomValidTrade
has 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 ofITrade
s or an array ofITrade
string IDs.
Unlockable
- The
IUnlockable
interface now requires thatSetAvailability
andSetObtained
methods now be implemented. These should set theavailable
andobtained
flags respectively. - The
IUnlockableSavedData
interface now requires thatSetObtained
method be implemented. This should set theobtained
flag. - The
IUnlockableData
has been removed. To make aCurrency
available
by default when aContent
orStage
starts, use theContent.initialCurrencyAmounts
orStage.availableCurrencyIds
.
idlekit-implementation
Action
Event
s have been renamed toAction
s.PlayerEvent
s have been renamed toStateAction
s.EventPools
have been removed inIActionManager
. It now uses the container to pool and cache theIAction
s.StageSelectedAction
has been removed as it has never been used. Entities should subscribe toStageInitializedAction
orContentInitializedAction
instead.- The order of firing of
ContentInitializedAction
>>>StageInitializedAction
has 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
IncrementGeneratorUnitStateAction
to 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. OpenTimerTrunkStateAction
has been removed. UseClaimTimedRewardStateAction
instead.- Goal and Generator data are now cleared at a later point when ascending. This allows for a more flexible UI flow.
OfflineProgressAction
has been renamed toOfflineProgressStartAction
in order to maintain consistency with the newOfflineProgressEndAction
. References to this action will need to be updated.IdleKitInitialized
event must now be initialized with a validIContent
.EventStartedEvent
andEventEndedEvent
are nowIStateAction
s and have been renamedEventStartedStateAction
andEventEndedStateAction
.AdvanceStageStateAction
will no longer set theContentSavedData.currentStageId
to null whenContent.nextStageId
is null. Instead, the previouscurrentStageId
will be retained. This means on ascending the finalIStage
within the content, theIStage
will not change, whereas previously the firstIStage
of the Content would be loaded. SeeCanvasAscendView
inidlekit-tools
as an example of how to present this to the player or the Looping Content example inidlekit-examples
if you want Stages to loop.
Boost
- The
_modifierDatas
field inBoostData
has been renamed to_boostModifierDatas
. - The
_duration
&_maxDuration
fields inTimedBoostData
have been renamed to_durationInSeconds
and_maxDurationInSeconds
. TheTimedBoostData
constructor has been updated to match. - The
duration
andmaxDuration
properties inTimedBoostData
now represent milliseconds rather than seconds. Any client code using these values must be updated accordingly.
Content
- We no longer use
IContentSavedData.timeModified
to store user's last activity time as it is done now inIUserSavedData.SetLastActivityTime(long)
ContentData.isContentSpecific
has been set totrue
fromfalse
. This change will result in the filename of the serializedContentSavedData
to be changed.- In
StandardContent
,StandardContentData
,StandardEventContent
, andStandardEventContentData
,missingResourcesExchangeRateMultiplier
has been split intosoftCurrencyMissingResourcesMultiplier
andupgradeableCurrencyMissingResourcesMultiplier
- In
StandardContentData
andStandardEventContentData
constructors,missingResourcesExchangeRateMultiplierId
is replacedsoftCurrencyMissingResourcesMultiplierId
andupgradeableCurrencyMissingResourcesMultiplierId
Core
- All
IEntity
,IAction
, andIService
implementations have been refactored to work with dependency injection and implementIInjectable
.
Currency Service
- This service was renamed from
CurrencyManager
toCurrencyService
. - All
ValidateCurrency
logic has been removed as they are just empty. OverrideCurrencyService
if you wish to perform validation logic.
Entity Data
- All
IEntityData
have the dependency resolving logic (in methodIEntityData.Create<T>
) using the previousIDependencyContainer
removed. They are now being resolved inIEntity.Resolve(IResolver)
. - All
EntityParameters
classes that were previously being passed in the constructors of allIEntity
have been removed due to the introduction of the dependency container.
Entities Database
void AddStaticData<TStaticData>(ScriptableObject[])
has been renamed toTStaticData[] FetchStaticData<TStaticData>(ScriptableObject[])
.EntitiesDatabase
has been renamedSimpleEntitiesDatabase
and moved intoidlekit-tools
. Reimporting balance data will generate an updated database.PlotPointDatabase
has been renamedSimplePlotPointDatabase
and moved intoidlekit-tools
.
Events
Event
s have been renamed toAction
s.PlayerEvent
s have been renamed toStateAction
s.
Event Service
EventContentService
has been renamed toEventService
. Note that what used to beEventService
is now namedActionService
.
Goal
- The abstract class
MakeTradeGoal
now subscribes to aTradeAcceptedAction
instead of aMakeExchangeAction
. All implementations will need to be updated accordingly. Goal.normalizedProgress
andGoalSavedData.normalizedProgress
now return a double instead of a float
JsonSerializer
- The
JsonSerializer
has been renamedSimpleJsonSerializer
.
Main
Main
has 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 ofMain
will need to be changed to work with the new startup flow. Refer to the documentation website for more information.Main.content
has been removed as it is now being fetched from theIContainer
with_container.Resolve<IContent>(userSavedData.contentId)
.
Milestone
MilestoneData.rewardId
has been removed. The reward Id for aMilestone
can 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
MilestoneProgressAction
should now switch to useProgressMilestoneStateAction
MilestoneCompletedStateAction
should now switch to useCompleteMilestoneStateAction
normalizedProgress
now returns a double instead of a float
Modifier Cache
- The cache now uses HashSets to store
IModifiers
,IModifiables
, andIModifierFormula
. _specificModifierLookup
,_globalModifierLookup
,_specificModifiableLookup
, and_globalModifiableLookup
have been consolidated into_modifierLookup
and_modifiableLookup
. Methods have been updated to use the new lookup structure.
Modifier Service
- The
ModifierService
no longer automatically loads allIBoost
Entities in the Entities Database. Instead, anyIBoost
should be loaded by it's owning Entity. For example, theShowcaseContent
is now responsible for loading theIBoost
used for video ad bonuses. If required, the previous behaviour can be retained by reinstating the call_entityLoader.LoadAllEntities<IBoost, IBoostData>()
when theSetContentStateAction
is broadcast. IModifierFormula
andIModifierFormulaData
are now binded as singletons to their concrete type, which means only one instance of a type ofIModifierFormula
andIModifierFormulaData
is available.- Added
ModifierService.GetModifierFormula
to retrieve theIModifierFormula
of a specified type
Namespaces
- The following namespaces within
idlekit-implementation
have changed. Game code using classes within these will need to be updated.IdleKit
toIdleKit.Implementation
IdleKit.PlotPoint
toIdleKit.Implementation
NPM
- The sub-dependencies in
package.json
have been removed. These should now be specified only at the top levelpackage.json
file within your Unity project.
PlotPoint
BasePlotPointActivationCondition
now requires thestaticDataId
passed into the constructorctor(string)
.BasePlotPointActivationCondition.Initialize
has been renamed toBasePlotPointActivationCondition.Subscribe()
.PlotPointSetPlaybackAvailabilityAction
has been renamed toSetPlotPointPlaybackAvailabilityAction
.PlotPointPlaybackAvailabilityChangedAction
has been removed. Subscribe toSetPlotPointPlaybackAvailabilityAction
instead.PlotPointSequenceProgressAction
has been renamed toPlotPointFramePlayedAction
.- Previous implementation of
PlotPointDataProvider
has been moved toPlotPointEditorDataProvider
. AscensionActivationCondition
has 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.
CurrencyManager
was renamed toCurrencyService
Economy
was renamed toEconomyService
EntityLoader
was renamed toEntityLoaderService
EventManager
was renamed toActionService
EventContentManager
was renamed toEventService
ModifierManager
was renamed toModifierService
PlotpointManager
was renamed toPlotpointService
RewardManager
was renamed toRewardService
StaticDataLoader
was renamed toStaticDataLoaderService
Timer Trunk
- The
TimerTrunk
implementation has been renamed toTimedReward
. RelatedIAction
s andIStateAction
s have been renamed accordingly. Code that previously derived fromTimerTrunk
should now inherit fromTimedReward
.
Timer Subscription
- The overloaded constructor for
TimerSubscription
no longer accepts aDateTime
endTime without an initial timestamp. Any constructors using this parameter will need to be updated appropriately.
idlekit-tools
Actions
Event
s have been renamed toAction
s.PlayerEvent
s have been renamed toStateAction
s.AutoUnlockBuyGeneratorStateAction
has been removed. The functionality has been moved into the baseBuyGeneratorStateAction
.
Asset Importer
- The following headers have moved from the
GeneratorBalanceData
Asset Creator to theGeneratorEntityData
Asset Creator. Custom implementations will need to be updated accordingly.costToBuy
buyCurrencyId
upgradeableCurrencyBuyRequirements
costToAutomate
automateCurrencyId
upgradeableCurrencyAutomationRequirements
Core
- All
IEntity
,IAction
,IService
, andCanvasView
have 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.GuidReference
toIdleKit.Tools.Editor
IdleKit.Tools.Editor.PlotPoint
toIdleKit.Tools.Editor
IdleKit.Tools.Editor.DataAssetImporter
toIdleKit.Tools.Editor
IdleKit.Tools.Common
toIdleKit.Tools
IdleKit.Tools.Test
toIdleKit.Tools.Tests
Number Formatter
NumberFormatter.FormatDouble
will now round values under 1000 as specified via theroundDown
argument. This makes the behaviour consistent with values above 1000, UI using this may need to be updated accordingly.
NPM
- The sub-dependencies in
package.json
have been removed. These should now be specified only at the top levelpackage.json
file 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
ShowcaseDataAssetImporter
has been moved intoidlekit-tools
and merged, merged withBasicDataAssetImporter
and renamed toSimpleDataAssetImporter
.- All data asset headers and creator files have also been moved to
idlekit-tools
and renamed as follows:ShowcaseContentDataAssetHeader
toStandardContentDataAssetHeader
ShowcaseEventContentDataAssetHeader
toStandardEventContentDataAssetHeader
ShowcaseTimerTrunkDataAssetHeader
toTimerTrunkDataAssetHeader
ShowcaseContentDataAssetCreator
toStandardContentDataAssetCreator
ShowcaseEventContentDataAssetCreator
toStandardEventContentDataAssetCreator
ShowcaseTimerTrunkDataAssetCreator
toTimerTrunkDataAssetCreator
Events
Event
s have been renamed toAction
s.PlayerEvent
s have been renamed toStateAction
s.
Event Content
void IShowcaseEventSettingsSavedData.EndEvent()
has been removed. Usevoid IEventSettingsSavedData.CompleteEvent()
instead.
NPM
- The sub-dependencies in
package.json
have been removed. These should now be specified only at the top levelpackage.json
file within your Unity project.
Prefabs
- All prefabs are now nested prefabs which require a minimum Unity version of 2018.3.
Showcase Content
IShowcaseContent
now requires avideoAdBoost
property. This boost is intended to be used when the player views a video ad.IShowcaseContentData
now requires avideoAdBoostId
property.IShowcaseContentSavedData
andIShowcaseEventContentSavedData
have been added, which serialize aCurrencyAmount
to theIContentSavedData
. Deserialization of the saved data should be updated accordingly.ShowcaseContent
andShowcaseEventContent
, along with their interfaces, have been moved toidlekit-implementation
andidlekit-framework
, and renamedStandardContent
andStandardEventContent
.
Showcase Upgradeable Currency
ShowcaseUpgradeableCurrencyData
has been removed. Theavailable
flag of aUpgradeableCurrency
is now set viaStageData.availableCurrencyIds
orContentData.initialCurrencyAmounts
, either of which will make aCurrency
orUpgradeableCurrency
available at the start of theContent
orStage
.- As a result of the above change,
ShowcaseUpgradeableCurrencyManager
has been removed. It's functionality, of setting theUpgradeableCurrency.available
flag is now performed by theNewStageStateAction
andNewContentStateAction
.
TimerTrunk
ShowcaseTimerTrunk
and it's interface have been moved toidlekit-framework
andidlekit-implementation
. The classes have been renamedITimerTrunk
andTimerTrunk
.
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 complexMilestoneCompletionInfo
objects. 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
,EventSettingsData
andEventSettingsSavedData
have 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
IdleKitInitializedEvent
has been added to signify that all Entities within IdleKit have been initialized. If your integration of IdleKit does not useMain.StartGame
this event must be sent afterContent.BeginStage
has 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.isContentSpecific
is 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 defaultISerializer
implementation, 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.payoutCurrencyPerSecond
has been deprecated and replaced byGeneratorEntity.payoutCurrencyPerMilliSecond
. This resolves a bug which meant thatGeneratorEntity.payoutCurrencyPerSecond
was 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 toToggleBoostPlayerEvent
when requiring aTimedBoost
should 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.io
for additional information.
- Instead, use
IContentSavedData.lastActiveTimestamp
has been deprecated, useISavedData.timeModified
instead. This is due to theISavedData
refactor that addedtimeCreated
andtimeModified
to allISavedData
.IContentSavedData.SetLastActiveTimestamp(long)
has been deprecated, useISavedData.Save()
instead. This is due to theISavedData
refactor that addedtimeCreated
andtimeModified
to 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.GetCurrenciesWithTag
should be used instead. This method is expected to returnICurrency
with 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.cs
andGachaItem.cs
have been moved toidlekit-implementation
due to the introduction ofIGachaSlot
andIGachaitem
.GachaSlot.HasClaimableItem
has been moved toGachaReward.CanClaim(IGachaSlot)
.GachaItem.cachedReward
has been removed asIRewardManager
already 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.isUnlocked
andIGeneratorEntitySavedData.Unlock()
have been removed as they are legacy features and similar functionality is now achieved by using combination ofIUnlockable.available
andIUnlockable.obtained
on theIUpgradeableCurrency
associated with theIGeneratorEntity
(i.e: the cards representing theIGeneratorEntity
).GeneratorUnitTargetProgression
has 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
IModifierCache
must now be bound along with other dependencies so theModifierManager
can resolve it.IModifier.modifierId
must be implemented on any Entities that implementIModifier
. In most cases this should point to the static data id of theIModifier
.IModifierCategoryData.targetModifiableTypes
needs to be implemented on any customIModifierCategoryData
objects. This should return a list ofIModifiable
types 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.ITimedRewardSavedData
class has been deprecated. This is due to theISavedData
refactor that addedtimeCreated
andtimeModified
to allISavedData
.
Trade
- The behaviour of when a
ITrade
is valid has changed. Previously theavailable
andobtained
flags of theICurrency
would only be checked for input/outputIUpgradeableCurrency
. These flags will now be checked onICurrency
as well. - The implementation of Trades has been extensively refactored. Whereas previously only
ITradeData
existed inidlekit-framework
, trades are now a full entity with anITrade
controller interface. Any trade specific logic should now be encapsulated within implementations ofITrade
such asTrade
which can be found inidlekit-implementation
. - As
ITradeData
is now anIEntityData
rather thanIStaticData
any derived classes must implement aCreate
method that generates theITrade
Entity controller. - Input and output tags for
ITradeData
are now specified asITagData
arrays to allow for multipleICurrency
tags to be specified.
Saved Data Provider
CreateSavedData(string, ISerializer)
has been changed toCreateSavedData(string, IDependencyContainer)
due to theISavedData
refactor 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.initialDurationInSeconds
has been deprecated. UseTimerTrunkData.initialDuration
instead. This value is in milliseconds now.
Events
AscensionCompleteEvent
has been renamed toAdvanceStageEvent
for more clarity.AscendPlayerEvent
has been renamed toAscensionCompletePlayerEvent
which concludes the ascension gameplay and grants rewards.BuyGeneratorPlayerEvent
has had functionUpdateGeneratorState()
renamed toBeginProduction()
for clarity, andUnlockGenerator()
deprecated due to the removal ofIGeneratorEntitySavedData.Unlock()
method.LogLastActiveTimePlayerEvent
has had constructor changed fromctor(ITimerService)
toctor()
asITimerService
is no longer needed whenISavedData.Save()
would modify thetimeModified
.
Generators
AutoCollectState.collectDuration
is now along
instead of afloat
. This value is in milliseconds now.GeneratorUnitTargetSequenceData
's default constructorctor()
has been removed but without aSystem.Obsolete
tag because it is still use by the ScriptableObject internally and thus will throw an error.
Goals
-
The following
IGoal
s' constructors have been changed toctor(string, TGoalData, IGoalSavedData, IEventManager, IEntityCache, ITagService, ITagData[])
due to the tag refactor:CollectCurrenciesWithTagsGoal
DynamicCollectCurrenciesWithTagsGoal
SpendCurrenciesWithTagsGoal
UpgradeCurrenciesWithTagsGoal
-
The following
IGoalData
s' constructors have been changed toctor(string, string, double, string[])
due to the tag refactor:CollectCurrenciesWithTagsGoalData
DynamicCollectCurrenciesWithTagsGoalData
SpendCurrenciesWithTagsGoalData
UpgradeCurrenciesWithTagsGoalData
Main
- Due to deprecation of
AscensionCompleteEvent
theMain.cs
now listens toAdvanceStageEvent
to load the newIStage
.
Modifiers
- If
ModifierManager
has been extended, or a customModifierCache
has been implemented, the following applies:ModifierManager
has 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 implementIModifierManager
or extendModifierManager
and be bound into the dependency system.
ModifierCache.GetModifiersAffectingModifiable(string modifiableId)
andModifierCache.GetModifiersAffectingModifiable<TModifierCategoryData>(string modifiableId)
have been changed to returnIModifiers
that affect the givenIModifiable
viaModifierData.affectAll
. Previously these would not be returned. These methods also have new strictIModifierCategoryData
verification that will not returnIModifier
objects 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 theISavedData
refactor. - 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.durationInSeconds
has been deprecated. UseTimerTrunkData.duration
instead. This value is in milliseconds now.
Trade
- With the extensive refactor of the Trade system, a full
Trade
Entity controller has been added containing much of the logic that used to live inTradeSet
.TradeService
has also been added, replacing the functionality for accessing differentTradeData
that was previously available throughTradeSet
. - The functionality of
TradeSet.GetValidTrades
can now be achieved viaTradeService.GetTrade
orTradeService.GetTrades
and then callingTrade.IsValid
. In the same way calls toTradeSet.GetValidTradesWithInputTag
andTradeSet.GetValidTradesWithOutputTag
should be replaced byTradeService.GetTradesWithInputTag
orTradeService.GetTradesWtihOutputTag
and then callingTrade.IsValid
. - The
MakeExchangePlayerEvent
now longer has to be called directly from UI. InsteadTrade.MakeTrade
should be used.
idlekit-tools
Asset Importer
- Asset Creators for the following Entity Datas now require a
targetTagIds
arrays and atargetAll
flag in the input csv data: RandomTagsCurrencyReward
CollectCurrenciesWithTagsGoal
DynamicCollectCurrenciesWithTagsGoal
SpendCurrenciesWithTagsGoal
UpgradeCurrenciesWithTagsGoalData
RandomTagsCurrencyReward
- The Asset Creator for
TradeData
now requireinputCurrencyTagIds
andoutputCurrencyTagIds
arrays in the input csv data.
Trade
TradeSet
has been deprecated, see information above for more detail.
idlekit-examples
- N/A
idlekit-showcase
Showcase Content
- The
ShowcaseContentDataAssetCreator
requires that input csv data now contain atradeCooldownDuration
field. ShowcaseContentParameters
now take an array ofTrade
s rather than the deprecatedTradeSet
.
Event
AutoUnlockBuyGeneratorPlayerEvent.UnlockGenerator
has been changed toAutoUnlockBuyGeneratorPlayerEvent.Apply
due to theBuyGeneratorPlayerEvent
change.
Event Content
- All Content data associated with events has been changed to
ShowcaseEventContent
which derives fromEventContent
. This showcases the ability to trackMilestone
progress while in an event. - A new global
EntitiesDatabase
has been added toMain
. The idea behind this data is that it is always loaded no matter whatContent
is loaded. Only globally required data should be stored here to reduce memory use. - A
ShowcaseEventSettings
class 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.EventSettings
is 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.durationInSeconds
has been deprecated. UseTimerTrunkData.duration
instead. This value is in milliseconds now.TimerTrunkData.initialDurationInSeconds
has been deprecated. UseTimerTrunkData.initialDuration
instead. This value is in milliseconds now.
Generators
AutoCollectState.collectDuration
is now along
instead 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.ContainsTagOrRarity
has been renamed toICurrency.ContainsTag
for simplicity
idlekit-implementation
Goal
DynamicCollectCurrencyTypeGoalData
'sdouble secondsUntilComplete { get; }
has been renamed todouble seconds { get; }
Events
- The constructors for the following
IEvent
s must now be passed anIEventManager
: ClaimGoalPlayerEvent
CheckGeneratorUnitTargetHit
ClaimTimedRewardPlayerEvent
OpenTimerTrunkPlayerEvent
Rewards
AscendPlayerEvent.GetRewardIds
can now be found on the newAscensionReward
class.
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 onIGeneratorEntity
but 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 fromICurrencyManager
but 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 fromIModifierManager
but 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 fromIRewardManager
but 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
timestamp
in milliseconds format for consistency. ITimerListener
'sOnUnSubscribe()
has been removed because the object should be responsible for its own un-subscribing.- All
ITimerService
methods that previously worked with an(out uint requestId)
and other parameters have been refactored to work with anITimerListener
only to clean up the API. While the time subscription (i.e:duration, initialTime, looping
) information can be found atITimerListener.ITimerSubscription
.
User Saved Data
IUserSavedData
has been removed fromISavedDataManager
to reduce coupling. Use theIEntityCache.Resolve<IUserSavedData>()
to retrieve and use theIUserSavedData
.
idlekit-implementation
Event Manager
ActionManager
has been removed due to the confusion it created as it shared too many similar functionality withEventManager
. Please useEventManager
in 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 allIEvent
are dispatched immediately.
Goals
- The following
Goal
related name changes include the renaming of all theGoalDataAsset
involved. Therefore, all theGoalDataAssets
related to theGoals
mentioned below need to be re-imported. CollectCurrencyGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toCollectCurrencyTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.CollectUpgradeableCurrencyGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toCollectUpgradeableCurrencyTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.DynamicCollectCurrencyGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toDynamicCollectCurrencyTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.SpendCurrencyGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toSpendCurrencyTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.
Unity Event Listener
UnityEventListener
is no longer anIService
as it derives from aMonoBehaviour
; therefore, it goes through a different create and initialize sequence compare to regular C#IService
s.
Timer Trunk
- As the unlock functionality of the
TimerTrunk
is specific to the showcase game, it has been moved to a newShowcaseTimerTrunk
implementation that can be found in the Showcase repo. - A new
initialDuration
field has been added to allow the duration of the initial subscription to the timer service to vary from subsequent subscriptions. - The
TimerTrunk
no 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 newinitialDuration
data field to0
.
idlekit-tools
CanvasView
void CanvasStageView.SetStage(IStage)
is nowprotected
instead ofpublic
as theIStage
is set by listening to theStageInitializedEvent
.
Plot Points
- The
PlotPointEditor.SaveSequence
functionality 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
TimerTrunk
header and data types are nowShowcaseTimerTrunk
.id
anddataName
fields changed tomg01_showcase_timer_trunk
.initialDurationInSeconds
has been added.unlockStageId
has been added. Previously this existed in the Content data.- Content
timerTrunkUnlockStageId
has been removed. This now exists in Timed Rewards data.timerTrunkId
has changed tomg_01_showcase_timer_trunk
.
Version 0.16.0 to 0.17.0, 2019-3-15
idlekit-framework
Entity
ICurrencyGoal
has been deprecated asIGoal
no longer needs to have all theICurrency
injected due to the introduction ofIEntityCache
IGeneratorGoal
has been deprecated asIGoal
no longer needs to have all theIGenerator
injected due to the introduction ofIEntityCache
IEntityController
'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-implementation
does not utilize the instancing feature, please useT Create<T>(IDependencyContainer dependencyContainer)
or check outIInstanceEntityData
in theInstance
example
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-implementation
does not utilize the instancing feature inidlekit-implementation
, please useTReturn LoadEntity<TReturn,TData>(string dataId)
or check outIInstanceLoaderService
in theInstance
example
idlekit-implementation
Exception & Error Events deprecated
ExceptionEvent
andErrorEvent
have both been deprecated. The newIdleKitLog
should 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
Goal
related name changes include the renaming of all theGoalDataAsset
involved. Therefore, all theGoalDataAssets
related to theGoals
mentioned below need to be re-imported.IGoalData.amount
is no longer an optional field (has to be > 0) forAutomateGeneratorTypeGoal
andBuyGeneratorTypeGoal
.
AutomateSpecificGeneratorGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toAutomateGeneratorTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.BuySpecificGeneratorGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toBuyGeneratorTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.CollectCurrenciesOfRarityGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toCollectCurrenciesWithTagsGoal
to work with allITagData
instead ofIRarityData
.CollectFromSpecificGeneratorGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toCollectFromGeneratorTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.GetGeneratorUnitsForSpecificGeneratorGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toGetGeneratorUnitsForGeneratorTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.GetUpgradesForSpecificCurrencyGoal
and its correspondingIGoalData
andIGoalDataAsset
have been renamed toGetUpgradesForCurrencyTypeGoal
due to the introduction of instancing. TheIGoal
no longer targets just one instance but multiple instances of the same staticDataId.GoalEvent
is removed because theIGoalSavedData
alteration should only be in anIAction
. UseProgressGoalAction
andSetProgressGoalAction
instead.
StaticDataManager and LoaderService errors
- All varients of the
GetData
methods inStaticDataManager
now 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
GetDataForIds
method 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.Showcase
has been added. All code specific to the Showcase project now exists within this namespace.Idlekit.Showcase.Test
has been added and holds any tests specifically for the Showcase project.Idlekit.Showcase.DataAssetImporter
has been added and contains the Showcase specific importer code.Idlekit.Examples
has been renamed fromIdlekit.Example
and now contains only code that is specific to the examples.Idlekit.Examples.Test
has been renamed fromIdlekit.Example.Test
and now only contains tests specific to the examples.Idlekit.PlotPoint
has been renamed fromIdlekit.PlotPoints
and now contains all runtime code for Plot Points.Idlekit.Tools.PlotPoint
has been added. All editor and non-runtime Plot Point code now resides in this namespace including the contents ofIdlekit.Example.PlotPoints.Editor
which has been removed.Idlekit.Example.PlotPoints
has been removed.Idlekit.Editor
has been added for general code used only in editor.Idlekit.Tools.Editor
has been added for tools specific editor code.Idlekit.Tools.Common
has been added. Code shared between the examples and showcase, mostly UI related, now resides here.Idlekit.Tools.Common.Debug
has been renamed fromIdlekit.Example.Debug
.Idlekit.Tools.DataAssetImporter
has been renamed fromIdlekit.DataAssetImporter
.Idlekit.Tools.Test
has been renamed fromIdlekit.Test
. This is now the only namespace for core Idlekit tests.
Entity Refactor
- The
IEntityData
interface 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
ILoaderService
for each Entity type.
- This method is responsible for creating the Entity Controller (
- The
IEntityyController
interface has been added. Each Entity Controller should now inherit from this interface. - The interface requires that getters be implemented for
instanceId
andstaticDataId
. Both of these members should be set via theIEntityData.Create<T>
method.- The
staticDataId
should be taken from theIEntityData
that is creating the Entity Controller - The
instanceId
should 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
IEntityController
s: - IBoost
- ICharacter
- IContent
- ICurrency
- IExchangeRate
- IGeneratorUnitTargetSequence
- IGeneratorEntity
- IGoal
- IModifier
- IReward
- ITimedReward
- IStage
- All instances of
Load
,Begin
, andEnd
that existed in Entities or Actions have been converted toInitialize
andCleanup
calls. This is only a naming consistency refactor.
Loader Service Refactor
- As a result of the changes to Entities described above, the
ILoaderService
interface 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)
. ILoaderService
now implements the following methods:UnloadEntity
LoadEntity<TReturn, TData>
LoadAllEntities<TReturn, TData>
LoadAllEntitiesOfType<TReturn, TData>
Clear
Generator Refactor
IGenerator
:- Renamed to
IGeneratorEntity
. IGeneratorEntity
requires (and is created by) theIGeneratorEntityData
.- Be sure to implement the
generatorEntityData
(all data) andgeneratorData
(defining data) separately as they are.- Because the
generatorData
defines the generator conceptually, it will likely be a constant between many differentIGeneratorEntity
objects. 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 oneIGeneratorData
but will have manyIGeneratorEntityData
to allow different rewards and/or balances depending on the stage. - Because of the above,
modiableData
should returngeneratorData
so that a single relationship between modifier and modifiable can be made but still persist from stage to stage despite each stage likely having uniqueGeneratorEntityData
references.
- Because the
IGeneratorStageData
:- The data held within this class now lives in
IGeneratorEntityData
. - As a result,
IStage
no longer needs aGeneratorStageData
array and instead only needs to reference an array ofIGeneratorEntityData
ids to define which generators will run in the stage. IGeneratorData
:- Data input where this object is used is now in the
IGeneratorEntityData
assets instead of theIStageData
assets. No longer has anisContentSpecific
boolean. - Still implements the
IModifiableData
that will be used by theIModifiable
portion of theIGeneratorEntity
(instead of passing that responsibility off toIGeneratorEntityData
). This is becauseIGeneratorData
is the constant between the same generator concept from stage to stage (IE: "Gas Station", "Pet Store", etc). This way, referencing aGeneratorData
as a modifier's target will persist that relationship from stage to stage. See theIGenerator
UpgradeNotes for extra details. IGeneratorBalanceData
:- Is now referenced by
IGeneratorEntityData
assets instead of theIStageData
assets. IGeneratorUnitTarget
:- This object was doing nothing but holding a reference to its data and is removed. Reference a
IGeneratorUnitTargetData
instead. IGeneratorUnitTargetSequenceData
:- Is now referenced by
IGeneratorEntityData
assets instead of theIStageData
assets. IGeneratorSavedData
:IGeneratorSavedData.BeginProduction
was doing extra calculations due to its param being a DateTime. This param has changed tolong timestampMs
.- Due to the above change,
IGeneratorSavedData.startProducingTime
has been deprecated. UsetimestampMs
instead. _startProductionTotalMs
is removed asIGeneratorSavedData
implementsITimedSavedData
.
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
ICurrency
andIUpgradeableCurrency
now inherit fromIUnlockable
and implement getters foravailable
andobtained
. - On
IUpgradeableCurrency
theisOwned
flag is now replaced byobtained
to reflect the changes to the new available and obtained logic. - Also on
IUpgradeableCurrency
theisUnlocked
flag is replaced byavailable
to reflect the changes to the new available and obtained logic. IUpgradeableCurrencySavedData.isUnlocked
is replaced byIUnlockable.available
to reflect the changes to the new available and obtained logic.
Goal Refactor
IGoal
has 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,
IGoalSequenceSavedData
has been renamed toIGoalSavedData
with eachIGoal
owning it's ownIGoalSavedData
. IStageSavedData
no longer handles goal saved data as a result.IGoalSequenceSavedData.slotIndex
andIGoalSequenceSavedData.goalIndex
have 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.isActive
is moved toIBoost.isActive
.
IRewardData
- As a result of the Entity refactor,
CreateReward(ICurrencyManager, IRewardManager, IActionManager)
has been deprecated, please useCreateReward(ICurrencyManager, IRewardManager)
.
IUpgradeableCurrency
IUpgradeableCurrency.currentLevel
is replaced byIUpgradeable.level
for consistency.
idlekit-implementation
ClearContentAction
- The constructor now requires
ILoaderService
to be passed as a dependency.
CollectFromGeneratorAction
- The constructor no longer requires
IEconomy
to be passed as a dependency.
CurrencyUnlockedEvent
CurrencyUnlockedEvent
is renamed toCurrencyObtainedEvent
to reflect the changes to the new available and obtained logic.
GrantRewardAction
GrantRewardAction.GrantRewards
deprecated all but one signature:GrantRewards(string[] rewardIds, int randomSeed)
.
LoaderService
- The constructor now requires that only the
IDependencyContainer
is passed as a dependency.
RandomRarityCurrencyReward
RandomRarityCurrencyReward
along with itsIStaticData
andISavedData
have been renamed toRandomTagCurrencyReward
.
TimedBoost
duration
has been renamed totimeRemaining
for consistency with other similar calls.
UpgradeLevelData
- As
UpgradeLevelData
now inherits fromIUpgradeLevelData
the return type ofUpgradeLevelData.upgradeRequirements
is nowIUpgradeRequirement
. Functionality which relied on this property returningUpgradeRequirement
must now cast the returned object to this type.
idlekit-examples
- N/A
idlekit-tools
RandomCurrencyRewardDataAssetCreator
RandomCurrencyRewardDataAssetCreator
is renamed toRandomTagCurrencyRewardDataAssetCreator
for consistency.
DataAssetImporter
DataAssetImporter
and 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
ExampleContent
has been renamedShowcaseContent
and moved into Showcase repo.
idlekit-showcase
DataAssetImporter
ShowcaseDataAssetImporter
and related classes have been implemented based on the base classes in the tools repo. Constants header scripts have been moved into Showcase repo.
ExampleContent
ExampleContent
has been renamedShowcaseContent
and 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
ExampleContent
type which derives fromContent
has been added into the Example Project. WhereContent
aims to showcase an in-game implementation of each core idlekit concept, theExampleContent
is designed to show extended functionality which may be of use in your game. Extended functionality such as Trades and TimerTrunk has been implemented in theExampleContent
and the Missing Resource ExchangeRate functionality that was previously inContent
has been moved toExampleContent
.
ExampleContentDataAssetCreator
ExampleContentDataAssetCreator
now inherits from aBaseContentDataAssetCreator
to allow for shared functionality between it and theContentDataAssetCreator
. If you have implemented a custom ContentDataAssetCreator it should now inherit fromBaseContentDataAssetCreator
.
GachaItem
GachaItem.weight
has been deprecated in 0.16.0, useGachaItem.randomWeight
instead.
IContent
IContent
andIContentData
hadmissingResourcesExchangeRate
andmissingResourcesExchangeRateId
removed as they were to specific to the example project. For reference, seeExampleContent
in idlekit-example.IContent
previously had two constructors where it shouldn't have (one was unused). The removed constructor was one that ignored thestageIds
field ofIContent
.
ICurrencyManager
GetAllCurrenciesOfRarity
is deprecated in v0.15.0. Please useGetAllCurrenciesOfTagOrRarity
instead.ICurrencyManager
now requires a GetAllCurrenciesOfTagOrRarity() method. If you have a custom class that derives fromICurrencyManager
it must now implement this function. See CurrencyManager.cs for a sample implementation.
ICurrency
ICurrencyManager
now requires a ContainsTagOrRarity() method. If you have a custom class that derives fromICurrency
it must now implement this function. See Currency.cs for a sample implementation.
IGlobalUpdateManager -> IUnityEventListener
IGlobalUpdateManager
has been replaced withIUnityEventListener
.IUpdateable
,ILateUpdateable
, andIFixedUpdateable
have been removed. Listeners for those methods should register with the corresponding eventsOnUpdate
,OnLateUpdate
, andOnFixedUpdate
onIUnityEventManager
.
ITimerService
long GetUnixTimeStampInSeconds
andlong GetUnixTimeStampInMilliseconds
have been changed todouble timestampInSeconds
anddouble timestampInMilliseconds
to 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
rewards
is deprecated and renamed torewardResults
for clarity.
IContent
CanAscend
has been deprecated, please useIStage.CanAscend
onthe currentStage
instead.
IContentData
stageSequenceDatas
has been deprecated and moved to example specificLoopingContentData
. IdleKit now only contains a basicContentData
data class that holds a list of stage ids.stagePlaythroughStyle
has been deprecated as we now subclassContentData
withLoopingContentData
for different playstyles.GetStageData
has been deprecated in, please callIContent.currentStageId
instead.GetNextStageData
has been deprecated in, please callIContent.nextStageId
instead.GetNextStageDataIndex
has been deprecated in, please callIContent.nextStageId
instead.
IContentSavedData
playthroughAmounts
has been deprecated since it is too specific for an interface implementation.IncrementPlaythrough
has been deprecated since it is too specific for an interface implementation.SetCurrentStageIndex
has been deprecated since it is too specific for an interface implementation.- The above variables have been moved to the example specific
LoopingContentSavedData
. currentStageIndex
has been deprecated since it is too specific for an interface implementation, please callcurrentStageId
instead.BeginContent
has been deprecated, please use setter ofhasStarted
instead.
ICurrency
Has(double amount)
has been deprecated since we want to support a gameplay that the user canAdd
orRemove
a 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 canAdd
orRemove
a positive or negative amount, please callGetCurrencyAmount(string id)
and compare the values instead.ICurrencyManager
no longer listens toStaticDataAdded
event. Instead,ICurrencies
are now loaded and registered toICurrencyManager
inLoadContentAction
.
IEconomy
- Some methods related to the cost of generator units have been refactored to improve usability and functionality.
IEconomy.GetMaxGeneratorUnit
has been renamed to the more accurateGetAffordableUnitsToNextTarget
.Economy.GetMaxGeneratorUnit
has been moved toIEconomy
and 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.cs
in 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
IExchangeRate
has been added to allow a conversion rate to be calculated between two exchangable items.- As
ICurrency
now inherits fromIExchangable
allCurrency
types must implement aGetExchangeValue()
method to allow for exchange rates to be calculated. SeeCurrency.GetExchangeValue()
as an example implementation. IContent
now contains a missing resourcesExchangeRate
that can be used to calculate an exchange rate. As a result,IContentData
now 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
IModifiable
s no longer registered to theIModifierManager
onStaticDataAdded
events.IModifier
s no longer registered to theIModifierManager
themselves, instead they are now registered toIModifierManager
inLoadContentAction
andLoadStageAction
.- constructor
ModifierManager(IStaticDataManager staticDataManager, IEventManager eventManager)
has been deprecated, please callModifierManager(IEventManager eventManager)
instead
IRarity
ICurrency
now containsITagData
andIRarityData
members to hold tag and rarity information. While tags are optional, allCurrency
types must have aRarity
. As a resultICurrencyData
now requires Ids for both tags and rarity. SampleRarity
assets can be found in the IdleKit-Example Data folder.- The
EntitiesDatabase
now contains functionality to loadIRarityData
andITagData
inEntitiesDatabase.Load()
. If using a custom loader process thenITagData
andIRarityData
assets must be loaded prior to otherEntities
as they may depend on them.
IRewardManager
IRewardManager
no longer listens toStaticDataAdded
event. Instead,IRewards
are now loaded and registered toIRewardManager
inLoadContentAction
.
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)
insteadStaticDataAddedEvent
event is not used anymore in the IdleKit framework as IdleKit loads the entities withILoaderService
and registers them with their respective IServices directly.