You are viewing a potentially older version of this package. View all versions.
EasyCards-EasyCards-1.1.3 icon

EasyCards

Custom Cards Made Easy

Date uploaded 2 years ago
Version 1.1.3
Download link EasyCards-EasyCards-1.1.3.zip
Downloads 1337
Dependency string EasyCards-EasyCards-1.1.3

This mod requires the following mods to function

BepInEx-BepInExPack_RogueGenesia-1.0.0 icon
BepInEx-BepInExPack_RogueGenesia

BepInEx pack for Rogue: Genesia. Preconfigured and includes Unity Base DLLs.

Preferred version: 1.0.0

README

EasyCards

Custom Cards Made Easy

This mod allows you to easily add custom cards into the game by specifying them in JSON files.

To add your own cards, create a new folder inside BepInEx\plugins and create a new .cards.json file (like custompack.cards.json) inside that folder. An example structure could look like this:

BepInEx
  - plugins
    - ChendraksCardPack
      - ccp.cards.json
      - Assets
        - card1.png
        - card2.png

EasyCards will scan for *.cards.json files in BepInEx\plugins subfolders.

Then start up the game and go to Stat -> Soul Cards. If everything went well, your cards should show up.

The full file format is specified below.

Troubleshooting

If your cards don't show up, please check BepInEx\LogOutput.log and BepInEx\ErrorLog.log for potential ideas as to why. If there is no information in the logs, you can enable additional logs by opening BepInEx\config\EasyCards.cfg and setting LogCards = true. After saving the file, restart the app and EasyCards will log A LOT of information about your cards and maybe give you additional information.

If all else fails, feel free to swing by the Rogue: Genesia Discord and ask there.

Changelog

1.1.3

  • Reset character animations back to Rog after the end of a run
  • Fixed a small bug that would happen when you define a card without any modifiers
  • Fixed errors in the example effects

1.1.2

  • Moved Effects logic to stat cards and got rid of the Effects section
  • The Stats section in JSON files should now be called StatCards. Old files will still work.
  • Fixed a bug that would trigger boss & elite kill events on normal mobs

1.1.1

  • Revert to old packaging, since the new packaging didn't work for some people.

1.1.0

  • Add support for cards with effects.

1.0.16

  • Add ability to disable cards in rogs or survivors mode
  • Fix an issue that could happen if TexturePath wasn't set

1.0.15

  • Update logic to support mod managers: EasyCards will now scan for *.cards.json in BepInEx\plugins subfolders.
  • Clean up directory structure
  • If a cards image can't be loaded, EasyCards will now assign the placeholder image by default
  • Updated this documentation with the changes

1.0.14

  • Fix issue when loading multiple card packs. Thanks @Grand and @PlushPaws

1.0.13

  • Fixing removals... flips table

1.0.12

  • Fixing requirements - Thanks @PlushPaws for reporting

1.0.11

  • Re-add missing dll - Thanks @PlushPaws for reporting

1.0.10

  • Some internal code clean up
  • Preparation for more advanced features that are in the pipeline

1.0.9

  • Fix for stat requirements - Thanks @PlushPaws

1.0.8

  • Fix for banishing cards - Thanks @PlushPaws for pointing it out and being persistent

1.0.7

  • Code restructure
  • Initial Release on Thunderstore

File Format

