aliens

Author Topic: How to illuminate a map evenly?  (Read 5883 times)

Offline Amoebka

  • Colonel
  • ****
  • Posts: 120
    • View Profile
How to illuminate a map evenly?
« on: June 23, 2018, 07:04:41 am »
Hello once more.

I've finally "finished" my new alien base terrain, but a few ugly issues revealed themselves during the testing.

The main one is the inconsistent shading of tiles (see attached picture). Tiles that have no floor MCDs on top of them are lit better than the tiles "under the roof". Obviously, this is very undesirable for me since the base is underground, and no sun is supposed to create shadows there. I would rather all tiles were lit evenly, but I don't know how to force it. Is there an option to disable these shadows somewhere in rulesets? If not, I guess the "best" solution is to create a fake Z-level on top of every map block and fill it with floor tiles, but that sounds like an enourmous amount of work. Is it possible to add a level on top of the existing ones in MapView without having to completely remake the map? Are there any better ways?

I know there is a shade property for alien deployments that ranges between 0 (day) and 15 (night). Is there a reference table for how all the intermediate values affect X-Com's vision? Is everything below 15 purely cosmetical or does it reduce the vision range still?
« Last Edit: June 23, 2018, 07:06:14 am by Amoebka »

Offline Amoebka

  • Colonel
  • ****
  • Posts: 120
    • View Profile
Re: How to illuminate a map evenly?
« Reply #1 on: June 23, 2018, 09:20:23 am »
Quote
Are those recolored TFTD tiles along with recolored tilesets with UFO94 palette?

Well, they aren't all just recolors. If you mean the crystal implanter thingy, I've redrawn the base to look more in-line with pink XCom1 tables.  :) But yes, I've compiled my own tileset, mostly comprised of edits, recolors and a few tftd redraws. The whole idea with this terrain is to bring the TFTD colony assault experience (4 realtime hours of trying to navigate a 60x60x4 maze  ::)) into XCom1.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: How to illuminate a map evenly?
« Reply #2 on: June 25, 2018, 01:27:10 am »
individual MCDs have their own inherent shade values which you can use to customize the lighting inside your base, the default xcom base tileset has this set for all floor tiles, i believe.
as for making it darker "outside" simply alter the shade value of the deployment, only values above 9 will alter visibility, but if the floor tiles themselves have a lower shade value, they will take precedent.

Offline Amoebka

  • Colonel
  • ****
  • Posts: 120
    • View Profile
Re: How to illuminate a map evenly?
« Reply #3 on: June 28, 2018, 08:42:04 am »
individual MCDs have their own inherent shade values which you can use to customize the lighting inside your base

Could you go into a bit more detail on how to do that? To begin with, I don't seem to see the "shade value" property in MCDedit, Light_Block is stated to be unused, Light_Source is a different thing. Also, could this even be used to solve the problem I formulated in the original post? The dark and the bright floors are the same mcds, so wouldn't setting a different shade value just make them all darker without removing the discrepancy?
« Last Edit: June 28, 2018, 08:43:42 am by Amoebka »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: How to illuminate a map evenly?
« Reply #4 on: June 28, 2018, 08:51:46 am »
the "Light_Source:58" field
i guess treat it as the inverse of shade? not sure exactly, haven't messed with it too much, 15 is probably the max usable value.

you'd still want to set the deployment's shade.

Offline Amoebka

  • Colonel
  • ****
  • Posts: 120
    • View Profile
Re: How to illuminate a map evenly?
« Reply #5 on: June 28, 2018, 09:06:34 am »
the "Light_Source:58" field

Well that was counterintuitive. :D Judging by the name I've assumed it turned MCD into a light source that made tiles around it brighter. Playing with the deployment shade value and light_source value of floors eventually gave me the result I want, but I still don't quite understand how. My best guess is Light_Source = 16 equals the lighting of an "outdoor" floor on a map with shade = 0. Local 15 equals global 1, local 14 equals global 2 etc. And when deciding the final illumination of a tile the engine picks the highest between the tile's light_source value and global illumination which is the shade value of deployment minus the penalty for being under the roof if applicable. So, setting the light_source of my floors to 15 and the shade of deployment to an arbitrary low value (6 in my case) makes all tiles lit evenly.

Thanks for help, Warboy. Can't even imagine myself solving this one on my own.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How to illuminate a map evenly?
« Reply #6 on: June 28, 2018, 11:03:06 am »
Just check some MCDs which you know to illuminate the area... For example street lamps or red alien machinery.