Jump to content

Help Changing M.Def. to P.Def


Recommended Posts

Hi all,

 

Hope you're all well.

 

I need some help ( once again¬†ūüėí¬†)

I've created custom item and all is fine with it apart one thing. On the item statistics shown M.Def. but I need item to show P.Def.

Shot00000.jpg.9fbbbb7cdbadb4e5ee297495a62dd520.jpg

 

I found this is editable in sysstring-e.dat:

id    name

92    SP
93    Combat
94    P. Atk.

95    P. Def.

...

311    Active Skill
312    Passive Skill
313    Magic
314    Clan
315    M. Atk.
316    Atk. Spd.
317    DEF Rate
318    Dodge
319    M. Def.

 

When I change  ID 319 and write  P.Def. instead of M.Def., the item shows P.def. as I want but this is not the right way because this way all other items who show M.Def. start showing P.Def....

Looks like my item use string ID 319 and I need to change it and make the item to use string 95. Anyone know where I can do this? (I know it's definitely not in armorgrp.dat, I have double checked every possible field and armorgrp.dat do not control which string item using from sysstring-e.dat.).

 

 

 

And I have another problem. I can't locate the texture I want to edit. I want edit a 'Underwear' empty slot appearance. I have checked a lot of .utx files (especially L2ui and L2UI_CH3) but couldn't find this texture. I want to change this underwear empty slot appearance as cloth to something different that I will create my self.

 

Shot00001.jpg.f434f7e491ad7e2afd127a16d0317cab.jpg

 

 

 

Much appreciated for any help guys.

 

Link to comment
Share on other sites

The file you want to change is armorgrp that you used to make the custom item. Each column is a separate variable, one would be for preferred, same as one is for Mdef. The client may force certain stats to be shown even if the value is zero. So you may end up having both pdef and a mdef Value listed after the change.

 

 You will of course still have to update the states server side as well.

 

 As for the texture question, it’s hard baked into the inventory window in l2font-e I believe for interlude

Edited by YulRun
Link to comment
Share on other sites

Posted (edited)
3 hours ago, YulRun said:

The file you want to change is armorgrp that you used to make the custom item. Each column is a separate variable, one would be for preferred, same as one is for Mdef. The client may force certain stats to be shown even if the value is zero. So you may end up having both pdef and a mdef Value listed after the change.

 

 You will of course still have to update the states server side as well.

 

 As for the texture question, it’s hard baked into the inventory window in l2font-e I believe for interlude

Sorry, but you must be wrong about the first one. I took the piece of armor entry and jewel entry from armorgrp so one is showing P. Def. and other M.Def. I've checked and all variables of 0's and 1's are identical, while it should be 0 on P.Def. on jewel entry and 0 on M.Def. on the armor entry but it isn't. 

Also, at the top (the first line of FileEdit) have explanation what each column is for. And there is no mention about the sys strings or something similar at all. 

Armorgrp capable to change P.Def / M.Def. / Weight amounts shown but not the lines itself. 

By my understanding, it must be some other file which directs item icons to sysstring-e.dat

 

 

About the inventory texture. That is what I was afraid of.

L2Fonts-e.utx is one which gives me an error and I can't open it. Error says The ArrayIndexOutOfBounds exception. Looks like my computer is not powerful enough to open it. Is that true or it's some other reason that I get this error? 

Edited by rtcxool
Miss spelling
Link to comment
Share on other sites

6 hours ago, rtcxool said:

Hi all,

 

Hope you're all well.

 

I need some help ( once again¬†ūüėí¬†)

I've created custom item and all is fine with it apart one thing. On the item statistics shown M.Def. but I need item to show P.Def.

Shot00000.jpg.9fbbbb7cdbadb4e5ee297495a62dd520.jpg

 

I found this is editable in sysstring-e.dat:

id    name

92    SP
93    Combat
94    P. Atk.

95    P. Def.

...

311    Active Skill
312    Passive Skill
313    Magic
314    Clan
315    M. Atk.
316    Atk. Spd.
317    DEF Rate
318    Dodge
319    M. Def.

 

When I change  ID 319 and write  P.Def. instead of M.Def., the item shows P.def. as I want but this is not the right way because this way all other items who show M.Def. start showing P.Def....

Looks like my item use string ID 319 and I need to change it and make the item to use string 95. Anyone know where I can do this? (I know it's definitely not in armorgrp.dat, I have double checked every possible field and armorgrp.dat do not control which string item using from sysstring-e.dat.).

 

 

 

And I have another problem. I can't locate the texture I want to edit. I want edit a 'Underwear' empty slot appearance. I have checked a lot of .utx files (especially L2ui and L2UI_CH3) but couldn't find this texture. I want to change this underwear empty slot appearance as cloth to something different that I will create my self.

 

Shot00001.jpg.f434f7e491ad7e2afd127a16d0317cab.jpg

 

 

 

Much appreciated for any help guys.

 

The easiest solution to your problem is to copy an existing item that is showing p.def and change only what you need. For example an old tattoo like "tattoo of power" or something like that will do the trick.

Link to comment
Share on other sites

Problem lies on the item's type fed by the server and interface's tooltip.

 

Solution

 

A) Change item's type from accessory to armor in your server's scripts and make sure you add the p. def value to your armorgrp.

 

mxc.png

 

or

 

B) Edit tooltip itself based on item ID to make it display p.def instead of m.def stat

 

 

 

