饥荒
Generic to Xbox360
55 条留言
lvds 2020 年 1 月 22 日 上午 7:21 
This solved my glitchy gamepad, thank you!
csmith501 2019 年 9 月 13 日 下午 6:39 
@Bezethoth You have to play around with the modmain.lua file. Basically once you make the changes you need to turn off the mod and then activate it again.

["(Button 0)"] = "\127",--"Button X",
["(Button 1)"] = "\128",--"Button B",
["(Button 2)"] = "\129",--"Button A",
["(Button 3)"] = "\130",--"Button Y",

And for me the D pad wasn't showing properly either. I added this under Right Stick.

["(Button 11)"] = "\142",--"DPad Up",
["(Button 12)"] = "\139",--"DPad Down",
["(Button 13)"] = "\140",--"DPad Left",
["(Button 14)"] = "\141",--"DPad Right",

For Mac users you can find the file in Library > Application Support > Steam > steamapps > common > dont_starve > dontstarve_steam (right click Show Package Contents) Contents > mods >workshop-391918434 > modmain.lua (open in a text editor or notepad)
Bezethoth 2019 年 2 月 24 日 下午 6:30 
I need to change the X to the A, but I'm not sure how to do it on the file mentioned.
OldAbbyRead 2018 年 11 月 11 日 上午 12:35 
THANK YOU! Thank you for making this. As a person who prefers using third-party controllers, I hated the UI just having ugly text junk when I plugged one in. This is much more appealing. Instant favorite mod. :steamhappy:
RoDoX 2018 年 11 月 3 日 上午 8:50 
Also, when navigating the game menu, it displays X to go back, but B does it instead.
@peter_a_klei, may we have an update for this mod? (Shipwrecked).
RoDoX 2018 年 11 月 3 日 上午 8:14 
May I suggest a fix?
Playing Shipwrecked with this mod enabled. So if I drop a coconut on the floor and equip a machete, the mod displays the button A with the description "HACK" next to it, but it should be B, which is the actual button that does it. Is there a way to fix it myself?
inessa.manuelyan 2018 年 6 月 4 日 下午 3:54 
@Rastaman
Go to Library in Finder (Press down Option then click Go and you should see it)
2) Application Support
3) Steam
4) Steamapps
5) Common
6) Don't Starve
7) Mods
8) Workshop...some number I can't remember. you might have several here depending on your mods.
9) open modmain.lua using a text editor.

🅞🅣🅜🅞🅡🅞🅩🅞 2018 年 3 月 14 日 上午 8:09 
I don't know were modmain.lua is on mac, can any one help
applebaps 2018 年 1 月 20 日 下午 8:58 
friggin awesome, thank you for doing the devs' jobs for them
Summad 2017 年 4 月 22 日 上午 4:30 
Works with Easy Ps3 Overlay for DS3 / DS4 if you happen not to use DS4Windows (big drop in performance on my netbook).
nescius 2017 年 1 月 11 日 下午 12:03 
great workaround, thanks, i wish this was already part of the original game and that it would support Steam controller, now i feel a bit stupid for buying the game and the controller.
Dredonkey 2016 年 10 月 23 日 下午 4:20 
and final piece --Now inject our remapping into GetLocalizedControl
local old_GetLocalizedControl = GLOBAL.Input.GetLocalizedControl
local function RemappedControl( self, deviceId, controlId, use_default_mapping, use_control_mapper )
local text = old_GetLocalizedControl( self, deviceId, controlId, use_default_mapping, use_control_mapper ) or ""
return remap_table[text] or text
end
GLOBAL.Input.GetLocalizedControl = RemappedControl
Dredonkey 2016 年 10 月 23 日 下午 4:19 
["(-Y Axis)"] = "\143",--"Left Thumb Up",
["(+Y Axis)"] = "\144",--"Left Thumb Down",
["(-X Axis)"] = "\145",--"Left Thumb Left",
["(+X Axis)"] = "\146",--"Left Thumb Right",

["(-Z Axis)"] = nil,
["(+Z Axis)"] = "\135",--"Left Trigger",,
["(-Z Rotation)"] = nil,
["(+Z Rotation)"] = "\138",--"Right Trigger",

--unset generic inputs
["(-X Rotation)"] = "\149",--"Right Thumb Left",
["(+X Rotation)"] = "\150",--"Right Thumb Right",
["(-Y Rotation)"] = "\147",--"Right Thumb Up",
["(+Y Rotation)"] = "\148",--"Right Thumb Down",
["(Slider 0)"] = nil,
["(Slider 0)"] = nil,
["(Slider 1)"] = nil,
["(Slider 1)"] = nil,
}
--[[
--unused Xbox 360 button images
"\135",--"Left Trigger",
"\135",--"Left Trigger",
"\138",--"Right Trigger",
"\138",--"Right Trigger",
]]

