Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-30-2009, 10:19 AM
aesian
Fire Beetle
 
Join Date: Mar 2009
Location: belgium
Posts: 2
Default coins weightless

can we change this somewhere in the code that coins are weightless?

And that there is a loot all button?
Reply With Quote
  #2  
Old 04-30-2009, 10:50 AM
drakelord
Hill Giant
 
Join Date: Nov 2002
Location: NC, USA
Posts: 182
Default

Loot all button would be very hard to implement, as it is currently not available in the titanium client.

As for coins being weightless, that can be changed.

Find

Code:
int16 Client::CalcCurrentWeight() {
	const Item_Struct* TempItem = 0;
	ItemInst* ins;
	int16 Total = 0;
	int x;
	for(x = 0; x <= 30; x++)
	{
		TempItem = 0;
		ins = GetInv().GetItem(x);
		if (ins)
			TempItem = ins->GetItem();
		if (TempItem)
			Total += TempItem->Weight;
	}
	for (x = 251; x < 331; x++)
	{
		int TmpWeight = 0;
		TempItem = 0;
		ins = GetInv().GetItem(x);
		if (ins)
			TempItem = ins->GetItem();
		if (TempItem)
			TmpWeight = TempItem->Weight;
		if (TmpWeight > 0)
		{
			int bagslot = 22;
			int reduction = 0;
			for (int m = 261; m < 331; m += 10)
			{
				if (x >= m)
					bagslot += 1;
			}
			ItemInst* baginst = GetInv().GetItem(bagslot);
			if (baginst && baginst->GetItem() && baginst->IsType(ItemClassContainer))
				reduction = baginst->GetItem()->BagWR;
			if (reduction > 0)
				TmpWeight -= TmpWeight*reduction/100;
			Total += TmpWeight;
		}
	}

	if (GetAA(aaPackrat) > 0)
		Total *= (GetAA(aaPackrat) * 10) / 100; //AndMetal: guessing 10% per level, up to 50%. description just indicates it affects gear, doesn't mention coin
	
	Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4;
	return Total;
}

and take out the line:

Code:
	Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4;
__________________
Hmm.
Reply With Quote
  #3  
Old 04-30-2009, 05:57 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I recall some items on live that were favored by monks. I believe they were called coin purses or something like that. Basically, they reduced the weight of coins on your character by a percentage.

I think it would be cool to implement coin purses into the emu if it is possible. I don't really know the specifics offhand about what item settings would be used for that, but 13th floor may be of some use.

Here is a list of some coin purses, which I assume are the items I was thinking of:
http://eqitems.13th-floor.org/itemse...ame=coin+purse

As long as they have something special set on them so we can tell them apart from other bags, it shouldn't be too hard to implement. From looking at a few examples, the only thing I can see special is "bagtype". It seems that the coin purses are all set to bagtype 0. Other bags I looked at are set to type 1 or 5.

Bag of the Tinkerers (Bagtype 1)
http://eqitems.13th-floor.org/itemraw.php?id=17403

Hand Made Backpack (Bagtype 5)
http://eqitems.13th-floor.org/itemraw.php?id=17969

Frizznik's Endless Coin Purse (Bagtype 0)
http://eqitems.13th-floor.org/itemraw.php?id=17209


Here is a list of known bagtypes from the wiki. It definitely isn't a complete list though:
Code:
          o 2 = Quiver
          o 9 = Alchemy Container
          o 10 = Toolbox
          o 11 = Books (for research)
          o 12 = Mortar & Pestle
          o 13 = Quest Related?
          o 14 = Mixing Bowl
          o 15 = Spit
          o 16 = Sewing Kit
          o 18 = Fletching Kit
          o 19 = Brewing
          o 20 = Jeweler's Kit
          o 24 = Lexicon (wizard research?)
          o 25 = Elemental Grimoire (mage research?)
          o 26 = Books of Binding (necro research?)
          o 27 = Enchanter research?
          o 46 = Tackle Box (for fishing)
          o 51 = Trader's Satchel (for Bazaar trading)
          o 53 = Augmentation Sealer (for applying augments)
          o 54 = Cooking
After doing some database searching, it seems that bag type 0 is for bags that also reduce the weight of coins. Assuming that I am not falsely remembering that as a feature on Live. I just did a database search for items with itemclass set to 1, bagtype set to 0 and bagwr not set to 0. This resulted in all of the coin purses and a few other purses that I assume serve the same purpose. The only bag that stood out from that search is this one:

Tailored Small Bag
http://eqitems.13th-floor.org/item.php?id=17047

I would be curious to see if this Tailored bag actually does have a 10% weight reduction benefit on EQLive. If so, it would be safe to assume that bagtype 0 is for coin weight reduction as well as the normal item weight reduction. And if that is the case, we could just check the main inventory slots for a bag with bagtype 0 when calculating player weight and then just reduce their weight by the amount set in the bagwr field.

