-
Notifications
You must be signed in to change notification settings - Fork 193
SMODS.Rarity
Casimir Eisenach edited this page Dec 18, 2024
·
9 revisions
-
Required parameters:
key
-
Optional parameters (defaults):
-
loc_txt, Skeleton:
{ name = '', -- used on rarity badge }-
pools: Table with a list of ObjectType keys to add this rarity to. Skeleton:
{ ["Joker"] = true, --uses self.default_rate when polled ["Joker"] = { rate = 0.7 }, }-
badge_colour: Colour of the rarity's badge. -
default_rate: Setting a numerical value fordefault_rateenables cards with this rarity to appear in the shop at the specified rate.- This sets a default rate, which can be modified by accessing
G.GAME[key:lower() .. '_mod']during a run.
- This sets a default rate, which can be modified by accessing
-
-
get_rate(self, rate, object_type) -> number- Returns rate. Use for finer control over the rarity's rate.
-
gradient(self, dt)- Used to control the badge colour gradient.
SMODS.poll_rarity(_pool_key, _rand_key) -> key- Polls all rarities tied to
_pool_keyand returns rarity key.
Note
The SMODS wiki has a new home now! Check it out at https://docs.smods.dev
Game Objects
- API Documentation
- SMODS.Achievement
- SMODS.Atlas
- SMODS.Attribute
- SMODS.Blind
- SMODS.CanvasSprite
- SMODS.Center
- SMODS.Challenge
- SMODS.DeckSkin
- SMODS.DrawStep
- SMODS.DynaTextEffect
- SMODS.Font
- SMODS.Gradient
- SMODS.https
- SMODS.JimboQuip
- SMODS.Keybind
- SMODS.Language
- SMODS.ObjectType and SMODS.ConsumableType
- SMODS.PokerHand
- SMODS.Rank and SMODS.Suit
- SMODS.Rarity
- SMODS.Scoring_Parameter and SMODS.Scoring_Calculation
- SMODS.Seal
- SMODS.Shader and SMODS.ScreenShader
- SMODS.Sound
- SMODS.Stake
- SMODS.Sticker
- SMODS.Tag
Guides
- Your First Mod
- Mod Metadata
- The Mod Object
- Calculate Functions
- Perma-bonuses
- Object Weights
- Logging
- Event Manager
- Localization
- Text Styling
- UI Structure
- Utility Functions
- All About
G - Internal Documentation
Release Notes
Found an issue, or want to add something? Submit a PR to the Wiki repo.