Defense System

I've been working on a defense database and system for putting up and maintaining defenses. Goal is to get every defense in the game, but... there are a lot of them. The database itself, while quite large, is  straightforward and easy to update. As a couple examples:
shadowdancegarb = {
	active = false, 
	auto = false, 
	req = {"eq","bal"},
	use = {"eq"},
	skill = "Night",
	cmd = "shadowdance garb"
	},
insomnia = {
	active = false, 
	auto = true, 
	req = nil,
	use = nil,
	skill = "none",
	cmd = "insomnia"
	},
frost = {
	active = false, 
	auto = true, 
	req = {"slushbalance"},
	use = {"slushbalance"},
	skill = "none",
	cmd = "sip frost"
	},
beauty = {	
	active = false, 
	auto = true, 
	req = {"eq","bal"},
	use = {"charge"},
	skill = "none",
	cmd = "rub beauty"
	},
Active indicates whether the defense is up or not, auto is whether or not upkeep should happen automatically, and the rest mean exactly what they sound like. I use one command (defup) to cycle through every defense in the database, with the inactive ones that I can set up currently sent one at a time to the stratagem combat queue. If I forget class and don't have the skill Night (active) anymore, then shadowdance garb wouldn't be added. Defenses that take slushbalance are sent to their own queue, to wait until slushbalance returns. Defenses that take eq will wait till it returns. Defenses that use a "charge", like beauty, are handled in a function that checks for skills that duplicate enchantment defenses (like cosmic waterwalk, elementalism levitate, etc), uses those if available, and uses+recharges from a cube if you have one for all other enchantments.

