Custom version of the 5E OGL- attribute affecting speed automatically?

I've added an attribute that can impart small bonuses to speed (as well as determining initiative bonuses) and i'd like to get it to wait till someone changes the speed section ( say, i'm playing a dwarf, i put in 25, ive got a +2 bonus to this ability and it gives me +5 feet, i'd want "speedvalue"+ @{ability_mod}*2.5, right?
1507164507
You would need to set this up in an API script. Listen for a change on the speed attribute and perform the calculation.