Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Custom Spawner + Custom Shop + Populate Chests + Anvil Light fixer and more


  • This topic is locked This topic is locked
947 replies to this topic

#1

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 01 April 2012 - 08:25 PM

*
POPULAR

Posted Image

NOTE: Fully close Minecraft before running any of these tools.


Custom Spawner is a tool that creates mob spawner schematics with customized mob attributes and effects.

Custom Spawner v0.5.0 (post-minecraft 1.4.6) :: download - win32
Custom Spawner v0.4.4 (pre-minecraft 1.4.6) Posted Image download - win32

version notes:
Spoiler:


Run "Custom Spawner.exe"
Choose mob type from drop down menu.
Modify whatever attributes you like (check the boxes next to the things you want to save in the schematic).
Enter a file name for you schematic.
Click "Create Spawner"
Your schematic will be saved in the schematics folder.


If you want to try other mobs/entities that aren't in the list then you can edit "MobList.txt"

Note: some of the available effects might not actually do anything yet or otherwise don't work on some/all mobs.

useful links:
Chunk format
Enchanting
Item IDs
Splash Potion damage values





Custom Shop is a tool that will create a schematic of a villager with customized shop options.

Custom Shop v0.1.2 Posted Image download -win32


Select a profession from the drop down menu.
Riches seems to be a count of all trades.  Not sure if it has any real function at the moment.

Max uses is the amount of times you can make that trade before it gets locked out.
Current uses is the number of times the trade has been used so far.
Buy A and Buy B are the items the villager wants and Sell is the item he will give you.
Buy A and Sell are mandatory.  Buy B is optional (click the check box if you want it).
Enchants on the sell item must come in pairs of numbers (enchant ID and enchant level) separated by spaces. Leave it blank if you don't want enchants.
Enter an item name if desired or leave it blank.
Enter lore as desired.  You can add and remove from the list or clear the list entirely.
When all of that data is set how you want it, click add offer.  You can add and remove offers from the list as desired or reset the list entirely.
When you have all your offers made, enter a file name and click create shop schematic.
It will be saved in the schematics folder next to the executable.


Note: Villagers currently ignore damage, enchants, etc. on items they want to buy so I excluded most of those options.  Example: You could set the villager to want a specific colored wool with an enchant and he would still accept any color wool.




Potion Chest is a tool that creates a schematic of a chest with customized potions in it.

Potion Chest v0.2 Posted Image download - win32

Effect ID is the potion effect id.
Effect level is the strength of the potion effect (in game rank 1 = 0).
Effect duration is the duration of the effect in ticks.
Add whatever combination of effects you want to the list.  You can select items from the list and click the remove button if you want to remove one.

Potion color is controlled by the normal damage values of the potions.  You can select a color from the preset list or select 'custom value' and enter your own damage value.
Add potions to (or remove them from) the list as you like by clicking the appropriate buttons.
When you are done, enter a file name and click the create schematic button. It will be placed in the schematic folder next to the executable.


Warning: Invalid damage values will crash the game when opening the chest.



Populate Chests is a tool that will scan a world for empty chests and populate them with random loot.

Populate Chests v0.4.1 Posted Image download -win32

run 'Populate Chests.exe'
click 'Select World' and choose your world folder
click 'Select Random Items File' and select your text file with your random item data (format:: ItemId DamageValue StackSize %chance [s:slot][enchantID enchantLevel]..).
Lines with a # are ignored.
StackSize can optionally be a range to give a random amount of the item. For example, a StackSize of 5-30 (no spaces) will create that item with anywhere from 5 to 30 items in the stack.
ex:
#For example, the next line gives a 50% chance of adding a stack of 5 boats.
333 0 5 50
#This line gives a 100% chance for a stack of 1 to 10 Diamond Chestplates.
311 0 1-10 100
#This line gives a 100% chance for an iron sword with sharpness 5, Knockback 4 and Looting 2
267 0 1 100 16 5 19 4 21 2
#This line gives a 100% chance for a stack of 11 stone to be placed in slot 25
1 0 11 100 s:25
optionally enter the coordinate range that you want to search for chests (all zeroes will check the entire map)
click 'Populate Chests' and wait until it finishes.

old version:
Spoiler:

Enchantment data must come in pairs (id and level) or the item will fail to become enchanted.  Enhantment IDs can be found here.


For items with durability (tools, armor, etc.):
damage 0 = normal new item.
damage 1 = it has been used/damaged once
damage 100 = it has been used/damage 100 times
Putting in a number higher than the item's normal use limit results it it breaking on one use.
Putting in a negative number results in an "overcharged" item that has that many extra uses compared to normal.


Disclaimers/notes:
Backup your map just in case. It is working fine for me, but there may be situations I didn't account for.
If you put bad item data in the text file then weird/bad things may happen (stack size and %chance should adjust for bad numbers) .
Double chests are treated as two separate chests in the save files. As such, if either half (top/bottom) is empty then that half will get populated.
Uninitialized chests will not be populated. E.g., placing a chest block in mcedit and never doing anything with it results in an uninitialized chest. Simply loading the map in Minecraft will initialize any uninitialized chests in loaded chunks.



Light fixer is a tool that can fix the lighting issues caused by converting a map with blocks in layer 127 to anvil.

Light fixer v0.1 Posted Image download- win32

Basically, I figured out exactly how the anvil conversion breaks maps and this little program fixes them.

Take your world and load it up in Minecraft so it converts to anvil.
Immediately save and exit and close Minecraft (if you walk around then the bad light data can propagate to the blocks and I can't fix that).
Run "Light fixer.exe", pick your world and let it do its work.



It is really a simple fix once you realize what the conversion broke and where to look.
It is all the height map.  The height map tells Minecraft how far down the sunlight goes unobstructed (so one higher than the highest opaque block).  Pre-anvil, it is stored in a byte array.  Converting a map with blocks in layer 127 causes an overflow which rolls the heightmap value to -128.
My little program finds all those -128's and turns them into the +128's that they should be.



Disclaimers/notes
As always, backup your map just in case.
This is meant for worlds freshly converted to anvil.  If you already played for a while after converting to anvil then it is very likely that bad light data already propagated to other parts of the save file and this doesn't fix that.
Do not attempt to run this before converting the map to anvil.  Bad things will probably happen.
There is another anvil light bug (as demonstrated in last_username's video) with similar side effects.  This program can't fix that bug, but last_username has now released a mod that can.



Randomize Spawners is a tool that will scan a world for all monster spawners and change it to another random spawner type as defined in "RandomSpawners.txt"

Randomize Spawners v0.2 gui Posted Image download- win32

run Randomize Spawners.exe
click 'Select World' and choose your world folder.
click 'Select Random File' and choose your text file with your random values (format: %chance, entityName)
#example 20% chance creeper and 50% chance cave spider.
20 Creeper
50 CaveSpider
enter the coordinate range that you want to randomize (or leave all as 0 to do the entire map)
click 'Randomize Spawners' and wait for it to finish.


old version:
Spoiler:


Note: Uninitialized spawners will not be randomized.  E.g., placing a spawner in mcedit and never assigning a mob type will result in an uninitialized spawner. Simply loading the map in Minecraft will initialize any uninitialized spawners in loaded chunks as pig spawners.



Edit Signs is a tool that scans your world for signs and opens them for editing in a simple gui.

Edit Signs v0.2 Posted Image download - win32

Run 'Edit Signs.exe'.
Click 'OPEN WORLD'.
Select your world's folder.
Wait for it to finish searching for signs.
Edit the text lines for signs as desired. (Use the dropdown menu to select pages if you have over 100 signs.)
Click 'SAVE SIGNS'.
Wait for it to finish saving.
Repeat as desired.

Format codes placed before text should work:
Spoiler:

Notes/disclaimers:
Backup your map just in case.
Entering text that Minecraft does not support will likely cause Minecraft to discard/regenerate that chunk the next time you load the map in game.
The program tries to enforce the 15 characters per line limit, but a 16th character can often stick around anyway.  Minecraft will truncate the line (remove the 16th character) the next time you load the map in game.



Add Ladders is a tool that will find any empty (all air) chunk sections that have existing sections above them and add an invisible floating ladder in the middle of them.  This is intended to help remove another anvil light bug without requiring the player to use a mod.

Add Ladders 0.1 Posted Image download- win32

Run Add Ladders.exe.
Select your map's world folder and wait for it to finish processing the map.
Use MCEdit to relight the map (or at least the updated chunks with new ladders).




Create Players is a tool to create many player.dat files with random starting positions.

Create Players v0.1 Posted Image download - win32

pic:
Spoiler:

Run Players.exe
Enter the X and Z coordinate ranges that you want the players to randomly start in.
Click 'Select World' and select your world's folder.
Enter the names of the players you want to create files for.
You can remove names from the list by selecting the name in the list and clicking 'Remove player from list'
When all of your players are in the list, click 'Create player.dat files'
The files are put in the same folder as Players.exe.
Copy/move the player.dat files to your server world's players folder.


The sea level field should be left alone most of the time.
This program uses your world's heightmap to give the players their Y coordinates.  If the chunk a player got put in doesn't exist, then that player's Y defaults to sea level.


Notes:
I only tested this on a vanilla server.
If your world's heightmap has bad data then player starting heights will also be bad.
It doesn't check the block you are spawning above so you might spawn in a lake if there is one within your coordinate range (or if you are extremely unlucky, in a surface lava pool).





Source: https://github.com/kamyu2/NBT
https://github.com/kamyu2/pynbt-tools
Credit:
Made using the NBT library from https://github.com/twoolie/NBT
Posted Image

Register or log in to remove.

#2

Vechs
    Vechs

    Void Walker

  • Members
  • 1967 posts

Posted 01 April 2012 - 10:38 PM

*
POPULAR

This is the best thing ever and I love it.

:D
Posted Image

#3

Koveryl
    Koveryl

    Iron Miner

  • Members
  • 271 posts
  • Minecraft: Pikapika5

Posted 01 April 2012 - 11:16 PM

nice :D
Squirrels

#4

alexANDgames
  • Minecraft: alexANDgame

Posted 02 April 2012 - 05:35 AM

Wow! This is just AWESOME!!!! :D
Posted Image
I also speedrun CTM maps (press the link): http://tinyurl.com/m3hqcg4

#5

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 02 April 2012 - 05:47 PM

Thanks guys!  Let me know if you run into any problems.
Posted Image

#6

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 03 April 2012 - 12:37 PM

Added Light fixer.
Posted Image

#7

kingkaider
  • Location: London, UK
  • Minecraft: kingkaider

Posted 03 April 2012 - 01:32 PM

Posted this in Vechs' thread, but just in case you didn't see it...

a) I love you.
b ) I love you.
c) Is there any chance you could work out why the lighting errors happen in maps that are already anvil? As someone who makes maps in anvil I find that I still get lighting errors even having started making the map in 1.2...
Posted Image

