Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: [44.12] Gremlins and modded animal people !SCIENCE! ( Intelligent exotic pets )  (Read 7095 times)

Jundavr

  • Bay Watcher
    • View Profile

So what I heard is that by adding the [PET_EXOTIC] tag to any intelligent creature (such as animal people) you'd be able to train them should they be captured, and eventually have they become a citizen.

In vanilla, gremlins are the only ones like this by default: intelligent and exotic pets, and I've heard of quite a few stories of people integrating them in their fort.

I have a few doubts about this probably unintended behavior and its caveats, and also would like to share a few facts I've learned about it, in order to compile a handy list of information for people trying this same gimmick.

Context: I captured some kea men trying to steal my valuable ☼cherry wood wheelbarrows☼, and since I disabled migrants to raise a fort through families alone, I decided to enslave integrate these wonderful bird people into my fortress.

Normally, what you do is train them once while they're in their cages and then release them (build the cages and link them to a lever). That's because once they're trained, they'll need to eat and drink and sleep, and while dwarves will bring them food and water, they can't sleep in cages and will go insane.
Alternatively, you can chain them all in an animal training zone and let them sleep on the floor and be fed by your dwarves, but since we want to integrate them in a more friendly way, let's not cover that.

Here's what I have so far:

Spoiler (click to show/hide)


Anyone has any idea how long petitions usually take to occur?
Also, any comments on the mechanics and inner workings of Dwarf Fortress that allow this to happen? Just like the drunk cats thing, I assume this is an unintended but fun behavior, and understanding it could lead to cool mods and more stupid challenges to try.
The animal people aspect of the game definitely could use more features rather than just "Yeah this weirdo here joined that site during world gen" and "You can play as a furry in adventure mode!".
I'll upload a save later if requested.
« Last Edit: October 29, 2019, 04:03:14 pm by Jundavr »
Logged
I was out in the rain. So exasperating!

PatrikLundell

  • Bay Watcher
    • View Profile

