Unit/tech/effect design - textings: unit/tech name and flavour texts

Post Reply
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by Stratego (dev) »

I am opening this topic so we can collect what should and what should not be in unit, tech and effect names and textings



Unit/tech/effect naming
1. Length: Its length should not exceed the infobox size eg. "Mantis class destroyer" is about the maximum lenght of a name (~22chr)
- but as it is propotionally printed (not all characters with same width) it can differ eg.: more "i" and "l" characters will take up less space than "M" and "W" characters for instance.
2. race/nation: it depends, but in general it should not be included in unit name eg. "German riflemen" should only be "Riflemen" - but it depends on image and game genre (it is arguable, tell me your thoughts). However subrace informations maybe necessary like "Goblin archer"

Flavour Text for units/techs/effects
1. Length: it should not overflow the statsheet (it appears only there) - so about 200~250 characters maximum.
2. NO unit stats in text: in texting never write things like "deals 5 damage" or "increades attack by +1" as these values will surely change in time (via balancing), simply write things like "increases attack" if necessary but dont forget! ALL in game properties are listed on statsheet you dont need to redundantly mention them.
3. DO write general role of unit/tech: if it is not obvious write the general role of a unit or tech, so like "Polearm units are best against mounted cavalry units"
4. DO as Flavour: Also you can chose to write a text for the flavour only, like being part of a real or imaginary story eg. banshee: "A wild spirit screaming in anguish and grief. Captured by the undead, it is destined to inflict piercing shrieks, crippling unfortunate victims."
5. Historical units: All units that can be referenced by image and Wikipedia link should have their texting quoted from that wikipedia page (part of that), so eg. a Tiger tank should have almost only wikipedia texts in it (or some similar historical text, describing historically) - so here not really any in-game approaches like "tanks are good against infantry" and such.
These can be
- surely the historical units (this case it is recommended to use the Wikipedia link and Wikipedia image)
- fictional but still having Wikipedia page eg. "Lich"
so use wikpedia link and image if possible.

Format
most important: You need to escape the ' character: like this: \'
also read here about string files structure: viewtopic.php?f=214&t=10733


anything else i should mention?
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by Endru1241 »

Often upgraded adjective takes too many characters.
Basic unit name can fit, but after making an upgrade for it - it's too long for infobox.
Should we forcefully use something less fitting only to get string shorter?
Or maybe even not very nice short?
Any idea how should we resolve it?

And what about already added units - will we be processinng it to fix misfits?
Age of Strategy design leader
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by Stratego (dev) »

upgraded: can u write some examples? for sure understanding - thanks!
already added units: i am not sure - any suggestions?
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by Endru1241 »

Upgraded adjectives like e.g. "Reinforced", "Elite", "Master", "Heavy".

Already added - we could calculate approximate string width (based on character) check what is maximum that fits and then use python script to list those too long, that need correction.
I found one for english characters in Arial (it's actually just assigning each character a value).
Age of Strategy design leader
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by Endru1241 »

Code: Select all

from os import listdir
from os.path import isfile, join
import xml.etree.ElementTree as ET

def getApproximateArialStringWidth(st):
    size = 0 # in milinches
    for s in st:
        if s in '\\': size += 0
        elif s in 'lij|\' ': size += 37
        elif s in '![]fI.,:;/\\t': size += 50
        elif s in '`-(){}r"': size += 60
        elif s in '*^zcsJkvxy': size += 85
        elif s in 'aebdhnopqug#$L+<>=?_~FZT0123456789': size += 95
        elif s in 'BSPEAKVXY&UwNRCHD': size += 112
        elif s in 'QGOMm%W@': size += 135
        else: size += 50
    return size *96 / 1000.0 # Convert to pixels


strings_filename = "strings.xml"
list_filename = "list_too_long_strings.txt"

f_list_filename = open(list_filename, 'w')

tree = ET.parse(strings_filename)
root = tree.getroot()


for child in root:
    if str(child.get('name')).startswith("UNIT_") and not(str(child.get('name')).startswith("UNIT_TXT")) and getApproximateArialStringWidth(child.text)>173:
          f_list_filename.write(child.get('name') + "    " + child.text + "   " + str(getApproximateArialStringWidth(child.text)) + "\n")

print("All too long unit filenames in " + strings_filename + " were written to " + list_filename + " \n")
input("Press Enter to close...")

I got the value of length too long based on string, that I know barely fit:
"Heavy Trebuchet Stand", which is ~168.7
"Genoese Crossbowman", which is 172.416
"Persian immortal archer", which is 171.552
So anything longer than that would be too long.

For AoS it gave me list of 21 strings, 3 of which are technical (spawn points).
Age of Strategy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit/tech/effect design - textings: unit/tech name and flavour texts

Post by makazuwr32 »

In aof the longest names as i know we have are:
Hippocampus Poison Archer or
Hippocampus Glaive Dancer (and many other Hippocampus-riding units)
Veteran Mounted Hospitalier
Imperial Dragon Knight
Grand Dwarven Double Axeman
Skeleton Flail Knight Armored


And so on.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Post Reply

Return to “Unit Design”