magik hatt

Member
I want any monster to have a small chance to spawn with a custom hue. The same hue for all of them similar to paragons. Would the best way to accomplish this be an edit to basecreature or can I use xmlparagon somehow? If I can use xmlparagon, I think that'd be best, but I don't want to remove paragons either. Would it be possible to limit their spawn in certain areas also? Not tram/fel, but champ spawns for example?
 
Would the best way to accomplish this be an edit to basecreature?
Yes.

can I use xmlparagon somehow?
You could, but it's not necessary.

Would it be possible to limit their spawn in certain areas also?
Yes.

Given your questions, the best place for adding this feature would be in BaseCreature.OnBeforeSpawn( Point3D location, Map m )

C#:
        public override void OnBeforeSpawn(Point3D location, Map m)
        {
            if (Paragon.CheckConvert(this, location, m))
            {
                IsParagon = true;
            }

            // find the region this creature will spawn into
            var reg = Region.Find(location, map);
            
            // only allow hue change in any dungeon region
            if(reg is DungeonRegion && Utility.RandomDouble() < 0.33) // 33%
            {
                Hue = Paragon.Hue; // 0x501
            }

            base.OnBeforeSpawn(location, m);
        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back