Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dwarf Fortress-inspired naming conventions for Dwarves to the random name generator #240

Merged
merged 21 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Content.Shared/Humanoid/NamingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public string GetName(string species, Gender? gender = null)
case SpeciesNaming.FirstDashFirst:
return Loc.GetString("namepreset-firstdashfirst",
("first1", GetFirstName(speciesProto, gender)), ("first2", GetFirstName(speciesProto, gender)));
case SpeciesNaming.FirstMiddleLast:
return Loc.GetString("namepreset-firstmiddlelast",
("first", GetFirstName(speciesProto, gender)), ("middle", GetMiddleName(speciesProto)), ("last", GetLastName(speciesProto)));
case SpeciesNaming.FirstLast:
default:
return Loc.GetString("namepreset-firstlast",
Expand All @@ -58,6 +61,11 @@ public string GetFirstName(SpeciesPrototype speciesProto, Gender? gender = null)
}
}

public string GetMiddleName(SpeciesPrototype speciesProto)
{
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.MiddleNames).Values);
}

public string GetLastName(SpeciesPrototype speciesProto)
{
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.LastNames).Values);
Expand Down
4 changes: 4 additions & 0 deletions Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public sealed partial class SpeciesPrototype : IPrototype
[DataField]
public string FemaleFirstNames { get; private set; } = "names_first_female";

[DataField]
public string MiddleNames { get; private set; } = "names_middle";

[DataField]
public string LastNames { get; private set; } = "names_last";

Expand Down Expand Up @@ -127,5 +130,6 @@ public enum SpeciesNaming : byte
First,
FirstLast,
FirstDashFirst,
FirstMiddleLast,
TheFirstofLast,
}
Binary file modified Resources/Audio/Voice/Snail/snail_cough.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_cry.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_deathgasp.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_gasp.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_laugh.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_scream.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_sigh.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Snail/snail_yawn.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Talk/snail.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Talk/snail_ask.ogg
Binary file not shown.
Binary file modified Resources/Audio/Voice/Talk/snail_exclaim.ogg
Binary file not shown.
1 change: 1 addition & 0 deletions Resources/Locale/en-US/species/namepreset.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ namepreset-first = {$first}
namepreset-firstlast = {$first} {$last}
namepreset-firstdashfirst = {$first1}-{$first2}
namepreset-thefirstoflast = The {$first} of {$last}
namepreset-firstmiddlelast = {$first} {$middle}{$last}
283 changes: 283 additions & 0 deletions Resources/Prototypes/Datasets/Names/dwarf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
- type: dataset
id: DwarfFirst
values:
- Kilrud
- Ingiz
- Udil
- Ushrir
- Ushat
- Erith
- Doren
- Sarvesh
- Akrul
- Stukos
- Rakust
- Konos
- Kogan
- Sazir
- Morul
- Thob
- Dobar
- Asen
- Uvash
- Kubuk
- Monom
- Athel
- Kel
- Besmar
- Kosoth
- Uzol
- Inod
- Cerol
- Likot
- Ezum
- Fikod
- Edem
- Alath
- Tosid
- Ilral
- Rovod
- Sibrek
- Cog
- Asob
- Urist
- Bim

- type: dataset
id: DwarfMiddle
values:
- Tin
- Relic
- Book
- Lens
- Even
- Mechanical
- Mountainous
- Cuck
- Arch
- Coal
- Inken
- Iron
- Razor
- Volcano
- Furnace
- Created
- Made
- Gem
- Canyon
- Earthen
- Golden
- Copper
- Cobalt
- Silvery
- Basement
- Crafted
- Flag
- Dagger
- Rim
- Avalanche
- Boat
- Armor
- Boot
- Girdle
- Stone
- Vestibular
- Axe
- Paddle
- Seal
- Fear
- Song
- Strange
- Quiet
- Sorry
- Sorrow
- Weapon
- Grave
- Forest
- Fire
- Water
- River
- Spin
- Rough
- Decent
- Speak
- Wind
- Intent
- Knife
- Quake
- Dune
- Bread
- Bake
- Drag
- Sword
- Citrus
- Gloom
- Wing
- Priority
- Frost
- Ferry
- Man
- Real
- Dinner
- Supper
- Big
- Right
- 'True'
- Fat
- Shielded
- Mined
- Gravel
- Sling
- Soft
- Hand
- Aluminum
- Inky
- Manufactured
- Made-of-
- Diamond
- Bronze
- Leaden

- type: dataset
id: DwarfLast
values:
- bodice
- tongs
- gear
- galley
- hammer
- tomb
- town
- portal
- figure
- bodice
- mountain
- fountain
- iron
- razor
- deer
- bear
- wolf
- raven
- fish
- manor
- furnace
- anvil
- work
- treasury
- tour
- crystal
- gem
- halls
- city
- basement
- craft
- roof
- treaty
- hall
- net
- flag
- carrier
- maker
- lifter
- wright
- smith
- er
- dagger
- rack
- rope
- rim
- avalanche
- manor
- ceiling
- boot
- armor
- boat
- lancer
- cudgel
- iron
- even
- girdle
- stone
- post
- salve
- banner
- dye
- ship
- armory
- gorge
- vault
- axe
- creation
- gate
- paddle
- seal
- pallisade
- fear
- message
- sorry
- away
- weapon
- grave
- song
- reflection
- forest
- fire
- water
- river
- rise
- spin
- detail
- rough
- speaker
- wind
- sight
- knife
- quake
- wire
- dune
- bread
- baker
- dragger
- sword
- gloom
- wing
- priority
- frost
- fortress
- ferry
- man
- real
- like
- supper
- dinner
- big
- mercy
- 'true'
- voyage
- fat
- sack
- oil
- urn
- gravel
- sling
- rampart
- anvil
- cobalt
- soft
- silver
- hand
- cannon
- aluminum
- can
- made
- diamond
- bronze
- copper
- smith
- trumpet
- mountain
- oar
- passage
- guild
- silver
5 changes: 5 additions & 0 deletions Resources/Prototypes/Species/dwarf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
markingLimits: MobHumanMarkingLimits
dollPrototype: MobDwarfDummy
skinColoration: HumanToned
maleFirstNames: DwarfFirst
femaleFirstNames: DwarfFirst
middleNames: DwarfMiddle
lastNames: DwarfLast
naming: FirstMiddleLast
Loading