Re-enable hitmarkers for my custom mod

Making or wanting help making your own asset? Check in here
Post Reply
Danesh_italiano
Posts: 576
Joined: 2012-07-23 03:25

Re-enable hitmarkers for my custom mod

Post 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?
I only know that I know nothing. Só sei que nada sei. Sólo sé que no sé nada. So solo di non sapere nulla. Tantum scio me nihil scire. Je sais seulement que je ne sais rien. Tiedän vain, etten tiedä mitään. Ich weiss nur dass ich nichts weiss. Ek weet net dat ek niks weet nie. Wiem tylko, ?e nic nie wiem. Heoi ko ahau anake e mohio ana kahore au e mohio. Ngiyazi kuphela ukuthi angazi lutho.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Re-enable hitmarkers for my custom mod

Post 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.
Image

Mineral: TIL that Wire-guided missiles actually use wire
AlonTavor
PR:BF2 Developer
Posts: 2991
Joined: 2009-08-10 18:58

Re: Re-enable hitmarkers for my custom mod

Post 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.
Danesh_italiano
Posts: 576
Joined: 2012-07-23 03:25

Re: Re-enable hitmarkers for my custom mod

Post 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!
I only know that I know nothing. Só sei que nada sei. Sólo sé que no sé nada. So solo di non sapere nulla. Tantum scio me nihil scire. Je sais seulement que je ne sais rien. Tiedän vain, etten tiedä mitään. Ich weiss nur dass ich nichts weiss. Ek weet net dat ek niks weet nie. Wiem tylko, ?e nic nie wiem. Heoi ko ahau anake e mohio ana kahore au e mohio. Ngiyazi kuphela ukuthi angazi lutho.
Danesh_italiano
Posts: 576
Joined: 2012-07-23 03:25

Re: Re-enable hitmarkers for my custom mod

Post 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 :'(
Last edited by Danesh_italiano on 2020-06-20 09:58, edited 1 time in total.
I only know that I know nothing. Só sei que nada sei. Sólo sé que no sé nada. So solo di non sapere nulla. Tantum scio me nihil scire. Je sais seulement que je ne sais rien. Tiedän vain, etten tiedä mitään. Ich weiss nur dass ich nichts weiss. Ek weet net dat ek niks weet nie. Wiem tylko, ?e nic nie wiem. Heoi ko ahau anake e mohio ana kahore au e mohio. Ngiyazi kuphela ukuthi angazi lutho.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Re-enable hitmarkers for my custom mod

Post 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.
Image

Mineral: TIL that Wire-guided missiles actually use wire
Danesh_italiano
Posts: 576
Joined: 2012-07-23 03:25

Re: Re-enable hitmarkers for my custom mod

Post by Danesh_italiano »

Papi Suchar generated/compiled menu atlas with my vsp_HitIndicator.dds and it worked

10q yall
I only know that I know nothing. Só sei que nada sei. Sólo sé que no sé nada. So solo di non sapere nulla. Tantum scio me nihil scire. Je sais seulement que je ne sais rien. Tiedän vain, etten tiedä mitään. Ich weiss nur dass ich nichts weiss. Ek weet net dat ek niks weet nie. Wiem tylko, ?e nic nie wiem. Heoi ko ahau anake e mohio ana kahore au e mohio. Ngiyazi kuphela ukuthi angazi lutho.
UncleSmek
Posts: 1027
Joined: 2008-09-02 05:07

Re: Re-enable hitmarkers for my custom mod

Post by UncleSmek »

did you fix hitreg?
Post Reply

Return to “PR:BF2 Community Modding”