Setting qualities in Raconteur to a specific value

A question! I have been increasing or decreasing wordscale qualities in Raconteur using


…which seems to be working fine.

But what code do I need to use to set the quality to a specific number? I tried

system.setQuality('foo', 5)

…but when the quality is an integer nothing appears to happen, and when it’s wordscale it gets set to “undefined”. In the case of wordscale, the value I’m aiming for is definitely defined and displays fine when it’s the result of an increase or decrease in the quality.

Note: This is actually an Undum question, not a Raconteur question; any time you call any part of System you’re interacting with the Undum API.

The function expects:

system.setQuality([qualityName], [value])

So to simply set a value:

system.setQuality('foo', 5)

In this line:

system.setQuality('foo', + 2)

“ + 2” is an expression. When it’s run, it evaluates to some number (equal to the result of adding 2 to and that is what gets passed to setQuality. If you want an expression that will just always produce 5, you just use the literal number 5. But it could just as well be something like “ - 1”, to set foo to equal one less than bar; or any other arbitrary calculation you need to make.

Hooray, works perfectly! Thanks!