TWiki Home Tharsis . Design . SkillTests ( vs. r1.1) Tharsis webs:
Design | Guilds | Combat | Website
Design . { Home | Changes | Index | Search | Go }
 <<O>>  Difference Topic SkillTests (r1.1 - 29 Sep 2003 - PumaN)
Added:
>
>

%META:TOPICINFO{author="PumaN" date="1064875200" format="1.0" version="1.1"}% %META:TOPICPARENT{name="WebHome"}% 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.

arguments:

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

examples:

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 . { View | Diffs | r1.1 | More }
Revision -
Revision r1.1 - 29 Sep 2003 - 22:40 GMT - PumaN
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.