Experience with gremlins:
- Yes, when initially trained they somehow automatically are considered having passed the first petition and are concurrently residents and livestock (can be marked for slaughter, for instance, though I haven't done so). Since they're caught as grownups then need constant retraining, which works reasonably well when residents. Note that gremlins are too small to wear any clothing that can be made in a fortress, so I've modded them to be kobold size after having lost them due to nudity induced insanity before they petition for citizenship and are able to make clothes themselves.
- After two years as residents, they (and everyone else except fighter types) petition for citizenship unless to mentally unstable to be able to do so (due to not performing crafts, etc. while waiting).
- I haven't seen any odd trainer following in my gremlins, but I always use "anyone can train" and has that labor enabled on everyone.
- Once they become citizens (re)training becomes a royal pain, because showing up for retraining apparently has a lower priority than just about any other job. I've resorted to burrowing every time, until I gave up and DFHacked them to Tame when becoming citizens.
- They can NOT be assigned jobs using the vanilla DF interface, but are automatically assigned all hauling jobs. DT allows job allocation, however.
- You can not see their thoughts, which makes them very unsuitable for noble positions ("Gremlin G1" has made a demand that you can't view). They do have thoughts, preferences, etc. that can be displayed by scripts, but the vanilla interface does not show it.
- Sapient citizen eggs are collected and eaten, according to reports.
- I'd expect sapient livestock to be subjected to the same marriage rules as dorfs. Given the longevity and rarity of gremlins, the chance of catching two of opposite genders with an age gap of less than 10 years is virtually impossible, so I've never managed to encourage any marriages.
- Haven't noted gremlins holding on to mugs, but haven't looked hard.
- It may be that one or more of the tags that allow animal people to be played as adventurer/join other settlements also allow them to have visible thoughts and allows job allocation even when a pet tag is added, but I don't know if that's been investigated.

Note that most animal peoples CAN become normal citizens, but they have to join a different settlement first as they can't come from the wild to player fortresses. Visiting, let alone petitioning animal people are very rare, though. However, those animal peoples behave as normal visitors->residents->citizens, with quirks added for egg laying, grazing, and meandering (and possibly a few others). Also, flier pathing has issues.

Animal people integration/gremlin oddities are, I believe, largely incomplete features.
Logged

Jundavr

  • Bay Watcher
    • View Profile

-So not needing clothes isn't linked to having a civ, since your gremlins went insane due to it.
-Marking them for butchering does nothing since they are [INTELLIGENT]
-I have only one dedicated animal trainer, maybe he formed bonds with them. I'm very oblivious as to the inner aspects of animal training and wasn't able to find much info on it, but I have found out that it's normal for trained creatures to form bonds and then follow their trainers around. Not sure if the bonding and following are related.
-You think that having a pet tag is what blocks labor changing and thought viewing? That's going to be simple enough to test once my bird people petition. Edit: it is. Anything that has a pet tag is considered an animal, even if intelligent, and can't have their labors changed or thoughts viewed.
-Why can't clothes be made gremlin sized? What made them unsuitable for the size list? Is the list declared somewhere? I doubt it is, since it's fairly long and would be too laborous to update it for every animal person added in the future. So, the question is: what makes creatures be added to that list? Maybe it's also related to what citizens you can and can't control and view thoughts.
-Not mentioned in my original post: DT allows the allocation of jobs to pretty much anything that's part of your fort, but it is restrictive as to not allow players to do things that shouldn't be possible in the game. Since capturing trainable civless wild beings wasn't something that would happen in a normal game, DT has the unintended feature of letting you change captured intelligent pets' labours while they're wild. Once trained, they're part of your fort and DT considers them a long term visitor, as "normal".


EDIT: Some quick raw dive in animal people made something stick out: the tag [APPLY_CREATURE_VARIATION:ANIMAL_PERSON]. Maybe that's what makes animal people have their clothes size selectable.

UPDATE: Yeah, I think I got it. Might be unrelated to my original post, but it's !SCIENCE! nonetheless.
Spoiler (click to show/hide)
« Last Edit: October 29, 2019, 04:06:27 pm by Jundavr »
Logged
I was out in the rain. So exasperating!

PatrikLundell

  • Bay Watcher
    • View Profile

Once they "petition" they acquire a civ, so in that respect it's related to belonging to a civ. They went about the caverns for 700 or so years without clothing before that...
- I think following is related to bonding.
- I don't know if visible thoughts are connected to the presence of the pet tag or the absence of one of the tags that allow them to become naturalized civ members "normally".
- The list of clothing sizes you can make is based on the species that can become naturalized civ members. Gremlins don't have the associated tag.

- There are two tags that control whether creatures can be played as adventurer and join civs, respectively. Note that Plump Helmet Man and Gorlaks aren't animal people in the animal variation sense, but they can still join civs (and wear clothes. The only time I had one it was possible to produce the standard set of clothes, but some weren't worn, possibly because of the peculiar body shape).

Much of the above is present in the "spoiler" section.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile

Probably should mention what happens when you fail retraining of a citizen gremlin and they revert. I imagine interruption spam, but haven't tested.

PatrikLundell

  • Bay Watcher
    • View Profile

Since I hack my gremlins to tame when they become citizens (manually, not through a script), I don't know what happens if they revert. While residents and reverting they behave as wild animals, and I've put them down, having no useful alternative.
Logged

Jundavr

  • Bay Watcher
    • View Profile

Two kea men petitioned and I made some experiments.

- As somewhat expected, their pet tag doesn't let you change their labors or view their thoughts. Modding the raws again to remove these tags allows these things and makes them regular citizens.

- They won't stop following their trainer, and won't do any of their assigned labors (I used Dwarf Therapist to change them). Getting rid of the trainer, either through death or expulsion, fixed this. In the case of expulsion, the trainer came back with the autumn caravan as outpost liaison, since that position was free and there were no other histfigs (dying civ), and the kea people kept following him until he went away. Looking at the trainer's relationship screen shows that all the animals he worked with are listed as "bonded", which is obviously the cause for this. Legends viewer shows that the trainees reciprocate this relationship with their trainers. Following the trainer wasn't what was causing the labor ignoring (but it aggravated the issue), it was the natural thieving behavior of the keas that the kea men inherited.

Right now I'm quite interested in the "following bonded trainer" mechanic. Gm-editor shows every kea men have their "following" field pointing to the trainer. I couldn't figure out where to see a unit's relationships, such as friends and acquaintances.

Also, it's probably just my inexperience, but I can't find a way to null the "following" pointer to see what happens. Most likely they'll just start following him again.

By the way, they never letting go of mugs was indeed being caused by following the trainer, since getting rid of him made this behavior stop.
« Last Edit: October 29, 2019, 12:04:33 pm by Jundavr »
Logged
I was out in the rain. So exasperating!

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile

The rest of the relationships are stored in historical unit data, though wild keamen won't have that (and thus won't be able to breed). But one can become historical through even just talking, so your keamen may be now able to.

