Fandom

Surfpup's tConfig Mod Wiki

Light attribute (tConfig Tile class)

124pages on
this wiki
Add New Page
Comment1 Share

Note: this does not apply to the Light attribute of Projectiles.

The Light attribute was added to the tConfig Tile class in version 0.27.1. Its purpose is to specify the amount and color of light emitted by a custom tile in the .ini file of that tile.The format of the attribute is

light=float,float,float
lighted=True

The values of the attribute are interpreted as float values representing the RGB values of the color of the light emitted; integer values may be specified but may have unintended results (see Examples below). They are intended to be in the range 0.0 to 1.0, with light=1.0,1.0,1.0 representing white light that approximates the amount of light emitted by a Torch from vanilla Terraria. light=0.0,0.0,0.0 is effectively no light at all. Values greater than 1.0 make the area of illumination bigger (brighter), values less than 1.0 make the area of illumination smaller (dimmer).

To convert RGB values from 0-255 format, simply divide each value by 255 and use the (rounded float) result. Example:

255,75,175 -> 1.0,0.29,0.69

The lighted=True is required to for the tile to actually emit light; without it, or set to False, the tile will not be lighted. The same is true if the lighted attribute is specified but the light attribute is not. (When an .ini file for a vanilla Terraria tile contains lighted=True, it means the tile emits light as specified within the vanilla game code.)


ExamplesEdit

The slideshow below demonstrates various effects of the light attribute. The torch to the left is for comparison.
  • light=1.0,1.0,1.0
  • light=1.0,0.6,0.6
  • light=6,10,6
  • light=255,75,175 (!)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.