New Content - Implemented Your Cowboy Boots need more support

Bale

Minion
KoLmafia is now handling your cowboy boots in the maximizer which is awesome, but there's still some more work to do for mafia to fully support it. While the LT&T thread is going strong, this one part of the LT&T Office is important and interesting enough to be worthy of its own thread to discuss it.

Desired features:
* Scripts should be able to recognize its current modifiers with numeric_modifier() and string_modifier().
* Add it to the Customizable tab of the Gear Changer.

Questions:
* Should it have its own command to change customization from a script, or be assigned two slots for equipping?
 

lostcalpolydude

Developer
Staff member
How do you currently get modifiers for over-the-shoulder Folder Holder? I would expect this to work the same way (with two new equipment slots), but I don't see how to get those modifiers in a script.
 

Bale

Minion
I'd do what Darzil suggested. Check modifiers on $slots[folder1, folder2, folder3, folder4, folder5]

Code:
> ashq foreach s in $slots[folder1, folder2, folder3, folder4, folder5] print(string_modifier(equipped_item(s), "Evaluated Modifiers"))

Damage Reduction: 15, HP Regen Min: 10, HP Regen Max: 20, MP Regen Min: 10, MP Regen Max: 20
Combat Rate: -5
Monster Level: +25
 

lostcalpolydude

Developer
Staff member
This is added in 16779. It isn't quite finished, though. When I use the maximizer (and exclude some better things to get meaningful results), mafia suggests replacing boots with a CARNIVORE button for a -5 bonus to monster level (with +ML skin on the boots). So it knows that CARNIVORE is worse but suggests it anyway.

If anything else isn't working properly, make sure to point it out.
 

Bale

Minion
Okay... now I have the following...

PHP:
float super_numeric_modifier(item it, string mod) {
	switch(it) {
	case $item[your cowboy boots]:
		return equipped_item($slot[bootskin]).numeric_modifier(mod)
			+ equipped_item($slot[bootspur]).numeric_modifier(mod);
	case $item[over-the-shoulder Folder Holder]:
		float modtot;
		foreach sl in $slots[folder1, folder2, folder3, folder4, folder5]
			modtot += equipped_item(sl).numeric_modifier(mod);
		return modtot;
	}
	return numeric_modifier(it, mod);
}

What is the thinking about having numeric_modifier() of an item that has slots contain the value of those slots? Rather than require a function like that to know an item's modifiers.
 
Not sure if this is the right place, but it's an open new content thread, so:

Been seeing some of these recently:
Code:
Kicking Staginald the Machine Elf out of the bjorn...
Carrying Gottlieb Umweltverschmutzung the Grim Brother in the Bjorn Buddy...
Unexpected error, debug log printed.

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v17.2 r16789, Windows 10, Java 1.8.0_73
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Mar 15 01:38:11 AKDT 2016
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.request.EquipmentRequest.initializeBootData(EquipmentRequest.java:522)
	at net.sourceforge.kolmafia.request.EquipmentRequest.<init>(EquipmentRequest.java:305)
	at net.sourceforge.kolmafia.swingui.GearChangeFrame.customizeItems(GearChangeFrame.java:771)
	at net.sourceforge.kolmafia.swingui.GearChangeFrame.access$1900(GearChangeFrame.java:102)
	at net.sourceforge.kolmafia.swingui.GearChangeFrame$CustomizablePanel.actionConfirmed(GearChangeFrame.java:688)
	at net.sourceforge.kolmafia.swingui.panel.GenericPanel$ConfirmedListener.execute(GenericPanel.java:627)
	at net.sourceforge.kolmafia.swingui.listener.ThreadedListener.run(ThreadedListener.java:239)
	at net.sourceforge.kolmafia.RequestThread$SequencedRunnable.run(RequestThread.java:418)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

I have boots without skins or spurs, not equipped. I'm assuming I'm seeing this when switching Bjorn familiar because they're both on the customizable pane - ?
 

lostcalpolydude

Developer
Staff member
I think the NPE is fixed in 16793. Let me know if it isn't, with a new debug log if it isn't the same.

I fixed the maximizer issue.

There's some semi-duplicated code between GearChangeFrame and KoLCharacter that I would like to simplify possibly, but that won't be a visible change.
 
Top