Feature - Implemented maximizer doesn't equip both an accessory and an outfit that includes an accessory

chown

Member
At least, I think that's what's going on here. ?
Code:
> equip

Hat: Crown of the Goblin King
Weapon: Staff of Ed
Off-hand: orcish stud-finder
Shirt: (none)
Pants: filthy corduroys

Acc. 1: astral bracer
Acc. 2: batskin belt
Acc. 3: solid gold pegleg

Pet: (none)
Item: (none)

> maximize equip solid gold pegleg, outfit swashbuckling getup

Maximizing...
16 combinations checked, best score 0.00

> equip

Hat: Crown of the Goblin King
Weapon: Staff of Ed
Off-hand: orcish stud-finder
Shirt: (none)
Pants: filthy corduroys

Acc. 1: astral bracer
Acc. 2: batskin belt
Acc. 3: solid gold pegleg

Pet: (none)
Item: (none)
 

lostcalpolydude

Developer
Staff member
If both +equip and +outfit are used together, either one will satisfy the condition - all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.
From the documentation that no one knows exists.
 

Darzil

Developer
Actually there is a bug, looks like requiring an outfit isn't work right at all. Will be looking at it tomorrow.
 

Theraze

Active member
Actually there is a bug, looks like requiring an outfit isn't work right at all. Will be looking at it tomorrow.

Works fine for me.
> maximize items, outfit swashbuck

Maximizing...
148820 combinations checked, best score 289.62
Putting on eyepatch...
Equipment changed.
Wielding sticky hand whip...
Equipment changed.
Holding spiky turtle shield...
Equipment changed.
Putting on swashbuckling pants...
Equipment changed.
Putting on stuffed shoulder parrot...
Equipment changed.

> maximize items

Maximizing...
41208 combinations checked, best score 344.62
41646 combinations checked, best score 355.62
41819 combinations checked, best score 355.62
60966 combinations checked, best score 355.62
98959 combinations checked, best score 355.62
139704 combinations checked, best score 355.62
145600 combinations checked, best score 355.62
Putting on bounty-hunting helmet...
Equipment changed.
Wielding bounty-hunting rifle...
Equipment changed.
Putting on bounty-hunting pants...
Equipment changed.
Putting on Red Balloon of Valor...
Equipment changed.
With r16311.
 

Bale

Minion
Ever watched someone stop at an intersection and then drive through a red light?

Yeah. Flashing bright colors would make it more obnoxious for people who know about it, but there is no way to get anyone to actually click.
 

Darzil

Developer
If both +equip and +outfit are used together, either one will satisfy the condition - all of the items, or one of the outfits. This special case is needed to be able to specify the conditions for adventuring in the Pirate Cove.

Well, that seems a silly way to deal with it. I think I'll try to find another way, maybe a pirate flag that sits on the fledges and the outfit. Not allowing +equip and +outfit to coexist for all other cases to handle this one case seems unfortunate.

Don't watch this space - no promises of a quick fix.
 
Here's an ash script that'll translate outfits into +equips for you. You could just save it as maxim.ash or something and run that.

Code:
void main( string maximizerstring ) {

	string outfit_name( string s ) {
		string[int] alloutfits = all_normal_outfits();
		
		s = to_lower_case(s);
		foreach i in alloutfits {
			if( alloutfits[i].to_lower_case().contains_text(s) ) {
				return alloutfits[i];
			}
		}
		return "";
	}	
	
	matcher m;
	// Find and replace outfits with their individual pieces.
	m = create_matcher("(?i),\\s*outfit\\s([^,]+)", "," + maximizerstring);
	if( m.find() ) {
		string temp = m.group(1).outfit_name();
		if( temp == "" ) abort("Could not find matching outfit for: " + m.group(1));
		
		string temp2 = "";
		foreach i in temp.outfit_pieces() {
			temp2 += ",equip " + temp.outfit_pieces()[i].to_string();
		}
				
		maximizerstring = m.replace_first( temp2 ).substring(1);
	}
	
	print( maximizerstring, "blue" );
	maximize( maximizerstring, false );
}
 
Last edited:

Darzil

Developer
r16318

If you specify both an outfit and a piece of equipment in maximizer, rather than trying to satisfy one, it will try to satisfy both.

If you are wanting to adventure in pirate cove, use +pirate and it'll wear either swashbuckling outfit or pirate fledges depending which is considered best overall.
 
Top