Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 166 167 [168] 169 170 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1083427 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2505 on: April 20, 2015, 08:52:51 pm »

dfhack.screen.getKeyDisplay(18) means that the interface key with an ID of 18 is displayed as "r" in-game. That key is MOVIE_RECORD, which will only work in the movie [;] menu. You should be passing df.interface_key.KEY_ID to simulateInput(), where KEY_ID is a valid ID listed in interface.txt or "@df.interface_key" in the interactive lua interpreter.

Edit: Also, gui.simulateInput() is a more flexible wrapper around _doSimulateInput, although you'll have to import the gui module (e.g. gui = require('gui')).
« Last Edit: April 20, 2015, 08:54:45 pm by lethosor »
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.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2506 on: April 20, 2015, 09:10:27 pm »

Interesting. Then I basically just got lucky it worked with enter. Is there a way to automatically look up a key id? And I wasn't using the gui function because I wanted to manipulate screens that aren't visible or active and I thought that only allowed current screen manipulation
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2507 on: April 20, 2015, 10:05:15 pm »

Both functions take a screen as their first argument, although they should be identical for your purposes.
You'll have to experiment to find most key IDs, although they're typically self-explanatory (searching interface.txt can be helpful). DFHack bindings usually use keys like CUSTOM_F, CUSTOM_SHIFT_R, etc. (which are also used for custom reaction hotkeys in workshops).
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.

Rogue Yun

  • Bay Watcher
  • Beware of the Carp
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2508 on: April 22, 2015, 06:57:59 pm »

Would it be possible for someone to make a quick fix in the building plan plugin by adding the ability to plan for hatch covers? I'd really appreciate it, as I appreciate everything that has been done to make dwarf fortress the best gaming experience I've ever known. Thanks in advance!

Side note:
Spoiler (click to show/hide)
Logged

.:Simple Mood 16x16 ASCII:.
Keep it Simple. Keep it Safe.

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2509 on: April 23, 2015, 06:41:01 pm »

Is there a way to change stress levels through gui/gm-editor? If so, where?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2510 on: April 23, 2015, 07:03:14 pm »

unit.status.current_soul.personality, IIRC. Maybe it was just in current_soul.

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2511 on: April 23, 2015, 07:28:51 pm »

unit.status.current_soul.personality.stress_level

That's pretty deep, no wonder I couldn't find it. It also has the thoughts and personality of the creature, which I've also been looking for. Thanks!

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2512 on: April 23, 2015, 09:12:07 pm »

I wonder what all is different between the uh, I think world.history.figures and the stuff under world.units because I messed up trying to use dfusion to make two particular dorfs the parents of a dorflet and she ended up with a random human histfig as her dad, nothing I tried under units let me change it, but I was able to fix it under figures to get the relationships right.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2513 on: April 23, 2015, 09:14:05 pm »

Not so much what is different as what is the same; they're vectors of two completely different objects.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2514 on: April 24, 2015, 05:48:31 am »

Good point, but yeah, the historical figures section is what finally let me fix said parent links, also where deities and certain other links can be found.

Gar:
Spoiler (click to show/hide)
Urist:
Spoiler (click to show/hide)
Romlam:
Spoiler (click to show/hide)

Had to add the histfig_hf_link_childst to Urist manually but once that was right they react normally and it shows up right in legends:

Previously it had a random human listed as her father, think he might have been dead for twenty something years at that.
« Last Edit: April 24, 2015, 06:05:27 am by Max™ »
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2515 on: April 24, 2015, 08:15:48 am »

Anyone know why this isn't working?

Code: [Select]
modtools/interaction-trigger -suppressAttack -onAttackStr "test for super saiyan" -command [ dragonball/super_saiyan_trigger -unit \\ATTACKER_ID ]
It's suppressing the attack perfectly, but the command isn't going at all.

That looks like the right syntax. I'm not sure. Have you tried testing with devel/print-args?
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2516 on: April 24, 2015, 08:56:33 am »

During all of this current_soul searching, has anyone happened upon the values required to make a creature into a functioning member of the fort?  When I use warmist's spawn-unit script to make an animal, it's fine for hostile ones but unreliable for friendly ones.  Giving it the player's civ_id will make it appear "Tame" on the units list (and keep it from attacking) but "Not Tame" on the z/Animals list (which prevents it from being a pet) even if I gm-editor its training level.  I recall reading that the creature can revert to hostile when the game is saved and re-loaded, but I haven't witnessed this personally.

Comparing the gm-editor screens for a natural specimen and a spawned specimen hasn't gotten me anywhere, but that's because I'm not familiar with the object model.  If someone can point me to the proper attributes and values, I think I can make the Lua code changes necessary.

The immediate use of proper fort membership would be to enable war-training and such for spawned animals, and I have plans for assigning specific creatures as pets of specific dwarves in a later expansion.

And, it doesn't get said nearly often enough that DFHack and the other third-party tools are awesome and invaluable additions to the DF game and community.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2517 on: April 24, 2015, 04:13:19 pm »

Anyone know why this isn't working?

Code: [Select]
modtools/interaction-trigger -suppressAttack -onAttackStr "test for super saiyan" -command [ dragonball/super_saiyan_trigger -unit \\ATTACKER_ID ]
It's suppressing the attack perfectly, but the command isn't going at all.

That looks like the right syntax. I'm not sure. Have you tried testing with devel/print-args?

No.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2518 on: April 24, 2015, 05:32:02 pm »

During all of this current_soul searching, has anyone happened upon the values required to make a creature into a functioning member of the fort?  When I use warmist's spawn-unit script to make an animal, it's fine for hostile ones but unreliable for friendly ones.  Giving it the player's civ_id will make it appear "Tame" on the units list (and keep it from attacking) but "Not Tame" on the z/Animals list (which prevents it from being a pet) even if I gm-editor its training level.  I recall reading that the creature can revert to hostile when the game is saved and re-loaded, but I haven't witnessed this personally.

Comparing the gm-editor screens for a natural specimen and a spawned specimen hasn't gotten me anywhere, but that's because I'm not familiar with the object model.  If someone can point me to the proper attributes and values, I think I can make the Lua code changes necessary.

The immediate use of proper fort membership would be to enable war-training and such for spawned animals, and I have plans for assigning specific creatures as pets of specific dwarves in a later expansion.

And, it doesn't get said nearly often enough that DFHack and the other third-party tools are awesome and invaluable additions to the DF game and community.

Did you give it the civ_id for both unit.civ_id and unit.status.current_soul.civ_id? I was able to turn animals into tame members that appear as tame both in the units screen and the z/animals. Although this was with already existing animals, and not those spawned by the script. (I also changed all of the unit.animal tokens to -1, not sure what effect that actually has though)
Logged

Bo-Rufus CMVII

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2519 on: April 24, 2015, 06:13:40 pm »

Can I safely upgrade r2-->r3 on Linux just by copying the newer files on top of the current installation?
Logged
Pages: 1 ... 166 167 [168] 169 170 ... 360