Modding Help Is it possible to make a farmable animal capturable and killable?

Discussion in 'Starbound Modding' started by FrAndromeda, Oct 5, 2016.

  1. FrAndromeda

    FrAndromeda Subatomic Cosmonaut

    Hey everyone,

    I've been working on a mod that includes breeding animals.
    The farmable animals have completely different behavior from killable and capturable monsters. I haven't been able to make a farmable animal become capturable (probably because the .behavior file is so different). I've gotten as far as being able to throw the pod at it, the animal disappearing (it drops something as if it has died, which effectively, it has) and the pod staying empty.

    Is there a step-by-step that tells you what files to edit and what's important to add? I've edited the .monstertype file and made attempts at editing a custom .behavior file to have code from a monster, but there's no telling for me what should be changed. I must have forgotten something important, but I can't find any extra info online. I can't compare to an existing mod because I couldn't find any with farmable animals that can be captured. A lot of the info I found is very old.

    Thanks in advance for any tips!
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    A lot of modding is undocumented is because people don't document.
    You will have to be a pioneer and explore the wilderness and document your adventures.
     
    FrAndromeda and Inf_Wolf14 like this.
  3. FrAndromeda

    FrAndromeda Subatomic Cosmonaut

    My adventures mostly involve undoing all my changes and see letters and numbers burned into my vision permanently, but I'll be sure to write down what I've done if it works out. There's so little information and so many people saying "I've fixed it on my own after pulling all my hair out, thanks anyway!" and then not writing down the actual solution... I shouldn't be one of those people, lol.
    I'll try to document anything useful!

    What I could definitely do is write out how I cloned a monster, adult state, baby state, egg. It's simple but it could be useful anyway. I'm very much a beginner but who knows? Maybe someone could use it!
     
    The | Suit likes this.
  4. FrAndromeda

    FrAndromeda Subatomic Cosmonaut

    I'm now able to do damage to a farmable creature. It doesn't attack me back (yet) but working on that.

    I made a clone of a fluffalo. I edited the .monstertype file to include this:

    "behaviorConfig" : {
    "damageOnTouch" : false,

    "targetOnDamage" : false,

    "wanderActions" : [
    {
    "name" : "wander-walk",
    "cooldown" : [10, 20],
    "parameters" : {
    "wanderTime" : [5, 10],
    "moveState" : "move"
    }
    }
    ],

    "followActions" : [
    {
    "name" : "approach-teleport",
    "parameters" : {
    }
    },
    {
    "name" : "approach-walk",
    "parameters" : {
    "moveState" : "move",
    "fallState" : "jump"
    }
    }
    ]
    },



    "aggressive" : false,
    "damageTeam" : 1,


    Copied from pinfriend.monstertype, keep in mind that I don't know what everything does exactly, and that file may be outdated.
     
    The | Suit likes this.
  5. LunarDog

    LunarDog Tentacle Wrangler

    you could try looking inside the npc guard codeing for the if hurt by player then hurt player thing
     
    FrAndromeda likes this.

Share This Page