It should work well for anyone, including the Shaddus-types with multiple alts, or the Aramel-types with multiple classes. Only minor issue currently is that it sets up -every- defense, including those that one might not want to, like truehearing (though it won't automatically update unless truedeaf.auto is set to true). It's an easy fix, I'm just lazy.

Suggestions/comments/questions/praise welcome. If anyone's interested in owning this thing, I could put it in a pretty zipped package. If anyone wants to help, I'm looking for defenses in most classes (ideally in the same format as above), especially the 'advanced' skillsets like Transmology or Harmonics. A lot of it I can figure out, just not whether they take/use eq or bal.

Comments

  • edited July 2019
    Update: Added many defenses(with trigger lines) for things like origami, teas, genies, wonderitems, missing enchantments, tarot, and others. Added an "initial" condition to avoid setting that pesky truehearing, and to be able to track defenses that are not usually set up immediately (attunement, kirigami, temporary/conditional class defenses). Ex:
    autumn = {
    	active = false,
    	auto = false,	
    	req = {"eq","bal"},
    	use = {"eq"},
    	skill = "Lowmagic",
    	initial = false,
    	cmd = "invoke autumn"
    	},
    Missing any defenses in:
    -Harmonics, Celestialism, Transmology, Dramaturgy, Aquamancy, Aquachematics, Geomancy, 
    Geochemantics, Pyromancy, Pyrochemantics, Harmony, Tracking, Druidry, Wildewood, 
    Wyrdenwood, Telekinesis, Telepathy, Paradigmatics, Sacraments, Shamanism, Crow
    Problems:

    -Power is not accounted for. I never added defenses like hexaura or faeconverge for this reason, and for wiccans, at least, there's a huge power cost for setting up defenses. For some defenses, I may add a power use condition and check for current power.

    -Artifact/Curio skills are labeled as skill = "Artifact", but not currently checked for. I might include a skill = "Bashing"/"Influencing" for some defenses to set up things like kirigami/wetfold.

    -The database isn't alphabetized, and it really ought to be.


  • edited July 2019
    Update: Changed 'initial' to be a list, with elements like "combat", "hunting", "all". All means basic defenses that should be up... well, always. Defup alias by itself assumes that the basic defenses are wanted, but arguments like 'combat' and 'hunting' and 'special' could also be passed in. And the database is now alphabetized, which led to me deleting three duplicates, woo! Also removed the game messages and replaced them with a simpler 'You have gained X defense"(highlighted green) and "You have lost X defense"(highlighted red.) 

    Working on adding Celestialism, Sacraments, Druidry(which I think have none), Runes, and Shamanism. 

    So... just want to add, the reason I'm doing this is because I think one of the hardest parts of learning combat is knowing what defenses one should have up at what times, especially when there are so many of them. And also tracking which are lost and how to set them back up again. My goal was to develop a system simple enough for anyone, regardless of knowledge, but powerful and easily customizable. 

    Also, wanting to explain how it works and what the database looks like because sharing code is a good way to get ideas to expand on it. A friend showed me his database setup for defenses, which, while maybe not more efficient than mine, was easier to customize. So I "stole" it and modified it to try and make it better - which is the same as I'd hope anyone might do with this, too. 
  • edited January 2020
    So hey! It's been a while. Added a display for defenses, this is currently what it looks like when I do 'def': https://ada-young.com/pastebin/s3F1qHSH

    It displays all defenses in the database possible for your class/current skills. It won't display skills that are disabled, which is a feature I added mostly to stop reminding myself that I don't have genies. It can also be used to ignore defenses you don't currently have the skillrank for. Also added 'pow' to track how much power it takes to use a defense. Database is now:

    ablution = {
    	active = false, 
    	auto = false, 
    	pow = 2,
    	enabled = true,
    	req = {"eq","bal"},
    	use = {"eq"},
    	skill = "Sacraments",
    	initial = "combat",
    	cmd = "starchant ablution"
    	},
    Active is always initially false, and changes to true when the defense is set. Auto is whether it is maintained(which as set is never defenses that take eq or bal).
    Initial is 'all' if the defense is not on a timer, doesn't use consumables(tarot cards, runes, power, etc), and can be repeated without restriction. Otherwise it's combat, hunting, influencing, drink(for handling beers and teas), or special(for defenses that are never set automatically, like autumn).

    Completed adding Sacraments, Celestialism, Healing, and Psionics/Psychometabolism(I hadn't before because psionics requires special instructions). Still missing defenses from shamanism, a handful of temporary defenses, and possibly a scattered few from other classes. If anyone from Celest wants to tell me the message for setting/losing Holybeing, that'd be super nice. 
  • Raising Holy Being:
    You bow your head and begin to chant a prayer to the Holy Supernals, beseeching them to imbue your
    mortal soul with the radiance of the Light. An indescribable warmth and comfort envelops you as your
    senses suddenly expand, golden motes of light racing down your skin as you open your eyes, gazing
    out upon the world with a renewed and sacrosanct presence.

    Holy Being Fading:
    An overwhelming sorrow wells within you as the currents of celestial light fade away, though the
    loving memory of Celestia's full glory remains within your heart and mind.
  • Auriella said:
    Raising Holy Being:
    You bow your head and begin to chant a prayer to the Holy Supernals, beseeching them to imbue your
    mortal soul with the radiance of the Light. An indescribable warmth and comfort envelops you as your
    senses suddenly expand, golden motes of light racing down your skin as you open your eyes, gazing
    out upon the world with a renewed and sacrosanct presence.

    Holy Being Fading:
    An overwhelming sorrow wells within you as the currents of celestial light fade away, though the
    loving memory of Celestia's full glory remains within your heart and mind.
    Thank you!
  • edited February 2020
    @Kaiel

    Added all of transmology including messages, which was maddening and nearly broke me. Also some elementalism skills that were missed, along with random ones from stag, crow, and moon, and a handful of others. Some of the power-using skills(or those that have special requirements) don't have messages but nearly all are in the database. For some reason I never added serpent. Added astrology and the messages. Didn't add shamanism cause the defenses are very particular, there's a lot of them, and I'm not very familiar with it.

    Otherwise, it should automatically sort skills currently known into a table, and set up as many defenses as are practical with commands 'defup', 'defup combat', defup hunting', and 'defup influencing.' Practical meaning: 1 It's not a time limit 2 It's not room/time based 3 It doesn't lock psi channels or have a similar restriction on use. It won't work with mmf but only needs stratagem in combat to work.

    If anyone wants it, I can try to arrange to share the file through discord somehow. Attaching the zip file doesn't seem to work well for forums.
  • @Nyana
    Is the defence system still about. If so how would I get a copy ?
  • Looks pretty neat. 
  • @Meeb link is available now.

    Hello Lusternian people. The defense system mentioned here is now publicly available at the following link. I have tested it a fair amount, along with a couple other people - but it is very large and covers nearly every possible defense. If you notice any bugs, or any defenses that are missing from the database, please let me know. Ideally through forum message or discord. 

    I have plans to update it and make improvements. If you have any suggestions, I'd also appreciate them. However, over the next three weeks, I have finals and several major projects. I can promise to respond to requests for updates/bug fixes by around December 10th. Before then, I will try to address questions or anything major that may come up. 

    https://github.com/lauraW522/defenses
  • Nyana said:
    @Meeb link is available now.

    Hello Lusternian people. The defense system mentioned here is now publicly available at the following link. I have tested it a fair amount, along with a couple other people - but it is very large and covers nearly every possible defense. If you notice any bugs, or any defenses that are missing from the database, please let me know. Ideally through forum message or discord. 

    I have plans to update it and make improvements. If you have any suggestions, I'd also appreciate them. However, over the next three weeks, I have finals and several major projects. I can promise to respond to requests for updates/bug fixes by around December 10th. Before then, I will try to address questions or anything major that may come up. 

    https://github.com/lauraW522/defenses
    Hey. I really love this system and currently use it. I'd also like to see it available for MUSH as well. If someone wanted to convert this (with Nyana's permission) or write a similar all class def system I'd be willing to give you 250 credits.
  • edited December 2020
    heya! really love this script, would love to help you, or help me input Nunchaku defences in? it recognises i have acrobatics but not zarakido, would love to chat about how to add them in to the system or a class section of defences?

    edit: also had to change the alias defence commands to ^defcommands$ in order for that to work, it just kept showing my curent defences otherwise
  • edited February 2021
    Hello!
    This defense system is great. Is there any way to convert the "def" output into something clickable (like m&mf) that can toggle the defense for defup or keepup?
Sign In or Register to comment.