OpenXcom Forum

Modding => Released Mods => XPiratez => Topic started by: rezaf on August 08, 2016, 12:14:56 pm

Title: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 12:14:56 pm
I only just started playing the mod and my main gripe so far is the night missions. They're almost unplayable to me.
I see a pitch black screen with the occasional hint of a dark grey thing that I might be imagining or not. When there's an enemy ship, thankfully THAT is illuminated, so I can see a darn thing.
In some missions, where a ship crashed for example, there's no such salvation. I run across a map on which I can't see a single feature. Did I just climb a hill? Or jump down a cliff? Are there trees or buldings? I have no idea. I click somewhere in the dark, my gal moves a bit, if I get the enemy spotted indicator I try to find the tile that will cause the crosshair to glow and then blindly shoot there.
That's no fun at all.
Anything I can do to tweak this?

Thanks!
Title: Re: Any way to make your gals emit light on night missions?
Post by: Solarius Scorch on August 08, 2016, 12:37:09 pm
Unfortunately, it's a limitation of the engine.

Using OXCE code, Dioxine set the light around your gals to be low enough to not count as illuminating for the enemies, yet how enough to actually give you some visual data. It's probably the best that he could do.

What you can do however, is:
1) Use a light source. Throw a flare or a Molotov, or just hold a torch (but you'll be sitting duck).
2) Use the Alt key. Its main function is to show enemy facing, but it also works well as a general enemy indicator.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on August 08, 2016, 12:38:44 pm
You need light sources, that's how it works now. But on the flip side, the gals can spot non-aided enemies in the dark before they spot them.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 01:15:53 pm
What's the reasoning behind it all? Don't for get I just started playing.
I THINK I read in one of the research projects that you're supposed to spot enemies early - is that it?
Well, as it is I can HARDLY spot my own gals. :-p

I'd not care about being visible to the enemies - most annoying are when you shoot down a very small or small civilian craft and have to hunt down it's crew in the nighttime, but the most efficient weapon by a HUGE margin early on seems to be the bow (it can shoot to the stars and back), and this requires to have your offhand free.

And how can we have engine limitations in an open source project where you can technically just change everything. :-pp
 Make some overlay with bright colored "borders" around trees, people and stuff...
Well, I guess that's a bit much to ask - I do hope someone eventually implements something like this in OpenXCom though.

Very well, I was hoping I'd just overlooked a game option or something - thanks a bunch for your replies guys.

Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on August 08, 2016, 01:31:31 pm
can technically just change everything.

Technically being the key word. Who? How? When? For What? Are the questions. Who's gonna gut the engine? And I'm just a humble modder.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 01:40:10 pm
Easy Dioxine, note that I wanted to deflect the who from you straight away with the part about it being too much to ask. :)

As for the "for what", night missions are really borderline unplayable. Couldn't an option be added to have lights on the skybus and skycar at least? IIRC the Skyranger worked just like that, no?
Title: Re: Any way to make your gals emit light on night missions?
Post by: Solarius Scorch on August 08, 2016, 01:52:32 pm
Couldn't an option be added to have lights on the skybus and skycar at least? IIRC the Skyranger worked just like that, no?

Yes, it is an option, but many people would be pissed. :) Some people prefer the lights, some prefer cover of darkness.
Anyway, if you're not afraid of enemies spotting you, you can just use a light source. Which is how humanity usually deals with darkness. ;)
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 02:45:15 pm
How can people be pissed by something that's an option?
Ah well, good old fanboyism I guess. That's fine and all. At the very least it's understandable you don't add something just for one random dork.
Since this is such a fundamendal issue with the mod, I'd have expected a more ambivalent opinion on the issue, but it is how it is.  :)
Guess it's time for one of 'em "deal with it" gifs.
Title: Re: Any way to make your gals emit light on night missions?
Post by: ohartenstein23 on August 08, 2016, 03:07:29 pm
It's not so much fanboyism as the fact that with the current engine, in previous versions of the mod not turning off the lights at night meant your gals were leaving the craft to die to reaction fire from Dioxine knows what, or to be picked off as beacons saying 'shoot me!' The current implementation is an improvement over what it was, making it easier to leverage that 3 tile advantage in night vision.  I also like this version on a 'fanboy' level in that it's a much better simulation of night operations than many other games I've played.

The simple options for not worrying about terrain at night is to wait to attack a target until you know you'll reach it during the day, using incendiary munitions, or bringing light sources with you.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Solarius Scorch on August 08, 2016, 03:31:30 pm
Also, what do you mean "an option"? Like a switch in the options menu?

Firstly, it would require writing specific code for this. Secondly, you can't have everything optional, because you'd drown in thousands of options in the menu.
Title: Re: Any way to make your gals emit light on night missions?
Post by: ivandogovich on August 08, 2016, 03:37:24 pm
Its interesting that you chime in on this rezaf even though you just started playing. :) 

This is a very recent development designed to make night fight a bit more tactical.  I think its a cool new twist for sure, due to the fact that I'm not lit up when the enemy wasn't.

Some options for new night fighting tactics.
If you stock your vessel with electro-flares, they will light it up by just being in the inventory.  There are new light generating items in the mod, torches and maglites too.  If you are concerned about bow shots, just drop it on the ground when read to shoot.  This takes 2 TUs, and is very cheap.  Later on, advance armor come with powerful light sources that you can switch on and off.  (this makes them great for soaking up reaction fire).

There is an option in the game to always play in Daylight conditions, you could enable that too, if you are not satisfied with these alternatives to night fighting.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 04:06:35 pm
Ah, I didn't know it used to be different - hence my reaction.
You guys must'nt forget that I didn't get to witness the old ways of "step out and be shot".
Though I think in the late 0.9x versions of vanilla OpenXCom it used to be like that as well.  :P

@Solaris: Yeah, I was thinking: You can toggle this option. And one could make "everyting" optional, though it's of course always worth some consideration.

The problem with the current approach is you can't see your own gals, where your ship is, where which terrain is etc.
Honestly, I don't care whether it's more "realistic", it's a PITA to play with.
I see you say that the game currently is coded in a way that emitting light on the UI also means enemies can see that light, which maybe can be changed, but in the here and now, this is a problem and Dioxine tried to work around this in the manner we see in the mod. Fair enough, I guess.
I found that NVidia Control Center allows me to overwrite gamma correction, maybe this will at least allow me to see SOMETHING.
Title: Re: Any way to make your gals emit light on night missions?
Post by: niculinux on August 08, 2016, 06:04:42 pm
It' a radical different approach, the game is meant to be harder than the vanilla one. And in the end let's we not forget: "Suffering awaits. And boobs" (cit. Dioxine) :)
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on August 08, 2016, 08:20:24 pm
For the record again, I was not "complaining" about the difficulty of the game, I was complaining about having to play in the dark, quite literally.
I played on today and have by now finished close to a dozen of these missions. I just click on random spots on the map until the enemy indicator appears and then try to shoot at the glowing crosshair. If I get an indicator that the shot can't be made, I move a few steps in a random direction and try again. Eventually, it works and I kill the enemy.

By now I have encountered some of the heavier enemies where bow and arrow outlive their usefulness, but it's jarring how difficult it is to go back to firearms. They're just SO short ranged and inaccurate in comparison. Something doesn't feel right about that.

But that's a different topic. Maybe I'll post an impression thread eventually, but I wanna play on some more.

A few missions ago I also researched fire arrows, which help. It forces me to equip some of my archers with hunting bows, but you can illuminate the area a bit quite easily this way.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on August 08, 2016, 09:00:40 pm
For the record again, I was not "complaining" about the difficulty of the game, I was complaining about having to play in the dark, quite literally.

Then don't attack at night-time. Problem solved. Many people avoid night missions, and it's not that hard to pull off most of the time.

EDIT:
Very early game alone provides 5 separate sources of light:
- torches
- maglite
- molotovs
- flaming arrows
- i-Phones

I COULD add a 'console' item spawning with the ship, that'd enable light when turned on, but I couldn't make it immovable, so there is little point.
Title: Re: Any way to make your gals emit light on night missions?
Post by: khade on August 08, 2016, 09:17:48 pm
I used to avoid night missions, they were just irritating, now you're playing murder in the dark, except against those with better eyes than you, like ratlings, mercs and reticulans, maybe a few others who I don't know the sight range, everything else I know of has lower sight range than you.  As mentioned earlier, ALT is your friend, in or out of the light, it helps you see your gals a little easier and lets you know exactly where your just barely noticed target is, as well as where they are looking.