Dredonkey 2016 年 10 月 23 日 下午 4:19 
heres the code
local remap_table = {
["(DPad 0 Up)"] = "\142",--"DPad Up"
["(DPad 0 Down)"] = "\139",--"DPad Down"
["(DPad 0 Left)"] = "\140",--"DPad Left",
["(DPad 0 Right)"] = "\141",--"DPad Right"
--derived from "(DPad %d [direction])",

["(Button 0)"] = "\127",--"Button A",
["(Button 1)"] = "\128",--"Button B",
["(Button 2)"] = "\129",--"Button X",
["(Button 3)"] = "\130",--"Button Y",
["(Button 4)"] = "\134",--"Left Bumper",
["(Button 5)"] = "\137",--"Right Bumper",
["(Button 6)"] = nil,
["(Button 7)"] = nil,
["(Button 8)"] = "\131",--"Start",
["(Button 9)"] = "\132",--"Back",
--derived from "(Button %d)"

Dredonkey 2016 年 10 月 23 日 下午 4:18 
ok i got it to work! figured it out. also please make config and you can chose "Alternate controller bind incase of mod screw up" and one of the options and the one many have is this plz includ sholdent be hard,i havent gotten to the coding level of mods but i will credit you if i end up making a mod for this mod as i say i would thanks! ps i probably wont make my own mod. !ALSO ALL YOU PPL HAVING THE PROBLEM COPY THIS AND SELECT ALL IN THE BUTTON CONFIG AND PASTE THIS YOUR WLECOME
Dredonkey 2016 年 10 月 23 日 下午 3:13 
i tried changing the buttons and it dosent work now
Dredonkey 2016 年 10 月 17 日 下午 6:25 
im confused.
segmentation fault 2016 年 5 月 20 日 下午 5:01 
I found it. For ubuntu the modmain.lua file is located in: "~/.steam/steam/SteamApps/common/dont_starve/mods/workshop-391918434/"
segmentation fault 2016 年 5 月 20 日 下午 4:20 
what directory is the modmain.lua file in? (OS:ubuntu)
apfoss 2016 年 4 月 25 日 下午 5:57 
Hi Peter, I thought I would comment because I just got this to work. Since my keyboard is a little messed up on my macbook, your mod was a great help. Those big "generic buttons" were kind of in the way and I didn't know which one to press. I did have a little trouble though, and that was because I have just bought the game, and didn't know that the mod needed to be enabled in the first place! I spent forever looking for that modmain.lua. I think a better solution would be to just implement button options and remapping for those buttons into the game, so regardless of controller, xbox/ps/etc users could just pick their own buttons from inside the game. In the meantime though it would be nice if you could update the description of the mod and that way it would be more clear.

Thanks again!

Jonah
wintercooled 2016 年 4 月 18 日 下午 12:10 
Billiant! Thanks very much for this Mod - much appreciated, just what I was after.

Thanks to Elkeid also for the mappings which correctly map the 360 controller's buttons.

PS - if you are stuck trying to find the modmain files you have to right click on the dontstarve_steam app and 'show package contents'. Might be obvious to some people but wasn't to me!
桃花清澈眼眸 2016 年 4 月 4 日 上午 5:55 
用 手柄玩
Stephen Stark 2016 年 4 月 4 日 上午 5:05 
吊大的翻译下
peter_a_klei  [作者] 2016 年 2 月 29 日 下午 6:09 
Yup Eagle, I'll get around to that asap.
EagleDelta 2016 年 2 月 27 日 上午 5:40 
Are there plans to update this mod for Shipwrecked? It lists as incompatible
草人强 2016 年 2 月 26 日 上午 5:47 
nice
cc 2016 年 2 月 18 日 上午 5:13 
So where can I get those values for my specific gamepad to configure modmain.lua?
KseaviTy 2016 年 2 月 5 日 上午 6:50 
marco_benoit90, I HAVE THIS PROBLEM 2!
marco_benoit90 2016 年 2 月 4 日 下午 2:53 
I also use a 360 controller and i have the same issue... mapping is wrong :( (i am on linux)
peter_a_klei  [作者] 2016 年 2 月 3 日 上午 11:34 
Then you shouldn't need to use this mod. Your 360 controller should be detected correctly and use the correct icons already.
KseaviTy 2016 年 2 月 3 日 上午 11:29 
Im use controller of Xbox360
peter_a_klei  [作者] 2016 年 2 月 3 日 上午 11:14 
Hello KSEAV!T, what type of controller are you using? Every generic controller is going to have a different mapping and will need to be modified for your individual controller.
KseaviTy 2016 年 2 月 3 日 上午 10:58 
Hello, i find a errors in this mod, you confused buttons (Actions
With Chester): Attack- it's "X" not ''B'', Open it's "A" not "X". And it's all errors what im found. Please Fix. ^^
Eskol Valentine 2015 年 12 月 24 日 下午 10:00 
very useful <3 i just combined this mod with the mod "Easy Ps3 Overlay" and now I have the play station buttons ^^
Master of Pain 2015 年 11 月 13 日 下午 1:51 
@peter_a_klei, thanks I'll do it soon
peter_a_klei  [作者] 2015 年 11 月 13 日 上午 10:51 
@Gojira_86, the controller mapping is going to be different on each machine, to customize it to your specific setup, go into modmain.lua in the mod's directory (workshop-391918434), and then change the values in remap_table. Don't worry about messing something up, you can always delete the mod directory and re-download it.
Master of Pain 2015 年 11 月 12 日 下午 8:40 
mod works in Linux/SteamOS :D

...but A and X are switched :( can you fix it please?

A must have mod for Don't Starve linux owners!
LittleRyan 2015 年 8 月 27 日 上午 12:56 
ood!
Arislan 2015 年 6 月 15 日 下午 7:24 
good!
LucasCranach 2015 年 5 月 17 日 上午 7:38 
anyone have this working in Linux/SteamOS? i get problems with d-pad display/functions.
DoctorWillCU 2015 年 5 月 12 日 下午 3:41 
Xbox360WirelssController on Mac

http://pastebin.com/mhLdCQJs
Elkeid 2015 年 4 月 26 日 上午 11:04 
local remap_table = {
["(Button 9)"] = "\132",--"Back",
["(Button 6)"] = "\133",--"Left Stick",
["(Button 7)"] = "\136",--"Right Stick",
["(Button 8)"] = "\131",--"Start",
["(Button 11)"] = "\142",--"DPad Up"
["(Button 14)"] = "\141",--"DPad Right"
["(Button 12)"] = "\139",--"DPad Down"
["(Button 13)"] = "\140",--"DPad Left",
["(+Z Axis)"] = "\135",--"Left Trigger",
["(+Z Rotation)"] = "\138",--"Right Trigger"
["(Button 3)"] = "\130",--"Button Y",
["(Button 1)"] = "\128",--"Button B",
["(Button 0)"] = "\127",--"Button A",
["(Button 2)"] = "\129",--"Button X",
}

--Now inject our remapping into GetLocalizedControl
local old_GetLocalizedControl = GLOBAL.Input.GetLocalizedControl
local function RemappedControl( self, deviceId, controlId, use_default_mapping, use_control_mapper )
local text = old_GetLocalizedControl( self, deviceId, controlId, use_default_mapping, use_control_mapper ) or ""
return remap_table[text] or text
end
GLOBAL.Input.GetLocalizedControl = RemappedControl
peter_a_klei  [作者] 2015 年 3 月 18 日 下午 12:01 
Thank you TuTu.
TuTu 2015 年 3 月 18 日 上午 10:04 
To those who use a PS3 controller on a Mac like me, here is my working modmain.lua: http://pastebin.com/nmVHXCqd
Red Mamba 2015 年 2 月 20 日 上午 11:27 
Sorry it doesn't work... :(
BarbeRousse 2015 年 2 月 19 日 下午 2:29 
@peter : sorry I found it and deleted my post while you was answering.
So I tried to edit modmain.lua with @Paradox config and it doesn't work.
I still have "button XX" in game instead of Xbox360 button
I use a 360 gamepad on a macbook
peter_a_klei  [作者] 2015 年 2 月 19 日 下午 2:17 
You should be able to find it in /users/<youruser>/Library/Application Support/Steam/Steam Apps/common/Don't Starve Together Beta/dontstarve_steam.app, right click on that and then show contents, and then in the content folder you should see the mods folder and you'll want to open up "workshop-391918800".
Phpminor 2015 年 2 月 17 日 上午 10:33 
Ds
Can't you just use the ps3 buttons and push the equivalent button on the controller? they are on the same places
peter_a_klei  [作者] 2015 年 2 月 17 日 上午 10:31 
Unfortunately no PS4 version yet dsdom2.
domicron_ 2015 年 2 月 17 日 上午 8:43 
can you make one with the ps4 controls i cant play without it!!!