Quick n Dirty Alien Vision Mod

twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
edited January 2012 in Modding
Now I see everything!
Since some players have found the Kharaa dark vision toggling impairs game enjoyment, I have tinkered with dark vision to make lighting and particle effects more visible. I'd like to hear your feedbacks. :D

Instructions (for build 191):
1. Open Alien_Client.lua (found in the folder Steam\steamapps\common\natural selection 2\ns2\lua\)
2. Find function Alien:UpdateClientEffects, line 396:
CODE
local darkVisionFadeAmount = 1

3. Change the value to a lower one. Lower value means less opaque effect.
eg. local darkVisionFadeAmount = 0.5

(the following are optional)
4. Scroll down a few lines to this
CODE
        if not self.darkVisionOn then
            darkVisionFadeAmount = math.max( 1 - (Client.GetTime() - self.darkVisionEndTime) / darkVisionFadeTime, 0 )
        end/

5. Change the value 1 to match the above change.
eg. darkVisionFadeAmount = math.max( 0.5 - (Client.GetTime() - self.darkVisionEndTime) / darkVisionFadeTime, 0 )

There you have it.

Screenshots:
image
Dark room without Dark Vision

image
Dark room with modified Dark Vision

image
There are too many of them!
Post edited by Unknown User on
«134

