Distant Lands
There are 0 players online. (hover for list)
 * Register
It is currently Wed Jul 02, 2025 11:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 74 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Macros
PostPosted: Fri Jun 01, 2007 9:20 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
This idea is only about half way conceived. That is part of why I'm
presenting it to you here. The more I talk about it, the more I'm convinced
that this will have a very significant effect on the game. This idea is also
already half way implemented so this will temporarily act as my documentation
(what will eventually become help files). I have enabled macros for all
builders (on the build server, naturally), so they have the ability to
interact with this code to test it (everyone who has access to this test
code and is reading this post, please help test!!) and help build up some
libraries. Even if you do not have a builder, eventually this concept
will impact you, so as a player, it is to your advantage to understand what
you can about macros. Along the way, I hope everyone will contribute more
ideas. I believe one of the most beautiful aspects of this concept, is that
the macros are written (with admittedly some modification) in DL commands
(which everyone knows -- or how do you play?!). I believe there are clearly
a lot of possibilities.

What is a (DL) macro?

In its simplest form, a macro is just a list of DL commands. On a deeper
level, it allows for much more interactive NPCs, Rooms, Items, and in the
end, the overall playing environment. By combining macros and some type
of "macro trigger" we gain the ability to execute a list of commands on
nearly any character. Add in the ability to execute commands that normally
cannot be executed (the "some modification" above), and many more
possibilities are available.

Macro triggers are one of the portions of the concept that is yet to be
completed. I'll add more about my thoughts on macros triggers in a follow up
post. I believe the documentation/tutorial below will be sufficiently
explain my comments above.

If you execute the "macros" command alone, you are provided with a list
of the global macros. At this point (and it will likely not stay this
way) all macros are global, meaning anyone with access to macros can view
or modify them. Please do not modify other people's macros.

> macros

Global Macro Libraries
------------------------
#1 Test Library
#2 Myrrima's Library
#3 Teodoran's Macros
#4 Vulsin's Macros
------------------------

To view the macros in a library, use the macros command along with the
library number.

> macros 1

Macros from library #1 - Test Library
---------------------------------------
#1 Speed Test
#2 Elghin's Macro
#3 Elghin's Wizard
#4 A different Macro
#5 Elghin's Wizard Test
---------------------------------------

If you'd like to create your own macro library (please do!) you can do so
with the macros library command like so:

> macros library <new library name>

To view a macro in a library, you'll use macros show along with the
associated library and macro number.

> macros 1 show 1

#1 Speed Test
---------------
1 > mecho You begin to feel as if you've lost control of your body.
2 > mecho Something is controlling you! You feel your mouth begin to move.
3 > 'This is a macro speed test!
4 > 'Oh dear, a macro is controlling me!
5 > speed 1
6 > 'It can make me talk really fast.
7 > 'So fast that it is difficult to keep up with.
8 > 'Which I suppose could have its purposes...
9 > speed 20
10 > 'Or it could talk slower, like this.
11 > 'Which is much easier to keep up with if you are trying to read along.
12 > 'Slow enough that everyone can read it as long as the room is relatively calm.
13 > smile
14 > bow
15 > 'It can make me do more than talk!
16 > 'This is the end of the macro speed test.
17 > speed 1
18 > mecho The force that was controlling your body seems to have left.

This macro has a couple of examples of the "extra" commands, I referenced
above. Most notably mecho (macro echo -- echos a message to anyone the macro
is played upon) and speed (adjusts the speed of the macro playback -- speed
of 8-10 is approx. 1 second between each command, speed 0 is immediate).
These commands are only available when you are recording, editing, or playing a
macro.

To start recording a macro, you'll use the macro record command along with
the library number and the name of the macro like this (then you'll start
entering commands as I do -- note the prompt change, this allows for editing):

> macros 1 record Yet Another Test Macro

Now recording macro "Yet Another Test Macro".

1 Command> 'This is a test macro?

You say, 'This is a test macro?'

1 Last --> 'This is a test macro?
2 Command> 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.

You say, 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.'

2 Last --> 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.
3 Command> macro record

Finished recording macro "Yet Another Test Macro".

Note: To stop recording or editing, you can use "macro record" or
"macro edit" they are interchangable (and no further arguments are required
to finish). At this point, I've created a new macro that uses the say
command twice:

> macros 1

Macros from library #1 - Test Library
---------------------------------------
#1 Speed Test
#2 Elghin's Macro
#3 Elghin's Wizard
#4 A different Macro
#5 Elghin's Wizard Test
#6 Yet Another Test Macro
---------------------------------------

