Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2015, 12:35 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Charm Stats?

I noticed charms used to show stats,now however it appears they don't,unless aug'd in which case it shows the aug'd stats. Doesn't even show clicky effect any more. Any ideas as how to go about fixing this , or is it not just a bug on my side?
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 03-23-2015, 12:45 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

There is a field called charmfileid if that is greater than 0 the charm uses scaled stats based on the Charmfile .. (a quest)

If you just want to charms to use their base stats set charmfileid to 0.. if you want them to scale on a quest.. look inside... quests\global\items\ for examples :p
Reply With Quote
  #3  
Old 03-23-2015, 12:51 PM
dagulus2
Hill Giant
 
Join Date: Feb 2013
Posts: 220
Default

From what I have seen, they do display, but It takes a while to kick in, and they only display if they are actually in your characters inventory or charm slot.
Reply With Quote
  #4  
Old 03-23-2015, 03:02 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Quote:
Originally Posted by dagulus2 View Post
From what I have seen, they do display, but It takes a while to kick in, and they only display if they are actually in your characters inventory or charm slot.
Which is consistent with live.
Reply With Quote
  #5  
Old 03-24-2015, 10:40 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Quote:
Originally Posted by NatedogEZ View Post
There is a field called charmfileid if that is greater than 0 the charm uses scaled stats based on the Charmfile .. (a quest)

If you just want to charms to use their base stats set charmfileid to 0.. if you want them to scale on a quest.. look inside... quests\global\items\ for examples :p
Thank you Nate. I knew about the quest file one and removed it thinking that would solve,did not know about the charmfileid though.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #6  
Old 03-24-2015, 08:31 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I don't think this has changed recently..but, you can never tell :P


Scaling items are processed differently across the many clients.

To avoid conflict issues, a scaling item's charmfile id is set to 0 and is 'scaled' locally on the server.

It's been that way as long as I've been hanging around.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #7  
Old 03-24-2015, 10:18 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

I think something did change, Had a charm Ive been using for months and stats wouldn't work. Soon as I removed the charmfile ID (set it to 0) it worked fine. Pretty cool to see charms working correctly now though. I remember when you couldn't get stats from them at all lol.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #8  
Old 03-24-2015, 11:12 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Might be something in the difference between scaling and non-scaling...

Demonstar55 mentioned something to me a while ago..but, I can't remember the details at the moment.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #9  
Old 03-25-2015, 11:34 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Quote:
Originally Posted by Uleat View Post
I don't think this has changed recently..but, you can never tell :P


Scaling items are processed differently across the many clients.

To avoid conflict issues, a scaling item's charmfile id is set to 0 and is 'scaled' locally on the server.

It's been that way as long as I've been hanging around.
That hack stopped working with RoF so I removed it and identified the scaling value in the item packet. What's not implemented is the usage of the opcode that they use to update the scale, we just send the item packet again, which works but is more expensive packet wise (full item packet vs a few bytes :P)

Edit: live will also send the scaling packet for all your charms with a scale of 100 before they send the AAs. This uses the small scaling packet and the absent of this step maybe causing the issues? (If there are any, but its probably just the delay between getting an the new item packet)
Reply With Quote
  #10  
Old 01-07-2016, 11:13 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Been kinda working on something and Im not sure if I am missing something so was looking for some guidance... I am trying to combine the charm like properties with armor to make a custom set of elite armor once all pieces are acquired. My charm file looks like this:

Code:
sub EVENT_SCALE_CALC {
  my $hands = $hasitem(1807);
  my $wrist = $hasitem(1808);
  my $legs = $hasitem(1805);
  my $chest = $hasitem(1804);
  my $arms = $hasitem(1806);
  my $boots = $hasitem(1809);
  my $helm = $hasitem(1810);

  my $scale = $chest + $hands + $wrist + $legs + $arms + $boots + $helm;

  if($scale < 0) {
    $scale = 0;
  }
  
  if($scale > 7) {
    $scale = 7;
  }

  $questitem->SetScale($scale/7);
}
Using GeorgeS tools:

so when I add the charm name in the charm file box as : CHRMcustomgear
there is another box below Labelled: Charm
If I leave it Blank, you get full stats completely negating what im going for.
When I look at other charms they all have weird numbers in it that I cannot associate with anything else.

Am I missing something? Is my code not setup correctly? This is the first time ive ever messed with this type configuration so Im assuming that my code is wrong considering I keep getting errors on it.
Reply With Quote
  #11  
Old 01-07-2016, 11:23 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

I don't think your quest code is valid.
Reply With Quote
  #12  
Old 01-08-2016, 03:00 AM
tearinall
Fire Beetle
 
Join Date: Oct 2012
Posts: 9
Default

Mace, I copy/pasted from the hasitem plugin to reduce some time, it doesnt go beyond checking to see if the item is in their proper slot, but should check either cursor or main inventory:

Code:
sub EVENT_SCALE_CALC {
	my @checkarray = (1804..1810);  ## denotes 1804 to 1810
	my $worn;
	foreach $itemtocheck (@checkarray) {
		$worn+=CheckForItem($itemtocheck);
	}
	$questitem->SetScale($worn/(scalar @checkarray));
}

sub CheckForItem {
	for ($slot1=0; $slot1<=30; $slot1++) {
		$itemid1=$client->GetItemIDAt($slot1);
		if ($itemid1==$_[0]) {
			return 1;
		} else {
			return 0;
		}
	}
}
Very much untested beyond syntax.
Reply With Quote
  #13  
Old 01-08-2016, 07:30 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Here is my item check plugin:
Code:
sub check_hasitem {
    my $client = shift;
    my $itemid = shift;
    foreach my $slot (0..30, 251..340, 2000..2023, 2030..2270, 2500..2501, 2531..2550, 9999) {
        if ($client->GetItemIDAt($slot) == $itemid) {
            return 1;
        }

        for ($i = 0; $i < 5; $i++) {
            if ($client->GetAugmentIDAt($slot, $i) == $itemid) {
                return 1;
            }
        }
    }
    return 0;
}
All you'd have to do for your script is this:
Code:
sub EVENT_SCALE_CALC {
    my $scale = 0;
    foreach my $item (1804..1810) {
        if (plugin::check_hasitem($client, $item)) {
            $scale++;
        }
    }
    $questitem->SetScale($scale / 7);
}
Reply With Quote
  #14  
Old 01-08-2016, 07:53 AM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Wow awesome! Thanks Krab and Tear, ill check them later and hopefully can achieve what im going for, thanks!
Reply With Quote
  #15  
Old 01-08-2016, 08:40 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Tearinall, I checked yours out and it does not scale or appear to do anything.

Krab, yours makes me crash but I think the reason being is that I have multiple items using the same charm file and IDK if that's allowed.

I basically wanted the armor to power up as you acquire more of the set items. One piece of armor will power up but the rest remain statless, hence bringing me back to multiple items using the same charmfile PL . Has anyone tried to do anything like this and been successful?
Reply With Quote
Reply


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 12:23 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