Fandom

Surfpup's tConfig Mod Wiki

WorldGen Class

124pages on
this wiki
Add New Page
Comments18 Share
The information in this article is for Terraria v1.0.6.1.

This class is responsible for creating the world when a new one is created, and more. There aren't a lot of methods you can interact with, and it's very extensive as you can imagine, since it creates all the wonderful worlds for you to explore! This page will need a lot more information on it, particularly for what we can call when playing, or if we can alter any worldgen parameters. can be messed with to create your own biomes! (check the making custom biomes-page for more information)

For quick reference, here is the size of a world:

  • Feet
    • Small: 8400 by 2400
    • Medium: 12800 by 3600
    • Large: 16800 by 4800
  • Tiles
    • Small: 4200 by 1200
    • Medium: 6400 by 1800
    • Large: 8400 by 2400
  • Floating Islands
    • Small: 2-3
    • Medium: 4-5
    • Large: 5-6
Stars

Placeholder image

Read More


PropertiesEdit

Name Type Description
None N/A N/A

Static Properties Edit

Name Type Description
bestX int
bestY int
canSpawn bool
dEnteranceX int The X co-ordinate of the Dungeon entrance.
destroyObject bool
dRoomSize int[] The size of every Dungeon Room.
dRoomX int[] The X co-ordinate of every Dungeon Room.
dRoomY int[] The Y co-ordinate of every Dungeon Room.
dSurface bool Dungeon surface level?
dungeonX int The Dungeons X co-ordinate.
dungeonY int The Dungeons Y co-ordinate.
gen bool if the world is generating (set to true in the generateWorld() )
genRand Random The Random used by the World Generator.
hiScore int
houseTile bool[] True if the tile is a valid house tile, False if the tile isn't a valid house tile.
lastDungeonHall Vector2 Lowest dungeon room?
lavaLine int Maximum height that lave may be generated at Worldgen
loadBackup bool
loadFailed bool
loadSuccess bool
maxDRooms int The maximum amount of Dungeon Rooms.
maxRoomTiles int Maximum tiles in a room?
noLiquidCheck bool
noTileActions bool
numDRooms int How many Dungeon Rooms in a dungeon.
numRoomTiles int
roomX int[]
roomX1 int
roomX2 int
roomY int[]
roomY1 int
roomY2 int
saveLock bool
shadowOrbCount int Amount of Shadow Orbs generated on Worldgen
shadowOrbSmashed bool Check if a Shadow Orb was smashed.
spawnDelay int
spawnEye bool Spawn the Eye of Ctulhu?
spawnMeteor bool True to spawn a Meteor
spawnNPC int spawn wich npc?
statusText string Used in most title screens, the big centred text.
waterLine int Maximum height that water may be genned (Ocean line?)
worldBackup bool
worldCleared bool

MethodsEdit

Method Name Description
None N/A

Static Methods A-MEdit

Method Name Description
AddBuriedChest()
public static bool AddBuriedChest(
    int i,
    int j,
    [int contain = 0],
    [bool notNearOtherChests = false],
    [int Style = -1]
    )
{
}

Generate a chest in the rock layer?

  • Information about return type goes here
AddHellHouses()
public static void AddHellHouses()
{
}

Hellhouse Generation

  • Returns no value
AddLifeCrystal()
public static bool AddLifeCrystal(int i, int j)
{
}

Life Crystal Generation

  • Information about return type goes here
AddPlants()
public static void AddPlants()
{
}

Plant Generation

  • Returns no value
AddShadowOrb()
public static void AddShadowOrb(int x, int y)
{
}

Creates a shadow orb at the specified location

  • Returns no value
AddTrees()
public static void AddTrees()
{
}

Tree Generation

  • Returns no value
CactusFrame()
public static void CactusFrame(int i, int j)
{
}

Wich cactus frame to use? (on pearl/ebonsand?)

  • Returns no value
CaveOpenater()
public static void CaveOpenater(int i, int j)
{
}

Generate Caves?

  • Returns no value
Cavinator()
public static void Cavinator(int i, int j, int steps)
{
}

Generate Caves? (more likely then CaveOpenator() )

  • Returns no value
ChasmRunner()
public static void ChasmRunner(
    int i,
    int j,
    int steps,
    [bool makeOrb = false]
    )
{
}

Corruption Chasm Generation (Vertical)

  • Returns no value
ChasmRunnerSideways()
public static void ChasmRunnerSideways(
    int i,
    int j,
    int direction,
    int steps
    )
{
}

Corruption Chasm Generation (Horizontal)

  • Returns no value
Check1x2()
public static void Check1x2(int x, int j, byte type)
{
}

Description goes here

  • Return information goes here
Check1x2Top()
public static void Check1x2Top(int x, int j, byte type)
{
}

Description goes here

  • Return information goes here
Check1xX()
public static void Check1xX(int x, int j, byte type)
{
}

Description goes here

  • Return information goes here
Check2x1()
public static void Check2x1(int i, int y, byte type)
{
}

Description goes here

  • Return information goes here
Check2x2()
public static void Check2x2(int i, int j, int type)
{
}

Description goes here

  • Returns no value
Check2xX()
public static void Check2xX(int i, int j, byte type)
{
}

Description goes here

  • Returns no value
Check3x2()
public static void Check3x2(int i, int j, int type)
{
}

Description goes here

  • Returns no value
Check3x3()
public static void Check3x3(int i, int j, int type)
{
}

Description goes here

  • Returns no value
Check3x4()
public static void Check3x4(int i, int j, int type)
{
}

Description goes here

  • Returns no value
Check4x2()
public static void Check4x2(int i, int j, int type)
{
}

Description goes here

  • Returns no value
CheckAlch()
public static void CheckAlch(int x, int y)
{
}

Checks if the x/y tiles are valid alchemy stations?

  • Returns no value
CheckBanner()
public static void CheckBanner(int x, int j, byte type)
{
}

Description goes here

  • Returns no value
CheckCactus()
public static bool CheckCactus(int i, int j)
{
}

Cactus image to check? (pearl/ebonsand?)

  • Return information goes here
CheckChest()
public static void CheckChest(int i, int j, int type)
{
}

Description goes here

  • Returns no value
CheckOnTable1x1()
public static void CheckOnTable1x1(int x, int y, int type)
{
}

Description goes here

  • Returns no value
CheckPot()
public static void CheckPot(int i, int j, [int type = 28])
{
}

Description goes here

  • Returns no value
CheckRoom()
public static void CheckRoom(int x, int y)
{
}

Check if room is suitable for housing?

  • Returns no value
CheckSign()
public static void CheckSign(int x, int y, int type)
{
}

Check Sign Data at specified location?

  • Returns no value
CheckSunflower()
public static void CheckSunflower(int i, int j, [int type = 27])
{
}

Check if there's a sunflower at the specified location?

  • Returns no value
clearWorld()
public static void clearWorld()
{
}

Delete every item/NPC/Projectile, to save the world.

  • Returns no value
CloseDoor()
public static bool CloseDoor(int i, int j, [bool forced = false])
{
}

Close a door at the specified location

  • Return information goes here
CreateNewWorld()
public static void CreateNewWorld()
{
}

Creation of a new world.

  • Returns no value
dropMeteor()
public static void dropMeteor()
{
}

Causes a meteor to spawn in a random location. May not work if there are too many meteor tiles already in the world.

  • Returns no value
DungeonEnt()
public static void DungeonEnt(
    int i,
    int j,
    int tileType,
    int wallType
    )
{
}

Dungeon Entrance Generation

  • Returns no value
DungeonHalls()
public static void DungeonHalls(
    int i,
    int j,
    int tileType,
    int wallType,
    [bool forceX = false])
{
}

Dungeon Hall Generation

  • Returns no value
DungeonRoom()
public static void DungeonRoom(
    int i,
    int j,
    int tileType,
    int wallType
    )
{
}

