From f3d2c96f363ddcbbc957157ca1e58dae796338a0 Mon Sep 17 00:00:00 2001 From: Zach Dziura Date: Thu, 4 Feb 2016 23:00:23 -0500 Subject: [PATCH] v1.0 Everything is now feature complete. It's done! --- Dreadnought/Dreadnought.xml | 916 +++++++++++++++++------------------- README.md | 17 +- docs/Combateer.md | 12 + docs/Empath.md | 12 + docs/Pilot.md | 48 ++ 5 files changed, 511 insertions(+), 494 deletions(-) diff --git a/Dreadnought/Dreadnought.xml b/Dreadnought/Dreadnought.xml index e024a38..6765daa 100644 --- a/Dreadnought/Dreadnought.xml +++ b/Dreadnought/Dreadnought.xml @@ -37,7 +37,7 @@ 1 - Aetherbalance + Module Balance 0 0 @@ -130,13 +130,18 @@ dreadnought.pilot.reset() +send("\n") + +if gmcp.Char.Skills.List.list[29] == "Purser" then + dreadnought.empath.flags.haveClarity = true +end 0 99 0 @@ -211,6 +216,8 @@ send("p turret") Turret Unlocked 0 @@ -234,6 +241,8 @@ send("config aethermap off") Collector Locked 0 @@ -257,6 +266,8 @@ send("config aethermap off") Collector Unlocked 0 @@ -307,17 +318,46 @@ send("config aethermap off") #000000 + + Siphon Callout + + 0 + 99 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + An energy vortex pulsates brightly. + + + 3 + + Aetherbeast Summoned - 0 0 @@ -338,18 +378,20 @@ end 1 - + Karibidean Summoned - 0 0 @@ -370,8 +412,15 @@ disableTrigger("Autopilot") Aetherbeast Enters - + 0 0 0 @@ -383,15 +432,17 @@ dreadnought.autopilot() #000000 #000000 - enters from the \w+ on the aetherways\.$ + ^(?:\w+\s){3}enters from the \w+ on the aetherways\.$ + ^A six-headed scyllus enters from the \w+ on the aetherways\.$ 1 + 1 Entering Shockwave - + 0 39 0 @@ -413,8 +464,15 @@ dreadnought.autopilot() Freed From Shockwave - + 0 0 0 @@ -436,15 +494,25 @@ dreadnought.autopilot() Aetherbeast Dies - +if dreadnought.aetherbeastsTotal == 0 then + dreadnought.pilot.flags.siphonCallout = true +end + +local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) + +if newPosition ~= 0 then + dreadnought.pilot.currentPosition = newPosition +end + 0 0 0 @@ -467,7 +535,14 @@ dreadnought.autopilot() Pilot Balance + +local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) + +if newPosition ~= 0 then + dreadnought.pilot.currentPosition = newPosition +end + 0 0 0 @@ -488,7 +563,7 @@ dreadnought.autopilot() Ship Move - + 0 0 0 @@ -506,45 +581,11 @@ dreadnought.autopilot() 1 - - Siphon Callout - - 0 - 99 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - An energy vortex pulsates brightly. - - - 3 - - Shockwave Timer 0 @@ -567,7 +608,9 @@ end)) Highlights +fg("green") +deselect() +resetFormat() 0 0 0 @@ -591,6 +634,26 @@ fg("green") 3 + + Gnome traders + + 0 + 39 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + glides off towards the (\w+)\.$ + + + 1 + + Empath @@ -621,7 +684,9 @@ elseif matches[2] == "turret" then table.insert(dreadnought.empath.modules.turrets, matches[3]) elseif matches[2] == "collector" then table.insert(dreadnought.empath.modules.collectors, matches[3]) -end +end + + 0 0 1 @@ -642,6 +707,7 @@ end Finish Setup 0 39 @@ -694,7 +760,7 @@ dmsg("The empathic grid is set up and ready for your control.") Damaged +dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands) 0 0 0 @@ -806,7 +872,7 @@ end End Damaged +dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands) 0 0 0 @@ -852,7 +918,7 @@ end Already Repaired +dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands) 0 0 0 @@ -1083,7 +1149,7 @@ end Aetherbeast Dead 0 0 @@ -1106,7 +1172,7 @@ end Grid Balance +dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands) 0 0 0 @@ -1140,7 +1206,7 @@ dreadnought.repairShip() #000000 - + Turret Setup 0 @@ -1181,7 +1247,10 @@ dreadnought.repairShip() Finish Setup - 0 0 @@ -1201,8 +1270,8 @@ disableTrigger("Turret Setup") - - Auto Target + + Targetting - Auto 0 99 @@ -1262,7 +1331,7 @@ dreadnought.fireTurret() - Callout Target + Targetting - Callout 0 99 @@ -1323,7 +1392,7 @@ dreadnought.fireTurret() Target Acquired - + 0 0 0 @@ -1346,7 +1415,7 @@ dreadnought.fireTurret() Vortex 0 @@ -1376,7 +1445,7 @@ end Targetted Vortex Vortex Fired - + 0 0 0 @@ -1421,7 +1490,7 @@ end Shockwave - 0 99 @@ -1443,7 +1512,7 @@ dreadnought.fireTurret() Targetted Shockwave 0 @@ -1465,7 +1534,7 @@ end Shockwave Fired - + 0 0 0 @@ -1490,7 +1559,7 @@ end Beast Dies 0 0 @@ -1511,7 +1580,7 @@ dreadnought.fireTurret() No Target - 0 0 @@ -1586,7 +1655,7 @@ dreadnought.fireTurret() Autosiphon - + 0 0 0 @@ -1606,30 +1675,9 @@ dreadnought.fireTurret() 3 - - Exhaustion - - 0 - 99 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - Exhaustion clouds your mind and you fail to properly link to an energy collector. - - - 3 - - Aetherbeast Summoned - 0 0 @@ -1654,9 +1702,9 @@ disableTrigger("Autosiphon") Aetherbeast Dies - 0 @@ -1677,7 +1725,7 @@ end - + Siphoning - Callout 0 @@ -1694,7 +1742,7 @@ end Callout Siphon - + 0 39 0 @@ -1712,27 +1760,6 @@ end 1 - - Exhaustion - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - Exhaustion clouds your mind and you fail to properly link to an energy collector. - - - 3 - - Announcements @@ -1751,7 +1778,7 @@ send("siphon vortex") Siphoning Vortex - + 0 99 0 @@ -1771,7 +1798,7 @@ send("siphon vortex") No Vortex - + 0 3 0 @@ -1791,7 +1818,7 @@ send("siphon vortex") Full Collector - 0 @@ -1811,6 +1838,27 @@ disableTrigger("Siphoning - Callout") 3 + + Exhaustion + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + Exhaustion clouds your mind and you fail to properly link to an energy collector. + + + 3 + + @@ -1831,8 +1879,8 @@ disableTrigger("Siphoning - Callout") Turret On 0 99 @@ -1854,8 +1902,8 @@ end Turret Off 0 0 @@ -1878,8 +1926,7 @@ end Collector On Targetted 0 99 @@ -1902,8 +1949,7 @@ end Collector Off Targetted 0 0 @@ -1925,8 +1971,7 @@ end Collector On +tempTimer(0.1, [[send("shipt Aye aye, Captain! Activating my collector")]]) 0 0 0 @@ -1947,8 +1992,7 @@ send("config shipsight 1") Collector Off +tempTimer(0.1, [[send("shipt Aye aye, Captain! Deactivating my collector")]]) 0 39 0 @@ -1981,27 +2025,7 @@ send("config shipsight 1") #000000 #000000 - implodes and your body is instantly torn apart by the unstable reality of theAetherways\.$ - - - 1 - - - - Gnome traders - - 0 - 39 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - glides off towards the (\w+)\.$ + implodes and your body is instantly torn apart by the unstable reality of the Aetherways\.$ 1 @@ -2098,6 +2122,7 @@ disableTrigger("Siphon Callout") enableTrigger("Autopilot") send("config shipsight 1") send("config aethermap 0") + dreadnought.aetherbeastsTotal = 0 dmsg("Autopilot activated.") else @@ -2115,12 +2140,12 @@ end Toggle Siphon Callout @@ -2132,18 +2157,20 @@ end Pathing Reset @@ -2282,6 +2310,55 @@ end ^pce$ + + Target Callout + + + + ^ptar (\w+)$ + + + Autopilot Testing + + + + ^ptest path (1|2|3)$ + Empath @@ -2289,22 +2366,6 @@ end - - Grid Setup - - - - ^gsetup$ - Grid Modules @@ -2315,17 +2376,15 @@ send("grid modules") Grid Repair - ^gr(?:\s?(\w+))?$ + ^gr(?: (reset))?$ Slivven Check @@ -2337,11 +2396,26 @@ send("grid modules") Clarity - + ^gc$ + + Reset + + + + ^greset(?: (confirm))?$ + Combateer @@ -2350,35 +2424,26 @@ send("grid modules") - Enable/Disable Turret - - - - ^t(on|off)$ - - - Target Gathering Mode + Targetting Mode - ^tmode (call|auto)$ + ^tmode (call|auto|off)$ - Targetting + Set Target - - Siphoning Enable Toggle - - - - ^s(on|off)$ - Siphoning Mode - - ^smode (auto|call)$ + ^smode (call|auto|off)$ @@ -2541,9 +2600,13 @@ disableTrigger("Empath") disableAlias("Empath") disableTrigger("Gunner") +disableTrigger("Targetting - Auto") +disableTrigger("Targetting - Callout") disableAlias("Gunner") disableTrigger("Collector") +disableTrigger("Siphoning - Auto") +disableTrigger("Siphoning - Callout") disableAlias("Collector") dmsg("All Dreadnought reflexes have been disabled.") @@ -2560,126 +2623,139 @@ dmsg("All Dreadnought reflexes have been disabled.") Pilot - +} + +function dreadnought.reset.pilot() + dreadnought.aetherbeastsTotal = 0 + dreadnought.pilot.calloutTimer = 0 + dreadnought.pilot.aetherbeastsPresent = 0 + dreadnought.pilot.currentPosition = 1 + dreadnought.pilot.flags = { + shocked = false, + siphonCallout = false + } + + dreadnought.pilot.paths = {} +end + + + Empath - @@ -2720,24 +2811,19 @@ end Combateer - - Data Structures - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md index 511a8ab..8b0c8db 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ Dreadnought =========== -An automated aetherhunting system for the Mudlet MUD client, specifically for the game Lusternia. +An automated aetherhunting system for Lusternia, written in Lua for the Mudlet client. -Synopsis --------- - -Dreadnought is a spiritual successor to the popular Windmills aetherhunting system, seeking to be as compatible as possible (while only breaking compatibility when necessary). As much as possible, Dreadnought tries to automate automate tasks in such a way as not to require someone calling out for commands. - -Installing +Installation ---------- -Download the latest Release ZIP file and install it through Mudlet's Package window. Unzip it, then navigate to the top-level of the repository. Zip up the included `Dreadnought` directory, then install that ZIP file through Mudlet's Package window. +1. Download the latest release and extract it somewhere in your computer. +2. Within the project's root directory, create a ZIP archive of the included `Dreadnought` directory. +3. Open Mudlet and import the newly created ZIP archive using the built-in package manager. Updating -------- -Unfortunately, because Mudlet doesn't make updating packages easy, you'll have to uninstall the previous version of Dreadnought before installing the updated version. +1. Open up Mudlet's Package Manager. +2. Select the `Dreadnought` package and click Uninstall. +3. See the above Installation instructions. Documentation ------------- diff --git a/docs/Combateer.md b/docs/Combateer.md index e69de29..ed350ca 100644 --- a/docs/Combateer.md +++ b/docs/Combateer.md @@ -0,0 +1,12 @@ +Combateer +========= + +The combateer has two different modes: callout and auto, with the difference being how the system acquires targets. In callout mode, the Captain will automatically call out the target and the system will pick it up. Auto mode, on the other hand, will automatically acquire and fire upon targets. + +It's important to note that the combateer system will automatically target karibideans when they arrive. + +Commands +-------- + +- `tmode ` - Toggles the current targetting mode, or turns targetting off completely. +- `ttar ` - Manually target an aetherbeast. \ No newline at end of file diff --git a/docs/Empath.md b/docs/Empath.md index e69de29..cc38844 100644 --- a/docs/Empath.md +++ b/docs/Empath.md @@ -0,0 +1,12 @@ +Empath +====== + +Much of the magic behind the empathing system takes place automatically, without any intervention needed from the user. However, the core functionality is still accessible through user commands. + +Commands +-------- + + - `gm` - Sends the `grid modules` command, which is set up to automatically assess the current damage done to each module. + - `gr [reset]` - If for whatever reason the repairing process stops, this will restart it. Also, should you give the optional `reset` option, the repairing queue will be cleared. + - `gsliv` - Will check for any slivven infecting the ship and announce their presence upon the ship's aether. + - `gc` - Will clarity the command chair at the next available opportunity. \ No newline at end of file diff --git a/docs/Pilot.md b/docs/Pilot.md index e69de29..e4c6890 100644 --- a/docs/Pilot.md +++ b/docs/Pilot.md @@ -0,0 +1,48 @@ +Pilot +===== + +The signature feature of Dreadnought's piloting capabilities is its autopilot system, which allows the user to create a custom path for the aethership to follow. No longer are you required to place shockwaves East and Northeast of the Vortex; you can put them anywhere, and the autopilot will be able to handle it! + +Commands +-------- + + - `pauto ` - Toggles the autopilot on and off + - `pcall ` - Toggles siphon callout on or off. If enabled, the pilot will call out to siphon when sailing over a vortex. + - `ppath ` - Creates the path that the autopilot will follow when hunting. + +Pathing +------- + +While it can be a bit confusing to think about at first, the autopilot's pathing command is fairly easy to understand. Say you have your shockwaves arranged in the following fashion: + +``` + [*] + / | +[O] - [*] +``` + +where the 'O' is the vortex and the *'s are the shockwaves. Each tile has its own position number: the vortex is ALWAYS Position 1, followed by the first shockwave being Position 2 (in this case, the northeast shockwave), and Position 3 is the east shockwave. When summoning aetherbeasts, you want to travel northeast to Position 2, then south to Position 3. Thus, type the following command: `ppath ne s w`. The pathing system will automatically figure out how to travel back-and-forth between Positions 2 and 3, with the final direction entered being how to get back to Position 1 from Position 3. + +Movement +-------- + +Steering is as simple as entering `n`, `ne`, etc, just as you normally do when walking. Gliding is that same directional command, just repeated. So to glide north you would enter `nn`, northeast would be `nene`, etc. + +If you ever manually steer the ship, autopilot will automatically be disabled. This is helpful should you ever need to escape from an enemy ship or aetherbeat. + +Clarity +------- + +`pc` to call out for a Clarity, `pce` to call out for an Emergency Clarity. + +What's the difference? Functionally, nothing. A clarity's a clarity! But how it's placed in the Empath's queue is an entirely different story. An Emergency Clarity should only be for that: an emergency. If you're stuck and have to get away, etc. Otherwise, a regular clarity will do just fine! + +Calling Targets +--------------- + +Sometimes you want to call out to your Combateers that there's a rogue aetherbeast flying around that needs to die. Easy! `ptar `, and you'll announce on the ship's aether to target whichever beast you called out for. + +Other Commands +-------------- + +All of the relevant commands can be found within the `Aliases` section of the scripting interface. There are too many to list here, so you'll have to figure the rest of them out for yourself! \ No newline at end of file