#Question about steamodded from a beginner

5 messages · Page 1 of 1 (latest)

full adder
#

The core folder of steamodded contains deck.lua, joker.lua, sprite.lua and suit.lua, so if I want to add a deck or a joker I can use the corresponding file, but if I want to add a boss blind or a custom rule for a challenge that is not included in the four files, what should I do? Adding a challenge seems easy, as it only needs an insert into the G.CHALLENGES table, but for adding a boss blind I have no idea, and there doesn't exist such mod for me to learn.
And I wonder how to modify a function? For example blind.lua contains this:

function Blind:modify_hand(cards, poker_hands, text, mult, hand_chips)
    if self.disabled then return mult, hand_chips, false end
    if self.name == "The Flint" then
        self.triggered = true
        return math.max(math.floor(mult*0.5 + 0.5), 1), math.max(math.floor(hand_chips*0.5 + 0.5), 0), true
    end
    return mult, hand_chips, false
end

If my new boss blind needs to trigger this function, I think I should inject if self.name == "new boss blind" then ... into it, but how?

full adder
#

I begin to understand, something like

#

local somethingref = something

#

function something

#

return somethingref