{
  // The name you want to show up in-game for your cards
  // Optional, will default to EasyCards if not provided
  "ModSource": "Your Mod Name Here",
  "StatCards": [
    {
      // Internal name of your new card. This needs to be unique.
      // Consider using a prefix for all your cards.
      // Required
      "Name": "CCP_Card1", 
      
      // The path to the image you want displayed on the card.
      // This path is relative to where your json file is on your hard drive.
      // Note: Most of the games card assets are 32x32 pixels.
      // Required
      "TexturePath": "CustomCardPack/Card1.png",
      
      // The rarity of the card. See the list below for options.
      // Required
      "Rarity": "Epic",
      
      // The tags the card has. See the list below for options.
      // Required
      "Tags": [ "Might", "Critical" ],
      
      // How likely is this card to drop?
      // Required
      "DropWeight": 0.10,
      
      // How likely is the card to re-appear after you got it
      // Required
      "LevelUpWeight": 0.10,
      
      // The maximum level of the card. If higher than 1, all stats will
      // be multiplied by the level when you level up.
      // Required
      "MaxLevel": 1,
      
      // A list of modifiers. See below for details
      // Requiered (at least 1)
      "Modifiers": [
        {
          "ModifierValue": 15,
          "ModifierType": "Additional",
          "Stat": "CriticalChance"
        }
      ],
      
      // Translations for the your cards name
      // Required
      "NameLocalization": {
        "en": "My First Card"
      },

      // Translations for the your cards descriptions
      // Optional
      "DescriptionLocalization": {
        "en": "My First Cards Description"
      },

      // For this card to show up, ANY of the below is required
      // Optional
      "RequiresAny": {
        "Cards": [{"Name": "Egg", "Level": 1}],
        "Stats": {
          "StatRequirements": [{"Name":  "Damage", "Value": 8999}],
          "RequirementType": "Min"
        }
      },
      
      // For this card to show up, ALL of the below is required.
      // The format is the same as `RequiresAny`
      // Optional
      "RequiresAll": {},
      
      // The names of cards you want to banish when your card is selected.
      // Can be any custom card or card that is included with the game.
      // Only blocks them from showing up again, if you have them, they will
      // stay in your inventory.
      // Optional
      "BanishesCardsByName": [ "Katana", "VoidSpirit" ],
      
      // The modifier names that you want this card to banish.
      // This example banishes every card that modifies `DamageMitigation`
      // Optional
      "BanishesCardsWithStatsOfType": [ "DamageMitigation" ],

      // When you select this card, remove all listed cards from your inventory 
      // Optional
      "RemovesCards": [ "Katana", "VoidSpirit" ],

      // Allows you to disable the card in a Rogs or Survivors mode. 
      // Optional
      "DisabledInMode": "Rogs",
      "Effects": [
      {
          // The internal name for your effect. It's not used for anything outside of logging.
          // If you don't provide one, it will be generated.
          // Optional
          "Name": "MyAwesomeEffect",
      
          // The type of the effect. See below for all possible values.
          // Required
          "Type": "OneTime",
      
          // What is required for the effect to be enabled?
          // Optional, defaults to None
          "ActivationRequirement": "None",
      
          // The action to be taken when the effect is applied.
          // Required
          "Action": "HealAmount",
      
          // What needs to happen for the effect to apply? The effect needs to be enabled for this.
          // Required for some Types
          "Trigger": "OnEliteKill",
      
          // Allows you to configure certain aspects of an effect.
          // Required
          "Properties": {
            // The exact amount for Action.
            // Example: [Action = HealAmount, Amount = 10] would heal you for 10 when the effect is triggered.
            // Required for some Actions.
            "Amount": 1.0,
      
            // The percentage for the effects Action.
            // Example: [Action = HealPercentage, Percentage = 10] would heal you for 10% of your max hp
            // when the effect is triggered.
            // Required for [Action = HealPercentage]
            "Percentage": 12,
      
            // The duration of the effect. The effect will be disabled after [Duration] expires.
            // Specified in seconds. Fractions of a second can be defined as 0.1 for 100ms.
            // Required for [Type = Duration]
            "Duration": 12,
      
            // Amount of time between effect activations.
            // Example: [Action = HealAmount, Amount = 20, Interval = 30] -> Heal you for 20 hp every 30s.
            // Specified in seconds. Fractions of a second can be defined as 0.1 for 100ms.
            // Required for [Type = Interval]
            "Interval": 30,
      
            // Allows you to change the characters' sprite
            "CharacterSpriteConfiguration": {
              // Replace the "Idle" animation
              "Idle": {
                // Path to the texture that contains the animation
                "TexturePath": "PlushPaws/pikachu_idle.png",
                // Number of frames per row
                "FramesPerRow": 4,
                // Number of rows
                "Rows": 1
              },
              // Replace the "Run" animation. Contents are identical to "Idle".
              "Run": {},
              // Replace the "Victory" animation. Contents are identical to "Idle".
              "Victory": {},
              // Replace the "Death" animation. Contents are identical to "Idle".
              "Death": {}
            }
          }
      }
      ]
    }
  ]
}