[spoiler]// 2. ARMOR
        case ITEM_ARMOR:
            bLargeWidth = true;
            
            // Sheild
            if (Item.SlotBitType == 256 || Item.SlotBitType == 128)    //SBT_LHAND or SBT_RHAND
            {
                //Shield Defense
                AddTooltipItemOption(95, String(GetShieldDefense(Item.CrystalType, Item.Enchanted, Item.ShieldDefense)), true, true, false);
                
                //Shield Defense Rate
                AddTooltipItemOption(317, String(Item.ShieldDefenseRate), true, true, false);
                
                //Avoid Modify
                AddTooltipItemOption(97, String(Item.AvoidModify), true, true, false);
                
                //Weight
                AddTooltipItemOption(52, String(Item.Weight), true, true, false);
            }
            
            // Magical Armor
            else if (IsMagicalArmor(Item.ClassID))
            {
                //Slot Type
                if (Len(SlotString)>0)
                    AddTooltipItemOption(0, SlotString, false, true, false);
                
                //MP Bonus
                AddTooltipItemOption(388, String(Item.MpBonus), true, true, false);
                
                //Physical Defense
                AddTooltipItemOption(95, String(GetPhysicalDefense(Item.CrystalType, Item.Enchanted, Item.PhysicalDefense)), true, true, false);
                
                //Weight
                AddTooltipItemOption(52, String(Item.Weight), true, true, false);
            }
            
            // Physical Armor
            else
            {
                //Slot Type
                if (Len(SlotString)>0)
                    AddTooltipItemOption(0, SlotString, false, true, false);
                
                //Physical Defense
                AddTooltipItemOption(95, String(GetPhysicalDefense(Item.CrystalType, Item.Enchanted, Item.PhysicalDefense)), true, true, false);    
                
                //Weight
                AddTooltipItemOption(52, String(Item.Weight), true, true, false);
            }
            
        break;
        
        // 3. ACCESSARY
        case ITEM_ACCESSARY:
            bLargeWidth = true;
            
            //Slot Type
            if (Len(SlotString)>0)
                AddTooltipItemOption(0, SlotString, false, true, false);
            
            //Masical Defense
            AddTooltipItemOption(99, String(GetMagicalDefense(Item.CrystalType, Item.Enchanted, Item.MagicalDefense)), true, true, false);

            
            //Weight
            AddTooltipItemOption(52, String(Item.Weight), true, true, false);
        break;[/spoiler]

 

Edited by Blitzkrieg
Link to comment
Share on other sites

i dunno guys... same problem over and over again. 

Or you spamm like this or i have no idea.
not need to modify whole game to add 1 custom item... its all about dat files.
Working perfect... i made it  to "cloak" slot ( HF ) 
Gives P.def! Show P.def, even if enchant it gives p.def also...

