SMODS~1.0.0-BETA-1221 #1131
Eremel
announced in
Announcements
Replies: 1 comment 1 reply
-
|
no quantum ranks this update... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
SMODS~1.0.0-BETA-1221
There are a whole load of bug fixes that are included in this release that will not be covered here. If you wish to know what they are, please check the commit history and the closed issues for reference.
card_limitandextra_slots_usedfunctionality rewriteThe internal methods for these properties have been rewritten to be more robust. There are some important things that you may need to pay attention to.
Use
area.config.card_limitwhen checking for space in a card areaUse
#area.cardsto see how many cards are in the areaUse
area.config.card_countto see how many slots are being used in the areaUse
area.config.card_limits.total_slotsto see how many total slots are in an areaUse
#area.cards < area.config.card_limitto check if an area has spaceUse
SMODS.draw_cards(number)to force draw a number of cards (usingG.FUNCS.draw_from_deck_to_handwill no longer work)Add
modifies_draw = trueto any instances ofSMODS.Blindthat modify the number of cards drawnNew util function
CardArea:count_property(property)takes a string value and returns the total value ofcard.ability.propertyfor cards in that areablueprint_compatchangesAdding
blueprint_compat = falseto yourSMODS.Jokerobjects will now block any calls ofSMODS.blueprint_effecton your Joker. In addition, vanilla Blueprint and Brainstorm now use this util function too. This means you no longer need to addand not context.blueprintto your calculation if you don't want effects to be copied.ModObject.custom_card_areashelper functionYou can now create a new function on your Mod Object to create a custom
CardAreaat the correct point of the run start sequence. This means that any loading will be done correctly. Here is an example of the function in use, which creates a new CardArea below the Jokers area. There will be more improvements to custom CardAreas in a future update.Some further
CardAreaimprovements lie in theconfigwhen creating aCardArea. You can define usebg_colourandno_card_countto change the colour of your area and toggle the card count respectively.Animated Sprites Everywhere
Support for animated sprites appearing on any object has now been added, and should work straight out of the box. Simply create an animated atlas object as normal, and SMODS will handle the rest for you.
Here is an example animated atlas definition.
Note
Each animation should exist entirely on one row of your atlas.
Alongside this, there is a new util function
SMODS.create_sprite(x, y, width, height, atlas_key, pos)that will create a sprite of the correct type based on the atlas you provide.Level up hands with
SMODS.upgrade_poker_handsA new way to level up or upgrade poker hands has been added. This allows permanent modifications to the chips and mult (and other parameters if defined) for each poker hand that will not be removed when a standard level up happens.
This new function,
SMODS.upgrade_poker_hands, can be used to achieve this behaviour, but may also be used to target multiple hands to improve at once.SMODS.upgrade_poker_hands(args)-
hands: table of strings or a single string of hand names to level up (if left blank defaults to all Poker Hands)-
parameters: table of strings of keys ofScoring_Parametersto upgrade (if left blank defaults to all Scoring Parameters)-
level_up: increases the level of the hand by amount passed (NOTE: this can be used to level up a hand by more than one level)-
func: pass a custom functionfunction(current, base, parameter)for custom modifications to the parameters in a Poker Hand (if left blank defaults to normal level up method)-
from: the Object that is doing the upgrading, willjuice_upduring animations-
instant: boolean that disables animationsNew Tracking
Some new variables have been added to be tracked throughout a run, and a new helper function to check if the current blind is a specific one.
G.GAME.hands[handname].played_this_ante- similar toplayed_this_roundbut tracks across an entire ante (resets when the boss blind is defeated)G.GAME.consumeable_usage_total- this table now automatically contains information for custom consumables tooSMODS.is_active_blind(key, ignore_disabled)- returnstruewhen the current blind matches the inputtedkeyCustom Easing Types
This update adds an array of custom easing types that you can use in various ease functions provided by the game, as well as within ease events. They can be found in
SMODS.ease_typesinutils.lua, and your own easing functions can be added to this dictionary to be used.Calculation Updates
There are a couple of new contexts in this update, as well as a functionality improvement to an existing context, as detailed below. In addition to this, you can now return a UI element as the
messagein a calculation return to be displayed as attention text. This is particularly useful if you want to display an image popup. There will be helper functions created for this in a future update.context.create_shop_card
This context is used when a card is created for the main shop area. You can return a table as
shop_create_flagsthat will be passed intoSMODS.create_cardto change which card will be created.context.modify_shop_card
This context is used when a card is added to the main shop area. You can call other functions on this card, such as
Card:set_cost, to alter the card within the shop. This context could also be used to respond to certain things appearing in the shop.context.blueprint
This context is used when a calculation is being copied from a different object. It contains all properties of the original context, alongside these extra properties.
And more!
PokerHandsnow appear in the collection within the Other category.loc_varsSMODS.Rarityhas a new parameter,disable_if_empty, that removes the rarity from the pool of available rarities if the pool has no valid objectsBeta Was this translation helpful? Give feedback.
All reactions