0 of 0

File information

Last updated

Original upload

Created by

MollyMaclachlan

Uploaded by

MollyMaclachlan

Virus scan

Safe to use

Tags for this mod

Documentation

Readme

View as plain text

FEATURES

This mod adds "lightable" objects; these are light-producing objects that are unlit to start with and can be lit by clicking on them with a torch. Lightables work using a script component and a clickable component, with the latter triggering a light() function in the former. You can use the onLight() function triggered by the object being lit in order to define additional effects.

Currently, there are seven lightables, based on the following five existing objects:
- dungeon_pillar_lantern_01 (created versions with pillar placement and wall placement)
- dungeon_wall_lantern
- forest_lantern
- mine_support_pillar_lantern_01 (created versions with pillar placement and wall placement)
- tomb_wall_lantern

You can define additional lightables from other light-bearing objects. Make the baseObject of your new lightable "base_lightable". Otherwise copy the definitions of whatever light-bearing object you are making into a lightable; add "enabled = false," to their Light and Particle components. Add a Clickable component as done in the pre-defined lightables and adjust the vectors to get a reasonable clickbox (this will take some trial and error). You now have your custom lightable.


INSTALLATION

1. Once you have downloaded the .zip archive, extract it into any folder.
2. If you extracted it somewhere else, copy the entire "lightables" folder into the "mod_assets" folder for the dungeon you want to use this mod in.
3. Go into your "mod_assets/scripts" folder and load "init.lua".
4. Add the following line of code to the end of the file:
import "mod_assets/lightables/init.lua"
5. The next time you load your dungeon in the editor, you should see a "lightable" category in the asset browser, listing all the lightable objects.

Note: if you have your dungeon loaded while you add the files, you may need to reload the dungeon for the lightables to appear.