class lihzahrd.World(version: lihzahrd.header.version.Version, savefile_type: int, revision: int, is_favorite: bool, name: str, generator: lihzahrd.header.generatorinfo.GeneratorInfo, uuid_: uuid.UUID, id_: int, bounds: lihzahrd.fileutils.rect.Rect, size: lihzahrd.fileutils.coordinates.Coordinates, is_expert: bool, created_on, styles: lihzahrd.header.styles.Styles, backgrounds: lihzahrd.header.backgrounds.Backgrounds, spawn_point: lihzahrd.fileutils.coordinates.Coordinates, underground_level: float, cavern_level: float, time: lihzahrd.header.time.Time, events:, dungeon_point: lihzahrd.fileutils.coordinates.Coordinates, world_evil: lihzahrd.header.worldeviltype.WorldEvilType, saved_npcs: lihzahrd.header.savednpcs.SavedNPCs, altars_smashed: lihzahrd.header.altarssmashed.AltarsSmashed, is_hardmode: bool, shadow_orbs: lihzahrd.header.shadoworbs.ShadowOrbs, bosses_defeated: lihzahrd.header.bossesdefeated.BossesDefeated, anglers_quest: lihzahrd.header.anglerquest.AnglerQuest, clouds: lihzahrd.header.clouds.Clouds, cultist_delay: int, tiles: lihzahrd.tiles.tilematrix.TileMatrix, chests: List[lihzahrd.chests.chest.Chest], signs: List[lihzahrd.signs.sign.Sign], npcs: List[lihzahrd.npcs.npc.NPC], mobs: List[lihzahrd.npcs.mob.Mob], tile_entities: List[lihzahrd.tileentities.tileentity.TileEntity], weighed_pressure_plates: List[lihzahrd.pressureplates.weighedpressureplate.WeighedPressurePlate], rooms: List[], unknown_file_format_data: bytes = b'', unknown_world_header_data: bytes = b'', unknown_world_tiles_data: bytes = b'', unknown_chests_data: bytes = b'', unknown_signs_data: bytes = b'', unknown_npcs_data: bytes = b'', unknown_tile_entities_data: bytes = b'', unknown_pressure_plates_data: bytes = b'', unknown_town_manager_data: bytes = b'')

The Python representation of a Terraria world.

altars_smashed = None

Information related to the destruction of Demon Altars with a Pwnhammer.

anglers_quest = None

Information about today’s Angler’s Quest.

backgrounds = None

The backgrounds of the various biomes.

bosses_defeated = None

Which bosses have been defeated in the world.

bounds = None

The world size in pixels.

cavern_level = None

The depth at which the cavern biome starts.

chests = None

A list of all the containers (chests, barrels) in the world.

classmethod create_from_file(filename: str)

Create a World object from a .wld file.


Parsing an entire world may take up to a few minutes and quite a bit of memory!


filename – The name of the file that should be parsed.

created_on = None

The date and time this world was created in.

property crimson_hearts

Information related to the Shadow Orbs or Crimson Hearts in the world.

dungeon_point = None

The Old Man spawn point.

events = None

Currently ongoing world events.

generator = None

Information about the generation of this world.

id = None

The world id. Used to name the minimap file.

is_expert = None

If the world is in expert mode or not.

is_favorite = None

If the world is marked as favorite or not.

is_hardmode = None

Whether or not the world is in hardmode.

mobs = None

A list of mobs in the world…?

name = None

The name the world was given at creation. Doesn’t always match the filename.

npcs = None

A list of all the NPCs currently living in the world, including the Old Man.

revision = None

The number of times this world was saved.

saved_npcs = None

The NPCs that were rescued by the player.

savefile_type = None

The format of the save file. Should be 2 for all versions following 1.2.

shadow_orbs = None

Information related to the Shadow Orbs or Crimson Hearts in the world.

signs = None

A list of all non-empty signs in the world.

size = None

The world size in tiles.

spawn_point = None

The coordinates of the spawn point.

styles = None

The styles of various world elements.

tile_entities = None

A list of tile entities in the world, such as Training Dummies, Item Frames and Logic Sensors.

tiles = None

A matrix of all the tiles present in the world.

time = None

Game time related information.

underground_level = None

The depth at which the underground biome starts.

uuid = None

The Universally Unique ID of this world.

version = None

The game version when this savefile was last saved.

weighed_pressure_plates = None

A list of all Weighed Pressure Plates in the world.

world_evil = None

Whether the world has Corruption or Crimson.