#LethalCompany InputUtils
1954 messages · Page 2 of 2 (latest)
because the base game rebind UI just straight up disabled rebinding the scroll wheel
when I re-enabled it
I encountered the same problem
so I'll have to dig into Unity's docs to see what I can do about it
on a side note
Looked into it
Excluding Scroll/Y allows for Up and Down to be uses However
it can only be used with InputActions with a type of Axis
it won't work with Button types
at the very least I can allow rebinding axis types for the next release
but I'm going to have to look into a solution for Button types
Figured out a solution
Make a layout override for the mouse device
add two synthetic buttons, scroll up, scroll down
have them copy their state from scroll/up and scroll/down respectively
define them as buttons
register the layout override
and it just works™️
probably going to add some glyphs for mouse buttons and push it out
TLDR: I have a solution to fix scroll wheel binds for all InputActions, update soon-ish
thank you!
best feature of this update though right?
I can finally invert the item scroll direction
just pushed 0.6.0 give it a few minutes to show up on the thunderstore
Just submitted an issue to github, sorry if notifying you here also wasn't the way, i just know github notifications arent as seen as discord ( at least for me)
could've sworn I nipped this one already
i'll take a look
ah I see where the problem is
one sec
this was a result of an oversight on my part (literally 100% of the issues so far)
easy fix though
I'll have a PR open for you to test with here in a minute
Could you try the artifact from the PR and let me know if the issue is still present? https://github.com/Rune580/LethalCompanyInputUtils/actions/runs/7679068148
Seems to work
awesome
sorry about that, I thought I fixed it already, but forgot to do the same to the builder
Another question, is there a way to make a keybind to not execute if say shift is held while it is pressed?
hmmm`
seems like there isn't a InputSystem specific way to do so
I'd try checking the state of shift in the callback for your Action
and returning if shift is pressed
Yeah fair, just wanted to check before settling on something like that. Thanks for the quick fixes and the info
@twin cargo Is ther a way to disable rebinding for either controller or keyboard on a specific input?
I have an input i want for controller only. But the settings page allows people to bind a keyboard input which i dont want
sorry if its a bad explination
you're using the runtime/builder api right?
yes
it should just work if you omit either kbm or gamepad paths when adding it
if not, then I messed something up
it does, however i dont want people being able to bind it to something else in game
like how some of the default inputs for the base game have a red X on controller inputs in the settings
Oh, well before you fix it i would like to add that i use the feature of leaving a keybind empty and letting someone rebind it.
Unless im mis understanding, sorry
no, that's fine
specifically, if you call the "WithKbmPath" or the gamepad equivelent
it sets that device to support rebinding in game
omitting that call entirely is supposed to set it as unsupported
i havent tried that yet
silly me
i will try it and let you know, thanks for th einfo
it was a feature I added as part of a bugfix
I really need to add that info to the readme
sorry to pester you like this but, did you try it?
No sorry, getting held up by other changes i made, wont be able to try it for at least a few hours
no worries, take your time
I decided to give up on the things holding me up.
builder.NewActionBinding() .WithActionId("EmoteWheelController") .WithActionType(InputActionType.Value) .WithGamepadPath(Settings.emoteWheelMoveInput.controller) .WithBindingName("Emote Wheel CONTROLLER ONLY") .Finish();
Seems to be an issue with removing WithKbmPath
right
absolutely broke something
think I know what it was
sorry, but it's probably going to have to wait
please understand
All good, i wont be finishing these changes until next week anyway :P
nerds
Looks like I've got a fix coming out here in a moment
just pushed out 0.6.2 to fix the issue
Seems to work, thanks for the quick update
thinking of making a change to the BindingOverrides schema
adding groups to the schema
and setting up device specific groups
so I can determine device specific binds without needing to care about it's index in the bindings array
helps me clean up a good bit of smelly code
PR for schema change: https://github.com/Rune580/LethalCompanyInputUtils/pull/26
Will this change still work with mods targeting 0.6.2 or will they need to be updated
Very WIP
you can follow progress here: https://github.com/Rune580/LethalCompanyInputUtils/pull/28
Well, I think I found a reliable way to list supported keys/inputs from a specific device
that explains why the keyboard device doesn't support f13-f24 😔
might be able to fix that tbh
@twin cargo Since I've recently been having people tell me my keybind display names aren't updating, maybe I could ask you what the correct way to get the name of a keybind, whether on keyboard or controller, and have it show up correctly even if they change it in the menu? Ty in advance!
Also, for reference, this is apparently the code I ended up with, but not even sure it works 100% of the time. And I also don't remember how I came up with this code, or if I should use path, or override path, or something completely different. Any advice would be helpful! I really don't know the new unity input system that well.
int bindingIndex = usingController ? 1 : 0;
string displayName = inputAction.bindings[bindingIndex].path;
if (displayName == "")
displayName = inputAction.bindings[bindingIndex].overridePath;
(not shown here, but it would then convert that string to a readable format)
you should use effectivePath
that's the path with the overrides applied to it
@idle grove
.path is the default path you set when creating the input action
.overridePath is the override (only if set)
.effectivePath is .path with .overridePath overlayed on top of it
WHAT. There's an effectivePath? Lol I will get this swapped over, but that's probably going to solve my issue. Thank you!
I'm late to the thread, but have "keybinds not being shared with a profile code" been discussed? Is it on individual mods end or InputUtils?
A bit annoying for everyone who's using my profile to have their keybinds replaced by mine every time I update the profile.
Never considered that, thanks for bringing that up
I'll look into possible solutions
I think [redacted] did something about it at some point. It's either about not using format that is shared (like cfg or json) or storing there somewhere away from regular config folder. Not exactly sure.
One idea I've got is to detect if it's loaded from a modpack and to setup a persistent folder in the modpack to store controls at
If the persistent control doesn't exist yet, load it from the profile
Otherwise load the persistent comtrol
Might have to tweak that behavior a bit, but I think it works fine in my head
I've just been adding the keybind overrides to the config folder. Would be nice to have a solution. But for now this works.
Thinking something along the lines of being able to save your controls as a preset
That gets saved outside of the modpacks/profiles
And being able to load presets from the controls screen
That would still require everyone to reapply their preset every profile update, which is not much different from having to reapply the binds tbh.
Maybe I don't understand something, but it still feel like the best solution is to just store InputUtils keybinds somewhere or in a way that makes them not sharable with profile code/file. Most mods that use IU already have key defaults in their configs.
Hmmm
Good point
Sorry, I haven't played LC in months, so my perception of what would be a good idea isn't great atm
Appreciate the feedback though

So, from what I understand, IU needs to store overridden controls in a persistent location, in which it doesn't get shared with modpacks.
This introduces a change in default behavior though
In which modpack creators can't easily ship default binds
Modpacks have more control than simple profile sharing anyway. Maybe you can still keep current behaviour of reading JSONs from default folder but no longer create them there automatically.
I was thinking maybe something along the lines of
You have your global/persistent controls
And modpacks can ship default binds
And per modpack you can configure which one you want to use
The global controls
Sure.
Or the modpack controls
And this option is stored in the same persistent location
So it won't get overridden by modpack updates
I think we understand each other, and you know better how to implement it. I'll just reiterate the end goal in a simpler terms. Just in case.
If a user has set up their own binds, they should always take precedent no matter the profile/modpack update. Binds that they did not should be defaults, or otherwise overwritten by profile/modpack ones.
Defaults < Profile/Modpack < User
that will be the default behavior, yes
this will be configurable of course
specifically the order
they will have the option to choose these orders:
- Defaults < Profile/Modpack < User (Default)
- Defaults < User < Profile/Modpack
- Defaults < User
- Defaults < Profile/Modpack
I'll leave you to it then. Thanks in advance!
took more than I was expecting to implement a global/local swapping system
but
@reef pawn
Should prob add a hover tooltip describing the option if you haven't already
Huh, you went further than expected with this.
like this?
hmmm
I might need to implement some form of Locale loading
there are quite a few bits of important text in InputUtils now
but they are all hardcoded and only English
Yeah that's perfect, very clear and concise
There we go, I've now set up a very basic Locale system
think I'm basically ready to ship this
@twin cargo a request if it can be done, could a custom option to invert only hotbar scrolling be added? Cus the vanilla implementation also inverts scrolling for the terminal
If not then it's fine, just don't really see a reason why this couldn't be included in input utils
wait, is terminal scrolling really tied to your hotbar scrolling binds???
Yeah, when you invert the scrolling in vanilla it also messes with the Terminal scrolling
Lol
💀
https://thunderstore.io/c/lethal-company/p/NotAtAll/ScrollInverter/ So I've been using this in the mean time 😂
It only applies to the hotbar
I see
hmmm
think the ideal solution would be an option that, when enabled, would force the terminal to scroll with the scroll wheel regardless of the hotbar binds
gonna have to think on it more
I'd rather avoid altering vanilla behavior if I can
as I don't want to cause any mod incompatabilities by doing so
having it as an option does make it easier to consider
as if it causes an issue they could simply disable it
but I'm going to have to think on it more
Hmm, I have an issue with my keybinds not saving properly. After a fresh install and config of the mod, I tried to change the custom emotes play random emote and join emote buttons. It asks me to confirm changes but then when I get back in game it hasn't changed. And when I check the settings again they are back to default
uh-oh
which version of InputUtils are you using
I changed only global apparently, and that wasn't saving
can you send me your logs
Not easily, I'm on steam deck lol. I can try though maybe
I see, okay I think I know what went wrong
it's more than likely an oversight when running through proton
LogOutput.log?
yes
I'll see if my friends can reproduce the issue in windows
I'm getting an upload failed, oof
hmm no warnings from input utils, weird
i'm looking into this more now
can you give me some reproduction steps
What I did was join a lobby
Realized my emote keybinds were wrong after the new r2 code
I changed only the global keybinds apparently since I didn't realize the difference
Clicked back and then confirm changes
When I hit resume, the settings hadn't changed, so I checked the settings and it was default again
I'll see if I can reproduce it
I think it worked with the base game keybinds, but not the emote ones?
Because I had to change my dpad
base game keybinds are not modified by me, they are put on the same screen simply for convenience
Does the global/local thing work with them?
I'm normally on my windows computer, just visiting parents so playing on my steam deck lol
So what was the issue?
almost got it
sorry for the wait
Got it
issue seems to be fixed
will have the patch out in a few minutes
just making sure I didn't introduce any other new issues
Thanks for adding this!
Just pushed hotfix 0.7.1
should be up in a few minutes
@queen wolf sorry for the wait
No problem
does anyone know what i need to put for Scrolling up or down?
<Mouse>/scroll/up
<Mouse>/scroll/down
%appdata%\..\LocalLow\ZeekerssRBLX\Lethal Company\InputUtils\controls
out of curiosity are you manually changing the controls from the file itself?
yeahh because when i try to change the input ingame by scrolling up or down it doesnt do anything
alright i guess changing the input to scrolling wasnt the brightest idea.. totally forgot it'd just change to another item slot. 😂
i just wanted to make color changing from BetterSprayPaint feel more intuitive. so i thought it'd be nice if i could use the scroll wheel to do that.
is the mod supposed to detect scroll up and down input? i am just using v0.7.1 for the mod.
if u really want to check it out i guess here's my modpack code: 018e42a6-eb4f-09c2-ddc7-887cfc84dd2c
its a WIP modpack and has VR (currently disabled via config) so it'll run as flatscreen
It's supposed to fully support the scroll wheel
scroll wheel seems to work for me
what mouse do you have?
I think some other mod might mess with it.
I tested with the modpack code supplied
Ah.
really odd
probably a mouse thing
if you find out more info on what's causing it let me know
will do
okay if i get rid of item scrolling inputs.. scrolling totally works for changing spray paint color.
but im definitely not gonna get rid of item scrolling lol. so i guess ill just keep the spray paint inputs like it was before.
kinda glad i made that profile code before i screwed with the item switch inputs lol
when i try to reset it, it changes to "1DAxis"
yeah no clue lol
I had something funky like that myself I think.
i think i just need to nuke inpututils config and start fresh 😔
what OS are you on?
windows 10
"all 640 files successfully validated"
does a fresh profile with only InputUtils have this issue?
just tried it. same result.
give me a second. im going to nuke the global and local config.
you've got to be kidding me
🥹
its still borked
fresh profile, fresh input util global/local configs
By the way Rune, I had instance of people getting my binds for vanilla actions after they imported my profile.
Is that "fixed" by this update?
i think my pc is doing some tomfoolery
I-
I don't touch vanilla binds
I do 
I'll report back next time I play if it happens.
I don't
I do read them in order to display them in UI
but I don't modify them in any way outside of the Rebinding part
it seemed like changing it and resetting it was the start of all my issues.
I really don't get what's causing that
honestly
i just went into vanilla game and 'set as default' for the binds and now everything is fixed
it was really weird and kicking up some errors and when i tried to reset the controller input on the right the game would crash
if ur interested in seeing
Why is it under a spoiler?
huh
that crash is coming from the Locale system I added in 0.7.0
this line: C:\Users\xxx\AppData\Roaming\Thunderstore Mod Manager\DataFolder\LethalCompany\profiles\test\BepInEx\plugins\Rune580-LethalCompany_InputUtils\LethalCompanyInputUtils\Locale\en_US.json
can you check to make sure that the file exists?
that prob happened when i nuked the configs
but i already deleted the profile and got things working again now
it should be next to where input utils is installed at
it was, but i removed it when i nuked configs. i assumed it wouldve just generated it again.
but seems like u only get it upon install
the locale isn't generated.
it contains translatable strings
for in the future translations can be done
just to clear things up, the issues happened before i removed it.
and the user can choose their preferred language
yes I know
does scroll wheel work now?
yeah i went into vanilla game and set as default and it fixed it
im definitely not gonna touch the vanilla inputs in the future 😅
i only did it in the first place to test something
well vanilla inputs are fine to touch
in-game specifically
I've been doing it all the time
when I said "I don't touch vanilla binds"
I meant I don't touch them in code
InputUtils doesn't modify them outside of handling the rebinding
that's why this issue is so bizarre to me
ah ok
we'll just say im an anomaly until it randomly pops up for someone else
could you test rebinding the vanilla binds with scroll wheel for me
specifically using InputUtils?
discords having a moment
do i try uploading again
ok now its showing
cmon its only a 4mb video discord 🤨
so interesting observation
"Item Switch Left", "Item Switch Right" does detect me scrolling up and down
but the other options dont
you'll see for the other options it will actually scroll the page instead
and it detects side scrolling too
so how i initially broke things was deleting the input for item switch. just blank. from there things started to break.
still can't reproduce
same profile
made another inpututils only profile and was doing this in there
maybe i try another mouse
what kinda mouse u got?
Tested with both a Razer Basilisk V3 Pro and a Logitech G502 Hero
I wonder if it's possibly driver related
maybe
i see in ur video ur able to apply to any action such as sprint and crouch
but for me i was unable to.. only certain actions would detect scroll input
that is the intended behavior
with InputUtils at least
at the end of my video i scroll from top to bottom. any action that couldnt detect scroll was set to 'T' and the ones that could have scroll on them.
I have no idea what mod conflict is causing this in combination with InputUtils because neither do it on their own. It causes motion sway when rotating, are there any known incompatibilities? I tried disabling the ones I thought could cause it but no luck so far
motion sway?
Ah don't worry, it's a me problem, I found the mod and realised I must've failed my testing because it's part of LethalSanity
alright, glad you figured it out
done
as of now, and starting with version 0.7.1, you can now use nuget.org for pulling input utils
<ItemGroup>
<!-- Make sure the 'Version="..."' is set to the latest version -->
<PackageReference Include="Rune580.Mods.LethalCompany.InputUtils" Version="0.7.1" />
</ItemGroup>
pushing out a minor update 0.7.2 that adds integration with LobbyCompatibility and LethalConfig
they are soft dependencies
no changes were done on the api or the behavior of InputUtils
it's only for general users
As a pack maker for my friends, is there any way to force InputUtils to use Local mode by default instead of Global? I'm trying to set up specific hotkeys for my friends as I know they won't go through the effort to fix conflicting hotkeys otherwise; this was all well and dandy before Global keybinds were added, but now I have no control over this whatsoever.
By default, InputUtils loads both Global and Local, but gives priority to Global keybinds when a conflict is detected with Global between Local
It was determined after discussions that this was probably the best behavior we can ship by default with the addition of Global keybinds
If I’m understanding correctly wouldn’t there implicitly be a conflict in favor of global at all times? Or is that only factored once the key is set manually at least once in Global mode?
Only if they modified the key in Global mode
Keybinds priority can be hard to explain due to the nature of how it works within Unity
Priority works like this
- Global (but only if they changed it to be different from the default)
- Local (but only if they changed it to be different from the default)
- Default keybinds
If they didn't change the keybinds in the Global config
Local takes priority
Alright, thank you for explaining
The "Global/Local" button only changes what keybinds your changing/viewing, not what you're using
It exists to make it easier to change keybinds locally to each modpack without having to open the control files and manually edit them
But it is a bit confusing
So I probably need to do a second pass and see what I can do improve that
let me know if you have any suggestion on how I could improve the UX or make it more intuitive
I tried my best to explain how it worked in the in-game UI
but it's a bit of a complicated feature
@rocky cipher was that what you wanted? or would you want me to look into a better solution for you?
That's more or less what I was looking for, thank you for your consideration
Alright, sorry if the update felt antagonistic to modpack creators, it was never my intention for it to be difficult to understand. I'll update the README whenever I can to try and make it more clear how the Global/Local stuff works
ah you saw that lol
It's all good, I was just kind of frustrated for other reasons at the time
The lack of clear documentation on how the feature works was not really helping but if you're going to update that then all should be well
yeah, I suck at writing good docs
Something to worry about? 
Yeah, I know.
Think it's just a machine issue?
Because the bindings seem to be working just fine.
Interesting
This is the second time I've seen a device not have the keyboard device registered in unity
I guess this means it isn't something I'm allowed to ignore anymore
Would you mind helping me figure out why this is happening later
I can't reproduce the issue on any of my machines
Sure, whatever you need.
It seems to appear recently as I don't remember seeing these when messing with LGU.
LGU?
Lategame Upgrades.
Ah
Ended up figuring out what caused this
InputUtils has a debug tool I call "LayoutExporter"
which loads specified Devices and their layouts
and exports it as a json file
and when InputUtils is loading in isolation
it loads the devices after unity starts
but when you have mods that depend on input utils
input utils tries to load the devices too early
this doesn't cause any real issues, because it's only for debugging device layouts
but I fixed it
me too
Is there a way to set key combinations?
not yet
there's some difficulties with implementing it as unity doesn't really provide an easy way to rebind them
I have some ideas on how I can make it happen though, I'm a bit busy though
soon-ish
I'm trying something right now
I figured it out
Just wanted to double check that having v0.7.1 in nuget wont have any known issues if the user installs v0.7.4 of the mod?
Cant seem to find any nuget version >0.7.1
sorry for the late response, somehow didn't get a notification. as a first off, I (try) to make sure all patch releases (-.-.X) have the non-breazking api changes
as a 2nd off
all versions seem to be publicly listed
unless, you meant the github packages
in which case
I ended up changing the name of the package
for future convenience
I see, i am still on the github packages version, didnt realise there was a new package
hey rune. so i got a particular issue involving DramaMask, LCVR, and InputUtil.
InputUtil is being used as a soft dependency by DramaMask.
i can properly interact with mask items when InputUtil is disabled, but as soon as i have InputUtil enabled...
Item Secondary Use & Item Tertiary Use for the mask item no longer works in VR. (i can no longer equip mask & enable glowing eyes)
it still works fine in flatscreen tho.
do u have an idea what might be the problem here?
going to throw in that the way I handle custom inputs is unconventional, namely I'm trying to check when the keybind is mapped to the vanilla scheme (i.e. the secondary actions for walkie-talkies) so the callback isn't invoked multiple times
This works for keyboard + controller outside vr
(It doesn't apply when input utils isn't detected)
also worth mentioning that VR doesnt take keyboard input
also had this same error pop up for me too
same, for a while (didn't seem to affect too much though personally)
I haven't looked into interactions with the VR mod yet
I've attempted to reach out to them in the past with no response
I'll look into it more when I have the time
ill summon daxcess 🪄
Gotta love mobile discord
It didn't send one of my messages
I'm away from my pc for a few more days, so I'm not able to fix stuff easily
But if you do encounter issues
Do report them so I can get on them when I get back
mobile discord be like: 
Might also be good to mention that DramaMask is incompatible with LCVR due to a Harmony patch conflict (not related to input)
Also the fact that inputs break when InputUtils is present makes sense, as it only listens for Q/E (keyboard) or Dpad, both of which aren't used in VR.
(And it stops listening to the vanilla inputs)
And rebinding isnt possible since rebinding only looks for <Keyboard> and <Gamepad>
That might be something I could extend
i didn’t seem to notice any other issue outside of the input issue. what is the conflict? is it relating to hiding players from monsters? i hadnt tested the mask’s stealth feature in recent update yet.
Oh I'm not aware of this, please elaborate?
This might be the main cause actually, yeah
From what I understand, this means you can't rebind controls in VR using InputUtils?
I can add a config to disable usage of input utils to resolve this issue for now at least
YOOO GOT MY INTERNET BACK FINALLY
DramaMask is patching CheckLineOfSightFor(Closest)Player, however in the process it replaces a Blt instruction with a Clt op which makes my CodeMatcher fail and attempt to replace the operand of a nonexistant instruction
I see, that would be problematic yeah
Observe: A scuffed fix™️
I could take a look there but not sure if I can come up with a generic solution
I'll lyk later if I have a good fix 👌
ALrighty lemme know, cuz in that case I can drop the scuffed fix™️
@twin cargo is there a way for instead of doing a click input, having a hold input? maybe i'm just using the wrong solution but trying to use wasd for a hoverboard's movements and this is what im doing rn lol
which requires me to continuously press it instead of hold since it's in fixedupdate
alternatively I could change how the system itself works, rn i have anchors that keep it floating but maybe i can instead having the inputs mess with the rotation of the anchors so that THAT would push it forward etc instead of just an add force push
HoverForward.performed += OnHoverForward
HoverForward.cancelled += OnHoverForward
private bool _isHoverForwardHeld = false;
private void OnHoverForward(InputAction.CallbackContext ctx)
{
var btn = (ButtonControl)ctx.control;
if (btn.wasPressedThisFrame)
{
// Button has started being held
_isHoverForwardHeld = true;
}
if (btn.wasReleasedThisFrame)
{
// Button was released
_isHoverForwardHeld = false;
}
}
Adapt it to your needs, but that's how I handle hold inputs
okiee ty~
@twin cargo apparently people cant load the game using the new input utils update? (i havent tested myself)
ah fuck
I was literally just coming over here, and thinking of what to put because I don't have all the details.
Anyways, cant' click menu buttons, everything using Inpututils went kaboom, yeah
just pushed out a hotfix 0.7.6 to fix that
my b
I refactored the build system to remove Cake, and I forgot to re-add the assetbundles
LMAO
let me know if you encounter any more issues with 0.7.6
Update to 0.7.6
it wouldn't be a InputUtils update if it didn't break everything
Yeah, I see it showed up on the page, but thunderstore ain't letting me have it yet, It's fine I had already rolled back, and I'll update when it pops up itself. Glad it was an easy fix.
just came to this chat to say "woohoo new update!"
and see xu out here exposing rune for being goofy 😩
glad someone told me
so new update will make this disappear? 😮
if I was told any later I wouldn't have been able to fix it in time
yes, the fix is in this update
your welcome, sincerely me
alright updating inpututils.. that'll be one less red text block on the console 😌
it'll also mean less bug reports for me 
slow down cowboy
i am on v0.7.6
also is it normal for new updates to not include this json?
oh my god
or at least it doesnt pop up in thunderstore's config search
I forgot to include the Locale folder too
LMAO
i only remembered this coz i deleted it in the past and u told me about it
0.7.7 incoming 😔
alright
dnot forget to include the dll
third time's the charm
Noice.
there, it should be out in a few
hopefully there won't be a need for a 0.7.8 hotfix today
only tmrw

me waiting for the mod the show up on thunderstore: 
that 0.7.6 update showed up pretty quick.. like 15-20 minutes. that's faster than i remember.
i think last time it seems to take 40-60 minutes.
I've been using Gale instead these days
i saw that around but didnt try it
do these profile codes generate the same exact profile on differing managers like r2modman and gale?
idk how it works under the hood
thunderstore feels slow n clunky. it also crashes often.
gale supports r2modman/thunderstore profile codes
it also supports importing your profiles from them directly
how's it compare to the r2modman & thunderstore? more stable and faster?
I can say anything for thunderstore, I've only ever used r2modman
but the biggest benefit, gale loads the thunderstore mods in the background instead of making you wait until it's all loaded
I also find the interface of Gale to be more intuitive, but that's my personal preference
perhaps i will check it out
I wonder if there's a way to setup an test workflow that has the game installed and checks to see if any errors show during startup
@twin cargo is there a way to have an input be based on the mouse position? im explaining it badly here but i wanna replicate the rotating of the player when their mouse moves to the left or right or up or down basically
the hoverboard is being a pain and sinbce the player is parented to it any rotations the player does that need to apply to the hoverboard reapply to the player which causes a cycle
unsure if its this
dont fullscreen games forcefully center the mouse?
the cursor
but its just invisible when it does this
so does that cycle make the hoverboard & player spin uncontrollably or something? id love to see footage of that. xD
so does unity's parent-child relationship of game objects apply the parent's exact position & rotation to the child and vice versa?
and then ur trying to use some code to rotate the board so its facing the same direction as the player?
but because of the nature of parent-child, u just end up in a loop of infinite rotation? 
is that what's happening?
kind of yes
using .Delta works
i basically locked the rotation of the player and used that
r2
i mean game is fine but idk if the error is fine
0.7.6 is out of date, use 0
7.7
i thought 7.6 had issues
yes?
you have said a correct statement
0.7.6 had issues
0.7.7 the latest release, fixed those issues
use 0.7.7
Lol
bro, how long does CF take to review stuff
prolly cuz its relatively new but dunno
lol
I can't imagine how hellish the hotfixing would've been if TS had a long ass review process
CF can take up to a few days for new mods to go through review from what I've been told
I'm kind of glad CF is gonna have less incentive to swap to now anyways since Mythic is looking into setting up some stuff for Thunderstore, not really a fan of switching platforms and having mods be split
I don't plan on switching to them as a whole, I'm just going to be uploading to them as an additional place to grab my stuff
Idk why they can't just do it like Nexus does where if they detect something the download gets denied after it gets virus scanned, you can upload a mod to Nexus and it gets added instantly but it's not available for download til it goes through a scan first and that process literally only takes a few minutes most of the time
CF supposedly has a manual review process
not that it's stopped malware from getting in completely
Yeah it won't ever completely stop it lol
what's he planning?
#1250299933307703372 if you scroll up we had a long talk about stuff thunderstore has been lacking for months
is there any way to set global controls to default?
This may be a stupid question, but can I detect when a key is pressed and run a method? I know how to do it one way, but I want to know if a specific feature allows for this easily
the best way imo is to use the hooks:
var action = new InputAction();
action.started += ctx => /* Action was started */;
action.performed += ctx => /* Action was performed */;
action.canceled += ctx => /* Action was canceled */;
https://docs.unity3d.com/Packages/[email protected]/manual/RespondingToActions.html#action-callbacks
could you clarify what you mean?
ie: if someone imports the pack i don't want them to use local controls and instead use the global ones i've edited
instead of having to change it in settings to global and prefer global
you could go for it
the whole point of globasl controls are for someone to have their own set of controls that don't get overriden by modpacks
you'd use local controls for exporting with a modpack
and the "prefer global" option would be ideal for 99% of use-cases
Im trying to update dependencies to 0.7.7. Honestly cant remember whether to use the github package source or the nuget one (github is only at 0.7.4) but i tried both, the nuget way is requiring the package AinaVT-LethalConfig that isnt found on nuget also. Is this a package i need to install manually or am i just doing something wrong.
Been a while since i touched anything .Net related so dont know what im missing here.
odd, LethalConfig should be an optional dependency for InputUtils
not sure why it's showing as required
The Github package isn't being updated anymore
as the Nuget Package fills the need better
just tried going back versions it seems the error comes up when i try 0.7.5. Where is it being marked as an optional dependency? I cant immidietly find where this is happening
Seems ok to just build against 0.7.4 for now, sorry for the interruption.
@twin cargo Wondering if you could maybe push an update soon or look into why the cached assetbundles are sometimes becoming corrupted, a few of my friends have recently had the issue where the cached assetbundles become corrupted and the mod can no longer find them unless they uninstall it, clear their cache for the mod and then reinstall it and I'm wondering why it's been InputUtils specifically 🤔
first I've heard of this
Yeah it's been weird it happened to @autumn girder and @plain pawn and someone else that wanted to join us for a stream recently lol
not even sure what would be causing this
I'll admit I have my cache folder in my antivirus exclusions list
so I wonder if it's an antivirus thing
i mean, it's possible i guess?
I feel it would make the most sense lol, maybe they're just getting deleted randomly
assetbundles are basically immutable/readonly
so it's weird that they're getting corrupted at all
Yeah
Which is why I find it more likely maybe it's antivirus being set off and deleting them cus the error I've been seeing is that the mod can't find the assetbundles
@weak warren have you had any issues with Kaspersky doing that with InputUtils?
I know you had to recently update CullFactory to avoid antivirus issues and DiFFoZ had to update LethalPerformance
Kaspersky in current year?
I doubt InputUtils uses a Burst assembly, so it seems unlikely
not sure of all the context here though
if it's deleting asset bundles, that seems even more unlikely, as those are custom archives
It might be a Gale issue
Maybe but I've not had the issue which is strange
The Nuget package Rune580.Mods.LethalCompany.InputUtils has a dependency on AinaVT-LethalConfig, which doesn't exist:
error NU1101: Unable to find package AinaVT-LethalConfig. No packages exist with this id in source(s): BepInEx, nuget.org

Ill have to fix that in the morning
For now, you can build against 0.7.4, as there should be no api changes
Would it be possible to support changing vanilla controls through a local override?
Probably
I was looking through old messages. I saw that you tried implementing it
hm
since I don't have easy access to the base game stuff
that's what I'm trying to do (unbind "dance" and "point" for my modpack)
ah that's why you want it for local overrides
ye :)
thanks :D (no rush though)
@twin cargo I opened an issue about it for LethalConfig: https://github.com/AinaVT/LethalConfig/issues/51
Does the Global/Local switch work? Doesn't seem to do anything?
Guess something broke in the past 5 months?
I'll look into it when i can, what it's supposed to do is let modpacks ship with defautl keybinds, while letting users have their own global (modpack independent) keybinds
Ah I come here for the exact question of if I can rebind point and dance emotes. RIP.
You can, just keep in mind, currently rebinding vanilla key binds are global and not per profile
Oh I know I can rebind the keys, I was just trying to see if I could do it with the mod config so it ships out to everyone, which appears to be a no. Thank you though.
do u have any idea for why when someone changes a keybind it just resets back to the default? there's no errors in their log so I'm slightly confused what it could be
i thought it could be a permission issue for the keybind config file but surely that would cause an error right?
yes, it should
global
could I get a profile code?
^ @scenic oasis
wdym
profile with the mods?
if yes then these are the mods im using
01951613-40f0-c033-0d1d-65bfa8f6fd2c
wait
01951616-cd6f-0b70-e324-8091af81b0e4
^^^
thats it
you there?
oh ok
SORRY FO9R THE PING BUT @twin cargo I AM GOING TO SLEEP NOW AND I WILL BE UP IN AROUND 7-9 HOURS
sorry for caps
I'm not able to reproduce the issue, would it be possible for you to provide the steps needed to do so
and, if you can, provide a video showcasing the bug?
was able to reproduce the issue, until I fix it here's a workaround: when you have "Local Only" set make sure to switch to local (click on the local button on the top left) before editing your keybinds
seems like there's a few bugs with Global Only and Local Only that I never discovered
interestingly
the issue you showcased in the video
if you swap to local and then back to global
it does remember the keybind you set
it just didn't visually display it when first opening the menu
Fixed
the issue was an interaction between having the priority set to "local only" and the current context being global
when closing the ui it loads the local keybinds
when re-opening the ui
the context switch is told to switch to global context
but I forgot to have it force loading the global keybinds
so it just assumed it had loaded it already
even though it was actually showing the local keybinds
I'm surprised it took this long for this bug to be found tbh
sorry i wasnt home when you sent this but thank you so much. normally i would give up after fiddling around but you and 1A3 really made it work. thank you so much!
@steep lodge @languid kiln The ability to ship keybinds for the vanilla keys with profiles is coming soon
expect a release in a day or 2
Sorry, My modpack just broke with the latest update :,]
I had to roll back
0195267f-0d7a-2f78-bc30-299c6160fe64
along with 0.7.10 ...
for real this time
things should be fine
@barren sky let me know if anything else breaks with 0.7.10
gotcha
Seeing as I've not seen any reports of critical issues, I guess it's stable enough
The nuget package should no longer require lethal config
[09:45:06.4853246] [Error :Lethal Company Input Utils] Got error when applying migrations, skipping...
[09:45:06.4853246] [Error :Lethal Company Input Utils] System.NullReferenceException: Object reference not set to an instance of an object
at LethalCompanyInputUtils.Data.BindingOverrides.FromJson (System.String json) [0x0000b] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Data/BindingOverrides.cs:122
at LethalCompanyInputUtils.Utils.InputSystemUtils.ApplyMigrations (System.String fileName) [0x0012f] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Utils/InputSystemUtils.cs:199
at LethalCompanyInputUtils.Utils.InputSystemUtils.LoadOverridesFromControls (UnityEngine.InputSystem.InputActionAsset asset, System.String fileName, LethalCompanyInputUtils.Config.BindingOverrideType overrideType, System.Boolean removeExistingOverrides) [0x00000] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Utils/InputSystemUtils.cs:114
[09:45:06.4873247] [Error :Lethal Company Input Utils] Got error when applying migrations, skipping...
[09:45:06.4873247] [Error :Lethal Company Input Utils] System.NullReferenceException: Object reference not set to an instance of an object
at LethalCompanyInputUtils.Data.BindingOverrides.FromJson (System.String json) [0x0000b] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Data/BindingOverrides.cs:122
at LethalCompanyInputUtils.Utils.InputSystemUtils.ApplyMigrations (System.String fileName) [0x0012f] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Utils/InputSystemUtils.cs:199
at LethalCompanyInputUtils.Utils.InputSystemUtils.LoadOverridesFromControls (UnityEngine.InputSystem.InputActionAsset asset, System.String fileName, LethalCompanyInputUtils.Config.BindingOverrideType overrideType, System.Boolean removeExistingOverrides) [0x00000] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Utils/InputSystemUtils.cs:114
[09:45:06.4878431] [Error :Lethal Company Input Utils] System.NullReferenceException: Object reference not set to an instance of an object
at LethalCompanyInputUtils.Data.BindingOverrides.FromJson (System.String json) [0x0000b] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Data/BindingOverrides.cs:122
at LethalCompanyInputUtils.Utils.InputSystemUtils.LoadOverridesFromControls (UnityEngine.InputSystem.InputActionAsset asset, System.String fileName, LethalCompanyInputUtils.Config.BindingOverrideType overrideType, System.Boolean removeExistingOverrides) [0x0002b] in /home/runner/work/LethalCompanyInputUtils/LethalCompanyInputUtils/LethalCompanyInputUtils/Utils/InputSystemUtils.cs:129
``` any idea what this error means?
was testing someones pack for unrelated errors and this starts up when my mod is loading lol
my mod loads just fine it's just the error is a bit odd
Weird, it failed to upgrade an old controls file
If it fails it just skips and prints the error
Wait
I never made it print what file it failed to migrate
Fuck

