> For the complete documentation index, see [llms.txt](https://xeavin.gitbook.io/the-insurgents-manifesto/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xeavin.gitbook.io/the-insurgents-manifesto/vm-extension/general.md).

# General

### Description

VM calls are used inside .ebp scripts which are responsible for most of the things that happen in a location (Quests, NPC's, etc.). This extension extends existing VM calls, fixes various issues in others and also introduces entirely new ones.

### Versioning

The VM extension comes with a version, so whenever a drastic change is made, you can react much more easily to it. For example, if you want to use a call target that is only available in version 2 or higher, you can use the [Check Version](/the-insurgents-manifesto/vm-extension/new-call-targets/check-version.md) function to ensure it is actually available before calling it.

Some changes will also break compatibility with .ebp scripts that already include modified (new) call targets. So when upgrading, you will need to adjust the .ebp source file and/or recompile it to a script again.

Below is a list of which changes increase the version and which ones of them require you to update your source of script files.

<table><thead><tr><th width="277.3970198275924">Change</th><th width="150" data-type="checkbox">Increases Version?</th><th>Requires Updates To<select multiple><option value="e430641ac6f74da09be6c1c313ac92d4" label="Source" color="blue"></option><option value="540421edcd1443a797f93ab2e5f25105" label="Script" color="blue"></option></select></th></tr></thead><tbody><tr><td>Increased or decreased the argument count of a call target.</td><td>true</td><td><span data-option="e430641ac6f74da09be6c1c313ac92d4">Source, </span><span data-option="540421edcd1443a797f93ab2e5f25105">Script</span></td></tr><tr><td>Changed the order or type of an argument passed to a call target.</td><td>true</td><td><span data-option="e430641ac6f74da09be6c1c313ac92d4">Source, </span><span data-option="540421edcd1443a797f93ab2e5f25105">Script</span></td></tr><tr><td>Renamed a call target.</td><td>true</td><td><span data-option="e430641ac6f74da09be6c1c313ac92d4">Source</span></td></tr><tr><td>Added a new call target.</td><td>true</td><td></td></tr><tr><td>Bug fixes in existing or new call targets.</td><td>false</td><td></td></tr></tbody></table>

The VM extension version will only be increased if it is absolutely necessary. So you won't be forced to update your source and/or script files every few months.

### Call Tables

Each VM extension version comes with it's own call table that you pass on to the VM Script De/Compiler when de/compiling a script.

#### Usage

1. Follow the setup instructions of [The Insurgent's Workshop](https://xeavin.gitbook.io/the-insurgents-workshop/getting-started/setup).
2. Navigate into the directory: `The Insurgent's Workshop/bin/ext...`
3. Replace or expand the `functions.txt` file with the (latest) one from below.

Afterwards you will be able to use any of the [New Call Targets](/the-insurgents-manifesto/vm-extension/new-call-targets.md).

#### Files

{% file src="/files/VU0oldi3mDh2BNEKYICk" %}
VM Extension Version 2 (TIM v1.3.0+)
{% endfile %}

{% file src="/files/Vv0nvvvD8KTI0iwSY6VJ" %}
VM Extension Version 1 (TIM v1.2.0+)
{% endfile %}
