Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Light  (Read 766 times)

Jazz Cat

  • Bay Watcher
  • Adept stringed instrumentalist
    • View Profile
Light
« on: September 10, 2017, 03:22:33 am »

Is there a way to set the "Light" attribute of a tile? I'm thinking about making lamps.
Logged
Give your dwarves a pet
My holiday mod (only offensive to elves)
The check-laundry script

Quote
Just give the Crossbow weapon the [AMMO:CROSSBOW] tag in the raws. You can make a crossbow that shoots crossbows.

Nolimit

  • Bay Watcher
    • View Profile
Re: Light
« Reply #1 on: September 11, 2017, 01:08:35 am »

You can do this with a script, not sure if it's possible by creating building or something. For lua you can alter map tile block (which you can get with tileblock=dfhack.maps.getTileBlock(pos)). Tile block is 16 by 16 square of tiles and tileblock.designation contains information about light, outside and subterranean parameters for all tiles in the block.


edit: just remembered that you can get designation flags with dfhhack.maps.getTileFlags(pos).
« Last Edit: September 11, 2017, 01:13:10 am by Nolimit »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Light
« Reply #2 on: September 11, 2017, 03:12:54 pm »

To clarify, there is no way to arbitrarily set the "Light" attribute of a tile via modding - you must use a utility (3rd-party application) in order to modify the game's memory.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Jazz Cat

  • Bay Watcher
  • Adept stringed instrumentalist
    • View Profile
Re: Light
« Reply #3 on: September 12, 2017, 02:57:25 am »

Hmm. That's discouraging, but thanks!
Logged
Give your dwarves a pet
My holiday mod (only offensive to elves)
The check-laundry script

Quote
Just give the Crossbow weapon the [AMMO:CROSSBOW] tag in the raws. You can make a crossbow that shoots crossbows.