EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   Charm Stats? (https://www.eqemulator.org/forums/showthread.php?t=39504)

Bandor 03-23-2015 12:35 PM

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?

NatedogEZ 03-23-2015 12:45 PM

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

dagulus2 03-23-2015 12:51 PM

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.

demonstar55 03-23-2015 03:02 PM

Quote:

Originally Posted by dagulus2 (Post 238877)
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.

Bandor 03-24-2015 10:40 AM

Quote:

Originally Posted by NatedogEZ (Post 238876)
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.

Uleat 03-24-2015 08:31 PM

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.

Bandor 03-24-2015 10:18 PM

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.

Uleat 03-24-2015 11:12 PM

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.

demonstar55 03-25-2015 11:34 AM

Quote:

Originally Posted by Uleat (Post 238915)
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)

Maceblade 01-07-2016 11:13 PM

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.

demonstar55 01-07-2016 11:23 PM

I don't think your quest code is valid.

tearinall 01-08-2016 03:00 AM

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.

Kingly_Krab 01-08-2016 07:30 AM

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);
}


Maceblade 01-08-2016 07:53 AM

Wow awesome! Thanks Krab and Tear, ill check them later and hopefully can achieve what im going for, thanks!

Maceblade 01-08-2016 08:40 PM

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?


All times are GMT -4. The time now is 03:05 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.