TWiki Home Tharsis . Design . SkillTests Tharsis webs:
Design | Guilds | Combat | Website
Design . { Home | Changes | Index | Search | Go }
Sometimes you want to test certain 'abilities' rather than a skill directly. This should be done through a standardised/simplified interface.

Two main functions, defined in livings:

varargs mixed test_ability(string ability, mixed difficulty, int flags)
varargs int use_ability(string ability, mixed difficulty, int flags)
varargs mixed fail_ability(string ability, mixed difficulty, int flags)

The difference between the functions lie only in how 'far' they take the test and their return codes. fail_ability will call use_ability, which calls test_ability, and thus fail_ability is the most complete test.


ability : "climb" , "lift" , "eavesdrop" etc
difficulty (default int): defined integers ranging through 'trivial' to 'impossible'
difficulty (mixed): handled separately by that ability
flags : flags, not sure what they are to be used for, instead of test/use/fail_funs perhaps?

testing ability:

enough gp/sp (gp/sp or similar) : test_ability halts, use/fail_ability fails (ie, you are forced to make this test)
testing the actual ability : all funs handle it the same, each ability defines their own method

return codes:

test/use_ability returns succeed rate, defined from flawless to catastrophe
fail_ability will return standardized fail messages upon failure


test_ability("read", COMPLEX) -> "you are too tired to read right now"
use_ability("harvest", flower) -> 2 (barely made it)
fail_ability("swim", ({ distance , waveheight })) -> 9 (easily done)

-- PumaN - 30 Sep 2003

Topic SkillTests . { Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More }
Revision r1.1 - 29 Sep 2003 - 22:40 GMT - PumaN
Parents: WebHome
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding Tharsis? Send feedback.