예제 #1
0
        /// <summary>
        /// Get the entity race corresponding to that read from FACTION.TXT. Only
        /// default races are supported.
        /// </summary>
        /// <param name="factionRace">The faction race</param>
        /// <returns>The corresponding entity race.</returns>
        public static Races GetRaceFromFactionRace(FactionFile.FactionRaces factionRace)
        {
            switch (factionRace)
            {
            case FactionFile.FactionRaces.None:
                return(Races.None);

            case FactionFile.FactionRaces.Nord:
                return(Races.Nord);

            case FactionFile.FactionRaces.Khajiit:
                return(Races.Khajiit);

            case FactionFile.FactionRaces.Redguard:
                return(Races.Redguard);

            case FactionFile.FactionRaces.Breton:
                return(Races.Breton);

            case FactionFile.FactionRaces.Argonian:
                return(Races.Argonian);

            case FactionFile.FactionRaces.WoodElf:
                return(Races.WoodElf);

            case FactionFile.FactionRaces.HighElf:
                return(Races.HighElf);

            case FactionFile.FactionRaces.DarkElf:
                return(Races.DarkElf);
            }

            return(Races.None);
        }
예제 #2
0
        private void Start()
        {
            // Cache references
            playerGPS      = GameManager.Instance.PlayerGPS;
            dfLocation     = GetComponent <DaggerfallLocation>();
            cityNavigation = GetComponent <CityNavigation>();

            // Get dominant race in locations climate zone
            populationRace = playerGPS.ClimateSettings.People;

            // Calculate maximum population
            int totalBlocks      = dfLocation.Summary.BlockWidth * dfLocation.Summary.BlockHeight;
            int populationBlocks = Mathf.Clamp(totalBlocks / 16, 1, 4);

            maxPopulation = populationBlocks * populationIndexPer16Blocks;
        }
예제 #3
0
        void AssignRace()
        {
            // Use faction race only for individuals
            if (isIndividualNPC)
            {
                FactionFile.FactionRaces factionRace = (FactionFile.FactionRaces)factionData.race;
                if (factionRace != FactionFile.FactionRaces.None)
                {
                    switch (factionRace)
                    {
                    case FactionFile.FactionRaces.Redguard:
                        race = Races.Redguard;
                        return;

                    case FactionFile.FactionRaces.Nord:
                        race = Races.Nord;
                        return;

                    case FactionFile.FactionRaces.DarkElf:
                        race = Races.DarkElf;
                        return;

                    case FactionFile.FactionRaces.WoodElf:
                        race = Races.WoodElf;
                        return;

                    case FactionFile.FactionRaces.Breton:
                    default:
                        race = Races.Breton;
                        return;
                    }
                }
            }

            // Otherwise use race of current region
            race     = GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion();
            nameBank = GameManager.Instance.PlayerGPS.GetNameBankOfCurrentRegion();
        }
예제 #4
0
        /// <summary>
        /// Get the entity race corresponding to that read from FACTION.TXT.
        /// Only Breton, Redguard, Nord, Dark Elf and Wood Elf are supported.
        /// Any other faction race will default to Breton.
        /// </summary>
        /// <param name="factionRace">The faction race</param>
        /// <returns>The corresponding entity race.</returns>
        public static Races GetRaceFromFactionRace(FactionFile.FactionRaces factionRace)
        {
            switch (factionRace)
            {
            case FactionFile.FactionRaces.None:
                return(Races.None);

            case FactionFile.FactionRaces.Redguard:
                return(Races.Redguard);

            case FactionFile.FactionRaces.Nord:
                return(Races.Nord);

            case FactionFile.FactionRaces.DarkElf:
                return(Races.DarkElf);

            case FactionFile.FactionRaces.WoodElf:
                return(Races.WoodElf);

            case FactionFile.FactionRaces.Breton:
            default:
                return(Races.Breton);
            }
        }