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_playare likely to be broken.chips/multkeys rather thanchip_mod/mult_mod)eval_cardnow returns two values,effandpostNew functionality
G.jokers + G.consumeables,scoring_hand,G.hand.cardsand the selectedDeck'strigger_effectsoundfor custom sounds in messagescontext.main_scoringreplacesnot context.repetition and not context.individual(preference)context.final_scoring_stephappens just before plasma's balance effectSMODS.calculate_contextcan 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_effectcan be hooked to add different scoring keys.-- TARGET: descriptioncomments 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 = Xas 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_messageanddollar_messageare also supported.Beta Was this translation helpful? Give feedback.
All reactions