tAPI [Tutorial] The many aspects of World Generation

hmmm.. I'm new to structures for terraria (i do know how do do c# for other things) but i was wondering for my mod if it was possible for me to make a structure similar to this
upload_2015-4-27_19-16-3.jpeg
i don't mind if you don't tell me but is it possible?
 
hmmm.. I'm new to structures for terraria (i do know how do do c# for other things) but i was wondering for my mod if it was possible for me to make a structure similar to this View attachment 48377 i don't mind if you don't tell me but is it possible?

It would be possible, but would take a lot of code. The diagonals could be accomplished with for loops, but deciding where to place them and start them would be the hard part. I might do a bit on diagonal structures, as they're a pain. But in overall, Yes, anything is pretty much possible, it just might take a LOT of code. And sorry for the late reply, I was at school :p
 
Ok, so I'm trying to do a mod that has ores that generate only in the ocean, would I do something like the minX be ocean biome, and the maxX be 0? so like Main.rand.Next(whatever the ocean's internal name is, 0)?
 
Ok, so I'm trying to do a mod that has ores that generate only in the ocean, would I do something like the minX be ocean biome, and the maxX be 0? so like Main.rand.Next(whatever the ocean's internal name is, 0)?

Well, seeing as there's two, you'd have to do something really ugly, like:

int dir = Main.rand.Next(2);
if (dir == ) { minX = 0; maxX = 200; }
else { minX = Main.maxTilesX-200; maxX = Main.maxTilesX; }

I think that would work, but I haven't tested it. Hope that helps, haven't done ores in a while.
 
When I build it, it says
Terraria 1.2.4.1, tAPI Builder r14

========================================
Building mod Mod-raria

Validating Jsons...
Compiling code...
MWorld.cs (25,15)
Method must have a return type
public override worldGenPostGen()
^
Failed to build Mod-raria.

========================================

Built 0 mods.
 
When I build it, it says
Terraria 1.2.4.1, tAPI Builder r14

========================================
Building mod Mod-raria

Validating Jsons...
Compiling code...
MWorld.cs (25,15)
Method must have a return type
public override worldGenPostGen()
^
Failed to build Mod-raria.

========================================

Built 0 mods.

I believe the error is that it should be public override void WorldGenPostGen() :)
 
I believe the error is that it should be public override void WorldGenPostGen() :)
Thanks!
[DOUBLEPOST=1434188644,1434188068][/DOUBLEPOST]What is a good number for the amount of veins if I want it to be semi-rare?
[DOUBLEPOST=1434188811][/DOUBLEPOST]
I believe the error is that it should be public override void WorldGenPostGen() :)
What is a good number of viens if I want an ore to be quite rare?
 
Thanks!
[DOUBLEPOST=1434188644,1434188068][/DOUBLEPOST]What is a good number for the amount of veins if I want it to be semi-rare?
[DOUBLEPOST=1434188811][/DOUBLEPOST]
What is a good number of viens if I want an ore to be quite rare?

Sorry for late reply, I was out. A good number of veins for a rare ore would be probably around 300 - 500. If you fly through your world with no-clip and lights on, you still might come across your ore often, though keep in mind that the player will have to explore lots of caves to find them. I think around 400 is good, but it's your preference. :)
 
Thanks! I am creating a mod which is going to add a lot of stuff, including world-gen buildings and multiple ores, and this guide was amazing!
 
Thanks! I am creating a mod which is going to add a lot of stuff, including world-gen buildings and multiple ores, and this guide was amazing!

Thanks! The buildings are fun to make! If you need any extra help feel free to make a convo with me :D
 
Back
Top Bottom