Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Removed features I'd love to get back (http://angband.oook.cz/forum/showthread.php?t=9426)

Flambard May 15, 2019 19:12

Removed features I'd love to get back
 
I want to preclude this post, by admitting, that I have some ulterior motives for this request, mainly having MAngband and Angband be somewhat aligned, allowing players to retain their knowledge across those games.

1. Loading options from .prf files.

It's weird, that I can no longer setup default options without reloading a savefile from another character. And I can't edit the savefile itself, because it's in binary format.

+ that is the only way to set options in MAngband, because player savefiles are kept on the server, and there's no way to generate a character by loading some other character's savefile

2. Macro system.

I know it was a large piece of code nobody understood completely, and it had a potential to screw up players (as each key could be accidentally re-mapped to something nonsensical), but to me it was an important, and very convenient tool.

I'm used to have all the spells and missile-shooting actions being macroed to 1 simple keystroke, and typing in the whole command is a chore!

+ it was nice to tell Players "we use the same macro system as V, so if you understand that, you already know what to do" + the ability to just copy the .prf file from Angband to MAngband (or vice versa) and have everything working as expected

* * *

If this is some principal thing, I'll hold my peace, but if this is some kind of oversight, and there's just not enough dev.time to restore those, I'd gladly provide pull requests. Just want to know what's the stance on those, before I dive into code.

fph May 15, 2019 19:16

What macros would you like to use that don't work as keymaps?

Flambard May 15, 2019 19:18

Quote:

Originally Posted by fph (Post 138399)
What macros would you like to use that don't work as keymaps?

Something like `f1*t` or `m1a*5`

Derakon May 15, 2019 19:23

Quote:

Originally Posted by Flambard (Post 138400)
Something like `f1*t` or `m1a*5`

Those work just fine as keymaps; I use ones just like those all the time.

Literally the only thing macros do differently than keymaps is macros can be accepted any time the game is prompting you for input, such as when you're in the middle of a menu or there's a -more- prompt pending. As such, macros leave you open to lethal errors. For example, say there's a -more- prompt when you hit your "m1a*5" macro. The "m" in the macro clears the prompt, then you send 1, and walk southwest...into LOS of the Tarrasque, Vecna, Azriel, etc. and die horribly.

Whereas a keymap in the same situation wouldn't activate. If you hit "m" you'd just clear the -more- prompt and nothing else would happen.

Pete Mack May 15, 2019 21:15

Originally, macros were necessary to deal with Unix tty stuff. Other than that, there were almost no cases where macros were really useful in V. Other games variants let you change your stance through various menus. In those games, macros are still necessary. Examples are
ToME2: jump between all out melee (fast, aggressive) and sneaky (slow, cowardly.) Going thru the menus was a nuisance, but a macro that incremented each attribute by 4 and another that decremented them by 4, and suddenly the feature became useful.
Sil: Toggle flaming arrows to preserve ammo in less desperate fights.

Derakon May 15, 2019 22:58

I'm pretty sure you can still do that with keymaps so long as the keymap is invoked when the game doesn't have any pending operations. That is, you're not in a menu or subscreen and there's no -more- prompt. For example, I'm fairly confident that "CEEEE" would in ToME reduce your exploration speed by 4 levels, and "Ceeee" would increase it by four. They'd both leave you on the C screen though; IIRC you can put \e into a keymap to send the Escape key.

Flambard May 16, 2019 07:59

Quote:

Originally Posted by Derakon (Post 138401)
Those work just fine as keymaps; I use ones just like those all the time.

Literally the only thing macros do differently than keymaps is macros can be accepted any time the game is prompting you for input, such as when you're in the middle of a menu or there's a -more- prompt pending. As such, macros leave you open to lethal errors. For example, say there's a -more- prompt when you hit your "m1a*5" macro. The "m" in the macro clears the prompt, then you send 1, and walk southwest...into LOS of the Tarrasque, Vecna, Azriel, etc. and die horribly.

Whereas a keymap in the same situation wouldn't activate. If you hit "m" you'd just clear the -more- prompt and nothing else would happen.

Ahh, I feel stupid now, I was under the assumption keymaps were 1-to-1 mappings between "underlying"/roguelike/original keys. And yeah, that "1 walks you southwest" thing actually happened to me a lot (not with Tarrasque around, thankfully).

Thank you very much for that detailed explanation, I'll play around with keymaps and see if I still miss any functions (likely not).

Flambard May 16, 2019 08:16

Quote:

Originally Posted by Pete Mack (Post 138402)
Originally, macros were necessary to deal with Unix tty stuff. Other than that, there were almost no cases where macros were really useful in V. Other games variants let you change your stance through various menus. In those games, macros are still necessary. Examples are
ToME2: jump between all out melee (fast, aggressive) and sneaky (slow, cowardly.) Going thru the menus was a nuisance, but a macro that incremented each attribute by 4 and another that decremented them by 4, and suddenly the feature became useful.
Sil: Toggle flaming arrows to preserve ammo in less desperate fights.

Yup, I wanted to mention such things (e.g. a macro to enter options menu, select a submenu, "scroll down" by 4 points, press "y", escape, like "\e=12222y\e\e"), but I thought that's something too convoluted to mention.

In MAng, such things are still useful, but I couldn't come up with a good reason to have something like that in V. Also, clearing prompts/exiting sub-menus is something a macro could/SHOULD do in MAng (via "\e"), but, again, I don't see a good reason to have this in V (as it's not real-time).

Anyways, if keymaps still can send "\e", and still do exactly the same thing, with the only difference being they must be executed from the request-command prompt, I feel that's sufficient.

I'll play around and report if I'm still missing anything.

Gwarl May 16, 2019 12:42

Quote:

Originally Posted by Pete Mack (Post 138402)
Originally, macros were necessary to deal with Unix tty stuff.

This is a curious thing on angband.live. Variants which retain the original macro/keymap system will only accept macros and not keymaps for control sequences (such as arrow keys). V keymaps work fine with arrow keys.

Pete Mack May 16, 2019 13:17

Gwarl-
Nothing curious about it. Arrow keys are represented as an escape sequence of ordinary ASCII characters in the input stream. You can either let the curses library handle it, or deal with it directly.


All times are GMT +1. The time now is 08:17.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.