Var and Calc bbcodes
General area, introduction to the game and chat area.
1 post
•
Page 1 of 1
Var and Calc bbcodes
You can now create variables in your character sheet or anywhere where you want to save and calculate number data.
The above will create a variable with a value of 40, and output 40.
Example of the above in use:
The above will add 40 + unique_name_goes_here and output the result, while at the same time creating unique_name_goes_here2 with that output.
Example of the above in use:
Any valid math in var or calc bbcodes can be used.
Note that variables are defined and read in order; eg, you cannot use unique_name_goes_here2 before it is defined.
It is of course possible to perform calculations that don't create a variable.
The above will output 80. Any calculation bbcodes may also make use of any existing variables.
Example of the above in use:
Lastly, you can tally the amount in any var by adding the count attribute, wrapping the entire thing in the tally bbcode, and using the tallypoints bbcode anywhere:
Example of the above in use:
Tallypoints also has an optional attribute: total. Adding total with an amount or var name outputs a format similar to the skillpoints bbcode tag.
Outputs:
Code: Select all
[var=unique_name_goes_here]40[/var]
Example of the above in use:
Code: Select all
[var=unique_name_goes_here2]40 + unique_name_goes_here[/var]
Example of the above in use:
Any valid math in var or calc bbcodes can be used.
Note that variables are defined and read in order; eg, you cannot use unique_name_goes_here2 before it is defined.
It is of course possible to perform calculations that don't create a variable.
Code: Select all
[calc]40 + 40[/calc]
Example of the above in use:
Lastly, you can tally the amount in any var by adding the count attribute, wrapping the entire thing in the tally bbcode, and using the tallypoints bbcode anywhere:
Code: Select all
[tally]
Total: [tallypoints=exp][/tallypoints]
[var=one count=exp]40 + 40[/var]
[var=two count=exp]40[/var]
[var=three count=exp]-10[/var]
[/tally]
Total:
Tallypoints also has an optional attribute: total. Adding total with an amount or var name outputs a format similar to the skillpoints bbcode tag.
Code: Select all
[var=experience]2000[/var]
[tally]
Total: [tallypoints=exper total=experience][/tallypoints]
[var=one count=exper]40 + 40[/var]
[var=two count=exper]40[/var]
[var=three count=exper]-10[/var]
[/tally]
Total:
Last edited by Daedalus on September 6th, 2020, 10:16 pm, edited 6 times in total.
1 post
•
Page 1 of 1