Quick n Dirty Alien Vision Mod

twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
edited January 2012 in Modding
<div class="IPBDescription">Now I see everything!</div>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: <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local darkVisionFadeAmount = 1<!--c2--></div><!--ec2-->
3. Change the value to a lower one. Lower value means less opaque effect.
<b>eg. local darkVisionFadeAmount = 0.5</b>

(the following are optional)
4. Scroll down a few lines to this <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if not self.darkVisionOn then
            darkVisionFadeAmount = math.max( 1 - (Client.GetTime() - self.darkVisionEndTime) / darkVisionFadeTime, 0 )
        end/<!--c2--></div><!--ec2-->
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:
<img src="http://img694.imageshack.us/img694/8609/ns2darkvision01.jpg" border="0" class="linked-image" />
Dark room without Dark Vision

<img src="http://img832.imageshack.us/img832/5880/ns2darkvision02.jpg" border="0" class="linked-image" />
Dark room with modified Dark Vision

<img src="http://img820.imageshack.us/img820/6296/ns2darkvision00.jpg" border="0" class="linked-image" />
There are too many of them!
«134

Comments

  • Taxen0Taxen0 Join Date: 2010-07-30 Member: 73357Members
    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? ;)
  • Navi491Navi491 Join Date: 2011-07-10 Member: 109557Members
    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: 58633Members
    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: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1860484:date=Jul 13 2011, 04:33 PM:name=Feha)--><div class='quotetop'>QUOTE (Feha @ Jul 13 2011, 04:33 PM) <a href="index.php?act=findpost&pid=1860484"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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<!--QuoteEnd--></div><!--QuoteEEnd-->
    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: 64739Members
    edited July 2011
    Looks good imho :)

    Edit: Great work mate!
  • PricePrice Join Date: 2003-09-27 Member: 21247Members
    edited July 2011
    Good work :thumbsup: but i prefer the original version, i just like it very much.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1862129:date=Jul 21 2011, 01:14 AM:name=Price)--><div class='quotetop'>QUOTE (Price @ Jul 21 2011, 01:14 AM) <a href="index.php?act=findpost&pid=1862129"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Good work :thumbsup: but i prefer the original version, i just like it very much.<!--QuoteEnd--></div><!--QuoteEEnd-->
    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: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1862132:date=Jul 21 2011, 04:47 AM:name=twiliteblue)--><div class='quotetop'>QUOTE (twiliteblue @ Jul 21 2011, 04:47 AM) <a href="index.php?act=findpost&pid=1862132"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->
    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: 13116Members, 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)
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->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<!--c2--></div><!--ec2-->

    Here's one I prepared earlier (value = 0.5): <a href="http://www.mediafire.com/?7f5blek9ml381t6" target="_blank">http://www.mediafire.com/?7f5blek9ml381t6</a> (working in build 183)
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
    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: 24595Members, Constellation, NS2 Playtester
    edited August 2011
    <!--quoteo(post=1867813:date=Aug 9 2011, 11:58 AM:name=aeroripper)--><div class='quotetop'>QUOTE (aeroripper @ Aug 9 2011, 11:58 AM) <a href="index.php?act=findpost&pid=1867813"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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<!--QuoteEnd--></div><!--QuoteEEnd-->
    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.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1867813:date=Aug 9 2011, 07:58 AM:name=aeroripper)--><div class='quotetop'>QUOTE (aeroripper @ Aug 9 2011, 07:58 AM) <a href="index.php?act=findpost&pid=1867813"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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<!--QuoteEnd--></div><!--QuoteEEnd-->
    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 California Join Date: 2004-04-19 Member: 28015Members, Constellation, Reinforced - Shadow, WC 2013 - Shadow
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1860371:date=Jul 13 2011, 09:41 AM:name=twiliteblue)--><div class='quotetop'>QUOTE (twiliteblue @ Jul 13 2011, 09:41 AM) <a href="index.php?act=findpost&pid=1860371"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Can the "-game mod_alienvision" be added to the Natural Selection 2 executable within Steam?
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    <!--quoteo(post=1868380:date=Aug 11 2011, 05:27 PM:name=vizionz)--><div class='quotetop'>QUOTE (vizionz @ Aug 11 2011, 05:27 PM) <a href="index.php?act=findpost&pid=1868380"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Can the "-game mod_alienvision" be added to the Natural Selection 2 executable within Steam?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Right click ns2 in steam, go to properties and then set launch options. I think it'll work but I'm not 100%
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    <!--quoteo(post=1867836:date=Aug 9 2011, 12:57 PM:name=vizionz)--><div class='quotetop'>QUOTE (vizionz @ Aug 9 2011, 12:57 PM) <a href="index.php?act=findpost&pid=1867836"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->

    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: 14223Members, Constellation, Squad Five Blue
    I fixed this so it works with build 184 - <a href="http://www.mediafire.com/?pkbmenp8e3fr431" target="_blank">[184] Alien Vision Mod</a>

    Same directions as OP.
  • konatakonata Join Date: 2011-08-24 Member: 118296Members
    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.
  • AngeluszAngelusz Harmonic entropist Join Date: 2003-07-10 Member: 18072Members, Forum Moderators, Constellation, NS2 Playtester
    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.
  • ia-spideria-spider Join Date: 2003-12-14 Member: 24379Members, 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: 118296Members
    <!--quoteo(post=1881170:date=Oct 22 2011, 01:30 PM:name=Angelusz)--><div class='quotetop'>QUOTE (Angelusz @ Oct 22 2011, 01:30 PM) <a href="index.php?act=findpost&pid=1881170"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Konata, as for the tradeoff, make alien vision cost a little bit of energy - problem solved.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I'm all for this. I suggested it ages ago.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Cool adjustments. Considering this.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, 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?
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    just had an idea how i could add in without much effort a downside to alien vision:

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/RAAgIBTtc1E"></param><embed src="http://www.youtube.com/v/RAAgIBTtc1E" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
  • l3lessedl3lessed Join Date: 2010-06-07 Member: 71977Members
    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: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    <!--quoteo(post=1883878:date=Nov 5 2011, 05:37 PM:name=l3lessed)--><div class='quotetop'>QUOTE (l3lessed @ Nov 5 2011, 05:37 PM) <a href="index.php?act=findpost&pid=1883878"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->For me, that is just annoying, especially when in fast moving combat.
    ...<!--QuoteEnd--></div><!--QuoteEEnd-->

    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 & Generalist, NS2 Person Join Date: 2004-07-24 Member: 30071Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts
    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.
  • KoruyoKoruyo AUT Join Date: 2009-06-06 Member: 67724Members, 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

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



    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? :,(
  • l3lessedl3lessed Join Date: 2010-06-07 Member: 71977Members
    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.
  • KoruyoKoruyo AUT Join Date: 2009-06-06 Member: 67724Members, 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.
Sign In or Register to comment.