image.png

17 hours ago, rtcxool said:

 

 

 

And I have another problem. I can't locate the texture I want to edit. I want edit a 'Underwear' empty slot appearance. I have checked a lot of .utx files (especially L2ui and L2UI_CH3) but couldn't find this texture. I want to change this underwear empty slot appearance as cloth to something different that I will create my self.

 

Shot00001.jpg.f434f7e491ad7e2afd127a16d0317cab.jpg

 

 

 

 

 

Ofc is L2UI_CH3
image.png

Link to comment
Share on other sites

@Ehoq¬†Thank you, actually inventory texture was in L2UI_CH3.utx I just missed it when I viewed through L2tool my view was enlarged and I saw only part with empty icons but it was full inventory in fact (saw it when exported).¬† ūüôā¬†

Shot00004.jpg.8b6151b8a9004afb69034aa2344aaad7.jpg

 

@Blitzkrieg I tried your second method. Unfortunately, when I open Interface.u and decompile line ToolTip, the script I get is much different from the one you've shared.

The first method I had no idea how to locate the script you're talking about. Maybe because I'm working the old way. I'm using L2j server pack (GameServer/LoginServer) and I do not edit things in Java, I get into Java only through database app (HeidiSQL to be exact). Through server side scripts I can edit only Quests or NPC's like Buffer, etc.. But not items. I have checked database armor section but there is no column which would determine it's Accessory or Armor. The closest one column called 'BodyPart' but changing from 'Necklace' to 'Chest' for example, do not make item to show P.Def.

 

@D3X I've used this way and yes, it worked fine. I created this topic just because I wanted to understand how to edit through the stings. Now I see that strings used not for items separately but for item groups ( armor / accessory / weapons etc.. ).

 

The thing I want to do is, to make material droppable from monsters with small chance and that material can be used to create bracelet.

I had issues with exc_multisell as my shop didn't showed any of my items I put to multisell when main (the first) ingredient is in inventory.

Then I did it other way. I took B grade jewel which I do not use in server and changed sealed part to my material, unsealed part to bracelet. Everything worked fine, only thing is that my item showed M.Def. while I wanted to show P.Def. (sorted now) and that material show line M.Def. also since it's reworked from jewel but I need it to show nothing, neither M.Def or P.Def. 

Sounds easy enough, I've deleted entry from armorgrp.dat and created new entry in etcitemgrp.dat  I've copied entry from random material and changed ID to my item ID.

Then I deleted my item entry from armor section server side and created new entry with my item ID in etcitem section. And also deleted stat lines for the item from armor stats as it's not armor anymore.

   The item now do not show neither P.Def. or M.Def. as I wanted, it's just like a material.

 

But now this item do not work in exc_multisell... Even if I have item in inventory, multisell do not show that item can be upgraded... Means item must be in armor section server side to work in exc_multisell.

That's why I wanted to make item use different string ID from sysstring-e.dat so I can change that string to any text I want instead of M.Def. without affecting other items and leave it in armor section server side (just make it not equipable).

But as I already mentioned, looks like not the item using string ID's but the item groups and it's not possible to do so for just single item.

 

 

I know that this topic can be closed as it's solved now and the rest part of my issue is not client side anymore but still I want to ask on the same topic, do you have any idea how to make this exc_multisell work when the main item is material?


P.S. Thanks guys for reading all this and trying to help me. 

Link to comment
Share on other sites

@rtcxool

If u ask for help give more information....
Lucera? Acis? 
Classic? Interlude? high five? 
any screens? xml? ingame? 
it really hard to undestand ya what are you did and how people can help ya.

Link to comment
Share on other sites

Posted (edited)
2 hours ago, Ehoq said:

@rtcxool

If u ask for help give more information....
Lucera? Acis? 
Classic? Interlude? high five? 
any screens? xml? ingame? 
it really hard to undestand ya what are you did and how people can help ya.

 

Sorry, my bad.

 

I am working on L2j Acis. Chronicle - Interlude.

 

