Super Macro?


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Lair Larrikin

Posts: 18

Joined: Sunday, 15th May 2016, 05:20

Post Wednesday, 15th June 2016, 18:04

Super Macro?

Alright punks... I love crawl but every day it seems I discover some new game changing interface. Whether its o or ctrl-f or tab I'm always shocked the beginner guides never say any of this stuff. Is there a tutorial that I just missed somehow? Anyways today I discovered macro. I just figured out that you can macro spells and now hear you can tab "autocast." I think I cried a little bit reading that. I don't know how many times I had to press za enter enter to cast a spell. That awesome but lets take it to the next level, editing the code, because I want to autocast. Does editing the code disqualify online scoring? If not how is it done and what other things should I know? Here is what gave me the idea

http://crawl.akrasiac.org/docs/options_guide.txt

Example: No one likes butchering and eating chunks. I could make a macro for c that would butcher and eat. But can I edit the code so it auto does that without pressing anything? Is that legal? It certainly would save some serious time on speed runs. EX: if troll is hungry: true then eat corpse?

This looks pretty powerful... can you make tab work better? Instead of tab being an auto attack can I make tab auto attack until all enemies are dead or my hp falls to ##% ? That would save my poor tab key....

Tomb Titivator

Posts: 909

Joined: Thursday, 3rd January 2013, 20:32

Post Wednesday, 15th June 2016, 18:33

Re: Super Macro?

There is a lot you can do with your .rcfile, both by simply toggling the options that are there by default and by adding scripts that the cool kids call "lua".

For instance, you don't need a macro to make your character automatically eat chunks. You just need to find and "un-comment" (remove the # from the start of) this line:

  Code:
#auto_eat_chunks        = true

Now, whenever you're autotraveling while hungry with a chunk in your inventory -- your character will pause and eat that chunk, then continue moving.

Here's a scripting example that I stole from somebody else. It only saves a single keystroke, but it's a keystroke that I always want to press at the very start of a game but would almost always forget to:
  Code:
##### Automatically open the skill menu when starting a new game ####
{
local need_skills_opened = true
function ready()
  if you.turns() == 0 and need_skills_opened then
    need_skills_opened = false
    crawl.sendkeys("m")
  end
end
}


Beyond this I'm a bad person to answer your questions, but others can. And there are probably old threads with lots of cool stuff you can borrow and learn from, as well as resources elsewhere in the crawlverse.
Wins (Does not include my GrEE^Veh 15-runer...stupid experimental branch)

For this message the author tedric has received thanks:
115811

Lair Larrikin

Posts: 18

Joined: Sunday, 15th May 2016, 05:20

Post Wednesday, 15th June 2016, 18:41

Re: Super Macro?

Super cool thanks for the fast reply. So this is "legal" on the online servers? Also how do I access the code or edit it? Ex ctrl D to make macros.

Tomb Titivator

Posts: 909

Joined: Thursday, 3rd January 2013, 20:32

Post Wednesday, 15th June 2016, 18:48

Re: Super Macro?

afaik there is no restriction. There are entire "bots" scripted in .rcfiles that require (almost?) no human input to win games.

You edit your .rcfile by logging into the server's lobby and clicking the "edit rc" link next to the version you want to play.

edit: FYI, your browser's CTRL-F works while editing .rcfiles and is pretty crucial for finding specific lines of code.

edit edit: Also, as with any time you change something's code, it's a good idea to save the original text in a separate (local) file.
Wins (Does not include my GrEE^Veh 15-runer...stupid experimental branch)

For this message the author tedric has received thanks:
115811

Lair Larrikin

Posts: 18

Joined: Sunday, 15th May 2016, 05:20

Post Wednesday, 15th June 2016, 19:16

Re: Super Macro?

Super Cool. I love how deep this game is. It would be super interesting to attempt to code a bot kinda of like coding a chess program. The first thing I'm going to code is fixing the auto travel obsession with wands that aren't haste or tele. Second is that when my hp is under 50 its going to lock my out of the game and then start to scroll messages. Do you have a blink scroll? Use Tele, Use Might... etc XD. Rip last character. Can anyone point me toward a how to guide of sorts?

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 52 guests

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