#8

Michael7123
  • Location: East of the Rockies
  • Minecraft: Michael7123

Posted 03 April 2012 - 01:54 PM

is it possible to ad random emchanted loot in the chests? For example, if I wanted to include a flint and steel with ubreaking 20, no would I do that?
And please don't say "download single player commands". I have tried to do that, and it doesn't work for me.

Posted Image


#9

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 03 April 2012 - 02:19 PM

View Postkingkaider, on 03 April 2012 - 01:32 PM, said:

Posted this in Vechs' thread, but just in case you didn't see it...

a) I love you.
b ) I love you.
c) Is there any chance you could work out why the lighting errors happen in maps that are already anvil? As someone who makes maps in anvil I find that I still get lighting errors even having started making the map in 1.2...

I'm leaning towards probably not.
This case was pretty easy to test since the issue is so widespread and consistent.  Other 1.2 lighting issues seem a lot more random.

View PostMichael7123, on 03 April 2012 - 01:54 PM, said:

is it possible to ad random emchanted loot in the chests? For example, if I wanted to include a flint and steel with ubreaking 20, no would I do that?
And please don't say "download single player commands". I have tried to do that, and it doesn't work for me.

It isn't possible at the moment, but it is a great idea and should be fairly easy to add.  I'll probably work on that later today.
Posted Image

