OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: robin on December 22, 2018, 11:31:24 am

Title: [DONE][Suggestion] Let walls emit light too
Post by: robin 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?

Title: Re: Let walls emit light
Post by: The Reaver of Darkness 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.
Title: Re: Let walls emit light
Post by: robin 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.
Title: Re: Let walls emit light [let's not do it]
Post by: Yankes 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.
Title: Re: Let walls emit light [let's not do it]
Post by: robin 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.
Title: Re: Let walls emit light [...]
Post by: Yankes 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.
Title: Re: Let walls emit light [...]
Post by: Solarius Scorch on December 22, 2018, 11:48:32 pm
I like it, but... what about lamps on the other side? :)
Title: Re: Let walls emit light [...]
Post by: robin 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?
Title: Re: Let walls emit light [...]
Post by: Meridian 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
Title: Re: Let walls emit light [...]
Post by: robin 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.