Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need Help With Creating A New Item  (Read 1210 times)

NaruHime

  • Escaped Lunatic
    • View Profile
Need Help With Creating A New Item
« on: March 22, 2023, 02:59:40 am »

Hello,

I'm wanting to create an item that would let my Amazonian race procreate without males.

It could even be a racial trait.

Basically, I just need to know if this is feasible and if it is where I can find the resources to study and implement it.

Much appreciated.

-Naru
Logged

brushapocalypse

  • Bay Watcher
  • creatures creaching
    • View Profile
Re: Need Help With Creating A New Item
« Reply #1 on: March 24, 2023, 06:41:22 pm »

Unfortunately, there isn't any straightforward way of letting a single-gendered species reproduce. The only workaround I know of is to have both Male and Female castes, but making the Male caste extremely rare (similar to the Gerudo from the Legend of Zelda.) This would prevent the species from dying off in worldgen, but reproduction would still be impossible within Fortress Mode unless you happen to get one of those very rare males.

Beyond that, I can think of a couple hypothetical means of Fortress Mode reproduction. My first idea would be to use a reaction to temporarily turn one half of a married couple into a man, and hope that a pregnancy starts during that time. I don't know if that's even possible, though, so someone is going to have to do !!Science!! to figure out if a gender-swapped lesbian can get her wife pregnant.

My other idea would be to use summoning to create new citizens out of thin air, but this comes with its own complications. Summoned creatures are not automatically full citizens; you have to wait a few years for them to petition for citizenship before you can tell them what to do. They'll also spring into existence as full adults, which I assume is not what you're going for. I've previously circumvented this by instead summoning a Male/Female pair of "dummy" castes which are unintelligent and rare to the point of being practically nonexistent, and which only exist long enough to give birth to a litter of babies. However, this wasn't how I maintained the population of the fort, it was just so I could simulate artificial creatures which grow over time instead of being directly summoned at their full size. So I don't really recommend it in this case.

If neither of these ideas sound appealing to you, I'd recommend looking into DFHack (with a disclaimer that I don't use DFHack myself, and have no idea how (if at all) it was affected by the changes in the Steam release.) It can do a lot of things that are impossible with simple raw mods, and I wouldn't be surprised if there's a script out there for exactly this sort of thing. It does require more technical knowledge, though, so it may be unapproachable for a beginning modder.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Need Help With Creating A New Item
« Reply #2 on: March 25, 2023, 03:39:52 am »

You can't add items that have new functionality at all, in fact

NaruHime

  • Escaped Lunatic
    • View Profile
Re: Need Help With Creating A New Item
« Reply #3 on: March 25, 2023, 05:12:37 am »

Unfortunately, there isn't any straightforward way of letting a single-gendered species reproduce. The only workaround I know of is to have both Male and Female castes, but making the Male caste extremely rare (similar to the Gerudo from the Legend of Zelda.) This would prevent the species from dying off in worldgen, but reproduction would still be impossible within Fortress Mode unless you happen to get one of those very rare males.

Beyond that, I can think of a couple hypothetical means of Fortress Mode reproduction. My first idea would be to use a reaction to temporarily turn one half of a married couple into a man, and hope that a pregnancy starts during that time. I don't know if that's even possible, though, so someone is going to have to do !!Science!! to figure out if a gender-swapped lesbian can get her wife pregnant.

My other idea would be to use summoning to create new citizens out of thin air, but this comes with its own complications. Summoned creatures are not automatically full citizens; you have to wait a few years for them to petition for citizenship before you can tell them what to do. They'll also spring into existence as full adults, which I assume is not what you're going for. I've previously circumvented this by instead summoning a Male/Female pair of "dummy" castes which are unintelligent and rare to the point of being practically nonexistent, and which only exist long enough to give birth to a litter of babies. However, this wasn't how I maintained the population of the fort, it was just so I could simulate artificial creatures which grow over time instead of being directly summoned at their full size. So I don't really recommend it in this case.

If neither of these ideas sound appealing to you, I'd recommend looking into DFHack (with a disclaimer that I don't use DFHack myself, and have no idea how (if at all) it was affected by the changes in the Steam release.) It can do a lot of things that are impossible with simple raw mods, and I wouldn't be surprised if there's a script out there for exactly this sort of thing. It does require more technical knowledge, though, so it may be unapproachable for a beginning modder.

Thank you for your detailed and thoughtful reply.

Your gender swap idea is very interesting in terms of just general gameplay. I actually will do some tests (mainly just out of intrigue) if I find anything conclusive or interesting, I will share them here.