#10

xerothomas
  • Location: The Nether(lands)
  • Minecraft: XeroThomas

Posted 03 April 2012 - 02:24 PM

This is amazing. This would help me out so much with making maps. :)

Thanks for making these awesome tools! :D
Posted Image

#11

a random minecrafter
  • Location: Norway
  • Minecraft: audun1234321

Posted 03 April 2012 - 06:54 PM

this is just awesome, it will help out alot when making random loot, and i think i makes maps alot more fun aswell.
Posted Image

#12

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 03 April 2012 - 08:52 PM

Updated Populate Chests to support item enchantments.
Posted Image

#13

JamesBean9

Posted 03 April 2012 - 09:51 PM

You+Vechs are amazing :) Thank you for light fixer :) Do you know if the light issues happens on other maps too? Or just vech's super hostile series?

#14

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 03 April 2012 - 10:05 PM

View PostJamesBean9, on 03 April 2012 - 09:51 PM, said:

You+Vechs are amazing Posted Image Thank you for light fixer Posted Image Do you know if the light issues happens on other maps too? Or just vech's super hostile series?

The lighting issue that it fixes happens on any custom map that was built pre-anvil with blocks in layer 127 and then converted to anvil.
Posted Image

#15

JamesBean9

Posted 03 April 2012 - 10:13 PM

Ok, because maybe you could post this to other threads that are having this issue? By the way, if you want I'll make a video showing how to use each mod. By the way, I haven't actually used light fixer yet, but once you choose lightfixer.exe, where do you go from that browse folder thing?

#16

Vechs
    Vechs

    Void Walker

  • Members
  • 1967 posts

Posted 03 April 2012 - 10:24 PM

*Bookmarks thread*

<3
Posted Image

#17

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 03 April 2012 - 10:32 PM

View PostJamesBean9, on 03 April 2012 - 10:13 PM, said:

Ok, because maybe you could post this to other threads that are having this issue? By the way, if you want I'll make a video showing how to use each mod. By the way, I haven't actually used light fixer yet, but once you choose lightfixer.exe, where do you go from that browse folder thing?

I thought about that, but the sheer number of maps that the issue probably occurs on would kinda make it a pain for me to post it everywhere.
If you or anyone else would like to refer people to here then please feel free to do so.

I'm not sure how useful a video tutorial would be, the programs are pretty minimalistic, but if you would like to make them then be my guest.

It is asking you to select the folder of the world you want to fix.  If it didn't start you in your saves folder then you'll have to browse to wherever that is yourself.
Posted Image

#18

Michael7123
  • Location: East of the Rockies
  • Minecraft: Michael7123

Posted 03 April 2012 - 11:07 PM

Thanks for adding enchantments.

Posted Image


#19

kamyu
    kamyu

    Lapis Lazuli Collector

  • Members
  • 1113 posts

Posted 04 April 2012 - 02:04 AM

Added new tool: Randomize Spawners.
Posted Image

#20

D4rkd3str0yer
  • Location: A Vechs map
  • Minecraft: D4rkd3str0yer

Posted 04 April 2012 - 04:01 AM

I must say bravo my friend.


Also, I want to be on the front page for when this becomes more popular that MCEdit. +1 from me by the way.

Edit: Random spawners? God help us. No one can run from the torment of Vechs...
Posted Image
CTM Maps beaten: SOF2, IS2, SI, SC, Rugged Horizons, From Ashes, Decent into Darkness   Currently playing: Kaizo