tModLoader Loot Bags Mod

Casu

Empress of Light
Loot%20Bags%20Banner%20copy.png


Welcome to the Loot Bags Mod!
This mod adds 5 different obtainable loot bags!​

The loot (and the code) has been redone for 1.4! The aim of the mod is to give you occasional loot that may or may not be helpful. I tried to make it so the loot bags don't completely invalidate parts of the game (lol jk).

Loot bags have a chance to drop from random enemies. There are 5 tiers of loot bags:

Tier 1 - Beginning of Game
Tier 2 - Post-Skeletron
Tier 3 - Post-WoF
Tier 4 - Post-Plantera
Tier 5 - Post-Moonlord

Right clicking loot bags in the inventory will give you a random item. Your luck stat plays a role in the item drop chances, as reflected by the loot bag tool tips.

Config
The Loot Bags config can be accessed from the ingame mod configuration (must be used from the main menu). The config can be used to edit the drop chances of each tier of loot bag. Drop chances are a fraction where the numerator is 1 and the number in the config is the denominator. For example, a value of 25 in the config translates to a 1/25 chance for the loot bag to drop when an enemy is killed.

Changes from 1.3 to 1.4
- Tier 6 loot bag was removed due to the tier 4 bag being shifted to post-Plantera instead of post-Mech bosses
- Dye loot bag was removed because who actually cared about it
- Loot Bag NPC was replaced with being able to craft previous loot bag tiers
- The loot drops from the bags were completely redone (along with the code)
- Loot Bag weapons were removed (might come back)
- Mod compatibility is currently unavailable

Big Thanks to Xray299 and seabass927 for amazing sprites and suggestions!

Github Repo Link
Welcome to the Loot Bags Mod!
This mod adds 7 different obtainable loot bags and 2 loot bag only items to your world. (+1 Secret Loot Bag that has a ridiculous new way of obtaining)
Most of the bags' contents have been redone. (More noticable in lower tiers)
The aim of the mod is to give you occasional rare items.
Common = 50% chance
Uncommon = 30% chance
Rare = 20% chance
LootBag1.png

1/25 drop chance
Obtainable at the beginning of the game
Aglet - Uncommon
Amber / 1 – 4 - Common
Amber Mosquito - Rare
Amethyst / 3 – 6 - Common
Anklet of the Wind - Uncommon
Antlion Mandible / 1 – 3 - Common
Arkhalis - Rare
Band of Regeneration - Uncommon
Band of Starpower - Uncommon
Bezoar - Uncommon
Black Counterweight - Uncommon
Black Lens / 1 – 2 - Common
Bladed Glove - Rare
Blizzard in a Bottle -Rare
Bloody Machete - Uncommon
Bloody Spine - Common
Blowpipe - Common
Bomb / 1 – 3 - Common
Bone Pickaxe - Rare
Bone Sword - Uncommon
Bug Net - Uncommon
Candy Cane Hook - Rare
Candy Cane Pickaxe - Rare
Candy Cane Sword - Rare
Celestial Magnet - Rare
Chain Knife - Uncommon
Climbing Claws - Uncommon
Cloud in a Bottle - Uncommon
Copper Bar / 2 – 8 - Common
Copper Ore / 3 – 15 - Common
Coral / 1 – 5 - Common
Depth Meter - Uncommon
Diamond / 3 – 6 - Uncommon
Diving Helmet - Uncommon
Emerald / 3 – 6 - Uncommon
Enchanted Boomerang - Uncommon
Enchanted Sword - Rare
Extractinator - Uncommon
Fart in a Jar - Rare
Flipper - Uncommon
Flurry Boots - Uncommon
Flying Carpet - Rare
Frog leg - Uncommon
Glowing Mushroom / 5 – 20 - Common
Gold Bar / 2 – 8 - Common
Gold Ore / 4 – 20 - Common
Grappling Hook - Common
Heart Statue - Rare
Heart Lantern - Rare
Herme Boots - Uncommon
Ice Blade - Uncommon
Ice Boomerang - Uncommon
Ice Mirror - Uncommon
Ice Skates - Uncommon
Iron Bar / 2 – 8 - Common
Iron Ore / 3 – 15 - Common
Jellyfish Necklace - Uncommon
Jungle Spores / 2 – 6 - Common
Lead Bar / 2 – 8 - Common
Lead Ore / 3 – 15 - Common
Lens / 2 – 5 - Common
Lesser Healing Potion / 4 – 8 -Common
Lesser Mana Potion / 4 – 8 - Common
Lesser Restoration Potion / 4 – 8 -Uncommon
Life Crystal / 1 – 2 - Rare
Lifeform analyzer - Uncommon
Lucky Horseshoe - Uncommon
Magic Mirror - Uncommon
Mana Crystal / 1 – 2 - Rare
Mandible Blade - Uncommon
Metal Detector - Uncommon
Mushroom / 5 – 20 - Common
Platinum Bar / 2 – 8 - Common
Platinum Ore / 4 – 20 - Common
Radar - Uncommon
Rally - Uncommon
Ruby / 3 – 6 - Uncommon
Sandstorm in a Bottle - Rare
Sapphire / 3 – 6 - Common
Shackle - Common
Shark Tooth Necklace - Uncommon
Shiny Red Balloon - Rare
Shoe Spikes - Uncommon
Silver Bar / 2 – 8 - Common
Silver Ore / 4 – 20 - Common
Slime Crown - Common
Slime Staff - Common
Snowball Cannon - Uncommon
Spear - Uncommon
Starfury - Rare
Stopwatch - Uncommon
Suspicious Looking Eye - Common
Tin Bar / 2 – 8 - Common
Tin Ore / 3 – 15 - Common
Topaz / 3 – 6 - Common
Trident - Uncommon
Tungsten Bar / 2 – 8 - Common
Tungsten Ore / 4 – 20 - Common
Wand of Sparking - Common
Water Walking Boots - Uncommon
Worm Food - Common
LootBag2.png