Most maps have at least a little bit of light, ships tend to have some, the aircar seems to brighten a large chunk of the smaller maps.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Premier on September 01, 2016, 04:08:17 pm
Right now I'm playing on the version before the current one where I'd like to finish a playthrough before updating (and if this has been addressed in the new version, please tell me and I'll switch over right away).

I understand that the extreme darkness is because of engine reasons, and Dioxine can't really change that. However, my big beef with nighttime UFO assaults is that the enemy UFO itself is also pretty much completely dark even on the inside. Now sure, you can use flares and maglites and whatnot, but for me it breaks the suspension of disbelief. Most of those UFOs are crewed by humans, who need light to see. Why don't they turn on the lights inside their UFO? It just doesn't make sense to me that a vehicle actively operated by human beings is shrouded in complete darkness. Are all the controls marked in Braille, or what?

I guess my question is ultimately this: the inside (and immediate surroundings) of your own craft is well let it, even at night time. Why aren't landed UFOs the same? The rest of the map can be dark, sure, but why don't they have the same internal lighting as your own planes?
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 01, 2016, 05:16:40 pm
I guess my question is ultimately this: the inside (and immediate surroundings) of your own craft is well let it, even at night time. Why aren't landed UFOs the same? The rest of the map can be dark, sure, but why don't they have the same internal lighting as your own planes?

The short answer: this is simply not true.
The long answer: survey ships, freighters etc. have lights on, while military ships (likely to be crewed by NV-wearing troops) turn them off. What's illogical in this? Also, as for pirate ships, at least half of the models doesn't have any lights on. I call it variety.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on September 01, 2016, 06:29:04 pm
I played (very) many more missions since starting this thread and have basically come to avoid night missions if at all possible.
IMO, IF I was doing that, it should be for reasons like in the original X-COM, where night missions were just considerably harder.
In PirateZ, first and foremost, night missions are hard on my eyes. Were it not for the interface, I'd be hard pressed to tell whether my monitor is turned on or not.
At least before I create some illumination with flares, flames or whatever.
I still call bullshit on the idea that this somehow increases immersion or whatever. It's ridiculous and should be rolled back to the way it was before if no way can be found to make everything properly lit without alerting the enemies to you.
Call me an idiot, but I want to be able to actually SEE the game I'm playing.

Note that on some map types - like arctic or desert - night fighting is usually not a big deal, due to the high contrast (background is yellow or whiteish), but still.
All recommendations found herein are like when I go to the car dealership because the lights of my new BMW don't work and he tells me: Don't drive the BMW at night then...


Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 01, 2016, 06:39:42 pm
I tend to avoid night missions too. I like that the gals are no-longer bullet magnets when their minimal lighting is on, but overall, the level of darkness is quite difficult to handle unless you are playing in a room with no window, no light, at night. It's not really feasible to play the night strike commando game because even though your gals see, you as a player don't see nearly enough so you stumble on stumps and never get line of fire. because of the obstacle you don't see. Indeed, arctic, desert and urban terrains are better either because of native high contrast or urban lighting.

I'd love to see the engine to remain exactly the same, but the graphics to be brighter. Capping the darkening at one or two indices brighter than currently would make a world of difference.
Title: Re: Any way to make your gals emit light on night missions?
Post by: ivandogovich on September 01, 2016, 06:44:19 pm
Welp, sorry, but the issue you are experiencing is a feature, not a bug.

If you would like to create a mod to "roll back" the experience for you, all you need to do is change all of the armor entries

where it is something like this:
  - type: STR_PERSONAL_ARMOR_UC

Change the personal light value from
    personalLight: 5

to something higher.... like 10 or something.

That or use the out of the box XCOMUtil Always Day mod.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Premier on September 01, 2016, 06:52:52 pm
The short answer: this is simply not true.
The long answer: survey ships, freighters etc. have lights on, while military ships (likely to be crewed by NV-wearing troops) turn them off. What's illogical in this? Also, as for pirate ships, at least half of the models doesn't have any lights on. I call it variety.

Well, maybe I just happened to meet the wrong types of ships at night, I guess that's possible. I also get the idea of variety, it's just that in some specific cases I don't really see the logic. Like, recently, I assault a small- or medium-sized ship occupied by raiders, and IIRC, it was dark. And I don't think raiders have night vision equipment, since they're described as poorly equipped, and graphically, some of them barely have even trousers. Also, still on the topic of in-game logic, even military ships surely have crewmembers - pilots, technicians, whatever - who don't have NV. At least I don't think I've ever found a ship that was crewed exclusively by helmet- or power armour-wearing units.

EDIT: Actually, it just occured to me that fully dark ships WOULD make perfect sense when assaulting one that has crashed, rather than landed. Electrical systems failure due to combat damage and all that. THAT makes perfect sense to me, and I would never complain about.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 01, 2016, 07:25:10 pm
Welp, sorry, but the issue you are experiencing is a feature, not a bug.

The issue is not with the gal's lightning (in fact, doing what you suggest would turn the gals into bullet magnets. It's a terrible idea). WIth Piratez view range of 40, if you turn up your personal light to that kind of level, enemies will see you from 40 tiles, but since most enemies don't emit light, you'll only see them from 12 or something tiles. You'll get murdered. In vanilla, it worked, because the aliens saw 20 tiles regardless of lighting, so you just lit up the whole place and kept personal lights on without gimping yourself. That is not the case in Piratez so your suggestion is not a solution.

The problem is that although the gals can see quite far in the dark, the game is rendered in such dark colors that some players, myself included, can barely see a thing when fighting night missions without using fire or flares. It might well depend on what screen you have and where/when you play (in your living room with lights on vs in a dark room), but it is a problem when the game is machine dependent. This was the reason I was suggesting to reduce the amount of darkening done for night mission when drawing the battlescape, without changing the light level that the engine calculates spotting distances with. This would just help the player see the battle and change nothing of the battle itself. But of course, that's not something Dioxine can fix, it's in the engine.
Title: Re: Any way to make your gals emit light on night missions?
Post by: ivandogovich on September 01, 2016, 08:15:14 pm
I understand what you are saying about the dark screen, Arthanor.  :)

What I was saying is that the "change" that rezaf wanted rolled back was the personalLight: values that Dioxine applied in a recent release.  This changed the brightness of the gals with their "lights on" down to 5, which means barely visible in the dark but not invisible. Unfortunately it doesn't light up the area around them enough to show the terrain.  Thats why maglites were introduced around the same time.  Powered armors got some lights that really light up the terrain with "lights on." 

So the "feature" is that your gals are still dark in night missions (level 5) so they can't be spotted by most foes, but you can spot them slightly easier (without the alt key).  Because this is part of the mod, the option is to mod it back out to the more vanilla experience that rezaf was requesting.
Title: Re: Any way to make your gals emit light on night missions?
Post by: yrizoud on September 01, 2016, 08:26:37 pm
rezaf, I wonder if you're having an actual graphic problem.
You can hit F12 to create a screenshot.
If the screenshot (when viewed in an image browser) looks brighter than the game screen...
Title: Re: Any way to make your gals emit light on night missions?
Post by: Yankes on September 01, 2016, 08:52:54 pm
You can grab glowing objects in hands and move with it.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on September 01, 2016, 09:35:10 pm
rezaf, I wonder if you're having an actual graphic problem.
You can hit F12 to create a screenshot.
If the screenshot (when viewed in an image browser) looks brighter than the game screen...

Nah, no such luck. See for yourself.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Solarius Scorch on September 01, 2016, 10:49:49 pm
The complaint of not being able to see is valid. It's just a problem with the engine than needs to be addressed on the developer level to be solved. The only solution is to cut a significant portion of the tactical mechanics and throw it out the window, which I guess is not an option.
The solution? My only idea is introducing some sort of toggable "night display", where the terrain and known units are displayed fully; perhaps in greyscale. But I imagine it would be a nightmare to add, as it probably depends on libraries and other complicated stuff that is part of the very core of the game. I wish I was wrong, but I can't really see it happening.

What we can do is, well, use light sources. Not just flares, but also held flashlights. Yes, you'll be visible, but if you turn it on and off you should be fine, more or less. And Molotovs (and other fire weapons) are extremely helpful!
Title: Re: Any way to make your gals emit light on night missions?
Post by: Yankes on September 01, 2016, 11:40:35 pm
The complaint of not being able to see is valid. It's just a problem with the engine than needs to be addressed on the developer level to be solved. The only solution is to cut a significant portion of the tactical mechanics and throw it out the window, which I guess is not an option.
The solution? My only idea is introducing some sort of toggable "night display", where the terrain and known units are displayed fully; perhaps in greyscale. But I imagine it would be a nightmare to add, as it probably depends on libraries and other complicated stuff that is part of the very core of the game. I wish I was wrong, but I can't really see it happening.

