-
Notifications
You must be signed in to change notification settings - Fork 3
CardUpgradeDataBuilder
CardDataBuilder(WildfrostMod mod)
- The builder for creating CardUpgradeData: charms and crowns.
- All vanilla card upgrades can be found in References.
AddPool(string pool = "GeneralCharmPool") or `AddPool(RewardPool pool)
- Used to add your card upgrade to a reward pool.
- The general format for a reward pool name is "[classname][datatype]Pool".
- Available classname's are "General", "Snow", "Basic", "Magic", and "Clunk". (Snowdwellers is "Basic"!).
- Available datatype's are "Unit", "Item", and "Charm".
ChangeCounter(int val)
- Used to increase a card's counter by the given value.
- Can be negative.
- Using
WithSetCounter(true)will cause this method to set a card's counter instead. - When
valis not 0, your card upgrade can only be placed on cards with a counter.
ChangeDamage(int val)
- Used to increase a card's attack by the given value.
- Can be negative.
- Using
WithSetDamage(true)will cause this method to set a card's attack instead. - When
valis not 0, your card upgrade can only be placed on cards with an attack stat.
ChangeEffectBonus(int val)
- Used to increase a card's effect values by the given value.
- Can be negative.
- Using
WithSetCounter(true)will cause this method to set a card's effect values instead. - When
valis not 0, your card upgrade can only be placed on cards with effects that are boostable.
ChangeHP(int val)
- Used to increase a card's hp by the given value.
- Can be negative.
- Using
WithSetHP(true)will cause this method to set a card's hp instead. - When
valis not 0, your card upgrade can only be placed on cards with an hp stat.
ChangeUses(int val)
- Used to increase a card's uses [Depreciated] by the given value.
- Can be negative.
- Using
WithSetUses(true)will cause this method to set a card's uses instead.
Create(string name)
- Used to create an empty CardData
-
nameis the internal name for your card the game uses.
CreateCharm(string name)
- Similar to
Create(string name)except that the CardUpgradeData has typeCharmand can be found in the"GeneralCharmPool". - name is the internal name for your card the game uses.
IsCharm(ChallengeData challenge, bool value)
- Used to set your card upgrade as an unlockable charm.
-
challengeis the ChallengeData of the challenge the player must complete to unlock the charm. -
valueis set to true by default and determines whether the charm is unlocked from the beginning or not. - Do not use this method if you want your charm unlockable from the start.
SetAttackEffects(params CardData.StatusEffectStacks[] stacks) or SetEffects(params CardData.StatusEffectStacks[] stacks)
- Used to set the effects that the charm will give a card
-
SetAttackEffectsgives attack effects andSetStartWithEffectgives effects. - You can access a StatusEffectData by using
Get<StatusEffectData>(string name), from which you can get stacks by doingGet<StatusEffectData>(string name).StatusEffectStacks(int stacks). - You can assign several StatusEffectStacks by separating them with a comma (",").
- A list of status effects can be found in references.
SetBecomesTarget(bool val)
- Used to set whether or not your card upgrade will gain an attack stat if it did not have one already.
- By default, your card upgrade will not grant an attack stat.
SetCanBeRemoved(bool val)
- Used to set whether or not your card upgrade can be removed from cards.
- Only relevant for crowns.
- By default, card upgrades are not removeable.
SetConstraints(params TargetConstraint[] efs)
- Used to specify the criteria a card must satisfy to be a valid target for your card upgrade.
- You can assign multiple TargetConstraint by separating them with a comma (",").
SetCanBeRemoved(bool val)
- Used to set whether or not your card upgrade can be removed from cards.
- Only relevant for crowns.
- By default, card upgrades are not removeable.
SetScripts(params CardScript[] efs)
- Used to set the scripts that run when your card upgrade is assigned to them.
- Useful for one-time modifications to the CardData.
- Ex: Durian Charm, Peppernut Charm.
- You can assign multiple CardScripts by separating them with a comma (",").
SetAttackEffects(params CardData.TraitStacks[] efs)
- Used to set the traits a card gains when your card upgrade is assigned to them.
- You can assign multiple TraitStacks by separating them with a comma (",").
- A list of traits may be found in references.
SubscribeToAfterAllBuildEvent(AfterBuildDelegate d)
- Assigns a delegate
dthat is executed after all builders have built and loaded their respective data into the game (soGetcan now find them). - The build order is done alphabetically, so StatusEffectData are built after CardUpgradeData, warranting the need for this method.
WithImage(string img)
- Used to set your card upgrade's sprite
- directory format for using this: Mods/ModName/images/test.png,
WithImage(test.png) - There is a variant that uses Sprites rather than their path strings
- if your images folder is called something other than "images" you can reference them manually and use the version that uses Sprites instead of strings
WithPools(params string[] pools) or WithPools(params RewardPool[] pools)
- Used to add your card upgrade to multiple reward pools.
- You can assign several pools by separating them with a comma (",").
- Available classname's are "General", "Snow", "Basic", "Magic", and "Clunk". (Snowdwellers is "Basic"!).
- Available datatype's are "Unit", "Item", and "Charm".
- You can assign multiple reward pools by separating them with a comma (",").
WithText(string title, SystemLanguage lang)
- Used to set the displayed description of your card upgrade in the desired language.
- lang is set to SystemLanguage.English by default.
- There is a version of this method that takes a localized string as its only parameter.
WithSetCounter(bool val)
- Used to determine whether
ChangeCounteradds to counter (val = false) or sets counter (val = true). - By default,
ChangeCounteradds counter.
WithSetDamage(bool val)
- Used to determine whether
ChangeDamageadds to attack (val = false) or sets attack (val = true). - By default,
ChangeDamageadds attack.
WithSetHP(bool val)
- Used to determine whether
ChangeHPadds to hp (val = false) or sets hp (val = true). - By default,
ChangeHPadds hp.
WithSetUses(bool val)
- Used to determine whether
ChangeUsesadds to uses (val = false) or sets uses (val = true). - By default,
ChangeUsesadds uses.
WithTier(int tier)
- Used to determine the tier of your card upgrade, which determines its price in shops.
- Shops add 10 times a charm's tier to the base price.
- Typical range is between -3 and 3.
- See References for the tiers of vanilla charms.
WithTitle(string title, SystemLanguage lang)
- Used to set the displayed title of your card upgrade in the desired language.
- lang is set to SystemLanguage.English by default.
- There is a version of this method that takes a localized string as its only parameter.
WithType(CardUpgradeData.Type type)
- Used to set the type of your card upgrade.
- There are four type: None, Charm, Token, and Crown.
- (Token is depreciated)
If you want to contribute or need support, join the Wildfrost Discord