Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 155 156 [157] 158 159 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1407862 times)

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2340 on: October 01, 2012, 07:35:57 am »

That won't work for vampires with false identities. See how dfhack changes nicknames: https://github.com/peterix/dfhack/blob/master/library/modules/Units.cpp#L553
Logged

Akjosch

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2341 on: October 01, 2012, 07:41:01 am »

That won't work for vampires with false identities. See how dfhack changes nicknames: https://github.com/peterix/dfhack/blob/master/library/modules/Units.cpp#L553

"This won't work" as in "only the true vampiric identity will be changed, not what's displayed" or as in "only the displayed identity will be changed, not the vampiric one"? Because the second variant is totally what I want to happen.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2342 on: October 01, 2012, 07:46:53 am »

"This won't work" as in "only the true vampiric identity will be changed, not what's displayed" or as in "only the displayed identity will be changed, not the vampiric one"? Because the second variant is totally what I want to happen.

It will change the true identity. To get the vampiric one you can use dfhack.units.getIdentity(unit) in lua - its implementation is just above Units::setNickname in that Units.cpp file. There also is Units::getVisibleName below it.

Basically if you want to only change the visible name, you could probably try something like this, only with more error checking and stuff:

Code: [Select]
local vname = dfhack.units.getVisibleName(unit)
modify(vname)
if vname == unit.name then
  unit.status.current_soul.name:assign(vname)
  df.historical_figure.find(unit.hist_figure_id).name:assign(vname)
end
« Last Edit: October 01, 2012, 07:51:47 am by ag »
Logged

Akjosch

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2343 on: October 01, 2012, 07:57:55 am »

So basically I have to go and modify ...status.current_soul.name instead of ...name. Oh well, I'll play with it when I'll actually get some vampire in the fort. Thanks for the pointer.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2344 on: October 01, 2012, 08:23:36 am »

So basically I have to go and modify ...status.current_soul.name instead of ...name. Oh well, I'll play with it when I'll actually get some vampire in the fort. Thanks for the pointer.

No, you need to modify what getVisibleName returns. Plus, if it returns just unit.name (i.e. there is no false identity), you need to modify the soul and the histfig of the unit.
Logged

Akjosch

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2345 on: October 01, 2012, 09:23:32 am »

So basically I have to go and modify ...status.current_soul.name instead of ...name. Oh well, I'll play with it when I'll actually get some vampire in the fort. Thanks for the pointer.

No, you need to modify what getVisibleName returns. Plus, if it returns just unit.name (i.e. there is no false identity), you need to modify the soul and the histfig of the unit.

getVisibleName() returns the "name" field of the historical figure of unit.hist_figure_id if there is one (and I modify that already) for normal dwarves. Good enough for now (and works well), I'll deal with vampires, ghosts and the like when I'll actually get any. :)

To be more precise: It returns df::assumed_identity::find(df::historical_figure::find(unit->hist_figure_id)->info->reputation->cur_identity)->name, which for everyone with just one identity is exactly the same as above.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2346 on: October 01, 2012, 09:38:39 am »

To be more precise: It returns df::assumed_identity::find(df::historical_figure::find(unit->hist_figure_id)->info->reputation->cur_identity)->name, which for everyone with just one identity is exactly the same as above.

No, only vampires and demons who pretend that they are gods have assumed identities, so for everybody else it returns &unit->name.
Logged

Akjosch

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2347 on: October 01, 2012, 09:41:33 am »

To be more precise: It returns df::assumed_identity::find(df::historical_figure::find(unit->hist_figure_id)->info->reputation->cur_identity)->name, which for everyone with just one identity is exactly the same as above.

No, only vampires and demons who pretend that they are gods have assumed identities, so for everybody else it returns &unit->name.

.. in other words, it's even more useless for my needs. I change unit->name directly already.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2348 on: October 01, 2012, 06:41:25 pm »

Ok DFHack guys I realized halfway through an overhaul of the way my god tiers work that the new way would make them unable to do labors etc. in fort mode because they're transforming into a different creature, so is there a way to allow other intelligent creatures to do labors, join the military etc. without having migrants of other intelligent races come in?

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2349 on: October 01, 2012, 10:20:37 pm »

Ok DFHack guys I realized halfway through an overhaul of the way my god tiers work that the new way would make them unable to do labors etc. in fort mode because they're transforming into a different creature, so is there a way to allow other intelligent creatures to do labors, join the military etc. without having migrants of other intelligent races come in?
uhh friendship. Though just make the migrant cycle be other god tiers.
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

falconne

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2350 on: October 02, 2012, 04:27:57 am »

I hope someone can point out what I'm doing wrong here. I just started using the autobutcher function, which is very useful, except that it stopped working and I can't figure out why. Everything was fine the first time I ran it, it sent all the excess animals to slaughter. However, after I came back to my saved game the next day, I noticed no animals were getting slaughtered even though they'd gone above their thresholds, so I typed "autobutcher start" into the console and then "autobutcher list", which told me the status was "not enabled" and "race list is empty".

I had already exported the list from the first run, so I tried running that from a batch file, which successfully added all my animals into the watch list, but the status was still "not enabled".

No matter what I try, doing an "unwatch all", "forget all", "stop", re-add everything, "start", the status is still "not enabled". And running "start" always clears my race list. Here's the typical result I get:

Code: [Select]
[DFHack]# autobutcher list
Autobutcher status: not enabled, noautowatch, sleep: 6000
Default setting for new races: fk=8 mk=8 fa=5 ma=2
The autobutcher race list is empty.


[DFHack]# autobutcher target 8 8 5 2 WATER_BUFFALO
Setting new target count for race(s): WATER_BUFFALO
[DFHack]# autobutcher watch WATER_BUFFALO
Start watching race(s): WATER_BUFFALO

[DFHack]# autobutcher target 8 8 5 2 ALPACA
Setting new target count for race(s): ALPACA
[DFHack]# autobutcher watch ALPACA
Start watching race(s): ALPACA

[DFHack]# autobutcher start
Starting autobutcher.

[DFHack]# autobutcher list
Autobutcher status: not enabled, noautowatch, sleep: 6000
Default setting for new races: fk=8 mk=8 fa=5 ma=2
The autobutcher race list is empty.


I'm probably doing something obvious wrong... anyone know?
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2351 on: October 02, 2012, 04:30:21 am »

full support for Mac OS X.

does this means stonesense too?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2352 on: October 02, 2012, 05:25:31 am »

full support for Mac OS X.

does this means stonesense too?

I /think/ so, but don't quote me on that.
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2353 on: October 02, 2012, 05:26:36 am »

full support for Mac OS X.

does this means stonesense too?

I /think/ so, but don't quote me on that.

ok!

ops.
Logged

telarin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2354 on: October 02, 2012, 09:04:34 am »

The update list says that you can now set the percentage of haulers in autolabor, however, the help file has not been updated with the syntax to do so.
Logged
Pages: 1 ... 155 156 [157] 158 159 ... 373