> For the complete documentation index, see [llms.txt](https://alexs-organization-34.gitbook.io/rednodeeditor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alexs-organization-34.gitbook.io/rednodeeditor/usage/base-nodes.md).

# Base nodes

When first opening the program or creating a new project you will be presented with three red colored nodes, which I called <mark style="color:red;">`base nodes`</mark>. Those are:

* *OnSdkInitialized*
* *OnWorldUpdate*
* *OnGameStart*

<figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2Fxk5E55bP1Iwpd1Zk92rZ%2Fimage.png?alt=media&amp;token=4773ef8b-651d-419c-afd0-01fe9e3cfcac" alt=""><figcaption></figcaption></figure>

Realistically if it's the first time you would only need the last two, so you can delete `OnSdkInitialized` and always re-add it later.

***

## OnSdkInitialized

This node is almost always used to setup things which require to be executed only one time like:

* Creation of an UI
* Registering of sound files
* Initializing variables

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2F7CGx5tWOsAnZSGxYK5FJ%2Fimage.png?alt=media&amp;token=648fe578-c65d-41f7-8c02-17bfa6aff55a" alt="" width="179"><figcaption></figcaption></figure></div>

***

## OnWorldUpdate

All the nodes attached to `OnWorldUpdate` will be executed continuosly while playing in the world. Nodes listening to inputs like `GetKeyDown` or where you want them to continuosly be called should be put in here.

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FhS6WNvcZnq194ijFE4mj%2Fimage.png?alt=media&amp;token=945e9545-e47e-4fa0-b2b5-a196c8fe004f" alt="" width="180"><figcaption></figcaption></figure></div>

***

## OnGameStart

All the nodes attached to `OnGameStart` will be executed once at about half of the loading screen (when the player instance is created). If you happen to switch savegame or reload the same save without closing the game, the node will be called again, executing each attached node.

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FcdQCW1IdQDo17PUbQh4c%2Fimage.png?alt=media&amp;token=b9abcb03-3bfe-4661-a0bd-0354f8280919" alt="" width="182"><figcaption></figcaption></figure></div>

***

## Additional base nodes

Apart from the three starting ones, there are other base nodes which can be added to the graph. Those are:

### OnInitializeMod

Currently doesn't serve any purpose. It's normally used to create the config file for the mods (.cfg), which isn't currently supported in the editor. It's also the first base node to get executed, so it could be used to initialize variables if these are needed in OnSdkInitialized, which is the next base node to get executed.

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FSwhScRn4sQ4Z8bUERnRh%2Fimage.png?alt=media&amp;token=91289308-6a8f-4c42-b94b-963724d6bd44" alt="" width="178"><figcaption></figcaption></figure></div>

***

### OnUpdate

This works exactly the same as [#onworldupdate](#onworldupdate "mention")with the only difference that it always gets executed, independently if you are in the game, in the main menu, etc.

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FN6crwHPxM3BsaPjNjDo9%2Fimage.png?alt=media&amp;token=b23cf14b-afd3-48fd-a343-13f79b09dff6" alt="" width="179"><figcaption></figcaption></figure></div>

***

### OnFixedUpdate

This node is mainly used for physics based calculations, like moving objects around using rigidbodies. Using it instead of [#onupdate](#onupdate "mention")can prevent unwanted behaviors like laggy movement when working with physics.

<div align="left"><figure><img src="https://1176054007-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F16eHiWrLvkdzPgx4n88e%2Fuploads%2FI5arS3r44JP0ruNaeFrb%2Fimage.png?alt=media&amp;token=23d2a8e2-1ebc-4b7d-92a7-5597d44988ff" alt="" width="180"><figcaption></figcaption></figure></div>
