Modding Help How can I make this?

Discussion in 'Starbound Modding' started by DarkraiDUD3, Feb 8, 2014.

  1. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Okay so I'm trying to make a cool mod that when you kill a mob, there's a 20% chance you'll get a goodie bag(inspired by terraria's halloween event) and when you right click it, you'll get a random hat. Doesn't matter what hat. Please help me with this mod! I'll give you a heap of credit! Save a life today!
    The bag will have these items in it: (ATM)
    1. A ninja mask
    2. A water like hat. (I want that hat to make you invincible from water)
    3. A lava hat( makes you invulnerable from lava and makes you walk on it)
    4. A plague doctor's mask/
    5. A jester's cap
    6. a Lampshade, (May or may not light up)
    7. a candelabra that lights up
    8. a ski mask
    9. A red masquerade ball mask
    10. A blindfold
    11. A fox mask
    12. A Witch hat. (Not wizard hat)
    13. An eyepatch
    14. Aviators
    15. A tie ninja. ( Wrapped tie around your head)
    16. A blue masquerade ball mask
    17. A penguin colored beanie
    18. A trilby
    19. A crusader helm
    20. White rimmed glasses
    21. Hylotl glasses
    22. Golden crown
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    You could use Pots - as a drop bag. [But not as much control]
    Check capsulebig as an example of a pot which drops items on destruction

    Or you could just drop the item directly by using drop loot
    Code:
    C:\Program Files (x86)\Steam\steamapps\common\Starbound\Assetunpacked\monsters\unique\giftmonster
    For example if you go to giftmosnter.monstertype

    It will say "Droppools"
    these pools are located here
    Code:
    C:\Program Files (x86)\Steam\steamapps\common\Starbound\Assetunpacked\treasure
    The syntax is
    [0.33, [ "money", 12] ]

    first number is chance
    the 2nd is the item
    3rd is the amount
     
    Last edited: Feb 8, 2014
  3. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    So if I do [0.3, ["skimask", 1],
    [0.3, ["jesterscap", 1]
    That would make it so it is possible to get one of those items if I place this one item is when you kill a mob, there's a small chance?
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    That would be 30% chance for each one.
    You can follow the examples given in the treasurepool file - its pretty straightforward to follow.

    You want to make sure duplication is off and you only run thorough the pool loop once.
     
  5. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Can you make a download for an example. I am better to learn hands on.
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

    First lets see the unique monster file
    Code:
    C:\Program Files (x86)\Steam\steamapps\common\Starbound\Assetunpacked\monsters\unique\aviansentry
    Code:
    {
      "type" : "aviansentry",
    
      "categories" : [ "aviansentry" ],
      "parts" : [ "body" ],
    
      "animation" : "aviansentry.animation",
      "projectiles" : "/monsters/projectiles.config",
      "colors" : "/monsters/colors.config",
      "dropPools" : [ "basicMonsterTreasure" ], <-----
    .....
    truncated for sake of example
    it is saying it uses basemonstertreasurepool
    Which is here
    Code:
    C:\Program Files (x86)\Steam\steamapps\common\Starbound\Assetunpacked\treasure
    The we can see the code
    Code:
      [1, {
            "pool" : [
              [0.36, [ "skimask", 1] ],
              [0.36, [ "jesterscap", 1] ],
              [0.18, [ "money", 25] ],
              [0.10, [ "alienmeat" ] ]
            ],
            "poolRounds" : [
              [0.20, 0],
              [0.80, 1]
            ],
            "levelVariance" : [0, 0],
            "allowDuplication" : false
          } ],
    So now anytime you kill an avian sentry you have a 36% chance of getting a skimask in a level 1 planet.
    Since it uses "Basictreasurepool" any other monster that uses basic treasurepool will also drop it.
    So you would need to create its own unique treasurepool
     
    DarkraiDUD3, Julyuary and Aurorialis like this.
  7. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Ok so if I want to make just the alien monsters drop the unique items, I will make a folder in my mod that says treasurepools and link it from there? That sounds really easy enough. :D Thank you for posting that, I'll be sure to make you in the thanks to folder!
     
  8. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    How exactly will this look when it's in the folder, If you cannot describe it, please just make a download for it! :3
     
  9. The | Suit

    The | Suit Agent S. Forum Moderator

    Here - This simple mod makes fish in the game drop Raw Fish.
     

    Attached Files:

    Last edited: Feb 16, 2014
    DarkraiDUD3 likes this.
  10. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Thank you very much swatelite!
     
  11. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Wait a minute, the game crashed due to a duplicate monster called the fish, is there a way to bypass that?
     
  12. The | Suit

    The | Suit Agent S. Forum Moderator

    It means you kept the file in the wrong folder.
    It has to be a mirror image of exactly the same location as of the original game, otherwise it won't replace the original file and think it is a different one
     
  13. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Let me rephrase this in my own words,
    So if I don't name the folder exactly called treasurepools and another called treasure? Then if I do that, Starbound won't crash.
     
  14. The | Suit

    The | Suit Agent S. Forum Moderator

    When you are replacing \ modifying original files. It has to be exact.
    If you are creating your own file - you can put it where ever yo uwant
     
  15. DarkraiDUD3

    DarkraiDUD3 Subatomic Cosmonaut

    Wait, I'm getting a little confused here. Do I have to make the folder have a directory that says: mods/*mymod*/assets/unpacked/treasure/basic treasure? If that's wrong, can you tell me what to put? I'm truly confused.
     
  16. The | Suit

    The | Suit Agent S. Forum Moderator

    No
    Your Modinfo file = points to your assets folder
    so if you put your mod info file path = "." that means where ever your modinfo filie = your assets folder.

    So in most cases it would be
    Code:
    starbound/mod/[mymod]/treasure
     

Share This Page