Skip to content
CodeAndLoathing edited this page May 1, 2024 · 1 revision

So, you want to be a hero? write your own Mudlet package?

There are different ways you can write a package for Mudlet that you can share with others.

This is the method I use. It helps to keep all the pieces of a package neat and together.

  1. Download _blank.xml file

    This is just a mostly empty file I made with placeholders for all the basic mudlet script types. ie, Alias, Trigger, Script, Timer, Button etc.

  2. Choose or create a safe working folder and move the file there

    I like to create a folder called .config\mudlet\modules next to where Muldet stores the profiles folder.

    But you could use your Documents folder, or wherever you feel you could keep it safe.

  3. Rename _blank.xml to whatever you want the package name to be

    I like the format of 3 letters for author followed by _ descriptive name.

    eg. cnl_example.xml

  4. Install this new file into your Mudlet profile as a Module

    Install the file into Mudlet as a MODULE using the Packages/Module Manager in Mudlet

    Use the Module Manager to install as a Module

    IMPORTANT: Select the Sync checkbox before closing the dialog.

    This will make any edits you make to the scripts in Mudlet write back to update the module file.

    Select the Sync checkbox

  5. You will see now if you go into edit any of the script types, that there will be a folder based on your file name under all of the different script types.

    Any Aliases, Scripts, Triggers, Timers etcthat you create or modify inside this folder will be saved back into your file (assuming Sync is checked).

    If you then give a copy of the file to someone else they can just install it as a package using the package manager.

    This makes it pretty easy to conciously group together things that you want to include into a single package, and makes it is conveniently ready to share as a package when you're done.

  6. What's the difference between modules and packages?

    You will probably notice that these scripts can be installed as either a package or a module. What's the difference?

    If you install a script file as a package: it gets merged into and stored in your mudlet profile file. If you install it as a module: it exists as a standalone file outside your mudlet profile.

    If you wanted to share a single copy of a script between multiple profiles where one edit would show up in all: a module is the right choice.

    If you want to install the same script into multiple different profiles but then edit them all differently: a package is the right choice.

    Beyond that it doesn't matter to much although it does have some implications if you're trying to find the path to load files.

Clone this wiki locally