CTRL-c Clear Level Map: Confirmation?


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Lair Larrikin

Posts: 20

Joined: Wednesday, 24th August 2011, 06:21

Post Saturday, 26th May 2012, 18:26

CTRL-c Clear Level Map: Confirmation?

I'd like to request that there be a confirmation prompt when using CTRL-c to clear the level map. It's a useful feature, but I'm doing it frequently by accident when reaching for CTRL-x, List Things in View. Perhaps it's not necessary when viewing the level map with SHIFT-X, since CTRL-x does nothing in that mode.
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Saturday, 26th May 2012, 21:38

Re: CTRL-c Clear Level Map: Confirmation?

I can almost write a macro to add this for you, but I can't figure out how to get crawl.sendkeys() to actually do a ctrl+c after the confirmation prompt.

Can anyone tell me how to get crawl.sendkeys() to send ctrl+letter input? Or failing that, is there a way I could just call CMD_CLEAR_MAP directly from lua?
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Sunday, 27th May 2012, 02:42

Re: CTRL-c Clear Level Map: Confirmation?

...and trial and error trumps a lack of documentation and/or assistance! Apparently *c returns ctrl+c.

Okay, here's the macro.

  Code:
#Copy paste this first part into init.txt

{
function confirm_mapclear()
    crawl.formatted_mpr("Really clear the map?", "prompt")
    local res = crawl.getch()
    if string.lower(string.char(res)) == "y" then
        crawl.sendkeys("*c")
    end
end
}

#Copy paste this next part into macro.txt

M:\{3}
A:===confirm_mapclear

Lair Larrikin

Posts: 20

Joined: Wednesday, 24th August 2011, 06:21

Post Sunday, 27th May 2012, 14:55

Re: CTRL-c Clear Level Map: Confirmation?

Cool! Can this be made to work online? I only know how to edit the options file.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Sunday, 27th May 2012, 15:06

Re: CTRL-c Clear Level Map: Confirmation?

You can still set the macro in game, can't you?

Dungeon Master

Posts: 1611

Joined: Thursday, 16th December 2010, 21:54

Post Sunday, 27th May 2012, 17:21

Re: CTRL-c Clear Level Map: Confirmation?

You can edit macro files from the game menu when playing online (maybe not on webtiles, I don't know), or set it ingame using Ctrl+D, m, <key>, ===whatever.
User avatar

Barkeep

Posts: 4434

Joined: Tuesday, 11th January 2011, 12:28

Post Tuesday, 29th May 2012, 12:39

Re: CTRL-c Clear Level Map: Confirmation?

JasonMel wrote:I'd like to request that there be a confirmation prompt when using CTRL-c to clear the level map. It's a useful feature

Out of curiosity: how is it a useful feature?
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.

Tartarus Sorceror

Posts: 1774

Joined: Monday, 21st February 2011, 15:57

Location: South Carolina

Post Tuesday, 29th May 2012, 13:01

Re: CTRL-c Clear Level Map: Confirmation?

After you've cleared a level, and you want to use auto-explore to find that one elephant that ran away or that last fungus or the unique that you've swapped armour for so you have the best resists, ctrl-C helps.
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Tuesday, 29th May 2012, 13:45

Re: CTRL-c Clear Level Map: Confirmation?

^You're thinking of forget map, which is ctrl+f (when you're inside the X map mode). ctrl+c just clears (or cleans up) the map- whiping away items and ghost imprints of allies / enemies last seen.

For this message the author mageykun has received thanks:
njvack

Tartarus Sorceror

Posts: 1774

Joined: Monday, 21st February 2011, 15:57

Location: South Carolina

Post Tuesday, 29th May 2012, 15:09

Re: CTRL-c Clear Level Map: Confirmation?

Ah, maybe that's why it always takes me so many tries to get it to work.

That would be really useful when you're checking to see if you've found all the staircases, but the whole map is filled with grey o's from your orc followers' previous positions.

Lair Larrikin

Posts: 20

Joined: Wednesday, 24th August 2011, 06:21

Post Thursday, 31st May 2012, 01:02

Re: CTRL-c Clear Level Map: Confirmation?

I still don't understand how to do this online. mageykun's directions say to edit two files, init.txt and macro.txt. Can this be accomplished at CDO? If so, how?
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Thursday, 31st May 2012, 01:12

Re: CTRL-c Clear Level Map: Confirmation?

JasonMel wrote:I still don't understand how to do this online. mageykun's directions say to edit two files, init.txt and macro.txt. Can this be accomplished at CDO? If so, how?

The macro editing can be done in game- it'll write to the text file when you save. Sorry if I confused the matter by cutting corners. So, load up a character, and then do:

ctrl+d, m, ctlr+c, ===confirm_mapclear
(in order, that opens the macro interface, selects the first menu choice, selects the key you want to map a macro to, and then assigns the macro, in this case a function).

Then save. The game should ask if you want to save your macros. Confirm.

init.txt is your config file. You should be able to edit that directly, and this is where you should copy the function (everything between the { }'s, including the { }'s). ...I don't play online so I can't tell you firsthand where it is though. I assume there's an obvious "config" or "options" menu choice somewhere?

For this message the author mageykun has received thanks:
JasonMel

Lair Larrikin

Posts: 20

Joined: Wednesday, 24th August 2011, 06:21

Post Thursday, 31st May 2012, 04:06

Re: CTRL-c Clear Level Map: Confirmation?

Awesome, it works! Thanks very much. I've edited the options file before, but I didn't know that was usually called init.txt, since I've never actually played the game offline.

Return to Game Design Discussion

Who is online

Users browsing this forum: Google [Bot] and 12 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.