User Tools

Site Tools


hpl2:tutorials:script:howtomakenotes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hpl2:tutorials:script:howtomakenotes [2010/11/04 14:43] (current)
jens created
Line 1: Line 1:
 +======Setting Up======
 +Before you actually begin adding notes or any text that is seen within the game, you must create an extra_xx.lang file (xx being whichever language you plan on using for your story). [[amnesia:​custom_story|This]] tutorial covers how to create extra_xx.lang in your custom story'​s main folder.
  
 +======The Basics On Tags======
 +Now that you have that setup you can move onto actually adding journal entries. Extra_xx.lang uses XML and is used by your custom story to store on screen text, item descriptions,​ and most importantly for this tutorial, notes and journal entries picked up by the player. The file is separated into sections that start and end with a tag. <​LANGUAGE>,​ the main tag, is found at the beginning of the file whereas it's ending, </​LANGUAGE>​ is found at the end. Nested inside of the language tag are category tags.
 +\\ \\
 +This is what your file should look like if you followed the setup tutorial found above. Notice how category'​s end tag is placed before language'​s.
 +<​code>​
 +<​LANGUAGE>​
 +<​CATEGORY Name="​CustomStoryMain">​
 + <Entry Name="​Description">​A test description.</​Entry>​
 +</​CATEGORY>​
 +</​LANGUAGE>​
 +</​code>​
 +As you can see the category tag has an extra part to it the language tag doesn'​t have. Name=""​ is XML's way of identifying the tag, and is the way we specify whether the category tag will be a journal category or an item description category and so on. Both journal and note category tags will be explained in this tutorial.
 +
 +======Adding The Journal Category======
 +After </​CATEGORY>,​ add a new category tag with the name Journal, which should look like <​Category Name="​Journal">​. After that add an ending category tag, </​CATEGORY>​. In between these two tags is where you place your journal entries.
 +\\ \\
 +This is what it should look like when you're done.
 +<​code>​
 +<​LANGUAGE>​
 +<​CATEGORY Name="​CustomStoryMain">​
 + <Entry Name="​Description">​Just a description.</​Entry>​
 +</​CATEGORY>​
 +
 +<​CATEGORY Name="​Journal">​
 + JOURNAL ENTRIES GO HERE
 +</​CATEGORY>​
 +
 +</​LANGUAGE>​
 +</​code>​
 +
 +======Adding Journal Entries======
 +If you notice above, in the CustomStoryMain category tag there'​s another tag called Entry. It functions basically the same as category except it has one more addition. Instead of placing tags in between it like with category and language, you place text which you want to display in game.
 +
 +There are two types of entry tags that you will need. One tag specifying the name of the note and another that contains the body of text the player reads.
 +
 +Start by adding an entry tag in the journal category tag and give it the name Note_Test01_Name. In this tag, put whatever you want the name of your note to be. Make sure to add an end tag entry after this. Next, add a tag and name it Note_Test01_Text and then place whatever text you want the note to have. Again, make sure to place an end tag after this.
 +\\ \\
 +You should have something like this.
 +<​code>​
 +<​LANGUAGE>​
 +<​CATEGORY Name="​CustomStoryMain">​
 + <Entry Name="​Description">​Just a description.</​Entry>​
 +</​CATEGORY>​
 +
 +<​CATEGORY Name="​Journal">​
 + <Entry Name="​Note_Test01_Name">​Test Note</​Entry>​
 + <Entry Name="​Note_Test01_Text">​This note is a test.</​Entry>​
 +</​CATEGORY>​
 +
 +</​LANGUAGE>​
 +</​code>​
 +
 +And that's pretty much it for the extra_xx.lang file. Now there'​s just one more step to get it into your map.
 +
 +======Adding the Note to your Map======
 +In the level editor, click the entity button and select items from the drop down list. Choose one of these entities note_generic,​ note_letter,​ note_manual,​ note_paper01 or note_scroll and place it in your map. Select it, and from the entity tab go down to the NoteText entry. This is where you specify what journal entry you want to use, Test01 in this case. Save your map and load it in game to see the results.
hpl2/tutorials/script/howtomakenotes.txt ยท Last modified: 2010/11/04 14:43 by jens