> macros 1 show 6

#6 Yet Another Test Macro
---------------------------
1 > 'This is a test macro?
2 > 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.

You can edit a macro in similar fashion:

> macro 1 edit 6

Editing macro "Yet Another Test Macro".

1 Next --> 'This is a test macro?
1 Command> 'Arg, yet another test macro?!

You say, 'Arg, yet another test macro?!'

1 Last --> 'Arg, yet another test macro?!
2 Next --> 'This is a test macro?
2 Command> step end

3 Last --> 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.
4 Command> step -3

1 Next --> 'Arg, yet another test macro?!
1 Command> macro record

Finished recording macro "Yet Another Test Macro".

Here, I introduced a command that can be executed only when a macro is
being recorded or edited, but it isn't recorded in the macro -- the "step"
command. It is used to move around between the command when you are editing
(or recording) a macro. Note that you can step to the beginning, ending or
with a relative line number (step -2 would try to step back 2 lines in the
macro while step 2 would try to step 2 lines forward). While editing, to
insert commands, you simply type them in.

Macros can be renamed:

> macro 1 name 6 Another Test Macro

Library #1 macro #6 has been changed to "Another Test Macro".

> macro 1 show 6

#6 Another Test Macro
-----------------------
1 > 'Arg, yet another test macro?!
2 > 'This is a test macro?
3 > 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.

You can execute a macro but using the macro command with the library number
and macro number alone:

> macro 1 6

Playing macro "Another Test Macro".

>

You say, 'Arg, yet another test macro?!'

>

You say, 'This is a test macro?'

>

You say, 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.'
Finished playing macro "Another Test Macro".

Note that when the macro is executed on a non-staff member, they do not see
the information about the macro starting, finishing or changing speed.

You can use "macro abort" to stop editing/recording a macro and discard any
changes you've made and use "macro unrecord" to remove commands from a macro:

> macro 1 edit 6

Editing macro "Another Test Macro".

1 Next --> 'Arg, yet another test macro?!
1 Command> macro unrecord next

1 Next --> 'This is a test macro?
1 Command> step

1 Last --> 'This is a test macro?
2 Next --> 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.
2 Command> macro unrecord last

1 Next --> 'Yes, this is a test macro... and people are reading this, so I'm not talking to myself.
1 Command> macro abort

Macro editing/recording aborted.

Here I've just deleted the first 2 commands in the macro and then aborted the
change completely.

Armed with this, and adding a few more tools (such as macro triggers), we
should be able to do things like have a dog start barking if a player claps
their hands, or have a dog sit (if tamed) when a player points at it. It
could give us the capability to have items and rooms that can speak to your
or send you messages in an effort to communicate something. This could be
used to create tasks where you are supposed to rescue the princess by her
follow you safely through a horde of demons (who try to kill her). Using
triggers we could also script conversations back and forth between
NPCs as well as have "keywords" that players can say or even actions they
do to prompt a response macro from a NPC. Further thought needs to be given
to both macro triggers (how many different ways can a macro be triggered??)
and the special commands that can be used to enhance macro functionality
(such as commands that set memory for NPCs, call a macro trigger, or simply
change the way a macro is executed).

More to come on this topic, please post your thoughts!

Best regards to all,

--Nezmar


Top
 Profile  
 
 Post subject: Wha?
PostPosted: Sat Jun 02, 2007 8:39 am 
Offline
Greater Lord

Joined: Wed Oct 19, 2005 2:28 am
Posts: 224
Location: Tennessee
[ Nominate for medal ]

Medals: 1
RPer of the Month (1)
Huh?

_________________
Gydin Valen, free heals, sancs, and spells since 2001.


Top
 Profile  
 
 Post subject: Please be more specific
PostPosted: Sat Jun 02, 2007 2:44 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
If there is something you don't understand or want more information on, please be more specific.


Top
 Profile  
 
 Post subject: Macro Only Commands
PostPosted: Sat Jun 02, 2007 3:02 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
The following are commands that can only be used while you are interacting
with a macro.

The pause command pauses a macro recording or editing you are currently
performing and drops you to a regular prompt that will not be recorded.

> pause

To resume, you execute the pause command again.

The step command is used during recording only, so step commands are not
themselves recorded. Step allows you to move through a recording so that
you can inject commands where you want them.

> step <# | beginning | ending>

Changing the speed allows you to change the speed with which the macro is
played back. The default speed is 10. A speed of 0 means immediate (each
command will be executed until a speed change is made or the script is
completed).

