-
-
Notifications
You must be signed in to change notification settings - Fork 248
Name Generator
In the extractor, the "G"-button near the creature's name can be used to automatically create a name for that creature. The idea and first implementations are from @tsebring and @SkyDotNET, later @eaglexmw-gmail added some functions.
To use this feature, a naming-pattern has to be defined by right-clicking on the "G"-button near the creature-name input. E.g. a pattern like {species} {sex_short}-{hp} {dm}
could create a name like "Argentavis F-38 40" for a female argentavis with 38 levels in HP and 40 levels in damage.
Any characters that don't match a key-word will not be changed. E.g. a pattern like {species} (Joe's)
for an Argentavis will create Argentavis (Joe's)
.
For a complete list of possible key-words see the pattern editor in the application. Listed here are some keywords as example.
-
{species}
: species name -
{spcsNm}
: species name without vowels -
{firstWordOfOldest}
: the first word of the name of the first added creature of the species -
{sex}
: sex ("Male", "Female", "Unknown") -
{sex_short}
: "M", "F", "U" -
{yy}
: current year with 2 digits -
{MM}
: current month with 2 digits -
{dd}
: current day of the month with 2 digits -
{hh}
: current hours (24 h format) -
{mm}
: current minutes -
{ss}
: current seconds -
{date}
: current yy-MM-dd -
{time}
: current hh:mm:ss -
{n}
: if the name is not unique, the smallest possible number is appended (only creatues with a given sex are considered). -
{highest1s}
: the abbreviation of the name of the highest stat of that creature. -
{highest2s}
: the abbreviation of the name of the second highest stat of that creature. (works up to{highest4s}
) -
{highest1l}
: the level of the highest stat of that creature. -
{highest2l}
: the level of the second highest stat of that creature. (works up to{highest4l}
) -
{n}
: if the generated name already exists, the smallest number that makes the name unique is added. E.g. if you pattern is{species} {n}
, and you have a creatures namedRex 1
andRex 3
, the next rex is namedRex 2
and then the nextRex 4
,Rex 5
etc.
-
{hp}
: Health -
{st}
: Stamina -
{to}
: Torpidity -
{ox}
: Oxygen -
{fo}
: Food -
{wa}
: Water -
{te}
: Temperature -
{we}
: Weight -
{dm}
: MeleeDamageMultiplier -
{sp}
: SpeedMultiplier -
{fr}
: TemperatureFortitude -
{cr}
: CraftingSpeedMultiplier
-
{hp_vb}
: Breeding value of Health -
{st_vb}
: Breeding value of Stamina -
{to_vb}
: Breeding value of Torpidity -
{ox_vb}
: Breeding value of Oxygen -
{fo_vb}
: Breeding value of Food -
{wa_vb}
: Breeding value of Water -
{te_vb}
: Breeding value of Temperature -
{we_vb}
: Breeding value of Weight -
{dm_vb}
: Breeding value of MeleeDamageMultiplier -
{sp_vb}
: Breeding value of SpeedMultiplier -
{fr_vb}
: Breeding value of TemperatureFortitude -
{cr_vb}
: Breeding value of CraftingSpeedMultiplier
-
{effImp}
: Taming-effectiveness or Imprinting (depending if the creature was bred or tamed) -
{gen}
: Number of generations -
{gena}
: Number of generations in letters, e.g. generation 0 is 'A', generation 1 is 'B', generation 26 is 'AA' etc. -
{muta}
: Number of mutations -
{rnd}
: random number 100000 - 999999 -
{tn}
: number of creatures of the current species in the library + 1
Functions can be used for more complex patterns. They are enclosed by double brackets and start with a hash. In general they look like {{#functionName: parameter1 | parameter2 | parameter3 }}
. Functions can be nested, e.g. {{#casing: {{#substring: {species} | 0 | 4 }} | U }}
will result in ANKY
for an Ankylosaurus
.
A conditional expression first checks for a condition and then creates text depending on if that condition is fulfilled. The only condition currently supported is a check if a stat is a top stat (i.e. the highest of all creatures of the same species in the library).
The syntax is {{#if: isTopXX | text if true | text if false }}
. XX
has to be replaced with the English 2-letter abbreviation of the according stat, e.g. Hp for Health, St for Stamina, etc. (see list above). The text if false can be omitted. For example {{#if: isTopHP | TopHP | noTopHP }}
will result in TopHP if the creature has a top stat in health and in noTopHP else. You can also use other patterns in the conditional expression like {{#if: isTopHP | HP {hp} }}
, which will result in HP 42 if the creature has 42 levels in HP and if this is a top stat.
{{#substring: text | start | length }}
. Length can be ommited. If start is negative it takes the characters from the end. E.g. {{#substring: {species} | 0 | 4 }}
will result in Anky
for an Ankylosaurus
.
{{#replace: text | find | replaceBy }}
, e.g. {{#replace: {species} | Abberant | Ab }}
will result in Ab Rex
for an Aberrant Rex
.
Spaces are removed and ignored from the find and replace string. If they should be considered, use
for a space.
{{#customreplace: text }}
will check if the text is listed in a specific json file and then replace it with the according value. The file could look like
{
"Allosaurus": "Allo",
"Snow Owl": "Owl"
}
For this file, {{#customreplace: {species} }}
will transform Snow Owl to Owl for a snow owl and will do nothing for a rex. That way for all species (or other text) custom replacings can be specified. That file has to be named customReplacings.json and needs to be in the json-folder of ASB (i.e. in the ASB folder for the zip-version or the local-data folder for the installed version).
Divide by. {{#div: number | divisor }}
, can be used to display stat-values in thousands, e.g. '{{#div: {hp_vb} | 1000 }}kHP' will result in
12kHP` if a creature has a stat value of 12540 for HP.
Divide by with possible float numers as result. {{#float_div: number | divisor | formatString }}
, can be used to display stat-values in thousands with decimal digits, e.g. '{{#div: {hp_vb} | 1000 | F2 }}kHP' will result in
12.54kHP` if a creature has a stat value of 12540 for HP.
{{#padleft: number | length | padding character }}
, e.g. {{#padleft: {hp_vb} | 8 | 0 }}
{{#padright: number | length | padding character }}
, e.g. {{#padright: {hp_vb} | 8 | _ }}
{{#casing: text | casingtype (U, L , T) }}
. U for UPPER, L for lower, T for Title. E.g. {{#casing: {species} | U }}
will result in REX
for a rex.
{{#format: number | formatString }}
, e.g. {{#format: {hp_vb} | 000000 }}
For possible format-strings see Numeric format string.
The characters {
, |
and }
are used in the function syntax, if you want to literally use these characters in the resulting name, use
-
{
for{
-
&vline;
for|
-
}
for}
.