What we can do is, well, use light sources. Not just flares, but also held flashlights. Yes, you'll be visible, but if you turn it on and off you should be fine, more or less. And Molotovs (and other fire weapons) are extremely helpful!
Simply gray scale battlescape graphic is not something impossible. Right now game can recolors tiles to one color for debugging proposes. Probably bigger problems is how it should work exactly and how it will look.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Solarius Scorch on September 02, 2016, 12:36:58 am
Simply gray scale battlescape graphic is not something impossible. Right now game can recolors tiles to one color for debugging proposes. Probably bigger problems is how it should work exactly and how it will look.

Then I humbly request that you add it to your list - with as high priority as we can. :)

The UI is a problem, yes, but I think just a key bind would be enough for starters.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 02, 2016, 12:45:24 am
Yes, unfortunately you can't just map each row to the black and white row and call it done, their brightness differs a lot. That being said, it should be possible to go for "closest brightness on the grayscale"?

As we see from rezaf, you can get such a darkening that everything goes to black. An alternative to grayscale would be to prevent whatever code does the darkening from going more than X colors away from the "full light" color. I think darkening is done by just sliding down towards the dark end of the palette for a given row by a set amount for all colors and displaying that color instead? If you limit how much sliding is done (let's say a maximum of 10 indices, instead of sliding all the way to black), the brightest colors would retain some color instead of being slid all the way to black like the darker colors.  Doing this, it would essentially cap how dark the battlescape gets and there would be some color and contrast instead of the whole thing being black.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Eddie on September 02, 2016, 01:03:19 am
That polar terrain is better visible in the dark indicates that something might be doable with recoloring the map blocks. Maybe brightness and contrast can be increased enough to make the terrain visible in darkness. Unfortunately this would change the day look of the map too. Can a script be used to change where the map block visuals are loaded from? Then you could have night mode version of each map with increased brightness and contrast to be loaded for night missions. But that might still look ugly when you have light sources...
Title: Re: Any way to make your gals emit light on night missions?
Post by: Yankes on September 02, 2016, 01:24:00 am
As Arthanor said this will not solve problem because if something is black it will stay black even if you use different color.

Overall coloring in engine work in this way:
a) Determine shade of tile, this is based on time of day all light sources. Value is from 0 - 15 (bright - dark).
b) Pixel in graphic have two parts, shade and color, both can have 16 values. Shade part of pixel represent similar range as tile shade.
c) For each pixel in tile graphic we take it shade and add tile shade to it, if value is greater that 15 and can't fit available range we change color of pixel to back and leave shade of this pixel at 15.

Easiest and more clean way is toy with a), Changing b) is impossible without new palettes. c) will need more work that a) but still doable.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 02, 2016, 01:40:51 am
Yankes, wouldn't just changing how the tile shade is determined for a given time of day by setting the darkest darkness a little less dark (say.. -3, like shade 12 instead of shade 15?) solve the issue. In fact, It would be awesome to have it as a graphic option:

Night shading offset: takes a value of 0 to 15, lets the user decide what they want at night. If you set it to 0, you recover the "always day" behavior. If you set it to 15, you get F*ing dark nights, and people could find the sweet spot they want.

Actually, that might not work.. changing the time of day illumination means that you actually make night into day wouldn't it? So units will start seeing as if it were day and it changes the actual battle?

Then it would have to be "c" if we want to only change the graphical display to the player without changing the battle mechanics.
Title: Re: Any way to make your gals emit light on night missions?
Post by: ivandogovich on September 02, 2016, 01:59:25 am
Or "C" and then reset all tiles to 14? instead of black?
Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 02, 2016, 02:50:59 am
I think bumping colors should be done for all colors, not just 15, otherwise you'll end up with colors than were darkened to 14 staying there, and colors that are supposed to be 15 going to 14, and it'll look weird.

Basically the current function is something like:

i = min( i0 + d, 15)

where i is the final shade index for the color, i0 is the original index of the picture and d is the darkening which depends on light level. It'd be neat to have:

i = max(min( i0 + d - b, 15), i0)

which would uniformly brighten colors, but only at the drawing stage, by a number b. This way, you get the brightest value between "corrected darkened color" and black, but cannot be brighter than the base color, of course. It could theoretically be a user option, where masochists ( :P ) can keep b = 0, people who want it to always look like day can use 15, and others can find their favorite setting somewhere in between. No more squinting at the dark and relying on alt to spot units unless you want to. And if it happens at drawing time but isn't included for LoS checks, it'd leave battles unchanged.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 07:30:01 am
Why so complicated?

https://vid.me/0YHL

Press alt a little longer and it all lights up. Release and it fades back.

Took all of two hours thinking of, coding, debugging, fighting with a screencapture program, uploading ...

Code: [Select]
diff --git a/src/Battlescape/Map.cpp b/src/Battlescape/Map.cpp
index ec64c89..b425d82 100644
--- a/src/Battlescape/Map.cpp
+++ b/src/Battlescape/Map.cpp
@@ -52,6 +52,7 @@
 #include "../Interface/NumberText.h"
 #include "../Interface/Text.h"
 
+#include <cstdio>
 
 /*
   1) Map origin is top corner.
@@ -108,6 +109,10 @@ Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight)
  _scrollMouseTimer->onTimer((SurfaceHandler)&Map::scrollMouse);
  _scrollKeyTimer = new Timer(SCROLL_INTERVAL);
  _scrollKeyTimer->onTimer((SurfaceHandler)&Map::scrollKey);
+ _fadeTimer = new Timer(FADE_INTERVAL);
+ _fadeTimer->onTimer((SurfaceHandler)&Map::fadeShade);
+ _fadeTimer->start();
+ _fadeShade = 15; https:// or _save->getGlobalShade();
  _camera->setScrollTimer(_scrollMouseTimer, _scrollKeyTimer);
 
  _txtAccuracy = new Text(24, 9, 0, 0);
@@ -124,6 +129,7 @@ Map::~Map()
 {
  delete _scrollMouseTimer;
  delete _scrollKeyTimer;
+ delete _fadeTimer;
  delete _arrow;
  delete _message;
  delete _camera;
@@ -174,6 +180,7 @@ void Map::think()
 {
  _scrollMouseTimer->think(0, this);
  _scrollKeyTimer->think(0, this);
+ _fadeTimer->think(0, this);
 }
 
 /**
@@ -417,7 +424,7 @@ void Map::drawTerrain(Surface *surface)
 
  if (tile->isDiscovered(2))
  {
- tileShade = tile->getShade();
+ tileShade = reShade(tile->getShade());
  }
  else
  {
@@ -469,7 +476,7 @@ void Map::drawTerrain(Surface *surface)
  int tileNorthShade, tileTwoNorthShade, tileWestShade, tileNorthWestShade, tileSouthWestShade;
  if (tileNorth->isDiscovered(2))
  {
- tileNorthShade = tileNorth->getShade();
+ tileNorthShade = reShade(tileNorth->getShade());
  }
  else
  {
@@ -508,7 +515,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileTwoNorth = _save->getTile(mapPosition - Position(0,2,0));
  if (tileTwoNorth->isDiscovered(2))
  {
- tileTwoNorthShade = tileTwoNorth->getShade();
+ tileTwoNorthShade = reShade(tileTwoNorth->getShade());
  }
  else
  {
@@ -529,7 +536,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileNorthWest = _save->getTile(mapPosition - Position(1,1,0));
  if (tileNorthWest->isDiscovered(2))
  {
- tileNorthWestShade = tileNorthWest->getShade();
+ tileNorthWestShade = reShade(tileNorthWest->getShade());
  }
  else
  {
@@ -563,7 +570,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileSouthWest = _save->getTile(mapPosition + Position(-1, 1, 0));
  if (tileSouthWest->isDiscovered(2))
  {
- tileSouthWestShade = tileSouthWest->getShade();
+ tileSouthWestShade = reShade(tileSouthWest->getShade());
  }
  else
  {
@@ -583,7 +590,7 @@ void Map::drawTerrain(Surface *surface)
  BattleUnit *westUnit = tileWest->getUnit();
  if (tileWest->isDiscovered(2))
  {
- tileWestShade = tileWest->getShade();
+ tileWestShade = reShade(tileWest->getShade());
  }
  else
  {
@@ -595,7 +602,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_WESTWALL)->isDoor() || tileWest->getMapData(O_WESTWALL)->isUFODoor())
  && tileWest->isDiscovered(0))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_WESTWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -605,7 +612,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_NORTHWALL)->isDoor() || tileWest->getMapData(O_NORTHWALL)->isUFODoor())
  && tileWest->isDiscovered(1))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_NORTHWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -677,7 +684,7 @@ void Map::drawTerrain(Surface *surface)
  frameNumber += halfAnimFrame + tileWest->getAnimationOffset();
  }
  tmpSurface = _game->getMod()->getSurfaceSet("SMOKE.PCK")->getFrame(frameNumber);
- tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y + tileOffset.y, shade, true);
+ tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y + tileOffset.y, reShade(shade), true);
  }
  https:// Draw object
  if (tileWest->getMapData(O_OBJECT) && tileWest->getMapData(O_OBJECT)->getBigWall() >= 6 && tileWest->getMapData(O_OBJECT)->getBigWall() != 9)
@@ -702,7 +709,7 @@ void Map::drawTerrain(Surface *surface)
  wallShade = tile->getShade();
  else
  wallShade = tileShade;
- tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade);
+ tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), reShade(wallShade));
  }
  https:// Draw north wall
  tmpSurface = tile->getSprite(O_NORTHWALL);
@@ -710,7 +717,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_NORTHWALL)->isDoor() || tile->getMapData(O_NORTHWALL)->isUFODoor())
  && tile->isDiscovered(1))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  if (tile->getMapData(O_WESTWALL))
@@ -897,7 +904,7 @@ void Map::drawTerrain(Surface *surface)
  tunit, part,
  offset.x,
  offset.y,
- ttile->getShade()
+ reShade(ttile->getShade())
  );
  }
  }
@@ -1325,6 +1332,16 @@ void Map::keyboardPress(Action *action, State *state)
 }
 
 /**
+ * Handles fade-in and fade-out on Alt key
+ * @param original tile/item/unit shade
+ */
+
+int Map::reShade(const int shade)
+{
+ return shade > _fadeShade ? _fadeShade : shade;
+}
+
+/**
  * Handles keyboard releases on the map.
  * @param action Pointer to an action.
  * @param state State that the action handlers belong to.
@@ -1626,6 +1643,27 @@ void Map::scrollKey()
 }
 
 /**
+ * Modify the fade shade level if fade's in progress.
+ */
+void Map::fadeShade()
+{
+ if (((SDL_GetModState() & KMOD_ALT) != 0))
+ {
+ if (_fadeShade > 0)
+ {
+ --_fadeShade;
+ }
+ }
+ else
+ {
+ if (_fadeShade < _save->getGlobalShade())
+ {
+ ++_fadeShade;
+ }
+ }
+}
+
+/**
  * Gets a list of waypoints on the map.
  * @return A list of waypoints.
  */
