Feature - Implemented Spring 2017 Challenge: Gelatinous Noob!

Probably slightly more complex than that, as each string can be more than one Modifier (such as MP Regeneration).

It is starting to look like we may be missing some functions which would make this more straightforward.

Completed in r17848
 
Also one thing is bugging me. How do we force a refresh of Mafia CompactSidePane after absorbing an item ?
Trigger an event that the CompactSidePane is listening for.

For example, calling KoLCharacter.updateStatus() will update all "CharacterListeners" as well as anything which is listening for "(character)". GenericFrame does this:

Code:
	public void addCompactPane()
	{
		if ( this.sidepane != null )
		{
			return;
		}

		this.sidepane = new CompactSidePane();
		this.sidepane.run();

		this.refreshListener = new CharacterListener( this.sidepane );
		CharacterListenerRegistry.addCharacterListener( this.refreshListener );

		this.sidepane.setBackground( KoLGUIConstants.ENABLED_COLOR );
		this.framePanel.add( this.sidepane, BorderLayout.WEST );
	}
So, any GenericFrame with a sidepane has a CompactSidePane which is a CharacterListener.

Alternatively, you can do what I've started doing there: if a particular widget in the CompactSidePane wants to be notified when a particular thing happens, make that widget implement Listener, register a NamedListener for "the thing I am interested in", give it an update() method which executes when that event is triggered, and trigger the event as appropriate.

See FamiliarLabel for an example.

I assume you want this code to run when you absorb something:

Code:
			else if ( KoLCharacter.inNoobcore() )
			{
				limit = KoLCharacter.getAbsorbsLimit();
				this.statusLabel[ count ].setText( "   Abs: " );
				this.statusValueLabel[ count ].setText( KoLCharacter.getAbsorbs() + " / " + limit );
				count++;
			}
Probably simplest to just call KoLCharacter.updateStatus() whenever KoLCharacter.getAbsorbsLimit() or KoLCharacter.getAbsorbs() would change.
 
Last edited:
Yeah, think I'll do the update status thing. It was mainly updating other stats (modifiers etc) which was bugging me.

Thanks
 
You might want to do this:

Code:
		KoLCharacter.recalculateAdjustments();
		KoLCharacter.updateStatus();
The first one calculates and sets KoLCharacter.currentModifiers.
The second one triggers the CompactSidePane update.
 
I'm sure I read somewhere that you could absorb non-Standard items from inventory, but damned if I can find where. If still true, absorb cli command should now allow it with r17849.

Will probably remove _noobSkillCount soon, it isn't needed, as absorbs are more reliably available with my_absorbs() read from Character Pane.
 
r17853
Code:
> absorb dirty bottlecap

[dirty bottlecap] cannot be absorbed.

> ash $item[dirty bottlecap].noob_skill

Returned: none

> ash $item[dirty bottlecap].available_amount()

Returned: 1
 
Yeah, the three starter items are an exception to the rules.

Code:
boolean is_absorbable(item it) {
	if($items[interesting clod of dirt, dirty bottlecap, discarded button] contains it) return true;
	return (it.gift || it.tradeable) && it.discardable;
}

Annoying that. I really wish he'd made those things tradeable. They're not even quest items so making them tradeable wouldn't have hurt anything.
 
r17853

Should using the absorb command in the GCLI update my_absorbs()/item_drop_modifiers() that you gain from skills/etc?
Code:
> ash my_absorbs()

Returned: 9

> absorb blue velvet cake

You gain 9 Adventures
You gain 8 Strongness
You gain 10 Mysteriousness
You gain 7 Roguishness
Absorbing blue velvet cake
You learned a new skill: Saccade Reflex

> ash my_absorbs()

Returned: 9

> ash $skill[saccade reflex].have_skill()

Returned: true

> ash item_drop_modifier()

Returned: 80.0

> refresh status

Name: Ezandora
Class: Gelatinous Noob

Lv: 8
HP: 34 / 58
MP: 28 / 48

Mus: 35 (30), tnp = 17
Mys: 28, tnp = 2
Mox: 85 (53), tnp = 54

Advs: 70
Meat: 10,008

Full: 0 / 0
Drunk: 0 / 0
Spleen: 0 / 0

> ash my_absorbs()

Returned: 10

> ash item_drop_modifier()

Returned: 120.0
 
At the moment KoLmafia only updates absorb information from the charpane. It doesn't even try to figure that out itself. This is behaving exactly as intended. (The information doesn't even exist in the api, so that is not an option.)

If you don't think that this is the best way to do things, please express that.
 
After much messing about, r17856 should allow Maximizer to recommend items to absorb to gain skills. Hope to write code for absorbing equipment to get enchantments soon.

Is displayed information appropriate? Realise I didn't mention skill name, or duration.
 
r17858. Now shows skill name given by absorbing in Maximizer. Equipment absorbing to gain enchantments now supported.

Do we need anything else for support? Looks like we have done everything mentioned in this thread so far?
 
Maybe it's already here and I'm just blind, but is there some "Sweet Synthesis caster" style matrix for the Noobcore skills that can be used to find and get specific skills?

And because no matter how many times you hear it, it's not enough, thank you all of you for your hard and dedicated work on KOL Mafia.
 
Well, you can use Maximizer, and put in "Moxie", say, and it'll show you which skills you can get to improve that based on the parameters you enter (I'd recommend selecting buyable/pullable). And there is Ezandora's Guide script.
 
The maximizer won't show me absorb options like buying a pickled egg for DR or buying sturdy sword hilt for moxie. Is that intended?
 
Back
Top