Thursday, November 24, 2011

Creating an inventory item and placing it on the map

In any adventure game there will be props that the players and other characters can use, carry or consume. These props are called items.

In Esoteric any item of that the player can carry in the inventory is called an inventory item. These items may modify the abilities or properties of the player’s avatar while they are in his inventory or may even be simple tokens or markers in the game.

This tutorial explains the process of creating an inventory item in esoteric.



Creating an inventory item: -

1)   In the main window of the editor: Move the mouse over “menu options” placed on the left bottom of the screen and click on “logic”.



2)   The logic editor opens up, on the left hand side is the “item library” and the “trigger library” button, above these is the “add+” button, click on the “add+” button.



3)   On clicking the “add+” button, two buttons named “item” and “trigger” open up. To start the item creation, click on the “item” button.



4)   On clicking on the item button, a new blank item template is added onto the item library.



5)   Click on the “NewItem”.



6)   After clicking on the “NewItem”, a new window opens up in the Logic Properties Panel.



7)   Move the mouse over the drop down menu below “Choose Item Type” and select the item type as “Inventory".



8)   On selecting the item type as inventory, the logic properties panel fills up. Now we must decide what our Items should look like.

Esoteric has a library of 3D models for you to choose from. Press “Open Item Library”.



9)   A library containing various 3-d models opens; you can move the mouse over the 3-d models to view them.

As you move the cursor over the 3-d models, a light blue box follows the cursor. This box can be used to select the 3-d model you wish to use.



10)   Move the scroll bar located on the right of the library to view more 3-d models.



11)   Left-click on the model to select it. The selected model will appear on the right of the visual library.



12)   Click on the “Select” button situated at the bottom of the screen to confirm the selection.



13)   The logic properties panel reappears. Move the scrollbar located on the right in the downward direction to completely view the options you have for creating your item.



14)   There is a textbox in the logic properties panel named as “Add a description”. Adding the description to your logic item notifies the avatar about the logic item.

For instance, if the logical item is a magical helmet, you may want to notify the avatar about its magical properties. You should add, “This is a magical item” in the textbox.



15)   Select Inventory Drop Action:-

Below the “Add a Description” panel is the “Select Inventory Drop Action” panel. This panel has a drop down menu which has 3 options



Permanent, Cannot be dropped, stays in inventory:-

Once the item has been picked up, it is permanently placed inside the inventory.
An example of this type could be a cursed trinket you can never get rid of once you pick it up.

These are typically used as markers to indicate that the player has performed a certain action in the game. (e.g. completed mission 1 cannot reattempt)

Place, Can be placed back into the world:-

Once the item has been placed inside the inventory, it can be placed again inside the 3-d world, and it remains in the 3-d world until it is picked up again by an avatar

An example of this type could be a relay baton which can be passed from avatar to avatar.

Destroy, Can be dropped but gets destroyed from world:-

Once the item has been picked up, it can be dropped from the inventory, but as soon as it’s dropped, it gets destroyed. These can be items that bestow a special property to the avatar while being carried but cannot be shared by the avatars.

An example of this type is a sealed envelope, the contents of which is confidential and is meant to be opened by only a particular avatar.

After the avatar has opened the sealed envelope, he can place it back in the 3-d world, but as soon as the envelope is placed back into the 3-d world, it is destroyed.


16)   Below the “Select Inventory Drop Action” panel, lies a section with three sliders to choose speed impact, jump impact and attack impact. These affect the avatar in the desired manner while it is carrying the item.



Their functions are listed below:-

Choose speed impact: -

The slider below the “Choose speed impact” panel, chooses the impact that the inventory item has on the avatar’s speed.

Moving this slider to the right increases the speed of the avatar whereas moving the slider to the left decreases the speed of the avatar.

For instance, if the avatar picks up a magic potion, his speed may increase, and thus this slider may be moved to the right.

Choose attack impact: -

The slider below the “Choose attack impact” panel, chooses the impact, the inventory item has on the avatar’s attacking ability.

Moving this slider to the right increases the amount of damage that the avatar causes on attacking whereas moving the slider to the left decreases the amount of damage that the avatar causes on attacking.

For instance, if the avatar picks up a sword, he causes greater damage on attacking another avatar, and thus this slider may be moved to the right.

Choose jump impact: -

The slider below the “Choose jump impact” panel, chooses the impact, the inventory item has on the avatar’s jumping ability.