As far as loot all, I believe that is an option with the new SoF client, but I am not at my EQ PC atm to check for sure. If so, I am sure it would be possible to code it in.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 04-30-2009, 07:52 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Yelinak could drop a coin purse... It just bothered me to think of what part of the dragon it was made from =X
Reply With Quote
  #5  
Old 04-30-2009, 08:08 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

this could also be implemented as a rule so coins could be weightless or not. Coin purses shouldn't be too hard either
Reply With Quote
  #6  
Old 05-01-2009, 12:32 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

if someone made a rule Character:CoinWeightless or something of the like (I don't know too much about the DB, otherwise I'd set it all up myself, but I don't got the stuff to do it here :/)

and then just at 919 in zone/client_mods.cpp adding:

Code:
	if (!RuleI(Character, CoinWeightless)
		Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4;
that should take care of being able to have a rule to allow servers to enable coin's weight or not rule would default to having a weight (so CoinWeightless would be set to 0, or off)
Reply With Quote
  #7  
Old 05-01-2009, 03:47 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

well, after some testing (and then asking some people :P), weight is calculated client side (but things that benefit from low weight such as monk AC are server side, so that's about all this would effect)
Reply With Quote
  #8  
Old 05-01-2009, 07:35 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Item weight is probably calculated client side, but I would kinda be surprised if coin weight was too. The thing that makes me think it might not be is because if you trade coin, it takes a few seconds before weight is actually updated. Not sure what is causing the delay though.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 05-01-2009, 12:26 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Quote:
Originally Posted by trevius View Post
Item weight is probably calculated client side, but I would kinda be surprised if coin weight was too. The thing that makes me think it might not be is because if you trade coin, it takes a few seconds before weight is actually updated. Not sure what is causing the delay though.

Was trying to set up a rule to have coins have a weght or not, they had it both with it set to true and false commented out that crap, still had the weight, and I couldn't find anything else on it, plus mq2docrack can let you walk around over encumbered, pointing towards it bring calculated client side (not sure if docrack will let you do it here, saw some code that should prevent it, or at least log it if you are moving while over encumbered
Reply With Quote
  #10  
Old 05-01-2009, 12:54 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It's calculated client side, I'm not really sure why the client sometimes waits a few seconds after trades to update it's weight... another quirk of the client.
Reply With Quote
  #11  
Old 05-01-2009, 05:54 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Oh sweet! I just figured out that coin reducing bags do already work client-side lol. Just do a #si 17209 and put the bag it summons into your main inventory slot while you have a bunch of coin weight on you (#givemoney 20000 0 0 0). It will reduce your weight a huge amount as it should. Since this is already handled client-side, we just need to add the code for it server-side and people can easily have a way for their players to have weightless coins by giving them a 100% weight reducing bag with bagtype set to 0. Even without adding the code for it, players will be able to walk the speed they should be walking, since walk speed from weight seems to be purely client-side. The only reason to add the code is so people don't fall off of things and die from the server killing them due to being overweight :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #12  
Old 05-01-2009, 05:58 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

But the client handles fall damage too =x
Reply With Quote
  #13  
Old 05-02-2009, 08:16 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

I guess you could either do that, or make them have a tribute item with 100% weight reduction a tribute slot. That way they don't have an item slot taken up.

As for falling... remove the packet for dealing fall damage? Not sure.

edit: now that I think about it, tributes might be useful for other things. You could give a dedicated slot on items for having stuff like see invis all the time on a worn effect. The only thing the client would have to do is *maybe* download a spell file, and when the item gets sent to the client it has see invis. I'll see what I come up with. :P

Last edited by Secrets; 05-02-2009 at 04:20 PM..
Reply With Quote
  #14  
Old 05-02-2009, 01:13 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Secrets, fall damage is handled client side
Reply With Quote
  #15  
Old 05-02-2009, 11:06 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Quote:
Originally Posted by demonstar55 View Post
Secrets, fall damage is handled client side
I'm well aware of that. But, is the death opcode ever sent to the server if the damage packet that handles falling damage is missing serverside? You could remove the packet that does that, and while you see falling damage (and your client might go unconcious for a split second, much like what happens when you are GM flagged and fall for more than your max HP) clientsided, nothing happens on the server, and thus, you never die.

As far as i'm aware, there is nothing stopping you from removing the update serverside for HP and have that so when you fall, you see the damage message but nothing happens serversided, resulting in you just getting up when you fall.

Sometimes it's easier to remove stuff :P
Reply With Quote
Reply

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

Forum Jump

   

All times are GMT -4. The time now is 09:57 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3