Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 224 225 [226] 227 228 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457811 times)

oasis789

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3375 on: March 21, 2013, 04:29:39 am »

How do I use binpatch to enable the following patch codes?

http://www.bay12games.com/dwarves/mantisbt/view.php?id=3100
http://www.bay12games.com/dwarves/mantisbt/view.php?id=5854

How do I enable the "Add Spatter" building?
Logged

RockBiterSon

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3376 on: March 21, 2013, 05:45:39 pm »

Is there a way to make an abandonned fort into a friendly civilization site so that I can retire my adventurer there (and his companions?) and makeown him when I reclaim the site?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3377 on: March 21, 2013, 05:47:41 pm »

Is there a way to make an abandonned fort into a friendly civilization site so that I can retire my adventurer there (and his companions?) and makeown him when I reclaim the site?

EDIT: Misread the question, I think that site claim script posted earlier may be of use to you.

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3378 on: March 21, 2013, 08:39:03 pm »

question regarding create-items.rb

If I wanted to add 'leather' into the list of options, how would I go about doing that?

So far, I've got:
Code: [Select]
if mat_raw !~ /:/ and !(df.decode_mat(mat_raw) rescue nil)
list = df.world.raws.creatures.all.find_all { |cre|
cre.material.find { |mat| mat.id == 'LEATHER' }
}.map { |cre| cre.creature_id }
mat_raw = match_list(mat_raw, list)
mat_raw = "CREATURE:#{mat_raw}:LEATHER"
puts mat_raw
end
And when put inside an existing loop, it will create the item with the correct name, but it's material type is incorrect.

For example, by modifying 'webs' or 'boulders' or 'bars' with the above
[DFHack]# create-items webs duck 2
CREATURE:BIRD_DUCK:LEATHER
the script will create 'duck leather' in game, of the type of the respective material.

I don't know enough ruby to know what    cls = DFHack::ItemBarst is doing, but there are apparently a set number of those constants (Threads, Bars, Boulders, Woods) and Skin_Tanned is not among them, (despite they all being item tokens) as per:

E: NameError: ./hack/scripts/create-items.rb:117: uninitialized constant DFHack::ItemSkin_Tannedst
 ./hack/scripts/create-items.rb:117


Thoughts? Comments?  I just want to expand the functionality of the create-items.rb script to include the ability to create different types of leather. (and ideally things like skin, bone, horn, etc)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3379 on: March 21, 2013, 08:56:13 pm »

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3380 on: March 21, 2013, 09:30:19 pm »

Doesn't like it...

It's either
E: NameError: ./hack/scripts/create-items.rb:117: uninitialized constant DFHack::Item_Skin_Tannedst

with matched case, or

