Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 206 207 [208] 209 210 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1123161 times)

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3105 on: September 13, 2015, 10:45:46 am »

How can I reliably tell whether a player should be seeing the embark map, the world map, or neither?

Simply checking the existence of the data gives false positives while saving and loading.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3106 on: September 13, 2015, 11:01:20 am »

Wouldn't df.global.gview have something you can count on?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3107 on: September 13, 2015, 12:43:11 pm »

so on the poking around with armies anyone figure out what causes armies to poop tents? maybe it's possible to toggle that on so when ever you step out of fast travel you start in one?
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Jazzeraint

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3108 on: September 13, 2015, 01:43:06 pm »

printall(df.global.world.items.other)

Thank you

Or just

Code: [Select]
:lua printall(df.global.world.items.other)

directly from the console.

Thank you

You can also use "~df.global.world.items.other" as a shortcut in the lua interpreter.
Another thing - if you want a list of all types and their numerical equivalents, use "@df.items_other_id" or "printall_ipairs(df.items_other_id)". You can use either the numbers or names as indices into world.items.other, and convert between them by indexing df.items_other_id (e.g. "df.items_other_id[1]" is "ANY_ARTIFACT" and "df.items_other_id.ANY_ARTIFACT" is 1).

And thank you!
Logged
The silver is responsible for this How?

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3109 on: September 13, 2015, 01:51:29 pm »

How can I reliably tell whether a player should be seeing the embark map, the world map, or neither?

Simply checking the existence of the data gives false positives while saving and loading.
Check ui state i guess.
I only had problem with word maps zoom level, never found out when it's zoomed in (when you are near towns) when i wanted to do a map overlay.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3110 on: September 14, 2015, 12:35:19 am »

so ui_advmode.anon_49 is the timer for wait sleep so the player could set it to go beyond that and wait out world generation in game.
though I would avoid this as you might starve your character unless they don't need to sleep or eat.
also avoid clicking in the screen or the game would correct any change you have made.

looks like this doesn't really effects the game more so alters the ui.
« Last Edit: September 14, 2015, 01:11:01 am by Rumrusher »
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3111 on: September 14, 2015, 04:11:10 am »

That is interesting but it doesn't work as far I've been able to see.
Logged

qorthos

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3112 on: September 14, 2015, 09:02:28 pm »

Has anyone created a script/method to spawn magma from a reaction ala the Magma Shrine from v0.34 Masterwork?

I totally want to steal that.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3113 on: September 14, 2015, 09:07:18 pm »

I seem to remember there's a way of doing it even without DFHack but I don't remember how.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3114 on: September 15, 2015, 12:25:07 am »

I seem to remember there's a way of doing it even without DFHack but I don't remember how.
Pretty sure there is a way to add "magma" item but not "magma" square.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3115 on: September 15, 2015, 12:40:55 am »

Yeah, similarly if you deconstruct a rock block wall with advfort it turns into a magma.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3116 on: September 15, 2015, 01:17:18 am »

Has anyone created a script/method to spawn magma from a reaction ala the Magma Shrine from v0.34 Masterwork?

I have not tested this at all, but this should work with a small amount of fiddling:

Code: [Select]
--in dfhack.init
modtools/reaction-trigger -reactionName nameOfReactionThatMakesMagmaGoesHere -command [ liquidMaker -location [ \\LOCATION ] -type Magma -amount 7 -offset [ 0 0 \-1 ] ]

Code: [Select]
--in hack/scripts/liquidMaker.lua

utils = require 'utils'
validArgs = validArgs or utils.invert({
  'help',
  'location',
  'type',
  'amount',
  'offset'
})

local args = utils.processArgs({...}, validArgs)

if args.help then
  print([[scripts/makeLiquids.lua
    -help
        print this help message
    -location [ x y z ]
        specify the target location coordinates
    -offset [ x y z ]
        add this vector to location in order to get the real target location
        this argument is optional
    -amount n
        specify the desired depth of the liquid
    -liquidType liquidType
        specify whether you want magma or water
        liquidType should be Water or Magma
]])
  return
end

local pos = {}
pos.x = tonumber(args.location[1])
pos.y = tonumber(args.location[2])
pos.z = tonumber(args.location[3])

if args.offset then
  pos.x = pos.x + tonumber(args.offset[1])
  pos.y = pos.y + tonumber(args.offset[2])
  pos.z = pos.z + tonumber(args.offset[3])
end

local tileBlock = dfhack.maps.ensureTileBlock(pos.x, pos.y, pos.z)
tileBlock.flags.update_temperature = true
tileBlock.flags.update_liquid = true
local xOffset = pos.x - 16*floor(pos.x / 16)
local yOffset = pos.y - 16*floor(pos.y / 16)

tileBlock.designation[xOffset][yOffset].flow_size = tonumber(args.amount)
tileBlock.designation[xOffset][yOffset].liquid_type = df.tile_liquid[args.liquidType]

Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3117 on: September 15, 2015, 02:00:37 am »

IIRC 1000 magma (any liquid rock I think or maybe just obsidian and any similar modded rocks) in a minecart makes a magma tile

or some arbitrary amount like that

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3118 on: September 15, 2015, 02:14:08 am »

Hmmm, when you fill a minecart in adventurer mode up it holds like 833 of a liquid and it usually takes a couple full carts to get a 7/7 tile as I recall.
Logged

qorthos

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #3119 on: September 15, 2015, 08:27:23 am »

Has anyone created a script/method to spawn magma from a reaction ala the Magma Shrine from v0.34 Masterwork?

I have not tested this at all, but this should work with a small amount of fiddling:

Code: [Select]
--in dfhack.init
modtools/reaction-trigger -reactionName nameOfReactionThatMakesMagmaGoesHere -command [ liquidMaker -location [ \\LOCATION ] -type Magma -amount 7 -offset [ 0 0 \-1 ] ]

Code: [Select]
--in hack/scripts/liquidMaker.lua

utils = require 'utils'
validArgs = validArgs or utils.invert({
  'help',
  'location',
  'type',
  'amount',
  'offset'
})

local args = utils.processArgs({...}, validArgs)

if args.help then
  print([[scripts/makeLiquids.lua
    -help
        print this help message
    -location [ x y z ]
        specify the target location coordinates
    -offset [ x y z ]
        add this vector to location in order to get the real target location
        this argument is optional
    -amount n
        specify the desired depth of the liquid
    -liquidType liquidType
        specify whether you want magma or water
        liquidType should be Water or Magma
]])
  return
end

local pos = {}
pos.x = tonumber(args.location[1])
pos.y = tonumber(args.location[2])
pos.z = tonumber(args.location[3])

if args.offset then
  pos.x = pos.x + tonumber(args.offset[1])
  pos.y = pos.y + tonumber(args.offset[2])
  pos.z = pos.z + tonumber(args.offset[3])
end

local tileBlock = dfhack.maps.ensureTileBlock(pos.x, pos.y, pos.z)
tileBlock.flags.update_temperature = true
tileBlock.flags.update_liquid = true
local xOffset = pos.x - 16*floor(pos.x / 16)
local yOffset = pos.y - 16*floor(pos.y / 16)

tileBlock.designation[xOffset][yOffset].flow_size = tonumber(args.amount)
tileBlock.designation[xOffset][yOffset].liquid_type = df.tile_liquid[args.liquidType]


Gonna test this out tonight.  Thanks expwnent  :D
Logged
Pages: 1 ... 206 207 [208] 209 210 ... 360