zRPG – Update #3

This is the third update for zRPG – My C# Role Playing Game Project.

Click here to see Update #2

Click here to see Update #1

Click here to see the Original Post

Overview:

  • Created the Trade Screen
  • Made Trade Screen completely functional
  • Started working on Quests
  • Started working on Monsters

Trade Screen

In the last update I added the ability for the user to sell items at locations where a trader is present. I have changed this around quite a bit. I started by removing the Sell Item button from the Inventory Screen. Previously, the location named “Trader Stall” was simply marked behind the scenes as CanTradeHere, meaning that the user has the ability to trade at this location. Now, not only can the user trade here, but there actually is a Trader here. The Trader is a Non Player Character, or NPC. The NPC has a Name, some Gold, and some Items. When we get to a location in the world with an NPC that can trade, we will see a button on the Main screen; Trade.

mainScreenWithTradeButton

If we click on this Trade button, we will be directed to the Trade Screen. Here we see two grids. One for the Player’s inventory, and one for the Trader’s inventory. The grids are marked with a label on top with the Character or NPC name, respectively. This NPC’s name happens to be Gloria:

tradeScreen

We can also see on the bottom, the Player and NPC gold, and Sell Item and Buy Item buttons. If we click Sell Item, four things will happen.

  1. The Player’s Item will be removed from the Player’s Inventory.
  2. The Player’s Item will be added to the NPC’s Inventory.
  3. The Item’s value will be subtracted from the NPC’s Gold.
  4. The Item’s value will be added to the Player’s Gold.

If we click the Buy Item button, the same thing will happen, but in the opposite direction.

If a player doesn’t have enough gold to cover the cost of the item, they will not be able to purchase it. Likewise, if the NPC runs out of money, the player will not be able to sell any more items. In either case, the user will see a message similar to this one:

notEnoughGold

The Bronze Helmet it worth 8 gold, while Gloria only has 5 gold. I think in the case that a player wants to get rid of an Item, and doesn’t care if they get any gold, they should be able to giver the item away without receiving any gold. I could make the message ask the user if they still want to sell it for 0 gold, and give them Yes/No buttons instead of just an OK button. Maybe I will do that in a future update; for now, this works just fine.

Sort Inventory

Another goal from the last update was to add the ability to sort the inventory by the different columns in the grid. Thanks to this link, this was much easier than I thought and every column on the grid is now sort-able. Simply click the column header, and the column will be sorted in ascending order. Click the column again and the column will be sorted in descending order.

sort

In this screenshot, we can see that the Value column is sorted descended. This will work for any column on any grid except the grid on the Load Character screen. This includes the player’s inventory on the Menu Screen and both grids on the Trade Screen.

Quests

Quests are going to be one of the most fun things to write. Once I have the basic workings of the quests in place, I will be able to keep building on the map and really make the game come to life. For the first quest, I figured we will keep it simple. This is how I imagine it will go:

  • The player will navigate to a location on the map with an available quest
  • Once the player arrives, the quest is added to their quest screen in the menu
  • The quest will tell the player to go to a certain location and retrieve an item
  • The player will go to the location,  kill a monster, and pick up the item
  • The player will return to the location where they were given the quest, and they will be given the reward.

This is what is known as a Fetch Quest. Go here, get this, come back, you’re done. Sort of cliche for an RPG, but that’s okay, the real fun quests will come later.

I threw in yet another DataGridView, this time on the Quest screen in the Menu. It will start out empty:

noQuests

When a player goes to a location where there is a quest available, the quest will automatically be added to their grid in the Quest Screen.

quests

The name of this Quest is “Retrieve the Iron Dagger”, and the quests objective reads “Retrieve the Iron Dagger from the Meadow”. Wow, sounds interesting. Anyway, the whole point here is to navigate to the meadow, kill the monster, and bring the iron dagger back to the forest.

*In a future update, I would like to add NPCs for quests. There’s no reason the player should automatically get the quest. They should have to talk to the NPC, go through some dialog, and then decide if they want to accept the quest or not. That just seems a bit out of scope for this update, and I don’t want to get off track!

Monsters

To have a better idea of what’s going on around us in the world, I added a text box to act as a console window. Information about the locations, quests, NPCs, and monsters will be displayed here.

mainScreenWithConsole

Our quest Objective is “Retrieve the Iron Dagger from the Meadow.” So, if we take a look at the map, we can head there. Upon arrival to the Meadow, the console window will tell us “There is a Giant Rat here” (another classic RPG cliche), and a new button appeared on the screen; The Attack button.

mainScreenMeadow

 

Goals for Update #4:

Now that I have gotten this far, I think it’s time to wrap up this update. Here are some of my goals for the next update:

  • Start Developing the Combat System
    • Work on Attacking Algorithms
    • Can’t be too hard or too easy
  • Finish the first quest / Add NPC to quest / Add Dialog / Give player options
  • Give player option to give Trader item for free when they run out of gold

 

Looking for Feedback:

As per usual, I would love to know what you think! Please comment or email me any ideas, suggestions, comments, or concerns!

Thanks for reading!

2 thoughts on “zRPG – Update #3

  1. Pingback: zRPG – Update #4 | Zach DeGeorge

  2. Pingback: zRPG – Update #5 | Zach DeGeorge

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s