> For the complete documentation index, see [llms.txt](https://uyen18827.gitbook.io/veinif/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uyen18827.gitbook.io/veinif/tutorial-1/tutorial.md).

# Tutorial

## Writing your first scene

Make sure all the steps from [Getting Started](/veinif/tutorial-1/getting-started.md) has been done successfully. At this point, your browser should display the example game through `localhost`

Open `src/game/allParagraphs.ts`. You will be greeted with the demo game content inside function `getParagraph()`. Delete all content inside&#x20;

Currently, Visual Studio Code users can quickly generate VeinIF code snippets. type `paragraph` and press TAB or Enter for a new paragraph object.

![Snippet!](/files/-M_BKAY41A7Dekm0MzKp)

```
{
  name: "",
  content: ``,
  choices: [
    {
     id: 1, 
     content: ``, 
     nextName: `` 
    },
  ],
},
```

For other IDEs, this function is not supported yet. Simply copy the above code into `getParagraph()`

The first paragraph object should has property `name: "start"`

The `nextName` property of a choice and `name` property of a paragraph must match to successfully "branch" them together.

**Example**:

```typescript
{
   name: "start",
   content: `This is the content of the first paragraph`,
   item: [
     {
      itemName: `flower`,
      itemQty: 1,
      description: `A single purple flower.`,
       itemCode: `purple-flower`,
     },
          
   ],
   choices: [
     {
      id: 1, 
      content: `Nice. Let's go to the next one.`, 
      nextName: `next-p` 
     },
   ],
 },
 {
   name: "next-p",
   content: `This is the next paragraph!`,
   choices: [
     {
      id: 1, 
      content: `Content Content!`, 
      nextName: `start-1` 
     },
   ],
 },
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://uyen18827.gitbook.io/veinif/tutorial-1/tutorial.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
