STAR TREK 2d20
  1. #1

    3.5e skill points bug

    3.5e characters aren't receiving the correct number of skill points at 1st level if you drag and drop a class onto the character sheet.

    The correct calculation for character level 1 skill points is (class skill points + Intelligence modifier) x 4. A wizard with 18 Int (+4 modifier) should get (2 + 4) x 4 = 24 skill points at character level 1.

    Currently, Fantasy Grounds calculates level 1 skill points as (class skill points x 4) + Intelligence modifier. In FG, this example wizard receives 12 skill points.

  2. #2
    Yeah I think its this code right here starting at line 1924 in campaign/scripts/manager_char.lua.

    if nSkillPoints > 0 then
    local nAbilitySkillPoints = DB.getValue(nodeChar, "abilities.intelligence.bonus", 0);
    local nBonusSkillPoints = 0;
    if DataCommon.isPFRPG() then
    if hasTrait(nodeChar, "Skilled") then
    nBonusSkillPoints = nBonusSkillPoints + 1;
    end
    else
    if nTotalLevel == 1 then
    nSkillPoints = nSkillPoints * 4; <-- change this line to the one below
    nSkillPoints = ((nSkillPoints + nAbilitySkillPoints) * 4); <-- to this
    end
    end

    DB.setValue(nodeClass, "skillranks", "number", DB.getValue(nodeClass, "skillranks", 0) + nSkillPoints + nAbilitySkillPoints + nBonusSkillPoints);

    Hrrm testing it and changing here isnt changing the outcome, gonna keep looking. Hehe, need to remember to unload extensions when testing, seems to work now
    Last edited by mr900rr; June 17th, 2018 at 04:34.

  3. #3
    Looks like it's still adding the ability modifier at the end. Creating a Wizard with 12 Int grants ((2 class + 1 Int) x 4) + 1 Int = 13 points

    Edit: Removing the underlined part of line 1913 corrects this:

    DB.setValue(nodeClass, "skillranks", "number", DB.getValue(nodeClass, "skillranks", 0) + nSkillPoints + nAbilitySkillPoints + nBonusSkillPoints);

    However, the bonus skill point from humans isn't calculating. I don't know if this is a new or pre-existing problem, and wonder if it's coded to add to nAbilitySkillPoints. I don't think it's adding to nBonusSkillPoints, because if it was it would still add a single point, would it not?
    Last edited by Dark_Soul; June 17th, 2018 at 17:32.

  4. #4
    Let me see what I did wrong, Ok so changing the last part fixes the skill points, your fix above works for 1st level but for additional levels it wouldn't add the ability bonus skill points, this one will, but still need to fix the msg that goes to chat. I am not sure that the 3.5E rule set accounts for the racial skill points, I will look into that.

    if nTotalLevel == 1 then
    DB.setValue(nodeClass, "skillranks", "number", DB.getValue(nodeClass, "skillranks", 0) + nSkillPoints + nBonusSkillPoints);
    else
    DB.setValue(nodeClass, "skillranks", "number", DB.getValue(nodeClass, "skillranks", 0) + nSkillPoints + nAbilitySkillPoints + nBonusSkillPoints);
    end

    ok and below change to this to fix the msg.

    local sPoints = tostring(nSkillPoints) .. "+" .. tostring(nAbilitySkillPoints);
    if nTotalLevel == 1 then
    sPoints = tostring(nSkillPoints);
    end
    Last edited by mr900rr; June 18th, 2018 at 00:37.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Log in

Log in