Anonymous | Login | 2024-04-26 20:55 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||||
0005634 | [DCSS] Bug Report | trivial | always | 2012-05-04 06:33 | 2016-04-13 01:44 | ||||||||
Reporter | blackflame | View Status | public | ||||||||||
Assigned To | wheals | ||||||||||||
Priority | normal | Resolution | done | ||||||||||
Status | resolved | Product Branch | 0.10 ancient branch | ||||||||||
Summary | 0005634: Autofight with tab doesn't work properly if vi keys are disabled. | ||||||||||||
Description | When the no_vi_command_keys,txt file is included in init.txt, melee autofighting seems to stop working. Ranged autofight still works, but when I try tab-fighting in melee, I get an "unknown command" message. Turned vi keys back on, and it works fine. This is on 0.10 tiles, Windows XP. Apologies if this has already been reported, I didn't see it anywhere. | ||||||||||||
Additional Information | |||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | 0001-Fix-for-0005634-allow-and-properly-map-numpad-in-mac.patch [^] (4,563 bytes) 2013-05-06 02:30 [Show Content] | ||||||||||||
|
Relationships | ||||||
|
Notes | |
(0021066) SkaryMonk (reporter) 2013-02-18 11:24 edited on: 2013-02-18 11:25 |
I tried the solution suggested in https://crawl.develz.org/mantis/view.php?id=6639, [^] namely copying the entire autofight.lua into my rc, but it didn't work. I received this error message: Lua error: ...launch/crawl-web-0.11-b634444/dat/clua/autofight.lua:234: attempt _to perform arithmetic on global 'AUTOFIGHT_STOP' (a nil value) (This was obviously in webtiles version 0.11-b634444, not 0.10 as with the original reporter.) |
(0021121) rriegs (reporter) 2013-02-23 04:47 |
I've used things like this in some of my scripts: local function get_command(cmd) local key = crawl.get_command(cmd) key = key:gsub("uppercase ", "") key = key:gsub("Numpad ", "") return key:gsub("Ctrl-", "*") end local g_cmd_move_left = get_command("CMD_MOVE_LEFT") Autofight could be updated to use these instead, and Dvorak / no vi keys would cause a lot less trouble. (I realize the fiat omission of Numpad isn't correct, but much preferable to interpreting a heap of funny characters as commands.) Even better, crawl.get_command() or some variant could return strings that are directly parsable by crawl.sendkeys(), or crawl.process_command() could be made directly available for inputs such as "CMD_MOVE_LEFT". |
(0022558) dylex (reporter) 2013-05-06 02:37 |
I've attached one way to partially fix this problem, but primarily it highlights that this is actually just one of a number of places where vi navigation keys are assumed, including curses and tile keys. This solution also does not work for other commands (like, evoke and fire, both still used from autofight). The approach of using process_command to pass "CMD_MOVE_LEFT" would be better, but because keys are processed in process_key in two ways (an immediate lookup, and the macro buffer) it's hard to find a single solution. Another way to solve this would be pass negative integers to process_key, which is already supported by key_to_command, but then all the key enum values would need to be exported to lua. I'm willing to put more work into some approach if the developers have an opinion, but it really is a pretty awful and widespread bug as it stands. |
(0029738) Medar (developer) 2015-11-05 16:18 edited on: 2015-11-07 09:56 |
The workaround of copying the entire autofight.lua (and possibly also automagic.lua) to RC seems to work, if you use < and > for in-lining lua instead of { and }. Doesn't seem to be quite that simple, see: https://crawl.develz.org/tavern/viewtopic.php?p=248771#p248771 [^] |
(0029815) Timbermaw (reporter) 2015-11-20 22:51 |
This is pretty annoying, I tried to rebind my y key but then it will conflict with the auto-fight script. Is customizing the script the only option? Can't the auto-fight script just use the move commands instead of the hotkeys? (i assume this is what is happening) |
(0030376) wheals (administrator) 2016-04-13 01:44 |
Fixed in https://github.com/crawl/crawl/commit/7aac3cfdd960. [^] |
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |