Page 1 of 1

[2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Fri Jul 18, 2025 11:55 pm
by JustGoFly
I'm trying to disable in my Brave New Oarc mod the ALT mouse wheel. This functionality is making a higher quality duplicates of items I allow in the players inventory and making same level duplicates and drops on the ground stacks of 50 of those items. The issue is just that I can't disable this functionality.

Instructions:
Join game.
Give yourself a box
put in the box some speed modules
pick up a stack of speed modules, hold ALT and scroll the mouse wheel up.

Then pick up any item like an assembler with the Q key.
ALT Mouse Up - and your bots will pick up and place the stacks of those you are dropping into yellow boxes

In data.lua:

Code: Select all

data:extend({
  {
    type = "custom-input",
    name = "suppress-alt-scroll",
    key_sequence = "ALT + MOUSE-WHEEL-UP",
    consuming = "game-only"
  },
  {
    type = "custom-input",
    name = "suppress-alt-scroll-down",
    key_sequence = "ALT + MOUSE-WHEEL-DOWN",
    consuming = "game-only"
  }
})
In control.lua:

Code: Select all

--=================================================================================================
-- Remove Alt-Scroll ability
script.on_event("suppress-alt-scroll", function(event)
  -- Do nothing
end)

script.on_event("suppress-alt-scroll-down", function(event)
  -- Also do nothing
end)

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sat Jul 19, 2025 6:44 am
by JustGoFly
More importantly I should not be getting an inventory changed event on an alt mouse up scroll, if that item is not in my inventory. Since I drop Iitems not allowed in inventory, it's free replication of items or free replication and quality change of items I do allow in inventory.. this would not solve the original problem, but I would not need to disable the key press. Which would continue to offer free items if the player changed the key binding. So not such a great work around to the larger but.

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sat Jul 19, 2025 12:08 pm
by JustGoFly
I see this in the log file:
Error ControlSettings.cpp:1042: suppress-alt-scroll (custom-input): unknown key_sequence: ALT + MOUSE-WHEEL-UP

Note that this is a side issue to the actual issue of my mod receiving a inventory changed event on a ALT Mouse Wheel Up showing inventory in hand that was never in inventory, but was Q copied or a copy of something in a chest.

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sat Jul 19, 2025 12:18 pm
by JustGoFly
modified code to be:
ALT + mouse-wheel-up
ALT + mouse-wheel-down

It works now, BUT Still not the primary issue of receiving an event on inventory changed when a legitimate alt mouse wheel is used.

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sat Jul 19, 2025 1:29 pm
by JustGoFly
Issue has to do with my dropping items in on_player_cursor_stack_changed
You can delete this post - alt mouse-wheel-up event works. My issue is some incompatibility between v 1.1 and 2.0 and I'm working through it.

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sat Jul 19, 2025 2:05 pm
by Rseding91
Thanks for the report however after reading your posts here I have no idea what it is you're thinking is actually broken.

Do you have some steps to do, where an action happens that you think should not happen?

Your save file has the player in the god controller with cheat_mode = true. So alt + scroll will put the item in the cursor stack back into the players inventory, and then *give for free* the new stack of items of a different quality. That's intended because the player is *in cheat mode*.

Re: [2.0.60] Capture of ALT MOUSE-WHEEL-UP and DOWN not working

Posted: Sun Jul 20, 2025 3:07 am
by JustGoFly
ok thanks for the info. Cheat Mode is needed to enable them to function in god mode. But all of the cheat ability is patch'd. They can't craft, or really cheat. What I did to correct this issue was to disable the permission to Alt Mouse Scroll and I turned off my support for Quality mod, since they could easily replicate a quality module if they had a lower quality one in their inventory. I only allow some items in their inventory.

My original issue is resolved, so please feel free to close this issue. The ALT MOUSE-WHEEL-UP needed to be ALT mouse-wheel-up. I couldn't find any documentation on the case sensitivity of this.

Thank you for your time!