I am creating shop on exc_multisell code in NPC html not normal multisell because I don't want shop to show what items are available if player don't have the main ingredient.

 

Below is my multisell:

 

mul.png.bab6963389f6a93cdef9e47e8191883e.png

 

And that's what I get in game:

I see only the second item which upgradable from 'Amulet of Power' 

The first one which is upgradable from 'Minotaur Horn' is not shown even through the item is in inventory.

 

nwork222222.jpg.0143e4cf063c15f3d6c50b7c82e942cb.jpg

 

But then, if I move item 'Minotaur Horn' from etcitem section in database to

armor section, it works:

nwork1111.jpg.15063c4fcf1af86041b44aa4dca279af.jpg

 

Everything would be fine, but I don't want item to be in aromr section because when it's in armor section on database, item 'Minotaur Horn' show line P.Def. 

 

pdef.jpg.a6918a9e37da7e71092109e16bd18966.jpg

 

So, since I know that only way to remove that P.Def. line from item is to move item from armor section to etcitem in database. My question here is:

Is it possible and how if yes, to make exc_multisell work when the main ingredient is material as it's not working in my way as you see.

 

Much appreciated for any help.

Edited by rtcxool
Wrong placed image
Link to comment
Share on other sites

@rtcxool

hm...
imo...best solution is : 
get Blacksmith Mammon's xml
if its weapon get S grade Dual make
if its armor get Unseal S grade armor
if its Jewell - U KNOW WHAT?! IS UNSEAL S GRADE JEWEL ūüėĄ

copy exist items
make your own custom items
ctrl+v everything ( dat, xml, db) with your custom names 

PROFIT

Edited by Ehoq
Link to comment
Share on other sites

11 minutes ago, Ehoq said:

@rtcxool

hm...
imo...best solution is : 
get Blacksmith Mammon's xml
if its weapon get S grade Dual make
if its armor get Unseal S grade armor
if its Jewell - U KNOW WHAT?! IS UNSEAL S GRADE JEWEL ūüėĄ

copy exist items
make your own custom items
ctrl+v everything ( dat, xml, db) with your custom names 

PROFIT

 

That's what I did, not sure what you said PROFIT. ūüėĄ

 

'Minotaur Horn' is copied from sealed armor part.

 

 But that's not what I asking for..

 

My problem is that exc_multisel is not working when main ingredient changed from armor section to etcitem section.

In total, exc_multisell is working fine when main ingredient is Armor, Weapon or Jewell even if it's not copied from mammon. It's just NOT working when the main ingredient is not armor, weapon or jewell but it's material and it's on etcitem section on database.

 

So here is my question, is there a way to make exc_multisell work when the main ingredient is material?

Link to comment
Share on other sites

3 minutes ago, rtcxool said:

 

That's what I did, not sure what you said PROFIT. ūüėĄ

 

'Minotaur Horn' is copied from sealed armor part.

 

 But that's not what I asking for..

 

My problem is that exc_multisel is not working when main ingredient changed from armor section to etcitem section.

In total, exc_multisell is working fine when main ingredient is Armor, Weapon or Jewell even if it's not copied from mammon. It's just NOT working when the main ingredient is not armor, weapon or jewell but it's material and it's on etcitem section on database.

 

So here is my question, is there a way to make exc_multisell work when the main ingredient is material?

hm...i have no idea how exc_multisell works on Acis. Seems i cannot help ya at this moment...sorry.
but what is your point to hide it? is to much variations to trade with ?

Link to comment
Share on other sites

@Ehoq No, I don't have much items, but I want to make one item upgradable several times. It wouldn't look fine if all items will be visible. So that's why I want to make players do not see further upgrade if they do not have the ingredient item in their inventory.

I guess I need to check Pet manager xml since pet armor and weapons upgradable similar way.

Again, it's still armor and weapons and I guess would not work if I change it to material..

 

The topic can be locked now as the problem stated in topic header is solved and the rest part of my issue is not in client development.

 

I'll try to solve it myself.

 

Thanks, everyone for help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



√ó
√ó
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock