Modding Help How to add a new monster?

Discussion in 'Starbound Modding' started by YoloJoe, Aug 8, 2016.

  1. YoloJoe

    YoloJoe Space Hobo

    I can't find any tutorials on this, but a lot of mods already do it. I would appreciate if somebody could help me out!
     
  2. Naddox

    Naddox Cosmic Narwhal

    If you're willing to wait, I'll be covering that in my tutorial series here after awhile. Going to be going over crafting benches, weapons, and armor first and than probably new creatures.
     
  3. YoloJoe

    YoloJoe Space Hobo

    I don't really need a tutorial, I just need to know what files to look at.. :p I can figure out the rest :)
     
  4. Naddox

    Naddox Cosmic Narwhal

    Well in that case, just look inside the monster folder in your assets. Everything you need is in there.
     
  5. YoloJoe

    YoloJoe Space Hobo

    My monster is working in game, but it does not spawn. I have to spawn it with admin commands. I'm not sure what went wrong.
    uniques.spawntypes.patch
    Code:
    [
      {
        "op": "add",
        "path": "/1",
        "value": {
          "name": "zofgmonster",
          "spawnParameters": {
            "area": "surface",
            "region": "all",
            "time": "all"
          },
          "groupSize": [
            1,
            2
          ],
          "spawnChance": 0.08,
          "monsterType": "zofgmonster",
          "monsterParameters": {
            "aggressive": true
          }
        }
      }
    ]
    
    
     
  6. YoloJoe

    YoloJoe Space Hobo

    Do I need to set up anything else than the monster files and the .spawntypes file?
     
  7. Nirrudn

    Nirrudn Void-Bound Voyager

    Any errors reported in your starbound.log file?
     
  8. YoloJoe

    YoloJoe Space Hobo

    I'll check when I get home, but is there any way I can give the mob a 100% spawn chance? In any biome? Maybe it just spawns in one particular biome with a very small chance? I'm not sure. I copied the code of a common monster in the unique.spawntypes file and patched it. I'm not sure if this is the right way to do it.. :p
     
  9. YoloJoe

    YoloJoe Space Hobo

    There are no errors about the monster.
     
  10. Nirrudn

    Nirrudn Void-Bound Voyager

    I believe you need to patch the .biome file(s) to actually add your creature to the potential spawn list for the biome(s) you want it to appear in as well. For example the first entry in the unique list is "Gleap" for the Garden biome, and garden.biome contains this corresponding entry:

    Code:
        "groups" : [
          {
            "select" : 3,
            "pool" : [
              [ 1.0, "gleap" ],
              [ 1.0, "nutmidge" ],
              [ 1.0, "poptop" ]
            ]
          },
    I'm assuming the "select: 3" bit means it will attempt to spawn all 3 of those monsters, based on their individual spawn chance perhaps?
     
  11. YoloJoe

    YoloJoe Space Hobo

    I knew there was something I had missed! Thanks a lot! Somebody give this man a cookie! :D
     

Share This Page