Page 1 of 1

Crosshair changer

PostPosted: 28 Jul 2011, 11:58
by YaRo
Hello to everyone. I think I am not the only person who would like to change the default crosshair to something more suitable for me. Yes, I can change the image, but I wrote a function that allow you to choose your favorite crosshair from menu (UI options). All crosshairs were done by Fluxord and packed in 1.1 version. This is alpha variant, so there is not all crosshairs. In future i am planning to add color choose system, and, if you don't like this tile style of choosing, i can do something else, due to your feedbacks.

Warning! To make it work you need to patch (recompile) the game!

crosshair.zip
(52.14 KiB) Downloaded 436 times

Re: Crosshair changer

PostPosted: 28 Jul 2011, 17:24
by Kitsune
Works well, good job. Keep it up.

YaRo {l Wrote}:All crosshairs were made by Fluxord and packed in 1.1 version.


Fluxord made the crosshairs, not a dev team member.
viewtopic.php?f=53&t=1471

Re: Crosshair changer

PostPosted: 28 Jul 2011, 20:36
by YaRo
Thanks! I edited my fault.

Re: Crosshair changer

PostPosted: 28 Jul 2011, 21:36
by Kitsune
you should mention that the client has to be patched for it to work. and tbh, i think you could've done it another way, but it works well regardless and i love the classic Q3A crosshair nostalgia it gives. ^-^

Re: Crosshair changer

PostPosted: 28 Jul 2011, 21:49
by YaRo
Yes, I've done this in Q3A style, however, if anyone wants, I can rewrite this, so it will look like weapon chooser from variables (with prev and next buttons). So just feedback

Re: Crosshair changer

PostPosted: 29 Jul 2011, 03:24
by qreeves
Glad you finally made a forum post about this, I keep missing people on IRC. What exactly did you need to modify? You know you can use /crosshairtex "path/to/image" to set the crosshair, right?

Re: Crosshair changer

PostPosted: 29 Jul 2011, 07:43
by YaRo
qreeves, you need to put these files in the correct directory of the game and then compile it (I.E. by using "sudo make install" in unix).

Re: Crosshair changer

PostPosted: 29 Jul 2011, 15:31
by Kitsune
YaRo, he wants to know what in the code you changed and why you didnt do it entirely in cubescript.

Re: Crosshair changer

PostPosted: 29 Jul 2011, 21:47
by YaRo
Ah, I think I got it. I've added switch that returns crosshair texture in "getpointer" function, which can be selected from menu. The idea is simple, however that was hard to realize in source code (But this way is stable).

Re: Crosshair changer

PostPosted: 19 Sep 2011, 20:19
by YaRo
Version 1.1 has come

New features:

-Better samples of crosshairs
-Per-weapon crosshair textures and colors
-Crosshair color changer
-My crosshairs pack



redeclipse/src/engine/ui.cpp ui.cpp - solved a bug
that shows you guibackground in all tabs, instead of one. Needs for
crosshair color select;


redeclipse/src/game/hud.cpp hud.cpp - identifying
variables;


redeclipse/src/game/hud.cpp hud2.cpp - main code
itself. made a new crosshair selection;


redeclipse/data/menus.cfg menus.cfg - this pastebin
contains all "ui" tab;


/redeclipse/game/game.h game.h - all HUD namespace
(fixed for crosshair changer)


redeclipse/data/crosshairs/ /crosshairs -
contains 10 different crosshairs with hit parts and whole prewiews.

How to set up:

Go to source of RE, search files (listed above), search that code functions and replace functions with new ones... Compile! Enjoy!

Image

Re: Crosshair changer

PostPosted: 20 Sep 2011, 01:40
by inpersona64
Is there anyone that could teamview me for this? i'd rather someone who knows how to do all this do it for me.

Re: Crosshair changer

PostPosted: 20 Sep 2011, 14:16
by YaRo
In fact i emailed Mr. Reeves and asked him to put it into 1.2... However I'm too shy to ask him again... =)

Re: Crosshair changer

PostPosted: 20 Sep 2011, 17:04
by ZeroKnight
inpersona64 {l Wrote}:Is there anyone that could teamview me for this? i'd rather someone who knows how to do all this do it for me.


I'll be online later today, so I'll do it for you then ;P

Re: Crosshair changer

PostPosted: 20 Sep 2011, 18:17
by inpersona64
ZeroKnight {l Wrote}:
inpersona64 {l Wrote}:Is there anyone that could teamview me for this? i'd rather someone who knows how to do all this do it for me.


I'll be online later today, so I'll do it for you then ;P

:D

Re: Crosshair changer

PostPosted: 21 Sep 2011, 04:08
by qreeves
YaRo {l Wrote}:In fact i emailed Mr. Reeves and asked him to put it into 1.2... However I'm too shy to ask him again... =)

I've been having issues in real life at the moment. I did look at the stuff you provided, and again, it patches the code for the crosshair system in a way that I am not happy with. Everything I intended for people to be able to change/edit has already been exposed by variables, so unless you can do it without patching the source code I'm not prepared to apply it (hint: learn CubeScript better, you can do everything you're trying to do there).

Re: Crosshair changer

PostPosted: 21 Sep 2011, 14:05
by YaRo
Dear Mr. Reeves,

I am very glad that you have read and checked this. Also I am grateful that you have criticized such thing.
However, I would like to say that I know CS, but I do not like such thing. I have written my own RE version and this XhairCS is a part of it. So I have to do a lot in source code that CS can not. This is about 95% of all things. That is why I do not prefer such style.

Yours sincerely,

Yaroslav YaRo Storozhev

Re: Crosshair changer

PostPosted: 21 Sep 2011, 14:21
by Phy83r0pt1k
Actually, cube script can do many of the same things, just more work. trust me, doing fall damage in CS takes multiple pages compared to its 3 line C++ counterpart, the same goes for iron sights; but it can still be done nonetheless, and gui's are far easier in CS than C++ for this engine.

Re: Crosshair changer

PostPosted: 21 Sep 2011, 14:26
by YaRo
Phy83r0pt1k {l Wrote}:Actually, cube script can do many of the same things, just more work. trust me, doing fall damage in CS takes multiple pages compared to its 3 line C++ counterpart, the same goes for iron sights; but it can still be done nonetheless, and gui's are far easier in CS than C++ for this engine.

In fact I really prefer C++ to CS... That is just my opinion, nothing more...