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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Triggers and Aliases - Different Profiles

Triggers and Aliases - Different Profiles

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


Posted by Platypus   (2 posts)  [Biography] bio
Date Sun 24 Nov 2013 06:58 PM (UTC)

Amended on Sun 24 Nov 2013 07:27 PM (UTC) by Platypus

Message
I know it's possible to save character-specific triggers and aliases by creating and saving them as individual "worlds".

Is there any way to create multiple sets of both for conditions of multi-classing with the same character?

Example: A character is a shaman and starts as a human. It then beast forms into a coyote. I need certain triggers/aliases available as the human and then other completely different ones as the coyote.

To my non-coding mind this sounds impossible, if not horribly difficult and cringe-worthy. Am I wrong? Am I right?

[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 24 Nov 2013 07:38 PM (UTC)

Amended on Sun 24 Nov 2013 07:39 PM (UTC) by Nick Gammon

Message
There are a few ways of doing this.

First, you can save triggers and aliases as a batch. Go to the aliases list (for example), select the ones you want, and then click "Save". In your other world, click "Load" and load that file in. However changes you make to the first world won't automatically propagate.

Another way is to save the triggers / aliases (this will be two operations) as separate files, and then use the Global Configuration -> Defaults tab to make these files the "default" set of triggers / aliases. In effect they are loaded at startup, replacing ones that the other copies might have had. The problem with this is that it is hard to customize the other worlds.

In many ways the preferred way is to make a plugin (there is a plugin wizard to help with this) and then each world loads that plugin. Then there is a single place (the plugin) in which you make changes. However once created the plugin file does not have a GUI interface, you have to make changes by editing or copying / pasting new triggers and aliases.

One final thing you could consider if you are changing form is to use groups. For example the "beast" group and the "shaman" group. Then a simple alias could activate one group and deactivate another. Then you could have a single world file, and by activating/deactivating groups switch from one set of triggers/aliases to another.

Here is an example, the other ones should follow from this:


<aliases>
  <alias
   match="enable shaman"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

EnableGroup ("shaman", true)  -- or false to disable
ColourNote ("yellow", "", "Shaman group enabled.")

</send>
  </alias>
</aliases>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


Each trigger / alias / timer has a "Group" box where you enter the relevant group name.

- Nick Gammon

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

Posted by Platypus   (2 posts)  [Biography] bio
Date Reply #2 on Sun 24 Nov 2013 08:00 PM (UTC)

Amended on Sun 24 Nov 2013 09:45 PM (UTC) by Platypus

Message
If I went the group option, how does it function if I have some aliases/triggers that are the same? Do I need a third group or can I keep those without a group name and have them still function?

For instance, if have 6 shared triggers that I want to fire on both the shaman AND his coyote form. Then a bunch of aliases and triggers I want JUST on the coyote form but NOT the shaman form; and vice versa.

Right now the issue is mainly eat/drink problems, to be honest. There are others, natch, but this explains what I mean well: the shaman has a different pack and different food on him, and when he turns into a coyote he's got something else entirely.

Right now what I do is make an alias that has:

"get pie backpack
eat pie
get chicken crate
eat chicken"

So of course I see "I see no crate here." "You do not have that item" before it gets the right thing out and he eats it. And it works, but it's spammy as hell.

I guess technically these things could be fixed easily by making everything the same on the character in both forms (carrying a backpack with the same food, or making their decanters of water the same), but it's just not easy to manage that.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 25 Nov 2013 03:58 AM (UTC)
Message
Ungrouped triggers would be unaffected.

So make common ones have no group. The ones for shaman form put in the shaman group and the ones for coyote form put in the coyote group.

So your alias could look like this:


<aliases>
  <alias
   match="enable shaman"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

EnableGroup ("shaman", true)
ColourNote ("yellow", "", "Shaman group enabled.")
EnableGroup ("coyote", false)
ColourNote ("yellow", "", "Coyote group disabled.")

</send>
  </alias>
</aliases>


A single alias ("enable shaman") enables the shaman group and disables the coyote one. You can make a similar one to go the other way.

- 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.


10,994 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]