Quick n Dirty Alien Vision Mod
twiliteblue
bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
<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!
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!
Comments
now, where is my GetSatisfaction link? ;)
Just an ideas as how to nerf the vision so its not ALWAYS on, but serves its usefulness in dark/unpowered areas.
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
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.
Edit: Great work mate!
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.
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.
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)
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.
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.
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?
Right click ns2 in steam, go to properties and then set launch options. I think it'll work but I'm not 100%
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.
Same directions as OP.
But this does indeed look damn cool.
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.
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?
<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>
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.
...<!--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 ^^
- 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? :,(
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.
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.