WarRatsG Posted August 23, 2011 Share Posted August 23, 2011 (edited) Hi :) Not really got a problem, it's a matter of curiosity and foresight. Something that has always bugged me is that there are many useful output functions for use in messageboxes or the console that don't seem to be documented anywhere. Things like using "%.0f" in a messagebox or "$Var when printing. So I was just wondering, what other ones are there? I've seen "%.k", although I'm not sure what it does. when one is posted, I will put it in the post below this one. If you can add or correct anything you see there, please do. Thanks for your help :) Edited August 23, 2011 by WarRatsG Link to comment Share on other sites More sharing options...
WarRatsG Posted August 23, 2011 Author Share Posted August 23, 2011 (edited) Here are the output functions known just now. Please Correct or add what you know :) 1. (Var:Float) "%.0f" var When used it shows the selected variable to number of decimal places before "f". For example:Float Pi Set Pi to 3.1416 Messagebox "Pi = %.2f" Pi Will show "3.14". May only work in messageboxes. 2. $Var Used within the command "Print" (not sure if it works in others) to print the var following the "$" to the console. For example Ref ShadySamREF Set ShadySamRef to ShadySam Print $ShadySamRef Will show "Shady Sam" 3. %.k It exists, but I don't know what it does. Edited August 23, 2011 by WarRatsG Link to comment Share on other sites More sharing options...
PrettyMurky Posted August 24, 2011 Share Posted August 24, 2011 From the OBSE documentation: The format specifiers recognized by OBSE commands include all of those recognized by vanilla Oblivion script commands like MessageBox as well as several extended specifiers: * %a - replaced by the character matching the ASCII code passed as an integer * %c - replaced with the name of a component within another object. Takes two arguments - an object (ref) and the index of the component you want to access (short). Supported object types: o Magic Item - prints the name of the nth effect item. o Faction - prints the male rank title of the nth rank. * %e - replaced by nothing. Useful for passing an empty string as an argument, as the script compiler will not accept an empty string. Can be used outside of format strings. * %i - is replaced by the formID of a reference or object passed in a ref variable * %k - replaced by a string representing the key associated with a DirectInput scan code * %n - replaced with the name of a reference or object passed in a ref variable * %p - replaced with a pronoun based on the gender of the object parameter passed in a ref variable: o %ps - subjective (he, she, it) o %pp - possessive (his, her, its) o %po - objective (him, her, it) * %q - replaced with a double quote character (takes no arguments). Can be used outside of format strings. * %r - replaced by a new-line character (takes no arguments). Can be used outside of format strings. * %v - replaced by the name of an actor value passed as an integer actor value code * %x - replaced with an integer in hexadecimal format. An optional digit from 0-9 immediately following this specifier indicates the minimum width of the displayed value. For example, MessageEx "%x4" 255 will display "00FF". * %z - replaced by the contents of a string variable * %{ .. %} - Conditionally omits a portion of the format string based on a boolean value. The left bracket accepts a variable; if the value of the variable is zero, all text up to the right bracket will be ignored, and any parameters supplied to format specifiers within the omitted substring will be skipped. * %B - toggles blue text on for console output * %b - toggles blue text off for console output. e.g. "%BBlue%b suede shoes": when printed to the console, the word "Blue" will be printed in blue text. Note that the %e, %q, and %r specifiers can be used within any string literal and will be replaced by an empty string, a double quote, or a carriage return respectively. Link to comment Share on other sites More sharing options...
WarRatsG Posted August 24, 2011 Author Share Posted August 24, 2011 Ah great thanks I. I looked in the documentation but it is that best :L Anyway im guessing this will be under format specifier or something like that? Thanks again, this will be really useful :) Link to comment Share on other sites More sharing options...
Recommended Posts