DoomRL > Discussion
Ultra Keybindings - 3 Technical Questions
BrickGun:
I have a fairly-customized keybindings.lua, but being a coder, I'd like to take it as far as possible. A few questions:
1. Is it possible to assign multiple commands to a single key? "Macro"-ing, if you will. It would be nice to set a single key to "COMMAND_RUNMODE" then "WAIT" rather than hitting (default) "," and "5" each time. (Or is there some easier way to wait in place that I'm just not aware of in gameplay?)
2. Has anyone figured out a nesting logic to be able to say... set a keypress of "3" to iterate through all of the different unique/assembled/standard shotguns to attempt to select them in a particular order until it finds one you have?
If what I mean isn't clear, to have nested logic where on a press of "3" it attempts "command.quick_weapon('upshotgun')" and if that fails then "command.quick_weapon('uashotgun')" and so-on until it hits a weapon you have in inventory. The logic of the order could be set in keybindings.lua logic nesting so that it looks for the user's preferred (i.e. most powerful, by the user's definition) first and iterates down to the "weaker" weapons.
There was some discussion similar to what I'm talking about here, but it doesn't appear to have ever been fully-resolved: http://forum.chaosforge.org/index.php/topic,6116.msg52893.html#msg52893
3. Is there a centralized list of all the object names used in code for the weapons? I checked the wiki and didn't find. it. I would like to know how people found the names "upshotgun", "uashotgun", etc. when they were doing extensive keybinding definitions.
Evilpotatoe:
1) As you've seen in the topic you refer to, there is currently limitations. Just try it and see. If you already did and it didn't work, I guess it's not yet possible.
2) Same topic reference : quick swap currently doesn't return a result, so we're screwed. (unless maybe, if we have a non-quick swap command ? I wouldn't bet on it)
3) Here's the list I used to add quick keys to every 0.9.9.6 weapons http://doom.chaosforge.org/wiki/Modding:sID
BrickGun:
Cool. Thanks for the info, EP. #3 was exactly what I was searching for but hadn't been able to find.
bwross:
The new ones in 0.9.9.7 are: ufshotgun (Frag Shotgun), umjoll (Mjollnir), usubtle (Subtle Knife), umega (Mega Blaster), and unullpointer (Charch's Null Pointer).
And although there isn't a return value for quick_weapon, you can still do some interesting things with it. I have one macro that quick_weapons a pistol and then a shotgun, which I use when juggling. Another one quick_weapons the Longinus Spear and then Azrael's Scythe... since I can only ever have one of those at a time, the other one simply fails.
Evilpotatoe:
Added entries in Wiki. Btw, where can one find thoses ? I would gladly have added Nyarlathing boots... but don't have their Sid.
Navigation
[0] Message Index
[#] Next page
Go to full version