Buff modifier "add" does not work

Summary: Currently, buffs will multiply base attributes but will not add to its value.

Code:
The following code does not do anything

{
   "type" : "buff",
   "name" : "MyBuff",
   "description" : "My Test Buff",
   "icon" : "file(My_Buff.png)",
   "modifiers" : {
      "courage" : {
         "add" : 20
      }
   } 
} 

Expected Results:
Courage will be raised by 20 whenever the buff is applied.

Actual Results:
Using ‘add’ will not change the value of the attribute. This can be seen with the “Combat Basics” buff that is applied when a hearthling is promoted to a footman. It is set to add 100 courage, but has no effect.

Notes:

The following will work perfectly:

{
   "type" : "buff",
   "name" : "MyBuff",
   "description" : "My Test Buff",
   "icon" : "file(My_Buff.png)",
   "modifiers" : {
      "courage" : {
         "multiply" : 1.20
      }
   } 
} 

Multiply works perfectly - I have tested this in game with a mod I am currently working on.

Version: r375 + mod in development (no changes have been made to bork Combat Basics)

2 Likes

Think I’ll slip in a notification to @sdee here - seems like this would be a useful thing for Radiant to use themselves, so fixing this seems like a sensible thing to do.

4 Likes

Wow, thanks for letting us know! I guess we’ve moved away from add towards multiply so that the numbers never stop being relevant, no matter how high they go; we must have stopped testing this.

4 Likes

Hi there,
An update on this bug! So the add modifer does work behind the scenes, it just isn’t being displayed to the UI properly. I fixed that and it will be in Alpha 11. In the meantime, the add does work (just not visually) so hopefully you can still test things.
Let me know if you run into any other issues.
Thanks!
-Yang

4 Likes