Terrain Control

Terrain Control

235k Downloads

How create RANDOMLY creating chests?

windy31 opened this issue · 5 comments

commented

I've readed about BO3 objects,but they can be created only on constant x y z and its not random,how create RANDOM chests?

commented

You can try using a RandomBlock. @LanToaster has made a random chest.

The randomness in BO3s is somewhat limited. Random coords are not possible, for example. You can try to solve it using branches.

commented

Soo i have some another problem:when i'm adding something like:
"Block(0,0,0,CHEST,Basic-01.nbt)"
And start server,system just delete this from config,why?(i'm adding it to "DesertBiomeConfig.ini")
PATH of my loot: "\plugins\TerrainControl\worlds\world\WorldObjects\Container\BasicLoot"
Objects in "WorldObjects"
And 1 more question:When i'm set x = 0 y = 0 z = 0,this coords is world coords,or biom coords?
(For example,if i'm /tp 0 0 0,i'll teleport to my chest,or not?)
Btw,If i'm writing something like: "CustomObject(LootTable-A)" then i just cant find dat chest(he dont wanna creating)

commented

You Mix up the "ObjectFile" and the BiomeFile.

The LootTable objects are not really "Ready to use". It is meant more like a "Look, like this you can do it"

But there are two ways how to use this/these Object(s):
First, using them as a Branch in a Custom Structure, wich on your knowledge I wouldnt recomend.
And the Second is to "Integrate" them in your basic CustomObject. (Wich in Return would Limit your "Randomness")

First, you need to Understand how to use Objects. Objects are called/created inside your BiomeConfig.
There are several ways to "Include" an Object in the CustomObject queue, but I will use the basic/easiest method, like you already Tried.

CustomObject(LootTable-A)
Will create the Object LootTable-A
BUT each Object has some "SpawningRules" wich are configured inside the ObjectFile.
(The Objects in the Package doesnt have SpawnRules specified, so they wont Spawn or spawn how you dont want them to Spawn)

The Reason why "LootTable-A" doesnt work, is because it actually doesnt have a Chest inside it. It Points as Branches to other Objects. (You need to use "CustomStructure" to have Objects with Branches, but it is a bit more Complicated)

The Objects "Loot-Basic","Loot-BasicE","Loot-Rare" and "Loot-RareE" have actually Chest Data inside, and can be Called as CustomObject. But those dont have SpawningRules set aswell. (They would Spawn on a RandomBlock between Y 0 and 256)
So you would need to set those how you would like them. Or you copy the ChestData of this Object into another Object: (for Example Copy this row into another Object, of course you need to change the Coordinates)
RandomBlock(0,0,0,CHEST:1,Container/BasicLoot/Rare-01.nbt,7,CHEST:1,Container/BasicLoot/Rare-02.nbt,7,CHEST:1,Container/BasicLoot/Rare-03.nbt,8,CHEST:1,Container/BasicLoot/Rare-04.nbt,8,CHEST:1,Container/BasicLoot/Rare-05.nbt,9,CHEST:1,Container/BasicLoot/Rare-06.nbt,10,CHEST:1,Container/BasicLoot/Rare-07.nbt,11,CHEST:1,Container/BasicLoot/Rare-08.nbt,12,CHEST:1,Container/BasicLoot/Rare-09.nbt,14,CHEST:1,Container/BasicLoot/Rare-10.nbt,16,CHEST:1,Container/BasicLoot/Rare-11.nbt,19,CHEST:1,Container/BasicLoot/Rare-12.nbt,24,CHEST:1,Container/BasicLoot/Rare-13.nbt,33,CHEST:1,Container/BasicLoot/Rare-14.nbt,50,CHEST:1,Container/BasicLoot/Rare-15.nbt,100)

To your Question regarding the Coordinates. Those are Relativ coordinates to the Center of the Object. You cant set exact coordinates for Objects in your Biomes.

I hope you can Understand my explanation, I just came from work and I´m very tired, so thinking is right now not my greatest asset.

commented

Yes,i understood,thx to u!
But there is 3 other question:
1)I've create chests,but they are creating(sometimes) by group of 2-3(i've redacted Rarity),how i can solve that problem?
2)Almost always chests have constant loot,why?
3)Items in chests always on constant positions,really randomize their positions?

commented

Maybe we can continue this discussion on the forums, instead of on the bug tracker?

http://dev.bukkit.org/bukkit-plugins/terrain-control/forum/create-thread/