Go Back   RunUO - Ultima Online Emulation > RunUO > General Discussion

General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT!

Reply
 
Thread Tools Display Modes
Old 05-13-2004, 07:25 PM   #1 (permalink)
 
Join Date: Oct 2003
Location: bulgaria->sofia
Age: 31
Posts: 65
Send a message via ICQ to Fluke
Default Luck and suggested patch

Because bugzilla doesn`t work I`m asking here, what actually seggested patch for bug in luck sistem in 1.0 do. The bug was that loot from creatures that drop 1 item has more increased bonuses than other with richer loot. The patch was:
lootpack.cs
Code:
public void Generate( Mobile from, Container cont, bool spawning, int luckChance )
{
	if ( cont == null )
		return;

	bool checkLuck = Core.AOS;

	for ( int i = 0; i < m_Entries.Length; ++i )
	{
		LootPackEntry entry = m_Entries[i];

		bool shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );

		if ( !shouldAdd && checkLuck )
		{
			checkLuck = false;
			shouldAdd = LootPack.CheckLuck( luckChance );
//***NEW LINES ^START^
			if ( LootPack.CheckLuck( luckChance ) )
				shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );
//***NEW LINES ^END^
		}

		if ( !shouldAdd )
			continue;

		Item item = entry.Construct( from, luckChance, spawning );

		if ( item != null )
		{
			if ( !item.Stackable || !cont.TryDropItem( from, item, false ) )
				cont.DropItem( item );
		}
	}
}
For me it looks like it lowers the luck chance for all and it lowers it a lot, because of the two same checks.
I`m I wright?
Is there anybody has better suggestion if I`m wright.
And again sory I`m posting it here.
__________________

The White Guardian
Fluke is offline   Reply With Quote
Old 05-13-2004, 07:43 PM   #2 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

This was actually already fixed in Bugzilla ;->

I'll try AGAIN to get Ryan to fix it.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 05-14-2004, 01:55 AM   #3 (permalink)
 
Join Date: Oct 2003
Location: bulgaria->sofia
Age: 31
Posts: 65
Send a message via ICQ to Fluke
Default

I know, I`m listing the bugzilla fix and asking what the fix actualy do - doble checks your chance, so it lowers chance to get bonus double times!
Am I wrong?
Please help!
__________________

The White Guardian
Fluke is offline   Reply With Quote
Old 05-14-2004, 08:34 AM   #4 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 29
Posts: 10,819
Default

The initial bug was that low level creatures (Slimes and corpsers, for example) were showing up with medium to high end magical equipment.

The fix, IIRC, makes it so that the chance of the low level creatures having ANY magical loot is very VERY VERY low.
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 05-14-2004, 09:30 AM   #5 (permalink)
 
Join Date: Oct 2003
Location: bulgaria->sofia
Age: 31
Posts: 65
Send a message via ICQ to Fluke
Default

Ok, 10x for the answer, but does it lowers the chance for all creatures?
Because for me it looks like it lowers the chance for all. There is no check for type of the creature - low or hight.
__________________

The White Guardian
Fluke is offline   Reply With Quote
Old 05-16-2004, 08:11 PM   #6 (permalink)
 
Join Date: Oct 2003
Posts: 28
Default

Quote:
Originally Posted by psz
The initial bug was that low level creatures (Slimes and corpsers, for example) were showing up with medium to high end magical equipment.

The fix, IIRC, makes it so that the chance of the low level creatures having ANY magical loot is very VERY VERY low.
Since the bugzilla is broken for now,would it be possible to paste the Runuo Team fix here?It would be very appreciated if possible!
hirrus is offline   Reply With Quote
Old 05-18-2004, 03:27 AM   #7 (permalink)
 
Join Date: Oct 2003
Location: bulgaria->sofia
Age: 31
Posts: 65
Send a message via ICQ to Fluke
Default

The fix from bugzila is listed in my first post - up there, just replace function Generate in lootpack.cs or copy two lines between //***NEW LINES ^START^
and //***NEW LINES ^END^ in the source listing.
But remember that this fix will lower luck chances for all creatures, making your loot very low. I make my tests and Im sure!

I suggest another fix. Since the problem are low level creatures I suggest just disabling LootPack.Poor.
In file \Scripts\Engines\AI\Creature\BaseCreature.cs
make this:
Code:
public virtual void AddLoot( LootPack pack )
		{
			if ( Summoned )
				return;

			Container backpack = Backpack;

			if ( backpack == null )
			{
				backpack = new Backpack();

				backpack.Movable = false;

				AddItem( backpack );
			}

			pack.Generate( this, backpack, m_Spawning, m_KillersLuck );
		}
Look like this:
Code:
public virtual void AddLoot( LootPack pack )
		{
			if ( Summoned )
				return;
			
			if ( pack == LootPack.Poor )
				return;

			Container backpack = Backpack;

			if ( backpack == null )
			{
				backpack = new Backpack();

				backpack.Movable = false;

				AddItem( backpack );
			}

			pack.Generate( this, backpack, m_Spawning, m_KillersLuck );
		}
this way very low level creatures will not give items, like it was in b36, but all other creatures will give based on luck like it shoud be.
__________________

The White Guardian
Fluke is offline   Reply With Quote
Old 05-18-2004, 04:58 AM   #8 (permalink)
Forum Expert
 
Join Date: Jun 2003
Location: around
Posts: 1,376
Send a message via ICQ to bean56 Send a message via AIM to bean56
Default

Would this explain why the collectors quest gives out +100 tactic weapons on my pre-aos shard? Although since it's aos is set to false i don't see how it would have any effect. However, I don't think it would explain why earth elementals now give out a magic item and I think not as many gems as they used to. I've also gotten reports of gettin statues with weird names like faction status blah.
bean56 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5