Page 1 of 3

Reflecting projectiles V3 w/ download on pg 3

PostPosted: 18 May 2014, 23:47
by Resin_Smoker
Download Link: http://www.mediafire.com/download/6dve9 ... ons_v1.rar

This little mod allows projectiles impacting shield to be reflected 50% of the time. Please keep in mind that this is still very much a work in progress so expect to see some strange things.

Resin

Re: Reflecting projectiles

PostPosted: 19 May 2014, 00:46
by ZLO_RD
really funny to play with that, i wish beams would refract too xD (would be even more funny)

i also managed to crash FA useing that mod, by placing many hoplites in place where many shield overlap

rhino projectiles do not refract back they just stay in shield

EDIT: OH! i used version from mod vault cause i am to lazy to download anything, sorry

Re: Reflecting projectiles

PostPosted: 19 May 2014, 01:50
by Resin_Smoker
ZLO_RD wrote:really funny to play with that, i wish beams would refract too xD (would be even more funny)

i also managed to crash FA useing that mod, by placing many hoplites in place where many shield overlap

rhino projectiles do not refract back they just stay in shield

EDIT: OH! i used version from mod vault cause i am to lazy to download anything, sorry


As i said this is a work in progress so expect crazy results if you do crazy things. The Rhino's use beam weapons not projectile.

Resin

Re: Reflecting projectiles

PostPosted: 19 May 2014, 08:02
by ZLO_RD
Rhino and Cerberus in faf use projectiles, but they are tracking target, that is why maybe they do not reflect properly, they just stop inside of shield, but I guess that is not big deal

Re: Reflecting projectiles

PostPosted: 19 May 2014, 15:36
by Resin_Smoker
No they are beam weapons

Re: Reflecting projectiles

PostPosted: 19 May 2014, 16:45
by ZLO_RD
faforever.com/faf/unitsDB/unit.php?bp=URB2301,URL0202
No, they were changed to projectiles to avoid beam bugs(no view of beam if turret in fog of war and that fact that beams miss a lot)
Edit: www.faforever.com/?p=863 here is change but it is not explained there complitely =\

Re: Reflecting projectiles

PostPosted: 19 May 2014, 17:39
by IceDreamer
Resin you really do need to check current files and test things ingame man...

Re: Reflecting projectiles

PostPosted: 20 May 2014, 01:31
by Resin_Smoker
IceDreamer wrote:Resin you really do need to check current files and test things ingame man...


As stated on the first post...

"Please keep in mind that this is still very much a work in progress so expect to see some strange things."

Beyond that I'm only proving the concept and allowing others to see what was done by releasing it. Your welcome to try and improve on this work but I doubt 99.999% of FAF subscribers will understand what was done, much less what needs to be to make it prefect.

To that end I'll state the three biggest challenges:

1) Projectiles can sometimes pass through a shield before being reflected. This is due to the projectile speed being faster than the impact can be detected. This is totally due to the way the game engine handles impact events. Now I've a few ideas on how to resolve this but as I said it's not a project for a casual scripter. However for those brave enough to give it a try here it is....

Make a dummy projectile, attach it to the original projectile and then offset the projectile ahead of the original by an amount based off of the originals muzzle velocity. What this will do it enable the dummy projectile to trigger the reflection event in advance of the original arriving at the shield. While this will not 100% prevent a projectile from penetrating, it should reduce it significantly.

2) Shield OnCollision event for some unknown reason can't be non-destructively hook'd and I've not been able to figure out why. In a nut-shell I'm unable to call "oldShield.OnCollisionCheck(self,other)" and run the old version of shield.lua to enable proper hooking. Even importing the "shield" class indirectly doesn't work.

3) Creating impact effects appears to be a major issue as the Vector data needed for the correct placement of the effects is incorrect in some way. Even using the native CreateImpactEffect within shield.lua didnt work.

Note: I don't use FAF to create or test mods, just vanilla with 3599 patches. Running FAF locally is pointless for the testing of betas as it's very cumbersome to load repeatedly via the lobby.

Resin

Re: Reflecting projectiles

PostPosted: 20 May 2014, 02:21
by IceDreamer
Resin_Smoker wrote:Note: I don't use FAF to create or test mods, just vanilla with 3599 patches. Running FAF locally is pointless for the testing of betas as it's very cumbersome to load repeatedly via the lobby.


c://ProgramData/FAForever/bin/ForgedAlliance.exe

Make a shortcut to that, give it whatever command line things you want, and you will have a quick shortcut to FAF's balance inside which you have the option to end game, going back to main menu, to save having to constantly boot.

Re: Reflecting projectiles

PostPosted: 08 Jun 2014, 02:07
by Resin_Smoker
made a few improvements to the script thus far.
In the attached video I've the same projectile bouncing between two shields over and over again: https://www.youtube.com/watch?v=AC7IefNTCtc&feature=youtu.be

Please note that the small delay seen between when the projectile impacts and the shield effects take place is due to internal engine lua's delay of 4 ticks. Basically there is nothing that can be done about this.

Resin