Turning off crosshairs

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
casius
Mole Person
Posts: 3
Joined: Sun Feb 08, 2015 3:08 pm

Turning off crosshairs

Post by casius »

Hi,
is it possible to turn off crosshairs for specific weapons only? I've been thinking of re-balancing the sniper rifle by,among other things,turning off the crosshair forcing the player to use the scope(I assume this wouldn't affect scope aim accuracy?).

Thanks for any help.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Turning off crosshairs

Post by Cybernetic pig »

casius wrote:Hi,
is it possible to turn off crosshairs for specific weapons only? I've been thinking of re-balancing the sniper rifle by,among other things,turning off the crosshair forcing the player to use the scope(I assume this wouldn't affect scope aim accuracy?).

Thanks for any help.
I am assuming you are the one who messaged me?

Yes it is possible, but you need programming experience.

In WeaponRifle.uc you need to add the states state DownWeapon and state Idle.
use state idle to turn off the crosshair, and state DownWeapon to re-enable. You also need to take consideration of reloading a previous save whist the rifle is in hand and the toggle crosshair menu option too, I believe.
casius
Mole Person
Posts: 3
Joined: Sun Feb 08, 2015 3:08 pm

Re: Turning off crosshairs

Post by casius »

Cybernetic pig wrote: I am assuming you are the one who messaged me?

Yes it is possible, but you need programming experience.

In WeaponRifle.uc you need to add the states state DownWeapon and state Idle.
use state idle to turn off the crosshair, and state DownWeapon to re-enable. You also need to take consideration of reloading a previous save whist the rifle is in hand and the toggle crosshair menu option too, I believe.
It was me indeed.

Unfortunately my knowledge of programming is rather limited.I can understand and modify most of the stuff that is in uc. files,but I don't really know how to write anything on my own(except the simple stuff).Guess I can try at least,by mimicking existing code.

Thanks.

BTW,did you up the health of MJ12 troops in your mod?
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Turning off crosshairs

Post by Cybernetic pig »

casius wrote:Guess I can try at least,by mimicking existing code.
Take a look at WeaponNanoSword.uc, it uses those states for turning on and off the sword's light.
BTW,did you up the health of MJ12 troops in your mod?
http://genericname112.wix.com/gmdx#!art ... gence/c8ao

Default troops it is not listed, but yes they have about +10 hp for each body part, so barely noticeable.
The elite variant later in the game have full body armor, cloaking and a more noticeable health boost, but still go down easy.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Turning off crosshairs

Post by DDL »

You could just press "toggle crosshair" every time you bring up the rifle.

Bear in mind that the crosshair itself doesn't affect accuracy at all: it just displays your current accuracy. You'll still get more accurate if you stop moving and wait, even without the crosshair.
casius
Mole Person
Posts: 3
Joined: Sun Feb 08, 2015 3:08 pm

Re: Turning off crosshairs

Post by casius »

Ok,I'm now having great trouble compiling the DeusEx.u file,UCC appears to run fine - it says it succeeded in the command prompt but doesn't create a new DE.u file at all(yes,I made sure to delete the old file in the system folder beforehand).

EDIT:If I take out the DE CD and then try to compile I get this error : "Superclass UBrowserBufferedTcpLink of class deusexgspylink not found." - I assume this has something to do with CD path?

EDIT2:Nevermind,fixed it.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Turning off crosshairs

Post by Cybernetic pig »

The problem with the snipe isn't the xhairs really, it is the fact that the weapon has 100% accuracy when hip-firing. Anyone know why?
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Turning off crosshairs

Post by DDL »

It doesn't, but it does have a tremendous range. Since accuracy is implemented by adding an arbitrary offset to your starting fire vector position and then extending it to the weapon's maxrange, weapons with long ranges are inherently more accurate.

i.e. Weapon pistol, deviating at 500uunits off to the left, extending out to 4800 units (max range) = 6 degree deviation.
Weapon rifle, deviating at 500uunits off to the left, extending out to 48000 units (max range) = 0.6 degree deviation.

it's not terribly good code, really. Since deviations drop to zero when zoomed (i.e. perfect accuracy, countered by the jiggle effect) you could always just increase the baseaccuracy of the rifle by a lot. Might fuck up the AI, though.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Turning off crosshairs

Post by Cybernetic pig »

DDL wrote:It doesn't, but it does have a tremendous range. Since accuracy is implemented by adding an arbitrary offset to your starting fire vector position and then extending it to the weapon's maxrange, weapons with long ranges are inherently more accurate.

i.e. Weapon pistol, deviating at 500uunits off to the left, extending out to 4800 units (max range) = 6 degree deviation.
Weapon rifle, deviating at 500uunits off to the left, extending out to 48000 units (max range) = 0.6 degree deviation.

it's not terribly good code, really. Since deviations drop to zero when zoomed (i.e. perfect accuracy, countered by the jiggle effect) you could always just increase the baseaccuracy of the rifle by a lot. Might fuck up the AI, though.
I was thinking a moderate increase of accuracy & a significant decrease of max/accurate range. 48000 units is unnecessary. No map is that wide. I just built a box of 48000 each way and it was twice the size of Liberty Island. Yet still, even in the big maps there are no sight lines consisting of half that extent, so I am going to reduce max range to 24000 and accurate range to a likewise appropriate value and see how it goes.
Post Reply