> speed <#>

Wait allows you to inject pauses in script playback. The number provided is
dependant upon the current speed of the script. With the default speed of 10,
each wait unit is roughly equivalent to 1 second, if you put the default
keyword before the number, it will affect each command until you change it or
the macro completes.

> wait [default] <#>

Mecho allows you to send a message to the character that the macro is
currently being played on.

> mecho <message>

Mrecho allows you to send a message to the room of the character that the
macro is currently being played on.

> mrecho <message>


Top
 Profile  
 
 Post subject: Some thoughts about macro triggers
PostPosted: Sat Jun 02, 2007 3:18 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
Here is a rough outline of what I was thinking for macro tiggers. Again, please help with ideas!

Macro Trigger Flags (can be combined):

Combat only - Only while source is in combat
Not Combat only - Not while source is in combat
Self Expires - This trigger expires at expiration
One time only - This trigger is only valid one time
Auto reset - After a timer, this trigger will automatically reset itself once triggered.
Random - This macro triggers semi-randomly
Not exclusive - This macro can be triggered with other macros (1 command, X macros)
Exclusive - This macro will only trigger if other macros have not already been triggered by the source
Dynamic - For macros that indirectly call macros or other triggers
Macro only - This trigger can only be called from a macro
No source - No source is required
RP only - Triggers for roleplayers only

Macro Trigger Source Types (can be combined):

A timer
A specific Non-Player Character (mob)
A specific player character
Character using item
Character carrying item
Character in room with item
Character in a specific room
Character part of a specific quest
Character part of a specific task
Character enters a specific command
Character enters specific keywords (ordered or unordered)

Macro Trigger Target Types (can be combined):

A specific Non-Player Character (mob)
A specific player character
Character using item
Character carrying item
Character all in room
Character all on specific quest
Characters on specific quest in specific room
Character all on specific task
Characters on specific task in specific room
Not the source

Best regards to all,

--Nezmar


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 02, 2007 10:58 pm 
Offline
Builder
Builder
User avatar

Joined: Wed Aug 31, 2005 12:59 pm
Posts: 38
Location: Toronto, Canada
[ Nominate for medal ]
Fascinating, and obviously something you're very excited about. If this can lead to more interactive tasks then I can't wait to see it in action. Would this possibly lead to auto-run RP's and/or quests?

_________________
**Hana**


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 03, 2007 10:56 am 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
Thanks for taking the time to ask about it, Hanaisse. Yes, clearly I think this will be an important change.

If you stop to think about it, that is really exactly what a task is -- an auto-run RP/quest. In fact, quests and tasks use virtually the exact same code with some minor changes so that it is run by a staff member or automatically.

I do think it will lead to MORE RP Scenarios and quests. It will help to automate them even if it does not make them "auto-run". Think about it -- as a staff member you'd be able to do things like type in 1 command to tell a complete story to a group of players or whisper a story to an individual and it could be timed such that it is easy for them to read and keep along with, just like it is being typed by a human. It will also make things possibile that were not previously possible, such as NPCs attacking other NPCs. Any command a player can use, an NPC will be able to use in a macro (generally speaking), but NPCs can also have additional commands that players cannot use (such as mrecho noted above). That said, my current vision is that RPs and Quests will still require significant staff involvement to help keep players on their toes and ensure things run smoothly.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 03, 2007 5:52 pm 
Offline
Builder
Builder
User avatar

Joined: Wed Aug 31, 2005 12:59 pm
Posts: 38
Location: Toronto, Canada
[ Nominate for medal ]
Thank you for the info, Nezmar, and thank you for the demo this morning. I can see why you're excited.

If done properly it will be an amazing tool for builders and staff to add some unique experiences into the game, be it RP's/quests/tasks or simple things such as making a dog bark (yeah, it'll give me a giggle).

Good work!

_________________
**Hana**


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 13, 2007 10:39 pm 
Offline
Implementor
Implementor

Joined: Sat Aug 20, 2005 12:34 am
Posts: 92
Location: State of Insanity
[ Nominate for medal ]
One of the things I'd like to see us be able to do with these macro triggers is set it so shop keepers could sell spells. Keeping that in mind, some of the more helpful spells such as 'sanctuary' could be limited to 5 per day or whatever predetermined number is deemed appropriate. The trigger can simply be buy <spell name> much like buying an item in a shop is now.