1/30 drop chance
Obtainable after killing Skeletron
Abeemination - Common
Active Stone Block / 2 – 6 - Common
Actuation Rod - Uncommon
Actuator / 2 – 6 - Uncommon
Aqua Scepter - Rare
Architect Gizmo Pack - Rare
Bat Hook - Rare
Blowgun - Common
Blue Moon - Uncommon
Bone / 10 – 30 - Common
Boomstick - Uncommon
Cascade - Uncommon
Cobalt Shield - Rare
Code 1 - Uncommon
DPS Meter - Uncommon
Feather / 4 – 8 - Common
Feral Claws - Uncommon
Fiberglass Fishing Rod - Uncommon
Flintlock Pistol - Uncommon
Flower Boots - Uncommon
Handgun – Rare
Healing Potion / 4 – 8 – Common
Hellstone Bar / 3 – 9 - Common
Hellstone Ore / 3 – 15 - Common
Ice Machine - Uncommon
Lava Charm - Rare
Magic Missile - Rare
Magma Stone - Rare
Mana Potion / 4 – 8 - Common
Meteorite Bar / 4 – 12 - Common
Meteorite Ore / 3 – 18 - Common
Money Trough - Rare
Muramasa - Rare
Nazar - Uncommon
Obsidian Rose - Rare
Obsidian Skull - Uncommon
Restoration Potion / 4 – 8 - Common
Shadow Key - Uncommon
Sky Mill - Uncommon
Sunfury - Rare
Tally Counter - Uncommon
Valor - Uncommon
Water Bolt - Rare
LootBag3.png

