Can't Lock Attribute Setting To > 0

I’m trying to make it so that attributes can be set to any number between 1 and 5. I’ve tried a number of different ways and it continues to let them set attributes to 0. It works properly for any attempted rank of 6 or higher or -1 or lower but it continues to allow them to set an attribute to rank 0. I’ve tried using arrays and .include?, >= 1, != 0, etc and nothing blocks the ability to set a rank to 0. Any suggestions?

1 Like

The base code already restricts attributes to not going below 1. That check lives in FS3Skills.get_min_rating.

There’s no way via configuration to make attributes go from 1-5. The skill and attribute ratings in FS3 are fixed.

Of course you can crack open the code and do whatever your heart desires, but it’s not going to be trivial. Also, I have to advise you that the attributes originally went from 1-5 when I first drafted FS3 3rd ed, and were changed to 1-4 for very specific game balance reasons. I strongly advise against trying to make it use 1-5.

Sorry, I’m working on a custom plugin. That said I’ll look into the FS3 plugin to see how get_min_rating works because what I’m doing sure isn’t. LOL :slight_smile:

1 Like

Oh, sorry - I saw “making attributes 1-5” and assumed you were talking about the existing system :slight_smile:

The root of the FS3 error check is in RaiseAbilityCmd where it does:

        current_rating = FS3Skills.ability_rating(enactor, self.name)
        mod = cmd.root_is?("raise") ? 1 : -1
        new_rating = current_rating + mod
        
        error = FS3Skills.check_rating(self.name, new_rating)
        if (error)
          client.emit_failure error
          return
        end 

The same check exists in all the other commands that let you set abilities (XP, admin set, web set, etc.). check_rating checks for both min rating and max rating.

Hope that helps.