StDoodle's Macrobutton Combat

StDoodle

Minion
StDoodle's Macrobutton Combat v0.3d
StDoodle's Fight Logic v0.2d
Requires KoLmafia r9040

This is an experimental, early-alpha release of my macro-button combat suite. "StDoodle's Macrobutton Combat" is a fight.php override. "StDoodle's Fight Logic" is a library of combat functions, designed to be useful when called in or out of combat (in special circumstances which do not yet exist).

Requirements

Requires both zlib.ash and std_lib.ash to operate.

Warning!


This is for testing the fight page compactification only! The combat macro part is barely started!

As of now, macro buttons will do what they say they'll do in the mouseovers, but those actions do not take into account the checkboxes yet. The current macro buttons are sparse and rough. The main test for now is that the condensing of previous rounds takes place as expected. What should happen:

* If the fight is not yet over, the current round's text should be displayed as normal.
* All previous rounds should be hidden by default, under a toggle button.
* If a macro has been executed that doesn't finish the combat, "previous rounds" is counted as all but the last action
* When the fight is over, all rounds are hidden; end-of-fight text is displayed (end message, stat / meat / item gains).

Installation

Quite a few files are included here; in addition to "std_fightLogic.ash" and "fight.ash" there is a javascript file named "std_Fight.js" and a cascading style sheet file named "std_Fight.css"; except for "std_fightLogic.ash", all of these files need to be in the top level of your "relay" directory. For convenience -- as well as the fact that we can't upload js or css files directly on these forums -- all of the files that need to be in the top level of "relay" are in a .zip file together. "std_fightLogic.ash" can go pretty much anywhere ("scripts" directory, "relay" directory, and subdirectory of either).

The file "std_CombatStrategies.txt" is a temporary data file (must go in data directory) that will eventually be replaced by the same data file used in zarqon's scripts.

If you want to get full bug-reporting, set your zlib verbosity setting to 10 or higher. You'll get some extra data files as well; enjoy!

Also! The fight script is currently only set up to act as a fight.php relay override. This means you need to have "Enable user-scripted relay browser overrides" checked under General -> Preferences -> Browser for anything to happen.
 

Attachments

  • std_fightLogic.ash
    25.8 KB · Views: 76
  • relay.zip
    6.2 KB · Views: 68
  • std_CombatStrategies.txt
    1.5 KB · Views: 129
Last edited:

Bale

Minion
One guess where the stuff in the scripts directory should go. ;)

Also in the relay directory? The data directory? No, seriously. Is there a reason to run those from the scripts menu? Mafia auto-detects imported scripts in the data and relay directory, so they'd just be cluttering my script menu unless I need to run them directly.

Or am I incorrect about not running them from the script directory and CLI, I'm afraid I'm not quite sure what all those scripts are for. Could I have a short description of exactly what this does? There's a lot of code just for me to wade through in order to figure out the purpose of this script.
 
Last edited:

StDoodle

Minion
Ah, sorry, was hoping to come back and flesh out the first post a bit more a while ago, but I got busy. Right now, this is a super-pre-alpha release to test out some of the text formatting. But for feedback and such from the couple of guinea-pigs... er.... volunteers.... I wanted to get the thread up.

I didn't realize that the relay / scripts thing worked both ways. I know that actual overrides have to be in /relay, but beyond that... Anyway, the design of these scripts is such that they'll eventually be usable for speculative combat info outside of combat, and they're broken up according to when they're used. Also, the .js and .css files pretty much need to be separate to maintain my sanity... coding them with ash is not fun.
 

icon315

Member
Can't wait to see it :D

Edit: Getting the error
Code:
Unknown variable 'scr_ver' (fight.ash, line 407)
I can't find your version variable anywhere

Edit 2: Ok added the variable. Looks cool. :D /me needs to make some macros
 
Last edited:
Top