Weapon Focus: Ray Guy

Discussion in 'General Modification' started by Gaear, Jan 8, 2013.

Remove all ads!
  1. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Hey Ted, a guy posted this at ModDB:

    (I can never figure out why people insist on posting there and at places like GoG etc. saying things like "If only there were some way to find out about the Circle of Eight Modpack available at www.co8.org/forum!") ;)

    I'm um pretty sure I applied the fix to the mod.
     
  2. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    I thought weapon focus ray guy was when you stare at a guy named Ray. Shows how much I know.
     
  3. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Thats how the fix works: it boosts your base Dex by 2, so you get +1 on the attack that way. I did it that way because:

    a) Every other way I tried, such as temporarily adding an item to give +1, failed (that would have been the ideal way to do it because you could have called the item 'Weapon Focus: Ray' and it would look good in the rolls window. But they all failed :( )

    b) This way not only works but doesn't clash with anything. So, by changing the base Dex just for the shot, then back again, it never gives you +1 AC (even if someone interferes and shoots you from a readied action, I tested that), doesn't leave you with +1 if the spell fizzles, doesn't clash with Gloves of Dex or Cat's Grace etc. Its essentially fool-proof, albet not the way the rules say the +1 is given. But it works :)

    For the record, the rules say:
    and its resolved as a ranged touch atack, so +2 Dex = +1 on attack roll as required :shrug:
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    No problem, that's fine with me. I'm always amazed at how much the numbers people stare at the numbers. ;)
     
  5. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    If you think about it Gaear, back when we were playing DnD PnP style, ALL we had were numbers, everything else you imagined in your head. ;)
     
  6. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    The permanent Dex +2 bug is sill there in 8.1.0, but I think I see the problem.

    The initial dexterity value is gotten with stat_level_get, which will include gloves of dexterity, Elf racial bonus, etc.

    Code:
    x = spell.caster.stat_level_get(stat_dexterity)
    So when it uses this value to pump up Dex, it's using the value with all the modifiers included. But the big problem comes when the Dex is returned to its original value, and it uses this inflated value.

    Changing this line to use stat_base_get fixes this bug.

    Code:
    x = spell.caster.stat_base_get(stat_dexterity)
     
    Last edited: Jul 5, 2016
  7. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Thanks, Sitra pointed that out to me a while back and I posted a fix for that, then rolled it into the Domain mod fixes. I'll try to make them all more prominent shortly.

    Another n00b bug <sigh>. I'm tempted to blame the lack of a compiler but that would have actually gotten by it.

    EDIT: I'll point out again that, as Marc says, the differences mean that a player with an Elf will get the bug, while a tester like yours truly testing with say a human mage (or a half-orc :)) will not see or pick it up. That's why it slipped through and I couldn't see it in re-testing.
     
Our Host!