Code Monkey home page Code Monkey logo

terraria-tool's Introduction

terraria-tool

This is a simple tool to parse Terraria world files. While it supports a few simple commands, the intent of this project is mostly to allow me to write simple
Scala scripts to persuse or manipulate the Terraria world.

We now support both Terraria 1.0.x and 1.1 files!

To use, simply type:


    sbt "run <path-to-world-file> <action>"

Have lots of heap space available.

Only two actions are supported right now:

 
 - stats <default action>: shows some information about the world, such as what is in the chests, and what NPCs are wandering around your world
 - map: dumps an ASCII map of the world.  you can restrict it to a subset of the world by using --from and --to parameters and locations in the format [x]x[y]
 
 Example for drawing a map
 sbt "run yourworldfile.wld map --from==2950x200 --to=3250x900"

Output

Map output looks like a big ugly ASCII mess. ` are torches, tiki lamps, or lampposts, | are walls, dd indicates a door. You can see a small two story building here, with a floating island to its right with a lamppost on it. To the left is a tunnel down. In the bottom right there is a pot (PP) and some copper (the cluster of Cs). ‘=’s is stone. I built a staircase out of stone blocks, which you can see under the floating island. ‘-’s are wooden platforms. The ‘.’s are dirt blocks.

                                                                      
                                                                      
                                                                      
                                                                      
                                                                      
                         ||||||||||--||||||                           
                         |                |                           
                         |`              `|                           
                         |                |                           
                         |                |             `             
                         |                |             `             
                    |||||||||||||-----|||||             `             
                    |                     |             `             
                    |`                   `|             `             
                   dd                     dd            `             
                   dd                     dd           ====           
                   dd         ++          dd          ==  ==          
                    |||||||||||||||||||||||==        ==    ==         
         pTT`pp  ||||||||||||||||||::::::::===      `=      =`        
ppppp    ::::::  |||.::::::::..:..........:::==                       
:::::--||:...:;    :::.:....................::==                      
....:    :...:;    ;::.....................:::===                     
....:    :...:;    ;:..................:.:::;:====                    
...::-  p:...:;    ;:....................:;;;::::==                   
..::;   ::...::::::::..................:::;;;;;;====                  
.::;;  p:..............................:;;;; ;;;=====                 
.:;;;  ::............................:::;;;; ;;;======                
::;;;  ::.......................:...::;;;; ; ;;;=======               
:;;;;  ;===...:.............:......::;;;;;   ; ;==========----========
:;;;;  ;====.....................:::;;;;;;   ;                        
:::::    ====..................:::;;;;;;;;   ;                        
.:..:     ===.....===..........::;;;;;;;;                             
.::::      ===...=======......::;;;;;;;                               
.:;;;    === ==.=========....::;;;; ;;;                    ---       `
.:;;      =====.===========:::;;;;;  ;;                              `
.:;;      =.===.===========:;;;;;;;  ;;                              `
.:;       =......===========;;;;;;;       ......--------==============
.:; .==   =..... .========= ;;;;; ;      ......         ::::...::::.::
.:; ===   =..........=====   ;;;;       .....          p::::.....:...:
.:   === `=............==    ;;;                       ::..:::...:...:
.:   ===- =....:.......      ;;;                      p:.....:::::::::
.:   ===  =...........       ;;;    `               pp::..............
.::  ===  =..........         ;;   :::              :::...............
..:  ===  ==........          ;   ::.:              :::::...=.........
..:  ===  ===......              ::..:              ;;:;:.====......::
..:  :==  ====.....             ::...:              ;;;;::=====....::.
..:  :.:  =====...             ::....::              ;; ;========:::::
..:  :.:   ====.               :......:::::          ;; ;        ;;;;:
..:  :.:  =======.            ::..........::         ;           ;;; ;
..:  :.:- ========           ::...........::pp                     ; ;
.::  :.:  ..=====           ::.............:::  pp`ppp             ;  
..:  :.:  ...======::    :  ::..............::  ::::::-----------  ;  
..:  :.:   ...=====.:   ::  ;::.............:;  ;;;;;;                
..:  :.:  .....=====::::::  ;;::...........::;  ;;;;;;                
..:  :.:   .....====.....:  ;;;::::.......::;;  ;;; ;;                
..:  :.:   .....====.....:: ;;;;;;:...:::::;;;  ;;; ;;                
..:  :.:   ......===......:: ; ;;;:::::;::;;;;    ; pp                
..:  :.:  ........==.......::; ;;;;;;;;;:;;;;;    ;p::::::::::::::::::
..:  :.:` ........==........::::;;;;;;;;;;;; ;   pp::..............:..
..:  :.:  ........=............:;;;;;;;;;;;; ;  p:::...............:..
..:  :.:  ........==...........::;;;  ;;;;;;--- ::.................::.
=.:  :.:   .......==............:;;;  ;;;;;;    ;::.................:.
..:` :.:  .........=............:::::::::;;;    ;;::................::
..:  :.:  ..............................:::p    ;;;::::::............:
..:  :.:  ................................::    ;;;;;;;;:::::::......:
..:  :.:- ...........................:.....: p  ;;;;;;;;;;;::;::......
=.:  :.:  .................................:::p ;;;;;;;;;;;;;;;:....:.
==:  :.:  ...................................::pp;;;; ; ;; ;;;;:......
==:  :.:  ....................................:::;;;; :::; ;;;;::.....
==:  :.:  .......................C..............:::::::.:; ;;;;;::::::
==:  :.:  ......................CCC.....................:::; ;;;;;;;;;
==:  :.:  .....................CCCC.......................:: ;;;;;;;;:
==:  :.:  .......:..............CCC........................::;;;;`;;;:
=.:  :.:  ..................................................::::::-;;;
..:  :.:  ...c..............................:....................::;;:
..:  :.:` ...ccc...........................:......................:; :
..:  :.:  ..ccccc......................:..........................:; :
..:  :::   ccccccc...........................................:....:- :
..:  ;::   ccccccc................................................:  :
..:  ;;     cccccc.....................................=.......=..:  :
..:  ;;     cccccc.............................:.......==.....=...:  ;
..::  ;      ccccc...................................====....=....:  :
=..:::::   c ccccc....=....====....:..............===========....::  :
===...:;   .cccccc..====...=====.::::..............=========.....:;  ;
===...:;  `..cccc==   ==....======;;:::.....=.....=====  ===....::;  ;
====.==;    ..ccc      .....======;;;;::::..==....======  ==....:;;  ;
=======;      cc        .....===  ;;;;;;;:..====...===     ==::::;; `=
=========     c          ....===  ;;;;;;;:::.===...==        ;;;;;; ==
==========               ....==   ;;;;;;;;;=.====...         ;;;;;  ==
===========             `...====  ; ;;;;;;;======..==        ;;;;  ===
===========              ..=====  ; ;;;; ;;  ====.==.        ;;;;  ===
===========               .=======;=;; ; ;;  =========  PP   ;; ;   ==
=======.===              =.==========. ;  ;   =========wPPwww;w=;    =
========.==              .=.=====  ==.=   ;    =.===============      
======.=.. =           ..==..==    =====  ;    ==========.==..        
==.===.=.===          ......=============       ========...           
==.====...=.          .....===============      =======  .            
========...====        .....===============       =====               
===.====..=====        .....====.========.===      ====               
====.===========       ...=..==.====.===...===CCC== ..=               
====.==.========...=.  ..==..==.===.....====.=CC=..===..              
================..==.  =.==..======...I.==.....==.=====..             

 
h2. Credit

This project is based in part on the "MoreTerra":http://moreterra.codeplex.com/ Terraria World Viewer project.  If you just want to display a map of your Terraria world, you should look into MoreTerra.

terraria-tool's People

Contributors

lmcalpin avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.