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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Alias question
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Alias question

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


Posted by Gesslar   (18 posts)  [Biography] bio
Date Wed 25 Apr 2012 01:06 PM (UTC)
Message
I'm trying to get my MUD population away from GMUD, but one thing seems to be a stumbling block and I need some help.

For example, in our game we have a spell called "protection", which is a buff.

Syntax:
protection gas <-- automatically casts on self
protection gas on <name> <--- targets the cast on another player

Now, in gmud, you could set an alias that reads this:

The alias:
protg -> protection gas

If you don't type anything after protg, it just sends "protection gas" to the game. If you type anything after it, it sends "protection gas whatever else you typed".

I've tried that with MUSHclient, but it's not behaving in the same way. Many of my players are not technically minded and items such as this will be a stumbling block (I've already received frustrated mails). Is there a simple solution that doesn't require arguments or paramters (like %1 $1, etc), maybe I'm just doing it wrong?
[Go to top] top

Posted by Andos   (15 posts)  [Biography] bio
Date Reply #1 on Wed 25 Apr 2012 01:40 PM (UTC)
Message
you may try this..

<aliases>
  <alias
   match="^protg(.*)$"
   enabled="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>if "%1" ~= "" then
  Send("protection gas on%1")
else
  Send("protection gas")
end</send>
  </alias>
</aliases>
[Go to top] top

Posted by Gesslar   (18 posts)  [Biography] bio
Date Reply #2 on Wed 25 Apr 2012 02:19 PM (UTC)
Message
While that will probably work, I'm looking for something that requires no scripting. A simple, one-line expression that someone using the alias interface. These people, again, are not technically minded and will need an elegant, -easy- non-technical way to do it, for whatever alias they want to make, the one I had was an example. Just to show what they're used to.

Issuing a command with/without arguments and sending the alias along with the trailing arguments. I believe GMud worked simply like this, though I haven't checked the source code, from my experience...


What I imagine the source code for GMud's to be for sending aliases to the game in pseudocode.

do_alias (alias, extra) {
    if(extra) send(alias + " " + extra)
    else send(alias)
}


Obviously, MC's alias system is more robust, but I can't find a way to do a very simple command replacement and send additional text, if it exists.
[Go to top] top

Posted by Andos   (15 posts)  [Biography] bio
Date Reply #3 on Wed 25 Apr 2012 03:29 PM (UTC)
Message
Is it you need?


<aliases>
  <alias
   match="^protg(.*)$"
   enabled="y"
   regexp="y"
   sequence="100"
  >
  <send>protection gas%1</send>
  </alias>
</aliases>
[Go to top] top

Posted by Rhue   USA  (1 post)  [Biography] bio
Date Reply #4 on Wed 25 Apr 2012 05:38 PM (UTC)
Message
Hi Andros,

I'm actually the one that is having a problem with this. I am sure it would work just fine. Except, I don't know what any of that means. So, you writing it for me doesn't help me to modify it so that if I need to change it or want to change it or expand it, I can. So, let me see if I can explain one of my difficulties.

Spell is protection <type>, or protection <type> on <target>.
What I used to do is have an alias that was for each protection <type> of which there are like six different ones. if I typed <protection alias> without a target, it cast the protection on me. Or I could type <protection alias> on <target>. Now I have to have like 12 different aliases and I -still- have to type the "on <target>" part. There has to be an easier way and one in which I can do it myself without having to know how to program or write code or anything else. When you write this code...I have no idea what it means. If I don't know what it means, it means I cannot do it for myself. Make sense? Thanks.
[Go to top] top

Posted by Gesslar   (18 posts)  [Biography] bio
Date Reply #5 on Wed 25 Apr 2012 05:50 PM (UTC)
Message
Hi Rhue! That's what I'm trying to get at.
Most people who play with us do not have knowledge base to do things like create parameter substitution regular expressions on their own. For something as simple as an alias, it should be achievable by just:

Checking the text entered in the input box and if it matches one of the aliases, send the expanded with all of the appended text (whether that is something or nothing). MUSHclient is a great way for people to express complicated statements, but in all of its finesse at handling that, there has to be a way for it to behave simply, too. I'd say a good portion, like 80% of our regular player base would be able to copy what you've written, but then when it came time to make a new alias they would probably just copy it again, and if it didn't work because the criteria are different (syntactically in the game) they'd probably just get frustrated and give it up. Nobody wants that, and I certainly don't want to write every needed alias for everybody.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #6 on Wed 25 Apr 2012 07:17 PM (UTC)
Message
I'm an advanced user, so I can't really speak on how hard MUSHclient is to use for beginning players. However, there are some things I want to mention from an as neutral perspective as possible.

Clients differ. MUSHclient is not Gmud is not SimpleMU is not Zmud is not Cmud is not telnet is not TinyFugue is not Mudlet is not <insertclienthere>. Things easy in one client take a bit more effort in others, and waay more effort in yet others. What you think of as the 'really simple basic behaviour' is only that because you grew accustomed to that behaviour: for a new user it can be equally baffling to have extra stuff at the end mess your aliases up. 'I didn't want it to do that, why does it do that, I didn't put a * there!'

Now, I agree that complicated regular expressions are not for everybody. But they are not complicated for simple things: hell, simply look at the Convert-to-Regular-Expression button in the dialogs: it converts a non-regexp * into (.*?). _All_ MC triggers are regexps; the non-regex triggers simply get translated into them without you being aware of it. :-)

