09.11.2012 Views

Hero Designer 6th Edition - Hero Games Company

Hero Designer 6th Edition - Hero Games Company

Hero Designer 6th Edition - Hero Games Company

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Hero</strong> <strong>Designer</strong> <strong>6th</strong> <strong>Edition</strong> Export Formats ■ 53<br />

tag. If there are any subcontainers or tags, they will<br />

be evaluated for each Power.<br />

Once you have written and saved your Export<br />

Format, you’re ready to test it out. Fire up <strong>Hero</strong><br />

<strong>Designer</strong> and try exporting a character with the<br />

new format.<br />

Describing The Format<br />

<strong>Hero</strong> <strong>Designer</strong> has several containers for<br />

specifying general information about the Export<br />

Format.<br />

To specify the display name of the Export<br />

Format to be used in the list of available formats<br />

presented by <strong>Hero</strong> <strong>Designer</strong>, use the container:<br />

<br />

<br />

The text in this container is used as the display.<br />

Everything from the beginning tag to the ending<br />

tag (inclusive) will be removed from the final export<br />

file. The name should be kept short for display<br />

purposes.<br />

To specify the description of the Export Format<br />

to be displayed in this list, use the container:<br />

<br />

<br />

The text contained between these two tags<br />

will appear as the format’s description in the list<br />

of available Export Formats presented by <strong>Hero</strong><br />

<strong>Designer</strong>. Everything from the beginning tag to the<br />

ending tag (inclusive) will be removed from the<br />

final export file.<br />

To specify the valid file extensions for files<br />

exported using this Export Format, use the<br />

container:<br />

<br />

<br />

This container can be repeated multiple times.<br />

For example:<br />

html<br />

htm<br />

Replacement Containers<br />

Occasionally, when creating a <strong>Hero</strong> <strong>Designer</strong><br />

Export Format, you may find it useful to be able to<br />

replace one string of text in the output with another<br />

each time the first string occurs. You can do this by<br />

using the REPLACE container and its associated<br />

subcontainers. For example:<br />

<br />

abc<br />

xyz<br />

<br />

replaces each occurrence of the string “abc” (as<br />

specified by the DEFSTRING subcontainer) with<br />

the string “xyz” (as specified by the REPSTRING<br />

subcontainer).<br />

For more sophisticated replacements, <strong>Hero</strong><br />

<strong>Designer</strong> provides the REG_REPLACE container<br />

and its subcontainers. This container has the form:<br />

<br />

… <br />

… <br />

<br />

This is similar to the REPLACE container except<br />

that the REGSTRING subcontainer contains a<br />

regular expression. Regular expressions are complex<br />

constructions that specify a pattern of characters<br />

to be matched. They are particularly common in<br />

many UNIX utilities and in languages like Perl.<br />

A discussion of regular expressions is beyond the<br />

scope of this manual; however, the a quick web<br />

search should turn up plenty of information if<br />

you are not already familiar with the concept. The<br />

REPSTRING subcontainer specifies the string that<br />

will replace the strings matched by the regular<br />

expression in the REGSTRING subcontainer.<br />

MATH Container<br />

<strong>Hero</strong> <strong>Designer</strong> also allows you to perform<br />

basic mathematical calculation with the MATH<br />

container. The contents of this container is a<br />

mathematical expression. In the exported file, the<br />

MATH container is replaced with the calculated<br />

value of the expression. For example:<br />

<br />

3 * <br />

<br />

is replaced with the value of 3 times the<br />

character’s STR characteristic.<br />

Mathematical expressions in the MATH<br />

container can use the four basic mathematical<br />

operations (+, -, *, and /) as well as parentheses.<br />

Conditional Containers<br />

<strong>Hero</strong> <strong>Designer</strong> features a variety of conditional<br />

containers. These containers (which normally begin<br />

with IF or IS) only have their contents included in<br />

the exported files if the condition is true.<br />

For example, the following container only has<br />

its contents included if the character has purchased<br />

any Maneuvers:<br />

<br />

<br />

Similarly, the following container only has its<br />

contents included if the current item is in a list or<br />

Framework:<br />

<br />

<br />

Looping Containers<br />

This section describes looping containers and<br />

some of the tags and other containers that can be<br />

used in conjunction with them.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!