Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Hi, question regarding an effect...or reaction?  (Read 1516 times)

FatlessComic

  • Bay Watcher
    • View Profile
Hi, question regarding an effect...or reaction?
« on: August 02, 2021, 06:25:49 pm »

New to the modding scene, and I'm currently working on a large humanoid pig-giant, and I want this pig giant to be able to turn lesser beings (dwarves, elves, humans, etc) into pigs, or even lesser pig-men to be his servants. How would I go about doing that? How would I need to write the effect (or reaction..not sure which is which when it comes to modding, still figuring it all out) so that it essentially polymorphs them permanently into a pig?
« Last Edit: August 02, 2021, 07:22:28 pm by FatlessComic »
Logged

Haethei

  • Escaped Lunatic
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #1 on: August 02, 2021, 10:09:12 pm »

You'll need to use an Interaction, not a Reaction (reactions are for crafting). You should spend some time reading these pages, they will help you a lot because Interactions are a little complicated (not much different from other raws once you learn how they work, don't be intimidated).

https://dwarffortresswiki.org/index.php/DF2014:Interaction_token

https://dwarffortresswiki.org/index.php/DF2014:Syndrome

At the bottom of this examples page is a prebuilt Interaction for transforming a creature into a demon, you can basically copy it and modify it to your needs, but make sure you understand how to actually use the Interaction on your creature

https://dwarffortresswiki.org/index.php/DF2014:Interaction_examples

You can look at other interaction examples, in the raw files of the game or on the wiki, for inspiration on other effects. You can do a lot with them depsite the limited amount of tokens you get to use.

To help you out a little, I can say with certainty you are able to do exactly what you want here. You can make a custom creature (giant pig man), allow the giant pig man to use an interaction that applies a syndrome, the syndrome will afflict the target with the CE_BODY_TRANSFORMATION effect and turn him into whatever creature you want, even custom ones.

If you start getting more advanced, you may be able to figure out how to make the pig servants different based on the original creature's race. For example, a dwarf turned into a pig will still retain dwarven features like his short height and beard, this would be accomplished by having different castes of pigmen. However, I'm not sure how I would implement the race check myself, it can be tricky sometimes to figure out exactly what combination of tokens you need to accomplish stuff
« Last Edit: August 02, 2021, 10:17:39 pm by Haethei »
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #2 on: August 02, 2021, 10:28:17 pm »

Haethei's right, but I'd like to add that you should also include a restriction to ensure that only [INTELLIGENT] creatures can be turned into pigs, and you'll need to make a new pig creature for it to turn people into. Turning things into regular pigs or using the interaction on animals will cause crashes. You'll need to make sure the victim pig's creature file is written in a manner fairly similar to a standard werecreature. You can see examples of creatures like that here.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #3 on: August 02, 2021, 11:52:27 pm »

Thanks for all the help! I'm not sure if this is exactly correct..but.. here goes!

I am still somehwhat lost as to where I need to put the interaction.. I know it needs to go into the creature's file, but do I need to attach it to the biting? How do I go about this?


Spoiler (click to show/hide)
Logged

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #4 on: August 03, 2021, 12:31:53 pm »

Okay so I think I got it right.. this should work right?

Spoiler (click to show/hide)
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #5 on: August 03, 2021, 08:20:28 pm »

I see a flaw in your whelp transformation. It looks like you're trying to make whelps the same gender they were before the curse, but you've just got the syndromes doubled. Most likely, it'll just make them all female. If you want that, you need to make two syndromes, one that males are immune to and another for females, and then inflict both on a bite. Then the immunities can force the victim to turn into the appropriate whelp caste.
« Last Edit: August 03, 2021, 08:24:19 pm by Enemy post »
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #6 on: August 03, 2021, 09:07:11 pm »

I see a flaw in your whelp transformation. It looks like you're trying to make whelps the same gender they were before the curse, but you've just got the syndromes doubled. Most likely, it'll just make them all female. If you want that, you need to make two syndromes, one that males are immune to and another for females, and then inflict both on a bite. Then the immunities can force the victim to turn into the appropriate whelp caste.

After some trial and error(s), I got it to work! They aren't friendly to the creature that turned it when I've done testing in the arena.. they'll transform into a pigman, but the pig giant will continue beating them to death lol. Is there a way to make it so they'll be friendly to their new creator? Or will they just be pigs to the slaughter?

Spoiler (click to show/hide)
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #7 on: August 03, 2021, 10:04:46 pm »

You could, if you set it up so that the pig-victims are a caste of the main biter and they both have CRAZED. Note that this won't keep them from killing each other in the arena specifically, just because the arena is an exception to the normal rules that forces automatic aggression between everyone who isn't on the same team.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #8 on: August 03, 2021, 10:09:50 pm »

You could, if you set it up so that the pig-victims are a caste of the main biter and they both have CRAZED. Note that this won't keep them from killing each other in the arena specifically, just because the arena is an exception to the normal rules that forces automatic aggression between everyone who isn't on the same team.

Will doing this also effect worldgen as well? Say if I wanted to experiment with the pig giants having the [SEMIMEGABEAST] tag, and they turned people into pigmen, would the pigmen become their pets? Or just join them on their rampage at the site?
« Last Edit: August 03, 2021, 10:44:30 pm by FatlessComic »
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #9 on: August 04, 2021, 12:53:43 am »

In worldgen, I think they’d run off and do their own thing somewhere else.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #10 on: August 04, 2021, 10:47:11 am »

In worldgen, I think they’d run off and do their own thing somewhere else.


Thanks for all your help! I even got it to a point where if they're in the same vicinity and they aren't fighting, they'll sneeze enchanted gold dust onto one another that slightly heals each other and reduces pain lol.
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #11 on: August 04, 2021, 11:30:57 am »

You're welcome, glad it sounds like they're working out!
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

FatlessComic

  • Bay Watcher
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #12 on: August 04, 2021, 01:58:14 pm »

You're welcome, glad it sounds like they're working out!

Another question lol. So in worldgen if my aforementioned creature, is a [SEMIMEGABEAST] and he does infect others during Rampage events in worldgen and they both have crazed tag, will they still attack one another during the Rampage?
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Hi, question regarding an effect...or reaction?
« Reply #13 on: August 04, 2021, 04:23:13 pm »

I would expect the initial attack to continue, but I wouldn’t expect violence after that. If someone gets infected, they’ll probably survive.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!