For what you want, what I put in the previous paragraph _is_ your solution. Use a plain trigger/alias (=don't tick 'Regular Expression'), put whatever you want, and put a * at the end of it. Then whenever you really want to use the extra text, use a %1 in the trigger, which is no different from what other games do. (Essentially, this is what Andos last post does, except without the regular expressions to confuse users with.) The only functional difference is that an alias for 'see' also matches 'seesaw'.

But once that becomes a problem, I think it is not too much asked for people to do a little bit of self-study. MUSHclient is not rocket science after all, and it has very good forums and documentation for people them to learn from. :-)

And as you so aptly state yourself: you do not want to write every alias for everyone. At some point, people will want to do more than they can readily know how to do, and the only thing adding features for things that can _already be done_ will do is that 1) one adds complexity & reduces efficiency, and 2) moves the barrier where 'newbie' mode stops being sufficient away. Sometimes being pushed into the water is the only way to really learn how to swim.

My best advice is to simply be available for questions, and to prepare plugins for your players to (ab)use. It will give a better experience for them game-wise, and if they really want to script it will also give them a testbed to muck with. I've done it in the past, and found it to work pretty well.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 25 Apr 2012 08:47 PM (UTC)
Message
Gesslar said:

If you don't type anything after protg, it just sends "protection gas" to the game. If you type anything after it, it sends "protection gas whatever else you typed".


This is all basically covered here:

Template:faq=50 Please read the MUSHclient FAQ - point 50.


It's a common requirement, that's why it's in the FAQ.

Now this might be a good time to just learn some basics of regexps, because you can start doing fancy stuff really easily.

Template:regexp Regular expressions
  • Regular expressions (as used in triggers and aliases) are documented on the Regular expression tips forum page.
  • Also see how Lua string matching patterns work, as documented on the Lua string.find page.


- Nick Gammon

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

Posted by Gesslar   (18 posts)  [Biography] bio
Date Reply #8 on Wed 25 Apr 2012 09:35 PM (UTC)
Message
@Nick
Thank you, I think I missed that item in the FAQ and am grateful for your response. It is the first example in item 50 which is the closest and least complicated approximation which I think my users would have the least trouble with.

And I don't have a problem with regexp. I'm fine with it, but I'm a coder. I just really wanted a way to 1) recommend MUSHclient to my player base while 2) allowing them to use a mechanism which is familiar to them with at best minor changes to how they would have had to do it before and 3) without having to be a support point beyond a topical help file possibly due to the fact of 1) AND 2). I want to support my MUD not MUSHclient.

I think it's a fantastic product, I've used it for years. I think I even paid for it, once upon a time. And it's not that I have a lack of confidence in my player base, I'm sure some of them would love to get their hands dirty with some of the mechanics of MUSHclient. It's the majority who are NOT that type of player for whom I speak because I know they would just say "uh, why would i when i can't do [suchandsuch] the same as i can in GMud" or "i log in to play a game, not learn arcane alias syntax". They're just not interested and they'd never migrate to a such a superior product, and that would be a shame because these are valid questions.

Anyways. I got my answer and again, I am grateful, thank you.
I'm sorry that we may not see eye-to-eye on certain things. I just know my playerbase and am looking out for them while trying to give them something to improve their experience. Thank you for your time! And happy mudding!
[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.


5,264 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 FutureQuest]