New Content - Implemented 2019 IOTM Fourth of May Cosplay Saber

Kyrinia

New member
Mafia isn't seeing the Use the Force skill by default (going into a combat wielding the saber is required for it to Mafia to see the new skill, and doing a have_skill check dies to bad skill name before that as well), I'm using latest that has the Force prefs, but still no joy.
 

lostcalpolydude

Developer
Staff member
Mafia isn't seeing the Use the Force skill by default (going into a combat wielding the saber is required for it to Mafia to see the new skill, and doing a have_skill check dies to bad skill name before that as well), I'm using latest that has the Force prefs, but still no joy.

19233 adds Use the Force as a skill.
 

Darzil

Developer
r19293, untested, should use your highest buffed stat as the hit stat, and adds the skill as a known skill when equipped.
 

zarqon

Well-known member
Could we get a preference for choiceAdventure1387 please?
Would make scripting a lot easier.

You can still script choiceAdventures that don't have a preference with a simple set choiceAdventure1387 = 2 (or whatever option you want). Mafia will follow that property during automation. The only differences between a choiceadv preference you make and mafia's built-in ones are 1) there's no default so it will disappear if you lose your settings file, and b) there's no pretty configurable dropdown for it in the GUI.
 

Malibu Stacey

Active member
You can still script choiceAdventures that don't have a preference with a simple set choiceAdventure1387 = 2 (or whatever option you want). Mafia will follow that property during automation. The only differences between a choiceadv preference you make and mafia's built-in ones are 1) there's no default so it will disappear if you lose your settings file, and b) there's no pretty configurable dropdown for it in the GUI.

You are an actual legend! Thanks zarqon!
 

Saklad5

Member
Choice adventures (and therefore most settings) are implicit rather than explicit. Which is great, because it means we don’t have to maintain them constantly.

Other implicit settings:

  • skillBurn# (for MP-burning priority)
  • breakableHandling# (for what to do when equipment breaks)
  • unknownRecipe# (for overriding recipes that have to be unlocked before use)

There may be others I’m not aware of.
 

soolar

Member
Could the +effective tag in the modifier maximizer be updated to respect the saber as always an effective weapon?
 

Saklad5

Member
Could the +effective tag in the modifier maximizer be updated to respect the saber as always an effective weapon?
It almost does this already, from what I can tell.
Code:
if ( this.effective )
{
    if ( KoLCharacter.getAdjustedMoxie() >= KoLCharacter.getAdjustedMuscle() &&
        weaponType != WeaponType.RANGED &&
        ( !EquipmentDatabase.isKnife( id ) || !KoLCharacter.hasSkill( "Tricky Knifework" ) ) )
    {
        slot = auxSlot;
    }
    if ( KoLCharacter.getAdjustedMoxie() < KoLCharacter.getAdjustedMuscle() &&
        weaponType != WeaponType.MELEE )
    {
        slot = auxSlot;
    }
}
If Moxie is higher than Muscle but lower than Mysticality, the saber won’t be considered effective. This is because all weapons that use a stat besides Moxie are considered “melee”. The saber is literally the only weapon in the game that can use Mysticality for hit chance, as reflected in the getHitStatType() function (but not its Javadoc comment, which still claims it can only return Moxie or Muscle).
 

soolar

Member
Going by my testing the change seems to be making the saber always considered ineffective instead. I think the code needs to be something more like

Code:
if ( this.effective )
{
	if ( id != ItemPool.FOURTH_SABER ) // Always uses best stat, so always considered effective
	{

		if ( KoLCharacter.getAdjustedMoxie() >= KoLCharacter.getAdjustedMuscle() &&
			weaponType != WeaponType.RANGED &&
			( !EquipmentDatabase.isKnife( id ) || !KoLCharacter.hasSkill( "Tricky Knifework" ) ) )
		{
			slot = auxSlot;
		}
		if ( KoLCharacter.getAdjustedMoxie() < KoLCharacter.getAdjustedMuscle() &&
			weaponType != WeaponType.MELEE )
		{
			slot = auxSlot;
		}
	}
}

Since I think the
Code:
slot = auxSlot;
is what's telling it to only consider that for the off-hand slot.
 

apologue

New member
It seems to me that _saberMod might not be cleared at rollover - I just logged in for the first time today and it's value is 3. This is r19417, though, but I didn't notice any relevant-sounding recent changes. Also, I'm in a TCRS run in case that matters.
 

lostcalpolydude

Developer
Staff member
It seems to me that _saberMod might not be cleared at rollover - I just logged in for the first time today and it's value is 3. This is r19417, though, but I didn't notice any relevant-sounding recent changes. Also, I'm in a TCRS run in case that matters.

The saber's modifiers are parsed when you log in to see if it is already configured. It wouldn't surprise me if its TCRS mods happen to match the strings checked for.
 

apologue

New member
Sounds like a plausible explanation. The saber's modifiers in Seal Clubber / Opossum TCRS are

Moxie +15
Moxie +20%
Serious Stench Resistance (+3)

so I suppose the last one is considered a match for Serious Resistance to All Elements (+3).
 

Arashmin

New member
if (get_property("_saberMod") == "0")
{
visit_url("main.php?action=may4");
visit_url("choice.php?pwd&whichchoice=1386&option=OPTION NUMBER");
}

OPTION NUMBER:
1 = regen 15-20 mp
2 = +20 ML
3 = +3 all res
4 = +10 lbs
5 = skip it

edit: the space between the equals sign & OPTION NUMBER, is a quirk of the forum and shouldn't be there.

and, more simply, you can use

if (get_property("_saberMod") == "0")
{
visit_url("main.php?action=may4");
run_choice(OPTION NUMBER);
}

instead.

Also found you can pare this down to a CLI command, and thus also an unconditional mood:
main.php?action=may4; choice #

Helps for those with the Mac struggle, I spent a good while trying to figure a way to write an .ash file before deciding to tinker in CLI.
 
Last edited:

Malibu Stacey

Active member
I think so. r19875 fixed the last issue I knew of (which I was meaning to report for a while but life kept getting in the way recently) as it fixed the problem I was alluding to here.
 
Top