Dungeon Room Generation

  • Returns no value
DungeonStairs()
public static void DungeonStairs(
    int i,
    int j,
    int tileType,
    int wallType
    )
{
}

Dungeon Stairs Generation (at entrance, where the duneon guardian spawn when you try to enter the dungeon without defeating Skeletron)

  • Returns no value
EmptyTileCheck()
public static bool EmptyTileCheck(
    int startX,
    int endX,
    int startY,
    int endY,
    [int ignoreStyle = -1]
    )
{
}

Description goes here

  • Return information goes here
EveryTileFrame()
public static void EveryTileFrame()
{
}

Description goes here

  • Returns no value
FloatingIsland()
public static void FloatingIsland(int i, int j)
{
}

Generate Floating Islands?

  • Returns no value
generateWorld()
public static void generateWorld([int seed = -1])
{
}

World Generation Code, called with CreateNewWorldCallBack(), Calls every other world generation-related method.

  • Returns no value
GrowAlch()
public static void GrowAlch(int x, int y)
{
}

Grows an alchemical herb at the specified location

  • Returns no value
GrowCactus()
public static void GrowCactus(int i, int j)
{
}

Generate a Cactus at the specified location?

  • Returns no value
GrowEpicTree()
public static bool GrowEpicTree(int i, int y)
{
}

Big Tree Generation at the specified location (~30 tiles height?)

  • Return information goes here
GrowShroom()
public static void GrowShroom(int i, int y)
{
}

Generate Mushrooms at the specified location

  • Returns no value
GrowTree()
public static void GrowTree(int i, int y)
{
}

Generate a Tree at the specified location

  • Returns no value
HellHouse()
public static void HellHouse(
    int i,
    int j,
    [byte type = 76],
    [byte wall = 13]
    )
{
}

Generate Hellhouses, specified location + tile & wall type

  • Returns no value
HellRoom()
public static void HellRoom(
    int i,
    int j,
    int width,
    int height,
    [byte type = 76],
    [byte wall = 13]
    )
{
}

Generate Hellhouses, specified location + tile & wall type, copy of HellHouse()?

  • Returns no value
IslandHouse()
public static void IslandHouse(int i, int j)
{
}

Generate Floating Island Houses

  • Returns no value
JungleRunner()
public static void JungleRunner(int i, int j)
{
}

Jungle generator (sets position of jungle)

  • Returns no value
KillTile()
public static void KillTile(
    int i,
    int j,
    [bool fail = false],
    [bool effectOnly = false],
    [bool noItem = false]
    )
{
}

Kills the tile at the specified position and replaces it with the item version of that tile, much like a pickaxe, axe, or hammer would.

  • Returns no value
KillWall()
public static void KillWall(int i, int j, [bool fail = false])
{
}

Delete a wall?

  • Returns no value
Lakinater()
public static void Lakinater(int i, int j)
{
}

Generate Lakes

  • Returns no value
loadWorld()
public static void loadWorld()
{
}

Open a world

  • Returns no value
MakeDungeon()
public static void MakeDungeon(
    int x,
    int y,
    [int tileType = 41],
    [int wallType = 7]
    )
{
}

Method that calls every other Dungeon Generation-related method, at the specified location and with the specified tile & wall types

  • Returns no value
meteor()
public static bool meteor(int i, int j)
{
}

Called by DropMeteor()

  • Return information goes here
Mountinater()
public static void Mountinater(int i, int j)
{
}

Generate Mountains

  • Returns no value
MudWallRunner()
public static void MudWallRunner(int i, int j)
{
}

Generate Mud Walls (jungle)

  • Returns no value

Static Methods N-ZEdit

Method Name Description
OpenDoor()
public static bool OpenDoor(int i, int j, int direction) 
{
}

Open a door at the specified location & direction

  • Returns information goes here
Place1x2()
public static void Place1x2(int x, int y, int type, int style)
{
}

Description goes here

  • Returns no value
Place1x2Top()
public static void Place1x2Top(int x, int y, int type)
{
}

