FIXED Mining for Niter deposits in Dungeons and Ilshenar

Cid

Novice III
RedBeard and I have both been mining for Niter deposits which give Saltpeter. (an ingredient used in making black powder)

We can confirm that the deposits can indeed be found while mining from a boat. We have also found that having a high luck value helps with the quality and quantity of Saltpeter. However, Ilshenar and the dungeons in Tram and Fell have yet to produce a Niter deposit for us. Ilshenar is to be considered an at large Dungeon when it comes to mining Niter deposits. All i have been able to mine in the Dungeons is ore, gems, stone, and blackrock pieces.

www.uoguide.com/Mining
forum.uo.com/discussion/3795/where-have-the-niter-deposits-gone

While I do not have an account to check results on the OSI production shards, RedBeard has agreed to test our theory on production shards when he has time.

This is taken inside Blackthorns Dungeon, Tram. Not much to show really. Bust!

Blackthorn.png

This is taken from my boat. Success!

Niter.png
 
OP
Cid

Cid

Novice III
Great, glad to see some success inside a Dungeon. Maybe the mechanic for the Dungeons isn't broken after all? That would leave Ilshenar. Has anyone had any success within the confines of Ilshenar?

I tried three different Dungeons in Tram, Covetous, Blackthorn and Shame. In fell I tried Destard, Covetous and Despise. I didn't find any deposits in any of the locations I tried within the Dungeons. Additionally, I tried all over Ish including Twisted Weald, Serpentine Passage, the rock faces leading to the Rock dungeon. Generally all over the place. My GM miner, is equipped with the +5 mining gloves and has over 2,200 luck while mining. I did not find any deposit in Ilshenar at all.

When I get a chance later this weekend I will try Malas, Ter Mur, and Tokuno.

This is taken from UO Guide.com:

Niter can only be mined in areas designated as dungeons (Ilshenar is considered a dungeon in this mechanic) or when on a boat. Mining skill and Luck are factors in determining a miner's success at locating niter deposits. Niter deposits can not be picked up. Niter deposits may sometimes spawn within the mountain they are discovered; when this happens, they can be mined by targeting their Context Menu.

Dungeon Mining​

For dungeon mining, once an 8x8 area has been checked for saltpeter, it won't be checked again for 5 minutes. In other words, the same location can be checked for niter deposits every 5 minutes, regardless of the success of the previous try.
GM Miners will discover a niter deposit inside a dungeon on their first strike, provided that there is one within an 8x8 tile location.

Boat Mining​

For boat mining, the chance of finding a deposit is checked for each swing of the pickaxe, but the chance to find a niter deposit and the niter deposit sizes are a lot less than dungeon mining (roughly one third of the chance for dungeon mining). It is reported that a GM Miner with 750 luck has 1.25% chance to find a niter deposit from a boat per mining attempt.

Categories:
 

Bob

Journeyman
The Legend
maybe a trick, not sure,
im guessing chance to pull niter on first mining attempt in tram and fel dungeons ,
if you dont pull niter on first try, move forward 8 tiles and try again

Thinking after "first mining try (with or without getting niter)" 5 or 10 min delay before you have a chance to pull niter from that tile again
 
Last edited:

Dan

Staff Member
Administrator
Game Master
Code:
public override bool SpecialHarvest(Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc)
        {
            HarvestBank bank = def.GetBank(map, loc.X, loc.Y);

            if (bank == null)
                return false;

            bool boat = Multis.BaseBoat.FindBoatAt(from, from.Map) != null;
            bool dungeon = IsDungeonRegion(from);

            if (!boat && !dungeon)
                return false;

            if (boat || !NiterDeposit.HasBeenChecked(bank))
            {
                int luck = from is PlayerMobile mobile ? mobile.RealLuck : from.Luck;
                double bonus = from.Skills[SkillName.Mining].Value / 9999 + (double)luck / 150000;

                if (boat)
                    bonus -= bonus * .33;

                if (dungeon)
                    NiterDeposit.AddBank(bank);

                if (Utility.RandomDouble() < bonus)
                {
                    int size = Utility.RandomMinMax(1, 5);

                    if (luck / 2500.0 > Utility.RandomDouble())
                        size++;

                    NiterDeposit niter = new NiterDeposit(size);

                    if (!dungeon)
                    {
                        niter.MoveToWorld(new Point3D(loc.X, loc.Y, from.Z), from.Map);
                        from.SendLocalizedMessage(1149918, niter.Size.ToString()); //You have uncovered a ~1_SIZE~ deposit of niter! Mine it to obtain saltpeter.
                        NiterDeposit.AddBank(bank);
                        return true;
                    }

                    for (int i = 0; i < 50; i++)
                    {
                        int x = Utility.RandomMinMax(loc.X - 2, loc.X + 2);
                        int y = Utility.RandomMinMax(loc.Y - 2, loc.Y + 2);
                        int z = from.Z;

                        if (from.Map.CanSpawnMobile(x, y, z))
                        {
                            niter.MoveToWorld(new Point3D(x, y, z), from.Map);
                            from.SendLocalizedMessage(1149918, niter.Size.ToString()); //You have uncovered a ~1_SIZE~ deposit of niter! Mine it to obtain saltpeter.
                            return true;
                        }
                    }

                    niter.Delete();
                }
            }

            return false;
        }

        private bool IsDungeonRegion(Mobile from)
        {
            if (from == null)
                return false;

            Map map = from.Map;
            Region reg = from.Region;
            Rectangle2D bounds = new Rectangle2D(0, 0, 5114, 4100);

            if ((map == Map.Felucca || map == Map.Trammel) && bounds.Contains(new Point2D(from.X, from.Y)))
                return false;

            return reg != null && (reg.IsPartOf<Regions.DungeonRegion>() || map == Map.Ilshenar);
        }
