private void GenerateName()
    {
        _rngOffset = RngOffsets.REGION_GENERATE_NAME + unchecked ((int)Language.Id);

        string untranslatedName;

        int wordCount = 1;

        List <RegionAttribute.Instance> remainingAttributes = new List <RegionAttribute.Instance>(AttributeList);

        RegionAttribute.Instance primaryAttribute = remainingAttributes.RandomSelectAndRemove(GetRandomInt);

        List <Element.Instance> remainingElements = new List <Element.Instance>(Elements);

        Element.Instance firstElementInstance = remainingElements.RandomSelect(GetRandomInt, 5, true);
        Element          firstElement         = null;

        IEnumerable <string> possibleAdjectives = primaryAttribute.Adjectives;

        if (firstElementInstance != null)
        {
            possibleAdjectives = firstElementInstance.Adjectives;

            wordCount++;

            firstElement = firstElementInstance.Element;
        }

        string primaryAttributeNoun = primaryAttribute.GetRandomVariation(GetRandomInt);

        if ((firstElementInstance != null) && primaryAttributeNoun.Contains(firstElement.SingularName))
        {
            firstElementInstance = null;
        }

        string secondaryAttributeNoun = string.Empty;

        int elementFactor = (firstElementInstance != null) ? 8 : 4;

        float secondaryAttributeChance = 4f / (elementFactor + possibleAdjectives.Count());

        if ((remainingAttributes.Count > 0) && (GetRandomFloat() < secondaryAttributeChance))
        {
            RegionAttribute.Instance secondaryAttribute = remainingAttributes.RandomSelectAndRemove(GetRandomInt);

            secondaryAttributeNoun = Language.CreateNounAdjunct(secondaryAttribute.GetRandomVariation(GetRandomInt)) + " ";

            if ((firstElementInstance != null) && secondaryAttributeNoun.Contains(firstElement.SingularName))
            {
                firstElementInstance = null;
            }

            if (firstElementInstance == null)
            {
                possibleAdjectives = possibleAdjectives.Union(secondaryAttribute.Adjectives);
            }

            wordCount++;
        }

        string adjective = possibleAdjectives.RandomSelect(GetRandomInt, (int)Mathf.Pow(2, wordCount));

        if (!string.IsNullOrEmpty(adjective))
        {
            adjective = "[adj]" + adjective + " ";
        }

        string elementNoun = string.Empty;

        if (firstElementInstance != null)
        {
            elementNoun = Language.CreateNounAdjunct(firstElementInstance.SingularName) + " ";
        }

        untranslatedName = "[Proper][NP](" + adjective + elementNoun + secondaryAttributeNoun + primaryAttributeNoun + ")";

        _name = new Name(untranslatedName, Language, World);
    }
    public string GetRandomUnstranslatedAreaName(GetRandomIntDelegate getRandomInt, bool isNounAdjunct)
    {
        string untranslatedName;

        Element.Instance elementInstance = Elements.RandomSelect(getRandomInt, isNounAdjunct ? 5 : 20);

        List <RegionAttribute.Instance> remainingAttributes = new List <RegionAttribute.Instance>(AttributeList);

        RegionAttribute.Instance attribute = remainingAttributes.RandomSelectAndRemove(getRandomInt);

        List <string> possibleAdjectives = attribute.Adjectives;

        bool addAttributeNoun = true;

        int wordCount = 0;

        if (elementInstance != null)
        {
            possibleAdjectives = elementInstance.Adjectives;

            wordCount++;

            if (isNounAdjunct && (getRandomInt(10) > 4))
            {
                addAttributeNoun = false;
            }
        }

        string attributeNoun = string.Empty;

        if (addAttributeNoun)
        {
            attributeNoun = attribute.GetRandomVariation(getRandomInt);

            if ((elementInstance != null) && attributeNoun.Contains(elementInstance.SingularName))
            {
                elementInstance = null;
            }

            wordCount++;
        }

        int nullAdjectives = 4 * wordCount * (isNounAdjunct ? 4 : 1);

        string adjective = possibleAdjectives.RandomSelect(getRandomInt, nullAdjectives);

        if (!string.IsNullOrEmpty(adjective))
        {
            adjective = "[adj]" + adjective + " ";
        }

        string elementNoun = string.Empty;

        if (elementInstance != null)
        {
            elementNoun = Language.CreateNounAdjunct(elementInstance.SingularName) + ((addAttributeNoun) ? " " : string.Empty);
        }

        untranslatedName = adjective + elementNoun;

        if (isNounAdjunct)
        {
            untranslatedName += (addAttributeNoun) ? Language.CreateNounAdjunct(attributeNoun) : string.Empty;
        }
        else
        {
            untranslatedName += attributeNoun;
        }

//#if DEBUG
//        if ((Manager.RegisterDebugEvent != null) && (Manager.TracingData.Priority <= 0))
//        {
//            //if (Manager.TracingData.RegionId == Id)
//            //{
//            SaveLoadTest.DebugMessage debugMessage = new SaveLoadTest.DebugMessage(
//                "RegionInfo.GetRandomUnstranslatedAreaName - Region.Id:" + Id,
//                "CurrentDate: " + World.CurrentDate +
//                ", EstablishmentDate: " + EstablishmentDate +
//                ", attribute.Name: " + attribute.Name +
//                ", Attributes.Count: " + Attributes.Count +
//                ", AttributeNames: [" + string.Join(",", AttributeNames.ToArray()) + "]" +
//                ", nullAdjectives: " + nullAdjectives +
//                ", possibleAdjectives: [" + string.Join(",", possibleAdjectives) + "]" +
//                ", untranslatedName: " + untranslatedName +
//                "");

//            Manager.RegisterDebugEvent("DebugMessage", debugMessage);
//            //}
//        }
//#endif

        return(untranslatedName);
    }