Re-Designing Mantis - Need your inputs!

Post Reply
User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re-Designing Mantis - Need your inputs!

Post by Jules »

I'm FINALLY re-designing the scripts that go behind Mantis, as they were, well, quite frankly, poorly done in the first place. Taking a page from Treant's book, I'm starting off by condensing all of the curing queues into one list. So far, I have the functions to add and remove afflictions, plus a long list of every affliction, and the messages to cure them.

Because Mantis is Open-Source, I'm going to post quite frequently any updates that I have here, while any final releases will be posted up onto the Website and to Launchpad.

I'll start off with everything that I have now. I don't have a set curing priorities list, which lists the priorities of afflictions to be queued, but that's easily pulled from the Treant files, and I might just go ahead and copy how Iasmos did it with PHP-style lists, but that can be debated later.

Here is the GIANT list of cures that I have so far:

http://pastebin.com/f5295a6f3

In them, there's the sending cure messages that will be sent to the MUD when the affliction is found, plus the associated balances. Each balance is prioritised, so if first priority is being used, it'll go to the second, and so on and so forth. The balances are prioritised via a small script:

Code: Select all

mantisBalancePriorities = {"salve", "herb", "pipe", "balance", "focus"}
What I would like to happen when an affliction is found is this:
  • Affliction is added to queue.
  • System checks the affliction's priority.
  • Checks for what balances are used to cure the affliction.
  • Checks if the prioritised balance is on or off.
  • If on, sends associated cure. If off, goes to next balance, and tries again.
  • When cure message is recognised via a trigger, affliction is removed from the list.
Please, if you have any suggestions to what I have posted now, or if you have any ideas of your own on anything else with Mantis, please say so here. I'd prefer if any ideas that you may have with Mantis only be about the curing structure for right now. If you have any ideas for external modules, please email me, PM me, talk to me in-game, or submit an idea on Launchpad. Thank you!

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: Re-Designing Mantis - Need your inputs!

Post by Jules »

Well, I believe I have hit a point now where I believe the curing scripts behind Mantis are complete! I have not yet tested them for effectiveness, but before I go ahead and release Beta Release 5.0, I'm going to release what I have right now for you coding masters to look over!

I shall post up everything based upon the order found in the actual curing prompt, starting with the curing prompt!

http://pastebin.com/f4feae738

Firstly, the code scans over the priority list of curing balances, listed off as:

Code: Select all

mantisBalancePriorities = {"Purgative", "Salve", "Herb", "Balance", "Focus"}
Then, based on what's active, searches the appropriate table found in the Affliction Priorities group:

http://pastebin.com/f303c6362

And if the appropriate balance is active, based on this list:

http://pastebin.com/f1fb0866e

the cure will be cast!

I realize that this curing order might be a little out of order, which is fine, but the main goal is to update everyone on what I have so far. Thank you very much for looking everything over, and I look forward to your feedback!

PS: Everything that's pastebin'd is now going to last forever, so there shouldn't be any problems opening the links.

Post Reply