Jump to content

Metin2 - 4 Inventory Page


Recommended Posts

  • 2 weeks later...
  • Premium

Exchange fix & explanation what you do wrong (in 1st post).

in exchange.cpp when you told to change

 

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 2); // inven page 2
to

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 2); // inven page 2
	static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 2); // inven page 3
	static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 2); // inven page 4
you did huge mistake because invertory grid have only 45 slots (5 width, 9 height (9*5 = 45)). With your code we have 90 per page and this is nasty ;3

we must change it to original grid size - every CGrid related to equipment must have 45 slots - we must perform division with number 4 :D

So, that's the right code.

 

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 4); // inven page 2
	static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 4); // inven page 3
	static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 4); // inven page 4
Before do modification:

INVENTORY_MAX_NUM = 90

INVENTORY_MAX_NUM / 5 / 2 == 90 / 5 / 2 == 9

After your modification:

INVENTORY_MAX_NUM = 180

INVENTORY_MAX_NUM / 5 / 2 == 180 / 5 / 2 == 18

After you apply my fix:

INVENTORY_MAX_NUM = 180

INVENTORY_MAX_NUM / 5 / 4 == 180 / 5 / 4 == 180 / 20 == 9

Um, btw. If someone didn't know why 3 left slots in belt inventory didn't working... That's the explanation.

	+------------------------------------------------------+ 0
	| Inventory (45 slots * 4 pages) 90 slots              | 
	+------------------------------------------------------+ 180 = INVENTORY_MAX_NUM(180)
	| Player equipment (items actually in use) 32 slots    |
	+------------------------------------------------------+ 212 = INVENTORY_MAX_NUM(180) + WEAR_MAX_NUM(32)
	| DSS activated (6 slots * 2 pages) 12 slots           | 
	+------------------------------------------------------+ 224 = 212 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_MAX_NUM(2)
	| DSS reserved (6 slots * 3 pages) 18 slos             |  
	+------------------------------------------------------+ 242 = 224 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_RESERVED_MAX_NUM(3)
	| Belt inventory (16 slots (4x4 grid)                  |
	+------------------------------------------------------+ 258 = 242 + BELT_INVENTORY_SLOT_COUNT(16) = INVENTORY_AND_EQUIP_CELL_MAX
	| End of equipment                                     |
	+------------------------------------------------------+ 
So. Cell.cell in game often have BYTE range (unsigned byte - 0 to 255). That's why your 3 slots in belt inventory didn't work. Change Cell.cell to WORD instead of BYTE. I don't tell you where you must change it. Figure out by yourself ^^

Peace ;D

joint.gif

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 8
Link to comment
Share on other sites

<script charset="UTF-8" src="chrome://hdv/content/hdv.js" type="application/javascript"> </script>

 

Exchange fix & explanation what you do wrong (in 1st post).

in exchange.cpp when you told to change

 

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 2); // inven page 2
to

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 2); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 2); // inven page 2
	static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 2); // inven page 3
	static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 2); // inven page 4
you did huge mistake because invertory grid have only 45 slots (5 width, 9 height (9*5 = 45)). With your code we have 90 per page and this is nasty ;3

we must change it to original grid size - every CGrid related to equipment must have 45 slots - we must perform division with number 4 :D

So, that's the right code.

 

	static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); // inven page 1
	static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 4); // inven page 2
	static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 4); // inven page 3
	static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 4); // inven page 4
Before do modification:

INVENTORY_MAX_NUM = 90

INVENTORY_MAX_NUM / 5 / 2 == 90 / 5 / 2 == 9

After your modification:

INVENTORY_MAX_NUM = 180

INVENTORY_MAX_NUM / 5 / 2 == 180 / 5 / 2 == 18

After you apply my fix:

INVENTORY_MAX_NUM = 180

INVENTORY_MAX_NUM / 5 / 4 == 180 / 5 / 4 == 180 / 20 == 9