diff --git a/src/Battlescape/Map.h b/src/Battlescape/Map.h
index ea2bd22..6a8eac5 100644
--- a/src/Battlescape/Map.h
+++ b/src/Battlescape/Map.h
@@ -46,8 +46,11 @@ class Map : public InteractiveSurface
 {
 private:
  static const int SCROLL_INTERVAL = 15;
+ static const int FADE_INTERVAL = 222;
  static const int BULLET_SPRITES = 35;
  Timer *_scrollMouseTimer, *_scrollKeyTimer;
+ Timer *_fadeTimer;
+ int _fadeShade;
  Game *_game;
  SavedBattleGame *_save;
  Surface *_arrow;
@@ -121,6 +124,8 @@ public:
  void scrollMouse();
  https:/// Keyboard-scrolls the camera.
  void scrollKey();
+ https:/// fades in/out
+ void fadeShade();
  https:/// Get waypoints vector.
  std::vector<Position> *getWaypoints();
  https:/// Set mouse-buttons' pressed state.
@@ -147,6 +152,8 @@ public:
  void setBlastFlash(bool flash);
  https:/// Check if the screen is flashing this.
  bool getBlastFlash();
+ https:/// Modify shade for fading
+ int reShade(const int shade);
 };
 
 }


EDIT: that "#include <cstdio>" shouldn't be there obviously
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 08:22:25 am
Very nice! But doesn't allow unit spotting?
Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 08:33:07 am
It doesn't show anything that would not be seen if it was day.


EDIT: Ah, I misunderstood. It does not touch in-game lightning in any way. If units are dark, they stay dark to the AI or player for visibility calculations.

It's a low-level rendering hack so to say.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 08:50:40 am
This might be the solution we need then... If that hack could be applied to be toggle-able... and render in a single 16-color palette only (nightvision effect!)... Then we already have 'vision modes' UI.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 10:12:35 am
After some playtesting ... slow transition to full brightness got annoying very fast, so I made it faster and limited to min shade 4, so that it doesn't ruin your night vision so much. And rebound it to tab key, so you can do useful things like walking while seeing where you in fact step.

https://vid.me/NFHm

I tried toggle mode and did not like it. In current form it ruins the night for me. Maybe with the palette hack it won't.

Cleaned up patch:
Code: [Select]
diff --git a/src/Battlescape/Map.cpp b/src/Battlescape/Map.cpp
index ec64c89..52b9db6 100644
--- a/src/Battlescape/Map.cpp
+++ b/src/Battlescape/Map.cpp
@@ -108,6 +108,10 @@ Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight)
  _scrollMouseTimer->onTimer((SurfaceHandler)&Map::scrollMouse);
  _scrollKeyTimer = new Timer(SCROLL_INTERVAL);
  _scrollKeyTimer->onTimer((SurfaceHandler)&Map::scrollKey);
+ _fadeTimer = new Timer(FADE_INTERVAL);
+ _fadeTimer->onTimer((SurfaceHandler)&Map::fadeShade);
+ _fadeTimer->start();
+ _fadeShade = 16;
  _camera->setScrollTimer(_scrollMouseTimer, _scrollKeyTimer);
 
  _txtAccuracy = new Text(24, 9, 0, 0);