1/35 drop chance
Obtainable in hardmode
Adamantite Bars / 2 – 5 - Uncommon
Adamantite Ore / 5 – 15 - Uncommon
Adhesive Bandage - Uncommon
Amarok - Uncommon
Anchor - Uncommon
Ancient Cloth / 2 – 5 - Uncommon
Ancient Horn - Rare
Armor Bracing - Rare
Armor Polish - Rare
Bacon / 10 - Uncommon
Bananarang / 3 – 5 - Uncommon
Beam Sword - Rare
Bell - Rare
Blessed Apple - Rare
Blindfold - Rare
Butterfly Dust - Uncommon
Cobalt Bar / 6 – 10 - Common
Cobalt Ore / 12 – 18 - Common
Compass - Uncommon
Cross Necklace - Uncommon
Cursed Flame / 3 - 7 - Common
Dao of Pow - Rare
Dark Lance - Uncommon
Demon Scythe - Uncommon
Dual Hook - Uncommon
Enchanted Sundial - Rare
Fast Clock - Rare
Fire Feather - Uncommon
Flower of Fire - Uncommon
Flower of Frost - Uncommon
Forbidden Fragments / 1 – 2 - Uncommon
Format:C (Yoyo) - Uncommon
Frost Core / 1 – 2 - Uncommon
Gatligator - Rare
Giant Harpy Feather - Uncommon
Gradient - Uncommon
Hardy Saddle - Rare
Hel-Fire - Uncommon
Hellwing Bow - Uncommon
Ice Bow - Uncommon
Ice Feather - Uncommon
Ice Sickle - Rare
Ichor / 3 – 7 - Common
Key of Light – Uncommon
Key of Night - Uncommon
KO Cannon - Rare
Laser Rifle - Uncommon
Life Drain - Rare
Magic Dagger - Uncommon
Magic Quiver - Rare
Marrow - Rare
Mechanic’s Rod - Uncommon
Mechanical Eye - Common
Mechanical Skull - Common
Mechanical Worm - Common
Medusa Head - Rare
Megaphone - Rare
Moon Charm - Uncommon
Mythril Bar / 2 – 6 - Common
Mythril Ore / 4 – 16 - Common
Nimbus Rod - Uncommon
Orichalcum Bar / 2 – 6 - Common
Orichalcum Ore / 4 – 16 - Common
Palladium Bar / 6 – 10 - Common
Palladium Ore / 12 – 18 - Common
Philosopher’s Stone - Uncommon
Pocket Mirror - Rare
Poison Staff - Rare
Ranger Emblem - Uncommon
Rod of Discord - Rare
Slap Hand - Rare
Sorcerer Emblem - Uncommon
Soul of Flight / 5 – 10 - Common
Soul of Light / 5 – 10 - Common
Soul of Night / 5 – 10 - Common
Spider Fang / 4 – 8 - Common
Star Cloak - Uncommon
Summoner Emblem - Uncommon
Super Healing Potion / 4 – 8 - Common
Super Mana Potion / 4 – 8 - Common
Tattered Bee Wing - Uncommon
Titan Glove - Uncommon
Titanium Bar / 2 – 5 - Uncommon
Titanium Ore / 5 – 15 - Uncommon
Trifold Map - Rare
Uzi - Rare
Vitamins - Rare
Warrior Emblem - Uncommon
Yoyo Glove - Uncommon
LootBag4.png

1/40 drop chance
Obtainable after killing all 3 mech bosses
Blue Solution / 10 – 50 - Uncommon
Brand of the Inferno - Rare
Broken Bat Wing - Uncommon
Broken Hero Sword - Rare
Chain Guillotines - Uncommon
Chlorophyte Bar / 4 – 12 - Common
Chlorophyte Ore / 5 – 15 - Common
Clinger Staff - Uncommon
Code 2 - Uncommon
Daedalus Stormbow - Uncommon
Dart Pistol - Uncommon
Dart Rifle - Uncommon
Death Sickle - Rare
Fetid Baghnakhs - Uncommon
Flying Knife - Uncommon
Frost Staff - Uncommon
Frostbrane - Uncommon
Frozen Turtle Shell - Rare
Hallowed Bar / 4 – 12 - Common
Life Fruit / 2 – 4 - Common
Lucky Coin - Rare
Moon Stone - Uncommon
Mushroom Spear - Rare
Neptune’s Shell - Uncommon
Phantom Phoenix - Rare
Putrid Scent - Uncommon
Squire’s Shield - Rare
Tome of Infinite Wisdom - Rare
Turtle Shell - Uncommon
Unholy Trident - Rare
Yelets - Uncommon
LootBag5.png

1/45 drop chance
Obtainable after killing Golem
Ankh Charm - Rare
Anti-Gravity Hook - Rare
Autohammer - Uncommon
Beetle Husk / 4 – 8 - Uncommon
Black Belt - Uncommon
Bone Feather - Uncommon
Brain Scrambler - Rare
Butcher’s Chainsaw - Uncommon
Coin Gun - Rare
Coin Ring - Rare
Cosmic Car Key - Uncommon
Deadly Sphere Staff - Uncommon
Discount Card - Rare
Ectoplasm / 6 -10 - Common
Electrosphere Launcher - Uncommon
Eye of the Golem - Uncommon
Gold Ring - Rare
Hercules Beetle - Uncommon
Inferno Fork - Rare
Influx Waver - Uncommon
Keybrand - Uncommon
Kraken - Uncommon
Laser Drill - Uncommon
Laser Machinegun - Uncommon
Lihzahrd Power Cell / 1 – 3 - Uncommon
Lizard Egg - Rare
Magnet Sphere - Rare
Nail Gun - Uncommon
Paladin’s Hammer - Rare
Paladin’s Shield - Rare
Psycho Knife - Uncommon
Pulse Bow - Rare
Rifle Scope - Uncommon
Shadowbeam Staff - Rare
Sniper Rifle - Uncommon
Tabi - Uncommon
Tactical Shotgun - Rare
Toxic Flask - Uncommon
Truffle Worm / 1 – 3 - Common
Wisp in a Bottle - Rare
Xenopopper - Uncommon
Xeno Staff - Uncommon
LootBag6.png

