Better Calculation #372
Eremel
announced in
Announcements
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Better Calc is made to improve the usability of calculation for mod developers. It will break lots of current existing mods implementations of things.
Better Calc Breaking Changes
G.FUNCS.evaluate_play
are likely to be broken.chips
/mult
keys rather thanchip_mod
/mult_mod
)eval_card
now returns two values,eff
andpost
New functionality
G.jokers + G.consumeables
,scoring_hand
,G.hand.cards
and the selectedDeck
'strigger_effect
sound
for custom sounds in messagescontext.main_scoring
replacesnot context.repetition and not context.individual
(preference)context.final_scoring_step
happens just before plasma's balance effectSMODS.calculate_context
can be hooked to add different areas to the calculation of non-scoring contexts. If new contexts need to be calculated, this function should be used. See source code for example usage.SMODS.calculate_individual_effect
can be hooked to add different scoring keys.-- TARGET: description
comments throughout card calculation for easy lovely patch targetting.Returning Calculation Effects
This update simplifies calculation effects. The below return is now valid in any scoring context and the message and card will be handled for you.
If you want the message to appear on a different card, add
card = X
as normal.Adding a
message = 'string'
will add an extra message as well as the default calculation message. To remove the default addremove_default_message = true
. You can alternatively usechip_message = 'string'
to replace the chip message.mult_message
,xmult_message
anddollar_message
are also supported.Beta Was this translation helpful? Give feedback.
All reactions