|
DeathDealer Adept
Joined: 20 Jul 2004 Posts: 268
|
Posted: Sun Jun 12, 2005 12:51 am
Zmud FlowChat? |
Stupid question, but is there anything out there that can put together a type of graphical flowchart to show how stuff in zmud works?
like how 1 flows to 2 or 3 and if 3 then to 4
i just went over a small class and realized that i had #T+/-'s all over when the one that was targeted was ALREADY +/-'d. and some didnt even exist.
betting there's nothing, but would be nice if there was...hell dont even have to be graphical. something text would be okay as well, tho harder for me to follow. |
|
_________________
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jun 12, 2005 5:13 am |
I'm not sure I follow. Are you wanting a flowchart of how a line of text comes in from the mud and ends up in your game window, or how Zmud figures out which triggers/aliases/etc to fire and when? The latter is always first-found, top-down with only two exceptions.
1)every trigger will be checked for a match against the line and the matching triggers will all fire (always in a top-down manner, though processing times will vary the order of appearance). If you have 1000 triggers, all 1000 triggers are tested for a match. Of those 1000, if 5 matched then the triggers would fire in order--1st match, 2nd-match, 3rd-match, 4th-match, 5th-match. If the #3 trigger was this huge monstrosity that sucked up half your memory, it probably will not be able to apply its changes until after #4 and #5 triggers finish their processing (unless, of course, you used #PRIORITY or unchecked Trigger on Trigger, in which case ZMud would force processing to wait until after the #PRIORITY/trigger finished.)
2)variables work on the default class. If your default class is NONE, ZMud will first look there. If it does not find anything, it moves on to System, then subfolders in System, and then folders and subfolders among player-created folders. If your default class is TomAndJerry, then it will look there first, following up in NONE, then System, then subfolders in System, etc.
Class Folders
Code: |
NONE
|
|
----System
| |
| |
| ----Autolog
| |
| |
| ----(other System subfolders)
|
|
User-created Class 1
|
|
----User-created Class 2
| |
| |
| ----User-created Class 3
| |
| |
| ----User-created Class 4
|
|
----User-created Class 5
|
|
User-created Class 6
|
As far as command-processing within a setting (trigger, alias, etc), it's top-down, too. Again, the use of #PRIORITY will ensure that a particular bit of code gets to finish processing before the next line is processed. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
DeathDealer Adept
Joined: 20 Jul 2004 Posts: 268
|
Posted: Sun Jun 12, 2005 4:51 pm |
nah, like i said, i had 3 triggers that did either a #T+ or a #T- on the SAME thing needlessly.
was wondering if there was something that showed things like that. |
|
_________________
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jun 12, 2005 5:19 pm |
That's how triggers work. Every active trigger is checked against every single line that comes from the mud (or from the user, in the case of commands like #echo or #oninput). A list of matched triggers is made, and after the last active trigger is checked, the whole list of matched triggers is executed from top to bottom. Unless you are employing a #PRIORITY loop or have unchecked Trigger on Trigger, ZMud doesn't pause the execution until each trigger has finished.
It's pretty much like lighting a row of firecrackers. Some have very fast wicks, others have normal ones, and still others have very slow wicks. Just because you lit them left-to-right doesn't mean they'll all go off that way. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
DeathDealer Adept
Joined: 20 Jul 2004 Posts: 268
|
Posted: Sun Jun 12, 2005 7:33 pm |
yeah, looks like i am not making myself clear or something.
TRIGGER 1 turns off CLASS 1
TRIGGER 2 which follows a few lines after TRIGGER 1 dies a few other things and ALSO TURNS OFF CLASS 1.
TRIGGER 2 turning off CLASS 1 is POINTLESS since it already IS off and always comes after TRIGGER 1.
TRIGGER 3 Turns on CLASS 2
TRIGGER 4 Turns off CLASS 2
THIS one is not pointless.
ALIAS 1 does a few things as WELL AS turns on CLASSes 1 and 2
The alias is IN TRIGGER 1 so it automatically fires.
I have a rather untidy mind and with constantly changing code, i forget that one already exists that does part of what another does.
Like i said, i had a few triggers/alias' that did what the other did.
So i thought there might be something that someone developed that had a flow chat type of thing that could show how the layout was.
I can't make it clearer than this.
If there is still no understanding then there is obviously no way to do this. |
|
_________________
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Jun 12, 2005 10:27 pm |
Sure there is a way to do it! break out the pen and paper and write out the layout of how you want to do stuff!
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jun 12, 2005 11:10 pm |
Yeah, we have no idea what your triggers are so we can't really do it for you.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
DeathDealer Adept
Joined: 20 Jul 2004 Posts: 268
|
Posted: Mon Jun 13, 2005 2:07 am |
*mosh nexela* that helps :-P
i know matt, thats why i asked if there was a program out there or a script that did it |
|
_________________
|
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Jun 13, 2005 7:59 am |
NO.
If you create such a beast, feel free to share it here though. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Jun 14, 2005 5:07 am |
Hmm, I seem to recall seeing such a program from way back in the bad ol' Win95 days. It probably wouldn't be all that hard to whip up either, since it's basically a modified simple drawing program with a text-input component (ie, filling in the captions). Come to think of it, kinda resembles the ZMud mapper module.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Tue Jun 14, 2005 5:24 am |
i learned my lesson long ago, i now use #IF (%class(someclass) = 1) {#class someclass 0}, seems to speed things up in general, might just be wishfull thinking, would needa know what's faster, checking a class or disabling if already off.
but to see what is happening, i turn on "show triggers" so i can see whats happening 1st, 2nd, etc so i can see what i can remove. |
|
|
|
|
|