1. Living stone and hidden gems are no longer specific tiles that you could in principle locate and avoid. Now every time you mine out or carve into a tile of layer stone, there is a random chance of a Hidden Gem or an Awakened Stone. This means they no longer crowd out other minerals.
May I ask how you did that?
The
tesb-mining.lua script uses an
eventful callback every time a job is completed, and if it's one of several digging jobs then the scripts checks if it was a layer stone. If it was, it rolls dice on spawning a creature. Failing that roll, it rolls dice on spawning a rough "hidden gem".
The main loop is here, though it does refer to helper functions.
miningCheck = require('plugins.eventful')
miningCheck.onJobCompleted.one=function(job)
if job.job_type >= 3 and job.job_type <= 7 then
local pos = job.pos
if caste_list[GetLayerMat(pos)] and (not GetVeinMat(pos)) and (not dfhack.maps.getTileBlock(pos).occupancy[pos.x%16][pos.y%16].item) then
if rng:drandom()<living_prob then
local command = "tesb-wake -caste " .. caste_list[GetLayerMat(pos)] .. " -location "
command = command .. "[ " .. pos.x .. " " .. pos.y .. " " .. pos.z .. " ]"
command = command .. " -miner " .. job.general_refs[0].unit_id
dfhack.run_command(command)
elseif rng:drandom()<gem_prob then
local gem = hiddenGem_list[GetLayerMat(pos)]
local gem_name = dfhack.matinfo.find(gem).material.state_name.Solid
dfhack.gui.showAnnouncement("You have struck " .. gem_name .. "!",15)
local command = "modtools/create-item -creator " .. job.general_refs[0].unit_id
command = command .. " -material \"INORGANIC:" .. gem .. "\""
command = command .. " -item ROUGH:NONE"
dfhack.run_command(command)
end
end
end
end
The parameters for that script are set in
onload.init. I haven't had any problems running it directly from the console to override the defaults for testing purposes.