Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is there a way to name farm animals?  (Read 2253 times)

Thorfinn

  • Bay Watcher
    • View Profile
Is there a way to name farm animals?
« on: January 11, 2024, 12:46:26 am »

47.05 (I am so not a fan of mouse only controls.)

I'm in the terribly time consuming part of assigning 1x1 zones for all my hens (usually 4 each of the 6 flavors) and realized I could speed up the process greatly if I could give each female a unique name, like hen1, hen2, pea1, gui4, etc. But I can't figure out a way to do that. I've even downloaded the right version of Therapist, but it doesn't appear to exist there, either.

Can they be renamed or nicknamed?

Or is there now some easier way to deal with poultry? Other than just not bring them along, I mean.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Is there a way to name farm animals?
« Reply #1 on: January 11, 2024, 01:09:20 pm »

47.05 (I am so not a fan of mouse only controls.)

I'm in the terribly time consuming part of assigning 1x1 zones for all my hens (usually 4 each of the 6 flavors) and realized I could speed up the process greatly if I could give each female a unique name, like hen1, hen2, pea1, gui4, etc. But I can't figure out a way to do that. I've even downloaded the right version of Therapist, but it doesn't appear to exist there, either.

Can they be renamed or nicknamed?

Or is there now some easier way to deal with poultry? Other than just not bring them along, I mean.

The underlying capability exists.  Animals can have nicknames.  Unfortunately, you can't set those nicknames.

Ignore that, I didn't see the v47.05.  I don't actually remember if v47.05 has a user-exposed way to set an animal's nickname.

DFHack can do it, but there are no standard scripts to help out.  Have you ever written a script?

Ask in the DFHack thread, and I'll walk you through the basics.  You will have to do a bit of programming yourself.

Edit2: The DFHack gui/gm-editor script allows setting nicknames.
« Last Edit: January 11, 2024, 01:39:24 pm by 0x517A5D »
Logged

Thorfinn

  • Bay Watcher
    • View Profile
Re: Is there a way to name farm animals?
« Reply #2 on: January 11, 2024, 01:56:07 pm »

Thanks!

I'll DL DFHack now.

It's been about 3 decades since I've coded anything significant in C, but I do teach lead an extension class for the local high school in scripting -- Lua, Ruby, Python, Javascript, that kind of thing. But looks like with gm-editor, I don't even have to do that. ;)
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Is there a way to name farm animals?
« Reply #3 on: January 11, 2024, 06:42:09 pm »

It'll work, sure.  Just realize that gm-editor is a Swiss-army chainsaw, and you're using the folding pencil attachment to write your note on the animal's collar.  It's a very powerful tool, is what I'm saying.

If you have a basic grasp on Lua syntax, you're about a quarter of the way to writing a script.  The other requisites are reading the DFHack Lua API docs, looking at scripts that do something similar to your intended use, and exploring the internal data structures with gm-editor.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Is there a way to name farm animals?
« Reply #4 on: January 11, 2024, 11:21:07 pm »

I'm pretty sure DFHack has a rename command (gui/rename?) with a keybind already set. Should just be ctrl+n or whatever with a unit selected. There's probably an indicator for the keybind on the unit's page.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Is there a way to name farm animals?
« Reply #5 on: January 14, 2024, 12:26:05 pm »

I'm pretty sure DFHack has a rename command (gui/rename?) with a keybind already set. Should just be ctrl+n or whatever with a unit selected. There's probably an indicator for the keybind on the unit's page.

Rename, gui/rename, and names are all listed as “unavailable” in the current version of DFHack.
Logged
Really hoping somebody puts this in their signature.

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Is there a way to name farm animals?
« Reply #6 on: January 14, 2024, 01:57:10 pm »

Note that Thorfinn is playing the last pre-Steam version.

That does have gui/rename .

I had completely forgotten about it after a year with the Steam-release DFHack.
Logged

Thorfinn

  • Bay Watcher
    • View Profile
Re: Is there a way to name farm animals?
« Reply #7 on: January 15, 2024, 03:17:29 pm »

Thought I'd mention that "rename" works great. First, cage the females and pasture the males in 1x1s where you want them. Release all the females of one species from the cage while you place nest boxes where you want that species, let them claim whichever box they want, then "k" on each,

rename unit 1
rename unit 2

etc. When you go back to assign zones, you now know which female is sitting on which eggs, which are most likely fertile because the males were already in place.

Thanks!
Logged

doublestrafe

  • Bay Watcher
  • [PONY_DEPENDENT]
    • View Profile
Re: Is there a way to name farm animals?
« Reply #8 on: January 16, 2024, 08:03:53 pm »

Long as you're using dfhack, there's always autonestbox...
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Is there a way to name farm animals?
« Reply #9 on: January 18, 2024, 08:20:18 am »

Also, enabling the nestboxes plug-in with
Code: [Select]
enable nestboxes will cause DFHack to automatically scan for and forbid fertilized eggs, preventing them from being collected by your dwarves.
Logged
Really hoping somebody puts this in their signature.

Thorfinn

  • Bay Watcher
    • View Profile
Re: Is there a way to name farm animals?
« Reply #10 on: January 29, 2024, 07:56:27 pm »

Long as you're using dfhack, there's always autonestbox...
I must not be using it properly. It seems all the females get assigned nest boxes nowhere near the males, though from time to time, it seems simply walking past a pastured male 3 blocks away through a forbidden door is enough to fertilize eggs. I think it would be fine to do that with all the firstbrood who are just layers, since you only need a hen or two locked in a room to get a poultsplosion. Or was that what it was intended to do? That would work quite well if you wanted to trade lavish meals.

Also, enabling the nestboxes plug-in with
Code: [Select]
enable nestboxes will cause DFHack to automatically scan for and forbid fertilized eggs, preventing them from being collected by your dwarves.
Works pretty well. As long as I know which are fertile anyway, why not do it automatically? Thanks.
Logged