Saving macros

All your questions answered.
ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Tue 21.05.2019, 17:45

Hi,

lot of troubles with macros because they aren't saved, so I create and recreate always the same 7 starting macros...:(
What can be wrong?

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Saving macros

Post by ema » Wed 22.05.2019, 17:38

Please People of MAngband,

I can't save my macros, they work just in the current session but, after quitting, most of them desappear, so I create and re-create the same macros every session...
Someone can help me?
Thx a lot!

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Creating Macros - Step by step

Post by Flambard » Thu 23.05.2019, 07:03

Assuming everything works as expected, you're supposed to save your macros into a file. (%, 2)

Then, you are supposed to load this file on each session. (%, 1)

The following files are auto-loaded: user-<SYS>.prf, <PClass>.prf, <PRace>prf, <Playername>.prf and also any file included[1] from user.prf.

So, if you're on SDL, and playing a Human Mage, named Rincewind, the files user-sdl.prf, mage.prf, human.prf and Rincewind.prf will be auto-loaded.

([1]: If you examine user.prf, you will see that the prf files can also include each other via the '%:filename.prf' command).

If that doesn't help, you should verify

a) that the file was saved as you expected - do you see your saved file in user dir?
b) that you can load the file manually - using %,1

I should be able to provide more guidance once you've verified both a) and b).

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Thu 23.05.2019, 16:22

Thx for Your help, Flambard!

Till now to learn what's an SDL...in IT I'm a Sardinian goat, unfortunately.

In my library I just find this:
[attachment=0]Lib Sinclair.png[/attachment]
Attachments
Lib Sinclair.png
Lib Sinclair.png (21.97 KiB) Viewed 144205 times

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Thu 23.05.2019, 18:46

Other problem:
I inscribed F1 so: \ef1*t; now (other session), pressing F1, the macro is: \eq3.

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Fri 24.05.2019, 14:19

restarting from the beginning, just to be goat-proof, in case of arrow assigned to Fn1, I type:
3
\ef1*t
Enter
5
Fn1 (here the mirror says to me "Created a new normal macro")
enter (but doesn't work)
2
Enter
Esc (and here the mirror doesn't say anything, so I think macro is not saved)

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Creating Macros - Step by step

Post by Flambard » Fri 24.05.2019, 17:31

SDL is the "Multi-window" client and it expects the macros to be in 'user-sdl.prf'.

Apparently, you're using normal Windows clients, so the macros should be in 'user-win.prf'.

The file seem to exist on your screenshot, could you try opening it in with something like Wordpad and verify the contents?

Can you then verify that the file DOES NOT load automatically (e.g. % Macro Menu, 7 Macro Browser, the macros from the file do not exist)?

Can you also test what happens if you press (1 Load File) and enter 'user-win.prf' manually?

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Fri 24.05.2019, 19:52

Here in "user-win.prf" the last two macros re-created today:
# Macro '49'

A:\ef1*t
P:\[F1]


# Macro '50'

A:\er3
P:\[F3]
(yesterday I re-created 9 macros...anf!)
and here the content if I browse with "7":
[attachment=0]Browse lib Sinclair key 7.png[/attachment]

Then tried to load "user-win.prf" manually but in F1 now I find macro \er3
(I had to Delete macro-key "-" to type "user-win")
Attachments
Browse lib Sinclair key 7.png
Browse lib Sinclair key 7.png (18.5 KiB) Viewed 144203 times

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Sat 25.05.2019, 18:52

If I write manually macros in user-win.prf?

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Creating Macros - Step by step

Post by ema » Sun 26.05.2019, 15:22

Well, I try to switch to Tomenet, sadly, because here is my first, only love.
Ever sadly, I verified here nobody is playing.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Creating Macros - Step by step

Post by Flambard » Mon 27.05.2019, 07:54

I'll try to re-trace your steps and see if I find anything.

Could be something fundamentally broken (on the windows build?)

Sorry for not getting to you earlier, and yeah, we aren't a densely populated server :(

UPDATE: Yup, those are bugs, plain and simple, will be fixed in the next version.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Saving macros

Post by Flambard » Thu 30.05.2019, 14:02

Turned out what you experienced was a deadly combination of two bugs (#1288 and #1289) and not the expected behavior :(

Thanks a lot for bringing attention to this.

This has been fixed in 1.5.2 client.

(Moving to bug reports forum)

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Saving macros

Post by ema » Thu 30.05.2019, 19:53

Wow! Thx a lot Flambard!!!
I can just write now because I was in hospitalization for a few days...
Just the last question: have I to disinstall the version 1.5.1 before download and install 1.5.2?

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Saving macros

Post by Flambard » Thu 30.05.2019, 20:00

There is an uninstall option in the Start / Programs / MAngband menu on windows.

You might also want to visit the user pref dir (the one with user-win.prf and others) and delete the pref files you wrote earlier, as those are definitely broken.

ema
Greedy Little Gnome
Posts: 15
Joined: Wed 12.08.2009, 18:46
Location: Italy

Re: Saving macros

Post by ema » Thu 30.05.2019, 20:55

mmmh...I remember in the old versions of MAngband (some years ago) I used keys like "-", "N", "x" and "h", for example...
But now these keys interact with macros in other section of the game (like in the shops) or in creating macros (like \em1h with key "h" as macro command).
In this case should be an error in my sequence macro creating (I see now new command (8,9,0))?
Sorry for my unbelievable english...

Post Reply