JMC commands groups.<

   

What is groups ?

Some JMC’s objects (aliases, actions, highlights) are assigned to groups. Group is defined by its name and provides way to unite few JMC alias/action/highlight and manipulate them by one short command.

What JMC group for ?

Lets look at common MUD players task. Someone named “Shesh” trying to kill you. What you need to support anti-pkill operations? First, you have to highlight word Shesh, to select its presence. Second, you have to create auto-attack triggers like “#action {Shesh arrives from the %0} {kill Shesh};#action {Shesh flying from the %0} {kill shesh}”. Probably, you have to create some other aliases/actions too. Well. Usual, peoples have aliases like this:

#alias pkill_taget {#var TAGET %0;#action {$TAGET arrives from the %0} {kill $TAGET}};…..}

OK. Shesh scared and asks for peace. You have to remove pkill triggers/highlights. Mostly, you write alias like this: “#alias stop_pkill {#unaction …;#unhigh}”

Well. Its working ok. But there is some problems with it. First problem is – those aliases are too long ( i seen 1.5kylobyte aliases) and difficult to understand. Second problem is – if you are doing a lot of #action/#unaction/#alias/#unalias … operation while combat or in other situation like it (a lot of operatioins per second) its slow JMC down a few.

What is solution ? Don’t write this HUGE alias “pkill_taget”. Just create actions/aliases/highlight once, join them into “group” and disable/enable it then needed. Or just delete whole group.

So, obviously, you should have way to enable/disable/delete set of JMC objects like alias/actions etc. Here is way to NOT create/remove a lot of actions but just enable/disable them by the one short command.

There is one else role for groups. As for me, I using few profiles for different classes of my characters: mage, cleric, warrior . Each profile have some aliases/actions specific for class. Profile named “mage” contains aliases like this “#alias cm c ‘m m’;#alias cl cast ‘light bolt’” etc. Profile named “warrior” have no such aliases but contains other kind of aliases: #alias bm {rem sword;wear shield};#alia dm {rem shield;hold sword}. But both profiles contains a lot of identical aliases/actions like this: #alias bleg {#5 buy leg;put all.leg chest}. Obvious idea is to join those JMC objects into group and put it in the some place COMMON FOR ALL PROFILES. So, group must have global or local flag.

 

How its working now ?

Well. 4 JMC command now have new format:

 

Last parameter for all 4 commands is not obligatory. So, all you old commands will work OK. Each alias, action and highlight created without group name will be placed in group named “default”. If you use last parameter alias/action/highlight will be assigned to group named in it. If such group is not exist it will be created as enabled and local.

About local/global flag for variable and group. By default variable is local. Its means variable (and group) will be placed in your <profile_name>.set file (like as old JMC works). If its global it will be placed in the file named global.set. Every time you loads profile JMC loads contents of <profile_name>.set file and global.set file too.

Group manipulations processed by the #group command. You may look for group list currently defined, disable/enable group, remove group (with all objects assigned to it) and set group as local/global. For more info look for #group command description.

 Remember ! Creating/Removing 10 actions is 30 times slow then enable/disable group !