Author Topic: [DONE][Suggestion] Let walls emit light too  (Read 3658 times)

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
[DONE][Suggestion] Let walls emit light too
« on: December 22, 2018, 11:31:24 am »
MCDs have an option to emit light (like a electro-flare) by setting Light_Source:58 = 1
The "problem" is only floor-type or object-type MCDs can emit light; wall-type (both north and west) MCDs cannot.
Would it be possible+easy to allow light from walls?

« Last Edit: February 01, 2023, 10:45:02 am by Meridian »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Let walls emit light
« Reply #1 on: December 22, 2018, 11:43:38 am »
I'm guessing it is possible, and Meridian's a lot more likely to implement it if you provide the following:

1.) a use-case which demonstrates the need, and lacks a reasonable workaround

2.) someone else who also wants the feature

It probably won't go into OXC I imagine, so might just skip ahead and post it in OXCE forum.

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Let walls emit light
« Reply #2 on: December 22, 2018, 12:00:33 pm »
The workaround is simple and I'm already using it: you place an object-type MCD that emits light in the same spot of the wannabe-lighting-wall.
I do this for the wall lamps in my mod but it comes with drawbacks.
First, if the wall is destroyed the lamp stays there "floating"; not exactly a common occurrence but it looks ugly when it happens.
Second, the object-type MCD need a Foootstep_Sound:51 option.. and it means that if you are walking on a tile containing a wall-hanging object, you can -potentially- suddenly hear a different sound, which again is annoying.

Honestly, now that I recall the advanced lighting of OCXE, I guess making light-emitting walls is probably quite hard and not worth it. Should have considered that before making the request.
« Last Edit: December 22, 2018, 09:58:06 pm by robin »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Let walls emit light [let's not do it]
« Reply #3 on: December 22, 2018, 03:19:22 pm »
Honestly, now that I recall the advanced lighting of OCXE, I guess making light-emitting walls is probably quite hard and not worth it. Should have considered that before making the request.
Only problem with wall that "glow" is where glow should go. If it only visible inside of tile then adding this will not be hard probably (I mean if you place this wall on empty map then it will have only light one side of wall and another side will be dark).

[ps]

If walls should work exactly like floors or objects then adding this to engine is 10min of work.
« Last Edit: December 22, 2018, 04:22:24 pm by Yankes »

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Let walls emit light [let's not do it]
« Reply #4 on: December 22, 2018, 09:57:05 pm »
With OXCE advanced illumination enabled:
- In the case of a wall lamp (or similar), the light should spread only inside.
- In the case of a literally glowing wall, I guess the light should spread in both directions (inside and outside).

With vanilla illumination:
- I both cases, light spreads in both directions.

I'm not using any "glowing walls" (and I use vanilla illumination too); but I don't know about other modders.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Let walls emit light [...]
« Reply #5 on: December 22, 2018, 11:20:05 pm »
Right now I can easy implement "wall lamp", this is because all current sources of light in tile are handled same (take light of fire, floor, object and get max brightness of them and use it to illuminate surrounding). I can easy add another source of light and rest of functionality stay same.
If wall should illuminate both sides it will be harder because I would need change light propagation code.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Let walls emit light [...]
« Reply #6 on: December 22, 2018, 11:48:32 pm »
I like it, but... what about lamps on the other side? :)

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Let walls emit light [...]
« Reply #7 on: December 23, 2018, 11:31:18 am »
I like it, but... what about lamps on the other side? :)
I can't really answer to that question, since I use vanilla illumination light already propagates everywhere. Both the issues I have with the workaround I'm using are related to the visible side of the wall, so I'm perfectly content with the simpler "wall lamp" solution.

The question is for OXCE advanced illumination users:
is the issue of needing light on the hidden side of the wall relevant enough to code for it?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: Let walls emit light [...]
« Reply #8 on: January 03, 2019, 04:18:29 pm »
Update: the walls can also generate light for a tile in OXCE now... same as floor and object

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Let walls emit light [...]
« Reply #9 on: January 03, 2019, 10:03:12 pm »
Update: the walls can also generate light for a tile in OXCE now... same as floor and object
Nice!
Thank you.