[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Several characters on one MUD

Several characters on one MUD

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mazarin   (14 posts)  [Biography] bio
Date Fri 09 Jul 2010 08:04 AM (UTC)
Message
Thank you for your help.

I would now like to know if there is a recommended way to handle the problems that arise when using the MUSH-client for different characters on the same MUD (in this case Aard).

This includes handling of as well 1) common aliases and triggers (for all of my characters) as 2) specific aliases and trigs (specific =for only one character and different from the other specific (or common) aliases and triggers) and so forth. One example, I want to with the macro NUM + plussign send with one character to the MUD the commands 1) remove dual;wear portal;enter but with another character the commands 2) remove wad;wear book;enter). It is btw. my most often used command (means in both cases in fact, recall) and I DO wish to have them at the same key!

I have now several copies of the client running with different copies of the alias/macro/variable/trigs-files in their own subfolders but this means that I have to enter separately the common aliases/trigs in all of the folders. Windows does further more not allow naming the running copies of MUSH separately which leads to confusing them. I have tried recompiling and changing the MUSH directory name (and with that, the running MUSH's name), but that only means that the MUSH does not compile correctly but gives an error message.

Independently of having several characters and copies there seems also to be a (general) problem in that the file containing the macros does not save in MUSH (but has to be edited/saved with some Notepad-like file).

Any help with these problems.
[Go to top] top

Posted by Caelen   (81 posts)  [Biography] bio
Date Reply #1 on Fri 09 Jul 2010 08:35 AM (UTC)
Message
The way I got around the problem is to just save the world (file menu) as a different name for each character. For instance, I have three Achaea characters, and they share a few scripts but most of it is independant. I save each character's world as "Achaea Charactername". I tell MUSH not to open any worlds at the start (file -> global preferences -> worlds tab, remove everything there to pull it off), and I use file -> open to open just the one character I want, or all three if I'm copying scripts.

As for the common scripts they share, open up all of the worlds, since MUSH can have multiple worlds open at the same time in one instance of the client. Then, open up the triggers windows on all of them. Make all your common triggers, then use ctrl+click each one to select them all and hit the copy button in the triggers window. Select the next world and simply hit the paste button in the triggers window, and poof, all your common triggers are copied. The same trick works with aliases and variables too.

I haven't experimented with macros yet, but it looks like macros are part of the world's data, not the global data, so you should be able to make each one work just a little differently. If not, tell it to open a specific alias with the macro, and use the same alias trigger and label for all of your characters. The script for each alias will be different for each character though, so it will do what you want! :)
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #2 on Fri 09 Jul 2010 02:27 PM (UTC)
Message
Using a separate world for each character is pretty much the standard, recommended way to do it. ;) As for the shared functionality, you could look into putting it into a plugin that you can add to each world that uses it.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Garrion   (21 posts)  [Biography] bio
Date Reply #3 on Fri 09 Jul 2010 09:24 PM (UTC)
Message
I would be interested in a way of handling multiple characters that didn't involve multiple worlds too.

The mud I play lets you switch between your characters so it is easier to have 1 world file so you don't have to reconnect all the time.

I currently get around it by setting my macros to a common name like 'specialalias' and then define specialalias as a mud alias that is different fo each character. This works ok for muds that allow a lot of mud side alias.

Garrion.
[Go to top] top

Posted by Nick Gammon   Australia  (23,001 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Fri 09 Jul 2010 09:58 PM (UTC)
Message
I'm not sure what you really save by having only one file, and then having to put in lots of checks inside that file for which character it is for.

When I was playing Aardwolf a little while back with multiple characters I moved the "standard" stuff (like playing music when you level, or playing a sound when you hit someone) into a plugin, which I then just loaded into each world.

This lets you do common stuff (that applies to all characters) in a single place, and more specific stuff (that only applies to this particular class, for example) into the file for that toon.

If you don't want to do that, you can use groups, and use EnableGroup to enable all the triggers, aliases and timers relevant to that particular character (and disable other groups).

Template:function=EnableGroup EnableGroup

The documentation for the EnableGroup script function is available online. It is also in the MUSHclient help file.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Mazarin   (14 posts)  [Biography] bio
Date Reply #5 on Sun 11 Jul 2010 06:04 PM (UTC)
Message
Nick Gammon said:

... you can use groups, and use EnableGroup to enable all the triggers, aliases and timers relevant to that particular character (and disable other groups).

(function=EnableGroup)


Thank you, it works like a dream. Before logging on (or while logged in, it's my choice) I simply give my aliascommand for enabling/disabling the appropriate groups and whoops.. the meaning of my commandaliases and trigs change as i meant they ought to. My general one-letter command for attack gives now "cast white flame at mob" instead of "stun mob" depending on whether i gave the enable/disable-command for Mazarin or Armagnac (my other char on the MUD)), that is, whether i typed "yesmaz"(arin) or "yesarm"(agnac). I have even managed to give those commands some informative colournotes. Thank you!

Now there is only the problem with the variables and macros that do not change but have to be kept separately. I presume that it is not possible to use variables in macros either?


Regards

// Mazarin
[Go to top] top

Posted by Nick Gammon   Australia  (23,001 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sun 11 Jul 2010 10:50 PM (UTC)
Message
Macros basically just issue commands which can be caught as aliases. So if a macro sends "attack" then make an alias "attack" which itself can handle whatever variables you want.

As for sharing variables between characters, you can read up on serialization of variables in Lua. That lets you convert Lua variables into something that gets saved as MUSHclient variables (and loaded back again). So it might be easier to use Lua variables, and just load in the appropriate "batch" when you switch characters.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


20,363 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]