Jump to content
  • 0

What file is responsible for 'Wear Costume' button?


Mistique

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

Hi rA!

I wonder, where exactly is defined which IDs have the 'wear costume' button and which don't?  Not that I want to get rid of it, I like the feature but I have quite a few costumes and there are a few among them that don't have the button, whereas some other non-headgear items do have this button. 

Also yes, I did triple check the 'loc' in the item_db. All these items are confirmed to have the top costume loc (1024).

Thanks. Help is appreciated. ? 

*Edit* Okay so update. Changing the ID made the button appear. It's interesting because I'm running a Pre-RE server with my own created set of costumes so I'm not using the ones in the db/re/item_db, though they do use some of those IDs. One of the costumes that didn't show the button was the costume with ID 20285, which originally (in RE) has a special effect. But that shouldn't matter, should it? Since my server isn't reading the RE dirs. Trying to understand what's happening here because it doesn't make much sense. O_o

Edited by Mistique
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

Yes, when you "receive" the item in your inventory, the button will display properly because it uses the clif_additem packet. I meant how you receive the item information packet-wise, not the source of where it came from (though that's related of course).

As for why 20285 shows up and 20286 doesn't, that is because 20285 has a hat effect and these are not displayed on the client with the feature. You can remove the item from the list by opening hateffectinfo.lub and then removing the ids from effectHatItemTable. It's probably best to keep the button disabled for that one though.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

Heya,

I presume you're talking about the "Preview" button from the item descriptions? If so, then it's not a file, this is decided server-side. How you receive the item makes the button appear or not. If you look in the clif_vendinglist function, you'll see some item packets sent to the client have 6 extra bytes. This part in particular:

WFIFOL(fd,offset+47+i*item_length) = pc_equippoint_sub(sd,data);
WFIFOW(fd,offset+51+i*item_length) = data->look;

The data->look is the actual view ID that will be shown on the client for the item after clicking the button. The pc_equippoint_sub decides whether the client should display the button or not.

The problem with that system is that many packets don't have that feature. If you try to preview the item from a shop NPC, it won't give you the option either. If you put the item in your cart, the button will disappear as well, etc. It's just very unreliable overall.

kRO added more "locations" where this feature is available, though.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

On 7/30/2019 at 8:35 AM, Tokei said:

Heya,

I presume you're talking about the "Preview" button from the item descriptions? If so, then it's not a file, this is decided server-side. How you receive the item makes the button appear or not. If you look in the clif_vendinglist function, you'll see some item packets sent to the client have 6 extra bytes. This part in particular:


WFIFOL(fd,offset+47+i*item_length) = pc_equippoint_sub(sd,data);
WFIFOW(fd,offset+51+i*item_length) = data->look;

The data->look is the actual view ID that will be shown on the client for the item after clicking the button. The pc_equippoint_sub decides whether the client should display the button or not.

The problem with that system is that many packets don't have that feature. If you try to preview the item from a shop NPC, it won't give you the option either. If you put the item in your cart, the button will disappear as well, etc. It's just very unreliable overall.

kRO added more "locations" where this feature is available, though.

 

Hi Tokei. Thanks for your reply! That's right, the preview/wear costume button.

How the item is received? Hmm, ok. you're right, I noticed that the preview button doesn't appear in the cash shop interface nor when players are vending costumes. However, when I purchase the items through the CS or their vend stand and they appear in my inventory, it does show the button. Yet, not for all IDs, which I still find strange if they're obtained the same way?

I could take ID 20286 and copy/paste it into 20285 both server and client side and generate both through the @item command- 20286 would have the button while 20285 would not, isn't that odd?

 

On 7/30/2019 at 9:52 PM, Tokei said:

Yes, when you "receive" the item in your inventory, the button will display properly because it uses the clif_additem packet. I meant how you receive the item information packet-wise, not the source of where it came from (though that's related of course).

As for why 20285 shows up and 20286 doesn't, that is because 20285 has a hat effect and these are not displayed on the client with the feature. You can remove the item from the list by opening hateffectinfo.lub and then removing the ids from effectHatItemTable. It's probably best to keep the button disabled for that one though.

Awesome, thanks for helping me locate the file! That's exactly what I needed to know. ? 

 

I'm having a similar problem now... exactly the opposite. I've created a custom item (ID 20207) that is no costume (it's a regular garment), but the button is there. o_o

Where do I look for to get rid of it? I've already checked the loc, the iteminfo, the effecthatitemtable and for possible duplicated entries in the item_dbs, but all this seems to be just fine. 

 

*Edit* Nevermind. My custom item is a garment item, apparently all garments in the game have this button. That's kind of odd, because regular garments have no sprite to preview.... oh well.  I hope this thread will be useful for anyone else running into similar problems in the future. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...