Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 131 132 [133] 134 135 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1399903 times)

khearn

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1980 on: June 22, 2012, 01:12:37 pm »

Also - can anybody answer my question about XXitemsXX?

I strongly suspect that if anyone could answer it, they already would have. Most people don't reply to a question that they can't answer. There are lots of people who read this thread, and if they all answered to say "sorry, can't help you", the thread would be swamped. So if you ask a question and no one answers, then there's no point in asking it over and over and over again. You still won't get an answer because no one knows. That's your answer.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1981 on: June 22, 2012, 01:16:39 pm »

I actually checked now just in case, and there are NO pre-written plugins that change wear, so the only way is to paste that line I posted into a lua script and use it. Since it only changes one item at a time, the most reasonable way to use it is by binding to a key combination; otherwise some loops and options need to be added.
Logged

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1982 on: June 22, 2012, 01:24:45 pm »

Cancellations only occur when a designated tile is revealed during digging. So, revealing them yourself immediately after designating would prevent it.

To reveal a tile from lua you can do:

Code: [Select]
dfhack.maps.getTileBlock(x,y,z).designation[x%16][y%16].hidden = false
If the number of tiles is reasonable, as would be if you only loop over a limited rectangle on one z level, it should be fast enough. For whole-map scans lua is generally too slow, since there are millions of tiles to process - but see scripts/fix/item-occupancy.lua for an example.

That command returns errors whether I try using it with a single cursor or in the middle of a rectangle selection.  Says bad argument #3, number expected, got nil.
« Last Edit: June 22, 2012, 01:28:15 pm by Makbeth »
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1983 on: June 22, 2012, 01:46:45 pm »

You obviously need to initialize x, y and z with something sensible ;)

Code: [Select]
local x,y,z = pos2xyz(df.global.cursor)
dfhack.maps.getTileBlock(x,y,z).designation[x%16][y%16].hidden = false
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1984 on: June 22, 2012, 02:34:59 pm »

Thanks AG i will try that:) And i was looking for this Khaern;) Cause somebody said 20 pages back that it can be done - that is why i was this stubborn:)
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1985 on: June 22, 2012, 09:31:30 pm »

Bumping this for the update.
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1986 on: June 22, 2012, 10:10:35 pm »

Yay, update! Which version do I use for mac?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1987 on: June 22, 2012, 11:04:28 pm »

Neither, mac isn't out yet, just heavily being worked on.
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1988 on: June 23, 2012, 01:14:33 am »

You do mac now?  :o
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1989 on: June 23, 2012, 01:25:03 am »

DFHack for DF 0.34.08 - 0.34.11 (release 1) (Current):
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)

What's new:
  • Support for 0.34.11 added.
  • TEXT mode should now be properly detected and handled on Linux.
  • Work has started on an OSX port - for real this time!
  • Many bugfixes and improvements to the existing tools and plugins.

Possible problems:
  • Stonesense lacks graphics for the many new track tiles.
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1990 on: June 23, 2012, 04:49:01 am »

Are there any mirror links for the windows version? The link provided is causing my browser to crash, and I don't have any alternatives right now.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
armoks_blessing, new lua script for dfhack 34.10
« Reply #1991 on: June 23, 2012, 04:13:02 pm »

I've requested a user page on the wiki, but apparently those requests all go through a single user, and none of the last half dozen user pages have content, so I'm not sure it's actually being done.  In any case, this will have to do until I can get a user page there.

This script...
... is for 34.10 (yes, I know 34.11 was just released)
... combines a bunch of functionality from my previous scripts, but does not replace them.
... will make changes to ALL YOUR DWARVES.  All of them.  Not just one.  All.

If the script is executed without any arguments, it runs the equivalent of rejuvenate, elevate_physical, elevate_mental, and brainwash on all dwarves currently on the map.  It will only rejuvenate dwarves 21 years or older.

If the script has been copied into /df_install_dir/hack/scripts/ , you'll see the following

[DFHack]# ls
...
scripts:
  armoks_blessing       - Adjust all attributes, personality, age and skills of all dwarves in play

Now running the script by itself
 
[DFHack]# armoks_blessing
No skillname supplied, no skills will be adjusted.  Pass argument 'list' to see a skill list, 'classes' to show skill classes, or use 'all' if you want all skills legendary.
Adjusting Nil Laruzol
Adjusting Sibrek Sarveshtangath
Adjusting Aban Oltarmörul
Adjusting Olon Kolakmam
Adjusting Edzul Isonzas
Adjusting Ast Mamotiden
Adjusting Doren Aranònul
[DFHack]#