The summon angle is VERY interesting to me and I think with a bit of "lore" reasoning could work fairly well. To me the only "problem" would be the only adult spawn. I mean yeah it could just be explained by some lore nonsense such as Amazons are only born in another plain of existence and can only be available to be summoned at a certain age (aka adult). The summoning could also affect their mental state seeing as they are basically newborns into this world. That would explain away their inability to be full citizens until they gain full sentience, or something. It's really the best option for having a 100% female society.

If going to summoning route, I would assume that any other Amazon civilization (non-player) would die out after X amount of time. I personally have their lifespan very long already. I like to grow very attached to my enclaves.

For now, I have actually copied and pasted all the female data and sprites to the males making them essential females that can't give birth. The male birth rate is also super low, and in my head, I just explain this away as a birth anomaly where they have both male and female parts. It's not a very eloquent solution, it is the easiest sadly.

If I may ask since I have never actually attempted to do this, how do you actually summon? I tried to research this, but it was very sparse from my search.

Sorry to bother you with another question.

I really appreciate your very helpful ideas and input!

Kind Regards

-Naru
Logged

NaruHime

  • Escaped Lunatic
    • View Profile
Re: Need Help With Creating A New Item
« Reply #4 on: March 25, 2023, 05:14:15 am »

You can't add items that have new functionality at all, in fact

Thanks for the reply!

That is too bad. Still thank you for letting me know. I appreciate it.

Kind Regards

-Naru
Logged

brushapocalypse

  • Bay Watcher
  • creatures creaching
    • View Profile
Re: Need Help With Creating A New Item
« Reply #5 on: March 25, 2023, 02:43:40 pm »

If I may ask since I have never actually attempted to do this, how do you actually summon? I tried to research this, but it was very sparse from my search.

That, like many things in Dwarf Fortress modding, is also fairly roundabout. There's a couple methods, both of which share the same basic concept: You define a material which will give your Amazon a particular syndrome upon ingestion, and that syndrome gives the Amazon access to the interaction that she uses to summon more Amazons.

The first method, which I'm more familiar with, is this: You define a new material with a very low boiling point, such that it will immediately dissolve into a gas at room temperature. You also need to give this material a syndrome that will be applied to your Amazons when they inhale this gas, which will give them access to an interaction which allows them to summon creatures. You then need to make a reaction (effectively a crafting recipe) to create a boulder (any type of item probably works, but it's typically defined as an inorganic material) made of this material, and make that reaction accessible through a workshop. You assign an Amazon to create this boulder, the boulder turns into gas, the assigned Amazon will inhale the gas, and then she should hopefully summon the new member(s) of your fort. For lore, you could think of it like using a special blend of herbs which they mix into an incense and inhale the fumes. I unfortunately lost the files for the mod I made, otherwise I'd be able to give examples of how I did it.

The second method is similar, but the material is instead defined as a food which gives the syndrome upon being eaten. I'm given to understand this is more consistent than the vapor method (because sometimes they just don't breathe the vapor in), but is also slower and gives less control over who does the summoning, because you can't micromanage what or when your citizens eat. However, I was able to find some example raws in this thread, supplied by Eric Blank. I recommend looking through these no matter what method you go with, as it includes the most important part: The actual interaction used to summon the creature.

There is also a much, much simpler method, which would be to make Amazons innately capable of summoning other Amazons, no crafting or workshops necessary. This has its own problems, because populations are likely to balloon out of control if citizens are allowed to summon more citizens whenever they feel like it. You can limit the allowed frequency of a given interaction by using more syndromes, but as always, that's pretty complicated.

Hope this helps! I wish I could give more specific examples, but as I said I lost my existing files and it really is a lot to rewrite off the top of my head. Let me know if you have any more specific questions!
Logged

NaruHime

  • Escaped Lunatic
    • View Profile
Re: Need Help With Creating A New Item
« Reply #6 on: March 26, 2023, 10:35:34 pm »

If I may ask since I have never actually attempted to do this, how do you actually summon? I tried to research this, but it was very sparse from my search.

That, like many things in Dwarf Fortress modding, is also fairly roundabout. There's a couple methods, both of which share the same basic concept: You define a material which will give your Amazon a particular syndrome upon ingestion, and that syndrome gives the Amazon access to the interaction that she uses to summon more Amazons.