Alt+s "nil" to set the unit followed to nil (default value).

Jundavr

  • Bay Watcher
    • View Profile

Thanks, Fleeting Frames!

- Nulling the follow pointer makes them stop swarming the trainer, start returning the mugs, and the citizen ones start doing their labors. I haven't played long enough to see if they eventually start following him again. Will keep an eye on that.

- There's a field dfhack names relationship_ids, and it's an integer vector that contains the histfig ids of that unit's spouse, pet, parents, and even some transient relationships such as who is that unit dragging or being dragged by.  As explained in the next  post, those are local unit ids used by the fort, not something related to histfigs.

- Anything that becomes a part of a player fort is a histfig, and the kea men became when they were first trained. Legends viewer shows that even the peafowls I embarked with are histfigs.

When I get the chance I'll do some testing with making them wild.
« Last Edit: October 29, 2019, 11:59:41 am by Jundavr »
Logged
I was out in the rain. So exasperating!

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile

I suppose they could rebuild the relationship. But that's interesting bits about following anyway, I don't think anybody has mentioned the mugs bit before. (It obviously could be useful to set your captain of the guard to follow your king around rather than doing jobs, or perhaps for getting two dwarves to socialize - unless it overrides building relationships with following.)

The relationship ids doesn't contain histfig ids, but local fortress unit ids (which is something everybody who visits your local fortress gets, and is different from histfig).

You can verify this by looking at one married unit's id and and hist_figure_id, then look at their spouse and confirm that the relationship_ids.Spouse is the former, not the latter. You can access the historical unit data with gui/gm-editor by dfhack command gui/gm-editor df.historical_figure.find(hist_figure_id), where you replace the id with appropriate number.

Jundavr

  • Bay Watcher
    • View Profile

Lots of quality info there.

Got it, I'll correct what I said about relationship_ids using histfig ids.

It's still curious how stuff in your fort that's part of your civ all get to be histfigs. Do these histfigs get culled once you retire/lose? That would obviously imply making some exceptions, for bonded creatures for example.

Yeah, they definitely would rebuild the relationship with another training session, but hacking them into tame once they become citizens should avoid this. Or letting them go wild, depending on what happens then, I haven't tested yet.

http://www.bay12forums.com/smf/index.php?topic=172722.0
I found a few posts like this from PatrikLundell pointing out how the relationship data is stored in a unintuitively way.
I also found some handy data structure documentation on GitHub that's going to be useful to figure out how to better tinker with this data, but I think it'll be a while before I get free time again.
« Last Edit: October 29, 2019, 09:20:34 am by Jundavr »
Logged
I was out in the rain. So exasperating!

Jundavr

  • Bay Watcher
    • View Profile

Important update:

I was COMPLETELY wrong about the mugs and the not doing jobs issue.

It's unrelated to training and animal people, and specific to the [CURIOUSBEAST_ITEM] tag that the kea men got from the base animal. Once they get hold of something, they won't let go, due to the tag making them hold on to it so they can take it away when they eventually leave the site. Trained animals with this tag doesn't go out of their way to pick up something, but the kea men were occasionally picking up mugs (hauling them, more specifically) in order to drink, and would hold on to them for a VERY long time. Sometimes they would indeed return them, and I'm not sure why. Maybe because they had queued something else to do after drinking that overrid the tag behavior.

Is there any specific way to edit the raws that lets you remove existing tags? Something like [REMOVE_TAG:TAG_I_DONT_WANT]. I assume there isn't, which is a shame since I don't want to mod the regular kea behavior just so my kea people don't walk around with their precious cups and ignore jobs. Maybe copying manually the tags from [BIRD_KEA] instead of using [COPY_TAGS_FROM:] would work around this.

