# 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](new-call-targets/check-version "mention") 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](new-call-targets "mention").

#### Files

{% file src="https://494707866-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcL02DailmDmfbmN1BQwe%2Fuploads%2FqR7phqnFtpd0nvyBTyft%2Ffunctions.txt?alt=media&token=d1404809-efde-4e3f-a1a3-87d2b711a8bb" %}
VM Extension Version 2 (TIM v1.3.0+)
{% endfile %}

{% file src="https://494707866-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcL02DailmDmfbmN1BQwe%2Fuploads%2FWtQ0Tlcqug15CP2kjGHJ%2Ffunctions.txt?alt=media&token=a72aff83-1abe-479c-863e-3f578d29140f" %}
VM Extension Version 1 (TIM v1.2.0+)
{% endfile %}
