Reflecting projectiles V3 w/ download on pg 3

Post here if you want to help developing something for FAF.

Reflecting projectiles V3 w/ download on pg 3

Postby Resin_Smoker » 18 May 2014, 23:47

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
Last edited by Resin_Smoker on 17 Jun 2014, 20:29, edited 2 times in total.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles

Postby ZLO_RD » 19 May 2014, 00:46

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
http://www.youtube.com/user/dimatularus
http://www.twitch.tv/zlo_rd
TA4Life: "At the very least we are not slaves to the UI"
User avatar
ZLO_RD
Supreme Commander
 
Posts: 2265
Joined: 27 Oct 2011, 13:57
Location: Russia, Tula
Has liked: 303 times
Been liked: 400 times
FAF User Name: ZLO

Re: Reflecting projectiles

Postby Resin_Smoker » 19 May 2014, 01:50

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
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles

Postby ZLO_RD » 19 May 2014, 08:02

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
http://www.youtube.com/user/dimatularus
http://www.twitch.tv/zlo_rd
TA4Life: "At the very least we are not slaves to the UI"
User avatar
ZLO_RD
Supreme Commander
 
Posts: 2265
Joined: 27 Oct 2011, 13:57
Location: Russia, Tula
Has liked: 303 times
Been liked: 400 times
FAF User Name: ZLO

Re: Reflecting projectiles

Postby Resin_Smoker » 19 May 2014, 15:36

No they are beam weapons
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles

Postby ZLO_RD » 19 May 2014, 16:45

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 =\
http://www.youtube.com/user/dimatularus
http://www.twitch.tv/zlo_rd
TA4Life: "At the very least we are not slaves to the UI"
User avatar
ZLO_RD
Supreme Commander
 
Posts: 2265
Joined: 27 Oct 2011, 13:57
Location: Russia, Tula
Has liked: 303 times
Been liked: 400 times
FAF User Name: ZLO

Re: Reflecting projectiles

Postby IceDreamer » 19 May 2014, 17:39

Resin you really do need to check current files and test things ingame man...
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: Reflecting projectiles

Postby Resin_Smoker » 20 May 2014, 01:31

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
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: Reflecting projectiles

Postby IceDreamer » 20 May 2014, 02:21

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.
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: Reflecting projectiles

Postby Resin_Smoker » 08 Jun 2014, 02:07

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
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest