Can someone make a wasteland generator mod? Everytime you generate a world the world would look like a wasteland and the terrain would mostly be covered by podzol,sand,gravel,and stones? Fallout 4 is coming out and i wanna make a fallout like open world adventure map and i really need some help making it.
Easy enough! You can just try using modTick() {} with a random number generator. When the conditions are right, like if the chunk next to the player is missing, the modTick() {} will search a random number and apply that to an "if" statement, which then you can setup a callback to run a for-loop generating the terrain!
This example script is a WIP script, most of the code won't work without the variables. I'm using this code to generate the moon in my mod. Free to use!
function chunkHandler(blockId,ckX,ckY,ckZ){ //ALL Chunks rely on the bedrock layer, It's the same concept as coding the PC, but this is Lazy Chunk Loading!
this.clx = x; // ckX = getPlayerX();
this.cly = y; //= getPlayerY(); //This is to spawn the correct chunks!
this.clz = z; //ckZ = getPlayerZ()
var ckX = getPlayerX();
var ckY = getPlayerY();
var ckZ = getPlayerZ();
getChunk5 = Level.getTile(ckX+7,ckY-8,ckZ+7); //Up and Right
getChunk6 = Level.getTile(ckX-7,ckY-8,ckZ+7); //Up and Left
getChunk7 = Level.getTile(ckX+7,ckY-8,ckZ-7); //Down and Right
getChunk8 = Level.getTile(ckX-7,ckY-8,ckZ-7); //Down and Left
if(diffChunk == 3) { //Spawn Blocks within this Chunk!
//Level.setTile(ckX+15,ckY-8,ckZ,7);
spawnChunk3(getChunk1,function spawnChunk3(Chunk1){
for(var ck3 = 0; ck3 <= 4; ck3++) {
for(var ck3i = 0; ck3i <= 4; ck3i++) {
//print("test");
if(ckY-8 < 15) { //Looks to see if the Player is within "Chunk Load Zone"
if(ckX+5 != 0) { //Handler looks to see if Chunk next to Player isn't present.
Level.setTile(ckX+3+ck3, 20, ckZ-2+ck3i, 180); //If the Chunk isn't present SPAWN!
Level.setTile(ckX+3+(ck3+2), ckY-8, ckZ-2+ck3i, 7);
Level.setTile(ckX+3+ck3, ckY-8, ckZ-2+ck3i, 7);
}
}
}
}
});
}
}
}
function spawnChunk1(getChunk1,callback) { //Once the function is called, the script will not spawn the chunk if the ticks are greater then spawning.
if(getChunk1 == 0) {
callback(Chunk1);
}
}
function spawnChunk2(getChunk1,callback) {
if(getChunk1 == 0) {
callback(Chunk1);
}
}
function spawnChunk3(getChunk1,callback) {
if(getChunk1 == 0) {
callback(Chunk1);
}
}
Can't I know how to program, but this example script I came up with is still in Dev. Chunks are off-set at the moment. I came up with this script just the past week.
Can someone make a wasteland generator mod? Everytime you generate a world the world would look like a wasteland and the terrain would mostly be covered by podzol,sand,gravel,and stones? Fallout 4 is coming out and i wanna make a fallout like open world adventure map and i really need some help making it.
My ****.
Easy enough! You can just try using modTick() {} with a random number generator. When the conditions are right, like if the chunk next to the player is missing, the modTick() {} will search a random number and apply that to an "if" statement, which then you can setup a callback to run a for-loop generating the terrain!
This example script is a WIP script, most of the code won't work without the variables. I'm using this code to generate the moon in my mod. Free to use!
function chunkHandler(blockId,ckX,ckY,ckZ){ //ALL Chunks rely on the bedrock layer, It's the same concept as coding the PC, but this is Lazy Chunk Loading!
this.clx = x; // ckX = getPlayerX();
this.cly = y; //= getPlayerY(); //This is to spawn the correct chunks!
this.clz = z; //ckZ = getPlayerZ()
var ckX = getPlayerX();
var ckY = getPlayerY();
var ckZ = getPlayerZ();
getChunk1 = Level.getTile(ckX+7,ckY-8,ckZ); //right
getChunk2 = Level.getTile(ckX-7,ckY-8,ckZ); //left
getChunk3 = Level.getTile(ckX,ckY-8,ckZ+7); //up
getChunk4 = Level.getTile(ckX,ckY-8,ckZ-7); //down
getChunk5 = Level.getTile(ckX+7,ckY-8,ckZ+7); //Up and Right
getChunk6 = Level.getTile(ckX-7,ckY-8,ckZ+7); //Up and Left
getChunk7 = Level.getTile(ckX+7,ckY-8,ckZ-7); //Down and Right
getChunk8 = Level.getTile(ckX-7,ckY-8,ckZ-7); //Down and Left
if(getChunk1 == 0) {
diffChunk = Math.floor((Math.random() * 3) + 1);
if(diffChunk == 1) { //Spawn Blocks within this Chunk!
//Level.setTile(ckX+15,ckY-8,ckZ,7);
//Level.setTile(ckX+15,ckY-7,ckZ);
spawnChunk1(getChunk1,function spawnChunk1(Chunk1){
for(var ck1 = 0; ck1 <= 4; ck1++) {
for(var ck1i = 0; ck1i <= 4; ck1i++) {
//print("test");
if(ckY-8 < 15) {
if(ckX+5 != 0) {
Level.setTile(ckX+3+ck1, 20, ckZ-2+ck1i, 180);
Level.setTile(ckX+3+(ck1+2), ckY-8, ckZ-2+ck1i, 7); // make platform bigger
Level.setTile(ckX+3+ck1, ckY-8, ckZ-2+ck1i, 7);
}
}
}
}
});
}
if(diffChunk == 2) { //Spawn Blocks within this Chunk!
//Level.setTile(ckX+15,ckY-8,ckZ,7);
spawnChunk2(getChunk1,function spawnChunk2(Chunk1){
for(var ck2 = 0; ck2 <= 4; ck2++) {
for(var ck2i = 0; ck2i <= 4; ck2i++) {
//print("test")
if(ckY-8 < 15) {
if(ckX+5 != 0) {
Level.setTile(ckX+3+ck2, 20, ckZ-2+ck2i, 180);
Level.setTile(ckX+3+(ck2+2), ckY-8, ckZ-2+ck2i, 7);
Level.setTile(ckX+3+ck2, ckY-8, ckZ-2+ck2i, 7);
}
}
}
}
});
}
if(diffChunk == 3) { //Spawn Blocks within this Chunk!
//Level.setTile(ckX+15,ckY-8,ckZ,7);
spawnChunk3(getChunk1,function spawnChunk3(Chunk1){
for(var ck3 = 0; ck3 <= 4; ck3++) {
for(var ck3i = 0; ck3i <= 4; ck3i++) {
//print("test");
if(ckY-8 < 15) { //Looks to see if the Player is within "Chunk Load Zone"
if(ckX+5 != 0) { //Handler looks to see if Chunk next to Player isn't present.
Level.setTile(ckX+3+ck3, 20, ckZ-2+ck3i, 180); //If the Chunk isn't present SPAWN!
Level.setTile(ckX+3+(ck3+2), ckY-8, ckZ-2+ck3i, 7);
Level.setTile(ckX+3+ck3, ckY-8, ckZ-2+ck3i, 7);
}
}
}
}
});
}
}
}
function spawnChunk1(getChunk1,callback) { //Once the function is called, the script will not spawn the chunk if the ticks are greater then spawning.
if(getChunk1 == 0) {
callback(Chunk1);
}
}
function spawnChunk2(getChunk1,callback) {
if(getChunk1 == 0) {
callback(Chunk1);
}
}
function spawnChunk3(getChunk1,callback) {
if(getChunk1 == 0) {
callback(Chunk1);
}
}
Can you help me make this mod? I have like,0% knowledge of modding...
My ****.
Can't I know how to program, but this example script I came up with is still in Dev. Chunks are off-set at the moment. I came up with this script just the past week.
Oh...okay...
My ****.