Modding Help Why are there multiple basicmonstertreasures?

Discussion in 'Starbound Modding' started by Daimoth, Feb 17, 2014.

  1. Daimoth

    Daimoth Scruffy Nerf-Herder

    I'm talking about basicmonstertreasure1-6 in assets/treasure. They all get used, too. Why?
     
    Last edited: Feb 17, 2014
  2. Daimoth

    Daimoth Scruffy Nerf-Herder

    I'm asking because I 'm trying to make a brain extractor-like item, but I'm getting default drops. I'm not modifying, brain.treasurepool I'm making my own.

    This leads me to believe that the game is interpreting the damage kind to be default, not the damage kind I created.

    The first thing I do when I hit a problem is see if somebody else has already done it, and the Bow if Epirus mod did something like it, so I used a similar approach.

    As such, the log is clean.

    Here's one of my treasure pools:

    Code:
    {
      "resourceextractor" : [
        [1, {
            "pool" : [
              [0.07, [ "bone", 2 ] ],
              [0.07, [ "bone", 3 ] ],
              [0.07, [ "bone", 4 ] ],
              [0.07, [ "bone", 5 ] ],
              [0.07, [ "brain" ] ],
              [0.14, [ "fleshstrand", 2 ] ],
              [0.28, [ "fleshstrand" ] ],
              [0.07, [ "bonematerial" ] ],
              [0.16, [ "organ1" ] ]
            ],
            "poolRounds" : [
              [0.10, 5],
              [0.15, 4],
              [0.20, 3],
              [0.50, 2],
              [0.05, 1]
            ],
            "levelVariance" : [0, 0],
            "allowDuplication" : false
          } ]
      ]
    }
    Here's one of the .monstertype merges:

    Code:
    {
        "__merge": [],
        "dropPools": [
            {
                "default": "basicMonsterTreasure",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "basicMonsterTreasure2",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "basicMonsterTreasure3",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "basicMonsterTreasure4",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "basicMonsterTreasure5",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "basicMonsterTreasure6",
                "bow": "hunting",
                "brain": "brain",
                "braingreen": "resourceextractor",
                "brainpurple": "brainextractormkii"           
            },
            {
                "default": "resourceextractor",
                "braingreen": "resourceextractor"
            },       
            {
                "default": "brainextractormkii",
                "brainpurple": "brainextractormkii"
            }
        ]
    }
    My projectile is showing up properly ingame.


    I was considering an alternate approach in which my projectile simply spawns the items in when the projectile from the weapon kills an enemy. Would this approach be viable?
     
  3. The | Suit

    The | Suit Agent S. Forum Moderator

    If you want to make your own brain extractor
    The trick would be the "DamageKind"
    Code:
      "dropPools" : [
        {
          "default" : "basicMonsterTreasure",
          "bow" : "hunting",
          "brain" : "brain"
    If you check out the drop pools for the monster
    basically it is saying
    If the damage is done by a "default" damage kind - use baisc monster pool
    if it is done by bow damage kind use the hunting treasure pool
    if done by brain damage kind use brain treasure pool.
    The damageKind value is added to the projectile - not the weapon.
     
    Daimoth likes this.
  4. Daimoth

    Daimoth Scruffy Nerf-Herder

    I appear to have that set correctly. I have the projectile set to my custom one, and the damageKind set to the value I'm using in those files.
     
    Last edited: Feb 17, 2014
  5. The | Suit

    The | Suit Agent S. Forum Moderator


    I have no idea what that means.
    But put projectile
    Code:
      "damageKind" : "bob"
    In the monster loot add
    Code:
    "bob" : "bobtreasure"
    create a treasure pool

    Code:
    {
      "bobtreasure" : [
        [1, {
            "pool" : [
              [0.7, [ "redflask" ] ],
              [0.3, [ "blueflask" ] ]
            ],
            "poolRounds" : [
              [0.10, 0],
              [0.90, 1]
            ],
            "levelVariance" : [0, 0],
            "allowDuplication" : false
          } ]
      ]
    }
    
    and that's it.
    Any time the projectile with the damage kind bob kills an alien
    it will either drop a red flask or blue flask.
     
    Daimoth likes this.
  6. Daimoth

    Daimoth Scruffy Nerf-Herder

    I have done that. Sorry, I was trying to multitask and got vague.

    Projectile's damageKind is "braingreen"

    the according treasurepool is "resourceextractor"

    entry in the .monstertype reads

    "braingreen" : "resourceextractor"

    And again, the log is showing no exceptions. Any ideas?

    Perhaps I'll upload my mod, something's up.
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    Some projectiles fire multiple projectiles. So if another projectile is coming out of that one - that might be why your seeing alternative drops.
     
    Daimoth likes this.
  8. Daimoth

    Daimoth Scruffy Nerf-Herder

    Is there a way to determine if that's the case?
     
  9. The | Suit

    The | Suit Agent S. Forum Moderator

    Sure - remove all other treasure pools from a monster and only keep yours.
    For example remove all the drop pools for quadrupeds - and only have your drop pool there.

    If it still is dropping basic treasure your doing something wrong.
    It should only drop nothing or your pool.
    If it drops nothing at all - then there is a reference error you need to address
     
    Daimoth likes this.
  10. Daimoth

    Daimoth Scruffy Nerf-Herder

    Well here comes the part where I look like an idiot. The mobs I have been testing this on were unique or something, for whatever reason they aren't included in any of the monstertype files I have merged onto. So I was actually doi ng it corrently all along, the problem lies in my monsters folder.

    :poo: <-- Daimoth
     
  11. The | Suit

    The | Suit Agent S. Forum Moderator

    well each mistake is an experience you learn from.
    So no biggie
     
  12. Daimoth

    Daimoth Scruffy Nerf-Herder

    Ironically I chose that planet to test my mod on because the mobs on it were interesting. These things are what's been causing the problem

    [​IMG]

    But it's whatever. This is now a much easier problem to troubleshoot than before.

    I can't tell you how much I appreciate your help. Why aren't you a mod here yet?
     
    The | Suit likes this.
  13. The | Suit

    The | Suit Agent S. Forum Moderator

    I am generally not a very nice person.
    Hence incompatible with being a mod :p

    Or some one would like to say "Highly Opinionated"
     
    Daimoth likes this.
  14. Daimoth

    Daimoth Scruffy Nerf-Herder

    I don't blame you there. It would be hard to keep a cool all the time.
     
  15. Daimoth

    Daimoth Scruffy Nerf-Herder

    Hm. Alright I've run into what I'm almost positive is a bug. As I said before, I don't merge with or otherwise modify any of the base files related to the vanilla brain extractor, but it is somehow occasionally producing a brain unique to my mod.

    I'm getting my drops from some mobs, but not others. What's more, some mobs within the same monstertype are dropping my items consistently, and others are not at all.

    I'm officially stumped. What the hell's going on here?
     
  16. The | Suit

    The | Suit Agent S. Forum Moderator

    Some mobs maybe unique some mobs might not be.
    Some mobs are made unique through mini dungeons.

    Its based on how that mob is generated in the end of the day, and which category it falls in.
     
  17. Daimoth

    Daimoth Scruffy Nerf-Herder

    Is there anything I can do about it? I've addressed every .monstertype file that isn't a unique monster or boss.
     
  18. The | Suit

    The | Suit Agent S. Forum Moderator

    Not much as far as I am aware. The game decides how it wants to generate monsters.
     
    Daimoth likes this.
  19. StarWeaver

    StarWeaver Pangalactic Porcupine

    It might have something to do with some values being baked in when the planet's monsters are rolled up? Have you checked a completely fresh planet?
     
    Daimoth likes this.
  20. Motionless

    Motionless Pangalactic Porcupine

    I feel your frustration. I'm getting the exact same problem with my mod.
     
    Daimoth likes this.

Share This Page