Torches (Dim)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Torches (Dim)

Post by King Semos »

Anyone know how to spawn torches that are dim. I don't want there to be too much light, so I was wondering if it is possible to create new torches that are almost extinguished?
Decayer
Posts: 65
Joined: Sat Oct 13, 2012 3:19 pm

Re: Torches (Dim)

Post by Decayer »

local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
User avatar
war_dog
Posts: 30
Joined: Thu Apr 12, 2012 3:32 pm

Re: Torches (Dim)

Post by war_dog »

can this be done with torches in the torch holder aswell?
User avatar
Komag
Posts: 3656
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Torches (Dim)

Post by Komag »

I haven't heard of a way to have dim torchlight, but maybe a custom object could do it, not sure. You could certainly place dim lighting in the area that is not torches, just low colored fx lights
Finished Dungeons - complete mods to play
Decayer
Posts: 65
Joined: Sat Oct 13, 2012 3:19 pm

Re: Torches (Dim)

Post by Decayer »

war_dog wrote:can this be done with torches in the torch holder aswell?
If it's an empty torch holder, try:

local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
myholder:addItem(mytorch)

if it isn't empty then things get complicated and I don't have an answer right now...
Lollgramoth
Posts: 35
Joined: Fri Jun 15, 2012 7:31 am
Location: Germany

Re: Torches (Dim)

Post by Lollgramoth »

The definition of how the torchlight is shown is found in the standart asset packet in the subfolder assets/particles/torch.lua ... maybe overwrite it?

Good luck :)
User avatar
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Re: Torches (Dim)

Post by King Semos »

Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Where am I supposed to put this?

Is this lua scripting in the editor, or in the dungeon files?
Decayer
Posts: 65
Joined: Sat Oct 13, 2012 3:19 pm

Re: Torches (Dim)

Post by Decayer »

King Semos wrote:
Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Where am I supposed to put this?

Is this lua scripting in the editor, or in the dungeon files?
It's Lua, however you could also do this:

Code: Select all

cloneObject{
name = "torch_dim",
baseObject = "torch",
fuel = 30,
}
to create a torch that only lasts for 30 seconds. Copy + paste that into items.lua and reload the project and you should see torch_dim in the list of items.

Edit: I might be misunderstanding you; this torch only has a shorter duration, it isn't actually dimmer.
User avatar
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Re: Torches (Dim)

Post by King Semos »

Decayer wrote:
King Semos wrote:
Decayer wrote:local mytorch = spawn("torch", l, x, y, f)
mytorch:setFuel(30)
Where am I supposed to put this?

Is this lua scripting in the editor, or in the dungeon files?
It's Lua, however you could also do this:

Code: Select all

cloneObject{
name = "torch_dim",
baseObject = "torch",
fuel = 30,
}
to create a torch that only lasts for 30 seconds. Copy + paste that into items.lua and reload the project and you should see torch_dim in the list of items.

Edit: I might be misunderstanding you; this torch only has a shorter duration, it isn't actually dimmer.
Thanks.

The torch itself is bright yea, it dims about 5 seconds before it extinguishes. I guess the given fuel level doesn't determine if its bright or dim, probably only when it reaches a % of its base fuel level.

Though this is still useful, I think I could use some short duration torches.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Torches (Dim)

Post by Batty »

Standard torch starts @ 1100 seconds.

First dim is ~308 seconds.

Second dim is ~28 seconds.

May be missing a step but I did a fairly thorough testing.

edit: the way to have the torch start as dim is to do what Decayer posted and use setFuel() in a script entity (in editor). If you create a torch low fuel object in the lua file, it works on a % basis as you found out.
Post Reply