Another one is that we could use is for scavenger hunt sort of games. For example, you want a specific listed item as the 'prize', you must collect so many items within the alloted time and return them to the NPC and get rewarded with the item. Of course, this should be a 1 time per player character thing if the item is really spiffy. We could also set it to 'random' a small reward for those who just want to be surprised.

Also it would be good to see if we could get asking one NPC something to trigger another NPC to do something. Example: Order a mug of ale from Huff and a barmaid serves it to the player who ordered it. Or take that one step further and have a player buy an ale for his friend and the barmaid serves it to the friend.

Does any of this make sense?

_________________
Regards,
Myrrima ~ Distant Lands Administration
Now go vote!!
--Life is too short to be uptight. Either find your sense of humor and enjoy it
or get over it and go away.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Jun 14, 2007 1:02 pm 
Offline
Implementor
Implementor

Joined: Sat Aug 20, 2005 12:34 am
Posts: 92
Location: State of Insanity
[ Nominate for medal ]
Another thing that should be associated with macro triggers... Just need more thought in how to flesh it out...

I can see it when players go in and slap NPCs that the NPC will slap them back and tell them to stop it or they'll shout for the knights. Then if they shout for a knight, having a knight or two that will actually see *that* as a trigger and come running. Then if the player slaps again, they will get labeled as a criminal.

This brings into mind if we can have different levels of "criminals". Ultimately we would need a jail to drag off offenders to and they can either pay a fine or do the time sort of thing for lesser crimes other then murder etc.

Also something that came up in my conversation with Gooey (Be afraid!) We can combine triggers but can a trigger itself have multiple options of other triggers? Say Player says "Help" to the NPC. NPC sees that and says 'With what?' - And depending on what the player says the NPC will respond with a different reaction 'If Player says 'A' run trigger A, if player says 'B' run trigger B' etc. So if we could have multi-level triggers as well as combining triggers... Wow... my mind just runs wild.

Just another couple of random thoughts!

_________________
Regards,
Myrrima ~ Distant Lands Administration
Now go vote!!
--Life is too short to be uptight. Either find your sense of humor and enjoy it
or get over it and go away.


Top
 Profile E-mail  
 
 Post subject: GREAT IDEAS!!
PostPosted: Thu Jun 14, 2007 6:54 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
Great ideas and thoughts, please keep them coming! I believe many of the things described here could be possible, it is all about creating the right "language" (with the DL commands that can only be used in a macro). Having macros program an NPC's "memory" seems really appealing to me on a number of different levels as it could allow for many of the things you describe. For example, if a player can only get 5 sanctuary spells per game day, we need some way to have the shopkeeper "remember" how many sanctuary spells he's cast upon the player in the last day. So, clearly the syntax would need work, and we might use different commands altogether, but maybe something like (the meanings should be fairly obvious):

> memory nezmar arrived road
> memory myrrima arrived road
> memory nezmar happy
> memory myrrima tired
> memory nezmar has a bag of holding
> memory nezmar has a sword of rulership
> memory myrrima paid sanctuary
> memory myrrima left road
> memory nezmar paid full heal
> memory nezmar paid sanctuary
> memory nezmar left road
> memory nezmar arrived street
> memory nezmar mad
> memory nezmar attacked guard
> memory nezmar angry
> memory nezmar attacked me
> memory nezmar left street

We'll also probably want to devise some sort of short term vs. long term concepts as well. If we don't, we'll end up using up tons of memory and all the NPCs will remember everything -- we need to be able to forget stuff too, at least over time, if not manually as well. One of the key parts to this whole thing though is we need to try to make it simple. This will be difficult, but keep in mind, macros are already a somewhat complex topic, if the language becomes too complex, nobody will want to build them. If we make it simple and powerful, I believe we'll change the face of DL entirely.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 4:33 pm 
Offline
Implementor
Implementor

Joined: Sat Aug 20, 2005 12:34 am
Posts: 92
Location: State of Insanity
[ Nominate for medal ]
Along those lines of NPCs having a memory then, it could include a players deity. So if (in RP) a player is killed, if a player has been extremely loyal - as proven by tithing, time followed, etc, it would be very cool to see the deity's high priest or priestess come to the players aid.

I'm not suggesting that the NPC kill the player who killed their follower but certainly it would be interesting to see them 'warn' the killer in some way.

I realize this all would take a huge amount of figuring out variables and what if's, but hey, if I'm going to dream, might as well dream big. I just see this as one of the long term things that really could come from macros and macro triggers.

Or am I completely nutso?

