General Organization

Posted by Mleo2003 on Sat 03 Jan 2015 04:10 AM — 6 posts, 23,878 views.

#0
I have just moved, and find myself with some time to get back into mudding a little. I used to have a lot of triggers and everything setup, but I lost them all. I didn't like how they were all organized, so I wanted to ask what others were doing to organize their setups.

How is everyone else keeping their triggers, aliases, scripts, and all organized? The mud I like to play on, I have several characters, of differing classes and abilities, but some parts of the game are the same no matter what you are.

I've tried both Plugins and World Files, and each has it's ups and downs, but I can never seem to find that happy middle ground to get them both working as I would like. World files were easy to modify and work with, but not very portable between chars. Plugins are very nice for reducing extra copies of things, but a lot more painful to modify and work with.

I've not tried include files (they aren't as documented as other setups), are those better or worse than either other option?
USA Global Moderator #1
Quote:
How is everyone else keeping their triggers, aliases, scripts, and all organized?


I don't have many triggers or aliases. Almost all of my scripting is done in plugins, because I want to do things that are quite complex and that can be given to other players to use.

I have one "You are hungry/thirsty" trigger that drinks generic foodbeverage from a bottomless container.
I have one keepalive trigger.
And that's about it.

Quote:
World files were easy to modify and work with...Plugins are very nice for reducing extra copies of things, but a lot more painful to modify and work with.

I completely disagree and think you have that significantly reversed. The moment you want to do anything beyond a simple one line trigger or the moment you want to start using scripts made by someone else, plugins become significantly easier to deal with. And when you say that world files are easy to modify, you're not actually talking about the world file. You're talking about the settings interface built into MUSHclient, which is kind of last-resort horrible for writing anything longer than a few lines. It has an extremely narrow input box with no syntax highlighting or line numbering or searching or bracket matching or anything else that I expect in an editor. Editing the world file itself is worse. It's like all of the bad XML parts of plugin files but worse and with none of the good parts.
#2
As for the number of triggers and such, I have a lot of character/class specific triggers for each world file. There are a few things that are the same from one char to the other (the eating/drinking, with a few caveats), but beyond that, I would need a separate plugin for each char, which doubles my file count (the world file itself, and then a plugin for that char).

As for the ease of editing, I'll agree that using a proper editor is very nice for larger scripts. My issue with using it comes from generating new triggers/aliases and such. I have to copy/paste other entries and modify them to add new features, or track new variables. That becomes a hassle in itself, when I would rather just click the 'Add item...' button, fill out a few details, and be good to go for smaller things.

I do have plugins for shared resources between chars (that I would also share with others immediately, like a chat capture window based off some of your work). The bits I'm talking about now are more specific things. For example, each char I want to work with has different responses to the eating/drinking message you alluded to. Some drink from a jug/eat meat, while others can create their own food on demand, and another class doesn't eat or drink (but need other things).

My other pain point with plugins is reloading them. I know I had code in the past to setup special aliases to reload the plugin from itself (involved some major trickery), but that just feels crazy. Every time I am testing something, I make a change, save, and then have to go into the Plugins menu, reload the plugin, close the Plugin modal box, and test my change. After a number of times, that gets old. Admittedly, the changes in a world file are similar (bring up triggers/alias menu, edit, ok, close triggers menu, test), but I don't have to bounce around quite as much. If you have a better way of doing either of that, I would love to hear it.

I was hoping someone else had a cool solution for these types of things, to make using either an external editor faster/easier, or make the internal ones nicer. My only thought was to have some kind of file watcher (like the one for world script files) that will offer/automatically reload a plugin whenever it is updated (but even this fails if the plugin has any includes itself).

Thanks for the input, I realize a lot of this is game specific, as well as style specific. I was just fishing to see what others were doing now, to see if someone had a new way of keeping things organized and easy to work with.
Australia Forum Administrator #3
Quick way to reload plugins:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=9615
Amended on Wed 07 Jan 2015 06:02 AM by Nick Gammon
USA Global Moderator #4
You're right that a lot of our different needs come from different environment and character arrangement. I only have one character on one server.
Australia Forum Administrator #5
Quote:
... some parts of the game are the same no matter what you are.


Put those parts in plugins.