Card Properties

Rarity

The rarity of the card.

Possible values: Tainted, Normal, Uncommon , Rare, Epic, Heroic, Ascended, Evolution

Tags

Tags for your card. Think of them as grouping them.

Possible values: None, Order, Critical, Defence, Body, Might, Evolution

DisabledInMode

Represents the mode this card will be disabled in.

Possible values: Rogs, Survivors

Modifiers

Specifies modifiers that the card applies to your stats.

Example:

{
  "ModifierValue": 15,
  
  // Specifies HOW the `ModifierValue` is applied
  "ModifierType": "Additional",
  
  // Specifies WHICH stat this modifier applies to
  "Stat": "CriticalChance"
}

Stat

A stat that your card modifies.

Possible values: MaxHealth, HealthRegen, Defence, DamageMitigation, XPMultiplier, PickUpDistance, AdditionalProjectile, ProjectilePiercing, ProjectileLifeTime, ProjectileSpeed, ProjectileSize, AreaSize, KnockBack, MoveSpeed, AttackCoolDown, AttackDelay, Damage, CriticalChance, CriticalMultiplier, DashSpeed, DashDuration, DashDelay, DashCoolDown, DashCharge, DashChargePerCoolDown, GoldMultiplier, SoulCoinMultiplier, DefencePiercing, Corruption

ModifierType

How does your card modify a stat?

Possible values: Additional, Multiplier, Compound

NOTE: For most multiplication cases, you will want to use Compound, especially for negative multiplisers.

RequiresAny & RequiresAll

Example

"RequiresAny": {
    "Cards": [
        {"Name": "Card1", "Level": 1},
        {"Name": "Card2", "Level": 3},
    ],
    "Stats": {
      "StatRequirements": [
        {"Name":  "Damage", "Value": 8999},
        {"Name":  "Corruption", "Value": 10},
      ],
      "RequirementType": "Min"
    }
},

Cards

A list of cards that are required. Each entry looks like this:

{"Name": "Card1", "Level": 2},

Name is the internal name of the card, Level is the minimum level.

So in the above example, the requirement is fulfilled if you have Card1 at Level 2 in your inventory.

Stats

Stat requirements are more complex. An entry looks like this:

"Stats": {
  "StatRequirements": [
    {"Name": "Damage", "Value": 8999},
    {"Name": "Corruption", "Value": 10},
  ],
  "RequirementType": "Min"
}

StatRequirements contains a list of stats Stat names and values to fulfill. RequirementType specifies if the stat requirements are Min(imums) or Max(imums).

That means, the above example translates to: For this card to show up, the player must have AT LEAST 8999 Damage and AT LEAST 10 Corruption.

If we were to change the RequirementType to Max, it would change to For this card to show up, the player must have at LESS THAN 8999 Damage and LESS THAN 10 Corruption.

Effects

This is a list of effects that are applied to the card.

Name

An optional name for the effect. This is only used for debug logs and will be auto-generated if not provided.

Type

Describes the type of this effect.

Options:

  • OneTime: The effect is executed once, then disabled again
  • Duration: After activation, the effect is active for a certain amount of time, then disables itself. This type requires a Trigger in Properties
  • Interval: After activation, the effect repeats on an interval
  • Trigger: The effect is activated when a certain event happens

ActivationRequirement

What needs to happen for this effect to become active?

