Posts Tagged ‘item creation’

Almost done Item Creation

March 2, 2012

I shot my screen:

What you see above is my glorious Item Creation Interface, as described in the previous post. Well, almost. I said I was going to make failing recipes show up in red, but the way I have the string output stuff set up, it took less time for me to just write the name covered with xxxx instead.

It gets the point across. “Hmmm, I wonder what this xxxxx is that I don’t have enough copper bars for? I better make a couple more of them then.” I mean the thing is made out of 10 of them, so it’s gonna be good, right?!

While you can move the cursor on the workbench/forge/whatever panel, you can’t actually create anything with the A button yet. I haven’t coded in that part. I’ll do it tomorrow, it shouldn’t take any time.

A follow-up screenie:

Here, the forge is being ‘used’, and it has a different list of things it can create. It isn’t very long yet, though. I’ll finish this stuff up tomorrow and start the player with next to no items!

I want to take the weekend off from coding/designing/posting, but who knows. I’m thinking about making a video, but I still don’t think I have enough to show off yet. Maybe I will anyways. Whatever.


Item creation Interface Design

March 1, 2012

Since I’m writing it all out anyways, I may as well write it out as a post.

First up, I know I don’t want to have to arrange items on a surface, like in Minecraft. Terraria’s item creation sets up a list of things you can make with what you have, and you scroll through that list and pick the one you want. That will work for now.

Let’s assume the following simple recipes:


  • Workbench: Wood (5)


  • Copper Bar: Copper Ore (5)


  • Workbench: Wood (5)
  • Chest: Wood (5)
  • Copper Sword: Copper Bar (5)
  • Copper Armor: Copper Bar (10)
  • Copper Shield: Copper Bar (2), Wood (2)

(Nevermind the shield recipe, I just wanted to have a recipe with multiple materials so I’ll have an example to use for when I actually code things. I also purposefully have workbench in two different lists to force me to deal with overlap. The hellstone forge in Terraria, for instance, can create all of the items that the normal forge can, along with more..)

Now let’s say you’ve got a couple of stacks of wood and copper ores. When you ‘use’ a forge or workbench, all recipes available via that object should appear in a 2nd pane next to your item list. (Let’s see if I can get html tables to work in wordpress:)


>copper sword<
wood (99)
wood (99)
copper ore (99)
copper ore (99)
copper bar (8)


Workbench: Wood (5)
[Chest: Wood (5)]
Copper Sword: Copper Bar (5)
Copper Armor: Copper Bar (10)
Copper Shield: Copper Bar (2), Wood (2)

(Meh, that doesn’t look all that great, but it serves its purpose)

The workbench shows all things you can make using it, and those that you don’t have materials enough for will appear in red. The selection cursor will be locked to the righthand pane while you’re in the item creation interface, since you don’t have any reason to be choosing your own items.

Here I have the shield selected, and when I press A, it will make one and place it in the next available {empty} slot or add to the first similar stack (unless there’s no room!).

The only tricky part is how I’m going to define the recipes, because I don’t want it to be a chore to add new recipe sets to objects. I’m going to need 3 recipe lists, and I have to deal with overlaps.

Hopefully my next post will be a screenshot of a fully working interface.