demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link
hacktoberfest

What is muddler?

muddler is a build tool for Mudlet package developers. It aims to provide a development environment that will feel familiar for many developers and also be intuitive enough to pick up for those who have primarily done scripting for Mudlet.

Ok, but what does that even mean?

It means you can edit your Mudlet scripts in the IDE or text editor of your choice with all your usual tools and shortcuts, and muddler will then take the lua and json files from your project layout, and turn them into a Mudlet mpackage.

Other solutions for editing Mudlet scripts inside your own editor have tended to involve either creating and managing a ton of tempTrigger/Aliases/etc instead of creating them as permanent items in the Mudlet editor, or watching/reading a lua files contents into a script/trigger/alias/etc in the Mudlet editor. Muddler attempts to be indistinguishable from items created in the Mudlet script editor once imported into Mudlet, while still providing access to all the usual options available for your triggers and the like inside Mudlet itself. All while giving you the full capabilities of your favorite code editor.

This also produces cleaner diffs for managing a project in git, whether for collaboration or just source code/version management.

Goals and/or features

More complete documentation is available on the wiki, but a rundown of the basics follows:

Usage

First, if you need help come find me on my discord: https://discord.gg/SRRBpbxe34 It is probably the fastest way to get ahold of me and get a resolution to your issue. Second, starting with muddler 0.13 you can now use the --generate switch to interactively create a file tree, or --default to create a full, default file tree to start with. You should still familiarize yourself with the following information though.

If you aren't starting from scratch and have an existing Mudlet package you'd like to convert, have a look at DeMuddler.

muddler largely relies upon adherence to the muddler convention. For instance, the filetree for animated timers looks like this:

C:\ANITIMERS
│   mfile
│
└───src
    ├───aliases
    │   └───AnimatedTimers
    │           aliases.json
    │           anitimer_demo.lua
    │
    ├───resources
    │       test1.jpg
    │       test5.jpg
    │
    ├───scripts
    │   └───AnimatedTimers
    │           code.lua
    │           scripts.json
    │
    └───timers
        └───AnimatedTimers
                animate.lua
                timers.json

Once your project is configured, simply muddle in the root directory and it will create a build directory, inside of which will be the .xml and .mpackage files it created.

Currently working

To-do

Contributing

Prerequisites

I build using JDK8, but I have tested using jdk 8, 11, 17, and 18.

Building

./gradlew clean shadowJar produces an executable jar file with all of the depenendencies. This can be run using java -jar </path/to/jarfile

Alternately, ./gradlew clean dockerTest will create the demonnic/muddler:test docker image locally for you to use in testing.

Pull Requests

TODO: probably just don't be a dick and make sure you include information on how you tested it