Jump to content

Changing Projectile Movement mid air / Ballistics Mod


Ravuth

Recommended Posts

Ok, I'm going to drop a detailed report on the JIP LN NVSE forum page with information on how to reproduce this bug. Since I don't know when this fix will be applied or if this bug is fixable at all, I'll try to focus on the wind part of my mod instead.

 

And maybe an easy way to disable/enable the gun model for hopefully fixing the projectile node position with Iron sites.

 

By the way, how do I disable/enable the gun model while aiming ?

 

Is there a particular rifle that is bad with this I should look at attempting that with ?

 

That'd be very nice of you ! Every gun so far that I used that doesn't have a scope is more or less affected when using the Custom Gravity Model. I primarly used This Machine (with improved weapon meshes as otherwise the projectile would be even more off) for non scoped weapon models. All projectiles are slightly off to the top right. But I think it will be more worth checking out the 762mmProjectile.NIF vanilla projectile I use for tracers. It's the only projectile model so far that does not work properly even with a scope unless I don't use my Custom Gravity Model.

 

Also , what type of script(s) are you running ?

 

I use a single object script though I have tested it as an effect script and as a quest script as well now that you mentioned. All three are yielding the exact same results when used ingame. I honestly don't know which one is better for dealing with projectile references so I sticked with the one that sounds closest.

 

Link to comment
Share on other sites

This is all very interesting but not something I have dug into myself. What I do know is that Roy Batterian was extremely bothered by aiming irregularities of various basic game weapons (which were not consistent) and created the "Weapon Mesh Improvement Mod" (WMIM) mod which involved manual tweaks to almost every vanilla weapon for TTW and later ported it to FNV. ("Fixes for mesh errors, uv errors, incorrect flags, missing extra data, form lists, projectiles, and other weapon related bugs and errors.") Consequently I suspect it will not be as simple as "one script to rule them all". But you might be able to build something that leverages off of the foundation laid by WMIM, once you get the fundamental process worked out.

 

-Dubious-

Link to comment
Share on other sites

This is all very interesting but not something I have dug into myself. What I do know is that Roy Batterian was extremely bothered by aiming irregularities of various basic game weapons (which were not consistent) and created the "Weapon Mesh Improvement Mod" (WMIM) mod which involved manual tweaks to almost every vanilla weapon for TTW and later ported it to FNV. ("Fixes for mesh errors, uv errors, incorrect flags, missing extra data, form lists, projectiles, and other weapon related bugs and errors.")

 

I actually had WMIM installed before as it was pretty much necessary if I wanted to play with iron sights and physical projectiles on long distances where the issue of a broken aim became apparent. Roy Batterian did imo an absolutely fantastic job with this quality of life improvement and prevented me a lot of hedache during gameplay. However this unfortunately won't work with my custom gravity model. The only thing my custom gravity model does is calculating the line of sight, the drop and then subtracts eachother (an example can be found at the beginning of this thread). However the projectile will fly above the LOS for some range when using iron sights.

 

I noticed that my custom gravity model is sadly not the best solution. While this model works excellently on paper it has a glitchy nature ingame. When aiming it could happen that the projectile will just go straight through the target without hitting it. This glitch occures especially often when looking down/up at an steep angle like 50°. This happens probably because when the projectile receives an update (z-position will be change constantly in the script) it will just teleport through the target.

 

Consequently I suspect it will not be as simple as "one script to rule them all". But you might be able to build something that leverages off of the foundation laid by WMIM, once you get the fundamental process worked out.

 

I don't even know where to start as it's all uncharted territory from here for me. All I've really learned in my GECK modding journey so far is how to deal with projectiles in a script. That's what my mod at its core is all about. But maybe there's just no other way around it and I have to learn a little bit more.

I have worked a little bit on the Wind part and actually managed to work out a functioning formula without any bugs or glitches for once :happy:. See for yourself (10m/s crosswind at 90°):

 

The method is to change the projectile's z-angle over time so it results in a curved shot instead of a unrealistic triangle when the angle is fixed. Positive values means that the wind deflects the projectile to the right and negative ones to the left. The script section looks as follows:

set fProjStartAngleZ to rProj.GetStartingAngle Z
set fCrossWindAngle to GetWindDirection - fProjStartAngleZ
set fCrossWindComponent to Fsin fCrossWindAngle
set fProjAngleZ to (fProjWindCoefficient*fProjDistance*fCrossWindComponent*GetWindSpeed + fProjStartAngleZ)
rProj.SetAngle Z fProjAngleZ

As always I saved the fProjWindCoefficient value in an ini file. It is dependend on the Wind Speed which I still have to decide how big its max value should be (1.0 -> 20m/s or 1.0 -> 30m/s or ... ?). fProjWindCoefficient can be calculated by using this formula (d2MaxPBR = deflection at double maximum point blank range):

fProjWindCoefficient = 2*atan(d2MaxPBR/s2MaxPBR^2)

All I have to do now is to calculate those coefficients for over 70 custom projectiles... yay

 

Status quo:

  • Velocity decrease - solved
  • Wind - solved
  • Gravity - needs to be fixed / buggy in conjunction with SetProjectileRefSpeedMult and an angled projectile
  • Custom Gravity model - needs to be fixed / switching models off while aiming as a last resort / glitchy / open to different solutions and approaches
Link to comment
Share on other sites

I did some testing , and what I thought was a fix , not possible , atleast without this https://geckwiki.com/index.php?title=GetEquippedItemRef

 

And after some reading / testing , I see the projectile model is part of why it is off , not just the weap model node axis (direction). Which leads to some deep overhaul to do what you want.

 

Trying to get the weapon model to disable/enable once it is in the Iron site position. I don't think is possible. It seems the world model Ref and inventory Ref , are not the same object as the Weapon node Ref.

But you could tell if you use that JIP function maybe ? I cannot use JIP , my comp won't allow install.

 

But to extend on that won't allow ... I cannot keep posting here ... my self and the nexus won't allow it.

I'm sorry ... Good luck on your mod.

 

Thank you for your interaction dubious :thumbsup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...