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

# Module

| Parameters | Type           | Description         |
| ---------- | -------------- | ------------------- |
| name       | String         | Name of the module  |
| type       | EnumModuleType | Type of the module. |

{% content-ref url="/pages/-MdVTPoWJDANNs0EhSYx" %}
[Enums](/novoscript/api/enums.md)
{% endcontent-ref %}

```
module = script.registerModule(name,type)
```

## module.addBooleanProperty

Adds a so-called "Check Box" property to the module

| Parameters   | Type    | Description                           |
| ------------ | ------- | ------------------------------------- |
| key          | String  | The unique identifier of the property |
| name         | String  | The displayed name of the property    |
| defaultValue | Boolean | The default value of the property     |

```
module.addBooleanProperty(key,name,defaultValue)
```

## module.addStringProperty

Adds a so-called "Combo box" property to the module

| Parameters     | Type      | Description                           |
| -------------- | --------- | ------------------------------------- |
| key            | String    | The unique identifier of the property |
| name           | String    | The displayed name of the property    |
| defaultValue   | String    | The default value of the property     |
| acceptedValues | String... | Accepted values of the property       |

```
module.addStringProperty(key,name,defaultValue,acceptedValues)
```

{% hint style="info" %}
Note: The acceptedValues must contain the defaultValue&#x20;
{% endhint %}

## module.addListProperty

Adds a so-called "Select box" property to the module

| Parameters     | Type      | Description                           |
| -------------- | --------- | ------------------------------------- |
| key            | String    | The unique identifier of the property |
| name           | String    | The displayed name of the property    |
| defaultValue   | String    | The default value of the property     |
| acceptedValues | String... | Accepted values of the property       |

{% hint style="info" %}
Note: The acceptedValues must contain the defaultValue&#x20;
{% endhint %}

## module.addDoubleProperty

Adds a so-called "Slider" property to the module

| Parameters | Type   | Description                           |
| ---------- | ------ | ------------------------------------- |
| key        | String | The unique identifier of the property |
| name       | String | The displayed name of the property    |
| value      | double | The default value of the property     |
| min        | double | The minimum value of the property     |
| max        | double | The maximum value of the property     |
| increment  | double |                                       |

```
module.addDoubleProperty(key,name,value,min,max,increment)
```

## module.addFloatProperty

Adds a so-called "Slider" property to the module

| Parameters | Type   | Description                           |
| ---------- | ------ | ------------------------------------- |
| key        | String | The unique identifier of the property |
| name       | String | The displayed name of the property    |
| value      | float  | The default value of the property     |
| min        | float  | The minimum value of the property     |
| max        | float  | The maximum value of the property     |
| increment  | float  |                                       |

```
module.addFloatProperty(key,name,value,min,max,increment)
```

## module.addIntegerProperty

Adds a so-called "Slider" property to the module

| Parameters | Type    | Description                           |
| ---------- | ------- | ------------------------------------- |
| key        | String  | The unique identifier of the property |
| name       | String  | The displayed name of the property    |
| value      | integer | The default value of the property     |
| min        | integer | The minimum value of the property     |
| max        | integer | The maximum value of the property     |
| increment  | integer |                                       |

```
module.addIntegerProperty(key,name,value,min,max,increment)
```

## module.getProperty

| Parameters | Type   | Description                           |
| ---------- | ------ | ------------------------------------- |
| key        | String | The unique identifier of the property |

```javascript
module.getProperty(key)
```

Returns a Property object with methods

| Method         | Type      | Description                    |
| -------------- | --------- | ------------------------------ |
| getBoolean     | Boolean   | A value of a boolean property  |
| getString      | String    | A value of a string property   |
| getList        | String... | A value of a list property     |
| getDoubleValue | double    | A value of a double property   |
| getFloat       | float     | A value of a float property    |
| getInteger     | integer   | A value of an integer property |
| getLong        | long      | A value of a long property     |

```javascript
module.getProperty("some_key").getBoolean();
// or
var property = module.getProperty("some_key");
var value = property.getBoolean();
```


---

# 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:

```
GET https://novoline.gitbook.io/novoscript/api/module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
