ON THIS WIKI
Tutorial:Loot++
This article is part of the Feed The Beast Wiki's Tutorials section. |
This tutorial is to show how to customise config files from the Loot++ mod.
Contents
Entity Drop[edit]
Shows how to customise the entity_drops.cfg file.
Example[edit]
Zombie Drops a Book[edit]
To give a zombie a small chance of dropping a "diary". Find the adding section, and add the following:
Zombie-1.0-false-false_____i-minecraft:written_book-1-1-1-0
The 1.0 means the zombie will drop it every time (100% chance) for testing purposes. We will lower this number later. You should test it at this point to make sure the zombie is dropping it. Any zombie killed should be dropping a blank written book. Now that the Zombie drops a diary, let's add some more info to the book. on the same line of the previous entry, add:
-{author:"Dan the Zombie",title:"Dan's Diary"}
Now the Zombie should drop a book called Dan's Diary, by Dan the Zombie. But the book is empty, so let's add some content to our book by adding to the previous entry on the same line (just before the last }):
,pages:[0:"Day 346: Not much. Sun was hot. Night was boring.",1:"Day 347: Greg found a village. Going to investigate when sun sets.",2:"Day 348: Greg killed by iron golem. Village is no good. Moving on."]
Now the zombie should drop a written book with three pages, with the three "diary entries" written in them. We're almost done, we need to set the drop chance a bit lower, at this point every zombie killed drops a book. Change the 1.0 to 0.001. Now 1 in every 1000 zombies killed will drop it. So the final entry will start with:
Zombie-0.001-false-false
Wither drops a Blast Resistant Golden Apple[edit]
For testing purposes, we use a Silverfish (so you don't have to kill the Wither each time you test it). Find the section adding and add the entry:
Silverfish-1.0-false-false_____e-Item-1-{Item:{id:golden_apple,Damage:1,Count:1}}
Notice we used e instead of i, so it's dropping an entity, which happens to be an item entity. Testing it, a Silverfish, it will drop an enchanted golden apple. However, the apple isn't explosion proof yet! Setting off TNT next to a dropped golden apple and it will be destroyed. So to make it explosion proof (or at least resistant) we give it more health. Add the following in the entry (inside the } before Item):
Health:5000,
Now a golden apple dropped by a sliverfish should survive about 3- 4 point blank TNT explosions. You can set the item's health higher if you need it to survive more, but for a stray explosion or two left over from the Wither, this should be good. Now you can change the entity to the Wither. The final entry is:
WitherBoss-1.0-false-false_____e-Item-1-{Health:5000,Item:{id:golden_apple,Damage:1,Count:1}}
New Record[edit]
How to customise the config file to add new records:
- Download the sample resource pack
- Install it in your resourcepacks folder, and enable it in-game.
- It contains some sample textures and sounds which we can use for adding some example records (based on the in-game music).
- Open up the records.cfg file inside the config/Loot++ folder.
- Follow the instructions in that file to add the records. The sounds.json file and such should already be correctly set up if you are using the example resource pack.
- Here's the same list of record entries without the * in front of them (added by the config file) for easier copying and pasting:
creative1-biome_fest-C418 - Biome Fest creative2-blind_spots-C418 - Blind Spots creative3-haunt_muskie-C418 - Haunt Muskie creative4-aria_math-C418 - Aria Math creative5-dreiton-C418 - Dreiton creative6-taswell-C418 - Taswell end-end-C418 - The End credits-alpha-C418 - Alpha nether1-concrete_halls-C418 - Concrete Halls nether2-dead_voxel-C418 - Dead Voxel nether3-warmth-C418 - Warmth nether4-ballad_of_the_cats-C418 - Ballad of the Cats menu1-mutation-C418 - Mutation menu2-moog_city_2-C418 - Moog City 2 menu3-beginning_2-C418 - Beginning 2 menu4-floating_trees-C418 - Floating Trees calm1-minecraft-C418 - Minecraft calm2-clark-C418 - Clark calm3-sweden-C418 - Sweden hal1-subwoofer_lullaby-C418 - Subwoofer Lullaby hal2-living_mice-C418 - Living Mice hal3-haggstrom-C418 - Haggstrom hal4-danny-C418 - Danny nuance1-key-C418 - Key nuance2-oxygene-C418 - Oxygène piano1-dry_hands-C418 - Dry Hands piano2-wet_hands-C418 - Wet Hands piano3-mice_on_venus-C418 - Mice on Venus
Make all records generate inside dungeon chests[edit]
- Open up the chest_content.cfg file.
- Find the entry called dungeonchest_additions
- Add these lines to it (each should be on a separate line):
lootplusplus:calm1-1-1-1 lootplusplus:calm2-1-1-1 lootplusplus:calm3-1-1-1 lootplusplus:creative1-1-1-1 lootplusplus:creative2-1-1-1 lootplusplus:creative3-1-1-1 lootplusplus:creative4-1-1-1 lootplusplus:creative5-1-1-1 lootplusplus:creative6-1-1-1 lootplusplus:credits-1-1-1 lootplusplus:end-1-1-1 lootplusplus:hal1-1-1-1 lootplusplus:hal2-1-1-1 lootplusplus:hal3-1-1-1 lootplusplus:hal4-1-1-1 lootplusplus:menu1-1-1-1 lootplusplus:menu2-1-1-1 lootplusplus:menu3-1-1-1 lootplusplus:menu4-1-1-1 lootplusplus:nether1-1-1-1 lootplusplus:nether2-1-1-1 lootplusplus:nether3-1-1-1 lootplusplus:nether4-1-1-1 lootplusplus:nuance1-1-1-1 lootplusplus:nuance2-1-1-1 lootplusplus:piano1-1-1-1 lootplusplus:piano2-1-1-1 lootplusplus:piano3-1-1-1 minecraft:record_11-1-1-1 minecraft:record_blocks-1-1-1 minecraft:record_chirp-1-1-1 minecraft:record_far-1-1-1 minecraft:record_mall-1-1-1 minecraft:record_mellohi-1-1-1 minecraft:record_stal-1-1-1 minecraft:record_strad-1-1-1 minecraft:record_wait-1-1-1 minecraft:record_ward-1-1-1
In the section dungeonchest_default, change the weights for the records 13 and cat to 1. They should look like this:
S:"minecraft:record_13"=1-1-1-0 S:"minecraft:record_cat"=1-1-1-0
Now all the records should generate in the dungeon chests. You can try it out at this point by loading the game and placing down a "dungeonChest" Loot Chest. You may notice there are quite a few records in the chests now. Maybe you don't want them to overpower the other items so much. You will have to increase the weights of all the other items. Say maybe double them. You can change all the other entries in dungeonchest_default to be :
S:"minecraft:bread"=1-1-20-0 S:"minecraft:bucket"=1-1-20-0 S:"minecraft:diamond_horse_armor"=1-1-2-0 S:"minecraft:enchanted_book"=1-1-2-0 S:"minecraft:golden_apple"=1-1-2-0 S:"minecraft:golden_horse_armor"=1-1-4-0 S:"minecraft:gunpowder"=1-4-20-0 S:"minecraft:iron_horse_armor"=1-1-10-0 S:"minecraft:iron_ingot"=1-4-20-0 S:"minecraft:name_tag"=1-1-20-0 S:"minecraft:redstone"=1-4-20-0 S:"minecraft:saddle"=1-1-20-0 S:"minecraft:string"=1-4-20-0 S:"minecraft:wheat"=1-4-20-0
Now the records should generate like they were generating before, but with a chance for any of them.
Command Trigger Item[edit]
A 'Command Trigger Item will run a command when it enters your inventory. To give yourself a command trigger item, you can run the command:
/give @p lootplusplus:command_trigger_item 1 0 {CommandList:["say This is a command that will run.", "tell @p This command will run as well."]}
This will, when it enters your inventory, run the commands specified in the CommandList.
If you want it to trigger on right click instead of immediately, you can also put
Unwrap:true
You can change the colours of the "present" icon by setting PrimaryColor and SecondaryColor:
PrimaryColor:16711680, SecondaryColor:255
Now, if you don't want the present icon, you can tell it to use a custom icon by setting Icon:<Icon Name>. For instance, if you have a resource pack that has a texture called ruby.png in the folder assets/minecraft/textures/items, you can put:
Icon:ruby
Customizable Spawn Egg[edit]
A Customizable Spawn Egg can hold both an entity type and NBT data to apply to that entity.
You can change the colours of the "spawn egg" icon by setting PrimaryColor and SecondaryColor:
PrimaryColor:16711680, SecondaryColor:255
Wither Skeleton Spawn Egg[edit]
If you want to get yourself a spawn egg that will specifically give you a Wither Skeleton, you could do:
/give @p lootplusplus:custom_spawn_egg 1 0 {EntityName:Skeleton,EntityData:{SkeletonType:1}}
Loot Chest[edit]
A Loot Chest is a chest that, when placed down, generates loot from a certain loot table. You can get the loot chests from the creative menu, but if you want to get one otherwise, you can run this command:
/give @p lootplusplus:loot_chest 1 0 {Type:dungeonChest}
Where you can replace dungeonChest with whatever valid [1] loot chest type you want. You can also create the loot chests using the setblock command, like so:
/setblock ~ ~ ~ lootplusplus:loot_chest 0 replace {Type:dungeonChest}
It acts the same as placing down a loot chest.
Note[edit]
- ↑ If the chest type isn't a valid type, it will turn into an empty chest when placed.
Loot Item[edit]
A Loot Item turns into a random item stack from a certain loot type. To give yourself a loot item, you can run the command:
/give @p lootplusplus:loot_item 1 0 {Type:dungeonChest}
This will, when it enters your inventory, create a random item stack from dungeon chest loot.
If you want it to trigger on right click instead of immediately, you can also put
Unwrap:true
You can change the colours of the "present" icon by setting PrimaryColor and SecondaryColor:
PrimaryColor:16711680, SecondaryColor:255
Now, if you don't want the present icon, you can tell it to use a custom icon by setting:
Icon:<Icon Name>
For instance, if you have a resource pack that has a texture called ruby.png in the folder assets/minecraft/textures/items, you can put:
Icon:ruby