Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 29/10/14 7:08

And G
Member
Registered: 29/10/14

Reducing weapon spread

I love third person shooters like Fallout and ME, but in Oni it seems that most weapons (especially automatic guns) are only good for suppression fire beyond close range. So I wanted to change that, but I can't find the parameter's I'm supposed to modify. FireSpreadLength/-Width/-Skew only applies to the cone the AI tries to dodge, MaxInaccuracyAngle does something else entirely, and so on. So where do I edit the actual firing spread?

Also, how can I turn off auto-targeting?

Offline

#2 29/10/14 10:12

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Reducing weapon spread

Welcome, And G!  It's true that automatic weapons like the SMG are only useful at close range.  That's how Bungie kept them balanced, particularly because if the weapons were more precise, it would be harder to get in close.  As it is, you can dodge the SMG at a distance while working your way closer, and then when the enemy has to reload, you can jump him.  If the game didn't emphasize melee so much, the weapons could probably be more accurate.

As for editing the weapons' accuracy, I'll direct you to the note at the very bottom of this page: http://wiki.oni2.net/PAR3.  It's a complex situation; AIs and turrets have their own individual skill settings, there's a general weapon accuracy setting by difficulty in ONGS, but the "core" accuracy comes from the particles (PAR3) attached to the weapon (ONWC).  Accuracy is also impacted by the recoil settings found in ONWC.  Does that help?

Oh, and auto-aim for weapons can be turned off with the BSL command "chr_weapon_auto_aim = 0", which you can enter in the developer console.


byproducts are fine, but where's the beef?

Offline

#3 29/10/14 13:28

And G
Member
Registered: 29/10/14

Re: Reducing weapon spread

Thanks a lot, that was exactly what I was looking for!

Offline

#4 29/10/14 14:13

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Reducing weapon spread

No problem.  Some topics could definitely be presented more clearly on the wiki than as an obscure footnote.  The wiki tends to address subjects by data type instead of by area of engine, though we have a few "comprehensive" pages directly under the Modding information category and in the Tutorials category under that one.  You can see "Combat behavior part 3" under the AI article for more info on AI accuracy with weapons if that interests you.


byproducts are fine, but where's the beef?

Offline

#5 29/10/14 15:19

And G
Member
Registered: 29/10/14

Re: Reducing weapon spread

Actually, when modifying the spread for weapons from the New Weapons Collection mod, I see now that weapons that use the w2_sap_e01 particles don't actually shoot where they're aimed at. It's most obvious with the Carbine Sniper (w32_crb) which has a crosshair that is clearly aligned with the barrel, but the shots hit a few degrees to the right of it. Even with the original particles this is noticeable, as only the lefternmost shots hit where the laser sight points at. The Halo Assault Rifle (w18_asr2) doesn't have a crosshair, but with the spread removed the shots clearly hit slightly to the right of where the barrel is pointing. In fact, it seems to me that all rifles with projectiles aim in that same direction, which is also where all hand guns shoot at (but with those it's actually the correct direction).

I don't really understand how the ONWC direction parameters work, so I guess my question is: Which parameters control weapon aim? And can I just copy values from weapons with proper aim or is there more to it than that?

Offline

#6 29/10/14 16:00

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Reducing weapon spread

The weapon misalignment And G is talking about has kept me wondering as well. It feels really awkward to aim certain guns because the aim-assist wants to snap at angels that are not lined up with the crosshair.

Last edited by TOCS (30/10/14 4:03)

Offline

#7 29/10/14 16:46

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Reducing weapon spread

I haven't done it myself, so I don't know the details.  Unless someone comes along with an exact answer, I would suggest exporting a properly-working weapon to XML -- the ONWC and its attached PAR3s -- then making a package out of it for easy testing, and trying to modify various particle properties while comparing the XML with the XML you get from exporting a problematic weapon to see what's different.


byproducts are fine, but where's the beef?

Offline

#8 30/10/14 5:15

ltemplar
Member
From: Poland
Registered: 23/8/12

Re: Reducing weapon spread

The easiest way is:

For one handed guns copy & paste values from w1_tap(in ONWC see the emitter position matrix part)
For tow handed guns : copy & paste values from w3_phs(plasma rifle) - in ONWC see the emitter position matrix  again.

If you want to change bullet spread (accuracy) You need to change PAR3 - emitter value for corresponding weapon type .
For example for plasma rifle this will be w3_phs_e1 for Campbell equalizer(gun) w1_tap_e1 the same goes for particle dmg or their speed values(but I believe you will figure that out by your self)

The tricky part is the cross-hair(laser sight) thing. You can find values regarding them in the first lines of ONWC(in XML editor ). They values in position matrix should be exact the same as thus in the ONWC emitter part.The best method is to copy paste them , and correct the xyz positions(first 3 in the matrix) manually(otherwise the lasersight , will be in other place than lasersight emitter - but that's a minor detail)

If you want to change the Ai weapon skills you can :
Change how AI will react on moving targets(thus are present in the ONWC below the laser sight - regarding bullet speed tracking value- if Ai should fire faster than bullet speed(w1_tap_p1 speed is 800 so set it lower) , exact as bullet speed , slower than bullet speed; this will only work on moving targets though)
Change AI weapon handling skills in the  char(ONCC) parameters(this part is connected directly to weapon emitter(bullet spread part), so it should have other value than 0 between 1(for example 0.01) otherwise it will not work correctly)
Change the combat behaviour in the CMBT parameters
You can also may change the recoil part in the ONWC , but this will only work if AI return to target speed parameter(ONCC) will be set properly , otherwise AI will correct it's aiming in the split of the second.

Also you will notice that bullet spread is directly connected to bullet speed(particle). If you set bullet speed higher then the bullet spread also should be set higher.

Tell me is that help you.
Ltemplar.

Last edited by ltemplar (30/10/14 5:22)

Offline

Board footer

Powered by FluxBB