nexsys4 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,50 +1,50 @@
1
- # nexSys4
2
-
3
- A character-management and curing-automation system for the text MUD **Achaea**, running inside the Nexus web client.
4
-
5
- nexSys4 ingests GMCP, text triggers, and prompt boundaries to maintain authoritative state for your character — afflictions, balances, defences, limbs, cache, and queues — and drives two coordinated outbound lanes: prompt-bound curing/defence output and a separate queue control plane. Behavior is deterministic, server-side curing is reconciled diff-only, and a built-in configuration UI exposes priorities and settings.
6
-
7
- ## Installation
8
-
9
- ```
10
- npm install nexsys4
11
- ```
12
-
13
- The package ships prebuilt distributables only:
14
-
15
- - **`dist/nexSys4.nxs`** — a Nexus package file. Import it into the Nexus client to run nexSys4 in-game.
16
- - **`dist/nexsys4.min.js`** — the prebuilt runtime bundle. When loaded in Nexus it installs `globalThis.nexSys`, the scripting entry point.
17
-
18
- ## Usage
19
-
20
- Once loaded in Nexus, the runtime is available on the global `nexSys` object.
21
-
22
- ```js
23
- // Open the configuration UI (priorities, settings, precache, colors)
24
- nexSys.ui.openConfig();
25
- ```
26
-
27
- The `nexSys` global exposes a namespace-first runtime API:
28
-
29
- | Namespace | Purpose |
30
- | ---------- | --------------------------------------------------- |
31
- | `state` | Read current system / character state |
32
- | `affs` | Affliction presence and timing |
33
- | `defs` | Defence presence and timing |
34
- | `balances` | Balance presence and timing |
35
- | `limbs` | Limb state |
36
- | `queue` | Queue control plane |
37
- | `ss` | Server-side curing: predictions, queue, curing sets |
38
- | `rules` | Rule lifecycle |
39
- | `control` | Runtime control (pause, etc.) |
40
- | `prompt` | Prompt-bound output |
41
- | `events` | Subscribe to runtime events (`on` / `off`) |
42
- | `ui` | Open / close the configuration UI |
43
-
44
- ## Requirements
45
-
46
- nexSys4 is designed to run inside the Nexus client for Achaea, alongside the standard Nexus runtime globals (`eventStream`, `GMCP`).
47
-
48
- ## License
49
-
50
- Proprietary — all rights reserved. See `package.json` for the current license declaration.
1
+ # nexSys4
2
+
3
+ A character-management and curing-automation system for the text MUD **Achaea**, running inside the Nexus web client.
4
+
5
+ nexSys4 ingests GMCP, text triggers, and prompt boundaries to maintain authoritative state for your character — afflictions, balances, defences, limbs, cache, and queues — and drives two coordinated outbound lanes: prompt-bound curing/defence output and a separate queue control plane. Behavior is deterministic, server-side curing is reconciled diff-only, and a built-in configuration UI exposes priorities and settings.
6
+
7
+ ## Installation
8
+
9
+ ```
10
+ npm install nexsys4
11
+ ```
12
+
13
+ The package ships prebuilt distributables only:
14
+
15
+ - **`dist/nexSys4.nxs`** — a Nexus package file. Import it into the Nexus client to run nexSys4 in-game.
16
+ - **`dist/nexsys4.min.js`** — the prebuilt runtime bundle. When loaded in Nexus it installs `globalThis.nexSys`, the scripting entry point.
17
+
18
+ ## Usage
19
+
20
+ Once loaded in Nexus, the runtime is available on the global `nexSys` object.
21
+
22
+ ```js
23
+ // Open the configuration UI (priorities, settings, precache, colors)
24
+ nexSys.ui.openConfig();
25
+ ```
26
+
27
+ The `nexSys` global exposes a namespace-first runtime API:
28
+
29
+ | Namespace | Purpose |
30
+ | ---------- | --------------------------------------------------- |
31
+ | `state` | Read current system / character state |
32
+ | `affs` | Affliction presence and timing |
33
+ | `defs` | Defence presence and timing |
34
+ | `balances` | Balance presence and timing |
35
+ | `limbs` | Limb state |
36
+ | `queue` | Queue control plane |
37
+ | `ss` | Server-side curing: predictions, queue, curing sets |
38
+ | `rules` | Rule lifecycle |
39
+ | `control` | Runtime control (pause, etc.) |
40
+ | `prompt` | Prompt-bound output |
41
+ | `events` | Subscribe to runtime events (`on` / `off`) |
42
+ | `ui` | Open / close the configuration UI |
43
+
44
+ ## Requirements
45
+
46
+ nexSys4 is designed to run inside the Nexus client for Achaea, alongside the standard Nexus runtime globals (`eventStream`, `GMCP`).
47
+
48
+ ## License
49
+
50
+ Proprietary — all rights reserved. See `package.json` for the current license declaration.
package/dist/nexSys4.nxs CHANGED
@@ -1 +1 @@
1
- {"type":"group","name":"nexSys4","enabled":true,"items":[{"type":"function","name":"__meta","enabled":true,"code":"{\n\t\"description\": \"nexSys4 system\",\n \"version\": \"1.0.0\",\n \"website\": \"https://github.com/NexusUnleashed/nexsys4\",\n \"dependencies\": [\n \"eventStream3\",\n \"nexAction3\"\n ]\n}"},{"type":"function","name":"Version","enabled":true,"code":"//1.0.0"},{"type":"function","name":"onInstall","enabled":true,"code":"delete nexusclient.variables().vars.nexSys4Settings;\nnexusclient.reflexes().run_function('onLoad', {}, 'nexSys4');\nconst np = nexusclient.packages();\nif (!np.exists('eventStream3')) {\n fetch(`https://unpkg.com/nexevent/eventStream3.nxs`, { cache: \"no-store\" })\n .then((r) => r.json())\n .then((d) => {\n const p = np.create('eventStream3', 'placeholder');\n p.name = \"eventStream3\";\n const i = np.exists('eventStream3');\n np.move(i - 1, 1);\n np\n .get(\"eventStream3\")\n .apply(d, nexusclient.reflexes());\n });\n}"},{"type":"function","name":"onLoad","enabled":true,"code":"/* global nexusclient */\nglobalThis.React ??= nexusclient.platform().React;\nglobalThis.ReactDOM ??= nexusclient.platform().ReactDOM;\nnexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = false);\nconsole.log(\"onLoad SPEECH\", speechSynthesis);\nconsole.log(\"onLoad VOICES\", speechSynthesis.getVoices());"},{"type":"function","name":"esLoad","enabled":true,"code":"console.log(\"esLoad SPEECH\", speechSynthesis);\nconsole.log(\"esLoad VOICES\", speechSynthesis.getVoices());\nconst nexSysLoaded = () => {\n console.log(\"nexSysLoaded SPEECH\", speechSynthesis);\n console.log(\"nexSysLoaded VOICES\", speechSynthesis.getVoices());\n nexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = true);\n nexusclient.reflexes().run_function('SystemLoaded', {}, 'ALL');\n console.log('nexSys4 loaded: startup complete');\n nexSys.api.line.say(`Welcome back ${GMCP.Char.Status.name}. Nex Sys 4 has been loaded to your specifications`);\n};\n\nimport('https://unpkg.com/nexsys/nexsys.min.js')\n .then(() => {\n nexusclient.packages().get('nexSys4').items\n .filter(item => item.type === 'group')\n .forEach(group => group.enabled = true);\n console.log('nexSys4 loaded: beginning startup');\n eventStream.registerEvent(\"nexsys4.system.loaded\", nexSysLoaded);\n });\n"},{"type":"group","name":"system","enabled":false,"items":[{"type":"group","name":"system aliases","enabled":true,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.pause();"}],"text":"pp on","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.unpause();"}],"text":"pp off","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.pauseToggle();"}],"text":"pp","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.target.set(args[1]);"}],"text":"^tt?\\s+(.+)$","matching":"regexp","whole_words":false,"case_sensitive":false,"prefix_suffix":true},{"type":"alias","name":"Toggle Health/Mana","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.applySettings({\n ss: { sipPriority: nexSys.state.system.settings.ss.sipPriority === 'mana' ? 'health' : 'mana' }\n});"}],"text":"hh","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"systemTrigger","enabled":true,"items":[{"type":"trigger","name":"","enabled":false,"actions":[{"type":"script","enabled":true,"script":"// legacy trigger\nnexSys.sys.lifevision = true;"}],"text":"** Illusion **","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"^SystemEvent .+$","matching":"regexp","whole_words":true,"case_sensitive":true}]}]},{"type":"group","name":"affs","enabled":false,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"eventStream.raiseEvent('Char.Afflictions.Remove', { name: 'stun' });"}],"text":"^You are no longer stunned\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"//Serverside curing does not pick up weariness from this message\nnexSys.api.command.send(`curing predict weariness`);\n//Send \"x\" for nexMap purposes\nnexSys.api.command.send(`x`);"}],"text":"You are too wearied to pierce realities Veil and travel the multiverse as of this time.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (GMCP.Vitals.hp === GMCP.Vitals.maxhp && GMCP.Vitals.mp === GMCP.Vitals.maxmp) {\n\tnexSys.api.command.send(\"curing predict recklessness\");\n}"}],"text":"You are confused as to the effects of the venom.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"defs","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.defup();"}],"text":"defup","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.defoff();"}],"text":"defoff","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.density.defaultPriority;\nnexSys.api.defs.setDefaultPriority('density', prio != 0 ? 0 : 25);"}],"text":"ma","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.heldbreath.defaultPriority;\nnexSys.api.defs.setDefaultPriority('heldbreath', prio != 0 ? 0 : 25);"}],"text":"br","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.rebounding.defaultPriority;\nnexSys.api.defs.setDefaultPriority('rebounding', prio != 0 ? 0 : 25);"}],"text":"ss","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.cloak.defaultPriority;\nnexSys.api.defs.setDefaultPriority('cloak', prio != 0 ? 0 : 25);"}],"text":"cl","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.parry(args[1]);\n//CUSTOM\nnexSys.api.queue.free.prepend(`parry ${nexSys.tables.limbs.short[args[1]]}`);"}],"text":"^p(rl|ll|ra|la|h|tt|c|l|r)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.command.send('unblock');\nnexSys.api.defs.setDefaultPriority('blocking', 0);"}],"text":"ub","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.setCommand('blocking', `block ${args[1]}`);\nnexSys.api.defs.setDefaultPriority('blocking', 25);\nnexSys.api.command.send(`block ${args[1]}`);"}],"text":"^block\\s+(\\w+)$","matching":"regexp","whole_words":false,"case_sensitive":false,"prefix_suffix":true},{"type":"group","name":"Mounted","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.lost();"}],"text":"^You lose purchase on .+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.lost();"}],"text":"^You step down off of .+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();"}],"text":"You must dismount before you can mount anything else.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ name: args[1] });"}],"text":"^You are riding a.+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ name: args[1] });"}],"text":"^You easily vault onto the back of (.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ id: args[1] });"}],"text":"^\\[Curing\\]: VAULT (\\d+)$","matching":"regexp","whole_words":false,"case_sensitive":false}]},{"type":"group","name":"Clientside","enabled":true,"items":[{"type":"trigger","name":"Morimbuul card","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.got();"}],"text":"You draw forth a card depicting Morimbuul, the Bound, suffusing you with the unrestrained wrath of the Daemon Tutor.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Morimbuul have","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.got();"}],"text":"You are already under the effects of the legend of Morimbuul.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Morimbuul lost","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.lost();"}],"text":"The effects of the legend of Morimbuul fade away.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Bloodcloak empty","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.setDefaultPriority('bloodshield', 0);\nnexSys.api.observe.defs.bloodshield.lost();"}],"text":"You have not shed enough blood to activate your cloak's power.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Flying defs","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.flying.got();"}],"text":"You are soaring high above the ground.","matching":"exact","whole_words":true,"case_sensitive":true}]}]},{"type":"group","name":"cache","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.command.send(`inr all`);\nnexSys.api.queue.freeQueue.prepend('open pack53549|put gold in pack53549|close pack53549');"}],"text":"inra","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"queueing","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.class.prepend(args[1]);"}],"text":"^qcp (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.free.prepend(args[1]);"}],"text":"^qp (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.free.add(args[1]);"}],"text":"^qa (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (!args[1]) {\n nexSys.dor = false;\n eventStream.removeListener(\"nexsys4.queue.fired.free\", \"doRepeat\");\n nexSys.api.queue.free.clearQueue();\n} else {\n nexSys.dor = args[1].trim();\n\n const doRepeat = () => {\n if (nexSys.dor) {\n nexSys.api.queue.free.add(nexSys.dor);\n }\n };\n\n eventStream.removeListener(\"nexsys4.queue.fired.free\", \"doRepeat\");\n eventStream.registerEvent(\"nexsys4.queue.fired.free\", doRepeat, { id: \"doRepeat\" });\n doRepeat();\n}"}],"text":"^dor\\s?(.+)?$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"gags","enabled":false,"items":[{"type":"group","name":"queuing.gags","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Added .+ queue\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Queued .+ commands cleared\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Running queued .+ command:","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You are not fallen or kneeling.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You have no pipes that require lighting.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You cannot ride anything while in Dragon form.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":false,"actions":[{"type":"gag","enabled":true}],"text":"You must dismount before you can mount anything else.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"cure messages","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may drink another health or mana elixir.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may eat another bit of irid moss or potash.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"Your mind is able to focus once again.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may eat another plant or mineral.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may utilise the tree tattoo again.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may apply another salve to yourself.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"trigger","name":"SystemOutput Event Trigger","enabled":false,"actions":[{"type":"script","enabled":true,"script":"eventStream.raiseEvent(args[1]);\nnexusclient.current_line.gag = true;"}],"text":"^SystemEvent (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You have no soul.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You are not fallen or kneeling.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"prompt","enabled":false,"items":[{"type":"function","name":"promptCustomization","enabled":true,"code":"/* global nexSys */\n(() => {\n const { prompt } = nexSys.api;\n\n // ── 1. Cure palette overrides ─────────────────────────────────────────────\n // nexSys4 ships a default palette. Override individual entries here.\n prompt.patchCureColors({\n ferrum: { fg: \"DarkOrange\", bg: \"\" },\n writhe: { fg: \"PaleGoldenRod\", bg: \"darkslategray\" },\n restoration: { fg: \"darkviolet\", bg: \"\" },\n });\n\n // ── 2. Affliction display overrides ───────────────────────────────────────\n // nexSys4 ships default abbreviations and colors. Add, remap, or remove here.\n // null removes an entry: prompt.patchAffs({ someAff: null })\n const c = prompt.cureColors;\n prompt.patchAffs({\n damage: { text: \"dmg\", fg: \"tomato\", bg: \"\" },\n impaled: { text: \"impl\", ...c.writhe },\n paralysis: { text: \"PAR\", ...c.magnesium },\n corruption: { text: \"corr\", fg: \"\", bg: \"\" },\n darkshade: { text: \"dark\", ...c.ferrum },\n tension: { text: \"tens\", ...c.cinnabar },\n });\n\n // ── 3. Prompt layout ──────────────────────────────────────────────────────\n // Builder API (all methods chain and return b):\n // b.add(varKey | literal, fg?, bg?) — var key uses nexSys4's default parameters for that key; literal renders with the fg/bg you supply\n // b.addAffs() — active affliction strip (order controlled by aff priority model)\n // b.addDiff() — HP/MP change deltas, auto-clears after render\n // b.addTarget() — [target: HP%] region, renders empty when no target is set\n prompt.compose = (b) => {\n const { vars } = b;\n\n if (vars.blackout) { b.add(\"-\"); return; }\n\n b.add(\"paused\").add(\"aeon\").add(\"retard\");\n\n if (vars.prismatic.text) b.add(\"[[\", vars.prismatic.fg, vars.prismatic.bg);\n if (vars.shield.text) b.add(\"((\", vars.shield.fg, vars.shield.bg);\n\n b.add(\"h\");\n b.add(`(${vars.ph.text}), `, vars.h.fg, vars.h.bg);\n b.add(\"m\");\n b.add(`(${vars.pm.text}) `, vars.m.fg, vars.m.bg);\n\n if (nexSys.api.class.is(\"Occultist\"))\n b.add(`${vars.karma.text}K `, vars.karma.fg, vars.karma.bg);\n if (Number(vars.rage.text) > 0)\n b.add(`${vars.rage.text}R `, vars.rage.fg);\n\n b.add(\"eq\").add(\"bal\").add(\"|\").add(\"c\").add(\"k\").add(\"d\").add(\"b\");\n\n if (vars.shield.text) b.add(\"))\", vars.shield.fg, vars.shield.bg);\n if (vars.prismatic.text) b.add(\"]]\", vars.prismatic.fg, vars.prismatic.bg);\n\n b.add(\" \").addAffs().addDiff();\n // b.addTarget();\n };\n})();"},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.reflexes().run_function('promptCustomization', {}, 'nexSys4');"}],"text":"ns prompt","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"selfLimbCounter","enabled":false,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.hit(args.groups.limb, args.groups.amount);"}],"text":"^As .+? carves into you, you perceive that \\w+ has dealt (?<amount>[\\d.]+)% damage to your (?<limb>.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.hit(args.groups.limb, args.groups.amount);"}],"text":"^As .+?'s? blow crunches into you, you perceive that \\w+ has dealt (?<amount>[\\d.]+)% damage to your (?<limb>.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.reset(args.groups.limb);"}],"text":"^The pain plaguing your (?<limb>.+) subsides\\.$","matching":"regexp","whole_words":true,"case_sensitive":true}]},{"type":"alias","name":"ns load","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (typeof eventStream === \"undefined\") { return; }\n\nnexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = true);\n//nexusclient.reflexes().run_function(\"esLoad\", {}, \"nexSys4\");"}],"text":"ns load","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"ns config","enabled":true,"actions":[{"type":"script","enabled":true,"script":"//nexSys.evt.dispatchEvent(new CustomEvent('nexSys-config-dialog', {detail: true}))\nnexSys.api.ui.openConfig();"}],"text":"ns config","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.send_commands(\"echo SystemEvent SystemOutputCompleteEvent\");"}],"text":"ns stuck","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}],"description":"Khaseem's nexSys4 system for Nexus 3.0"}
1
+ {"type":"group","name":"nexSys4","enabled":true,"items":[{"type":"function","name":"__meta","enabled":true,"code":"{\n\t\"description\": \"nexSys4 system\",\n \"version\": \"1.0.1\",\n \"website\": \"https://github.com/NexusUnleashed/nexsys4\",\n \"dependencies\": [\n \"eventStream3\",\n \"nexAction3\"\n ]\n}"},{"type":"function","name":"Version","enabled":true,"code":"//1.0.1"},{"type":"function","name":"onInstall","enabled":true,"code":"delete nexusclient.variables().vars.nexSys4Settings;\nnexusclient.reflexes().run_function('onLoad', {}, 'nexSys4');\nconst np = nexusclient.packages();\nif (!np.exists('eventStream3')) {\n fetch(`https://unpkg.com/nexevent/eventStream3.nxs`, { cache: \"no-store\" })\n .then((r) => r.json())\n .then((d) => {\n const p = np.create('eventStream3', 'placeholder');\n p.name = \"eventStream3\";\n const i = np.exists('eventStream3');\n np.move(i - 1, 1);\n np\n .get(\"eventStream3\")\n .apply(d, nexusclient.reflexes());\n });\n}"},{"type":"function","name":"onLoad","enabled":true,"code":"/* global nexusclient */\nglobalThis.React ??= nexusclient.platform().React;\nglobalThis.ReactDOM ??= nexusclient.platform().ReactDOM;\nnexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = false);\nconsole.log(\"onLoad SPEECH\", speechSynthesis);\nconsole.log(\"onLoad VOICES\", speechSynthesis.getVoices());"},{"type":"function","name":"esLoad","enabled":true,"code":"if (\n typeof nexusclient.variables().vars.nexSys4Settings !== \"undefined\" &&\n nexusclient.variables().vars.nexSys4Settings.systemSettings?.loadOnLogin === false\n) { \n console.log(`[nexSys]: esLoad function return. Load on login check.`)\n return; \n}\n\nconsole.log(\"esLoad SPEECH\", speechSynthesis);\nconsole.log(\"esLoad VOICES\", speechSynthesis.getVoices());\nconst nexSysLoaded = () => {\n console.log(\"nexSysLoaded SPEECH\", speechSynthesis);\n console.log(\"nexSysLoaded VOICES\", speechSynthesis.getVoices());\n nexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = true);\n nexusclient.reflexes().run_function('SystemLoaded', {}, 'ALL');\n console.log('nexSys4 loaded: startup complete');\n nexSys.api.line.say(`Welcome back ${GMCP.Char.Status.name}. Nex Sys 4 has been loaded to your specifications`);\n};\n\nimport('https://unpkg.com/nexsys4/dist/nexsys4.min.js')\n .then(() => {\n nexusclient.packages().get('nexSys4').items\n .filter(item => item.type === 'group')\n .forEach(group => group.enabled = true);\n console.log('nexSys4 loaded: beginning startup');\n eventStream.registerEvent(\"nexsys4.system.loaded\", nexSysLoaded);\n });\n"},{"type":"group","name":"system","enabled":false,"items":[{"type":"group","name":"system aliases","enabled":true,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.pause();"}],"text":"pp on","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.unpause();"}],"text":"pp off","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.pauseToggle();"}],"text":"pp","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.target.set(args[1]);"}],"text":"^tt?\\s+(.+)$","matching":"regexp","whole_words":false,"case_sensitive":false,"prefix_suffix":true},{"type":"alias","name":"Toggle Health/Mana","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.control.applySettings({\n ss: { sipPriority: nexSys.state.system.settings.ss.sipPriority === 'mana' ? 'health' : 'mana' }\n});"}],"text":"hh","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"systemTrigger","enabled":true,"items":[{"type":"trigger","name":"","enabled":false,"actions":[{"type":"script","enabled":true,"script":"// legacy trigger\nnexSys.sys.lifevision = true;"}],"text":"** Illusion **","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"^SystemEvent .+$","matching":"regexp","whole_words":true,"case_sensitive":true}]}]},{"type":"group","name":"affs","enabled":false,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"eventStream.raiseEvent('Char.Afflictions.Remove', { name: 'stun' });"}],"text":"^You are no longer stunned\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"//Serverside curing does not pick up weariness from this message\nnexSys.api.command.send(`curing predict weariness`);\n//Send \"x\" for nexMap purposes\nnexSys.api.command.send(`x`);"}],"text":"You are too wearied to pierce realities Veil and travel the multiverse as of this time.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (GMCP.Vitals.hp === GMCP.Vitals.maxhp && GMCP.Vitals.mp === GMCP.Vitals.maxmp) {\n\tnexSys.api.command.send(\"curing predict recklessness\");\n}"}],"text":"You are confused as to the effects of the venom.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"defs","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.defup();"}],"text":"defup","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.defoff();"}],"text":"defoff","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.density.defaultPriority;\nnexSys.api.defs.setDefaultPriority('density', prio != 0 ? 0 : 25);"}],"text":"ma","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.heldbreath.defaultPriority;\nnexSys.api.defs.setDefaultPriority('heldbreath', prio != 0 ? 0 : 25);"}],"text":"br","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.rebounding.defaultPriority;\nnexSys.api.defs.setDefaultPriority('rebounding', prio != 0 ? 0 : 25);"}],"text":"ss","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"const prio = nexSys.state.defs.cloak.defaultPriority;\nnexSys.api.defs.setDefaultPriority('cloak', prio != 0 ? 0 : 25);"}],"text":"cl","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.parry(args[1]);\n//CUSTOM\nnexSys.api.queue.free.prepend(`parry ${nexSys.tables.limbs.short[args[1]]}`);"}],"text":"^p(rl|ll|ra|la|h|tt|c|l|r)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.command.send('unblock');\nnexSys.api.defs.setDefaultPriority('blocking', 0);"}],"text":"ub","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.setCommand('blocking', `block ${args[1]}`);\nnexSys.api.defs.setDefaultPriority('blocking', 25);\nnexSys.api.command.send(`block ${args[1]}`);"}],"text":"^block\\s+(\\w+)$","matching":"regexp","whole_words":false,"case_sensitive":false,"prefix_suffix":true},{"type":"group","name":"Mounted","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.lost();"}],"text":"^You lose purchase on .+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.lost();"}],"text":"^You step down off of .+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();"}],"text":"You must dismount before you can mount anything else.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ name: args[1] });"}],"text":"^You are riding a.+\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ name: args[1] });"}],"text":"^You easily vault onto the back of (.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.mounted.got();\nnexSys.api.observe.mount.set({ id: args[1] });"}],"text":"^\\[Curing\\]: VAULT (\\d+)$","matching":"regexp","whole_words":false,"case_sensitive":false}]},{"type":"group","name":"Clientside","enabled":true,"items":[{"type":"trigger","name":"Morimbuul card","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.got();"}],"text":"You draw forth a card depicting Morimbuul, the Bound, suffusing you with the unrestrained wrath of the Daemon Tutor.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Morimbuul have","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.got();"}],"text":"You are already under the effects of the legend of Morimbuul.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Morimbuul lost","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.morimbuul.lost();"}],"text":"The effects of the legend of Morimbuul fade away.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Bloodcloak empty","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.defs.setDefaultPriority('bloodshield', 0);\nnexSys.api.observe.defs.bloodshield.lost();"}],"text":"You have not shed enough blood to activate your cloak's power.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"Flying defs","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.defs.flying.got();"}],"text":"You are soaring high above the ground.","matching":"exact","whole_words":true,"case_sensitive":true}]}]},{"type":"group","name":"cache","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.command.send(`inr all`);\nnexSys.api.queue.freeQueue.prepend('open pack53549|put gold in pack53549|close pack53549');"}],"text":"inra","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"queueing","enabled":false,"items":[{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.class.prepend(args[1]);"}],"text":"^qcp (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.free.prepend(args[1]);"}],"text":"^qp (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.queue.free.add(args[1]);"}],"text":"^qa (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (!args[1]) {\n nexSys.dor = false;\n eventStream.removeListener(\"nexsys4.queue.fired.free\", \"doRepeat\");\n nexSys.api.queue.free.clearQueue();\n} else {\n nexSys.dor = args[1].trim();\n\n const doRepeat = () => {\n if (nexSys.dor) {\n nexSys.api.queue.free.add(nexSys.dor);\n }\n };\n\n eventStream.removeListener(\"nexsys4.queue.fired.free\", \"doRepeat\");\n eventStream.registerEvent(\"nexsys4.queue.fired.free\", doRepeat, { id: \"doRepeat\" });\n doRepeat();\n}"}],"text":"^dor\\s?(.+)?$","matching":"regexp","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"gags","enabled":false,"items":[{"type":"group","name":"queuing.gags","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Added .+ queue\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Queued .+ commands cleared\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"^\\[System\\]: Running queued .+ command:","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You are not fallen or kneeling.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You have no pipes that require lighting.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You cannot ride anything while in Dragon form.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":false,"actions":[{"type":"gag","enabled":true}],"text":"You must dismount before you can mount anything else.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"cure messages","enabled":true,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may drink another health or mana elixir.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may eat another bit of irid moss or potash.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"Your mind is able to focus once again.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may eat another plant or mineral.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may utilise the tree tattoo again.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.current_line.gag = true;"}],"text":"You may apply another salve to yourself.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"trigger","name":"SystemOutput Event Trigger","enabled":false,"actions":[{"type":"script","enabled":true,"script":"eventStream.raiseEvent(args[1]);\nnexusclient.current_line.gag = true;"}],"text":"^SystemEvent (.+)$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You have no soul.","matching":"exact","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"gag","enabled":true}],"text":"You are not fallen or kneeling.","matching":"exact","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"prompt","enabled":false,"items":[{"type":"function","name":"promptCustomization","enabled":true,"code":"/* global nexSys */\n(() => {\n const { prompt } = nexSys.api;\n\n // ── 1. Cure palette overrides ─────────────────────────────────────────────\n // nexSys4 ships a default palette. Override individual entries here.\n prompt.patchCureColors({\n ferrum: { fg: \"DarkOrange\", bg: \"\" },\n writhe: { fg: \"PaleGoldenRod\", bg: \"darkslategray\" },\n restoration: { fg: \"darkviolet\", bg: \"\" },\n });\n\n // ── 2. Affliction display overrides ───────────────────────────────────────\n // nexSys4 ships default abbreviations and colors. Add, remap, or remove here.\n // null removes an entry: prompt.patchAffs({ someAff: null })\n const c = prompt.cureColors;\n prompt.patchAffs({\n damage: { text: \"dmg\", fg: \"tomato\", bg: \"\" },\n impaled: { text: \"impl\", ...c.writhe },\n paralysis: { text: \"PAR\", ...c.magnesium },\n corruption: { text: \"corr\", fg: \"\", bg: \"\" },\n darkshade: { text: \"dark\", ...c.ferrum },\n tension: { text: \"tens\", ...c.cinnabar },\n });\n\n // ── 3. Prompt layout ──────────────────────────────────────────────────────\n // Builder API (all methods chain and return b):\n // b.add(varKey | literal, fg?, bg?) — var key uses nexSys4's default parameters for that key; literal renders with the fg/bg you supply\n // b.addAffs() — active affliction strip (order controlled by aff priority model)\n // b.addDiff() — HP/MP change deltas, auto-clears after render\n // b.addTarget() — [target: HP%] region, renders empty when no target is set\n prompt.compose = (b) => {\n const { vars } = b;\n\n if (vars.blackout) { b.add(\"-\"); return; }\n\n b.add(\"paused\").add(\"aeon\").add(\"retard\");\n\n if (vars.prismatic.text) b.add(\"[[\", vars.prismatic.fg, vars.prismatic.bg);\n if (vars.shield.text) b.add(\"((\", vars.shield.fg, vars.shield.bg);\n\n b.add(\"h\");\n b.add(`(${vars.ph.text}), `, vars.h.fg, vars.h.bg);\n b.add(\"m\");\n b.add(`(${vars.pm.text}) `, vars.m.fg, vars.m.bg);\n\n if (nexSys.api.class.is(\"Occultist\"))\n b.add(`${vars.karma.text}K `, vars.karma.fg, vars.karma.bg);\n if (Number(vars.rage.text) > 0)\n b.add(`${vars.rage.text}R `, vars.rage.fg);\n\n b.add(\"eq\").add(\"bal\").add(\"|\").add(\"c\").add(\"k\").add(\"d\").add(\"b\");\n\n if (vars.shield.text) b.add(\"))\", vars.shield.fg, vars.shield.bg);\n if (vars.prismatic.text) b.add(\"]]\", vars.prismatic.fg, vars.prismatic.bg);\n\n b.add(\" \").addAffs().addDiff();\n // b.addTarget();\n };\n})();"},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.reflexes().run_function('promptCustomization', {}, 'nexSys4');"}],"text":"ns prompt","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}]},{"type":"group","name":"selfLimbCounter","enabled":false,"items":[{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.hit(args.groups.limb, args.groups.amount);"}],"text":"^As .+? carves into you, you perceive that \\w+ has dealt (?<amount>[\\d.]+)% damage to your (?<limb>.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.hit(args.groups.limb, args.groups.amount);"}],"text":"^As .+?'s? blow crunches into you, you perceive that \\w+ has dealt (?<amount>[\\d.]+)% damage to your (?<limb>.+)\\.$","matching":"regexp","whole_words":true,"case_sensitive":true},{"type":"trigger","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexSys.api.observe.limbs.reset(args.groups.limb);"}],"text":"^The pain plaguing your (?<limb>.+) subsides\\.$","matching":"regexp","whole_words":true,"case_sensitive":true}]},{"type":"group","name":"nexSys4.userSettings","enabled":false,"items":[]},{"type":"alias","name":"ns load","enabled":true,"actions":[{"type":"script","enabled":true,"script":"if (typeof eventStream === \"undefined\") { return; }\n\nif (typeof nexSys !== 'undefined') { return; }\n\n//nexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = true);\n//nexusclient.reflexes().run_function(\"esLoad\", {}, \"nexSys4\");\n\nconst nexSysLoaded = () => {\n console.log(\"nexSysLoaded SPEECH\", speechSynthesis);\n console.log(\"nexSysLoaded VOICES\", speechSynthesis.getVoices());\n nexusclient.packages().get('nexSys4').items.filter(item => item.type === 'group').forEach(group => group.enabled = true);\n nexusclient.reflexes().run_function('SystemLoaded', {}, 'ALL');\n console.log('nexSys4 loaded: startup complete');\n nexSys.api.line.say(`Welcome back ${GMCP.Char.Status.name}. Nex Sys 4 has been loaded to your specifications`);\n};\n\nimport('https://unpkg.com/nexsys4/dist/nexsys4.min.js')\n .then(() => {\n nexusclient.packages().get('nexSys4').items\n .filter(item => item.type === 'group')\n .forEach(group => group.enabled = true);\n console.log('nexSys4 loaded: beginning startup');\n eventStream.registerEvent(\"nexsys4.system.loaded\", nexSysLoaded);\n });\n"}],"text":"ns load","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"ns config","enabled":true,"actions":[{"type":"script","enabled":true,"script":"//nexSys.evt.dispatchEvent(new CustomEvent('nexSys-config-dialog', {detail: true}))\nnexSys.api.ui.openConfig();"}],"text":"ns config","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true},{"type":"alias","name":"","enabled":true,"actions":[{"type":"script","enabled":true,"script":"nexusclient.send_commands(\"echo SystemEvent SystemOutputCompleteEvent\");"}],"text":"ns stuck","matching":"exact","whole_words":true,"case_sensitive":true,"prefix_suffix":true}],"description":"Khaseem's nexSys4 system for Nexus 3.0"}