E: NoMethodError: undefined method `item_skin_tannedst' for DFHack:Module ./hack/scripts/create-items.rb:117

without.   ???

RockBiterSon

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3381 on: March 21, 2013, 09:39:03 pm »

Is there a way to make an abandonned fort into a friendly civilization site so that I can retire my adventurer there (and his companions?) and makeown him when I reclaim the site?

EDIT: Misread the question, I think that site claim script posted earlier may be of use to you.

Thanks. Err. How much earlier? There is over 200 pages of material to look through...
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3383 on: March 21, 2013, 11:43:21 pm »

hmm or you could use 2fort
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3384 on: March 21, 2013, 11:45:10 pm »

Hehe, or that.

Nokao

  • Bay Watcher
  • [NEED ALCOHOL TO GET THROUGH THE WORKING DAY]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3385 on: March 22, 2013, 05:08:14 am »

Am I wrong, or the new package is not inside https://github.com/peterix/dfhack/downloads ?

Aerval

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3386 on: March 22, 2013, 05:12:49 am »

Am I wrong, or the new package is not inside https://github.com/peterix/dfhack/downloads ?
:), you just have to look in the first post of pape one
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3387 on: March 22, 2013, 05:53:49 am »

Github remove downloading on their site so Peterix has to build and dump the pack into a hosting site.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: DFHack 0.34.11 r3
« Reply #3388 on: March 22, 2013, 05:19:39 pm »

Well, here goes my first DFHack script(s).


A week or two ago searched through this thread and didn't find anything that let me add units to my fort's population. So, I spent my spare time the last two weeks writing two scripts that let me do just that.

Known problems:
 * When I took some guards for my civ's caravan, all of them except just sat around gathering bad thoughts until they went insane. In another fort, the dwarven caravan was ambushed and everybody except one caravan guard was killed. After he felled the last goblin, I took control of him and he became a normal worker in my fort.
 * I haven't yet found a unit that I took that I can add to my military. So all those caravan guards are not that useful...unless you need more peasants. Which, personally, I do.
 * All non-dwarven creatures (or, I assume, creatures not of your race -- haven't tried this script with other races as my race) are classified as "tame." So even though sentients usually show up in your "civilians" tab and they have professions and you can set their labors with v -> p -> l, all those goblins you captured aren't actually going to do anything other than walk around. I'd assume this can be fixed with something like companion (which, unfortunately, I don't have in Linux).
 * It doesn't seem you can assign captured units positions in your nobles and administrators screen.

If anybody has any idea how to fix those, please let me know.

Warning: These bug your save or crash your game. I'm not responsible for anything that goes wrong. You are using these scripts at your own risk.
 I've had no crashes or save-breaking problems yet, but don't come crying to me if something does go wrong in any way, shape, or form (though a bug report of sorts is appreciated).
I advise you to always save & additionally back up your save when playing with these (though this applies to DFHack in general) so that you can revert anything that goes wrong.

This first script adds the currently selected unit to your fort. Sentients should show up in your civilians tab and animals should show up in your pets/livestock tab.
Spoiler (click to show/hide)

This one loops through all of the units on the map and adds the ones with the specified ID to your fort.
The script will prompt you for the ID (though I should probably make it look at arguments passed to it).
Spoiler (click to show/hide)

I'm pretty sure there are other flags that could/should be set to make this work better, but I'm no expert

I appreciate any feedback, constructive criticism, and improvements you guys can offer.
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.

robertheinrich

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3389 on: March 22, 2013, 06:55:56 pm »

A week or two ago searched through this thread and didn't find anything that let me add units to my fort's population. So, I spent my spare time the last two weeks writing two scripts that let me do just that.
[...]

Well... spending a couple of minutes reading the readme.rst which comes with dfhack might have saved you some headaches. I would suggest you take a look at the sourcecode for "tweak makeown" which forces a selected unit to become a member of your fort's civilization. It's far from being failsafe since the original intention was to fix bugged migrants/traders who sometimes appear on the map edge and never enter your fort (that's why "tweak fixmigrant" was written and "tweak makeown" is simply more more radical because why not) and I never tested how it works out if you try to makeown invaders for example. But you might get some ideas what flags need to be changed at the very least, maybe (probably) there is more to it if you really want to assimilate every possible kind of creature on your map.

One thing I can tell you for sure from looking at your script is that you need fix the ownership for clothes if you try to confiscate dwarves from caravans.  If you don't they will strip naked, get bad thoughts from being naked and in the worst case go insane because of that - which I think might be happening for you from reading the post. Inside the tweak plugin there is the function "fix_clothing_ownership()" which you should look at for that. Confiscating non-dwarves kinda works, but DF will treat them as semi-pets. IIRC you can assign jobs to them (if the race supports those kind of jobs), but you won't be able to give them bedrooms etc. I don't know if there is any way to overcome this limitation, I don't think there is because probably the player's race might be hardcoded to be the only one which you can fully control in fortress mode and being able to assign jobs to non-dwarves (or non-player-race creatures) is already pretty astounding.
Logged
Pages: 1 ... 224 225 [226] 227 228 ... 373