Difference between revisions of "Template:OBSE Format Specifiers"
imported>Haama (→EX Formatting Functions: Updated on bug) |
imported>Wrye |
||
Line 50: | Line 50: | ||
Conditionally displays/omits the bracketed portion of the format string based on a boolean value. Accepts a variable - if the value of the variable is zero, all text and parameters up to the right bracket will be ignored. | Conditionally displays/omits the bracketed portion of the format string based on a boolean value. Accepts a variable - if the value of the variable is zero, all text and parameters up to the right bracket will be ignored. | ||
*Example (should be single-line, line-breaks added for Wiki) | * Note: Variable must equal 0 or 1. Non-zero values may cause CTD. | ||
* Example (should be single-line, line-breaks added for Wiki) | |||
MBoxEX "Doom comes%{ for you%}. What will you do? | MBoxEX "Doom comes%{ for you%}. What will you do? | ||
|Dig a hole, hide | |Dig a hole, hide |
Revision as of 00:48, 20 March 2008
EX Formatting Functions
These formatting specifiers will work with OBSE output functions, along with the usual functions.
%r
Prints a return, ending the current line and starting at the next.
%n
Prints the name of the specified reference or object.
- Errors may occur if the name includes a % sign
- Fixed as of v0014a
%i
Prints the formID of the specified reference or object.
%k
Prints the name of the key for the specified DirectInput scancode, such as those used for IsKeyPressed2.
%c
Prints the specified component of the specified reference or object. Takes two arguments - the reference, and an index. Behaves differently depending on the passed reference:
- Magic Item: Prints the nth Magic Effect
- For effects with specific actor values, this will display "Attribute" or "Skill" rather than the actor value itself.
- Faction: Prints the nth male rank title
- Magic Item: Prints the nth Magic Effect
Added as of v0014a
%p
Displays a pronoun based on the gender of the object parameter:
- %po - objective (he, she, it)
- %pp - possessive (his, her, its)
- %ps - subjective (him, her, it)
%q
Prints a double quote character.
%{...%}
Conditionally displays/omits the bracketed portion of the format string based on a boolean value. Accepts a variable - if the value of the variable is zero, all text and parameters up to the right bracket will be ignored.
- Note: Variable must equal 0 or 1. Non-zero values may cause CTD.
- Example (should be single-line, line-breaks added for Wiki)
MBoxEX "Doom comes%{ for you%}. What will you do? |Dig a hole, hide %{|Find someone, offer as sacrifice|Find someone, use as shield%} |Enjoy your final 15 minutes" bDisplay bDisplay
If bDisplay is 0 this will print out
Doom comes. What will you do? [Dig a hole, hide] [Enjoy your final 15 minutes]
If bDisplay is 1 this will print out
Doom comes for you. What will you do? [Dig a hole, hide] [Find someone, offer as sacrifice] [Find someone, use as shield] [Enjoy your final 15 minutes]