Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 369 370 [371] 372 373

Author Topic: DFHack 0.34.11 r3  (Read 1013335 times)

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5550 on: June 05, 2014, 12:30:57 pm »

is there a tree array in the df structures I can cycle through?

I'm hoping to type up a script that applies a chance of upgrading saplings to trees.

I'd also like a small chance to spawn saplings at a nearby radius (say a 2 step distance from the source tree, I would have to check if the destination tile is currently on map and a conditional check if it's a soil based tile with no existing tree/sapling).  The second question is a little more difficult, however... if the trees had stored x,y coordinates in the array (if not, then I would need a way to extract x,y cordinates after being able to identify trees in some structure, and create my own array, say trees[], that has member variables {sapling/tree status, x,y coordinates}.

I was looking at the structures...

has trees and saplings defined

https://github.com/DFHack/df-structures/blob/master/df.plant-raws.xml

and soil is defined here
https://github.com/DFHack/df-structures/blob/master/df.tile-types.xml

now just need to be able to do a get x,y function.
The actual "tree" structure is in https://github.com/DFHack/df-structures/blob/master/df.plants.xml, but it's also used for shrubs so you'll need to take that into account.

The global list of all plants is here, but creating new trees from scratch requires following certain steps exactly or you will corrupt your savegame. For reference, those steps are correctly followed in this plugin command.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Nopenope

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5551 on: June 05, 2014, 01:11:26 pm »

Is there a manual of some kind to write plugins/scripts or a repository that keeps track of all of them?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5552 on: June 05, 2014, 01:30:12 pm »

Nopenope

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5553 on: June 05, 2014, 01:55:06 pm »

It doesn't contain all the scripts, far from it, and it only provides documentation for lua (no ruby/python/c++).
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5554 on: June 05, 2014, 02:10:30 pm »

It doesn't contain all the scripts, far from it, and it only provides documentation for lua (no ruby/python/c++).
It's the official repo. See the develop branch for new stuff. Also there is no python bindings (afaik) and c++ part is mostly comment-documented and i learned by examples/hanging out in the irc and bugging the people that know stuff. As for ruby bindings (I forget who wrote it) they are really similar to lua.
Biggest problem is that you need to know df very intimately to do stuff. And there is just so much to know... I mean here is the data structures but still there are strange ways df is doing stuff. AFAIK there is no easy way. Also i should have written many tutorials and maybe someday i will until then i'll repeat myself: check other people scripts (especially the official repo ones, they might be nicer, more correct, etc...), bug people (especially in irc, though remeber timezones, and patience), play with gui/gm-editor - that is the thing i made for myself to check stuff out, and edit df on the fly and soon you'll be writing next great total conversion that allows you to build rockets and crash moons into enemy forts.

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5555 on: June 05, 2014, 05:36:16 pm »

It doesn't contain all the scripts, far from it,

If there are scripts that you think should be there, open an issue and it should happen eventually. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5556 on: June 05, 2014, 06:10:30 pm »

is there a way to show the raw entry for a workshop job?  Often I'm wondering what skill/labor does a job (in a mod).

DracoGriffin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5557 on: June 06, 2014, 06:13:08 am »

Code: [Select]
Invoking: gui/workflow
Cannot find material: COAL:COKE
Cannot find material: COAL:COKE
...rf Fortress\Dwarf Fortress\hack\scripts/gui/workflow.lua:950: invalid constraint: BAR//COAL:COKE
stack traceback:
[C]: in function 'setConstraint'
...rf Fortress\Dwarf Fortress\hack\scripts/gui/workflow.lua:950: in function <...rf Fortress\Dwarf Fortress\hack\scripts/gui/workflow.lua:949>
[C]: in function 'on_submit'
...rf Fortress\Dwarf Fortress\hack\scripts/gui/workflow.lua:351: in function 'on_activate'
...k Dwarf Fortress\Dwarf Fortress\hack\lua\gui\widgets.lua:322: in function <...k Dwarf Fortress\Dwarf Fortress\hack\lua\gui\widgets.lua:318>
(...tail calls...)
...asterwork Dwarf Fortress\Dwarf Fortress\hack\lua\gui.lua:472: in function <...asterwork Dwarf Fortress\Dwarf Fortress\hack\lua\gui.lua:467>
(...tail calls...)
[C]: in ?
Invoking: gui/workflow

Didn't see a specific thread for Workflow (other than extremely old) so posting here; this was the version packaged with Masterwork v5.02 on Dwarf Fortress 0.34.11
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #5558 on: June 06, 2014, 08:15:47 am »

By any chance did you attempt to invoke gui/workflow before you actually loaded your fortress?
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

DracoGriffin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5559 on: June 06, 2014, 08:25:34 am »

No, this was quite into the game. Save file here.

The link was for a separate issue but the workflow issue also came up.
Logged

darthbob88

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5560 on: June 06, 2014, 12:41:37 pm »

I've had the same issue, also well into the game, and only if I use the GUI. If I set limits on coal through the command line, using " workflow count BAR//COAL 20 ", no problems. I think the problem is that the job-scraper is getting the wrong material for the product, as terrifically helpful as that is.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5561 on: June 07, 2014, 04:30:29 pm »

What source file contains grow for growing saplings into trees?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5562 on: June 07, 2014, 04:41:24 pm »

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.

MeMyselfAndI

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5563 on: June 07, 2014, 05:03:11 pm »

Is there a way to get the actual value of a room?

Related: is there a way to get the directionality of an engraving?
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5564 on: June 07, 2014, 10:58:21 pm »

I've had no migrants for a long while.  I'm wondering is their a dfhack way to exploit my status as a new embark?  I have the dwarf # limited to 40 dwarf's, I don't think changing that value either in memory, or in the .ini will have an affect, as I'm still under that number.  I think the problem is actually not doing well with trading with other civilizations (probably my home civ).

Is there a way to hack my home civ's regard to myself, and if so where?

Update:

I used force caravan player to force a diplomat.  I then proceeded to trade with him to his advantage, yet skipped out on meeting the diplomat who left unhappy, and I GOT MIGRANTS!
« Last Edit: June 08, 2014, 09:09:52 am by thistleknot »
Logged
Pages: 1 ... 369 370 [371] 372 373