@@ -124,6 +128,7 @@ Map::~Map()
 {
  delete _scrollMouseTimer;
  delete _scrollKeyTimer;
+ delete _fadeTimer;
  delete _arrow;
  delete _message;
  delete _camera;
@@ -174,6 +179,7 @@ void Map::think()
 {
  _scrollMouseTimer->think(0, this);
  _scrollKeyTimer->think(0, this);
+ _fadeTimer->think(0, this);
 }
 
 /**
@@ -417,7 +423,7 @@ void Map::drawTerrain(Surface *surface)
 
  if (tile->isDiscovered(2))
  {
- tileShade = tile->getShade();
+ tileShade = reShade(tile->getShade());
  }
  else
  {
@@ -469,7 +475,7 @@ void Map::drawTerrain(Surface *surface)
  int tileNorthShade, tileTwoNorthShade, tileWestShade, tileNorthWestShade, tileSouthWestShade;
  if (tileNorth->isDiscovered(2))
  {
- tileNorthShade = tileNorth->getShade();
+ tileNorthShade = reShade(tileNorth->getShade());
  }
  else
  {
@@ -508,7 +514,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileTwoNorth = _save->getTile(mapPosition - Position(0,2,0));
  if (tileTwoNorth->isDiscovered(2))
  {
- tileTwoNorthShade = tileTwoNorth->getShade();
+ tileTwoNorthShade = reShade(tileTwoNorth->getShade());
  }
  else
  {
@@ -529,7 +535,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileNorthWest = _save->getTile(mapPosition - Position(1,1,0));
  if (tileNorthWest->isDiscovered(2))
  {
- tileNorthWestShade = tileNorthWest->getShade();
+ tileNorthWestShade = reShade(tileNorthWest->getShade());
  }
  else
  {
@@ -563,7 +569,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileSouthWest = _save->getTile(mapPosition + Position(-1, 1, 0));
  if (tileSouthWest->isDiscovered(2))
  {
- tileSouthWestShade = tileSouthWest->getShade();
+ tileSouthWestShade = reShade(tileSouthWest->getShade());
  }
  else
  {
@@ -583,7 +589,7 @@ void Map::drawTerrain(Surface *surface)
  BattleUnit *westUnit = tileWest->getUnit();
  if (tileWest->isDiscovered(2))
  {
- tileWestShade = tileWest->getShade();
+ tileWestShade = reShade(tileWest->getShade());
  }
  else
  {
@@ -595,7 +601,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_WESTWALL)->isDoor() || tileWest->getMapData(O_WESTWALL)->isUFODoor())
  && tileWest->isDiscovered(0))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_WESTWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -605,7 +611,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_NORTHWALL)->isDoor() || tileWest->getMapData(O_NORTHWALL)->isUFODoor())
  && tileWest->isDiscovered(1))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_NORTHWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -699,7 +705,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_WESTWALL)->isDoor() || tile->getMapData(O_WESTWALL)->isUFODoor())
  && tile->isDiscovered(0))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade);
@@ -710,7 +716,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_NORTHWALL)->isDoor() || tile->getMapData(O_NORTHWALL)->isUFODoor())
  && tile->isDiscovered(1))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  if (tile->getMapData(O_WESTWALL))
@@ -897,7 +903,7 @@ void Map::drawTerrain(Surface *surface)
  tunit, part,
  offset.x,
  offset.y,
- ttile->getShade()
+ reShade(ttile->getShade())
  );
  }
  }
@@ -1325,6 +1331,16 @@ void Map::keyboardPress(Action *action, State *state)
 }
 
 /**
+ * Handles fade-in and fade-out on Alt key
+ * @param original tile/item/unit shade
+ */
+
+int Map::reShade(const int shade)
+{
+ return shade > _fadeShade ? _fadeShade : shade;
+}
+
+/**
  * Handles keyboard releases on the map.
  * @param action Pointer to an action.
  * @param state State that the action handlers belong to.
@@ -1626,6 +1642,28 @@ void Map::scrollKey()
 }
 
 /**
+ * Modify the fade shade level if fade's in progress.
+ */
+void Map::fadeShade()
+{
+ Uint8 *keystate = SDL_GetKeyState(NULL);
+ if (keystate[SDLK_TAB])
+ {
+ if (_fadeShade > 4)
+ {
+ --_fadeShade;
+ }
+ }
+ else
+ {
+ if (_fadeShade < _save->getGlobalShade())
+ {
+ ++_fadeShade;
+ }
+ }
+}
+
+/**
  * Gets a list of waypoints on the map.
  * @return A list of waypoints.
  */
diff --git a/src/Battlescape/Map.h b/src/Battlescape/Map.h
index ea2bd22..33c3157 100644
--- a/src/Battlescape/Map.h
+++ b/src/Battlescape/Map.h
@@ -46,8 +46,11 @@ class Map : public InteractiveSurface
 {
 private:
  static const int SCROLL_INTERVAL = 15;
+ static const int FADE_INTERVAL = 23;
  static const int BULLET_SPRITES = 35;
  Timer *_scrollMouseTimer, *_scrollKeyTimer;
+ Timer *_fadeTimer;
+ int _fadeShade;
  Game *_game;
  SavedBattleGame *_save;
  Surface *_arrow;
@@ -121,6 +124,8 @@ public:
  void scrollMouse();
  https:/// Keyboard-scrolls the camera.
  void scrollKey();
+ https:/// fades in/out
+ void fadeShade();
  https:/// Get waypoints vector.
  std::vector<Position> *getWaypoints();
  https:/// Set mouse-buttons' pressed state.
@@ -147,6 +152,8 @@ public:
  void setBlastFlash(bool flash);
  https:/// Check if the screen is flashing this.
  bool getBlastFlash();
+ https:/// Modify shade for fading
+ int reShade(const int shade);
 };
 
 }

Can't make a windows binary, sorry for that.

Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 02, 2016, 10:44:27 am
slow transition to full brightness got annoying very fast, so I made it faster and limited to min shade 4, so that it doesn't ruin your night vision so much. And rebound it to tab key, so you can do useful things like walking while seeing where you in fact step.

Heh, exactly what I was going to add:
- faster
- not all the way to max brightness (I'd go to min+6 for previous absolute darkness and max-4 for previous partial visibility)
- tab key is also not very good, cause in vanilla it selects a new unit... although that's the first hotkey I always change to something else :) I guess I'll make it configurable with default something like space, numpad0 or something similar
Title: Re: Any way to make your gals emit light on night missions?
Post by: Boltgun on September 02, 2016, 10:50:09 am
After some playtesting ... slow transition to full brightness got annoying very fast, so I made it faster and limited to min shade 4, so that it doesn't ruin your night vision so much. And rebound it to tab key, so you can do useful things like walking while seeing where you in fact step.

https://vid.me/NFHm

I tried toggle mode and did not like it. In current form it ruins the night for me. Maybe with the palette hack it won't.

Cleaned up patch:
Code: [Select]
diff --git a/src/Battlescape/Map.cpp b/src/Battlescape/Map.cpp
index ec64c89..52b9db6 100644
--- a/src/Battlescape/Map.cpp
+++ b/src/Battlescape/Map.cpp
@@ -108,6 +108,10 @@ Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight)
  _scrollMouseTimer->onTimer((SurfaceHandler)&Map::scrollMouse);
  _scrollKeyTimer = new Timer(SCROLL_INTERVAL);
  _scrollKeyTimer->onTimer((SurfaceHandler)&Map::scrollKey);
+ _fadeTimer = new Timer(FADE_INTERVAL);
+ _fadeTimer->onTimer((SurfaceHandler)&Map::fadeShade);
+ _fadeTimer->start();
+ _fadeShade = 16;
  _camera->setScrollTimer(_scrollMouseTimer, _scrollKeyTimer);
 
  _txtAccuracy = new Text(24, 9, 0, 0);
@@ -124,6 +128,7 @@ Map::~Map()
 {
  delete _scrollMouseTimer;
  delete _scrollKeyTimer;
+ delete _fadeTimer;
  delete _arrow;
  delete _message;
  delete _camera;
@@ -174,6 +179,7 @@ void Map::think()
 {
  _scrollMouseTimer->think(0, this);
  _scrollKeyTimer->think(0, this);
+ _fadeTimer->think(0, this);
 }
 
 /**
@@ -417,7 +423,7 @@ void Map::drawTerrain(Surface *surface)
 
  if (tile->isDiscovered(2))
  {
- tileShade = tile->getShade();
+ tileShade = reShade(tile->getShade());
  }
  else
  {
@@ -469,7 +475,7 @@ void Map::drawTerrain(Surface *surface)
  int tileNorthShade, tileTwoNorthShade, tileWestShade, tileNorthWestShade, tileSouthWestShade;
  if (tileNorth->isDiscovered(2))
  {
- tileNorthShade = tileNorth->getShade();
+ tileNorthShade = reShade(tileNorth->getShade());
  }
  else
  {
@@ -508,7 +514,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileTwoNorth = _save->getTile(mapPosition - Position(0,2,0));
  if (tileTwoNorth->isDiscovered(2))
  {
- tileTwoNorthShade = tileTwoNorth->getShade();
+ tileTwoNorthShade = reShade(tileTwoNorth->getShade());
  }
  else
  {
@@ -529,7 +535,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileNorthWest = _save->getTile(mapPosition - Position(1,1,0));
  if (tileNorthWest->isDiscovered(2))
  {
- tileNorthWestShade = tileNorthWest->getShade();
+ tileNorthWestShade = reShade(tileNorthWest->getShade());
  }
  else
  {
@@ -563,7 +569,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileSouthWest = _save->getTile(mapPosition + Position(-1, 1, 0));
  if (tileSouthWest->isDiscovered(2))
  {
- tileSouthWestShade = tileSouthWest->getShade();
+ tileSouthWestShade = reShade(tileSouthWest->getShade());
  }
  else
  {
@@ -583,7 +589,7 @@ void Map::drawTerrain(Surface *surface)
  BattleUnit *westUnit = tileWest->getUnit();
  if (tileWest->isDiscovered(2))
  {
- tileWestShade = tileWest->getShade();
+ tileWestShade = reShade(tileWest->getShade());
  }
  else
  {
@@ -595,7 +601,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_WESTWALL)->isDoor() || tileWest->getMapData(O_WESTWALL)->isUFODoor())
  && tileWest->isDiscovered(0))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_WESTWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -605,7 +611,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_NORTHWALL)->isDoor() || tileWest->getMapData(O_NORTHWALL)->isUFODoor())
  && tileWest->isDiscovered(1))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_NORTHWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -699,7 +705,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_WESTWALL)->isDoor() || tile->getMapData(O_WESTWALL)->isUFODoor())
  && tile->isDiscovered(0))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade);
@@ -710,7 +716,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_NORTHWALL)->isDoor() || tile->getMapData(O_NORTHWALL)->isUFODoor())
  && tile->isDiscovered(1))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  if (tile->getMapData(O_WESTWALL))
@@ -897,7 +903,7 @@ void Map::drawTerrain(Surface *surface)
  tunit, part,
  offset.x,
  offset.y,
- ttile->getShade()
+ reShade(ttile->getShade())
  );
  }
  }
@@ -1325,6 +1331,16 @@ void Map::keyboardPress(Action *action, State *state)
 }
 
 /**
+ * Handles fade-in and fade-out on Alt key
+ * @param original tile/item/unit shade
+ */
+
+int Map::reShade(const int shade)
+{
+ return shade > _fadeShade ? _fadeShade : shade;
+}
+
+/**
  * Handles keyboard releases on the map.
  * @param action Pointer to an action.
  * @param state State that the action handlers belong to.
@@ -1626,6 +1642,28 @@ void Map::scrollKey()
 }
 
 /**
+ * Modify the fade shade level if fade's in progress.
+ */
+void Map::fadeShade()
+{
+ Uint8 *keystate = SDL_GetKeyState(NULL);
+ if (keystate[SDLK_TAB])
+ {
+ if (_fadeShade > 4)
+ {
+ --_fadeShade;
+ }
+ }
+ else
+ {
+ if (_fadeShade < _save->getGlobalShade())
+ {
+ ++_fadeShade;
+ }
+ }
+}
+
+/**
  * Gets a list of waypoints on the map.
  * @return A list of waypoints.
  */
diff --git a/src/Battlescape/Map.h b/src/Battlescape/Map.h
index ea2bd22..33c3157 100644
--- a/src/Battlescape/Map.h
+++ b/src/Battlescape/Map.h
@@ -46,8 +46,11 @@ class Map : public InteractiveSurface
 {
 private:
  static const int SCROLL_INTERVAL = 15;
+ static const int FADE_INTERVAL = 23;
  static const int BULLET_SPRITES = 35;
  Timer *_scrollMouseTimer, *_scrollKeyTimer;
+ Timer *_fadeTimer;
+ int _fadeShade;
  Game *_game;
  SavedBattleGame *_save;
  Surface *_arrow;
@@ -121,6 +124,8 @@ public:
  void scrollMouse();
  https:/// Keyboard-scrolls the camera.
  void scrollKey();
+ https:/// fades in/out
+ void fadeShade();
  https:/// Get waypoints vector.
  std::vector<Position> *getWaypoints();
  https:/// Set mouse-buttons' pressed state.
@@ -147,6 +152,8 @@ public:
  void setBlastFlash(bool flash);
  https:/// Check if the screen is flashing this.
  bool getBlastFlash();
+ https:/// Modify shade for fading
+ int reShade(const int shade);
 };
 
 }

