Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 106 107 [108] 109 110 ... 361

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

than402

  • Bay Watcher
  • DF2014:we all knew it was inevitable
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1605 on: December 06, 2014, 04:31:03 pm »

ok, thanks
Logged

Dirst

  • Bay Watcher
  • On hiatus
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1606 on: December 06, 2014, 05:01:31 pm »

You still want some kind of reaction product, otherwise the reaction takes no time and generates no experience. A boil-away stone would work.

For the script, I hacked Warmist's old spawning script entangled with some mod-specific logic and got it to run under 40.08-40.16 (not yet tested under 40.19), but an official spawning script would be incredibly helpful.  Chasing down all the changes was a useful exercise to learn about the memory structures, but an official spawning script would be incredibly helpful.

Edit: I wouldn't mind taking a crack at a first draft of such a thing, but it'd probably be faster for one of the scripting gods to build it from scratch.
« Last Edit: December 06, 2014, 05:03:29 pm by Dirst »
Logged
On hiatus. Feel free to adopt or update:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

than402

  • Bay Watcher
  • DF2014:we all knew it was inevitable
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1607 on: December 06, 2014, 05:14:08 pm »

well the spawn script seems to work in the arena in 40.19. and i found some sample reactions in the elder scrolls mod, but i still can't get them to work :(
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1608 on: December 06, 2014, 07:35:06 pm »

Rats, took a nap and dreamed I fixed it.
Logged

MAurelius

  • Bay Watcher
  • Philosopher King
    • View Profile
    • Marcus Aurelius Let's Play
Re: DFHack 0.40.19-r1
« Reply #1609 on: December 06, 2014, 09:23:51 pm »

I'm probably doing something wrong but when I type in "remove-stress all" I get the following error:
 
Oh, it won't let me copy and past. Damn. Well, here's my attempt at transcribing:

error parsing arg 1: all
stack traceback:
[C]: in function 'error'
(filepath) utils.lua:607: in function 'processArgs'
(filepath) remove-stress.lua:13: in main chunk
<...tail calls...>

When I try just remove-stress it tells me to click a dwarf. I would prefer to not do that 200 times. :)

Thanks!
Logged

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1610 on: December 06, 2014, 09:25:52 pm »

Is elevate-physical gone in the new version?
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1611 on: December 06, 2014, 09:27:30 pm »

Heh, probably should have posted this earlier.
Code: [Select]
-- Allows ectobiology.

-- where doing it man

-- where MAKING THIS HAPEN

local function getCitizenList(lovers_only)
    local citizenTable={}
    if lovers_only then
        for k,u in ipairs(df.global.world.units.active) do
            if dfhack.units.isCitizen(u) and (u.relations.spouse_id~=-1 or u.relations.lover_id~=-1) then
                table.insert(citizenTable,{dfhack.TranslateName(dfhack.units.getVisibleName(u)),nil,u})
            end
        end
    else
        for k,u in ipairs(df.global.world.units.active) do
            if dfhack.units.isCitizen(u) then
                table.insert(citizenTable,{dfhack.TranslateName(dfhack.units.getVisibleName(u)),nil,u})
            end
        end
    end
    return citizenTable
end

local function getSpouseOrLover(unit)
    local lover_unit=df.unit.find(unit.relations.lover_id) or df.unit.find(unit.relations.spouse_id)
    if lover_unit then
        return lover_unit.hist_figure_id
    else
        local hist_fig=df.historical_figure.find(unit.hist_figure_id)
        for k,v in ipairs(hist_fig.histfig_links) do
            if df.histfig_hf_link_spousest:is_instance(v) or df.histfig_hf_link_loverst:is_instance(v) then
                return v.target_hf
            end
        end
    end
end

local function getFemaleCasteWithSameMaxAge(unit)
    local curCaste=df.creature_raw.find(unit.race).caste[unit.caste]
    for k,caste in ipairs(df.creature_raw.find(unit.race).caste) do
        if caste.gender==0 and caste.misc.maxage_min==curCaste.misc.maxage_min and caste.misc.maxage_max==curCaste.misc.maxage_max then return k end
    end
end

