Fixed documentation
This commit is contained in:
parent
b355008295
commit
4dcba2f234
1 changed files with 11 additions and 9 deletions
|
|
@ -173,9 +173,10 @@ if trait1 > trait2:
|
||||||
|
|
||||||
`value = (base + mod) * mult`
|
`value = (base + mod) * mult`
|
||||||
|
|
||||||
The static trait has a `base` value and an optional `mod`-ifier and 'mult'-iplier. A typical use
|
The static trait has a `base` value and an optional `mod`-ifier and 'mult'-iplier.
|
||||||
of a static trait would be a Strength stat or Skill value. That is, something
|
The modifier defaults to 0, and the multiplier to 1.0, for no change in value.
|
||||||
that varies slowly or not at all, and which may be modified in-place.
|
A typical use of a static trait would be a Strength stat or Skill value. That is,
|
||||||
|
somethingthat varies slowly or not at all, and which may be modified in-place.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
> obj.traits.add("str", "Strength", trait_type="static", base=10, mod=2)
|
> obj.traits.add("str", "Strength", trait_type="static", base=10, mod=2)
|
||||||
|
|
@ -200,15 +201,16 @@ that varies slowly or not at all, and which may be modified in-place.
|
||||||
min/unset base base+mod max/unset
|
min/unset base base+mod max/unset
|
||||||
|--------------|--------|---------X--------X------------|
|
|--------------|--------|---------X--------X------------|
|
||||||
current value
|
current value
|
||||||
= current
|
= (current
|
||||||
+ mod
|
+ mod)
|
||||||
* mult
|
* mult
|
||||||
|
|
||||||
A counter describes a value that can move from a base. The `.current` property
|
A counter describes a value that can move from a base. The `.current` property
|
||||||
is the thing usually modified. It starts at the `.base`. One can also add a
|
is the thing usually modified. It starts at the `.base`. One can also add a
|
||||||
modifier, which is added to both the base and to current. '.value' is then formed
|
modifier, which is added to both the base and to current. '.value' is then formed
|
||||||
by multiplying by the multiplier. The min/max of the range are optional, a boundary
|
by multiplying by the multiplier, which defaults to 1.0 for no change. The min/max
|
||||||
set to None will remove it. A suggested use for a Counter Trait would be to track skill values.
|
of the range are optional, a boundary set to None will remove it. A suggested use
|
||||||
|
for a Counter Trait would be to track skill values.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
> obj.traits.add("hunting", "Hunting Skill", trait_type="counter",
|
> obj.traits.add("hunting", "Hunting Skill", trait_type="counter",
|
||||||
|
|
@ -1210,8 +1212,8 @@ class CounterTrait(Trait):
|
||||||
min/unset base base+mod max/unset
|
min/unset base base+mod max/unset
|
||||||
|--------------|--------|---------X--------X------------|
|
|--------------|--------|---------X--------X------------|
|
||||||
current value
|
current value
|
||||||
= current
|
= (current
|
||||||
+ mod
|
+ mod)
|
||||||
* mult
|
* mult
|
||||||
|
|
||||||
- value = (current + mod) * mult, starts at base + mod
|
- value = (current + mod) * mult, starts at base + mod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue