Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 4 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,11 @@
name: Build project using muddler and upload artifact
name: Release

on:
push:
branches: [ main ]
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
Release:
uses: gesslar/Maint/.github/workflows/ReleaseMuddyInjectMupdate.yaml@main
permissions:
contents: write

steps:
- uses: actions/checkout@v6.0.2

- name: Download Updater.lua
run: |
mkdir -p src/scripts
curl -L -o src/scripts/Updater.lua https://github.com/gesslar/mupdate/releases/latest/download/Updater.lua

- name: Check and create scripts.json if it doesn't exist
run: |
if [ ! -f src/scripts/scripts.json ]; then
mkdir -p src/scripts
echo '[]' > src/scripts/scripts.json
fi

- name: Update scripts.json
run: |
jq '. += [{"isActive": "yes", "isFolder": "no", "name": "Updater", "script": ""}]' src/scripts/scripts.json > tmp.json && mv tmp.json src/scripts/scripts.json

- name: JSON to variables
uses: antifree/json-to-variables@v1.3.0
with:
filename: "./mfile"
prefix: "mfile"

- name: "create version file"
id: create_version_file
run: |
echo "filename=${{ env.mfile_package }}_version.txt" >> $GITHUB_ENV
echo "${{ env.mfile_version }}" > "${{ env.mfile_package }}_version.txt"

- name: Build With Muddler
uses: demonnic/build-with-muddler@main
with:
muddlerVersion: LATEST

- uses: ncipollo/release-action@v1
with:
artifacts: "build/${{ env.mfile_package }}.mpackage,${{ env.filename }}"
allowUpdates: true
bodyFile: "./README.md"
tag: ${{ env.mfile_version }}
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
# in the repo
build/
.output

# Ignore any file starting with "muddle" in the project root directory
# This utility file is specific to individual developers and should not be
# included in the repo
/muddle*
node_modules/
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
],
"Lua.diagnostics.disable": [
"lowercase-global"
],
"Lua.workspace.library": [
"/home/gesslar/.config/Code/User/globalStorage/delwing.mudlet-scripts-sdk\\docs"
]
}
79 changes: 51 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,69 @@
# ThresholdUI

ThresholdUI is a lightweight, scriptable graphical user interface package for Mudlet (a MUD client). It provides a set of Lua scripts, GUI components, and packaged builds to add customizable HUD and meter features to your Mudlet profile.
A dark-themed, gold-accented HUD for Threshold RPG in Mudlet that displays your vitals, combat info, progression, and game clock in a persistent bottom-of-screen bar.

## Key features
## Installation

- Modular Lua-based GUI components (see `src/scripts/GUI/`)
- Timers, styles, and event handlers for in-game thresholds and meters
- Packaged build in `build/ThresholdUI.mpackage` for easy import into Mudlet
In Threshold, type `gmcp gui` to install fresh or update to the latest version.

## Repository layout
## Features Overview

- `src/` - source Lua scripts and supporting assets used during development
- `scripts/` - core scripts (connection, event handlers, timers, styles)
- `scripts/GUI/` - GUI components and containers loaded by the scripts
- `aliases/` - example aliases and helper scripts
- `resources/` - bundled assets such as images and preference defaults
- `package.json` - project metadata; may include build/tooling configuration
- `mfile` - Mudlet package manifest used when exporting
### Vitals Gauges

> **Note:** Historical references to `build/`, `tmp/`, or `filtered/` directories refer to paths that are generated during packaging and are not checked into the repository. Packaging tools will create them when you run the export workflow.
Three horizontal bars on the left side showing your current and maximum values for:

## Installation
- **HP** (Hit Points) - red
- **SP** (Spell Points) - blue
- **EP** (Endurance Points) - teal

When you are stunned or immobilized, all three bars dim to give you an immediate visual cue.

### Combat, XP, and Shielding

Three horizontal bars in the center showing:

- **Foe** - your current enemy's health percentage with their name displayed on the bar; also shows who the enemy is targeting if it isn't you
- **XP** - your experience progress to the next level as a percentage
- **Shield** - your magical shielding percentage; this bar only appears when shielding is active and hides when it is not

### Vertical Meters

Four thin vertical meters on the right side:

- **C** (Capacity) - how full your inventory is
- **T** (Tummy) - your hunger/fullness level
- **H** (HealBank) - your stored healing reserves
- **R** (Regen) - progress toward your next healing tick (can be toggled on/off)

### In-Game Date and Time

A small panel showing the in-game calendar clock, updated every second:

- Date (month/day/year)
- Day of the week (e.g. Coronea, Solus, Lunas)
- Time as an ordinal toll (e.g. "14th toll")
- Current devotion period

1. Import a packaged release: open Mudlet and import the generated `ThresholdUI.mpackage` or `ThresholdUI.xml` (produced by the export workflow in the `build/` directory).
2. Alternatively, copy the relevant `src/` Lua files into your Mudlet profile's scripts directory.
This panel can be toggled on/off.

After installing, restart Mudlet or reload your profile to ensure scripts initialize correctly.
### Inactive Timer

## Development
When you are resting, trancing, or meditating, a bar appears above the HUD showing how long you have been inactive (e.g. "You have been Trancing for 5m 32s") with a subtle breathing background animation.

- Edit source files in `src/`. The primary entry points are in `src/scripts/` and `src/scripts/GUI/`.
- When exporting a package, Mudlet (or related tooling) will create a `build/` directory containing distributable `.mpackage` and `.xml` files.
- If your workflow uses temporary testing outputs, keep them outside the repository or ensure they are ignored via tooling configuration.
### Psion Feedback

## Contributing
For psion players, a row of four indicators appears above the HUD showing the state of your feedback abilities: **shock**, **net**, **mastery**, and **gaze**. Each indicator lights up in gold when that ability has feedback and stays dim when it does not. This bar only appears when the game sends feedback data and is hidden while the inactive timer is shown.

Contributions are welcome. Open issues or pull requests with a clear description of changes. When submitting code, prefer small focused commits and include brief tests or usage notes when relevant.
## Useful Commands (Aliases)

## License
ThresholdUI provides several aliases (commands) you can type in Mudlet to control the UI:

This repository is released into the public domain under the Unlicense. See `UNLICENSE.txt` for the full text.
- **Toggle Heal Tick Gauge**
- Type: `regen on` or `regen off`
- Shows or hides the healing tick gauge.

---
- **Toggle Date Time Box**
- Type: `datetime on` or `datetime off`
- Displays or hides the in-game date and time box.

If anything in this README is unclear or you want help importing the package into Mudlet, open an issue with details about your Mudlet version and what you tried.
Enjoy your adventures with ThresholdUI!
4 changes: 2 additions & 2 deletions mfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"package": "ThresholdUI",
"title": "UI for ThresholdRPG",
"description": "Threshold RPG UI",
"description": "",
"version": "4.2.0",
"author": "Gesslar",
"author": "gesslar",
"icon": "griffon-right.jpg",
"dependencies": "",
"outputFile": true
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "The main Threshold Graphical User Interface package for Mudlet",
"main": "index.js",
"scripts": {
"build": "/home/gesslar/bin/muddle-shadow-1.1.0/bin/muddle",
"watch": "/home/gesslar/bin/muddle-shadow-1.1.0/bin/muddle -w",
"build": "pnpx @gesslar/muddy",
"watch": "pnpx @gesslar/muddy -w",
"pr": "gt submit --publish --restack --ai"
},
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/scripts/Connection_Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function ThresholdUI:DisconnectionScript()
end

ThresholdUI.ConnectionHandlers = {
{"sysConnectionEvent", function() ThresholdUI:ConnectionScript() end},
{"sysDisconnectionEvent", function() ThresholdUI:DisconnectionScript() end},
{ "sysConnectionEvent", function() ThresholdUI:ConnectionScript() end },
{ "sysDisconnectionEvent", function() ThresholdUI:DisconnectionScript() end },
}

function ThresholdUI.modifyModules()
Expand All @@ -37,7 +37,7 @@ function ThresholdUI.modifyModules()

-- Disable Modules
local DisableString =
f[[Core.Supports.Remove [ {table.concat(ThresholdUI.disableModules, ", ")} ] ]]
f [[Core.Supports.Remove [ {table.concat(ThresholdUI.disableModules, ", ")} ] ]]