1/50 drop chance
Obtainable after killing Moon Lord
Bone Key - Rare
Celestial Sigil - Common
Companion Cube - Rare
Defender Medal / 50 – 80 - Uncommon
Diamond Ring - Rare
Drill Containment Unit - Rare
Golden Fishing Rod - Uncommon
Last Prism - Uncommon
Luminite / 4 – 8 - Common
Lunar Flare - Uncommon
Lunar Hook - Uncommon
Lunar Portal Staff - Uncommon
Meowmere - Uncommon
Nebula Fragment / 10 – 20 - Common
Rainbow Crystal Staff - Uncommon
S.D.M.G - Uncommon
Solar Fragment / 10 – 20 - Common
Stardust Fragment / 10 – 20 - Common
Terrarian - Uncommon
Vortex Fragment / 10 – 20 - Common
DyeLootBag.png

1/3 drop chance
Drops from dye related enemies
- Dye trader animated dyes
The Loot Bag Dealer is a new npc that sells loot bags. He moves in after defeating skeletron (or the world is in hardmode).
There are now weapons for each loot bag tier. They get progressively better as you go up in tiers. They are crafted with a material and their respective "core" that has a 1/15 chance to drop from its respective loot bag.
The mod is now much more configurable.
The Config is located at: C:\Users\NAME\Documents\My Games\Terraria\ModLoader\Mod Configs\LootBagsConfig
X goes where the specific loot bag number goes.
LootBagXDropChance: This allows you to change the drop chance of the loot bag.
Default: Varies on Bag (1/5 for dye bag)

LootBagXCost: This allows you to change the cost in copper coins of the loot bag
Default: Varies on Bag, Higher tiers are more expensive

BuyLootBags: This allows you to enable or disable buying loot bags from the merchant
Default: True

AllLootBagsDrop: This allows you to enable or disable having all loots bags drop at the same time
Default: False

CoreXDropChance: This allows you to change the drop chance of a core from its respective loot bag.
Default: 15 (1/15 drop chance)

The version for Terraria 1.3 is attached to this post

Dev Team:
Caseratis - lead developer
Xray299/@MysticalPhoenix - spriter
seabass927/@seabassmustang927 - spriter​
 

Attachments

  • LootBags.zip
    175.4 KB · Views: 7,403
Last edited:
Adding Your Mod Items To Loot Bags
All you gotta do is put some code in your mod class that invokes Mod.Call for Loot Bags.
Code:
LootBags.Call(chance, item, minimum amount, maximum amount, loot bag tier);
Example:
Code:
public override void PostSetupContent()
        {
           
            Mod LootBags = ModLoader.GetMod("LootBags");
            if (LootBags != null)
            {
                LootBags.Call(.20, ItemType("YourModItem"), 1, 1, 3); //A 20% chance to get an item in a tier 3 loot bag.
                LootBags.Call(.99, ItemType("AnotherModItem"), 2, 5, 5); //A 99% chance to get 2-5 items in a tier 5 loot bag.
            }
        }
 
Last edited:
Looks good, but can you make a verison of this mod where the bags only drop from bosses for more hardcore players, and maybe increase the drop rate?
 
I feel like some of these bags should be split up and put into separate biomes. Such as having a Dungeon Loot Bag that only drops dungeon items, and items such as Hell-stone only drop from Hell Loot Bags. It'd make it much better for the playthrough, as I feel it's a little unbalanced as of now.
 
Absolutely LOVE this mod. It's like opening a million boss treasure bags! So, in addition to this mod I use Fargos Mutant Mod, which adds a lot of end-game items. A lot of them require the suspicious looking tentacle, so I was wondering if this item will be added to the post-moon lord loot bag?
 
Would it be possible to tweak the drop rates to make the lower-end bags stop dropping after the game reaches certain points? Like, make the game only drop the 3 highest loot bag types for your current level of progression. It would be to prevent your inventory from getting overloaded with bags. That, and when you run with multiple mods, your inventory tends to get filled up more quickly due to the greater number of item drops you get through mods.
 
I think that maybe you should make some extra items and stuff to kind of go along with the bags or something idk? But this is really cool ;)
 
Back
Top Bottom