Skip to content

Releases: Steamodded/smods

1.0.0-beta-1224a

24 Dec 22:36

Choose a tag to compare

Pushing through a small bug fix release before the festive period fully kicks off.
Cleans up some bugs introduced in the previous release.

1.0.0-beta-1221a

21 Dec 00:50

Choose a tag to compare

For detailed information on what this release adds, please see this discussion:
Click to see discussion post

What's Changed

New Contributors

Full Changelog: 1.0.0-beta-1016c...1.0.0-beta-1221a

1.0.0-beta-1016c

16 Oct 20:57

Choose a tag to compare

This release mostly contains various slight bug fixes. For a complete list, you can review the commit messages since the last release. Some notable inclusions are:

  • context.ante_end fixed when ease_ante is hooked
  • added SMODS.DynaTextEffect - docs to follow, aiko is a dynatext wizard
  • added SMODS.update_context_flags function to be used in response to some calculation contexts
  • added SMODS.poll_edition function to wrap the default poll function to allow similar usage to SMODS.poll_seal and SMODS.poll_enhancement
  • select_card property is now able to be added to individual Center objects and ConsumableTypes, and can be defined as a function. select_button_text can also be defined on an object as a function returning a localized string, or as a string which is a localization key, to control the text that appears on the button.
  • SMODS.Scoring_Parameter now has a juice_on_update flag set to true which controls whether the display of it uses juice_up when it updates
  • added SMODS.is_challenge_unlocked function

What's Changed

New Contributors

Full Changelog: 1.0.0-beta-0827c...1.0.0-beta-1016b

1.0.0-beta-0827c

26 Aug 23:52

Choose a tag to compare

For detailed information on what this release adds, please see this discussion:
Click to see discussion post

What's Changed

New Contributors

Full Changelog: 1.0.0-beta-0711a...1.0.0-beta-0820a

1.0.0-beta-0711a

11 Jul 21:06

Choose a tag to compare

Main Notes

  • Added SMODS probability functions
  • Poker Hands visible property adjustments
  • Animation adjustments
    • certificate/marble
    • card juicing on conditional upgrades
    • level not updating when levelling up a different hand
  • Discard effects on debuffed cards fixed
  • Blueprint effects no longer copy debuffed jokers
  • Blind debuff text can now be updated after it has been created
  • Added context.initial_scoring_step
  • Added context.joker_type_destroyed
  • Added context.evaluate_poker_hand
  • Added context.check_eternal
  • Added SMODS.is_eternal
  • Added Card:should_hide_front
  • Added context.beat_boss to context.end_of_round to signify if a boss was defeated

Probability Changes

Probability has had it's functionality changed to allow for more granular control of it, and to allow for effects to happen based on probability rolls. Unfortunately, this requires updating older mods to be able to function properly with the new changes. There are two steps to do this.

Updating Probability Chances

Step 1 - Replace your loc_vars

Any item descriptions that contain a chance roll should be updated to use the new functionality. If your code looked like this before,

return {vars = {numerator, denominator, other_value}}

then it should be changed to

local new_numerator, new_denominator = SMODS.get_probability_vars(card, numerator, demoninator, 'identifier') -- it is suggested to use an identifier so that effects that modify probabilities can target specific values
return {vars = {new_numerator, new_denominator, other_value}}

This will allow your item description to dynamically update based on probability altering effects.

Step 2 - Replace your probability checks

The probability check will also need to be adjusted. If your code look like this before,

if pseudorandom('seed') < G.GAME.probabilities.normal * numerator / denominator then

then it should be changed to

if SMODS.pseudorandom_probability(card, 'seed', numerator, denominator, 'identifier') then

This will allow your random chance effect to be based on probability altering effects.

Modifying Probability

It is now possible to modify probability in two ways. By using new calculation contexts, you can modify both the numerator and denominator of a chance based effect, with respect to joker order, or you can set it to a fixed value. Both of these new contexts have context.numerator and context.denominator which are the current values of the numerator and denominator, taking into account modifications from previous jokers. They also have context.trigger_obj and context.identifier which can be used to identify the source of the chance roll.

fix_probability = true, from_roll = from_roll, trigger_obj = trigger_obj, identifier = identifier, numerator = additive.numerator or base_numerator, denominator = additive.denominator or base_denominator

context.mod_probability

This context should be used for any additive or multiplicative modifications to the probability.

if context.mod_probability then
context.numerator -- current numerator
context.denominator -- current denominator
context.mod_probability -- boolean value to flag this context, always TRUE
context.trigger_obj -- the object that the roll comes from (note: The Wheel blind switches between the blind object and the blind prototype object)
context.identifier -- a string value to identify the source of the roll
context.from_roll -- internal value used to only trigger certain return values when the roll is made rather than a tooltip update

For example, Oops All 6s! would use this check:

if context.mod_probability and not context.blueprint then
	return {
		numerator = context.numerator * 2
	}
end

context.fix_probability

This context should be used for setting either the numerator or the denominator.

if context.fix_probability then
context.numerator -- current numerator
context.denominator -- current denominator
context.fix_probability -- boolean value to flag this context, always TRUE
context.trigger_obj -- the object that the roll comes from (note: The Wheel blind switches between the blind object and the blind prototype object)
context.identifier -- a string value to identify the source of the roll
context.from_roll -- internal value used to only trigger certain return values when the roll is made rather than a tooltip update

For example, a joker that sets every chance based effect to a 1 in 2 would use this check:

if context.fix_probability and not context.blueprint then
	return {
		numerator = 1,
		denominator = 2
	}
end

Responding to probability rolls

It is also possible to trigger effects based on the outcomes of probability rolls, using another new context.
Some return values may appear misordered here. Please report any such occurances then we can continue to improve SMODS.

