Jump to content

Recommended Posts

1 hour ago, blaxis said:

Unfortunately, I couldn't apply what you said because I don't have much coding knowledge.

What do I need to do to display armor and weapon together? Can anyone help?

Upload UiToolTip.py

or think about this hint:

 

renderTarget.SetWeapon(RENDER_TARGET_INDEX, Vnum)
if (player.GetItemIndex(item.COSTUME_SLOT_BODY)==0):
	renderTarget.SetArmor(RENDER_TARGET_INDEX, player.GetItemIndex(item.EQUIPMENT_BODY))
else:
	renderTarget.SetArmor(RENDER_TARGET_INDEX, player.GetItemIndex(item.COSTUME_SLOT_BODY))

 

Edited by V0lvox
  • Metin2 Dev 1
  • Love 1

The source is not the problem.
It depends on your skills to adapt this system.
First you have to know the subtypes. 
Is there one subtype for all weapons or is there a subtype for every type ?

 

elif itemSubType == 2: #weapon	
	if player.GetRace() != 7 and player.GetRace() != 3:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)
	if player.GetRace() == 5 or player.GetRace() == 1:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)
	if player.GetRace() == 0 or player.GetRace() == 4:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)		
	if player.GetRace() == 7 or player.GetRace() == 3:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)

OR

elif itemSubType in CustumWeaponSubTypeArray:
...

 

  • Active+ Member
1 hour ago, V0lvox said:

Upload UiToolTip.py

or think about this hint:

 

renderTarget.SetWeapon(RENDER_TARGET_INDEX, Vnum)
if (player.GetItemIndex(item.COSTUME_SLOT_BODY)==0):
	renderTarget.SetArmor(RENDER_TARGET_INDEX, player.GetItemIndex(item.EQUIPMENT_BODY))
else:
	renderTarget.SetArmor(RENDER_TARGET_INDEX, player.GetItemIndex(item.COSTUME_SLOT_BODY))

 

Thank you so much! Solved.

 

Meanwhile, I noticed something. I'm not sure if it's a problem.

### Armor ###

Changing it as shown in "uitooltip_Fix2.txt" will preview different characters' armors as well.
E.g; I'm using the warrior character and it previews when I hover over the ninja armor (as warrior armor)
So I reverted this fix to its previous state.
Just wanted to point it out for informational purposes.

48 minutes ago, V0lvox said:

The source is not the problem.
It depends on your skills to adapt this system.
First you have to know the subtypes. 
Is there one subtype for all weapons or is there a subtype for every type ?

 

elif itemSubType == 2: #weapon	
	if player.GetRace() != 7 and player.GetRace() != 3:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)
	if player.GetRace() == 5 or player.GetRace() == 1:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)
	if player.GetRace() == 0 or player.GetRace() == 4:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)		
	if player.GetRace() == 7 or player.GetRace() == 3:
		self.__ModelPreview(itemVnum, 3, player.GetRace(),slotIndex)

OR

elif itemSubType in CustumWeaponSubTypeArray:
...

 

i tested this and it doesn't work

 

  • Active+ Member
On 8/24/2021 at 4:48 PM, Zimo2014 said:

i tested this and it doesn't work

 

I had the same problem but found the solution man!
The subtype in item_proto is 255 (wtf!) ---> locale/xx/item_proto

I changed it to 3 and it works fine now.

You can check it if you want.

Edited by blaxis
  • Good 1
7 minutes ago, blaxis said:

I had the same problem but found the solution man!
The subtype in item_proto is 255 (wtf!) ---> locale/xx/item_proto

I changed it to 3 and it works fine now.

You can check it if you want.

Check types and subtypes is a prerequisite for this system

  • 4 weeks later...

Hi guys. I got a little wierd problem with rendertarget system, everything works fine till I open Itemshop

after that client is crashing.

After debug 

