Page 1 of 1

Re-enable hitmarkers for my custom mod

Posted: 2020-06-19 12:39
by Danesh_italiano
I am trying to re-enable hitmarker (that cross that confirm hit) on my "custom mod" but did not worked :'( (this custom mod is for a hitreg test)

I uncommented these lines from "hudelementsgenericweapon.con" (M16A4 tweak file calls "ObjectTemplate.weaponHud.guiIndex 210" and index 210 is hudelementsgenericweapon.con):

Code: Select all

hudBuilder.createPictureNode 		GenericWeaponHud GenericHitIndication 384 284 32 32
hudBuilder.setPictureNodeTexture 	Ingame/CrossHair/vsp_HitIndicator.dds
hudBuilder.setNodeRGBVariables		CrossHairColorRed CrossHairColorGreen CrossHairColorBlue
hudBuilder.setNodeAlphaVariable     	HitIndicatorIconAlpha
hudBuilder.setNodeShowVariable 		HitIndicatorIconShow
(BF2 uses same values)

+

I have replaced vsp_HitIndicator.dds with the one from BF2 (the one from PR is just blank and the one from BF2 has the crosshair)

+

set "sv.hitIndicator 1" on server files however still without hitmarkers :/

I am missing something or it got "disabled/removed" on any python file?

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-19 13:03
by Mats391
I think realityserver.py disables it. Also I am pretty sure this hitreg is client side as well, so will give false positives just like impact effect.

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-19 13:05
by AlonTavor
I don't remember it giving false positives, I think its serverside.

Try sv.hitIndicator 1 in server console after map loads, Python does set it to 0.

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-19 13:46
by Danesh_italiano
python indeed set hitindicator to 0 but even after setting it 1 on server console, does not work :/

tried loading new map after changing it to 1 on server console and nada

anything else?

thanks!

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-20 09:47
by Danesh_italiano
So...
I was doing some tests with BF2 and... Something wrong is not right!

I have edited vsp_HitIndicator.dds changing the crosshair from yellow (original color) to red and it was still showing yellow ingame. Then i REMOVED the file vsp_HitIndicator.dds and it was still showing the yellow crosshair when hitting someone...

Checking the BF2 files, i noticed that it uses vsp_HitIndicator.tga.
HudElementsM4.con:

Code: Select all

hudBuilder.createPictureNode 		M4Hud M4HitIndication 384 284 32 32
hudBuilder.setPictureNodeTexture 	Ingame/CrossHair/vsp_HitIndicator.tga
hudBuilder.setNodeRGBVariables		CrossHairColorRed CrossHairColorGreen CrossHairColorBlue
hudBuilder.setNodeAlphaVariable     	HitIndicatorIconAlpha
hudBuilder.setNodeShowVariable 		HitIndicatorIconShow
And removing/commenting those lines, makes the game to NOT show the hitindicator, which means that everything is working as intended except that...

WHERE THE HELL IS LOCATED THIS FILE vsp_HitIndicator.tga ???

Cant find it anywhere on the entire bf2 folder.... uadafak?

and not much results searching vsp_HitIndicator.tga on gugol :'(

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-20 10:02
by Mats391
I think .tga and .dds are interchangeable and BF2 does not care which extension you use.
.tga files usually are compiled into the menu atlas. In PR the vsp_HitIndicator.dds is also compiled into the menu atlas, so if you want to change it, you need to change the atlas too.

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-06-20 11:28
by Danesh_italiano
Papi Suchar generated/compiled menu atlas with my vsp_HitIndicator.dds and it worked

10q yall

Re: Re-enable hitmarkers for my custom mod

Posted: 2020-07-16 13:52
by UncleSmek
did you fix hitreg?