The first method, which I'm more familiar with, is this: You define a new material with a very low boiling point, such that it will immediately dissolve into a gas at room temperature. You also need to give this material a syndrome that will be applied to your Amazons when they inhale this gas, which will give them access to an interaction which allows them to summon creatures. You then need to make a reaction (effectively a crafting recipe) to create a boulder (any type of item probably works, but it's typically defined as an inorganic material) made of this material, and make that reaction accessible through a workshop. You assign an Amazon to create this boulder, the boulder turns into gas, the assigned Amazon will inhale the gas, and then she should hopefully summon the new member(s) of your fort. For lore, you could think of it like using a special blend of herbs which they mix into an incense and inhale the fumes. I unfortunately lost the files for the mod I made, otherwise I'd be able to give examples of how I did it.

The second method is similar, but the material is instead defined as a food which gives the syndrome upon being eaten. I'm given to understand this is more consistent than the vapor method (because sometimes they just don't breathe the vapor in), but is also slower and gives less control over who does the summoning, because you can't micromanage what or when your citizens eat. However, I was able to find some example raws in this thread, supplied by Eric Blank. I recommend looking through these no matter what method you go with, as it includes the most important part: The actual interaction used to summon the creature.

There is also a much, much simpler method, which would be to make Amazons innately capable of summoning other Amazons, no crafting or workshops necessary. This has its own problems, because populations are likely to balloon out of control if citizens are allowed to summon more citizens whenever they feel like it. You can limit the allowed frequency of a given interaction by using more syndromes, but as always, that's pretty complicated.

Hope this helps! I wish I could give more specific examples, but as I said I lost my existing files and it really is a lot to rewrite off the top of my head. Let me know if you have any more specific questions!

You helped me out immensely!

The summoning trick is very interesting and really blew my mind at first! Thankfully with your explanation and guiding me to that forum post it has really enabled me to learn a lot about Syndromes and all that! I appreciate it.

I actually went ahead and tried out the gender swap using my backup plan of having a "male" Amazonian that uses the female sprite and all their stats (essentially female).

Here is the code I used (for anyone who stumbles upon this thread):
Quote
[INORGANIC:CHALK]
[USE_MATERIAL_TEMPLATE:STONE_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:chalk][DISPLAY_COLOR:7:7:1][TILE:176]
[REACTION_CLASS:FLUX]
[REACTION_CLASS:CALCIUM_CARBONATE]
[SEDIMENTARY]
[MATERIAL_VALUE:2]
[IS_STONE]
[MELTING_POINT:NONE]
[BOILING_POINT:10000]
[MAT_FIXED_TEMP:10001]
[SOLID_DENSITY:2710]
[STATE_COLOR:ALL_SOLID:BEIGE]
[SYNDROME]
            [SYN_NAME:Change Gender]
            [SYN_INGESTED]
            [SYN_INJECTED]
            [SYN_INHALED]
            [SYN_CONTACT]
            [SYN_NO_HOSPITAL]
            [SYN_IDENTIFIER] - Changed Gender
[CE_BODY_TRANSFORMATION:PROB:100:START:0]
          [CE:CREATURE:AMAZONIAN:MALE]
[CE_BODY_TRANSFORMATION:PROB:100:START:0]
          [CE:CREATURE:AMAZONIAN:MALE]
[CE_BODY_TRANSFORMATION:PROB:100:START:0]
          [CE:CREATURE:AMAZONIAN:FEMALE]
[CE_BODY_TRANSFORMATION:PROB:100:START:0]
          [CE:CREATURE:AMAZONIAN:FEMALE]


Obviously, I won't keep chalk this way it was just a quick way to test Haha.

Like you said before the trick is getting them to conceive a child. I will probably use DFhack, seeing as getting quick test results will probably be too much of a time investment. So, I will mess around with this tonight in my spare time and report later on what I find.

I am still playing around with summoning because I REALLY like this idea. Also, it's just interesting to learn tbh. I think this has a lot of potential to (within reason) not only play with the female only challenge, but also would be a good tool for subduing other (enemy) races. Sort of like a mobile Amazonian strike force lol. Maybe a tad overpowered so I'm thinking of making a really rare material and adding it in. Something to like very low levels in the earth, as to not be abused too hard!

I'm really only doing this for fun and probably won't release it unless I feel it's really polished. Especially since the sprites I use are actually from another's mods. I do draw my own art I just haven't had the time to do so yet. So if I do release this I will 100% use my own custom art haha. Or if I'm too lazy will just ask the original guy if it's cool. We will see.

Kind Regards

-Naru
« Last Edit: March 27, 2023, 01:41:25 am by NaruHime »
Logged