I ran that on a new embark with just the starting seven.  What it did:
  • changed all the personality values to "an ideal", the specifics of which are in the code.
  • adjusted all mental and physical attributes to 2600
  • reduced the age of all dwarves older than 20 to age 20.
The script will accept arguments.  Use 'list' or 'classes' to see them, but the most common ones will be:
all
Normal
MilitaryDefense
MilitaryAttack
MINING
CARPENTRY
etc

all - this makes all your dwarves legendary in all skills. All.  Every single one.
Normal - this makes your dwarves legendary in the common labour skills plus a few extras (exactly shown with 'list' )
MilitaryDefense - the defensive military skills (dodge, armor, shield) are all made legendary
MilitaryAttack - the offensive military skills (weapons, fighting, biting, etc) are all made legendary.
MINING - all dwarves are made into legendary miners.

Example:
[DFHack]# armoks_blessing CARPENTRY
Adjusting Nil Laruzol
nil is now a Legendary Carpenter
Adjusting Sibrek Sarveshtangath
sibrek is now a Legendary Carpenter
Adjusting Aban Oltarmörul
aban is now a Legendary Carpenter
Adjusting Olon Kolakmam
olon is now a Legendary Carpenter
Adjusting Edzul Isonzas
edzul is now a Legendary Carpenter
Adjusting Ast Mamotiden
ast is now a Legendary Carpenter
Adjusting Doren Aranònul
doren is now a Legendary Carpenter
[DFHack]#


Another example:

[DFHack]# armoks_blessing Normal
Adjusting Nil Laruzol
Skill Mining is type: Normal and is now Legendary for nil
...
Skill Wax Working is type: Normal and is now Legendary for nil
Adjusting Sibrek Sarveshtangath
Skill Mining is type: Normal and is now Legendary for sibrek
...
Skill Wax Working is type: Normal and is now Legendary for sibrek
Adjusting Aban Oltarmörul
Skill Mining is type: Normal and is now Legendary for aban
...
Skill Wax Working is type: Normal and is now Legendary for aban
Adjusting Olon Kolakmam
Skill Mining is type: Normal and is now Legendary for olon
...
Skill Wax Working is type: Normal and is now Legendary for olon
Adjusting Edzul Isonzas
Skill Mining is type: Normal and is now Legendary for edzul
...
Skill Wax Working is type: Normal and is now Legendary for edzul
Adjusting Ast Mamotiden
Skill Mining is type: Normal and is now Legendary for ast
...
Skill Wax Working is type: Normal and is now Legendary for ast
Adjusting Doren Aranònul
Skill Mining is type: Normal and is now Legendary for doren
...
Skill Wax Working is type: Normal and is now Legendary for doren
[DFHack]#


The previous scripts work on single dwarves, this one works on all the dwarves currently on the map.
You should be REALLY REALLY sure you want to affect ALL YOUR DWARVES before you even copy this script into your /hack/scripts/ directory, and you should definitely have a backup/save ready in case you make changes you weren't expecting.

I would also recommend pausing the game before you run it.  Enjoy!  And please PM me if you find any problems with using this script in DF/dfhack 34.10.

Spoiler: armoks_blessing.lua (click to show/hide)

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1992 on: June 24, 2012, 10:42:08 am »

vjek will it accept a digit as an argument on how much to change all stats? Like armol_blessin 5000 will change everyone to 5000 in all stats?
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #1993 on: June 24, 2012, 10:58:46 am »

yay for the update.

Is there a way to spawn a creature at cursor using lua?

I want to see if my fort is up enough for a creature of a type (kind of like free training), but so far, I have no idea how to spawn one without going into arena mode.

Second question, where are the lua scripts supposed to be placed when I run from the lua command?  apparently the df\hack\scripts folder isn't right?
« Last Edit: June 24, 2012, 11:20:15 am by thistleknot »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r1
« Reply #1994 on: June 24, 2012, 12:15:30 pm »

Is there a way to spawn a creature at cursor using lua?
Theoretically, it can be done, but properly creating a new creature from scratch is a rather complicated process whose steps are not all properly known - if you miss a step, you might end up crashing the game.

Second question, where are the lua scripts supposed to be placed when I run from the lua command?  apparently the df\hack\scripts folder isn't right?
The hack/scripts folder is the correct place to put them - if they're not showing up, perhaps you forgot to give them the ".lua" extension?
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.
Pages: 1 ... 131 132 [133] 134 135 ... 373