This is the code that handles the special harvest.

I am seeing
Code:
map == Map.Ilshenar
under the
Code:
IsDungeonRegion
bool so Ilshenar should work but more testing may be required if no one can seem to get anything.

If any of our other coders out there notice something wrong with this logic please let us know here. Here is where the code posted above sits within Mining.cs
 
OP
Cid

Cid

Novice III
maybe a trick, not sure,
im guessing chance to pull niter on first mining attempt in tram and fel dungeons ,
if you dont pull niter on first try, move forward 8 tiles and try again

Thinking after "first mining try (with or without getting niter)" 5 or 10 min delay before you have a chance to pull niter from that tile again
Ya, not sure. I just kept moving from one 8 X 8 grid to the next, with me however it's usually the dreaded RNG. Thanks for your input!

I might also add that while boat mining yesterday I came across a deposit at location 2801 42-2 Tram. Even though I recieved a message saying I had found a deposit the graphic did not change and I was unable to mine, even through the context menu. The message I received was: "Target cannot be seen".

I will keep looking, not a game stopper for sure....:)
 
Last edited:
OP
Cid

Cid

Novice III
I found another location today that could not be mined for the Niter deposit. Location: 2748 54-2 Tram
The error message was the same "Target cannot be seen"

Gig.png
 
OP
Cid

Cid

Novice III
I have heard discussions in the past (years ago) that this particular area is close to a server line, almost right on top of it in fact. Perhaps thats what is causing the difficult mining locations? Today alone I have had to mine 4 deposits through the context menu.
 

Majere

Neophyte II
I never found a niter deposit in Ilshenar, so I decided to ask ChatGPT to take a look at the code :)

PROBABLE ISSUE: from.Region == null in Ilshenar


If from.Region is null (or not properly set for Ilshenar areas), then the line:



return reg != null && (reg.IsPartOf<Regions.DungeonRegion>() || map == Map.Ilshenar);


will always return false, regardless of the map check, because it's short-circuited by reg != null.


✅ Suggested Fix:​


Change the logic to evaluate map == Map.Ilshenar even if reg == null.


Fix It Like This:​



Code:
private bool IsDungeonRegion(Mobile from)
{
if (from == null)
return false;

Map map = from.Map;
Region reg = from.Region;
Rectangle2D bounds = new Rectangle2D(0, 0, 5114, 4100);

// Skip if in normal surface areas of Fel/Tram
if ((map == Map.Felucca || map == Map.Trammel) && bounds.Contains(new Point2D(from.X, from.Y)))
return false;

// Check Ilshenar first before checking region (so reg being null won't skip Ilshenar)
if (map == Map.Ilshenar)
return true;

return reg != null && reg.IsPartOf<Regions.DungeonRegion>();
}




✅ Why This Works:​


  • Now, even if from.Region is null, players in Map.Ilshenar will be treated as being in a "dungeon" region.
  • Players in Felucca/Trammel surface areas are still correctly excluded.
 

Majere

Neophyte II
I spent some time mining in Ilshenar today, but haven’t found any niter yet... Might need more testing.

ChatGPT doesn't see the issue today, even though it found it yesterday.
 
Last edited:

Dan

Staff Member
Administrator
Game Master
I spent some time mining in Ilshenar today, but haven’t found any niter yet... Might need more testing.

ChatGPT doesn't see the issue today, even though it found it yesterday.
I fixed the issue ChatGPT pointed out. The odds are still kind of low, and I believe luck plays a part? Let's give it a few days and see if anyone else has any success.
 

Bob

Journeyman
The Legend
last time i mined niter , sometime ago, in my best luck suit, only mining spot 1 time, then moving 8 tiles and repeat,
i would find niter every 5 or 10 min,
but now i would just buy saltpeter from npc's ...


1757543645674.png
 

Majere

Neophyte II
last time i mined niter , sometime ago, in my best luck suit, only mining spot 1 time, then moving 8 tiles and repeat,
i would find niter every 5 or 10 min,
but now i would just buy saltpeter from npc's ...


View attachment 5262
Did you mine niter in Ilshenar earlier? Maybe there wasn’t a bug after all… I don’t have a luck suit on my miner — maybe I was just 'unlucky' until the last try.
 

Dan

Staff Member
Administrator
Game Master
I mark this back as "fixed" but if anything else comes up, please let me know.

Thanks, everyone!
 

PLAY NOW

Heritage

Address
play.trueuo.com
Port
2593
Uptime
10 hours
Players Online
14
Houses
879
Vendors
282
Gold
5,361,777,084gp
Top Bottom