Log in

View Full Version : Lighting Extension creation quesion



kevininrussia
March 15th, 2021, 01:01
If one was to make a new light source like "Sunrod", the code would be found in "gameelements.xml and Manager_vision.lua correct?

Something like

gameelements.xml

<lightingsettings>
<preset key="sunrod" nameres="lighting_sunrod" color="FFF9FEFF" bright="9" dim="12" />

scripts/manager_vision.lua

local _tVisionFields = { "senses" };
function onInit()
VisionManager.addLightingType(Interface.getString("lighting_sunrod"), "sunrod");
end

Moon Wizard
March 16th, 2021, 00:59
Yeah, that would basically do it.

Some comments:

* You would not edit the VisionManager script directly; but add the VisionManager.addLightingType to the custom effect in your extension.
* If you override a preset in the lightingsettings, you have to redefine them all.

Regards,
JPG