Can't make a windows binary, sorry for that.

That's really good, alt or ctrl is fine if it's a press and hold.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 10:56:05 am
Maybe something logical instead, like + for example (as in "+ brightness") :)
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 02, 2016, 10:58:02 am
That's really good, alt or ctrl is fine if it's a press and hold.

Alt, Ctrl and Shift are already taken for other things and I personally don't want to have increased brightness if I only want to instruct a soldier to run (with Ctrl).
So, Ctrl and Shift are no-gos for me... we could argue about Alt (I guess time will tell, for now I'll leave Alt for arrows only and a new hotkey for brightness).
Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 11:46:15 am
Ok, here goes:

Toggle bound to scroll-lock
Hold bound to backtick (under escape)

Hold inverts if toggle was toggled.

Both seem to be unused.

Keybindings added to options menu, all variables and methods renamed ten times.


Code: [Select]
diff --git a/src/Battlescape/BattlescapeState.cpp b/src/Battlescape/BattlescapeState.cpp
index 9945818..0affc7f 100644
--- a/src/Battlescape/BattlescapeState.cpp
+++ b/src/Battlescape/BattlescapeState.cpp
@@ -461,6 +461,8 @@ BattlescapeState::BattlescapeState() : _reserve(0), _xBeforeMouseScrolling(0), _
  _btnStats->onKeyboardPress((ActionHandler)&BattlescapeState::btnReloadClick, Options::keyBattleReload);
  _btnStats->onKeyboardPress((ActionHandler)&BattlescapeState::btnPersonalLightingClick, Options::keyBattlePersonalLighting);
 
+ _btnStats->onKeyboardPress((ActionHandler)&BattlescapeState::btnNightVisionClick, Options::keyNightVisionToggle);
+
  SDLKey buttons[] = {Options::keyBattleCenterEnemy1,
  Options::keyBattleCenterEnemy2,
  Options::keyBattleCenterEnemy3,
@@ -1300,6 +1302,15 @@ void BattlescapeState::btnPersonalLightingClick(Action *)
 }
 
 /**
+ * Toggles map-wide night vision (purely cosmetic).
+ * @param action Pointer to an action.
+ */
+void BattlescapeState::btnNightVisionClick(Action *action)
+{
+ _map->toggleNightVision();
+}
+
+/**
  * Determines whether a playable unit is selected. Normally only player side units can be selected, but in debug mode one can play with aliens too :)
  * Is used to see if stats can be displayed and action buttons will work.
  * @return Whether a playable unit is selected.
diff --git a/src/Battlescape/BattlescapeState.h b/src/Battlescape/BattlescapeState.h
index 15f6073..776f2d3 100644
--- a/src/Battlescape/BattlescapeState.h
+++ b/src/Battlescape/BattlescapeState.h
@@ -167,6 +167,8 @@ public:
  void btnReloadClick(Action *action);
  https:/// Handler for clicking the lighting button.
  void btnPersonalLightingClick(Action *action);
+ https:/// Handler for toggling the "night vision" mode.
+ void btnNightVisionClick(Action *action);
  https:/// Determines whether a playable unit is selected.
  bool playableUnitSelected();
  https:/// Updates soldier name/rank/tu/energy/health/morale.
diff --git a/src/Battlescape/Map.cpp b/src/Battlescape/Map.cpp
index ec64c89..e30408c 100644
--- a/src/Battlescape/Map.cpp
+++ b/src/Battlescape/Map.cpp
@@ -108,6 +108,11 @@ Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight)
  _scrollMouseTimer->onTimer((SurfaceHandler)&Map::scrollMouse);
  _scrollKeyTimer = new Timer(SCROLL_INTERVAL);
  _scrollKeyTimer->onTimer((SurfaceHandler)&Map::scrollKey);
+ _fadeTimer = new Timer(FADE_INTERVAL);
+ _fadeTimer->onTimer((SurfaceHandler)&Map::fadeShade);
+ _fadeTimer->start();
+ _fadeShade = 16;
+ _nightVisionOn = false;
  _camera->setScrollTimer(_scrollMouseTimer, _scrollKeyTimer);
 
  _txtAccuracy = new Text(24, 9, 0, 0);
@@ -124,6 +129,7 @@ Map::~Map()
 {
  delete _scrollMouseTimer;
  delete _scrollKeyTimer;
+ delete _fadeTimer;
  delete _arrow;
  delete _message;
  delete _camera;
@@ -174,6 +180,7 @@ void Map::think()
 {
  _scrollMouseTimer->think(0, this);
  _scrollKeyTimer->think(0, this);
+ _fadeTimer->think(0, this);
 }
 
 /**
@@ -417,7 +424,7 @@ void Map::drawTerrain(Surface *surface)
 
  if (tile->isDiscovered(2))
  {
- tileShade = tile->getShade();
+ tileShade = reShade(tile->getShade());
  }
  else
  {
@@ -469,7 +476,7 @@ void Map::drawTerrain(Surface *surface)
  int tileNorthShade, tileTwoNorthShade, tileWestShade, tileNorthWestShade, tileSouthWestShade;
  if (tileNorth->isDiscovered(2))
  {
- tileNorthShade = tileNorth->getShade();
+ tileNorthShade = reShade(tileNorth->getShade());
  }
  else
  {
@@ -508,7 +515,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileTwoNorth = _save->getTile(mapPosition - Position(0,2,0));
  if (tileTwoNorth->isDiscovered(2))
  {
- tileTwoNorthShade = tileTwoNorth->getShade();
+ tileTwoNorthShade = reShade(tileTwoNorth->getShade());
  }
  else
  {
@@ -529,7 +536,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileNorthWest = _save->getTile(mapPosition - Position(1,1,0));
  if (tileNorthWest->isDiscovered(2))
  {
- tileNorthWestShade = tileNorthWest->getShade();
+ tileNorthWestShade = reShade(tileNorthWest->getShade());
  }
  else
  {
@@ -563,7 +570,7 @@ void Map::drawTerrain(Surface *surface)
  Tile *tileSouthWest = _save->getTile(mapPosition + Position(-1, 1, 0));
  if (tileSouthWest->isDiscovered(2))
  {
- tileSouthWestShade = tileSouthWest->getShade();
+ tileSouthWestShade = reShade(tileSouthWest->getShade());
  }
  else
  {
@@ -583,7 +590,7 @@ void Map::drawTerrain(Surface *surface)
  BattleUnit *westUnit = tileWest->getUnit();
  if (tileWest->isDiscovered(2))
  {
- tileWestShade = tileWest->getShade();
+ tileWestShade = reShade(tileWest->getShade());
  }
  else
  {
@@ -595,7 +602,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_WESTWALL)->isDoor() || tileWest->getMapData(O_WESTWALL)->isUFODoor())
  && tileWest->isDiscovered(0))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_WESTWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -605,7 +612,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tileWest->getMapData(O_NORTHWALL)->isDoor() || tileWest->getMapData(O_NORTHWALL)->isUFODoor())
  && tileWest->isDiscovered(1))
- wallShade = tileWest->getShade();
+ wallShade = reShade(tileWest->getShade());
  else
  wallShade = tileWestShade;
  tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x, screenPosition.y - tileWest->getMapData(O_NORTHWALL)->getYOffset() + tileOffset.y, wallShade, true);
@@ -699,7 +706,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_WESTWALL)->isDoor() || tile->getMapData(O_WESTWALL)->isUFODoor())
  && tile->isDiscovered(0))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade);
@@ -710,7 +717,7 @@ void Map::drawTerrain(Surface *surface)
  {
  if ((tile->getMapData(O_NORTHWALL)->isDoor() || tile->getMapData(O_NORTHWALL)->isUFODoor())
  && tile->isDiscovered(1))
- wallShade = tile->getShade();
+ wallShade = reShade(tile->getShade());
  else
  wallShade = tileShade;
  if (tile->getMapData(O_WESTWALL))
@@ -897,7 +904,7 @@ void Map::drawTerrain(Surface *surface)
  tunit, part,
  offset.x,
  offset.y,
- ttile->getShade()
+ reShade(ttile->getShade())
  );
  }
  }
@@ -1325,6 +1332,25 @@ void Map::keyboardPress(Action *action, State *state)
 }
 
 /**
+ * Handles map vision toggle mode.
+ */
+
+void Map::toggleNightVision()
+{
+ _nightVisionOn = not _nightVisionOn;
+}
+
+/**
+ * Handles fade-in and fade-out shade modification
+ * @param original tile/item/unit shade
+ */
+
+int Map::reShade(const int shade)
+{
+ return shade > _fadeShade ? _fadeShade : shade;
+}
+
+/**
  * Handles keyboard releases on the map.
  * @param action Pointer to an action.
  * @param state State that the action handlers belong to.
@@ -1626,6 +1652,28 @@ void Map::scrollKey()
 }
 
 /**
+ * Modify the fade shade level if fade's in progress.
+ */
+void Map::fadeShade()
+{
+ bool hold = SDL_GetKeyState(NULL)[Options::keyNightVisionHold];
+ if (_nightVisionOn xor hold )
+ {
+ if (_fadeShade > 4)
+ {
+ --_fadeShade;
+ }
+ }
+ else
+ {
+ if (_fadeShade < _save->getGlobalShade())
+ {
+ ++_fadeShade;
+ }
+ }
+}
+
+/**
  * Gets a list of waypoints on the map.
  * @return A list of waypoints.
  */
diff --git a/src/Battlescape/Map.h b/src/Battlescape/Map.h
index ea2bd22..34f8ab2 100644
--- a/src/Battlescape/Map.h
+++ b/src/Battlescape/Map.h
@@ -46,8 +46,12 @@ class Map : public InteractiveSurface
 {
 private:
  static const int SCROLL_INTERVAL = 15;
+ static const int FADE_INTERVAL = 23;
  static const int BULLET_SPRITES = 35;
  Timer *_scrollMouseTimer, *_scrollKeyTimer;
+ Timer *_fadeTimer;
+ int _fadeShade;
+ bool _nightVisionOn;
  Game *_game;
  SavedBattleGame *_save;
  Surface *_arrow;
@@ -121,6 +125,8 @@ public:
  void scrollMouse();
  https:/// Keyboard-scrolls the camera.
  void scrollKey();
+ https:/// fades in/out
+ void fadeShade();
  https:/// Get waypoints vector.
  std::vector<Position> *getWaypoints();
  https:/// Set mouse-buttons' pressed state.
@@ -147,6 +153,11 @@ public:
  void setBlastFlash(bool flash);
  https:/// Check if the screen is flashing this.
  bool getBlastFlash();
+ https:/// Modify shade for fading
+ int reShade(const int shade);
+ https:/// toggle the night-vision mode
+ void toggleNightVision();
+
 };
 
 }
