安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
Not a problem! I'm glad it helped you as much as it makes the game playable and enjoyable for me.
I'll post my full and newest RE4 script shortly (since you said you're dabbling in programming). In it, running automatically is accomplished by sending the run key (e.g. LShift) as the move forward key (e.g. w) is pressed.
The script is outdated, that is, there some patterns that were refined and rendered succincter in my more recent works (The only game I played this year was the new Tomb Raider). Ah, and it reflects my personal key mappings, not the default ones.
The following is an example of how a pattern has been refined.
This code is present in the full script (the comments are not):
;********************CODE*************************
*Numpad8::
SetKeyDelay -1
UnreadyWeapon() ; function call (see the full script)
UnreadyKnife() ; function call (see the full script)
if(!walking)
{
Send {Blind}{Numpad8 DownTemp} {Space DownTemp}
}
else
{
Send {Blind}{Numpad8 DownTemp}
}
return
;********************END-CODE*************************
Today I'd have written it as thus:
;********************CODE*************************
~*Numpad8:: ; notice the tilde
SetKeyDelay -1
UnreadyWeapon() ; function call (see the full script)
UnreadyKnife() ; function call (see the full script)
if(!walking)
{
Send {Blind}{Space DownTemp}
}
return
;********************END-CODE*************************
The tilde means 'do not intercept', which will send the key in question anyway. Space is my 'Run' mapping; and Numpad8, my 'move forward' one.
https://drive.google.com/open?id=0B_NNN6sIxejFT2xGQWpWUjBteUE
My hand grip was always weak but it's got worse in the past three years, to the point where I can't hold the virtual trigger anymore (playing with a gamepad is out of the question). I had to switch hands: mouse is handled with left hand. So, there's a mapping for holding the trigger. That part, which I reuse in almost every game, has been improved -- what used to be a toggle is not anymore. See my Tomb Raider script below (there's some crud left in it, just spotted it, oops).
But both older and newer scripts contain a function that releases the trigger (UnreadyWeapon in re4.ahk), called from anywhere when convenient, such as moving forward (as seen in the snippet above), since you can't move while manoeuvring your weapon in RE4 anyway.
There are more things that the script does, such as turning left and right with the mouse (like in RE5). If you're curious, leave a comment.
The Tomb Raider script:
https://drive.google.com/open?id=0B_NNN6sIxejFcEdFcmJIcVVyU0U
PS: The Click and Click right are aliases to mouse actions for the Send function and they respect OS settings (in my case, the mouse buttons have their actions reversed, so Click right actually sends LMouse). However, LButton and RButton are rebinding aliases to the actual physical buttons, independet of OS settings (confusing at first).
Yeah, I'd learned about the tilde and a bunch of other features as well.
I've just started dabbling in code, so it's been fun messing around with a language that isn't Java. Thanks for introducing me (and likely a whole bunch of others, namely those who've posted in this discussion) to ahk!
The shift + forward key I don't feel would work for RE4, especially considering parts involving the Garrador--if you're trying to aggro him, you don't want to accidentally keep running into him/giving away your location. That's just asking for a hug. And subsequently a decapitation. ;) Another part that springs to mind is the razor-pendulum section right after the Novistadores in the sewer.
One thing I've been struggling to accomplish, if indeed it's possible at all, is to make the quickturn key ( q for me) function even while run ( {LShift down} for me) and/or auto-move ({w down}) is registered as on. I'm aware that quickturn is equivalently accomplished by hitting run while holding back (in my case, hold s, and tap/hold LShift), so I've been trying to map q so that if the keystate of LShift is registered as down (NOT just physically, though; I put in the run toggle to give my poor pinky a break T~T), it'll send LShift up, send s down and send LShift back down again before sending to release s, thus interrupting the running-state (because I think that even if you mapped q to ignore case, the problem is the game only lets you quickturn when you're not moving/when run isn't being registered as held), doing the secondary quickturn key combination and proceeding with the running-state; similarly I'd like it to stop automoving briefly if the forward (w) key is registered as being held, execute the quickturn, and resume auto-moving shortly thereafter.
I'd also like to see if I can mess with the tank-controls; I'm thinking there's got to be a way to toggle a mode wherein the horizontal movement of the camera (mouse x-axis movement) is mapped proportionally to the physical turning of your character (a and d), with, of course, a variable or two that allows for tweaking so that people running the script on different setttings can adjust the sensitivity themselves towards more of a 1-to-1 correlation, or just whatever would feel right. (Yes, I am aware I am desecrating the holy balance of RE4's magnificent tank controls, but what can I say? I'm heretical
Another cool idea is a quarter-turn; basically, you'd have a hotkey that would hold down the aim button, move the mouse in one direction or the other 90 degrees, then release-maybe you could have one quarter-turn key for left and another for right, or map things so a single quickturn key in combination with left or right would determine which way you turned. The amount of mouse movement sent per keypress could again be configurable via a local variable if necessary.
Lastly, speaking of 90-degree movement, I was thinking it'd be funny to have a pseudo-"strafe modifier" key that would make use of the quarter turn by very quickly quarter-turning in one direction, moving forward in that direction just a tad, and very quickly quarter-turning back to the original direction you were facing. I'm aware this would look pretty dumb and probably wouldn't function well, but I'm just trying to see what I can do.
Again, thanks not only for the script, but for the introduction to this fun little tool! I await your full updated code eagerly, sir. :)
http://steamcommunity.com/app/254700/discussions/0/558749191152568985/?ctp=5#c359547436753565524
and it dates from March 2014.
To accomplish the quarter-turn, you could mess with
;********************CODE*************************
DllCall("mouse_event", uint, 32769, int, 32768, int, 32768, uint, 0, int, 0) ; native function call
;take a look at the Windows C/C++ API for this function
; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646260%28v=vs.85%29.aspx
;and
MouseMove, A_ScreenWidth/2, A_ScreenHeight/2, 10
;********************END-CODE*************************
I had a quirky instant 180 degree turn for Dying Light using both those functions, but that game pissed me off so much that I even forgot to upload the script (I'm not on Windows but on Debian right now and the script must be sitting there on my Windows PC's HDD -- I hope I haven't deleted it out of rage).
The parameters really depend on the game and it can give you wild, seemingly random results. It's a pain, but it's worth trying if you really want to be able to do 90 or 180 turns.
My solution to turning Leon to the left and right with the mouse is centering the mouse pointer and polling for its position relative to the center after a specified interval to see if it's to the right or left and send either 'turn left' or 'turn right'. If no movement is detected, send both up. Of course it's not perfectly smooth like RE5, but it does the job! Better than using the arrows keys in my opinion.
The thing about the quickturn is timing. I belive even if you map q to also send LShift down, it won't work because the game won't register such fast state changes. You could try sleeping and then sending q, but I don't think it'd be as responsive as you would like it to.
I haven't used a controller in over 4 years -- I had a made-in-China generic one -- so this is untested. I looked the keys up here: https://www.autohotkey.com/docs/KeyList.htm#Joystick
Substitute the re4.exe on the 3rd line for the name of game executable (I don't remember exactly) so that it's only active for that game.
Edit: It's bio4.exe.
(I'm downloading the game now by the way.)
What it does is it sends multiple presses (10 per second) of Button 4 while the same is held down.
This is for Button 4 -- you'd have to customize if you wanted another button.
https://drive.google.com/file/d/0B_NNN6sIxejFaEJQT0JXczU1cWs/edit?usp=sharing
Click on this link and it should download qte.ahk which is the file you need, after that you need to get ahk which he left a link in the post so download that too, and after that you should be able to just double click on the qte.ahk and it will work.
https://autohotkey.com/download/
i must click on download autohotkey installer?, if so, then?, what i must do after?
PD: and i use joystick lol, ok tell me how this works please