Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 316 317 [318] 319 320 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 984524 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4755 on: October 17, 2013, 12:32:13 am »

createitem WEAPON:ITEM_WEAPON_AXE_BATTLE INORGANIC:STEEL

LittleQuick

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4756 on: October 17, 2013, 12:44:18 am »

OHHHH, wait I was doing it right, I just wasn't selecting the unit correctly. Thank you so much. -facepalm-
Logged

Kyphis

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4757 on: October 18, 2013, 04:22:10 pm »

I'm working on trying to get a reliable way to create living plants going, and have created a thread here. Its based around the Tiletypes and lua plugins.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4758 on: October 18, 2013, 05:21:45 pm »

well I haven't dabble in eventful or item syndromes but I think it's possible to make a creature that infects someone and latch on it's infected host. So you could add more fun in special ways.

In the next version, syndromeTrigger will allow at least part of this. It triggers dfhack commands whenever someone becomes infected with a syndrome for any reason. Hook that up just right and you can probably do some cool stuff.

Quote
probably do some cool stuff

This is the biggest understatement I have ever seen.

Any Fun ideas?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4759 on: October 18, 2013, 07:33:57 pm »

Nearly every script I've made has something to gain from that, it makes me capable of having creatures control the weather, it gives me the ability to have my shapechange script actually shapechange the creature that uses it, allow instant_transmission to be done with an interaction rather than a hotkey, give the DF AI the ability to use scripts as attack or fleeing actions...

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4760 on: October 18, 2013, 07:58:25 pm »

Is there a way to set recurring commands? 

I've got a larger and older fort than usual, and I find myself using cleanowned, clean and so on regularly - setting them to repeat every x thousand frames would be awesome, not having to keep glancing at fps to see if it's dumping time again. 

It could also be (ab)used to, for example, cause constant invasions via force siege and turn the game into tower defense (autodump-destroy to keep fps up); simulate hyper-fertile soil with regrass and grow; seasonal bushfires with immolate (Australia is currently having it's earliest ever start to the fire season, and I'm in a biome with kangaroos at the moment); slayrace cats; there are so many interesting things I could try just by repeating existing scripts. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4761 on: October 18, 2013, 11:01:54 pm »

For lua scripts, yeah:

Code: [Select]

repeatingScripts=repeatingScripts or {}

args={...}
function repeatScript()
    local script = function()
        local t
        for i=4,#args do
            table.insert(t,args[i])
        end
        return t
    end
    script=script()
    dfhack.run_script(table.unpack(script))
    repeatingScripts[args[4]]=dfhack.timeout(tonumber(args[2]),args[3],repeatscript)
end
if args[1]~="disable" then repeatScript() else dfhack.timeout_active(timeout[args[2]],nil) end

If you call this, say, "repeat.lua" then this is the syntax:

Code: [Select]
repeat enable 1 months force siege EVIL

It should save that until you type, say:

Code: [Select]
repeat disable force

at which point the repeat will disable.

(Note: untested!)

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4762 on: October 19, 2013, 01:02:09 am »

Unfortunately...



I got essentially the same error whatever I did... after three attempts to get rid of the typos in
         repeat enable 1 days multicmd cleanowned scattered x ; clean all ; autodump destroy
It could have been beautiful, even a keybinding! [/s]
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4763 on: October 19, 2013, 01:16:46 am »

... change "local t" to "local t = {}" >_>

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4764 on: October 19, 2013, 04:46:23 am »

Getting a similar problem with the same input.  "bad argument #3 to 'timeout' (function expected, got nil)".  If I'm reading it right, it's something to do with "repeatscript()"?

Spoiler: Current code (click to show/hide)

Also:  how do you have a different profile pic every time I refresh?  It's been teasing me ever since I noticed...
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4765 on: October 19, 2013, 09:19:59 am »

Getting a similar problem with the same input.  "bad argument #3 to 'timeout' (function expected, got nil)".  If I'm reading it right, it's something to do with "repeatscript()"?

Change "args = {...}" to "local args = {...}", "function repeatScript()" to "local function repeatScript()", "repeatscript" to "repeatScript", and "timeout[args[2]]" to "repeatingScripts[args[2]]".
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #4766 on: October 19, 2013, 10:32:16 am »

well I haven't dabble in eventful or item syndromes but I think it's possible to make a creature that infects someone and latch on it's infected host. So you could add more fun in special ways.

In the next version, syndromeTrigger will allow at least part of this. It triggers dfhack commands whenever someone becomes infected with a syndrome for any reason. Hook that up just right and you can probably do some cool stuff.

Quote
probably do some cool stuff

This is the biggest understatement I have ever seen.

Any Fun ideas?
Yes, Sir ;)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4767 on: October 19, 2013, 05:28:06 pm »

Now works perfectly, at least for 'force'.  I got a siege with 340 invaders, which dropped fps 80%...
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

mc876898

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4768 on: October 20, 2013, 01:25:18 am »

Is there a way to sort your inventory items in adventure mode?

The sort-items function isn't working.
Logged

Mohreb el Yasim

  • Bay Watcher
  • ♫♪♫♫♪♫♪♪♫♪
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4769 on: October 22, 2013, 05:19:41 pm »

Could it be editable how random creatures are generated during worldgen? (or to modifie them after worldgen?)
(if there are easiely accesible data on those parts for DFHack)
Logged
Mohreb el Yasim
Make your Dungeon! - Evil neighbors

GENERATION 24:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime
Pages: 1 ... 316 317 [318] 319 320 ... 373