Jump to content

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

Structure generator


  • Please log in to reply
7 replies to this topic

#1

BasKlein
  • Location: Netherlands, My House
  • Minecraft: basklein

Posted 10 November 2011 - 09:14 PM

Hey, I have an idea which could help a lot of people when they work on mods.
If someone could make a tool (not in-game) to make it easier for modders to code in structures.
Normally a modder would have to write endless lines of code, not even knowing if it was working.
Spoiler:
Could some kind person please take the time to make a tool, like a modeling tool of some kind, that translates graphics to codes.
That would be awesome.
Thank you

Hello people of the internet!
I have Twitter: @basklein and YouTube: Galiderath!


Register or log in to remove.

#2

MontyPylon
  • Minecraft: MontyPylon

Posted 23 November 2011 - 05:53 AM

OMG I wish, I've been looking all over the place for something like this, and I'm wondering what the Tale of Kingdoms uses.
Posted Image

#3

ShaneCraft

Posted 23 November 2011 - 01:12 PM

i did it like that too, but someone told me about this method, it saves allot of space, eventho i just needed 100 more lines of text for the roof, but i reached max capacity of my worlgen***.java file :P
here is my new method, i still dont know how to make like box X+Y+Z, i can only define it into X+Y, X+Z, Y+X, Y+Z, Z+Y, Z+X
for(int p=-6;p<=27;p++){
				   world.setBlock(i+p,j-1,k+45, Block.cobblestone.blockID);
				   }
			   for(int p=-6;p<=27;p++){
				   world.setBlock(i+p,j-1,k+44, Block.cobblestone.blockID);
				   }
			   for(int p=-6;p<=27;p++){
				   world.setBlock(i+p,j-1,k+43, Block.cobblestone.blockID);
				   }

It will generate the bits from where your X+Y+Z(i, j, k) starts on 0.
So you will have to use your brain a bit and calculate how many blocks you will have to move forwards,backwards,up,down,left or right.
Asuming you know how to make atleast the blocks place correctly, you can try to replace your current code for this.

(Note, this will only make rows! 1x)

Breakdown if you dont get it.
p is allways 0.
i've set it to -6, so it will go back by 6 blocks.
since i've set it to i, (i goes to left or right).
i- = right/ j- = down/ k- = backwards
i+ = left / j- = up  / k+ = forwards

I did i+-6 equals to -6, so it goes 6 blocks to the right.
Then i did <=27, means greater then 27 blocks also, it will make 27 from left to right. so it starts at -6 and ends on 21.
i have 45 rows going back and forwards so it will make 27 blocks from left to right everytime i increase a row or decrease going back or forwards.

I hope this will make it allot easier for you.
An example:
http://img708.images...11113152141.png

the cobblestone is what is explained here.

#4

KevinTehPro
  • Minecraft: KevinTehpro

Posted 02 April 2012 - 01:20 AM

View PostMontyPylon, on 23 November 2011 - 05:53 AM, said:

OMG I wish, I've been looking all over the place for something like this, and I'm wondering what the Tale of Kingdoms uses.
Bro they code it manually and are basically hardcore nerds
Posted Image

#5

MontyPylon
  • Minecraft: MontyPylon

Posted 02 April 2012 - 02:02 AM

View PostKevinTehPro, on 02 April 2012 - 01:20 AM, said:

Bro they code it manually and are basically hardcore nerds

Uh, well I really doubt they coded 31,000 lines of code by hand. But I figured out a way to easily copy structures like this, and it only took me about 10 minutes to code.
Posted Image

#6

KevinTehPro
  • Minecraft: KevinTehpro

Posted 02 April 2012 - 02:33 AM

View PostMontyPylon, on 02 April 2012 - 02:02 AM, said:

Uh, well I really doubt they coded 31,000 lines of code by hand. But I figured out a way to easily copy structures like this, and it only took me about 10 minutes to code.
Share please!
Posted Image

#7

xFritos
    xFritos

    Zombie Killer

  • Members
  • 204 posts
  • Location: United States

Posted 02 April 2012 - 06:34 AM

Well, i can't mod but it amazes me that modders do something that boring,that just makes me appreciate modders and the mods i have even more.

#8

Maribel_Han

Posted 02 April 2012 - 10:29 PM

Use arrays, loops, functions and other control structures. Programming abstractions are there for a reason.