Description goes here

  • Returns no value
Place1xX()
public static void Place1xX(
    int x,
    int y,
    int type,
    [int style = 0]
    )
{
}

Description goes here

  • Returns no value
Place2x1()
public static void Place2x1(int x, int y, int type)
{
}

Description goes here

  • Returns no value
Place2x2()
public static void Place2x2(int x, int superY, int type)
{
}

Description goes here

  • Returns no value
Place2xX()
public static void Place2xX(
    int x,
    int y,
    int type,
    [int style = 0]
    )
{
}

Description goes here

  • Returns no value
Place3x2()
public static void Place3x2(int x, int y, int type)
{
}

Description goes here

  • Returns no value
Place3x3()
public static void Place3x3(int x, int y, int type)
{
}

Description goes here

  • Returns no value
Place3x4()
public static void Place3x4(int x, int y, int type)
{
}

Description goes here

  • Returns no value
Place4x2()
public static void Place4x2(
    int x,
    int y,
    int type,
    [int direction = -1]
    )
{
}

Description goes here

  • Returns no value
PlaceAlch()
public static bool PlaceAlch(int x, int y, int style)
{
}

Description goes here

  • Returns information goes here
public static void PlaceBanner(
    int x,
    int y,
    int type,
    [int style = 0]
    )
{
}

Description goes here

  • Returns no value
PlaceChest()
public static int PlaceChest(
    int x,
    int y,
    [int type = 21],
    [bool notNearOtherChests = false],
    [int style = 0]
    )
{
}

Create a chest by placing one?

  • Return information goes here
PlaceDoor()
public static bool PlaceDoor(int i, int j, int type)
{
}

Description goes here

  • Return information goes here
PlaceOnTable1x1()
public static void PlaceOnTable1x1(
    int x,
    int y,
    int type,
    [int style = 0]
    )
{
}

Description goes here

  • Returns no value
PlacePot()
public static bool PlacePot(int x, int y, [int type = 28])
{
}

place a pot at the specified location?

  • Return information goes here
PlaceSign()
public static bool PlaceSign(int x, int y, int type)
{
}

place a sign at the specified location (tile?)

  • Return information goes here
PlaceSunflower()
public static void PlaceSunflower(
    int x,
    int y,
    [int type = 27]
    )
{
}

place a sunflower at the specifed location?

  • Returns no value
PlaceTile()
public static bool PlaceTile(
    int i,
    int j,
    int type,
    [bool mute = false],
    [bool forced = false],
    [int plr = -1],
    [int style = 0]
    )
{
}

Place a tile

  • Return information goes here
PlaceWall()
public static void PlaceWall(
    int i,
    int j,
    int type,
    [bool mute = false]
    )
{
}

Place a wall

  • Returns no value
PlantAlch()
public static void PlantAlch()
{
}

Description goes here

  • Returns no value
PlantCactus()
public static void PlantCactus(int i, int j)
{
}

Generate Cacti

  • Returns no value
PlantCheck()
public static void PlantCheck(int i, int j)
{
}

Description goes here

  • Returns no value
PlayerLOS()
public static bool PlayerLOS(int x, int y)
{
}

Description goes here

  • Return information goes here
playWorld()
public static void playWorld()
{
}

play a world, calls playWorldCallBack()

  • Returns no value
playWorldCallBack()
public static void playWorldCallBack(object threadContext)
{
}

what-to-do if play a world is called

  • Returns no value
QuickFindHome()
public static void QuickFindHome(int npc)
{
}

Lets Town NPC's find homes by themselves

  • Returns no value
RangeFrame()
public static void RangeFrame(
    int startX,
    int startY,
    int endX,
    int endY
    )
{
}

Description goes here

  • Returns no value
RoomNeeds()
public static bool RoomNeeds(int npcType)
{
}

Is every condition met for the house to be suitable?

  • Return information goes here
saveAndPlay()
public static void saveAndPlay()
{
}

