3
\$\begingroup\$

When using the tool GURPS Character Sheet, is there a way to change the attribute value when calculating skill levels?

In my next GURPS campaign I'm planning to introduce this rule from Pyramid #3/65:

Instead of the usual default attribute values for Easy, Average, and Hard skills, convert these defaults to half-stat by changing the basis for all defaults to Attribute/2 (round fractions down) plus a modifier. The modifier equals the normal default penalty (expressed as a negative number) plus 5.

I'll also plan to modify the cost of attributes, or apply this rule when buying skill levels as I want to reduce the impact of high attributes on skills.

I have some experience with coding, so feel free to point to any solution involving a snippet or something like that.

\$\endgroup\$
  • \$\begingroup\$ This would be an excellent question for the gcs_java_devel mailing list, though I'm not sure the author will be much help, as life gets in the way. \$\endgroup\$ – Zeiss Ikon Jul 5 '18 at 14:29
  • \$\begingroup\$ Actually, I opened an issue at github asking mr. Wilkes directly! \$\endgroup\$ – Cazacurdas Jul 6 '18 at 6:02
1
\$\begingroup\$

(Edit: I wrote that I hadn't actually tried building a new version of the software, but I did actually study the files in all of the directories installed by the software, and I did study the source code of the program, and I am a professional software developer with decades of experience, and a GURPS GM with decades of experience, and I am confident that this is actually most likely the correct place to make the requested change (for the side-question too), and probably a syntactically-correct code change to make the requested change. Please (all ye rpg.se critics) take pity and don't downvote my answer even further just because I didn't spend hours setting up a working development environment (I don't even have a Mac and the dev environment is set up on Mac) and implement and test the changes, for an rpg.se question that just asks for code pointers.)

I haven't actually tried doing (the hours of work it would probably take to get a non-Mac dev environment working and testing) this (I don't have a Java dev environment set up, nor a Mac), but I see a very likely-looking candidate for where to edit the code to do this:

In the file: https://github.com/richardwilkes/gcs/blob/master/src/com/trollworks/gcs/skill/SkillAttribute.java

There are sections for each attribute like:

/** The dexterity attribute. */
DX {
    @Override
    public String toString() {
        return DX_TITLE;
    }

    @Override
    public int getBaseSkillLevel(GURPSCharacter character) {
        return character != null ? character.getDexterity() : Integer.MIN_VALUE;
    }
}

And I would start by changing the

character.getDexterity() : Integer.MIN_VALUE;

part to be more like:

(character.getDexterity() / 2 + 5: Integer.MIN_VALUE);

As for how to modify attribute point costs, it looks like you'd modify the getPointsForAttribute() function (and/or the individual methods for each attribute that call it (e.g. updateStrengthInfo()), and/or look at how SheetPreferences.areOptionalStrengthRulesUsed() is used.

i.e. in https://github.com/richardwilkes/gcs/blob/master/src/com/trollworks/gcs/character/GURPSCharacter.java

private static int getPointsForAttribute(int delta, int ptsPerLevel, int reduction) {
    int amt = delta * ptsPerLevel;

    if (reduction > 0 && delta > 0) {
        int rounder = delta < 0 ? -99 : 99;

        if (reduction > 80) {
            reduction = 80;
        }
        amt = (rounder + amt * (100 - reduction)) / 100;
    }

    return amt;
}
\$\endgroup\$
  • 2
    \$\begingroup\$ My guess is that it's because this hasn't been tried. (Aside from that, users may not swear at others, so that comment has been removed.) \$\endgroup\$ – SevenSidedDie Jul 4 '18 at 16:32
  • \$\begingroup\$ So, you think they only way around is compiling my own version? Hmph. \$\endgroup\$ – Cazacurdas Jul 6 '18 at 6:02
  • 1
    \$\begingroup\$ @Cazacurdas That is my impression from looking at all of the files that get installed, yes. There are data files, but as you can see from the source code, the code calculates the base level for skills. You could change the difficulty modifier by modifying all (!) the skills, but that wouldn't let you add a divisor to the effect of the base attribute. \$\endgroup\$ – Dronz Jul 7 '18 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.