Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Quite a few questions about various things [0.43.03]  (Read 1131 times)

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Quite a few questions about various things [0.43.03]
« on: February 18, 2017, 12:23:54 pm »

Hey!

I have recently been toying with DF modding, mostly by trial and error, and I've managed to create some stuff thanks to the awesome DF community (cheers btw guys!). However, I've been faced with some issues that I couldn't fix D:

I'll try to present them in an orderly fashion:

1. Several creatures in an entity: I've been led to believe that it used to be not possible to have an entity with more than one creature, besides the caste system. Is it still the case, or has anyone found a way to have a mixed entity?

2. Laboring pets: having created an evil entity, I've been happily surprised by the fact that trolls could be assigned to squads, which is quite neat. Is it possible to assign them various labors, appart from the hauling and construction?[SOLVED: see below]

3. Adding stuff after [COPY_TAGS_FROM:X]:
       a. Attacks: I've created a creature that is the giant version of a type of a custom vermin, and I'd like to add some attacks. Most of the tags that I've added are indeed working, but the [ATTACK:Whatever] seems not to be able to express itself. In Arena, my creature never uses it and just sadly pushes whatever it is fighting.[KINDA SOLVED: attacks defined in creature that inherits tags from COPY_TAGS_FROM] seem to be unable to find the required body parts. This may be a bug.]
       b. Other stuff: Same as above but with the [RETRACT_INTO_BP:Stuff] tag. Is it bugged?

4. Creature covered in different tissues: Is there an easy way to have a creature being covered by, for example feathers for some parts and fur over others without having to create a whole new BODY?[SOLVED: foul blendecs illustrate how to do so quite well.]

5. Amphibian entity: I've been thinking about creating some sort of amphibian entity, but I've also read that the IA doesn't path in water, so how would that work? Ideally, I'd like to be able to create underwater fortresses and such. Has anybody tried that?

6. Being used to working so, my code is available on GitHub. Can I (Should I) share it here?

Any help appreciated! :D
« Last Edit: February 22, 2017, 07:40:55 am by r0bur »
Logged

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #1 on: February 18, 2017, 03:59:04 pm »

I'm not real familiar with advancing modding shenanigans or DFHack, but,

Quote
1. Several creatures in an entity: I've been led to believe that it used to be not possible to have an entity with more than one creature, besides the caste system. Is it still the case, or has anyone found a way to have a mixed entity?

Note that the new visitor system can be kind of a work around.  In Furry Fortress Adventure Mode (where there are a lot of different civs), I've visited cities where multiple races were pretty evenly mixed, or sites that were conquered and have a small population of conquerors alongside a large original population, i.e. a goblin civ might have several vulp cities. 

Unfortunately, I've never seen non-founder races appear as normal immigrants in Fortress Mode, but I have played forts where the founder population was quickly outnumbered by visiting bards and mercs, and after a year I think, they can change from extended visitor status to full citizen status. 

So in trying to engineer a multi-race civ, it might work better to abuse the existing visitor system rather than work around the default mono-race system. 

Back in the advanced modding shenanigans camp, I think you might be able to do something like make a caste with a syndrome in their sweat that transforms them into a different creature.  A lot of mods go nutz with transformation syndromes, but I've never tried that kind of thing. 

Quote
2. Laboring pets: having created an evil entity, I've been happily surprised by the fact that trolls could be assigned to squads, which is quite neat. Is it possible to assign them various labors, appart from the hauling and construction?

In FuFo again, I had a race of amazon ants who had PET males.  The males were sometimes generated with skills, if so, they could perform the associated labors.  Trolls are different, but getting them to do a particular task may just be a matter of having a skill level added. 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #2 on: February 18, 2017, 09:04:57 pm »

Thanks for your feedback!

Quote
Note that the new visitor system can be kind of a work around.

Yeah that would work! Sadly, this isn't controllable enough for me... I wanted something with set proportions (say 10% creature A, 20% creature B, 70% creature C) and all creatures still quite different from one another.

