Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Fertility modding  (Read 1077 times)

Crazy Horse

  • Bay Watcher
    • View Profile
Fertility modding
« on: July 05, 2015, 08:08:02 pm »

Hello, I've just gotten into .40.24 after some time away from DF and wonder about dealing with the orientation feature. I noticed it when my embark rooster and alpaca studs were infertile.. presumably because the little darlings had the leisure time and intelligence to evolve political parties and then took a left turn. Is there an available mod that removes this sort of infertility yet?

Or at least an easier way than to add orientation tags individually to everything. I'll tinker around with notepad++ and see if there's a shortcut.
Logged

Crazy Horse

  • Bay Watcher
    • View Profile
Re: Fertility modding
« Reply #1 on: July 05, 2015, 09:05:52 pm »

It's only the work of a few minutes actually. If anyone else prefers the v.034 fertility then open all creature raws at once in Notepad++. Use search and hit replace tab then click on extended search mode.

Find what: [MALE]

Replace with: [MALE]\r\n[ORIENTATION:MALE:1:0:0]\r\n[ORIENTATION:FEMALE:0:0:1]

Hit 'replace in all open documents' then repeat with inverse orientation values for females.
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Fertility modding
« Reply #2 on: July 05, 2015, 10:17:40 pm »

The [ORIENTATION:MALE:1:0:0] isn't actually necessary unless you have some problem with your farm animals being bisexual, as they'll still breed off they are.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Crazy Horse

  • Bay Watcher
    • View Profile
Re: Fertility modding
« Reply #3 on: July 06, 2015, 10:35:50 am »

That hardly matters even if it's been tested to work. There would be no effect on game mechanics and the only way to even tell if a farm animal had been selected to be bi would be to use DFHack. Unmodified orientation however causes 1 in 4 animals to be effected by the outstanding fertility bug as the wiki clearly states. I'll use the tags suggested by the wiki as it seems to work just fine after generating a new world.
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Fertility modding
« Reply #4 on: July 06, 2015, 11:34:53 am »

PyDwarf and Rubble both have mods that automatically handle exactly this, pineapple.orientation in the case of the former and User/Fix/Gays in the latter.

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Fertility modding
« Reply #5 on: July 06, 2015, 12:23:24 pm »

That hardly matters even if it's been tested to work. There would be no effect on game mechanics and the only way to even tell if a farm animal had been selected to be bi would be to use DFHack. Unmodified orientation however causes 1 in 4 animals to be effected by the outstanding fertility bug as the wiki clearly states. I'll use the tags suggested by the wiki as it seems to work just fine after generating a new world.
Yeah, that's what I'm saying. It doesn't matter.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Crazy Horse

  • Bay Watcher
    • View Profile
Re: Fertility modding
« Reply #6 on: July 06, 2015, 12:46:42 pm »

Thanks, madk. That tool looks like a far better way to edit the raws from now on. Cheers.
Logged

DwarfCon5

  • Bay Watcher
  • Over and Under
    • View Profile
Re: Fertility modding
« Reply #7 on: July 07, 2015, 05:27:55 pm »

It's only the work of a few minutes actually.

Hello Crazy Horse.

I want to get rid of animal peoples from the raws and they all have the title [CREATURE:PENGUIN_MAN], just substitute the animal. In Notebook++ I am able to collect all occurences of animal people by (F)inding "MAN]" in every document.

A simple way to clear the lists would be to delete the "[" first bracket changing the entire thread into a comment, removing animal peoples from the game. Know how I can do that? The find box has a "wrap around" checkbox which I thought would add all creatures into queue by putting "[CREATURE:MAN]" on the line as it has all characters included in that sentence for every creature person, but no go.

Could I even delete the bracket in "MAN]" to stop all of them from appearing?

The simplest way I have found to get this done is to change the codes into comments all at once using Notebook++ otherwise I have to go through 157 entries and delete them all manually, clicking shift+f, shift+v to put "person" in the find, and finding the next one down.
« Last Edit: July 07, 2015, 05:34:57 pm by DwarfCon5 »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Fertility modding
« Reply #8 on: July 07, 2015, 06:15:50 pm »

I had created a python script a while ago to separate all the animal men and giant variations of creatures into their own file. You could check if it still works on the new version.

http://www.bay12forums.com/smf/index.php?topic=130140.0
Logged

Crazy Horse

  • Bay Watcher
    • View Profile
Re: Fertility modding
« Reply #9 on: July 08, 2015, 07:55:25 am »

 Hiya. My own knowledge of notepad is pretty basic and limited to trial and error but I did a forum search and luckily someone has found a method for this. http://www.bay12forums.com/smf/index.php?topic=141419.0
Logged

madk

  • Bay Watcher
    • View Profile
    • pineapplemachine
Re: Fertility modding
« Reply #10 on: July 08, 2015, 08:07:47 am »

Here's a pydwarf script that removes animal men:

Code: [Select]
import pydwarf

@pydwarf.urist(
    name = 'pineapple.noanimalmen',
    version = '1.0.0',
    author = 'Sophie Kirschner',
    description = '''
        Removes all creatures which either have a [APPLY_CREATURE_VARIATION:ANIMAL_PERSON]
        token or have an ID ending in '_MAN'.
    ''',
    arguments = {},
    compatibility = (pydwarf.df_0_3x, pydwarf.df_0_40)
)
def noanimalmen(df):
    # Do the removing
    removed = [removedprop for removedprop in df.allobj('CREATURE').each(
        lambda token: token.removeselfandprops() if token.arg().endswith('_MAN') or token.getprop('APPLY_CREATURE_VARIATION:ANIMAL_PERSON') else None
    ) if removedprop]
   
    # All done!
    if removed:
        return pydwarf.success('Removed %d species of animal men.' % len(removed))
    else:
        return pydwarf.failure('Found no animal men to remove.')