Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 108 109 [110] 111 112 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457913 times)

zkm2erjfdb

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1635 on: May 29, 2012, 09:56:14 am »

I'm not exactly sure what your end goal is
I want to...make it interactive...
Because I find DwarfTherapist isn't (comprehensive).
And when use:[LUA]#printall(unit.status.souls[0].skills[0])
can get messages like
unk_14  =  2
rusty  =  13
unk_18 =  2

When I want to know more about one skills ,just need to type once.But there are so many skills to check.
Also  many other attribute .
So I'm trying to make them more clean like a form,easier to check and chang it.
Thanks for your help.I will try to learn array later.
Logged

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1636 on: May 29, 2012, 10:31:24 am »

I'm not exactly sure what your end goal is
I want to...make it interactive...
Because I find DwarfTherapist isn't (comprehensive).
And when use:[LUA]#printall(unit.status.souls[0].skills[0])
can get messages like
unk_14  =  2
rusty  =  13
unk_18 =  2

When I want to know more about one skills ,just need to type once.But there are so many skills to check.
Also  many other attribute .
So I'm trying to make them more clean like a form,easier to check and chang it.
Thanks for your help.I will try to learn array later.
Ok, well, I split up the three scripts intentionally.
Physical attributes, mental attributes, and personality traits are pretty straightforward, as far as how they sit in memory, and being able to modify the values.
It would be easy to change attributes and personality traits with multiple keywords.  It would just be a matter of taking something like "modify_attribute.lua strength 3000" and then adjusting strength based on that.  You could even expand it to something like "modify_attributes_personality.lua strength 3000 agility 3000 modesty 99" so based on the first attribute or personality trait in the key-value pair, it updated the correct one.

To the best of my knowledge, every physical attribute, mental attribute, and personality trait are adjusted with the scripts I posted earlier for 34.10.  I could be wrong, but that's my understanding.