diff --git a/src/Engine/Options.cpp b/src/Engine/Options.cpp
index 4537766..5b35eb9 100644
--- a/src/Engine/Options.cpp
+++ b/src/Engine/Options.cpp
@@ -296,6 +296,9 @@ void create()
  _info.push_back(OptionInfo("keyBattleActionItem5", &keyBattleActionItem5, SDLK_5, "STR_ACTION_ITEM_5", "STR_OXCE"));
  _info.push_back(OptionInfo("keyToggleQuickSearch", &keyToggleQuickSearch, SDLK_q, "STR_TOGGLE_QUICK_SEARCH", "STR_OXCE"));
 
+ _info.push_back(OptionInfo("keyNightVisionToggle", &keyNightVisionToggle, SDLK_SCROLLOCK, "STR_TOGGLE_NIGHT_VISION", "STR_OXCE"));
+ _info.push_back(OptionInfo("keyNightVisionHold", &keyNightVisionHold, SDLK_BACKQUOTE, "STR_HOLD_NIGHT_VISION", "STR_OXCE"));
+
 #ifdef __MORPHOS__
  _info.push_back(OptionInfo("FPS", &FPS, 15, "STR_FPS_LIMIT", "STR_GENERAL"));
  _info.push_back(OptionInfo("FPSInactive", &FPSInactive, 15, "STR_FPS_INACTIVE_LIMIT", "STR_GENERAL"));
diff --git a/src/Engine/Options.inc.h b/src/Engine/Options.inc.h
index 3fc086c..53a7780 100644
--- a/src/Engine/Options.inc.h
+++ b/src/Engine/Options.inc.h
@@ -52,6 +52,8 @@ OPT bool showAllCommendations;
 OPT bool removeWoundedFromTraining;
 OPT bool autoAssignPilots;
 
+OPT SDLKey keyNightVisionToggle, keyNightVisionHold;
+
 https:// Flags and other stuff that don't need OptionInfo's.
 OPT bool mute, reload, newOpenGL, newScaleFilter, newHQXFilter, newXBRZFilter;
 OPT int newDisplayWidth, newDisplayHeight, newBattlescapeScale, newGeoscapeScale;
Title: Re: Any way to make your gals emit light on night missions?
Post by: Yankes on September 02, 2016, 12:38:13 pm
Why so complicated?

https://vid.me/0YHL

Press alt a little longer and it all lights up. Release and it fades back.

Took all of two hours thinking of, coding, debugging, fighting with a screencapture program, uploading ...


This is my a) case, or at least how I image it could be implemented. Keep gameplay shade alone but alter display one.
 
Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 01:23:05 pm
This is my a) case, or at least how I image it could be implemented. Keep gameplay shade alone but alter display one.

Yes, now I see it's exactly that. When I started reading the topic though, all the formulas and stuff...


Now for the final installment:


Palette hack - classic green NV

https://vid.me/DHtc

This was ridiculously easy to do. But a) it's slow  and b) gals/units aren't shaded.  Maybe it's fine this way, maybe not. In any case, I looked at the unit draw code and called it a day.

Patch:

https://gist.github.com/StoddardOXC/3bb5c59841b7f2fd7e44dfbf1fc7ac04


Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 01:44:14 pm

This was ridiculously easy to do. But a) it's slow  and b) gals/units aren't shaded.  Maybe it's fine this way, maybe not. In any case, I looked at the unit draw code and called it a day.


Great! Actually it's great the units stay as they are, much easier to tell them apart. If Meridian adds this, I'd like a ruleset option to choose which palette should be used (so instead of green NV, people can make orange or whatever).
Title: Re: Any way to make your gals emit light on night missions?
Post by: Yankes on September 02, 2016, 02:12:27 pm
This was ridiculously easy to do. But a) it's slow  and b) gals/units aren't shaded.  Maybe it's fine this way, maybe not. In any case, I looked at the unit draw code and called it a day.
a) slow? It should be barely difference between normal drawing and recolored drawing. Most of it code is same.
b) It will be hard, primary because unit can have user defined recoloring. Only way I see this could be fixed is add second pass after user recoloring.