local function ectobiologize(freeform)
    local script=require('gui.script')
    script.start(function()
    local citizens=getCitizenList(not freeform)
    if #citizens==0 then script.showMessage('Ectobiology',"Nobody is in a relationship! Best use freeform ectobiology.",COLOR_WHITE) return end
    if freeform then
        local ok1,name1,unit1_t=script.showListPrompt("Ectobiology","Choose first paradox ghost slime target.",COLOR_WHITE,citizens)
        local ok2,name2,unit2_t=script.showListPrompt("Ectobiology","Choose second paradox ghost slime target.",COLOR_WHITE,citizens)
        local unit1=unit1_t[3]
        local unit2=unit2_t[3]
        unit1.relations.pregnancy_timer=1
        unit1.relations.pregnancy_genes=unit1.appearance.genes:new()
        unit1.relations.pregnancy_spouse=unit2.hist_figure_id
        unit1.relations.pregnancy_caste=unit2.caste
        dfhack.run_script('modtools/add-syndrome','-syndrome','temp desterilize','-target',unit1.id)
        if unit1.sex==1 then
            local normal_caste=unit1.enemy.normal_caste
            unit1.enemy.normal_caste=getFemaleCasteWithSameMaxAge(unit1)
            script.sleep(1,'ticks')
            unit1.enemy.normal_caste=normal_caste
        end
    else
        local ok,name,unit_t=script.showListPrompt("Ectobiology","Choose first genetic material giver.",COLOR_WHITE,citizens)
        local unit=unit_t[3]
        local lover=getSpouseOrLover(unit)
        unit.relations.pregnancy_timer=1
        unit.relations.pregnancy_genes=unit.appearance.genes:new()
        unit.relations.pregnancy_spouse=lover
        unit.relations.pregnancy_caste=df.historical_figure.find(lover).caste
        dfhack.run_script('modtools/add-syndrome','-syndrome','temp desterilize','-target',unit.id)
        if unit.sex==1 then
            local normal_caste=unit.enemy.normal_caste
            unit.enemy.normal_caste=getFemaleCasteWithSameMaxAge(unit)
            script.sleep(1,'ticks')
            unit.enemy.normal_caste=normal_caste
        end
    end
    end)
end
local utils=require('utils')

validArgs = validArgs or utils.invert({
 'freeform'
})

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

ectobiologize(args.freeform)

Run the script and it'll show you a list of every unit with a lover/spouse, regardless of the unit's sex or the lover's. Select a unit and the unit will immediately have a baby with the lover as the "father", again regardless of the unit's sex or the lover's. The game really works well with it, too.

It's called "ectobiology.lua" because I made it for Fortbent, but it would probably do well otherwise named.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1612 on: December 06, 2014, 09:37:28 pm »

Is elevate-physical gone in the new version?
That's never been included in the DFHack repo - it's one of Vjek's scripts.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1613 on: December 06, 2014, 09:39:35 pm »

You still want some kind of reaction product, otherwise the reaction takes no time and generates no experience.

This is not a problem.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1614 on: December 06, 2014, 09:56:17 pm »

Hmmm, is it necessary to use libpng12 when building this with stonesense, or could it be done with a more up to date library?

Code: [Select]
libpng12.so.0: wrong ELF class: ELFCLASS64
Can't load plugin /path/to/df19/hack/plugins/stonesense.plug.so

That's a heck of a thing.
« Last Edit: December 06, 2014, 09:58:18 pm by Max™ »
Logged

SlicedAndDiced

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1615 on: December 07, 2014, 02:18:17 am »

I am having trouble using the "changeitem" function in adventure mode.  I highlight the item using "l" and it even says "here we have a XXXXXX" but when i type  in the Command "changeitem q 5", it says the following "No item is selected"

Am i doing something wrong here?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1616 on: December 07, 2014, 02:22:53 am »

Press the button to actually go into the item's screen, it's only selected if you do that.

SlicedAndDiced

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1617 on: December 07, 2014, 02:31:26 am »

Press the button to actually go into the item's screen, it's only selected if you do that.
so when i have it highlighted and go to the menu where you can see it's weight and etc. Already tried it not working

Ok this time i went to item screen it didn't work, when I put the command "changeitem q 5:" but if you put add "here" in it works.
So like "changeitem here q 5"

thankyou
« Last Edit: December 07, 2014, 02:43:45 am by SlicedAndDiced »
Logged

Dirst

  • Bay Watcher
  • On hiatus
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1618 on: December 07, 2014, 12:42:17 pm »

I'm not sure if this is possible, but I've seen a LOT of people get confused by the stuck-Alt-key issue and complain in the Starter Pack thread.

When DFHack's hotkey infrastructure hears an Alt-up event, can it stuff an Alt-up event into DF's window?  Since Alt itself doesn't do anything, false-positives (Alt-Tabbing in from Dwarf Therapist or a web browser) shouldn't do any harm.
Logged
On hiatus. Feel free to adopt or update:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1619 on: December 07, 2014, 01:51:41 pm »

Are you sure this is caused by DFHack? I know it's noticeable with DFHack keybindings, but could you see if it occurs with vanilla DF?
I don't believe this has anything to do with the SDL version, although you could try upgrading to 1.2.15. It may be a conflict with other utilities, a problem with how DFHack handles keybindings, or a problem with DF itself. Speaking of this, could you (or anyone else on Windows) try to reproduce it without any utilities and post your findings in the report?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.
Pages: 1 ... 106 107 [108] 109 110 ... 361