description
Entities need IDs for serving translations (even English is pulled in through the TranslationServer) and judging comparisons.
structure
translation key
Translation IDs are 6-or-8-character strings. I like to use letters and follow a pattern, so random words can bubble up through the babble.
TL keys are 6 characters (favoring letters), and "de" is prefixed for their description. The first 2 letters indicate the category, while the last 4 indicate the individual. The last four are kind of freeform, usually the first 2 letters of each word of the English display name. If it's only one word, then it's its first 4 letters. If it's too short, "a" is suffixed for padding. If that pattern would recreate an existing code, I smudge which significant name characters are taken. If "a" is already used, I use "b," "c," all the way to 9.
ID category prefixes:
- ac - container
- ap - smartphone app
- as - app store
- at - perk/attribute
- ch - character
- ev - event/cutscene
- fa - faction
- hi - highlight
- ho - hotkey/control
- hu - HUD - target, health, etc
- ic - item category
- in - inspect
- ir - rarity
- it - item
- jo - job
- ke - keyword
- me - messenging app
- mn - main menu
- mu - music app
- ph - phone
- pi - pictures
- sk - skill
- sl - skill library
- te - term (plain, normal technical words)
- ti - time
- wo - unsorted words, includes game title
base ID
Base IDs apply to a few other things, but it's virtually only for entities. They identify a specific type of entity, not a particular instance of that entity. They are 6-character hexadecimal strings (favoring numbers). I like that they correspond to color hex codes, so I can find out everyone's secret color. Generally, a category's earliest and most representative entities are the purest in hue.
The first three digits represent categorization, while the last increment by one for each member within that group. Commons start at 000 and increment numerically, while elites and bosses start at aaa and increment alphabetically.
- 0 - default
- 1 - skill
- 0 - common
- 0 - roleplay
- 1 - linguist
- 1 - armsman
- 0 - fitness
- 1 - power
- 2 - artistry
- 3 - tactics
- 2 - disciple
- 0 - santification
- 1 - power over nature
- 2 - spiritual healing
- 3 - divine protection
- 3 - tamer
- 0 - mimicry
- 1 - husbandry
- 2 - empathy
- 3 - survival
- 4 - brawler
- 0 - critical eye
- 1 - dirty fighting
- 2 - improvisation
- 3 - street smarts
- 5 - chemist
- 0 - cognate sciences
- 1 - pharmacology
- 2 - toxicology
- 3 - materials engineering
- 6 - hacker
- 0 - social engineering
- 1 - surveillance
- 2 - robotics
- 3 - gadgetry
- 7 - Mercur
- 0 - supernal
- 1 - projectile
- 2 - environment
- 3 - unlearnable
- 4 - job perk
- a - tycoon
- 0 - perpetuity/diversified portfolio
- 1 - negotiation
- 2 - deceptive marketing
- 3 - invisible hand
- b - traffic control
- 0 - extraplanar refuge
- 1 - footwork
- 2 - alteration/landscaping
- 3 - networking
- 2 - character (next digits indicate job and whether it offers a service)
- 0 - dungeon girls
- 1 - boss
- the second digit is its species then the other stuff
- 2 - human
- 3 - Canaanite
- 4 - beast
- 0 - mammal
- 0 - unsorted
- 1 - rodent/bat/eulipotyphian
- 2 - cat
- 3 - dog
- 4 - bear
- 5 - ungulate
- 1 - bird
- 2 - reptile
- 3 - amphibian
- 4 - fish
- 5 - bug
- 5 - slime
- 6 - construct
- 7 - Mercurians
- 0 - avatar
- 1 - projectile
- 8 - machine
- 3 - item
- 0 - currency
- 1 - quest item
- 2 - equipment
- 3 - consumable
- 0 - food/medicine
- 1 - item generator
- 4 - flyer/book
- 5 - container
- 6 - upgrade/constant code/automatic effect
- 7 - key
- 8 - trinket
- 4 - location (followed by 0 - safe zone, 1 - combat zone)
- 0 - nowhere
- 1 - subdivision
- 2 - school
- 3 - commercial district
- 4 - woods
- 5 - parking
- 6 - underground
- 7 - buffer
- 8 - dumping ground
- 9 - factory
- a - moonlight caverns
- b - gypsum stone gardens
- c - serpent city
- d - firewall
- 5 - app
- 6 - activator
- 0 - chest
- 1 - button/switch
- 2 - sign/lectern
- 7 - job
- 0aaaa - idle
- 1aaaa - armsman
- 2aaaa - disciple
- 3aaaa - tamer
- 4aaaa - brawler
- 5aaaa - chemist
- 6aaaa - hacker
- 7aaaa - mailman
- a0000 - tycoon
- b0000 - traffic control
- 8 - perk/attribute
- matches the skill section's job & attribute values
- 9 - keyword
- 0 - primitive
- 1 - damage
- 2 - spiritual damage
- 1 - status effect
- 1 - burning (intense but brief life degen)
- 2 - bleeding (weak but lengthy life degen)
- 3 - shocked/stunned/paralyzed/stiff (can't move, use skills with an activation time, or change equipment. Very brief.)
- 4 - foggy/distracted/doubtful (miracle activation doubled and easily interrupted)
- 5 - pain/injury/throes/agony (reduced max life)
- 6 - blind/blurry (miss melee and projectile attacks)
- 7 - sleepy (reduced regen for spirit and life)
- 8 - confused (scrambles skillbar, adjusts movement vector)
- 9 - weakness/feeble - reduced attributes, attack power
- 10 - doubt - can't perform miracles
- 11 - heavy/crippled/slow/slug - move and attack more slowly
- 12 - pacified - can't attack
- 13 - sick - (can't regen health)
- 2 - unsorted
ref ID
Every entity with the base.gd script has a ref ID that is an integer between 0 and ∞. It identifies a specific instance of an entity.
structure
translation key
Every entity has an exported String name_key variable, and its desc_key can be derived from it by prefixing it with "de."
Every entity also has the get_display_name
and write_name
methods (same thing), plus write_desc
. Use these to get the name and desc.
base ID
Every entity has an exported Color base_id variable. It also has a reference to the player_base_id and perk base ids.
Get the base_id with get_base_id()
(as Color) and get_base_id_in_hex()
(in a String).
To determine if the entity is the player, call get_is_player()
. To determine if the entity is a perk, call get_is_perk()
.
ref ID
The MessageBus assigns them sequentially as integers starting at 0 during the _ready stage of each entity. The earlier the ref ID, the older the entity.