Feature - Rejected Note choice number in Choice Advs tab

Fluxxdog

Active member
I understand that the choices for the Maidens didn't have their numbers shifted so that the preferences for choiceAdventure89 could be backwards compatible with scripts that directly alter them. I'd like to ask that the numbers for those preferences be shown in the Choice Advs tab. I had a script constantly selecting "4" so it would skip the choice adventure, not knowing that mafia actually considers that choice 6. I was surprised when it kept fighting Wolf knights. Making these numbers apparent would help reduce future errors.

I was going to originally request that all the choice adventures be standardized, but it wasn't until I was looking at the code that I realized that backwards compatibility was an issue, so I changed my FReq.
 
I don't see the point of this. It is extraneous and confusing information to display for 99% of users. Those scripters who care can set the adv and get the pref to check.
 
Some choice adventures are handled intelligently by Mafia. Generally, the user chooses a specific goal, and Mafia choose the correct choice depending on the circumstances.

For some of the choice adventures handled this way, the number in the choiceAdventureXXX preference does not correspond to a choice in the choice adventure. It corresponds to the setting you have chosen in the GUI. Any setting where you can "Do X, then do Y" is an example of this.

These are the settings that Mafia offers for the Maidens, in ChoiceOptionsPanel.java:
PHP:
this.maidenSelect = new JComboBox();
this.maidenSelect.addItem( "Ignore this adventure" );
this.maidenSelect.addItem( "Fight a random knight" );
this.maidenSelect.addItem( "Only fight the wolf knight" );
this.maidenSelect.addItem( "Only fight the snake knight" );
this.maidenSelect.addItem( "Maidens, then fight a random knight" );
this.maidenSelect.addItem( "Maidens, then fight the wolf knight" );
this.maidenSelect.addItem( "Maidens, then fight the snake knight" );

...

// necessary for backwards-compatibility
switch ( this.maidenSelect.getSelectedIndex() )
{
case 0: // Ignore this adventure
	Preferences.setString( "choiceAdventure89", "6" );
	break;

case 1: // Fight a random knight
case 2: // Only fight the wolf knight
case 3: // Only fight the snake knight
case 4: // Maidens, then fight a random knight
case 5: // Maidens, then fight the wolf knight
case 6: // Maidens, then fight the snake knight
	Preferences.setString( "choiceAdventure89",
		String.valueOf( this.maidenSelect.getSelectedIndex() - 1 ) );
	break;
}

For almost all of the choices handled this way, the preference -> result mapping can be figured out simply by looking at the order of the options in the choice setting dropdowns in the GUI. Maidens is the only special case, I believe.
 
Back
Top