Default: None

Options:

  • None: The effect is always active
  • StageStart: The effect will activate at the start of a stage in Rogs Mode. In Survival, this is the same as None
  • StageEnd: The effect will trigger at the end of a stage in Rogs Mode. Can not trigger in Survival. !!! NOT IMPLEMENTED YET !!!
  • EnemiesKilled: The effect will activate when a certain amount of enemies was killed. !!! NOT IMPLEMENTED YET !!!

Trigger

Describes what needs to happen for the effect to be applied.

Options:

  • OnStageStart: Effect applied at the start of a stage in Rogs mode or immediately in Survivors mode.
  • OnStageEnd: Effect applies at the end of a stage in Rogs mode and never in Survivors mode. !!! NOT IMPLEMENTED YET !!!
  • OnKill: Effect applies when any enemy is killed (that includes Elites and Bosses)
  • OnEliteKill: Effect applies ONLY when an elite enemy is killed.
  • OnBossKill: Effect applies ONLY when a boss enemy is killed.
  • OnDash: Effect applies when you dash
  • OnDeath: Effect applies when you die. NOTE: Attempting to heal yourself with this trigger will NOT revive you

Action

Describes what this effect will do

Options:

  • AddGold: Gives you the amount of gold specified in Properties.Amount
  • AddBanishes: Gives you the amount of banishes specified in Properties.Amount
  • AddRerolls: Gives you the amount of rerolls specified in Properties.Amount
  • AddRarityRerolls: Gives you the amount of rarity rerolls specified in Properties.Amount
  • HealAmount: Heals you by the exact amount specified in Properties.Amount
  • HealPercentage: Heals you by the percentage of your max health specified in Properties.Percentage
  • ChangeCharacterSprites: Allows you to define alternate sprites for certain animations in Properties.CharacterSpriteConfiguration

Properties

Contains properties that are required for certain other aspects of an effect.

"Properties": {
  "Amount": 12000,
  "Percentage": 95.5,
  "Duration": 30,
  "Interval": 30,
  "CharacterSpriteConfiguration": { ... }
}

Options:

  • Amount: An exact amount of something.

    • Type: Number [1, 2.0, 1.222, etc]
    • Applies to actions: AddGold, AddBanishes, AddRerolls, AddRarityRerolls, HealAmount
  • Percentage: An percentage of something.

    • Type: Number [1, 2.0, 1.222, etc]
    • Applies to actions: HealPercentage
  • Duration: A duration in seconds.

    • Type: Number [1, 2.0, 1.222, etc]
    • Applies to types: Duration
  • Interval: An interval in seconds.

    • Type: Number [1, 2.0, 1.222, etc]
    • Applies to types: Interval
  • CharacterSpriteConfiguration: An interval in seconds.

    • Type: CharacterSpriteConfiguration (see below)
    • Applies to types: OneTime

CharacterSpriteConfiguration

Allows you to specify alternate animations for Rog. Each element is optional and only the ones specified are applied.

"CharacterSpriteConfiguration": {
    "Idle": {
        "TexturePath": "PlushPaws/pikachu_idle.png",
        "FramesPerRow": 4,
        "Rows": 1,
    },
    "Run": { ... },
    "Victory": { ... },
    "Death": { ... },
}

Options:

  • Idle: Allows you to replace the idle animation
    • TexturePath: Path to the file that contains the frames for the animation. This is relative to the location of your .cards.json file.
    • FramesPerRow: Number of frames per row in the texture defined above
    • Rows: Number of rows on the texture
  • Run: Allows you to replace the run animation. Options is identical to Idle.
  • Victory: Allows you to replace the victory animation. Options is identical to Idle.
  • Death: Allows you to replace the death animation. Options is identical to Idle.

Limitations

  • Effects do not scale with level
  • CharacterSpriteConfiguration can only be used in conjunction with OneTime effects

Examples

Examples for effect cards and a description of what they do can be found on Github.