Moving this slider to the right increases the jump height of the avatar whereas moving the slider to the left decreases the jump height of the avatar.

For instance, if the avatar picks up a poisonous mushroom, his jumping ability might decrease, and thus this slider may be moved to the left.

17)   The last section on the logic properties panel has two sliders, one to alter the health of the avatar, and the second one to alter the stamina of the avatar, or receiving the inventory item.
Their functions are listed below: -

Choose Health Bar Impact: -

The slider below the “Choose Health Bar impact” panel chooses the impact that the inventory item has on the avatar’s health, or the avatar’s ability to withstand attacks before dying.

For instance, if the avatar picks up a health pack, his health bar should increase, and thus this slider may be moved to the right.

Choose Stamina Bar impact: -

The slider below the “Choose Stamina Bar impact” panel chooses the impact that the inventory item has on avatar’s stamina or on avatar’s fatigue levels.

For instance, if the avatar picks up a magic potion, his stamina should increase, and thus this slider should be moved to the right.

18)   Once you have updated the “Health Bar Impact” and the “Stamina Bar Impact”, all the settings of your inventory item have been updated.

You should now go to the top of the Logic Properties Panel and name your inventory item.





19)   After giving a name to your item, click on “Save Changes” to save your item.



20)   Thus we have created an inventory item. I named my item PoliceHelmet, and gave it properties to increase the health and speed of the avatar.



Now we must create a trigger which lets us place the item into the 3D world.


Creating a trigger for your inventory item and placing it on the map: -

1)    Click on the “add +” button located on the top left of your screen, and click on “trigger”.



2)    You can now see a trigger called “NewTrigger” in the trigger library. Click on the “NewTrigger”.



3)    After clicking on the NewTrigger, a new window opens up in the Logic Properties Panel.



4)    Enter the trigger name and choose the trigger type as spawn.



5)    On specifying the trigger type as spawn, another drop down menu titled “Select Spawn Type” appears in the logic properties panel.

As you have just created an inventory item, select the spawn type as “Inventory”



6)    On selecting the spawn type as inventory, another sub-panel titled “Select Linked Item” appears below it. The drop down menu below it contains all the inventory items that you have created.

From the drop down menu, select the inventory item that you have just created. We will select the PoliceHelmet inventory item that we had created in the last section of this tutorial.



7)    Move the scroll bar down and you come across another sub panel with two sliders, titled, “Select Spawn Amount” and “Select Spawn Regeneration Time”.

Select Spawn Amount: - This indicates the total no. of times the inventory item is generated. This decides how many times an avatar can pick up the item. So, if the spawn amount is set to a value of 5, the inventory item is generated into the world 5 times.

The default value of the spawn amount is set to infinite. Moving the slider once to the right sets the spawn amount to 1, and each movement of the slider to the right increases the spawn amount till it reaches a maximum of 100.

Select Spawn Regeneration Time:- This indicates the time interval between the picking up of the inventory item and its regeneration.

So, if the spawn regeneration time is 5, the inventory item is picked up again only 5 seconds after an avatar picks it up the first time.

By default, the inventory item is regenerated as soon as it is picked up, but each movement of the slider to the right increases the time interval between picking up the item and its regeneration by 10 seconds.

In our example, we will choose the spawn amount as 5 and spawn regeneration time as 20



8)    Once you have specified the Spawn Amount and the Spawn Regeneration Time, you should now name your trigger and save it.

To do so, you need to go to the top of the Logic Properties Panel. Use the scroll bar on the right to reach the top of the Logic Properties Panel.



9)    Enter the trigger name and click on “Save Changes” to save your trigger.



10)    The trigger now appears in the Trigger Library with its new name.



11)    Now your trigger is ready to be placed on the map. Click on exit to return to the map creation screen.





12)    Go to the drop down menu located on the palette and select “all Themed Tiles”.



13)    Go to the drop down menu located on the palette and select “All Logic Items”.



14)    Your trigger now appears in the palette, left click on it to select it.

Photobucket

15)    With the trigger selected, left click on the main map to place your trigger.



16)    Your inventory item will be created in the 3-d world, exactly where you placed your trigger on the map.



Go to “Menu Options” at the left bottom of your screen, and click on “preview” to view you’re your game in 3D with the inventory item on the map.


No comments:

Post a Comment