context.pseudorandom_result

This context should be used for setting either the numerator or the denominator.

if context.pseudorandom_result then
context.pseudorandom_result -- boolean value to flag this context, always TRUE
context.result -- the result of the chance roll
context.numerator -- the numerator used for the chance
context.denominator -- the denominator used for the chance
context.trigger_obj -- the object that the roll comes from (note: The Wheel blind switches between the blind object and the blind prototype object)
context.identifier -- a string value to identify the source of the roll

For example, a joker that triggers a message when a chance roll fails would look like this:

if context.pseudorandom_result and not context.result then
	return {
		message = 'Chance failed!'
	}
end

Other Changes

New Contexts

context.initial_scoring_step

This context is used for scoring effects that happen before playing cards are scored.
Note: This happens after context.before

if context.initial_scoring_step then
context.cardarea, context.full_hand, context.scoring_hand, context.scoring_name, context.poker_hands,
context.initial_scoring_step -- boolean value to flag this context, always TRUE

context.joker_type_destroyed

This context is used when a non-playing card is destroyed.

if context.joker_type_destroyed then
context.joker_type_destroyed -- boolean value to flag this context, always TRUE
context.card -- the card object that has been destroyed

Note

You can return no_destroy = true within this context to block the destruction event.


context.evaluate_poker_hand

This context is used to make modifications to the evaluation of poker hands, or to display custom hand names.

if context.evaluate_poker_hand then
context.evaluate_poker_hand
context.cardarea, context.full_hand, context.scoring_hand, context.scoring_name, context.poker_hands
context.evaluate_poker_hand -- boolean value to flag this context, always TRUE
context.display_name -- the current text that is displayed

Valid return values to make modifications within this context are:

  • replace_scoring_name = "Hand Type" used to change which poker hand is used to score
  • replace_display_name = "String" used to change the displayed text (also accepts a loc_key for a string stored in the poker_hands loc_table)
  • replace_poker_hands = table used to modify the poker hands table (this is fairly advanced and should only be used if you know what you are doing)

context.check_eternal

This context is used to apply the eternal effect without the sticker being applied.

if context.check_eternal then
context.check_eternal -- boolean value to flag this context, always TRUE
context.other_card -- the card object that is being checked
context.trigger -- the source of the check (this is an empty table if it has not been provided)

Note

You can return no_destroy = true within this context to add the eternal effect to a card. Returning no_destroy = {override_compat = true} will apply the effect to cards that are marked as eternal_compat = false.


New Functions

SMODS.is_eternal(card, trigger)

This function is used for checking whether a card object has an eternal property, provided either through the Eternal sticker, or other means.

  • card - the card that is being checked
  • trigger - generally should be a reference to the object that is doing the check. If the check is being done by a general function, it is recommended to supply an identifying table such as {destroying_cards = true}

Card:should_hide_front()

This function checks whether a card object should display the front sprite or not. Currently only checks for Stone cards and cards with overrides_base_rank = true defined on the Center, but can be hooked to provide additional functionality as required.

SMODS.is_poker_hand_visible(handname)

This function checks whether a poker hand is visible in the poker hands menu.

  • handname - string of poker hand name

What's Changed

Read more

1.0.0-beta-0614a

14 Jun 11:24

Choose a tag to compare

What's Changed

  • Allow modded editions to spawn naturally on playing cards in shop by @nh6574 in #718
  • SMODS.showman() function to apply showman-esque effects by @nh6574 in #717
  • get_current_pool properly supports editions by @nh6574 in #719
  • (Better) Playing card support for SMODS.create_card by @nh6574 in #720
    • Adds support for "Playing Card", "Base", "Enhanced" as options for set
      • Playing Card -> respects base enhancement chance
      • Base -> always spawns an unenhanced card
      • Enhanced -> always spawns an enhanced card
  • Multiline name support and scaling fix by @nh6574 in #723
    • name fields now accept a table of strings
  • context.round_eval by @nh6574 in #726
  • Add lookup table of ObjectTypes to each center by @nh6574 in #735
  • Add util function, SMODS.merge_effects, for merging calculate return tables by @nh6574 in #736
  • Allow pseudorandom_element to take strings for seeds by @nh6574 in #741
  • Fix SMODS.Gradient crashing in attention_text by @nh6574 in #753

Full Changelog: 1.0.0-beta-0530b...1.0.0-beta-0614a

1.0.0 beta (0530b)

30 May 19:52

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.0.0-beta-0509c...1.0.0-beta-0530b

1.0.0 beta (0509c)

10 May 03:55

Choose a tag to compare

What's Changed

  • Excluded no-collection jokers from profile joker sticker progress by @VivianGiacobbi in #685
  • Add enhancements to poker hand tips by @nh6574 in #672
  • fix restart_game referencing wrong path by @nnmrts in #687

New Contributors

Full Changelog: 1.0.0-beta-0506a...1.0.0-beta-0509c

1.0.0 beta (0506a)

06 May 18:58
8695318

Choose a tag to compare

What's Changed

New Contributors

How to install

Please head here for install instructions and a lot more useful documentation pages.

Issues, Suggestions, Contributions and more

Create a pull request, open an issue or find us on Discord if you'd like to get in touch.

Full Changelog: 1.0.0-beta-0323b...1.0.0-beta-0506a

1.0.0 beta (0323b)

23 Mar 15:13

Choose a tag to compare

What's Changed

New Contributors

How to install

Please head here for install instructions and a lot more useful documentation pages.

Issues, Suggestions, Contributions and more

Create a pull request, open an issue or find us on Discord if you'd like to get in touch.

Full Changelog: 1.0.0-beta-0312b...1.0.0-beta-0323b