[Discussion/WIP] Is this possible?

Discussion in 'Released Mods' started by Raztraz, Dec 1, 2012.

  1. Raztraz

    Raztraz Green Slime

    Hey everyone. I'm fairly new to modding and I'm wondering the possibilities of an idea that I have.
    So far I've done the basics. Make new ore, armor, some weapons, sprites. You know, all the easy stuff. I want to make this mod for post-hardmode. After hearing that there would be no more PC updates, I've turned to modding to make my own.

    My idea is to expand the game into the sky. I really liked the floating islands and thought that there should be more above ground. I want to make land across the whole sky above the floating islands. My question is how would I go about generating land in the sky in existing worlds? Or is that even possible? I was thinking to generate it via an item that is crafted or dropped from a boss at the end of hardmode. And I would need to create a new biome that stretches across the whole sky.

    Being new to terraria modding, I don't know how I could go about creating this. Some answers would be greatly appreciated, or help with coding would be even better.

    Thank you.
     
  2. Yoraiz0r

    Yoraiz0r The Wizard

    Generating land by itself isn't much of a simple concept , however modifying how the world looks in general is rather easy.
    lets go about some basics that you'd want to know........


    On Main stuff...

    Main.tile - this is a Tile object array , two dimensional and in the size of Main.maxTilesX and Main.maxTilesY.
    Main.maxTilesX and Main.maxTilesY - two ints that hold the size of the currently played world.
    Main.worldSurface - the distance in tiles , from the top of the map (edge of the sky) to the part where brown background starts to form.


    On Tile stuff...

    Tile.active - this is a boolean that indicates whether there is a tile in the front layer in this tile slot in the world , to explain it better if you see dirt a tile is active and once you mine it , active is set to false.
    Tile.type - this is a ushort that presents the type of the active tile , for example stone tiles have type 1 and dirt has type 0.
    Tile.wall - this is a byte that indicates the ID of the wall on the tile , 0 means air here.


    On WorldGen stuff...

    WorldGen.TileFrame(int x,int y) - this is a void method that you should call on tiles you modify after you modify them , this makes sure they look how they should look and updates the tiles around them so nothing will look weird. (for example , its called when you mine a tile with water above it , tileframe makes sure the water falls)


    I assume you know of ModifyWorld() by your saying that you added ores , so I won't expand on this simple method.

    Now , taking this information , you could go about doing something like....
    Code:
    public void ModifyWorld()
    {
          int lineLv = (int)(Main.worldSurface/2f);
          for(int i = 0; i < Main.maxTilesX; i++)
          {
                Main.tile[i,lineLv].active = true;
                Main.tile[i,lineLv].type = (ushort)1;
                WorldGen.TileFrame(i,lineLv);
          }
    }
    
    If I am not as rusty as I think I am , this should draw a simple line of stone tiles halfway from the sky to the brown layer in your world.

    More varient generations like hills and trees use different algorithms to make everything look nice , and random variables...
    -totally hopes Wigglesniff or Phlebas would respond here-
     
    Raztraz likes this.
  3. Raztraz

    Raztraz Green Slime

    Wow, thank you so much for this bit. Will definitely be a huge help and I'll test it out. I'm expanding my knowledge in C# right now. I know just the basics of it from back when I modded a bit of Oblivion. But they had the TES Construction set which made if very easy with little knowledge. No matter what I'm going to make this all work. At first it was just so me and my brother could have more to the game. But with all the work and learning I'll be putting in to it, it will definitely be something I will release and hopefully people will have some interest in it. Either way I'm going to enjoy making it and help is greatly appreciated.
     
    Yoraiz0r likes this.
  4. Jojiro

    Jojiro Hornet

    Can't help you much with worldgen, but if you want sprites for mobs, NPCs, items, w/e I've been running around spriting for fun recently.

    The other day I made some cake and a few weeks before I made some jellyfish swords. :confused:

    Maybe for your sky biome this Cthulhuite could be a mob.

    Cthulhulite.gif

    Other things I've made that haven't been implemented into other mods yet:
    Blue Pain.png Blue Sword of Jellyfish
    Pink Pain.png Pink Sword of Jellyfish
    Paralysis.png Paralysis Buff (inflicted by hardmode Jellyfish and the swords)
     
    Raztraz likes this.
  5. Raztraz

    Raztraz Green Slime

    That's some really cool sprites. I like the Cthulhuite a lot ^.^
     
  6. Yoraiz0r

    Yoraiz0r The Wizard

    OMMYGOODDD the Cthulhuite is ADOWABLE x3
     
    Bullseye55 and Jojiro like this.

Share This Page