save the world and play it, calls saveAndPlayCallBack()

  • Returns no value
saveAndPlayCallBack()
public static void saveAndPlayCallBack(object threadContext)
{
}

what to do if saveAndPlay() is called.

  • Returns no value
SaveAndQuit()
public static void SaveAndQuit()
{
}

Called when you stop playing (single player), calls SaveAndQuitCallBack() .

  • Returns no value
SaveAndQuitCallBack()
public static void SaveAndQuitCallBack(object threadContext)
{
}

what to do if SaveAndQuit() is called.

  • Returns no value
saveToonWhilePlaying()
public static void saveToonWhilePlaying()
{
}

auto player save? calls saveToonWhilePlayingCallBack().

  • Returns no value
saveToonWhilePlayingCallBack()
public static void saveToonWhilePlayingCallBack(
    object threadContext
    )
{
}

what to do if saveToonWhilePlaying() is called.

  • Returns no value
saveWorld()
public static void saveWorld([bool resetTime = false])
{
}

Description goes here

  • Returns no value
ScoreRoom()
public static void ScoreRoom([int ignoreNPC = -1])
{
}

Description goes here

  • Returns no value
SectionTileFrame()
public static void SectionTileFrame(
    int startX,
    int startY,
    int endX,
    int endY
    )
{
}

Description goes here

  • Returns no value
serverLoadWorld()
public static void serverLoadWorld()
{
}

Let the world be loaded by a server, calls serverLoadWorldCallBack()

  • Returns no value
serverLoadWorldCallBack()
public static void serverLoadWorldCallBack(
    object threadContext
    )
{
}

what to do if serverLoadWorld() is called

  • Returns no value
setWorldSize()
public static void setWorldSize()
{
}

set the world size

  • Returns no value
ShroomPatch()
public static void ShroomPatch(int i, int j)
{
}

Generate mushroom patches

  • Returns no value
SpawnNPC()
public static void SpawnNPC(int x, int y)
{
}

spawn a NPC at the specified location ( NOT the NPC.SpawnNPC() bool)

  • Returns no value
SpreadGrass()
public static void SpreadGrass(
    int i,
    int j,
    [int dirt = 0],
    [int grass = 2],
    [bool repeat = true]
    )
{
}

Generate grass at the specified location

  • Returns no value
SquareTileFrame()
public static void SquareTileFrame(
    int i,
    int j,
    [bool resetFrame = true]
    )
{
}

Description goes here

  • Returns no value
SquareWallFrame()
public static void SquareWallFrame(
    int i,
    int j,
    [bool resetFrame = true]
    )
{
}

Description goes here

  • Returns no value
StartRoomCheck()
public static bool StartRoomCheck(int x, int y)
{
}

Calls every other housing-checking method.

  • Return information goes here
TileFrame()
public static void TileFrame(
    int i,
    int j,
    [bool resetFrame = false],
    [bool noBreak = false]
    )
{
}

Description goes here

  • Returns no value
TileRunner()
public static void TileRunner(
    int i,
    int j,
    double strength,
    int steps,
    int type,
    [bool addTile = false],
    [float speedX = 0f],
    [float speedX = 0f],
    [float speedY = 0f],
    [bool overRide = true]
    )
{
}

Lets the tile be generated (world generation only)

  • Returns no value
UpdateWorld()
public static void UpdateWorld()
{
}

Description goes here

  • Returns no value
WallFrame()
public static void WallFrame(
    int i,
    int j,
    [bool resetFrame = false]
    )
{
}

Description goes here

  • Returns no value
WaterCheck()
public static void WaterCheck()
{
}

Description goes here

  • Returns no value
worldGenCallBack()
public static void worldGenCallBack(object threadContext)
{
}

what to do if generateWorld() is called (save it and spawn the player)

  • Returns no value

NotesEdit

None yet

Classes in Terraria

Chest | Cloud | Collision | Dust | Gore | Item | Lighting | Liquid | Main | NPC | Player | Projectile | Recipe | Sign | Star | WorldGen

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.