Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 26, 2010, 19:57   #1
Zikke
Veteran
 
Join Date: Jun 2008
Location: Los Angeles
Posts: 1,068
Zikke is on a distinguished road
Quick macro question

Is there a way to bind one key to either use a ?ID or _ID whichever is in my inventory?

I have my ?ID autoinscribe with '@r0' and my _ID autoinscribe with '@u0' but I keep having to switch my actual macro to either z0 or u0. Is there any way to make it just use both or whichever is present?

Like "r0, if that fails then u0"?
__________________
A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
A/FA W H- D c-- !f PV+++ s? d P++ M+
C- S+ I- !So B ac++ GHB? SQ? !RQ V F:
Zikke is offline   Reply With Quote
Old May 26, 2010, 20:10   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
I don't have the game in front of me to check, but if Vanilla has a "unified use" command (that does appropriate actions for the item chosen, e.g. quaffing potions, reading scrolls, aiming wands, etc.), then you should be able to inscribe both items with the same inscription and, since staves come later in the inventory than scrolls, it'll only use the staff if you're out of scrolls. Of course, this isn't generally what you want. To my knowledge there's no way to attempt to use a staff, and default to scrolls only if the staff is out of charges.
Derakon is offline   Reply With Quote
Old May 26, 2010, 20:19   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Derakon View Post
I don't have the game in front of me to check, but if Vanilla has a "unified use" command (that does appropriate actions for the item chosen, e.g. quaffing potions, reading scrolls, aiming wands, etc.), then you should be able to inscribe both items with the same inscription and, since staves come later in the inventory than scrolls, it'll only use the staff if you're out of scrolls. Of course, this isn't generally what you want. To my knowledge there's no way to attempt to use a staff, and default to scrolls only if the staff is out of charges.
And we don't yet have a unified use command - that's coming any year now ... (http://trac.rephial.org/ticket/51)
Magnate is offline   Reply With Quote
Old June 23, 2010, 09:27   #4
Zababa
Apprentice
 
Join Date: Sep 2009
Location: Germany
Age: 40
Posts: 99
Zababa is on a distinguished road
Question

I want to use this thread to ask whether three is a command which would repeat the last action. Occasionally, I want to shoot three or four missiles but don't want to care to create macros. I am learning to dive and my characters die too quickly, so it bothers me to set similar macros for every new character over and over again. But maybe there is a key I could press after I once type "f1'" (shoot the first missile at the nearest target) which would repeat that.
Zababa is offline   Reply With Quote
Old June 23, 2010, 10:02   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Zababa View Post
I want to use this thread to ask whether three is a command which would repeat the last action. Occasionally, I want to shoot three or four missiles but don't want to care to create macros. I am learning to dive and my characters die too quickly, so it bothers me to set similar macros for every new character over and over again. But maybe there is a key I could press after I once type "f1'" (shoot the first missile at the nearest target) which would repeat that.
There is a "repeat last command" action but I never use it - I think it's 'n' - and I also think it's buggy (http://trac.rephial.org/ticket/966).

You can, however, save your macros and reload them for each new char, without having to redefine them all. This needs a lot more improvement, but at the moment the files user.prf and <charname>.prf are automatically loaded when you start. So if you save your generic macros to user.prf they'll always be available. If you don't mind keeping your chars with the same name, you can use the charname pref file as well or instead. Or you can save your own pref file and load it manually.
Magnate is offline   Reply With Quote
Old June 23, 2010, 10:09   #6
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Magnate View Post
You can, however, save your macros and reload them for each new char, without having to redefine them all. This needs a lot more improvement, but at the moment the files user.prf and <charname>.prf are automatically loaded when you start.
Also matching <class>.prf is loaded automatically. I have separate files for all classes, so that mage gets mage macros and priest gets priest macros and so on.

Makes gaming a lot easier.

If you know the syntax you can edit macro files with text editor directly, add comments etc.
Timo Pietilš is offline   Reply With Quote
Old June 23, 2010, 10:11   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Timo Pietilš View Post
Also matching <class>.prf is loaded automatically. I have separate files for all classes, so that mage gets mage macros and priest gets priest macros and so on.
I have spent years trying to set this up and have never, ever got it to work.
Magnate is offline   Reply With Quote
Old June 23, 2010, 10:39   #8
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Magnate View Post
I have spent years trying to set this up and have never, ever got it to work.
That's weird. I have used those several years and it has always worked. You need to put them in /lib/user -directory. It used to be /lib/pref. (it might work from /pref too, but I know it works from /user. That's where game dumps your macro/keymap-files)

Just create new char for each class, define macros and dump them to <class>.prf, and you have a basic file set.
Timo Pietilš is offline   Reply With Quote
Old June 23, 2010, 11:44   #9
Zababa
Apprentice
 
Join Date: Sep 2009
Location: Germany
Age: 40
Posts: 99
Zababa is on a distinguished road
Thanks for the information. the 'n' key looks fine, I'll watch out for some potential bugs.

I was used to suffix a generation number after the Name of my character like (Nimral_IV), which was why I had to meddle with macro and setting files over and over again. Now I tried what you say about leaving one name for every race/class combination I play, and reuse that dead character over and over again. It is a more convenient method, macros and settings are loaded automatically. In this case, however, I might spend some time on defining macros again.

BTW: Is it possible to change the class of a character which is based on a dead one? E.g. I load my dead hobit rogue for his son to use his father's monster knowledge but I want him to be a ranger or any of the other classes.
Zababa is offline   Reply With Quote
Old June 23, 2010, 12:13   #10
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,060
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Zababa View Post
Thanks for the information. the 'n' key looks fine, I'll watch out for some potential bugs.

I was used to suffix a generation number after the Name of my character like (Nimral_IV), which was why I had to meddle with macro and setting files over and over again. Now I tried what you say about leaving one name for every race/class combination I play, and reuse that dead character over and over again. It is a more convenient method, macros and settings are loaded automatically. In this case, however, I might spend some time on defining macros again.

BTW: Is it possible to change the class of a character which is based on a dead one? E.g. I load my dead hobit rogue for his son to use his father's monster knowledge but I want him to be a ranger or any of the other classes.
Yes it is. The game automatically offers you a character based on the previous one, but you can escape out of that and choose a different race and/or class.

When we added the name suffixes we didn't change the macro handling - when I get round to this, it will automatically load FooBar.prf for every character called FooBar X where X is any roman numeral. (See http://trac.rephial.org/ticket/671.)
Magnate is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
quick question Malak Darkhunter Vanilla 2 February 8, 2010 00:57
Quick Stealth Question Zikke Vanilla 9 November 4, 2009 11:43
quick question re: sauron, ironman, destruction fizzix Vanilla 1 September 22, 2009 15:33
Quick Term_erase question. PaulBlay Development 7 May 28, 2009 14:19
Macro question g. rodrigues Vanilla 1 March 5, 2008 11:23


All times are GMT +1. The time now is 23:36.


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