Send me the modpack code if you could
0195cc6e-8fd2-4ec6-99d0-a0f8a89bfe5d fair warning, it's a lot of mods, and it might not let you into the lobby since LL broke the modpack and that was what i was trying to fix
dunno if LL updated in thunderstore yet
@twin cargo do you know if input utils lets me create a Vector2 to read from for like WASD
composite bindings im told
is the actual term
hmm
you could probably use the runtime/builder style and make the composite binding that way
it might not show up though
hmm
why did I not consider this use-case before?
still working out some issues here, but I've almost got Vector composite bindings supported
not sure what the attribute is going to look like for this
it might look super messy

other than refactoring the rebind container to handle multiple "bindings" per an action
this was fairly painless to add
Noice
any way to save changed keys with the modpack so all my friends have the same controls?
yes, set the keybinds using the Local button up top, keybinds set during local will be shipped with your modpack/profile
ohh thanks
getting this while trying to rebind an xbox series x controller
none of the keybinds are read until i exit out of the menu
send me a profile code if you've got one
0196db2c-5ff4-bc2a-d2e3-73ee1f6ecc36
wait
it seems to only dislike base lethal binding\
modded binds are fine
oh i should ask
if i delete a bind in local will it override global to not have a bind for that action?
yes
alright
you know what
I think I might've forgotten to disable vanilla bindings when rebinding
i dont know if it's this mod but my modpack is erroring everywhere and this is one of the errors
could I get the full log
the errors coming from input utils should be harmless
they're just indicating an issue when loading an controls override file
but it will just skip them when encountered
ok
how do you make the local keybinds get preference over the global when sharing a modpack?
Thats up to the user
For now anyways
At some point im planning on a pop up for loading a modpack for the first time to display modpack provided keybinds
But generally speaking by default, unless the user changed the keybind on their global profile, the modpack keybinds will take priority
ok
like even if the mod sets globally the keybind, local overrides it unless its changed?
okay so by default this is how keybinds work:
Higher number means higher priority
2. global overrides (global set keybinds)
1. local overrides (modpack / profile set keybinds)
0. Default keybinds
If a mod has a keybind set to K as the default, and a modpack overrides it to be H. The keybind would be set to H.
If a user sets a global override for that keybind to be T. then the user's global override takes priority over the modpacks override.
The user can decide if they want this behavior or if they want to only use modpack overrides
okayy so the keybind appearing set to "x" in the global section means the mod set it
only if you see a "Reset to default" button next to the keybind
otherwise it's only displaying the default keybind
okay okay
if you switch to the local view, you will see a warning next to any keybinds being overridden by a global override
so if i share a modpack and they have not touched the keybinds it should use the local keybinds
yes
InputUtils seems to be broken with just about anything that tries to use it
Im still investigating this issue
TypeLoadException stuff is annoying, from what I gathered, it didnt reproduce on my profiles for example, mainly because, i have an LLL soft dependency but I also have the LLL MMHOOK files in my profile (even if i dont have LLL in the profile but i did in the past), which makes the error not throw
For some reason Unitys input system is causing issues when loading mods with soft dependencies while Input Utils is installed
yeah it's also related to Unity's input system having a gettypes or smthn but im unsure on the details there
but if someone makes a new profile without generating LLL MMHOOK files, it'd error, so yeah 🙃
I might need to do an IL patch to force unity to do GetTypes in a try catch
Really weird that this crept up all of a sudden
As a temporary workaround, you can try adding the soft dependency Unity is complaining about
Pushed out 0.7.11 which should fix this issue
probably
I ended up patching Unity's InputManager to try and fix this
from my testing, it seems to have worked
it's also a config option, so if the patch causes issues for you, (maybe someone else is also patching the method I'm patching)
you can disable my patch in the config
woopsy daisy
pushing 0.7.12 right now
forgot to register the config before checking the value of it
oopsy
fixed with 0.7.12, should be on thunderstore in a few minutes
You are quick ! Thank you so much !
it was a really stupid mistake from my part
when is the update gonna appear on r2modman any idea?
whenever it decides to update it's cache
it's on the thunderstore site if you need it immediately
@twin cargo
me and a few other people have reason to believe that inpututils currently breaks usage of the belt bag for non-host clients in lobbies
what happens is, a belt bag will randomly stop having the item store key (secondary action keybind) working for a non-host client, and the belt bag also cannot have items taken out of it by people effected by this
however, this is per-each belt bag, so you can rudamentally fix this by just using a different belt bag
it is still possible its not your API, rather the mod bagconfig by matty, however, i feel like its more likely to be this API, since its directly effecting controls a lot more than bagconfig is (all bagconfig has in that regard is allowing emptying a belt bag with the tertiary action key)
at the moment, i do not have a player log to send, but i am about to generate one with a friend in a few minutes, and the issue will probably occur as we play, at which point both of us can send our logs for you to investigate this
@wanton radish also can say the same thing has been happening to them and their friends
input utils only provides an interface to use unitys input system
i'd be surprised if it's the cause of this
especially since i don't touch anything networking related
ah, then this is a misunderstanding of what the mod is for
i took "input" as controls for the game
which i suppose is correct
but not how i thought
also just to mention before anyone asks
i did check if this was a new vanilla game issue since v73 and it didnt happen in a pure vanilla lobby at all for like 10 minutes of constantly belt bagging items
the issue is so frequent it wouldve happened at like the 2 minute mark of testing
@twin cargo No what the issue is, is a scrap mod is breaking inpututils. Its not inpututils directly.
I found culprit in my pack and notified the dev cause it was a special made scrap pack for our group.
i see, thanks for letting me know
turns out their issue is completely different from mine but sounds similiar.
dont know if its InputUtils issue or not but
when using with ItemTertiaryUse Conflict Solver, ITUCS seems stop working
but without InputUtils, it works fine
dunno where should I report this 😅
019c846d-3477-7fa6-5817-887afc80d12e
test code
1st vid BagConfig + ITUCS + InputUtils
2nd vid without InputUtils
when attempting to land on a level:
did this cause an issue?
prevents ship from landing
do you have a modpack code?
can still walk around but loading screen is stuck on and start of round never begins
1 sec
019c9c7b-ae57-9c4d-6f36-749f2c199a9f
that's bizzarre
the error you've captured is supposed to be a "safe" error
I'll look into it
could be something else
and the input utils one is just what showed up
im not sure
hold on
is potentially this
[v80]
- It seems that you're no longer able to change keybinds. The new key is not being registered
I'll get on it after I have some coffee
thanks
I got this log when trying to set it
hope this helps
looking at the diff between version
im not really seeing anything specific
seems like the vanilla actions are not being disabled when opening the rebind UI like they did in prior versions
wait
im looking at the diff between v80 to v73
but this is actually happening on v73
so im just being stupid
how has no one reported this issue to me yet?
this has been a bug supposedly since October of last year
oof 💀
I remember changin keys before v80 a few days ago
maybe v80 increased the bug?
is v80 released in stable or still on the beta branch?
beta branch
im playing on the stable release ans having the issue
it only applies to the vanilla keys
not any modded ones
well, I'm not seeing anything obvious in the diffs as to what caused the problem
but I have fixed it
so let me clean it up and I'll have it out soon™
actually let me test it on v80 just to make sure
should be out now
let me know if I broke anything else
@twin cargo i think this mod is breaking toggle crouch
whenever i try to crouch it does it for half a sec then stands up again
and didn't happen with input utils disabled (though it also disabled like half my other mods)
I just tried it in a modpack with only input utils and toggle crouch is working fine
do you have a modpack code?
I just got a second report, but the modpack they provided has 191 mods.
I want to see if I can't find the culprit, but 191 mods is a bit too much for me to be willing to deal with
I do have a code but its 341 💀
u could send me their code and I could union the modlists to see if i share any mods with them
019d74f7-882c-300c-b497-7425fc067f52
alright no rush though
i won't be able to do anything more about this until tomorrow anyways
also thanks
intersection of our modlists, filtered by dependency on input utils, is
taffyko-BetterSprayPaint-2.1.0
WhiteSpike-Interactive_Terminal_API-1.3.2
WhiteSpike-Weather_Probe-1.0.3
TestAccount666-ShipWindows-2.9.0
sfDesat-Celestial_Tint-1.5.2
WhiteSpike-Shopping_Cart-1.0.2
Rminin-FinallyCorrectKeys-1.6.1
XuXiaolan-CodeRebirth-1.6.1
my money is on better spray paint
of course r2 needs to prune modlist cache right as i go to test 💀
ah how wonderful
issue stopped replicating without doing anyhting
is this fixable on this mod side or no?
I dont think so, I can take another look later but, I cant promise I'll be able to find something. Im not responsible for every mod that uses InputUtils.
its alright! 😅
tho i think none of the mods in the test pack uses InputUtils (cmiiw)
I'll look again though in case it is something I can fix
update, this was the mod causing my issue
this hasnt been updated for 2 years so surprised it took this long to break
and lukeprime is definitely not around anymore so this one isnt getting fixed
nvm it wasnt 💀
it just happened to stop happening when i tested with this mod off
then started happening when i stopped checking
doing a bit more testing is leading me to believe there's some interaction with the vanilla utility slot thats causing the crouch to break down
i disabled said slot with niche tweaks and havent gotten the issue yet
though like the other reports i might have just gotten lucky
as with the other times it wasnt that
i hope this might give some insight
this was before i picked up a scrap (ignore ptem debug logs)
i dont know if the crouch was broken before i picked it up
this is so frustrating lol
it just fails completely randomly
i cant track down whats causing it cus it doesnt reproduce consistently
sometimes it repros as soon as i load the lobby, sometimes it does it in the middle of a moon, sometimes it doesnt do it at all
ive been disabling so many things to try and figure it out, and none of it is working
mightve figured out why the crouch bug is happening
seeya tipped me off to this
this is the default that i havent changed for a while
but when i rebind it, it shows up as this
maybe it was triggering twice or something? idk
Did InputSystem get updated between versions?
Maybe I should add a migration to convert ctrl to left ctrl?
after i put it to left ctrl the bug started happening consistently so idk
with Left Control, bug happens when you do not crouch in the ship before landing on a moon
If you crouch at least 1 time before landing you can crouch normally for the current moon, might seems to be random
If this helps
[Error : Unity Log] NullReferenceException
Stack trace:
GameNetcodeStuff.PlayerControllerB.BeginGrabObject () (at <aca1e98d6f844d3f85cd22b6f7be2f9b>:IL_001C)
GameNetcodeStuff.PlayerControllerB.Interact_performed (UnityEngine.InputSystem.InputAction+CallbackContext context) (at <aca1e98d6f844d3f85cd22b6f7be2f9b>:IL_01D0)
UnityEngine.InputSystem.Utilities.DelegateHelpers.InvokeCallbacksSafe[TValue] (UnityEngine.InputSystem.Utilities.CallbackArray`1[System.Action`1[TValue]]& callbacks, TValue argument, System.String callbackName, System.Object context) (at <7d67996a352a4f4fa0df2b7c9570fda6>:IL_001B)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)
this is starting to seem less like an InputUtils bug
Idk, it was happening as soon as the lobby started for me