_________________
Regards,
Myrrima ~ Distant Lands Administration
Now go vote!!
--Life is too short to be uptight. Either find your sense of humor and enjoy it
or get over it and go away.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 5:03 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
If we do it right, I believe that is absolutely possible with macros and triggers. I think we should even take it one step further -- make it so the priest comes to get the corpse and casts resurrection on you (that would be what you'd wait on, instead of the stupid level based wait now).

I'm thinking more and more I'm going to do macro triggers with the "triggers" command, so from here on, I'm just going to call them triggers (they may eventually apply to something besides macros anyway). I think (and hope) I'm going to try to get started on triggers this weekend and I intend to reuse a lot of the style I've created with macros. That is to say, triggers will be sorted into libraries and have numbers and names, for example. This leads to another topic which we'll need to address, what is the best way to organize all the macros and triggers?


Top
 Profile  
 
 Post subject: Triggers
PostPosted: Fri Jun 15, 2007 5:26 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
Here's what I've got so far that I think I'm going to try to do for triggers. It should be fairly self-explainatory, although I'll admit, it will require more detail later to truly understand all of the mechanisms available. Sorted into libraries, 1 macro per trigger group -- so you can associate multiple triggers to a single macro, multiple sources can be provided, all sources within a trigger would need to be matched in order to have the trigger call the macro, multiple targets can be provided, all available targets matched would be impacted.

triggers <library #> <group #>
triggers <library #> create <trigger group name>
triggers <library #> library <library name>
triggers <library #> <group #> create
triggers <library #> <group #> delete [trigger #]
triggers <library #> <group #> macro <macro library #> <macro #>
triggers <library #> <group #> name <trigger group name>
triggers <library #> <group #> <trigger #> activate
triggers <library #> <group #> <trigger #> auto [reset]
triggers <library #> <group #> <trigger #> combat
triggers <library #> <group #> <trigger #> dynamic
triggers <library #> <group #> <trigger #> noncombat
triggers <library #> <group #> <trigger #> onetime
triggers <library #> <group #> <trigger #> source create
triggers <library #> <group #> <trigger #> source <#> command <command name>
triggers <library #> <group #> <trigger #> source <#> delete
triggers <library #> <group #> <trigger #> source <#> keywords <keywords>
triggers <library #> <group #> <trigger #> source <#> pc <# | all | any>
triggers <library #> <group #> <trigger #> source <#> npc <# | all | any>
triggers <library #> <group #> <trigger #> source <#> item <#> [using | carrying]
triggers <library #> <group #> <trigger #> source <#> expires <timer>
triggers <library #> <group #> <trigger #> source <#> frequency <1 - 100>
triggers <library #> <group #> <trigger #> source <#> priority <1 - 20>
triggers <library #> <group #> <trigger #> source <#> all
triggers <library #> <group #> <trigger #> source <#> label
triggers <library #> <group #> <trigger #> source <#> any
triggers <library #> <group #> <trigger #> source <#> exact
triggers <library #> <group #> <trigger #> source <#> ordered
triggers <library #> <group #> <trigger #> source <#> room <#>
triggers <library #> <group #> <trigger #> source <#> time dl <mud time>
triggers <library #> <group #> <trigger #> source <#> time real <real time>
triggers <library #> <group #> <trigger #> source <#> timer [ min | max ] <#>
triggers <library #> <group #> <trigger #> source <#> special <#>
triggers <library #> <group #> <trigger #> target create
triggers <library #> <group #> <trigger #> target <#> delete
triggers <library #> <group #> <trigger #> target <#> PC <# | all | any>
triggers <library #> <group #> <trigger #> target <#> NPC <# | all | any>
triggers <library #> <group #> <trigger #> target <#> item <#> [using | carrying]
triggers <library #> <group #> <trigger #> target <#> room <#>

Comments? Thoughts? Please share!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 5:35 pm 
Offline
Implementor
Implementor

Joined: Mon Aug 29, 2005 7:50 pm
Posts: 302
Location: Florida
[ Nominate for medal ]
I think I'm also going to add in:

triggers <library #> <group #> command <command>

So that you can have a trigger that is not tied to macros (this might be really useful in place of a 1 line macro, for example).

We need some way to pass variables through triggers, that is part of what the "label" thing above is about, although I haven't quite figured out how I want to address that. Anything thoughts would be really appreciated.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 74 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Forum design by .
DHTML Menu By Milonic JavaScript
Forum icons by www.chaosburnt.com © 1995-2007 ChaosBurnt
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group