New Content - Implemented Folder Holder: August's back to school IotM!

heeheehee

Developer
Staff member
The attached patch handles parsing folders from api.php, adding their modifiers to the character, adds special handling to the maximizer, and exposes the new equipment slots (folder1-folder5) to ASH. It's fairly preliminary. Work that definitely still could be done: add a CLI command for refilling the folder holder, parse the

For the most part, this mirrors the stickers implementation. I feel like it would make more sense to dynamically update the modifiers on the item so that the Maximizer uses those values; this would also allow us to remove the special handling in the Maximizer for stickers (as well as what I just added for folders).
 

Attachments

  • folder.patch
    14.8 KB · Views: 27
Last edited:

Veracity

Developer
Staff member
Not to mention adding a second tab on the Gear Changer to configure stickers, folders, the card sleeve, and the Crown of Thrones.

One hat, one weapon, one off-hand, and one accessory. Huh. :)
 

heeheehee

Developer
Staff member
Not to mention adding a second tab on the Gear Changer to configure stickers, folders, the card sleeve, and the Crown of Thrones.

One hat, one weapon, one off-hand, and one accessory. Huh. :)

That actually sounds like a really good idea.
 

lostcalpolydude

Developer
Staff member
My patch so far updates folder state from all possible methods (using a folder, updating from within the folder holder manager, and api.php checking), currently sitting in FolderHolderManager (though FolderHolderRequest might be better for allowing ASH/CLI interaction with this item). I hadn't looked at modifiers yet (or any part of doing something with folder state), but I also want the maximizer to suggest the folder holder when applicable.
 

Veracity

Developer
Staff member
The same. You can have tabs within tabs. For example:

Look at the main GUI frame
At the top, there is a row of tabs: Adventure, Graphical CLI, ... whatever frames you have configured as tabs
Select the Adventure tab - which selects the AdventureFrame
At the top, there is a panel with the location selector, goals, buttons, etc.
At the bottom is another tabbed panel: Overview, Choice Advs, HP/MP Usage, Mood Setup, Custom Combat
Select the Choice Advs tab
At the left, there are two tabs: Item and Zone

That right there is a tabbed panel within a tabbed panel.

I don't know if it took special code to put the tabs on the left or if it automatically happened because it was a tabbed panel within a tabbed panel. Either way, we could do something similar with the Gear Changer: put the tabs on the left, either always, or only if the Gear Changer is a tab itself.
 

Joesus

New member
over-the-shoulder Folder Holder not being counted towards +ML

Using the Jackass Plumber folder in an over-the-shoulder Folder Holder isn't properly being accounted for when calculating the Monster Level Adjustment (via getMonsterLevelAdjustment() within the source code). Tried to trace it through to see what the issue might be, but didn't see anything that stuck out. My best guess would be that the folder isn't equipped in the first slot in the holder (I have it in the 3rd slot), but I haven't the slightest clue where to look otherwise.

I'm currently using the latest (prebuilt) hourly build, but it has been an issue since the Folder Holders were first introduced.
 

Veracity

Developer
Staff member
Revision 12816 splits the Gear Changer into two tabs: Equipment and Customizable. Stickers moved to the second tab. Crown of Thrones, Card Sleeve, and Fake Hands also appear there, but are disabled, since there is no code yet to actually manipulate them via EquipmentRequest or the Gear Changer or whatever, yet. I'll get to that, by and by - once KoL comes back up. :;

Obviously, this is where you will want to insert Folder 1 - 5.

I expect I interfered, slightly, with your in-progress implementation of the Folder Holder, since I added pseudo-equipment slots for the crown of thrones and card sleeve. Sorry! But, I expect it will be easy to merge and update, and, hopefully the second tab will be easy for you to add to.
 

Veracity

Developer
Staff member
OK, I did the next phase of this: there are now 5 pseudo slots for folders, we fill those in from api.php, they show up on the Gear Changer. We still need to actually have code to discard and add folders to specific slots (EquipmentRequest via, we assume, choice.php or whatever the interface is), to make equipment lists with available folders to turn into dropdowns in the Gear Changer, and code to validate that you are making a valid selection of folders - you can have at most one of each kind of folder, unlike stickers, for example.

Do you want to finish this, lost? I'm in an HC BIG! run - and I have two more to do after I finish this one (so I can finish The Sea) before I try KOLHS - so I can only look at my folder holder in aftercore.
 

slyz

Developer
I added the folderX slot names to EquipmentRequest because I was getting ArrayIndexOutOfBoundsException errors from net.sourceforge.kolmafia.maximizer.Maximizer.emitSlot(Maximizer.java:786).

That made them available in ASH, but I don't think it's a drawback. I hope I didn't jump the gun too much.
 

Veracity

Developer
Staff member
Thanks. That was an unintentional oversight.

> ash equipped_item( $slot[ folder1 ] )

Returned: folder (owl)
Which is accurate, even though my folder holder is in storage and EquipmentRequest is not set up to manipulate folders, yet. :)
 
Last edited:

Winterbay

Active member
So I tried using the new tab on the equipment changer to add a new folder to mine and got the following in the CLI:
Code:
Putting on folder (Stinky Trash Kid)...
[COLOR=red]Server      returned response code 404 for bogus.php[/COLOR]
Equipment changed.

I laughed, thanks :)
 

lostcalpolydude

Developer
Staff member
I'm surprised mafia didn't completely ignore your attempt. I haven't figured out how to work with that code yet, and mafia certainly has no idea how to change folders.
 

Winterbay

Active member
No, it didn't do anything. I just found the inclusion of a bogus.php-URL to be more amusing than it probably should be :)
 
Top