Indexes & Links

Monday, October 15, 2012

Island Forge - FedEx Quest Tutorial

I've been feeling guilty about ignoring Island Forge, especially now that the game's developer has run a successful Kickstarter, and moved to a free to play model. I logged back in this morning, poked around my large-scale island project, and realized I had a lot left to do. That's still work in progress, but I decided I'd do something small and useful too, so here's a quick tutorial on how to create a FedEx style quest.

Anyone who's played MMOs or computer RPGs knows what a FedEx quest is. "Hey, take this box to the guy over there." Here's the basic stuff you need to implement a FedEx quest in Island Forge:

  • The FedEx Task - This is an Island Forge task that you use to track the state of delivery.
  • The FedEx Guy - This is an actor that starts the FedEx Task.
  • The Delivery Target - This is an actor that receives and finishes the FedEx Task.
Tasks in Island Forge have three states, unset, started, and finished. We'll use this information to track the delivery status, and control both our actors. We'll add a slight twist too, allowing the player to deliver packages repeatedly, instead of just once.

Our basic node structure for both actors is the same: START at a branch node that tests the state of the FedEx Task. Depending on the state, go to either a specific dialog node, or a task node that updates the state of the FedEx Task (for delivery). Here's our FedEx Guy:
FedEx Guy - Click for larger image
Looking at the logic, we start at node 4, and branch based on the current task state. States default to unset, so the first time here, the player gets sent to node 1 and the choice of doing a delivery or not. If they say no, the dialog dead-ends at node 8. If they agree, we go to task node 2, start the FedEx Task, and then dead-end at dialog node 3, with the FedEx Guy asking if they delivered the package. If the player tries to talk to this agent again, they also dead-end at this same node. This prevents any confusion about starting another package task.

Let's look at what happens next. Here's our Delivery Target:
Delivery Target - Click for larger image
This is a much simpler actor. All it does is dead-end if the FedEx Task is unset or finished. If the FedEx Task is started (which is what happened above if the player agrees to deliver the package), we accept the package, and mark the FedEx task as finished (nodes 4, then 3).

Important: If you want a task to update as soon as a player starts talking to an actor, be sure you aren't relying on them to answer a dialog to trigger the update. A player can always his the close (X) button on a dialog. This is why I prefer using a branch or task node as the starting point for an actor instead of a dialog node.

OK, we've walked through the basic delivery cycle here. But wait, our task is not in the same state as when it started. Recall that tasks start as UNSET, and we've set it to FINISHED. Take a look at our FedEx Guy again and note that node 4 covers this case, taking us to dialog node 5. Here the player can decry the boring task and dead end, or deliver another package. If they choose to deliver another package, the FedEx Task is reset to UNSET, and they're led back to the node 1 dialog. If they close this out, then talk to the Delivery Target, they get sent back to dialog node 1 there too.

Be sure you understand the implications of using all three task states. In this case we used UNSET to imply that there is a pending package.  Thinking about what unset means and how you can leverage it adds some significant flexibility to actor control.

So that's it, a simple FedEx tutorial for Island Forge. Hope it's useful! If you want to see this in action, check out the Isle of Test, my little published test island.

No comments:

Post a Comment

Note: all comments are moderated to block spammers. Please be polite.