ILights interface
Photo lights: lamps placed in the world, the level at which characters take lamp light, and a key light and rim per person. Everything is local and visual only, and belongs to the scene: the framework removes every lamp and puts every game value back — exactly as it was — on the reasons the scene freeze ends on (a zone change or scene leave, a cutscene, the game’s own camera mode, a disconnect, the framework unloading), raising Released; a plugin’s lights also go when it unloads, and on its own ResetAll. Leaving a free camera keeps them.
Lamps join the game’s own clustered lights: real pools of light on the ground and scene. On characters a lamp is an even colour wash scaled by distance, range and colour — not a directional shade — and only while PeopleLevel is above 0. For one-sided shading use a person’s KeyLight.
PeopleLevel is shared by the whole scene: while it is raised every character near ANY lamp — the town’s own street lamps included — is tinted. Each plugin’s level counts only while that SAME plugin has at least one lamp on: the framework raises the game’s value to the highest level among plugins that have a lamp on (another plugin’s level never lights people through your lamps), and puts the game’s own value back the moment no plugin with a level above 0 has a lamp on — unless the game itself has written that value since (a cutscene, its own weather), in which case the game’s value is left as the game set it.
People are addressed by entity id, as IPosing does: a person posed as a copy or an NPC stand-in is lit on that visible model. A person who leaves loses their key light and rim. Main thread only.
public interface ILightsMembers
Section titled “Members”| name | description |
|---|---|
| IsAvailable { get; } | True while the player is in the world and the scene has settled (the same window as IsAvailable). Outside it every call is refused. |
| PeopleLevel { get; set; } | How strongly lamps tint characters, 0–MaxPeopleLevel (clamped); 0 (the default) leaves characters to the game’s own value. Applies only while one of THIS plugin’s lamps is on — see the class remarks: it is shared and tints every character near any lamp. |
| event Released | Raised (main thread) after the framework itself ended the lights (a scene end — see the class remarks): every lamp id is gone and every person is back to normal. Not raised for ResetAll. |
| AddLamp(…) | Adds a lamp. Returns None when lights are not available, when this plugin already has MaxLampsPerPlugin lamps, or when the game refused it (logged). |
| RemoveLamp(…) | Removes a lamp of this plugin. Nothing happens for a lamp that is already gone. |
| ResetAll() | Removes every lamp of this plugin and puts every person it lit back to normal, now. |
| SetPersonLight(…) | Sets person’s key light and rim (None puts their look back exactly). False when lights are not available, the person is gone or has no model, or another plugin lights that person. |
| UpdateLamp(…) | Changes a lamp of this plugin (move, recolour, on/off). False when the lamp is gone (removed, or the scene ended) or lights are not available. |
See Also
Section titled “See Also”- namespace Stellar.Abstractions.Services