Skills, on the other hand, are trickier, but not considerably so.  The missing piece is what text value the 'id' value corresponds to, such as 22 = Growing, and so on.  Once I have time to find that ( I know it's there, dwarfexport uses it ) then I'll be able to create something like "make_legendary.lua Growing" and bam, you've got a legendary grower.

None of the scripts I have released to date will help with skills.  However, there are some code snippets earlier in this thread from other helpful community authors that specifically address skills, so take a look at those.

Martin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1637 on: May 29, 2012, 02:47:22 pm »

Here are the skills, nicked from DwarfTherapist:


Spoiler (click to show/hide)


Any thoughts on where these should go on the wiki? I'll put them up.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.10 r1
« Reply #1638 on: May 29, 2012, 03:00:12 pm »

Here are the skills, nicked from DwarfTherapist:

Any thoughts on where these should go on the wiki? I'll put them up.

No need - they're already right here (and have been for well over a year, at least for version 0.31).

Most of the other important lists (professions and labors) are also on similar pages.
« Last Edit: May 29, 2012, 03:02:31 pm by Quietust »
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.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1639 on: May 29, 2012, 03:06:02 pm »

Skills, on the other hand, are trickier, but not considerably so.  The missing piece is what text value the 'id' value corresponds to, such as 22 = Growing, and so on.  Once I have time to find that ( I know it's there, dwarfexport uses it ) then I'll be able to create something like "make_legendary.lua Growing" and bam, you've got a legendary grower.

See df.job_skill[id] or df.job_skill[name]. Also, ~df.job_skill.attrs[id].
Logged

danaris

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1640 on: May 29, 2012, 04:58:09 pm »

There is a new effort underway to get DFHack compiling and working on the Mac. The code can be found on GitHub, at https://github.com/danaris/dfhack

The compiling part works, and it even runs and hooks into DF, but trying to actually do anything still causes it to crash.

I'm working on it :D

Compiling with gcc version 4.5 (which appears to be the same version Toady uses) has resulted in a working build of this. reveal worked perfectly; other plugins await more complete offsets being mapped out (which I'm not yet experienced enough to do).

I'm still working on getting a build together that will run anywhere except on my build machine.
Logged

Martin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1641 on: May 29, 2012, 05:14:11 pm »

No need - they're already right here (and have been for well over a year, at least for version 0.31).


Grr. How much time did I spend searching the wiki and not finding it?

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1642 on: May 29, 2012, 07:56:43 pm »

I'll update this post later, I have to step out for a few hours, but figured it was worth sharing:

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

As with the other scripts, it can be used with either
' lua c:\path\to\script '
or if you put it into the dfhack scripts directory, just call it with make_legendary

typical usage would be to target a dwarf in dfhack, then make_legendary MINING
and voila, you have a legendary miner.  make_legendary list will provide a list of available skills.

Rinin_Rus

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1643 on: May 30, 2012, 12:52:43 am »

Ok, I'm sure a lot of people tired of useless children. I think butchering children is fun, and solves two problems in one shot: you have no children, but you have a nice material for crossbow =) Involve parents for additional fun.

Spoiler (click to show/hide)
Logged
He has a lot of willpower,  but he has very little linguistic ability

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1644 on: May 30, 2012, 01:11:50 am »

Ok, I'm sure a lot of people tired of useless children. I think butchering children is fun, and solves two problems in one shot: you have no children, but you have a nice material for crossbow =) Involve parents for additional fun.

Spoiler (click to show/hide)
I don't think you need to include the  getCreatureAtPos(x,y,z) or the getxyz functions in your post... when dfusion has them already. though I guess this is for those who want to run straight out of LUA functions.
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

Rinin_Rus

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1645 on: May 30, 2012, 01:18:59 am »

I don't think you need to include the  getCreatureAtPos(x,y,z) or the getxyz functions in your post... when dfusion has them already. though I guess this is for those who want to run straight out of LUA functions.
Yep, this script could be run without dfusion, actually function in this script are copy-pasted from Dfusion )
Logged
He has a lot of willpower,  but he has very little linguistic ability

Numbers

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1646 on: May 30, 2012, 03:12:17 am »

Prelimary tests show that the 'cured' vampire goes back to his blood-sucking ways sooner or later.

I'm kind of wondering if I'm missing something
Yes. In the end of the "vampire curse" interaction (look at the raw/interaction_examples/interaction_vampire.txt) the syndrome adds DRINKING_BLOOD counter, which, I suppose, is responsible for the renewing blood-drinking habits of "not-a-vampire-anymore".

Where and how to remove that counter I have no idea of.

BTW, do reverting the vamp syndrome actually reverts stat gain bonuses and undead status (and immunity too)?

No i still had to manually remove the curse. The stat gains and undead statuses are coded under .curses.add_tags1 etc. and .curses.attr_gain
Logged

zkm2erjfdb

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1647 on: May 30, 2012, 04:49:22 am »

it was worth sharing
Thanks.Then I make mine like yours,a bigger one like dfusion.
Sorry.I chack it in a new way(a popular way) and find it dosen't work. Now error has been fixed.(putin DF_Phoebus_34_10\hack\scripts)
Spoiler: skill.lua (click to show/hide)

I'm trying to make it a better view.Is it works?I find : just 'u' In Unit List is also work.
legendary is not I want.. 8)
But  "put it into the dfhack scripts directory" mean what? I don't know about dfhack scripts directory,where can I find it?
I sleep you wake up,you sleep I wake up ...... :'(
!!!Why? I find Console. don't work in /scripts/   like Console.lineedit
But when use lua skill.lua to run.it work then.
« Last Edit: May 31, 2012, 12:50:41 am by zkm2erjfdb »
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1648 on: May 30, 2012, 06:21:33 am »

Everybody with an older fortress that begins to slow down could try this for a potential 5-10% increase in fps:

Spoiler (click to show/hide)

The script works around this bug: http://www.bay12games.com/dwarves/mantisbt/view.php?id=5971
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.10 r1
« Reply #1649 on: May 30, 2012, 06:29:45 am »

If this really is a working solution then it should be added as a tool to dfhack and maybe be put to automatic usage every year.
Logged
Pages: 1 ... 108 109 [110] 111 112 ... 373