Title: Re: Any way to make your gals emit light on night missions?
Post by: Stoddard on September 02, 2016, 02:19:54 pm
a) slow? It should be barely difference between normal drawing and recolored drawing. Most of it code is same.
That was my impression, though a glance at the code says it should not differ at all. Maybe it was eclipse eating all the cpu  :-\

b) It will be hard, primary because unit can have user defined recoloring. Only way I see this could be fixed is add second pass after user recoloring.

Thought as much. Maybe later I'll take a look how that would look like. There isn't too many pixels in the units after all.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 02:46:40 pm
Do as you will, but leave the version w/o unit recolors as well, since it's easier to read for the player.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on September 02, 2016, 05:02:26 pm
This is AMAZING work Stoddard.  8)

Now, how do I get it into my version of the game? Do I have to compile it myself?
Title: Re: Any way to make your gals emit light on night missions?
Post by: Arthanor on September 02, 2016, 06:29:04 pm
That looks amazing! Exactly what I was hoping for. Really cool work! Starting a new compilation with the NV now :)

Thanks Stoddard
Title: Re: Any way to make your gals emit light on night missions?
Post by: HelmetHair on September 02, 2016, 06:42:14 pm
WOW!

can we have different colors as well?

like shades of red, orange, green?

In any event.... NICE FUCKING WORK!
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 02, 2016, 06:50:50 pm
can we have different colors as well?
like shades of red, orange, green?

Great! Actually it's great the units stay as they are, much easier to tell them apart. If Meridian adds this, I'd like a ruleset option to choose which palette should be used (so instead of green NV, people can make orange or whatever).

Yes, I am adding this (with a few tweaks) today.

How did you mean to change the color? Globally? Or should it depend on something? I like the green btw.
Title: Re: Any way to make your gals emit light on night missions?
Post by: HelmetHair on September 02, 2016, 07:21:33 pm
Meridian,

If you were talking to me... I meant it in actually a few ways... I wasn't clear. I got excited :P

1. Could the player change the color of the night vision effect. Some folks are colorblind. (not me, I like green)

2. Could a particular NV effect color be applied to different units at a time. I'm not sure if I'm being clear but whatever.
So like if you had a gal with no NVGs on and so where to have a reddish colored effect to reflect that she's using her natural night sight vs a green superior nightvision of a gal wearing NVGs. So visual clues?

Huge and mushy run on sentence... 

3. could different types of NV gear have defined larger night sight ranges and as such have different colored effects.

4, Monster vision.... YEAH!

Anyway, have a great day!
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 02, 2016, 08:15:11 pm
Meridian,
If you were talking to me... I meant it in actually a few ways... I wasn't clear. I got excited :P
1. Could the player change the color of the night vision effect. Some folks are colorblind. (not me, I like green)
2. Could a particular NV effect color be applied to different units at a time. I'm not sure if I'm being clear but whatever.
So like if you had a gal with no NVGs on and so where to have a reddish colored effect to reflect that she's using her natural night sight vs a green superior nightvision of a gal wearing NVGs. So visual clues?
Huge and mushy run on sentence... 
3. could different types of NV gear have defined larger night sight ranges and as such have different colored effects.
4, Monster vision.... YEAH!
Anyway, have a great day!

1. No, that is a little bit too much... I don't know much about color blindness, but I think the difference here was between seeing nothing and seeing something, color shouldn't matter much.

2. Currently this is a global effect (from Commander's view if you wish).... but making it depend on the selected unit is possible and maybe would be a nice touch... I'll try it later!

3. There is no support for NV gear yet... but Surrealistik and Solarius have asked for it a few times... I have it on my todolist with low prio. They could have different color effects, yeah, that would make sense.

4. What? :)
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 02, 2016, 09:35:10 pm
Like I said, I'd make the color modifiable by ruleset. Also available by default, not some special vision gear. However, this can be used later for other effects, like simulating underwater (constant blue glow) or said extra modes of vision (I see no use for this - it's better to have all spotted enemies on the basic vision type - but maybe I' wrong).
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 02, 2016, 11:26:07 pm
Like I said, I'd make the color modifiable by ruleset.

I was asking if it should be global, per terrain, per mission, per deployment, etc.
I made a global one anyway:

Code: [Select]
interfaces:
  - type: battlescape
    elements:
      - id: nightVision
        color: 5 # green
Title: Re: Any way to make your gals emit light on night missions?
Post by: Ketonur on September 03, 2016, 05:54:29 am
Good job!!! Finally playing night missions is a pleasure :)

Is it possible to do the same with a smoke ? Would be great if we could remove it by pressing a button :) 
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 03, 2016, 10:08:44 am
So, I've been playing around with it and having global night vision seems quite cheaty.

Wouldn't it be better to have night vision localized to where the girls can actually see (i.e. a radius around them based on their night visibility)?
See attached.

What do you think?
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on September 03, 2016, 10:35:00 am
Once again, could anyone elaborate how to get this into your game?
I'd presume it ends up in the binary - anybody compiled a windows binary he could share?
Or do I have to wait for Merdiian to release his take on things?
Thanks!

Edit: I see Meridian is lightning fast and has already released his version. Kewl. Now I only need to parse whether I want all the other changes from his branch...  :P
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 03, 2016, 10:43:31 am
Once again, could anyone elaborate how to get this into your game?
I'd presume it ends up in the binary - anybody compiled a windows binary he could share?
Or do I have to wait for Merdiian to release his take on things?
Thanks!

I have already released it.
And in 1 hour I will release also this change.
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on September 03, 2016, 10:44:39 am
I saw it in your thread Meridian, thanks.
Great stuff.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Eddie on September 03, 2016, 12:23:42 pm
Amazing work done here!

Is it possible to have an overlay that shows which tiles your girls can actually see? For smoke this would be useful, as it is often hard to tell how far through you can see.
Title: Re: Any way to make your gals emit light on night missions?
Post by: HelmetHair on September 03, 2016, 01:17:59 pm
So, I've been playing around with it and having global night vision seems quite cheaty.

Wouldn't it be better to have night vision localized to where the girls can actually see (i.e. a radius around them based on their night visibility)?
See attached.

What do you think?

Yeah it would be way better to have a radius. Did you ever play baldur's gate? elves and shit had infra vision so they could see in the dark. If you selected  them and another character say a human...guess what! you got infra vision. with that character.

so I'm not to keen on global NV effects for that reason and I'd would be neat to have buffs and debunks to night vision and colors.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 03, 2016, 01:42:23 pm
Radius makes little sense since this isn't soldier's vision, just a feature allowing the player to see all that has been mapped.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Meridian on September 03, 2016, 03:00:31 pm
Radius makes little sense since this isn't soldier's vision, just a feature allowing the player to see all that has been mapped.

Try playing with both, I thought the same at first... but after I tried, I definitely prefer the radius-based one. It looks nicer, and is (for me) much more intuitive.

And as a bonus, you'll even get to see how far your units actually can see in the dark.
Title: Re: Any way to make your gals emit light on night missions?
Post by: Dioxine on September 03, 2016, 03:35:00 pm
Yeah, after playing a bit, I have to agree with you. Especially about the 'bonus' :) Another proof that armchair critics are usually wrong :)
Title: Re: Any way to make your gals emit light on night missions?
Post by: khade on September 05, 2016, 01:56:17 am
What about the areas you've explored still lighting up, but not nearly as much? just enough to have a basic idea of what's been seen?
Title: Re: Any way to make your gals emit light on night missions?
Post by: rezaf on July 14, 2018, 09:31:58 am
So, almost two years after the fact I decided to give the mod another whirl. The first battlescape that greets me:
(http://i67.tinypic.com/985bq0.jpg)

Why oh why?  :'(

Edit: Ahhhhhh, scroll lock. This should be default, but still, now I can play the mod after all. Thanks once again to Meridian.  :D
Title: Re: Any way to make your gals emit light on night missions?
Post by: mk-fg on July 15, 2018, 12:08:01 pm
So, almost two years after the fact I decided to give the mod another whirl. The first battlescape that greets me:
...
Why oh why?  :'(

Edit: Ahhhhhh, scroll lock. This should be default, but still, now I can play the mod after all. Thanks once again to Meridian.  :D

Note that if you prefer classic "soldiers emit light" option system (and foregoing any NV advantage you get otherwise) you can grab Magna-Lite lamps (can be purchased very early-game) and walk around with these too :)
Title: Re: Any way to make your gals emit light on night missions?
Post by: Iazo on October 01, 2018, 06:31:26 pm
I think that is a very bad idea. Everyone will shoot at you.