RPG Template

Top  Previous  Next

I know I promised to start adding customization options to the RPG template last time, but I couldn't stop myself from adding more features to it; we'll start adding those customizations next month, if I manage to keep myself from adding more goodies. Take a look at the new stuff that was added:

 

1) Health potions. That was an easy one, I'll admit it.

 

2) Gold that can be obtained by doing some tasks, killing enemies, etc.

 

3) Evil and neutral entities detection. Just move your mouse pointer over an entity and you will see a green icon appear over it (if it is a friendly entity) or a red icon (if it is an enemy). Just take a look at the pictures below and you'll see what I mean.

 

aum105_template1

 

aum105_template2

 

Just set an entity's "Status" skill to 1 if it is an enemy or set it to 2 if it is a friend - that's all! Now you might wonder why we would want to have friendly entities in the game, and the answer will become obvious when you will see the new RPG template feature I've added:

 

4) Quests system. Yes, we now have the ability to create as many quests as we want, and each quest that is completed successfully will bring our beloved player a customizable amount of money. The system is also very easy to set up, and these are the needed steps.

 

a) Drop an entity (be it animated or not) in the level and attach it the action named npc_quest.

 

aum105_template3

 

Set its String 1 to the message that should be displayed when the player comes close to it for the first time; I chose "Please find my friend Joe!" in the example above. Set the entity's String 2 to the message that should be displayed when the player finishes the task and returns to the NPC to collect its reward ("Thank you! Here's some gold!" in my example).

 

As you now know, the "Status" skill value isn't related to the quests directly; it will tell us if the entity is a friend or an enemy (remember the red and green icons?). "Gold" will tell the NPC how much gold it should give the player at the end of the quest, and "Quest_number" gives the number of the quest, which is limited to 100 per level, but can be increased easily, by changing the value of a variable.

 

The last thing to do is to check the "Quest_starter" flag; we need to do this, because these quests work with pair entities (one that starts the quest and the other that ends it, being the actual goal).

 

b) Drop another entity (animated or not) in the level and attach it the action named npc_endquest; this will be the entity that must be discovered in order to finish the quest.

 

aum105_template4

 

Set its String 1 to the message that should be displayed when it is found (or leave the string empty, if you don't want to display any message), set "Quest_number" to the same value with its corresponding quest starter, and then check the "Quest_ender" flag - that's all!

 

The good news is that you can have as many quests as you want running at the same time and they won't mess up with each other, so you can complete them in any order. The level contains two quests; run the level, and then rotate towards the right to see the two pairs of guards.

 

aum105_template5

 

I added the yellow texts using a painting program, of course. Btw, you shouldn't place these guys so close to each other in a "real" game.

 

I hope that you will like the new template features; I know I had a lot of fun coding them. I'll see you all next month, when we'll finally start customizing the template, I guess...