Package squidpony

Class ProceduralMessaging.AssociatedName

java.lang.Object
squidpony.ProceduralMessaging.AssociatedName
Enclosing class:
ProceduralMessaging

public static class ProceduralMessaging.AssociatedName
extends Object
Data class that stores a name String and one or more Strings that may be used as part of a title with that name, typically using categories from Thesaurus to add variety.
  • Field Details

  • Constructor Details

    • AssociatedName

      public AssociatedName​(String name, boolean cipherName, String[] themes, String... titles)
      Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form. If you gave this: "Brunhilda", true, new String[]{"ice`noun`"}, "Goddess`noun` of Ice`nouns`", "Winter-Empress`noun`", "Heroine`noun` of the North", it could use any of the terms in Thesaurus associated with the category "ice`noun` as themes, could generate titles like "Mother of Blizzards", "Winter-Queen", and "Maiden of the North", and would not actually show the name "Brunhilda" in use, instead producing some similar-length name using the NaturalLanguageCipher that a ProceduralMessaging is created with (defaulting to generic fantasy names). This overload always treats the being as if it is being addressed directly, in second-person singular form.
      Parameters:
      name - the String name for the being, which will be changed if cipherName is true
      cipherName - if true, the name will be changed using a NaturalLanguageCipher before being shown
      themes - a String array (which may be null) of words that may appear more often regarding this being
      titles - a String array or vararg (which should probably not be null) of special titles for the being
    • AssociatedName

      public AssociatedName​(String name, boolean cipherName, Messaging.NounTrait pronoun, String[] themes, String... titles)
      Creates an AssociatedName with the being's name as a String and any associated themes and titles as String arrays, with a boolean after the name that determines whether the name should be "translated" using a NaturalLanguageCipher to some other form. If you gave this: "Brunhilda", true, new String[]{"ice`noun`"}, "Goddess`noun` of Ice`nouns`", "Winter-Empress`noun`", "Heroine`noun` of the North", it could use any of the terms in Thesaurus associated with the category "ice`noun` as themes, could generate titles like "Mother of Blizzards", "Winter-Queen", and "Maiden of the North", and would not actually show the name "Brunhilda" in use, instead producing some similar-length name using the NaturalLanguageCipher that a ProceduralMessaging is created with (defaulting to generic fantasy names). This overload allows the Messaging.NounTrait to be specified, which allows various ways of addressing the being (first person, second person, or third person; singular or plural; various gender options in the third person).
      Parameters:
      name - the String name for the being, which will be changed if cipherName is true
      cipherName - if true, the name will be changed using a NaturalLanguageCipher before being shown
      pronoun - a NounTrait enum that designates how this being should be addressed (often second person singular, but not always)
      themes - a String array (which may be null) of words that may appear more often regarding this being
      titles - a String array or vararg (which should probably not be null) of special titles for the being