Page 3 of 3 FirstFirst 1 2 3
Results 21 to 30 of 30

Thread: Boolean modifiers for certain types of equipment

  1. #21
    Developer
    Join Date
    Apr 2010
    Posts
    5,090

    Default

    It is because by default, at present, ALL items that match a boolean requirement are passed through to the brute force maximization, so would need pruning. Numerics already get pruned.

  2. #22
    Senior Member
    Join Date
    Apr 2018
    Posts
    250

    Default

    It is because by default, at present, ALL items that match a boolean requirement are passed through to the brute force maximization, so would need pruning. Numerics already get pruned.
    Originally Posted by Darzil View Post
    Is there anything I might be able to do to help? Seal Clubbers and Accordion Thieves really benefit from using their titular weapons, and I’d like to see this make progress for those classes in particular.

  3. #23
    Developer
    Join Date
    Apr 2010
    Posts
    5,090

    Default

    A patch that successfully coverts Boolean array from bits to longs as we are running out, and works everywhere they are used would help. I couldnít get them all working and donít have time now.

  4. #24
    Senior Member
    Join Date
    Apr 2018
    Posts
    250

    Default

    A patch that successfully coverts Boolean array from bits to longs as we are running out, and works everywhere they are used would help. I couldnít get them all working and donít have time now.
    Originally Posted by Darzil View Post
    You want a function that can take an array of booleans and turn it into a bitfield? Iím a bit unclear on why we arenít just using boolean arrays in the first place, honestly.

  5. #25
    Developer
    Join Date
    Apr 2010
    Posts
    5,090

    Default

    No, I need a rewrite of everything about Boolean modifiers in Mafia. As after adding one more, any further involve a metric shedload of changes. It is the hard part about this change.

    Incidentally, two handed accordions work fine, and maybe one handed. It is only clubs where it might only show you clubs for both hands if using two weapons where club is an issue

  6. #26
    Developer
    Join Date
    Aug 2009
    Posts
    2,916

    Default

    Maybe "club" should only be considered to be valid in the mainhand slot.

    I didn't think it worked as an offhand equip. I guess I can test with a multi + batter up, maybe later.

  7. #27
    Senior Member
    Join Date
    Jun 2016
    Posts
    321

    Default

    According to the maximizer help, all of these weapontype keywords (club, knife, accordion and utensil) are already for mainhand only, but that does seem to interfere with the offhand equipment selection.

    Ex: Maximizing for "club, equip thor's pliers" will ignore the pliers and result in a failed maximisation for not meeting that goal.
    Similarly, maximizing for "club, weapon damage" causes it to suggest either the ginsu (+100% weapon damage, 2-handed sword, which is good since I have iron palms active), or brimstone bludgeon+slime-covered club if I force it into 1-handed weapons. Both times, it ignores brimstone bludgeon + stick knife, which outweighs either.

    As for functionality: accordions can't be equipped in the offhand, but for utensils', knives' and clubs' skill interactions only mainhand counts.

    As such, I'm not sure if a boolean modifier approach is the way to go here, since that might result in an outfit with the requested equipment in the offhand (or maybe on the disembodied hand), which would then fail to give you the skill interactions (and seal-clubbing prowess) you were probably looking for.
    Last edited by the dictator; 04-22-2019 at 10:59 AM.

  8. #28
    Developer
    Join Date
    Aug 2009
    Posts
    2,916

    Default

    I bet this is testable.

    PHP Code:
        @Test
        
    public void clubModifierDoesntAffectOffhand()
        {
            
    KoLCharacter.addAvailableSkill"Double-Fisted Skull Smashing" );
            
    // 5 base + buffed mus.
            
    KoLCharacter.setStatPoints525000);
            try
            {
                
    // 2 seal-clubbing clubs, 1 white sword
                
    InventoryManager.parseInventory( new JSONObject"{\"1\": \"2\", \"269\": \"1\"}" ) );
            }
            catch ( 
    JSONException e )
            {
                
    fail"Inventory parsing failed." );
            }
            
    assertTrueMaximizer.maximize"mus, club"00true ) );
            
    assertEquals(
                
    7Modifiers.getNumericModifier"Generated""_spec""Buffed Muscle" ), 0.01 );
        } 
    reproduces this failure.

    (Regardless, we still need an overhaul of the boolean modifier situation, since we're still running into scaling limitations.)
    Last edited by heeheehee; 04-22-2019 at 03:34 AM. Reason: set base mus

  9. #29
    Developer
    Join Date
    Aug 2009
    Posts
    2,916

    Default

    It looks like a problem is in Evaluator.java, namely that we use
    PHP Code:
                int slot EquipmentManager.itemIdToEquipmentTypeid );
    ...
                    case 
    EquipmentManager.WEAPON:
    ...
                        if ( 
    this.requireClub && !EquipmentDatabase.isClubid ) )
                        {
                            continue;
                        } 
    etc

    which doesn't care about which slot you're trying to put the item into.

  10. #30
    Developer
    Join Date
    Aug 2009
    Posts
    2,916

    Default

    r19183 ostensibly fixes the issue where +club (and similar keywords) force the offhand to also be a club. This is also tangential to the original discussion. As mentioned by the dictator, changing these to be boolean modifiers might actually be nonideal, since the modifiers only apply to the mainhand slot. We'll still need some sort of hardcoded behavior to understand that.

    (Technically, the test only checks that the maximize command can equip a club and a sword, but not which slots they end up in...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •