Back to NxLabs

NxLabs / Vintage Story

lantern

OBy OmegaHaxors

long-range lighting

lantern

Description

Extends the range of all player-held lights with the "lightdistance" attribute with little invisible light entities.
Now with mod support, configurable distance, and colored lights support.

FAQ

Hey, isn't that the "Mario is Missing" box art?
I have no idea what you're talking about.

Are you kidding?? But that's clearly Luigi...
You must be mistaken. That's Mr. Lantern.

Why is Mr. Lantern frowning?
Because he didn't install the lantern mod.

So now that mod support is a thing, how do I make my light block compatible?
Just give it the "lightdistance: 21" attribute with the value representing how far (in blocks) you want the light beam to reach.
Here's how it works internally: First it creates an orb 9 blocks away. It will then create a new light orb every 4 blocks until it reaches or surpasses the defined distance.

Do I need to be a coder or can JSON modders/patchers use this system too?
You can add the value to the "attributes" or "attributesbytype" section of your JSON.
<span style="background-color: #bdc3c7;">attributes: {lightdistance: 21}</span> Simple as.

Do I have to worry about setting the light level and color?
Nope not at all. It uses the HSV already defined in JSON.

You think Mr. Lantern is going to download the mod now?
Probably not. He's too busy looking for his lost brother.

Is there a max limit to how far lantern light can go?
There isn't any, but any past 80 becomes meaningless since entities (and their light) stop rendering that far out.

OK so if Mr. Lantern has an L on their cap because their last name is Lantern, why does his brother have an M on their cap?
Erm, so uh, so you know how Mario- actually forget Mario. It's... Lantern... Lantern. Like the super mario movie.

Sure I get that part, but that doesn't actually answer what the M on Mr. Lantern's brother's cap stands for.
You know, I don't actually have an answer for that one. I'll ask him once he finds his brother.

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.