sendGMCP(DisableString)
end
Expand Down
30 changes: 15 additions & 15 deletions src/scripts/Event_Handlers.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
ThresholdUI.EventHandlers = ThresholdUI.EventHandlers or {
{"gmcp.Char.Vitals", nil, f[[ThresholdUI:UpdateVitals]]},
{"gmcp.Char.Afflictions.Add", nil, f[[ThresholdUI:Afflictions_Add]]},
{"gmcp.Char.Afflictions.Remove", nil, f[[ThresholdUI:Afflictions_Remove]]},
{"gmcp.Char.Shielding", nil, f[[ThresholdUI:UpdateShielding]]},
{"gmcp.Char.Status", "XP", f[[ThresholdUI:UpdateXP]]},
{"gmcp.Char.Status", "Foe", f[[ThresholdUI:UpdateFoe]]},
{"gmcp.Char.Status", "Capacity", f[[ThresholdUI:UpdateCapacity]]},
{"gmcp.Char.Status", "Tummy", f[[ThresholdUI:UpdateTummy]]},
{"gmcp.Char.Status", "HealBank", f[[ThresholdUI:UpdateHealBank]]},
{"gmcp.Char.Status", "HealTick", f[[ThresholdUI:UpdateHealTick]]},
{"gmcp.Char.Status", "Inactive", f[[ThresholdUI:DoInactiveTimer]]},
{"ThresholdUI.ToggleHealTick", nil, f[[ThresholdUI:ToggleHealTick]]},
{"ThresholdUI.ToggleTimeBox", nil, f[[ThresholdUI:ToggleTimeBox]]},
{"gmcp.Char.Feedback", "Feedback", f[[ThresholdUI:UpdateFeedback]]},
{"ThresholdUI.FeedbackToggle", nil, f[[ThresholdUI:FeedbackToggle]]},
{ "gmcp.Char.Vitals", nil, f [[ThresholdUI:UpdateVitals]] },
{ "gmcp.Char.Afflictions.Add", nil, f [[ThresholdUI:Afflictions_Add]] },
{ "gmcp.Char.Afflictions.Remove", nil, f [[ThresholdUI:Afflictions_Remove]] },
{ "gmcp.Char.Shielding", nil, f [[ThresholdUI:UpdateShielding]] },
{ "gmcp.Char.Status", "XP", f [[ThresholdUI:UpdateXP]] },
{ "gmcp.Char.Status", "Foe", f [[ThresholdUI:UpdateFoe]] },
{ "gmcp.Char.Status", "Capacity", f [[ThresholdUI:UpdateCapacity]] },
{ "gmcp.Char.Status", "Tummy", f [[ThresholdUI:UpdateTummy]] },
{ "gmcp.Char.Status", "HealBank", f [[ThresholdUI:UpdateHealBank]] },
{ "gmcp.Char.Status", "HealTick", f [[ThresholdUI:UpdateHealTick]] },
{ "gmcp.Char.Status", "Inactive", f [[ThresholdUI:DoInactiveTimer]] },
{ "ThresholdUI.ToggleHealTick", nil, f [[ThresholdUI:ToggleHealTick]] },
{ "ThresholdUI.ToggleTimeBox", nil, f [[ThresholdUI:ToggleTimeBox]] },
{ "gmcp.Char.Feedback", "Feedback", f [[ThresholdUI:UpdateFeedback]] },
{ "ThresholdUI.FeedbackToggle", nil, f [[ThresholdUI:FeedbackToggle]] },
}

function ThresholdUI:RegisterEventHandlers()
Expand Down
6 changes: 4 additions & 2 deletions src/scripts/GUI/BarContainer.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ThresholdUI.BarBox = ThresholdUI.BarBox or Geyser.HBox:new({
name = "BarBox",
x = 0, y = 0,
width = "100%", height = "100%"
x = 0,
y = 0,
width = "100%",
height = "100%"
}, ThresholdUI.MainContainer)
10 changes: 6 additions & 4 deletions src/scripts/GUI/Feedback.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ThresholdUI.Feedback = ThresholdUI.Feedback or {}
ThresholdUI.FeedbackLabels = {"shock", "net", "mastery", "gaze"}
ThresholdUI.FeedbackLabels = { "shock", "net", "mastery", "gaze" }
ThresholdUI.FeedbackBox = ThresholdUI.FeedbackBox or Geyser.HBox:new({
name = "FeedbackContainer",
x = 0, y = -(ThresholdUI.metrics.height + ThresholdUI.metrics.inactiveHeight),
height = ThresholdUI.metrics.inactiveHeight, width = "100%",
x = 0,
y = -(ThresholdUI.metrics.height + ThresholdUI.metrics.inactiveHeight),
height = ThresholdUI.metrics.inactiveHeight,
width = "100%",
})

-- Create the labels for each feedback ability
Expand Down Expand Up @@ -34,7 +36,7 @@ function ThresholdUI:FeedbackToggle()
setBorderBottom(self.metrics.height + self.metrics.inactiveHeight)
end

-- Inactive bar is being shown
-- Inactive bar is being shown
else
self.FeedbackBox:hide()
end
Expand Down
Loading