Quote
Unfortunately, I've never seen non-founder races appear as normal immigrants in Fortress Mode

Me neither. But that would be really cool though!

Quote
and after a year I think, they can change from extended visitor status to full citizen status

If I'm not mistaken, performers and such will ask for citizenships while mercs won't.

Quote
Back in the advanced modding shenanigans camp, I think you might be able to do something like make a caste with a syndrome in their sweat that transforms them into a different creature.  A lot of mods go nutz with transformation syndromes, but I've never tried that kind of thing.

I'll try this! I'll have to gather a bit more info on sweat though. Couldn't it work with blood as well?

Quote
In FuFo again, I had a race of amazon ants who had PET males.  The males were sometimes generated with skills, if so, they could perform the associated labors.  Trolls are different, but getting them to do a particular task may just be a matter of having a skill level added.

First, props to you for that great idea of pet caste, this is really brilliant!
I've tried to add [NATURAL_SKILL:X:1] to the troll raws and it works fine, trolls have now this labor activated by default. This is a bit limited though as I didn't find any means to make the previous tag "random" and you can't turn the labors off afterwards. But this is quite cool nonetheless.
Logged

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #3 on: February 19, 2017, 05:45:18 am »

Quote
Back in the advanced modding shenanigans camp, I think you might be able to do something like make a caste with a syndrome in their sweat that transforms them into a different creature.  A lot of mods go nutz with transformation syndromes, but I've never tried that kind of thing.

So! I just tried that out and it works.
Spoiler (click to show/hide)