Could this be marked as a bug? Just like the [MEANDERER]s, any [CURIOUSBEAST_ITEM] animal person citizen in a fort will display buggy behavior.
Easy to reproduce: make fort, retire fort, make kea man (or other thief) adventurer at fort, retire adventurer, unretire fort, "MY PRECIOUS MUGS" or anything else they begin to haul, really.
Possible fixes: (likely to be stupid ideas due to my ignorance on the internal workings of the game)
1- Make [APPLY_CREATURE_VARIATION:ANIMAL_PERSON] remove tags like [MEANDERER] and [CURIOUSBEAST_ITEM], if tag removal is supported to begin with. Otherwise just make it apply a tag that cancels this behavior.
2- Make a variation of [COPY_TAGS_FROM:] for animal people that doesn't copy such tags. This could affect intended behavior, such as kea men no longer trying to steal stuff. But since they have personalities and values, should a honest kea man really be trying to steal stuff?
3- Make the behavior associated with these tags only occur if the animal person isn't part of a civilization.


As a side note, I think I found a bug in Dwarf Therapist that makes it not correctly mark creatures unable to wield certain weapons. In the image, the kea man clearly hasn't enough size to wield an axe, yet it is flagged as being able to.

(images never seem to show for me, why is what? am I doing something wrong here? they can be left clicked and viewed, though)
« Last Edit: October 29, 2019, 03:56:13 pm by Jundavr »
Logged
I was out in the rain. So exasperating!

DerMeister

  • Bay Watcher
    • View Profile

Important update:

I was COMPLETELY wrong about the mugs and the not doing jobs issue.

It's unrelated to training and animal people, and specific to the [CURIOUSBEAST_ITEM] tag that the kea men got from the base animal. Once they get hold of something, they won't let go, due to the tag making them hold on to it so they can take it away when they eventually leave the site. Trained animals with this tag doesn't go out of their way to pick up something, but the kea men were occasionally picking up mugs (hauling them, more specifically) in order to drink, and would hold on to them for a VERY long time. Sometimes they would indeed return them, and I'm not sure why. Maybe because they had queued something else to do after drinking that overrid the tag behavior.

Is there any specific way to edit the raws that lets you remove existing tags? Something like [REMOVE_TAG:TAG_I_DONT_WANT]. I assume there isn't, which is a shame since I don't want to mod the regular kea behavior just so my kea people don't walk around with their precious cups and ignore jobs. Maybe copying manually the tags from [BIRD_KEA] instead of using [COPY_TAGS_FROM:] would work around this.

Could this be marked as a bug? Just like the [MEANDERER]s, any [CURIOUSBEAST_ITEM] animal person citizen in a fort will display buggy behavior.
Easy to reproduce: make fort, retire fort, make kea man (or other thief) adventurer at fort, retire adventurer, unretire fort, "MY PRECIOUS MUGS" or anything else they begin to haul, really.
Possible fixes: (likely to be stupid ideas due to my ignorance on the internal workings of the game)
1- Make [APPLY_CREATURE_VARIATION:ANIMAL_PERSON] remove tags like [MEANDERER] and [CURIOUSBEAST_ITEM], if tag removal is supported to begin with. Otherwise just make it apply a tag that cancels this behavior.
2- Make a variation of [COPY_TAGS_FROM:] for animal people that doesn't copy such tags. This could affect intended behavior, such as kea men no longer trying to steal stuff. But since they have personalities and values, should a honest kea man really be trying to steal stuff?
3- Make the behavior associated with these tags only occur if the animal person isn't part of a civilization.


As a side note, I think I found a bug in Dwarf Therapist that makes it not correctly mark creatures unable to wield certain weapons. In the image, the kea man clearly hasn't enough size to wield an axe, yet it is flagged as being able to.

(images never seem to show for me, why is what? am I doing something wrong here? they can be left clicked and viewed, though)
I normal play with ogres that are meanderers too. What bugs you mean?

3 variant is better, but needs Toady and furter update.
Logged

Jundavr

  • Bay Watcher
    • View Profile

I normal play with ogres that are meanderers too. What bugs you mean?

This bug http://www.bay12games.com/dwarves/mantisbt/view.php?id=9588
Meanderer makes them slow unless they're performing a job. In the case of hauling, for example, they move slowly until they pick up the item, then move normally.
Logged
I was out in the rain. So exasperating!
Pages: [1] 2