Um, btw. If someone didn't know why 3 left slots in belt inventory didn't working... That's the explanation.

	+------------------------------------------------------+ 0
	| Inventory (45 slots * 4 pages) 90 slots              | 
	+------------------------------------------------------+ 180 = INVENTORY_MAX_NUM(180)
	| Player equipment (items actually in use) 32 slots    |
	+------------------------------------------------------+ 212 = INVENTORY_MAX_NUM(180) + WEAR_MAX_NUM(32)
	| DSS activated (6 slots * 2 pages) 12 slots           | 
	+------------------------------------------------------+ 224 = 212 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_MAX_NUM(2)
	| DSS reserved (6 slots * 3 pages) 18 slos             |  
	+------------------------------------------------------+ 242 = 224 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_RESERVED_MAX_NUM(3)
	| Belt inventory (16 slots (4x4 grid)                  |
	+------------------------------------------------------+ 258 = 242 + BELT_INVENTORY_SLOT_COUNT(16) = INVENTORY_AND_EQUIP_CELL_MAX
	| End of equipment                                     |
	+------------------------------------------------------+ 
So. Cell.cell in game often have BYTE range (unsigned byte - 0 to 255). That's why your 3 slots in belt inventory didn't work. Change Cell.cell to WORD instead of BYTE. I don't tell you where you must change it. Figure out by yourself ^^

Peace ;D

joint.gif

 

nice translation :

/**
	 **** 현재까지 할당 된 아이템 영역 정리 (DB상 Item Position) ****
	+------------------------------------------------------+ 0
	| 캐릭터 기본 인벤토리 (45칸 * 2페이지) 90칸           | 
	+------------------------------------------------------+ 90 = INVENTORY_MAX_NUM(90)
	| 캐릭터 장비 창 (착용중인 아이템) 32칸                |
	+------------------------------------------------------+ 122 = INVENTORY_MAX_NUM(90) + WEAR_MAX_NUM(32)
	| 용혼석 장비 창 (착용중인 용혼석) 12칸                | 
	+------------------------------------------------------+ 134 = 122 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_MAX_NUM(2)
	| 용혼석 장비 창 예약 (아직 미사용) 18칸               | 
	+------------------------------------------------------+ 152 = 134 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_RESERVED_MAX_NUM(3)
	| 벨트 인벤토리 (벨트 착용시에만 벨트 레벨에 따라 활성)|
	+------------------------------------------------------+ 168 = 152 + BELT_INVENTORY_SLOT_COUNT(16) = INVENTORY_AND_EQUIP_CELL_MAX
	| 미사용                                               |
	+------------------------------------------------------+ ??
*/

and nice way of making it look so simple to understand (reading the code once again make sence)

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

There is a bug. If the item is in the 3rd or 4th inventory, you cant upgrade it. When you go to the blacksmith and you give him the item, you press ok>yes and nothing happens. If the item is in the 1st or 2nd inventory you can do it... Its problem just from the 3rd and 4th inv... any idea how to solve that?

Link to comment
Share on other sites

There is a bug. If the item is in the 3rd or 4th inventory, you cant upgrade it. When you go to the blacksmith and you give him the item, you press ok>yes and nothing happens. If the item is in the 1st or 2nd inventory you can do it... Its problem just from the 3rd and 4th inv... any idea how to solve that?

 

Is there any sysser after press yes?

Link to comment
Share on other sites

There is a bug. If the item is in the 3rd or 4th inventory, you cant upgrade it. When you go to the blacksmith and you give him the item, you press ok>yes and nothing happens. If the item is in the 1st or 2nd inventory you can do it... Its problem just from the 3rd and 4th inv... any idea how to solve that?

 

I haven't got this error with 3-4 inventory.

Try to edit in char_item.cpp

BYTE bCell = Cell.cell;

to

int bCell = Cell.cell;

Me 526. line. I edited this to make work the last 2 slot in belt inventory. Maybe it's solve the blacksmith bug too.

Edited by TheSLZ
  • Love 3
Link to comment
Share on other sites

 

 

Vanilla make some stupid human .. This game have complete bug 3/4 inventory.. :D :D

So which game version do you guys recommend?

 

 

Indeed, it's from core, doesn't happen with me.

 

Made your own core :)

 

I dont know how to program in C++ >< i only know pascal ahah and when i'm compiling the source i get too many warnings, but 0 errors xD

Link to comment
Share on other sites

  • Premium

 

 

 

Vanilla make some stupid human .. This game have complete bug 3/4 inventory.. :D :D

So which game version do you guys recommend?

 

 

Indeed, it's from core, doesn't happen with me.

 

Made your own core :)

 

I dont know how to program in C++ >< i only know pascal ahah and when i'm compiling the source i get too many warnings, but 0 errors xD

 

 

C++ knowledge is'nt needed if you applied some tutorial, therefore, warnings can be ignored, and easily fixable. ^^

Link to comment
Share on other sites

  • Premium

 

 

 

Vanilla make some stupid human .. This game have complete bug 3/4 inventory.. :D :D

So which game version do you guys recommend?

 

 

Indeed, it's from core, doesn't happen with me.

 

Made your own core :)

 

I dont know how to program in C++ >< i only know pascal ahah and when i'm compiling the source i get too many warnings, but 0 errors xD

 

 

C++ knowledge is'nt needed if you applied some tutorial, therefore, warnings can be ignored, and easily fixable. ^^

Link to comment
Share on other sites

 

 

 

 

Vanilla make some stupid human .. This game have complete bug 3/4 inventory.. :D :D

So which game version do you guys recommend?

 

 

Indeed, it's from core, doesn't happen with me.

 

Made your own core :)

 

I dont know how to program in C++ >< i only know pascal ahah and when i'm compiling the source i get too many warnings, but 0 errors xD

 

 

C++ knowledge is'nt needed if you applied some tutorial, therefore, warnings can be ignored, and easily fixable. ^^

 

So the warnings do no problem to the core? xD

Link to comment
Share on other sites

  • Premium

 

 

 

 

 

Vanilla make some stupid human .. This game have complete bug 3/4 inventory.. :D :D

So which game version do you guys recommend?

 

 

Indeed, it's from core, doesn't happen with me.

 

Made your own core :)

 

I dont know how to program in C++ >< i only know pascal ahah and when i'm compiling the source i get too many warnings, but 0 errors xD

 

 

C++ knowledge is'nt needed if you applied some tutorial, therefore, warnings can be ignored, and easily fixable. ^^

 

So the warnings do no problem to the core? xD

 

 

No, all about the time is about a weird syntax (parethese aorund && without || for exemple) or some int compared with unsigned etc...

 

You can ignore it, and fix-it later :)

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.