[Request] Floodlights

Started by Damien Hart, May 23, 2014, 10:46:58 AM

Previous topic - Next topic

Damien Hart

Would it be possible to create lights that only project their light forward? Specifically for defenses, to light up attackers at night without building lights out in the battle field, though they'd work in outdoor colonies aesthetically too.

Ideally with multiple types, ranging from one that lights a smallish semi-circle in front of it - eg. same size as a normal standing lamp, but only in a semi-circle instead of a full circle - to one that projects a sharp cone of light around 25 blocks away, but requires more power.

UrbanBourbon

I fear that requires an intervention from Tynan first, and he'd have to create sectored/angled light sources first. BUT. Walls block light so I was thinking what if one created an invisible (textureless) block that would block light, and with a proper placement of those blocks, it MIGHT be possible to assert limited control to the illumination.

Invi-Blokâ,,¢ properties:
- Stops light
- Provides zero cover
- Is passable (doesn't even slow down movement)
- Extremely high hitpoints or invulnerable
- Alternatively, very low hitpoints, simulating fragility

Possible downsides:
- Gets damaged, needs repair, possibly needs frequent replacement
- AI might still try to use them as cover, even if it provides zero cover
- AI might attempt to melee attack these blocks on purpose, similar to stone blocks

Crimsonknight3

I might try this tomorrow evening if I get the time.. Would be a 3x3 structure with a u shape of invisible textures, the light itself can come from any light a person chooses. The texture would still need a slight visual element. Also it might be hard to prevent the shadows looking weird.....

Damien Hart

If that doesn't work, would it be possible to offset the light from the actual source? It would achieve the major effect, though it wouldn't be nearly as aesthetically pleasing.

Crimsonknight3

Quote from: Damien Hart on May 24, 2014, 01:02:20 AM
If that doesn't work, would it be possible to offset the light from the actual source? It would achieve the major effect, though it wouldn't be nearly as aesthetically pleasing.

I dont know about off-setting the light, pretty sure you can't though... I don't know I am nowhere near proficient enough to tell you, but my idea for a flood light may work but I am not sure how to do it... The problem is, the light would need to be inside a 3x3 square... Think of a 3x3 grid with a light in the centre and u shaped walls, but I don't thing it's possible to make it all one item, it would just emit the light in all directions around the 3x3 item, but to make it work it would need to be 2 items but even then I don't know how to make a hollow item so the only alternative I can think of is to make a flood-light looking 1x1 item, then I can make a fence that appears similar to real life fences you see around electricity pylons and just make it so that they block light. Then it would be purely up to you to make sure the light is pointing in the right direction for aesthetics.

I'll go make a quick edit to another mods "fence" and just make a screen shot to show you what I mean :)

Crimsonknight3

Well I tried and even telling the fence to block light which causes weird shadows, the light is still generated in a sphere


mrofa

You would need to make another glow.grid in dll , so start learning c# :D
All i do is clutter all around.

Crimsonknight3

Quote from: mrofa on May 24, 2014, 05:20:02 PM
You would need to make another glow.grid in dll , so start learning c# :D

I'm looking at the glow.grid code and my brain just isn't working.... Been a tiring day... Will try looking again tomorrow... Am I looking at the right code btw?

public GlowGrid()
{
this.glowGrid = new Color32[Find.Map.Size.x, Find.Map.Size.y, Find.Map.Size.z];
}

UrbanBourbon

Huh? RimWorld light is 3D? It creates a 3D sphere instead of a circle? Well, then. Add invisible light-blocking roof.

Celthric Aysen

when somehow makes this possible, and some how you decide to share your source code..
i might work on a flash light and maybe even Tactical M4's with a Flash light attachment. :)
[of course il give credit]
My DeviantART|E-Vehicles|Flebe's  Channel
"♫"Every people that i see i will never understand"♪"