List of all Hypertext Tags

Discussion in 'Rivatuner Statistics Server (RTSS) Forum' started by marcell1no, Apr 7, 2021.

  1. marcell1no

    marcell1no New Member

    Messages:
    2
    Likes Received:
    1
    GPU:
    RTX 2070 Max-Q
    Hi Guys,

    big fan of RTSS, thank you for your work.
    I‘m searching for a full list of all working Hypertext tags. Like <exe> for example.

    reason is I‘d like to add a tag displaying whether the framerate limiter is currently active or disabled.

    also I‘d like to know how to insert pics or GIFs as a Hypertext tag.

    or just show me where I can read this stuff. I read parts of the 33 page readme, but didn‘t find the answers there.
     
    boogieman likes this.
  2. boogieman

    boogieman Ancient Guru

    Messages:
    1,966
    Likes Received:
    38
    GPU:
    MSI GTX 1080X
  3. marcell1no

    marcell1no New Member

    Messages:
    2
    Likes Received:
    1
    GPU:
    RTX 2070 Max-Q
    Hm.. I have difficulties finding the definitions.
    In this post unwinder wrote that they are all defined and commented on in the SDK.
    I checked both SDK folder, the MSIAB and the RTSS and read many definitions there.

    But I still didn't find where tags like
    <BTIME>
    <APP?
    %Time%
    <EXE>
    are defined. I know what they mean by now, but would like to learn about others I could then use and add to my overlay.
     
  4. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    Macroses are defined in OPEN source code of OverlayEditor plugin. Commented examples of each tag usage can be forund there too. If "source code" tells you nothing - you're not SDK's target audience.
     

  5. Streuwinkel

    Streuwinkel New Member

    Messages:
    9
    Likes Received:
    11
    GPU:
    Pulse RX Vega 56
    Here is a list of macros and tags to the best of my current knowledge. I make no claims on the completeness or correctness of this list. Important for beginners:
    • Macros share their name space with data sources, so if you want to use %CPU%, make sure you don't have your CPU load or temperature source named the same.
    • Names of tags and macros are case sensitive. "App" is not the same as "APP".
    • The individual layer "refresh period" is for smooth timer based animations and does not poll data sources more or less often.
    • It is best practice to reset your own tags for color (<C>) and font size (<S>) at the end of a layer to avoid it spilling into the next layer. "Use custom text color" automatically appends <C>.
    Macros
    %CPUFull% %GPUFull% CPU/GPU name as seen in device manager

    %CPU%     %GPU%     Less verbose version of the above
    %RAM%     %VRAM%    Amount of RAM/VRAM (e.g. 12GB)
    %Driver%            Graphics driver and version (e.g. Adrenalin 2020 20.4.2)
    %Time12%            Time of day in 12 hour format (e.g. 07:52:12 PM)
    %Time24%            Time of day in 24 hour format (e.g. 19:52:12)
    %Date%              Date in local short format (e.g. 05/12/21 or 12.05.21 etc.)
    %PingAddr%          Display address that you set up for ping tests.
    %Timer%             Displays your timer value (e.g. 0:00:10). Use HotkeyHandler.dll plugin to arm the timer.
    %TimerFlashing%     Same as above, but flashes the timer slowly when it reaches 0:00:00.
    %TimerHiding%       Same as above, but hides the timer when it reaches 0:00:00.
    %PollingTime0%      Polling time for external sources*.
    %PollingTime1%      Polling time for internal HAL sources*.
    * Polling times are divided into internal and external sources: Internal refers to the "Internal HAL" set of data sources provided by the overlay editor plugin itself, while external sources are all the rest: MSI Afterburner, HWiNFO64, AIDA64, Windows Performance Counters and the invisible RTSS sources that provide frame times.

    Static Information

    <API>               3D API name (e.g. OpenGL, Direct3D11, ...)

    <APP>               Compact version of the above (e.g. OGL, D3D11, ...)
    <EXE>               Application file name without path (e.g. googleearth.exe)
    <ARCH>              For 64-bit programs or UWP apps this prints either "x64" or "UWP". Empty otherwise.
    <RES>               Current framebuffer resolution (e.g. 1920x1080)
    <TIME=format>       Print date/time using Python format strings and US locale.
                        WARNING: For performance reasons you are responsible for validating the format string. Invalid strings can crash RTSS.

    Frame times / benchmarking

    <FT>                Frametime in milliseconds with one decimal (e.g. 16.7)

    <FR>                Framerate. Select "Display integer framerate" option in RTSS to round to integer.
    <FRMIN>             Minimum framerate*.
    <FRMAX>             Maximum framerate*.
    <FRAVG>             Average framerate*.
    <FR01L>             Framerate of 1% slowest frames. (See also "Percentile calculation" option)*.
    <FR10L>             Framerate of 10% slowest frames. (See also "Percentile calculation" option)*.
    <BTIME>             Duration of current benchmark run (e.g. 01:12:34)*.
    * Benchmarking has to be enabled via "Enable benchmark mode" option or hotkeys for these to be filled.

    Formatting

    <S=...>             Sets the font size in percent. Negative value produce subscript instead of superscript.

                        Sizes 50, 100 and 200 have their own sprites and look best. Other sizes will be resized versions of those three.
    <S>                 Reset font size to 100%.

    <C=aarrggbb>        Hex color code. Alpha cannot be zero.
    <C>                 Reset color and opacity.
    <A=n>               Opens a "box" of n grid cells width within which following elements are aligned. (This is what tables are made of.)
                        Positive values align left within the box, negative values align right.
    <A>/<A=0>           Finishes an open alignment box and moves the cursor to the right of it.
    <TT=name>           Insert tags to render a named text table. Cursor will be placed after the last defined cell.

    Store and recall

    For the <S=>, <C=> and <A=> tags, there are memory slots from 0-255 that can be written to by using the regular tag with an index, e.g. <C25=FF208030> to store a color at index 25 and <C25> to recall and use it. This functionality is used internally to optimize duplicate colors, font sizes and alignments away. If you want to use this feature and inadvertently overwrite slots used by the optimizer, then colors, font sizes or alignments will be off. Use the "Tools" menu to display the hypertext and read the dark blue part at the start to check.

    Drawing

    <P=x,y>             Set new cursor position*.

    <P0>...<P8>         Move cursor to screen corner or edge indexed from left to right, top to bottom.
    <B=x,y>             Draw a rectangle at the cursor in the current color*.
    <G=...>             Insert a graph based on a data source*. Use UI to create it.
    <I=...>             Insert a static image*. Use UI to create it.
    <AI=...>            Insert a sprite animation driven by a data source*. (Custom gauge.) Use UI to create it.
    * Individual x or y coordinates, widths and heights can be positive or negative. Positive values measure pixels while negative values count grid cells. In each case, "0,0" is the top left screen corner. Keep in mind that the "On-Screen Display zoom" in RTSS affects the scaling.

    Formulas

    The current data source is stored in x. Aside from the basic operators +, -, * and / you can also use % (the modulo operator) and ^ (x to the power of y) as well as parenthesis. Be aware that when you divide integers by integers the result will also be an integer (rounded towards zero). So if you want to use fractional numbers divide by a floating point number like so: x/1024.0.
     
    Last edited: Jun 4, 2021
    orangewoolcry, Ishan, Haldi and 7 others like this.
  6. boogieman

    boogieman Ancient Guru

    Messages:
    1,966
    Likes Received:
    38
    GPU:
    MSI GTX 1080X
  7. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    Well done. Wise posts like this one are sadly pretty rare gems here, that's why it is twice pleasant to see such content. Good job. I have a few minor corrections/additions to it but I'm pretty busy with my promary job at the moment, so I'll post it later/
     
  8. Streuwinkel

    Streuwinkel New Member

    Messages:
    9
    Likes Received:
    11
    GPU:
    Pulse RX Vega 56
  9. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    As I promised, a few minor corrections and additions:


    Both increasing and decreasing timer modes are supported. For example the timer may tick from 0:00:00 to 0:30:00, as well as from 0:30:00 to 0:00:00. So those two timer types start flashing or hide when timer is elapsed, i.e. when it reaches the target (which may not be equal to 0:00:00).


    There will be simple and fast realtime format validator in the next beta, which won't allow C++ runtime to crash if unsupported format string is specified.

    It resets font size to default value, which can be different from 100%. For example <D> tag saves current text size and color attributes as new defaults. The following hypertext defines 400% as default text size then the next <S> resets font size to 400% instead of 100%. <D> tags are always used in pairs, the next <D> tag cancels defaults override block and restores original defaults.

    <S=400><D><S=200><FR><S><FR><D>



    Alpha can be zero. If no alpha is specified, then color is trated as opaque (i.e. alpha = FF is assumed in this case). Such compact opaque color representation form is provided to save hypertext space.



    Newline (\n), tabulation (\t) or new alignment tag (<A=x>) also finish open alignment block


    Only slots 0-249 are available to end users. Upper 6 slots (250-255) are reserved by system. Slot 250 is currently used to define own RTSS status (benchmark status, screen capture status etc) size and colors.



    Backspace symbol (\b) is quite important and it is frequely used in conjuntion with bar (<B>) rendering tag. Backspace returns the cursor to the previous position, which allows you to use <B> to fill background area, return cursor back to the previous position (i.e. top left corner of rendered bar) then render the text on top of it. Take a note that nested backspace symbols are not supported by hypertext.


    Take a note that those are not real hypertext tags, so you cannot use it if you format the hypertext yourself from your own application. <G> and <AI> are OverlayEditor's hypertext extensions, they are translated into embedded objects or static image tags by the plugin in realtime.

    Positive values measure zoomed pixels (i.e. pixels * OSD_zoom_ratio). Values can be also 0, in this case hypertext parser calculates layer extent and uses it instead. This feature can be used to fill whole layer background, resize image to whole layer etc.



    You can also reference other data sources in correction formulats, for example x + "CPU usage" is a valid formula too.
     
    Andy_K and The1 like this.
  10. Streuwinkel

    Streuwinkel New Member

    Messages:
    9
    Likes Received:
    11
    GPU:
    Pulse RX Vega 56
    Those are some important and great corrections and additions. I had been wondering what <D> does and would never have stumbled upon \b, which is something I wish I knew before to draw a dark background and then place two disk activity graphs (read, write) over it. Unfortunately I can no longer edit the post to make corrections after 24 hours.
     

  11. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    Correct, multiple overlapped graphs displayed in the same position and represented by one layer is one more frequent usage case for backspace symbol.
     
  12. Streuwinkel

    Streuwinkel New Member

    Messages:
    9
    Likes Received:
    11
    GPU:
    Pulse RX Vega 56
    Here's an example of using \b to layer a shaded background, two graphs and some info text on top of each other. If I could make one request, I'd vote for a multi-line editor for layers.
    upload_2021-6-4_18-4-28.png
    Code:
    <C=55ff4400><B=-14,12>\b<A=11><S>\r<C=ddffffff><S=54>  C:  WD Black NVMe PC SN700<S><A=-3><C=ffffff><I=32,32,64,0,32,32><C>\n<S=20>\r<S>\n<A=-4><AI=Drive Temperature SSD,20,-1,4,97,0,128,20,20,3,0,0>%Drive Temperature SSD% <A=2>\r<S=50>°C<S><A>\r<C=80000000><B=-7,-1>\b<C=8000ff00><G=% Disk Read Time SSD,-7,-1,1,0,100,0>\b<C=80ff0000><G=% Disk Write Time SSD,-7,-1,1,0,100,0><C>\b<S=53> activity<S>\n<S=20>\r<S>\n<C=55ff4400><B=-14,12>\b<A=11><S>\r<C=ddffffff><S=54>  D:  WD Caviar GreenPower 1TB<S><A=-3><C=ffffff><I=32,32,96,0,32,32><C>\n<S=20>\r<S>\n<A=-4><AI=Drive Temperature HDD,20,-1,6,66,0,128,20,20,3,0,0>%Drive Temperature HDD% <A=2>\r<S=50>°C<S><A>\r<C=80000000><B=-7,-1>\b<C=8000ff00><G=% Disk Read Time HDD,-7,-1,1,0,100,0>\b<C=80ff0000><G=% Disk Write Time HDD,-7,-1,1,0,100,0><C>\b<S=53> activity<S>
     
  13. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    I was thinking about some kind of multiline editor for layers myself, but currently I don’t see an elegant and easy implementation for that. So I cannot promise it for sure, but probably it will be introduced one day in the future versions.
     
    Streuwinkel likes this.
  14. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    15,572
    Likes Received:
    2,966
    Starting from 7.3.2 beta 3 hypertext supports dynamic color formulas specified with the same <C> tag. The tag can either specify static color like before, e.g <C=aarrggbb> or specify the formula containing up to 5 color ranges and color selection parameters in the following format:

    <C=color1,range1min,range1max,...colorN,rangeNmin,rangeNmax(source,flags)>

    colorN defines range colors in ARGB format, similar to defining static colors
    rangeNmin and rangeNmax define minimum and maximum limits for each range in floating point format. Either min or max (but not both) can be empty to specify open range
    source is an explicit source color calculation parameter in floating point format (e.g. 59.99) or one of predefined constants allowing hypertext parser to select application specific performance counters as source. The following constants are allowed to be used as a source: FR,FT,FRMIN,FRAVG,FRMAX,FR10L or FR01L .
    flags is a hexadecimal bitmask containing additional dynamic color calculation flags. Currently only bit 0 is supported, color blending is enabled when it is set.

    Examples:

    This dynamic color formula defines color depending on current framerate (FR constant is specified as source) with color blending enabled:

    <C=FF0000,,30,FF0000,30,45,FFFF00,45,60,FFFFFF,60,(FR,1)>

    Alternately, you may explicitly specify source as floating point number to test your formula, for example this tag will calculate a color for 33.3 FPS:

    <C=FF0000,,30,FF0000,30,45,FFFF00,45,60,FFFFFF,60,(33.3,1)>

    Keep in mind that we can use variable slots for dynamic color formulas too, for example this way we define variable slot 5 as dynamic color formula then recalculate colors with this formula for current framerate then for minimum framerate:

    <C5=FF0000,,30,FF0000,30,45,FFFF00,45,60,FFFFFF,60,><C5(FR,1)>this is current framerate color<C5(FRMIN,1)>this is minimum framerate color<C>

    Also take a note that dynamic color formula specified in hypertext immediately before embedded object (e.g. graph) will be used to recalculate colors independently for each sample (i.e. for each point of the graph).

    P.S. Making the thread sticky
     

Share This Page