Comments

  • Taxen0Taxen0 Join Date: 2010-07-30 Member: 73357Posts: 286Members
    edited July 2011
    As I have said before, this looks great! I hope the devs will consider it as it's less disorienting and you get to see all cool textures and lightning that the mappers pour hours into making.

    now, where is my GetSatisfaction link? ;)
    Post edited by Unknown User on
    QUOTE (cow)
    moo! moo I say!
  • Navi491Navi491 Join Date: 2011-07-10 Member: 109557Posts: 17Members
    I love this alien vision, but perhaps a way to add a handicap to the alien vision so that people dont complain so much would be to make it so that when its used in BRIGHT or POWERED areas the vision gets super bright making it difficult to see. It can probably have a similar handicap as nightvision has when its viewed in bright/lighted areas.

    Just an ideas as how to nerf the vision so its not ALWAYS on, but serves its usefulness in dark/unpowered areas.
  • FehaFeha Join Date: 2006-11-16 Member: 58633Posts: 914Members
    Did a quick compare to see what exactly you modded (think I will have fun with this tomorrow ;D), and I noticed a line that didn't seem to have much to do with the alien vision.

    Line 98:
    "if ( (not secondary) or ( secondary and ability:GetHasSecondary(player))) then" then is in your code "if ( (not secondary) or ( secondary and ability:GetHasSecondary())) then"
    What does it do?


    But I will try this out, looks way better imho
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    QUOTE (Feha @ Jul 13 2011, 04:33 PM) »
    Did a quick compare to see what exactly you modded (think I will have fun with this tomorrow ;D), and I noticed a line that didn't seem to have much to do with the alien vision.

    Line 98:
    "if ( (not secondary) or ( secondary and ability:GetHasSecondary(player))) then" then is in your code "if ( (not secondary) or ( secondary and ability:GetHasSecondary())) then"
    What does it do?


    But I will try this out, looks way better imho

    Hmmm I didn't change that intentionally. It could be because I used an older version of the lua file.
  • HadesDKHadesDK Join Date: 2008-07-31 Member: 64739Posts: 57Members
    edited July 2011
    Looks good imho :)

    Edit: Great work mate!
    Post edited by Unknown User on
  • PricePrice Join Date: 2003-09-27 Member: 21247Posts: 1,281Members
    edited July 2011
    Good work :thumbsup: but i prefer the original version, i just like it very much.
    Post edited by Unknown User on
    Buy NS2 @ Steam![Support the Indie Devs!]
    ( my english isn't the best... )

    ,,NS1 was one of the best mods."
    ,,NS2 is one of the best MP games."

    A NS2 classic mod, will it be a remake?
    New NS2 Maps: Biodome, Ignore: BVKnight, Metal Man
    EVERYONE is a Winner, because you won the race against 400–800 other Sperms :P
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    QUOTE (Price @ Jul 21 2011, 01:14 AM) »
    Good work :thumbsup: but i prefer the original version, i just like it very much.

    Thanks mate. I actually miss the original version.

    I just wish alien vision could show particle effects, as well as different colours for friendlies and foes.
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Posts: 661Members, Constellation, NS2 Playtester
    QUOTE (twiliteblue @ Jul 21 2011, 04:47 AM) »
    Thanks mate. I actually miss the original version.

    I just wish alien vision could show particle effects, as well as different colours for friendlies and foes.

    Does this still work? Can you create a how-to so I can set this up tonight. I like this muchhhhh more than the current Alien View.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    Here's now to modify alien dark vision (DIY version):

    Edit Alien_Client.lua in your "Steam\steamapps\common\natural selection 2\ns2\lua" folder,
    by changing the two values on lines 301 & 305
    from 1 to a lower number (0.1 for a faint glow, to 0.9 for almost opaque)
    CODE
    301:        local darkVisionFadeAmount = 1
    302:        local darkVisionFadeTime = 0.2
            
    304:        if not self.darkVisionOn then
    305:            darkVisionFadeAmount = math.max( 1 - (Client.GetTime() - self.darkVisionEndTime) / darkVisionFadeTime, 0 )
    306:        end


    Here's one I prepared earlier (value = 0.5): http://www.mediafire.com/?7f5blek9ml381t6 (working in build 183)
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471Posts: 2,061NS1 Playtester, Forum Moderators, Constellation mod
    This doesn't seem to work in 184, is it just me? Also, is it possible to change the color of the effect? I didn't see any obvious places to change it in Alien_Client.lua
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Posts: 661Members, Constellation, NS2 Playtester
    edited August 2011
    QUOTE (aeroripper @ Aug 9 2011, 11:58 AM) »
    This doesn't seem to work in 184, is it just me? Also, is it possible to change the color of the effect? I didn't see any obvious places to change it in Alien_Client.lua

    You use this you cheater! lol :P

    I am going to give it a shot tonight with 184. I wouldn't mind adjust the color tint as well.
    Post edited by Unknown User on
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    QUOTE (aeroripper @ Aug 9 2011, 07:58 AM) »
    This doesn't seem to work in 184, is it just me? Also, is it possible to change the color of the effect? I didn't see any obvious places to change it in Alien_Client.lua

    Could you upload a copy of your Alien_Client.lua? Mine's working, but it might be from an older build (I'm lazy and modify some of the files without backing them up).

    I believe the colors are hard coded and compiled in the shader file, which I cannot modify.
  • RisingSunRisingSun Rising Join Date: 2004-04-19 Member: 28015Posts: 892Members, Constellation, Reinforced - Shadow, WC 2013 - Shadow
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Posts: 661Members, Constellation, NS2 Playtester
    QUOTE (twiliteblue @ Jul 13 2011, 09:41 AM) »
    Installation Instruction (updated 17/07):
    1. Copy the zip file to your "natural selection 2" folder (you don't have to unzip it).
    2. Create a new shortcut to your NS2.exe
    3. Change the Target of the shortcut by adding -game mod_alienvision at the end (to something like ".../NS2.exe" -game mod_alienvision)
    4. Run the new shortcut.


    Can the "-game mod_alienvision" be added to the Natural Selection 2 executable within Steam?
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    QUOTE (vizionz @ Aug 11 2011, 05:27 PM) »
    Can the "-game mod_alienvision" be added to the Natural Selection 2 executable within Steam?


    Right click ns2 in steam, go to properties and then set launch options. I think it'll work but I'm not 100%
    In-game name: Wilson

    My Crosshair Pack: LINK
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Posts: 464Members
    QUOTE (vizionz @ Aug 9 2011, 12:57 PM) »
    You use this you cheater! lol :P

    I am going to give it a shot tonight with 184. I wouldn't mind adjust the color tint as well.


    only way atleast for now is if you know how to open directx hlsl files as it links to ns2\shaders\darkvision.fx

    still trying to figure this one out.
  • invTempestinvTempest Join Date: 2003-03-02 Member: 14223Posts: 233Members, Constellation, Squad Five Blue
    I fixed this so it works with build 184 - [184] Alien Vision Mod

    Same directions as OP.
    CEO of NS2Servers.
    image
    Looking for a high quality, overclocked NS2 server capable of running 20+? Check out ns2servers.com for more info.
  • konatakonata Join Date: 2011-08-24 Member: 118296Posts: 862Members
    I like this but AV does need a trade off, which is why I think the original is currently best.

    But this does indeed look damn cool.
    ~ Konata

    À tellement bien mentir, on finit par se croire
  • AngeluszAngelusz Harmonic entropist Join Date: 2003-07-10 Member: 18072Posts: 2,598Members, Forum Moderators, Constellation, NS2 Playtester mod
    edited October 2011
    Oh my god yes. That's really all I have to say about this one. It must be done.

    Konata, as for the tradeoff, make alien vision cost a little bit of energy - problem solved.
    Post edited by Unknown User on
    Formerly known as: iG`Praetorian
    NS2 EUPT Playtester
    Moderator; If there's anything I can help you with, feel free to send me a PM.
  • ia-spideria-spider Join Date: 2003-12-14 Member: 24379Posts: 55Members, Constellation
    Definitely should add this. I always felt like the alien vision needed more work and it seemed ignored. Looks great
  • konatakonata Join Date: 2011-08-24 Member: 118296Posts: 862Members
    QUOTE (Angelusz @ Oct 22 2011, 01:30 PM) »
    Konata, as for the tradeoff, make alien vision cost a little bit of energy - problem solved.


    I'm all for this. I suggested it ages ago.
    ~ Konata

    À tellement bien mentir, on finit par se croire
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Posts: 6,819Super Administrators, NS2 Developer, Subnautica Developer admin
    Cool adjustments. Considering this.
    Charlie Cleveland
    Game Director, Unknown Worlds Entertainment
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Posts: 1,754Members, NS2 Playtester, Squad Five Blue
    edited October 2011
    Thanks for dropping by, Charlie.

    I wonder if you could consider doing a quick tweak to the shader, to improve depth perception, so the intensity of the effect is based on distance?
    Post edited by Unknown User on
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Posts: 2,322Members, NS2 Developer, NS2 Playtester, Squad Five Gold
    just had an idea how i could add in without much effort a downside to alien vision:

  • l3lessedl3lessed Join Date: 2010-06-07 Member: 71977Posts: 374Members
    For me, that is just annoying, especially when in fast moving combat.

    I'm unsure why vision isn't just sensitive to light. It would seem to make perfect sense and make lighting and power nodes all the more critical.

    Can someone modify the vision to do this so we can at least see how well it might work? I sadly don't have the time for this myself.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Posts: 2,322Members, NS2 Developer, NS2 Playtester, Squad Five Gold
    QUOTE (l3lessed @ Nov 5 2011, 05:37 PM) »
    For me, that is just annoying, especially when in fast moving combat.
    ...


    oh yeah, thats what i intended to do :D just posted this here since i'm interested in opinions from people. so, you say it's annoying, thats actually positive feedback for me ^^
  • ObraxisObraxis Subnautica Animator, Co-Lead NS2 CDT Join Date: 2004-07-24 Member: 30071Posts: 1,760Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer admin
    Aliens should not be able to play the game constantly in alien vision mode at all times. There should be a trade-off. This for me works well.

    If NS2 fails, follow my Nuke From Orbit Guide.

  • KoruyoKoruyo Join Date: 2009-06-06 Member: 67724Posts: 1,676Members, Reinforced - Shadow
    edited November 2011
    So the tradeoff should be - make it so annoying that ppl dont use it anymore at all? :P (at least i wouldnt use it like that anymore - time to increase my gamma settings i guess?)

    - Why does it need a tradoff to begin with? NS1 alien vision didnt have a tradeoff either...
    - I dont like the effect, the pattern looks too defined kinda like you are looking trough the bottom of a bottle => makes no sense why it looks like that - doesnt look cool.
    - The effect gets stronger the more you move, its like having a flashlight that starts to flicker and pauses of darkness getting longer => useless to use

    The whole point of this alien vision is to attack marines easier, since you can see and track them very well...




    My idea: (if we really need some kind of trade off)
    Make some kind of flashlight bar system (no need to draw it on the hud), if you stand still it fills up - if you start to move the effect starts strongest(current alienvision) and fades into normal vision over time/ the longer you move.
    You could also add that it fades faster if you get dmg. (so the time you can use it doesnt have to be too limited...)
    edit: I guess we wouldnt even need a dedicated alien vision button anymore with this system. (or at least have it activated while spawning)
    edit2: You could also make some kind of disortion(like lots of motion blur) if aliens are in a scanned area for the time the scan is alive


    PS: I got so many good ideas... :P
    Are there still internal playtester slots? :,(
    Post edited by Unknown User on
    www.teamarchaea.com - arc | Koruyo - Founder, Member, Constructor, Protector and Destroyer of RTs and other stuff - inactive
  • l3lessedl3lessed Join Date: 2010-06-07 Member: 71977Posts: 374Members
    edited November 2011
    Currently the only real drawback is not being able to see sprites and smaller details while in alien vision. If they implement something like above, Why even have normal vision then? Might as well just make a hybrid alien vision which shows all the details but still outlines threats and make it the default. If this is how they want to handle alien vision that is fine. It has its positives and drawbacks, but there is no real reason to have two different modes of vision because normal vision gives no real advantages over alien vision.

    I personally feel it would make for more interesting and dynamic game play if there was a very clear distinction between the two forms of vision so it was easy for players to know when and how to use it. For me, this ties directly into the dynamic lighting system they promote and spent so much time on. Make alien vision amazing for darker rooms, but when there is light it quickly becomes blinding if you don't switch it off.

    The original NS vision wasn't that great. It merely made things transparent, both alien and human. It just cleaned up all the clutter so you could see marines through it.
    Post edited by Unknown User on
  • KoruyoKoruyo Join Date: 2009-06-06 Member: 67724Posts: 1,676Members, Reinforced - Shadow
    edited November 2011
    The thing is - its not really nightvision, its sonar... (not that this couldnt be changed, but nightvision is too mainstream :P)

    Thats why it makes sense that aliens can turn it on and off. (since they also have eyes, alien sonar is kinda their inner eye)

    My idea was, if aliens rest a bit they can focus more and so their sonar gets better for some time...if shot, especially explosions rapidly worse blabla etc.
    Post edited by Unknown User on
    www.teamarchaea.com - arc | Koruyo - Founder, Member, Constructor, Protector and Destroyer of RTs and other stuff - inactive
«134
Sign In or Register to comment.