Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tejón

Pages: [1] 2
1
Utilities and 3rd Party Applications / Re: DFHack 0.40.15-r1
« on: November 09, 2014, 01:41:51 pm »
we plebeians who don't know our ass from a compiler thank you and the entire DFHack team.
As do we lazy bastards who've never bothered to set up a proper development environment since last installing Windows. :D

3
Jump down hole with your sword out! He was obviously taken by underground kobold tunnelers and needs your help!
+1

And be sure to jump in head first. You need to see where you're going.

4
Don't apologize for the tree's injury, as you didn't cause it.  However,

Express concern and sympathy for the tree.  Thank the elves for their assistance.  Tell them you are headed to Shielddawn, and they are welcome to visit you.

+also

Quote
Then take the hammer, because it is the symbol of leadership in this migrant band.

...and hand it to Kulet, because spiritual guidance is better than nothing. Keeping it doesn't even cross your mind; leadership would eat into valuable cheese time, plus your dad was a leader, so yuck.

5
When you're done here, I think Bill Gates needs a lecture on OS design.

6
Pardon me as I suck on my toes, then. :)

7
If my earlier thoughts about rebooting individual systems were correct, then all necromancers would just enchant suits of armor instead
Necromancy is learned by reading a slab engraved by a supernatural being which details the secrets of life and death. I don't know about you, but I haven't noticed any books detailing the secrets of granting motility to objects which never had it in the first place, nor in fact have I seen any magically mobile objects in the game that weren't previously animate in their own right. If you want to keep slinging around the word "logical," demonstrate how this scenario is any less so given the available data: life, like anvils, exists only by the will of Armok; and, much as one cannot create an anvil without an anvil, artificial animation can only be given to something that was already alive.

8
You know that mammary glands are part of the reproductive system, right? The one bit you acknowledged to be superfluous to the undead? ;)

9
Ask if undead cows give milk. If not, conclude necromancers are icky.

Then:
Ask the farmer if he knows anything about plump helmet men. Because there is one following you all the time, and you dont know if its harmless or not.

10
{color=#00ffff} Cyan is going to be the best highlight color. Green blends too well with the gray, and yellow is the link color.

11
"Are you there, gods? It's me, Mistęm."

12
Ahh, that makes sense then. I actually wanted the emails because I'm not in this forum often, and would forget to check on my own. :P

13
Why do people "post to watch" instead of just hitting the Notify button?

...posting to whine. :)

14
Not the answer you're looking for, but turkeys. For six embark points you get one leather (i.e. bag, though a quiver or two and armor/boots for the militia aren't bad either), a small stack of bones (bolts, and also the other three armor pieces), and a full round of meals for your initial crew.

I like to bring about two dozen, and a pair of nest boxes which I set up immediately (20+ more meals). Then I slaughter all but the two biggest/toughest of each gender (you only "need" one of each, but accidents happen) and let their eggs hatch.

15
So hopefully this isn't completely and utterly wrong. I'm a lua noob and also spoiled on compiler errors.

feeding-timers.lua
Code: [Select]
-- feeding-timers :
--   Immediately fixes feeding timers for prisoners, patients and infants.
-- feeding-timers enable :
--   Repeats the fix once per month (but not immediately).
-- feeding-timers enable # :
--   Repeats the fix once per # months, minimum 1 (but not immediately).
-- feeding-timers disable :
--   Ceases automatic fixes.

local callback_id = nil
local frequency = 0

local function feeding_timer_fix()
    local fixcount = 0
    for _,unit in ipairs(df.global.world.units.active) do
        if dfhack.units.isCitizen(unit) then
            for _,v in pairs(unit.status.misc_traits) do
                local didfix = 0
                if v.id == 0 then -- I think this should have additional conditions...
                    v.value = 0 -- GiveWater cooldown set to zero
                    didfix = 1
                end
                if v.id == 1 then -- I think this should have additional conditions...
                    v.value = 0 -- GiveFood cooldown set to zero
                    didfix = 1
                end
                fixcount = fixcount + didfix
            end
        end
    end
    print("Fixed feeding timers for " .. fixcount .. " citizens.")
    if frequency > 0 then
        callback_id = dfhack.timeout(frequency, 'months', feeding_timer_fix)
    end
end

local args = {...}

if args[1] == 'disable' then
    if callback_id ~= nil then -- Is this required or will timeout_active fail gracefully?
        timeout_active(callback_id, nil) -- Does this return nil?
    end
    callback_id = nil
    frequency = 0
else if args[1] == 'enable' then
    if tonumber(args[2]) then
        frequency = args[2]
        if frequency < 2 then
            frequency = 1
        end
    else
        frequency = 1 -- What's the normal, non-broken food/water interval?
    end
    if callback_id ~= nil then
        timeout_active(callback_id, nil)
    end
    callback_id = dfhack.timeout(frequency, 'months', feeding_timer_fix)
    print('Feeding timers will be fixed at each ' .. frequency .. ' month interval.')
else
    feeding_timer_fix()
end

Pages: [1] 2