Sign in to follow this  


1 post in this topic

Hello everyone,

What this can do ? This item can set a fix attribute that you set from item_proto (value0 and value1). This is just an example, it's made just for costume_body, if you want to make it for something else just make a new subtype.

(1) Open char_item.cpp and search this:


After this case put this:

(2) Open item_length.h and search this:

enum EUseSubTypes

Add in the end:


[(Don't forget to put on service.h/CommonDefines.h this: #define SET_ATT_ITEM ) if you don't want "define" just remove the "#ifdef SET_ATT_ITEM from  char_item ]

(3) DB, Open ProtoReader.cpp and searchi:

static string arSub3[] = {

Add in the end: 


(4) Binary source, Gamelib, Open ItemData.h and search:

enum EUseSubTypes

Add in the end: 


(5) Gamelib, Open ItemData.cpp and search:

    return "USE_UNKNOWN_TYPE";

Before this add:



(6) Userinterface, Open PythonItemModule.cpp and search:

PyModule_AddIntConstant(poModule, "USE_SPECIAL",                CItemData::USE_SPECIAL);

Put this after:

PyModule_AddIntConstant(poModule, "USE_SET_ATT_COSTUME",                CItemData::USE_SET_ATT_COSTUME);

(7) Open from root and search:

class InventoryWindow(ui.ScriptWindow):

After this we need to have:


In this list we add in the end this:


(8) In search:

elif "USE_ADD_ATTRIBUTE2" == useType:

After this elif we need to add this:

		elif "USE_SET_ATT_COSTUME" == useType:
			if self.__CanSetItemAttr(dstSlotPos):
				return True

(9) In uiinventory search:

def __CanAddItemAttr(self, dstSlotPos):

After this def, add this:

(10) Open and search :

elif item.USE_ABILITY_UP == itemSubType:


elif item.ITEM_TYPE_USE == itemType: 

After this:

elif item.USE_ABILITY_UP == itemSubType:

We need to add this:

After you completed all the steps above create a new item with type ITEM_USE and subtype USE_SET_ATT_COSTUME.

Here are some examples of items:

Video :

I hope i didn't forgot anything .

Have a nice day.

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.