Results are the following:
- This does not have any effect on world generation (this was to be expected though), so in my case, the plump helmet army didn't roll in.
- At the very beginning of a Fortress mode game, you get "Urist, Profession has transformed into a plump helmet man", and said dwarves lose their clothing when transforming.
- (this might be specific on what creature you're turning into) my plump helmet men now appeared under the "Pet" list, with their profession name as well, as they kept their skills. It was not possible to assign or unassign them different labors after their transformation, much like the trolls for the evil civs.

So in the end, it offers much more control over what creatures you can mix, and the proportion you want, but it still feel quite clunky imo.

Logged

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #4 on: February 19, 2017, 07:41:50 am »

I can't take credit for the idea of a pet caste, I think someone on the forums had suggested it to me.  (I forget who unfortunately) 

Sorry if this is too basic, I would make sure to try that with an INTELLIGENT creature.  INTELLIGENT is the combination of CAN_LEARN and CAN_SPEAK, the two of which I think are a prerequisite for certain DF functions.  I think not having the INTELLIGENT tag (or specifically CAN_SPEAK) is what prevents a troll from working in the fortress, although I suspect having it would also prevent them from being troll-like, appearing in sieges and so forth. 

I think that you can give tags as part of a syndrome though, so you could make them touch something or drink something that makes them INTELLIGENT. 



As for showing up in World Gen, I was thinking maybe you could make the transformation caste have the name as the thing they are going to turn into.  So in this case, call the 4 castes, dwarf male, dwarf female, mushrooman, mushroomaid.  Then mushrooman and mushroomaid have the syndrome that turns themselves into a different creature that also has the caste names mushrooman and mushroomaid.  You could even give the mushrooman castes the same bodies as the other creature, different size, chitin instead of flesh, etc, for whatever calculations happen behind the scenes. 

(I found out quite by accident that caste name completely overrides the creature name.  The first time I tried to write Vulps in Furry Fortress, I gave males and females the caste-names "renard" and "vixen".  When I tried to search for "vulp" in arena mode, there was nothing, but plain old "renard" and "vixen" did show up.  So in the end I had to call the castes "vulp renard" and "vulp vixen".  ) 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #5 on: February 19, 2017, 11:13:13 am »

Thanks a lot man! I've just tried testing to sweat-transform to an elf (as heretic as it gets) and they didn't become pets, but rather normal citizens. The Plump Helmet man mislead me. So I can do that which is really nice.

Quote
although I suspect having it would also prevent them from being troll-like, appearing in sieges and so forth.
It might yeah :(

This also answered some of my questions regarding troll! If I can somehow get them to learn how to speak, I'll make them INTELLIGENT (as they already CAN_LEARN). I believe it is possible to define special interaction [CDI...] and have apply syndromes. So I could even have a caste dedicated to teaching trolls (RP-wise) which would just apply the syndrome on greeting and make them intelligent after a while!

And the idea of naming the caste to "hide" the inner working is really cool as well! I'll have legends mode working quite as intended :)

Plenty of food for thought here, I'm gonna try to make it possible :D
« Last Edit: February 19, 2017, 11:15:45 am by r0bur »
Logged

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #6 on: February 22, 2017, 04:57:42 am »

So I solved most of my questions regarding trolls and I wanted to share how I did it.

So as I started to understand in my previous post the difference (among creatures that can perform labors) between appearing in the Pets/Livestock tab or the Citizens one (and more generally being assigned/unassigned specific labors) is the INTELLIGENT tag, which is the combination of CAN_LEARN and CAN_SPEAK.

What I wanted to do from then on was to assign the CAN_SPEAK tag to trolls so they could join my fortress as citizens. I could have simply added the tag to the troll raws but this would have impacted the behaviour of the wild ones and I didn't want that. The solution that I came up with and that is quite easily replicated is to have some creature of yours to teach them how to speak. This is done with the following:

Teaching Interaction:
Code: [Select]
[INTERACTION:TROLL_TEACHING]
  [I_SOURCE:CREATURE_ACTION]

  [I_TARGET:A:CREATURE]
    [IT_LOCATION:CONTEXT_CREATURE]

  [I_TARGET:B:CREATURE]
    [IT_LOCATION:CONTEXT_CREATURE]
    [IT_AFFECTED_CREATURE:TROLL:ALL]
    [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
    [IT_FORBIDDEN:CAN_SPEAK]
    [IT_MANUAL_INPUT:troll]

  [I_EFFECT:ADD_SYNDROME]
    [IE_TARGET:B]
    [IE_IMMEDIATE]
    [IE_ARENA_NAME:Educated troll]
    [SYNDROME]
      [SYN_NAME:understanding of language]
  [CE_DISPLAY_NAME:NAME:citizen:citizens:citizen:START:0]
        [CE_ADD_TAG:CAN_SPEAK:START:0]

And inside the teacher creature:
Code: [Select]
[CAN_DO_INTERACTION:TROLL_TEACHING]
[CDI:ADV_NAME:Teach]
[CDI:USAGE_HINT:GREETING]
[CDI:TARGET:B:LINE_OF_SIGHT]
[CDI:VERB:teach:teaches:NA]
[CDI:TARGET_VERB:learn:learns:NA]
[CDI:TARGET_RANGE:B:15]
[CDI:MAX_TARGET_NUMBER:B:1]
[CDI:WAIT_PERIOD:30]

I hope this can help to solve some answers for any of you!
Logged

StagnantSoul

  • Bay Watcher
  • "Player has withdrawn from society!"
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #7 on: February 22, 2017, 05:21:03 am »

Check out foul blendecs I believe for having different tissues, though I think in their case it's just removed.
Logged
Quote from: Cptn Kaladin Anrizlokum
I threw night creature blood into a night creature's heart and she pulled it out and bled to death.
Quote from: Eric Blank
Places to jibber madly at each other, got it
Quote from: NJW2000
If any of them are made of fire, throw stuff, run, and think non-flammable thoughts.

r0bur

  • Bay Watcher
  • Urist McCoffee
    • View Profile
Re: Quite a few questions about various things [0.43.03]
« Reply #8 on: February 22, 2017, 07:38:22 am »

Thanks for the answer! The foul blendecs illustrate perfectly what I wanted :D
Logged