The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Drop Trinkets Faster
리셰 4 May, 2022 @ 8:04pm
suggestion: Add MCM Keybind settings, drop all trinkets and cards at once
I'm not sure I can help with this thing but here is the example for adding MCM Keybind settings.

For Controller, check EID's code for reference.

if ModConfigMenu then ModConfigMenu.AddSetting("Drop trinkets faster", "Settings", { Type = ModConfigMenu.OptionType.KEYBIND_KEYBOARD, CurrentSetting = function() return ModSettings["Drop Button"] end, Display = function() local currentValue = ModSettings["Drop Button"] local displayString = "List toggle key : " local key = "None" if InputHelper.KeyboardToString[currentValue] then key = InputHelper.KeyboardToString[currentValue] end displayString = displayString .. key return displayString end, Popup = function() local currentValue = ModSettings["Drop Button"] local goBackString = "back" if ModConfigMenu.Config.LastBackPressed then if InputHelper.KeyboardToString[ModConfigMenu.Config.LastBackPressed] then goBackString = InputHelper.KeyboardToString[ModConfigMenu.Config.LastBackPressed] end end local keepSettingString = "" if currentValue > -1 then local currentSettingString = InputHelper.KeyboardToString[currentValue] keepSettingString = "This setting is currently set to \"" .. currentSettingString .. "\".$newlinePress this button to keep it unchanged.$newline$newline" end local deviceString = "" deviceString = "keyboard" return "Press a button on your " .. deviceString .. " to change this setting.$newline$newline" .. keepSettingString .. "Press \"" .. goBackString .. "\" to go back and clear this setting." end, PopupGfx = ModConfigMenu.PopupGfx.WIDE_SMALL, PopupWidth = 280, OnChange = function(current) if current then ModSettings["Drop Button"] = current end end, Info = { "Configure a button to drop trinkets and cards(Default = Y)", } } ) end


bonus: If you want make drop all of them once, you can use this code.
Keep in mind that pocket item slot must start with 3, so make drop all cards at once.
player:DropPocketItem(3, Isaac.GetFreeNearPosition(player.Position, 10)) player:DropPocketItem(2, Isaac.GetFreeNearPosition(player.Position, 10)) player:DropPocketItem(1, Isaac.GetFreeNearPosition(player.Position, 10)) player:DropPocketItem(0, Isaac.GetFreeNearPosition(player.Position, 10)) player:DropTrinket(Isaac.GetFreeNearPosition(player.Position, 10), false) player:DropTrinket(Isaac.GetFreeNearPosition(player.Position, 10), false)
< >
Showing 1-1 of 1 comments
Laraz  [developer] 4 May, 2022 @ 9:43pm 
Thanks!
I'll update mod today
< >
Showing 1-1 of 1 comments
Per page: 1530 50