void CGraphicRenderTargetTexture::Render() const
{
	D3DSURFACE_DESC desc;
	if (m_lpd3dRenderTargetSurface == nullptr)
		return;
	m_lpd3dRenderTargetSurface->GetDesc(&desc);

m_lpd3dRenderTargetSurface is came null, any idea how to fix that? Some where it lose window handle pointer.

giphy.gif

Best regards, Arlinamid

6 hours ago, arlinamid said:

Hi guys. I got a little wierd problem with rendertarget system, everything works fine till I open Itemshop

after that client is crashing.

After debug 

void CGraphicRenderTargetTexture::Render() const
{
	D3DSURFACE_DESC desc;
	if (m_lpd3dRenderTargetSurface == nullptr)
		return;
	m_lpd3dRenderTargetSurface->GetDesc(&desc);

m_lpd3dRenderTargetSurface is came null, any idea how to fix that? Some where it lose window handle pointer.

Send log.txt

17 hours ago, V0lvox said:

Send log.txt

Log.txt

https://metin2.download/picture/f0PgSy2vwE53j41Z8QiUR5700LEHwIfL/.png

Debugging dump :

https://metin2.download/picture/I03XnykMgthT6nEM5uO9YDdP8nJL3T2m/.png

My grpRenderTargetTexture.cpp after updated to DX9

https://codeshare.io/gLAerN

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Think 2

giphy.gif

Best regards, Arlinamid

4 hours ago, arlinamid said:

Dont comment the fix!

https://metin2.download/picture/9L1h8nyOHOaf2604u4QgL7IQ73PS3O4D/.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Think 2

If I dont comment it rendered it to main window. Not to the rendertarget window.

2 hours ago, V0lvox said:

Dont comment the fix!

Tomorow I give you an video from error

Edited by arlinamid

giphy.gif

Best regards, Arlinamid

  • Management
On 2/22/2021 at 2:20 PM, displayjokes said:

Hey, everything working fine except some effects like white lion smoke / blue armor smoke, what am i doing wrong or missing?

Here's what i mean:

spacer.png

 

Also:

Check this:

  Hide contents

uitooltip.py

search for:

		elif item.ITEM_TYPE_WEAPON == itemType:

 

at the end of that elif check if you have it like this:


			if preview != 0:
				if item.WEAPON_SWORD == itemSubType: 
					if player.GetRace() != 7 and player.GetRace() != 3:
						self.__ModelPreview(itemVnum, 3, player.GetRace())
				if item.WEAPON_DAGGER == itemSubType or item.WEAPON_BOW == itemSubType: 
					if player.GetRace() == 5 or player.GetRace() == 1:
						self.__ModelPreview(itemVnum, 3, player.GetRace())
				if item.WEAPON_TWO_HANDED == itemSubType: 
					if player.GetRace() == 0 or player.GetRace() == 4:
						self.__ModelPreview(itemVnum, 3, player.GetRace())
				if item.WEAPON_BELL == itemSubType or item.WEAPON_FAN == itemSubType: 
					if player.GetRace() == 7 or player.GetRace() == 3:
						self.__ModelPreview(itemVnum, 3, player.GetRace())

 

 

Hey, did you manage to fix the effects?

It is working but not on everything, somehow some mounts don't get the effect:

 

 

Edited by Metin2 Dev
Core X - External 2 Internal

raw

raw

  • Management
7 minutes ago, SCOOB said:

@ Karbust install this to show effects/shinning on Render Target:

This is the hidden content, please

I already have it, it works with weapons and armors, but not every mount, like I showed on the video...

  • Not Good 1
  • Love 2

raw

raw

20 hours ago, V0lvox said:

Dont comment the fix!

Okay i found a solution for my problem ?

In grpRenderTargetTexture.h

void Render() const;

replace with

void Render();

in grpRenderTargetTexture.cpp

void CGraphicRenderTargetTexture::Render() const
{
	D3DSURFACE_DESC desc;
	m_lpd3dRenderTargetSurface->GetDesc(&desc);


replace with

void CGraphicRenderTargetTexture::Render()
{
	D3DSURFACE_DESC desc;
	if (m_lpd3dRenderTargetSurface == nullptr)
	{
		CreateTextures();
	}
	m_lpd3dRenderTargetSurface->GetDesc(&desc);

Somewhere it lose a Texture pointer, so I reinitalize.

 

1 hour ago, Karbust said:

It is working but not on everything, somehow some mounts don't get the effect:

May thoose using relativ path and searching from current directory, check with Debug.

  • Think 1
  • Love 1

giphy.gif

Best regards, Arlinamid

  • Management
3 hours ago, arlinamid said:

May thoose using relativ path and searching from current directory, check with Debug.

Nothing missing, and the effect is showing up on the mount when called, but not on the preview...

raw

raw

9 minutes ago, Karbust said:

Nothing missing, and the effect is showing up on the mount when called, but not on the preview...

I mean in msm path something like this effect.mse not

ymir work/effect/mount/folder/effect.mse

giphy.gif

Best regards, Arlinamid

28 minutes ago, Karbust said:

Nothing missing, and the effect is showing up on the mount when called, but not on the preview...

I told you to do the tutorial I gave you above. You said you have it, but you don't have it full. What I gave you is full. I just installed it and for me it's showing.

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.