You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/embedding.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,14 @@
1
1
# Embedding to custom host
2
2
3
-
CLEO Redux can be embedded and run JS scripts on an unknown (i.e. not [supported officially](./introduction.md#supported-releases)) host. A *host* is an application in which process `cleo_redux.asi` or `cleo_redux64.asi`[gets loaded or injected](#loading-into-custom-process) and where the CLEO runtime [runs](#launching-the-cleo-runtime). This feature is highly experimental and subject to change at any moment.
3
+
CLEO Redux can be embedded and run JS scripts on an unknown (i.e. not [supported officially](./introduction.md#supported-releases)) host. A _host_ is an application in which process `cleo_redux.asi` or `cleo_redux64.asi`[gets loaded or injected](#loading-into-custom-process) and where the CLEO runtime [runs](#launching-the-cleo-runtime). This feature is highly experimental and subject to change at any moment.
4
+
5
+
-[Loading into custom process](#loading-into-custom-process)
6
+
-[Launching the CLEO runtime](#launching-the-cleo-runtime)
7
+
-[Automatic launch](#automatic-launch)
8
+
-[Manually Controlling the Runtime](#manually-controlling-the-runtime)
9
+
-[Available Commands](#available-commands)
10
+
-[Manifest](#manifest)
11
+
-[Example](#example)
4
12
5
13
<iframewidth="560"height="315"src="https://www.youtube.com/embed/rk2LvDt7UkI"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen></iframe>
6
14
@@ -81,7 +89,7 @@ Manifest is a file with static configuration for the given host. Only unknown ho
81
89
82
90
-`host` should match the host's executable name. E.g. if the host runs via `application.exe`, the value is `application`. Available in scripts as the [HOST variable](./api.md#host).
83
91
-`host_name` defines the host's custom name used in the [log](./log.md)
84
-
-`compound` defines whether the host uses [compound definitions](./definitions.md). By default the host uses definitions from the file matching `<host>.json`, e.g. `application.json`. This file should be provided by the person managing integration of CLEO Redux with the given host and placed in the `.config` folder.
92
+
-`compound` defines whether the host uses [compound definitions](./definitions.md). By default the host uses definitions from the file matching `<host>.json`, e.g. `application.json`. This file should be provided by the person managing integration of CLEO Redux with the given host and placed in the `.config` folder.
85
93
86
94
When `compound` is set to `true` the host also uses command definitions for the Unknown host (e.g. `unknown_x86.json`). If this file is missing CLEO downloads it from Sanny Builder Library.
`Sanny Builder 3\CLEO\.config` folder contains `sanny.json` and `manifest.json` before the first run. The other files are downloaded or generated automatically.
108
+
`Sanny Builder 3\CLEO\.config` folder contains `sanny.json` and `manifest.json` before the first run. The other files are downloaded or generated automatically.
Copy file name to clipboardExpand all lines: docs/en/first-steps.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# First steps
2
2
3
+
-[Introduction](#introduction)
4
+
-[Concurrency](#concurrency)
5
+
-[Variables](#variables)
6
+
-[Control Flow](#control-flow)
7
+
-[Conditions](#conditions)
8
+
-[Loops](#loops)
9
+
-[Functions](#functions)
10
+
11
+
## Introduction
12
+
3
13
Since [available commands](./api.md) vary from game to game for the purpose of this tutorial we will be using CLEO's built-in commands such as [`log`](./log.md) command that is available everywhere.
4
14
5
15
Once you have CLEO Redux [installed](./installation.md) run the game once to make sure CLEO is loading. You can verify it by having `cleo_redux.log` created in the game root folder. If there are no errors in the log you can start adding new scripts.
@@ -94,7 +104,7 @@ temp = [];
94
104
log(typeof temp); // prints "object" in cleo_redux.log*
95
105
```
96
106
97
-
> *`typeof` returns "object" for an array (`[]`). This is a very well known quirk in the language. You can [read more about it here](https://web.mit.edu/jwalden/www/isArray.html) and find other means of differenting between arrays and plain objects.
107
+
> \*`typeof` returns "object" for an array (`[]`). This is a very well known quirk in the language. You can [read more about it here](https://web.mit.edu/jwalden/www/isArray.html) and find other means of differenting between arrays and plain objects.
Copy file name to clipboardExpand all lines: docs/en/imports.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,19 @@
2
2
3
3
You can import other scripts and some custom file formats in your code to make the code modular and share the common logic. This page describes static `import` statements (unconditional importing). Their format matches the [ES6 import syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import). CLEO Redux also supports [dynamic imports](./async.md#dynamic-imports) (importing on-demand).
4
4
5
+
-[Importing scripts](#importing-scripts)
6
+
-[Importing JSON files](#importing-json-files)
7
+
-[Importing other formats](#importing-other-formats)
8
+
-[TXT](#txt)
9
+
-[IDE](#ide)
10
+
5
11
## Importing scripts
6
12
7
13
- Extensions: `.js`, `.mjs`, `.ts`
8
14
9
-
`./` in a path resolves to the current file's directory. If a script is located at `C:\Game\CLEO\mod1\extra\addon.js` and it contains `import { foo } from './bar.js'`, the runtime will try to load `C:\Game\CLEO\mod1\extra\bar.js`.
10
-
11
-
`../` resolves to the parent directory. If a script is located at `C:\Game\CLEO\mod1\extra\addon.js` and it contains `import { foo } from '../bar.js'`, the runtime will try to load `C:\Game\CLEO\mod1\bar.js`. You can combine `../` to traverse multiple levels up.
15
+
`./` in a path resolves to the current file's directory. If a script is located at `C:\Game\CLEO\mod1\extra\addon.js` and it contains `import { foo } from './bar.js'`, the runtime will try to load `C:\Game\CLEO\mod1\extra\bar.js`.
12
16
17
+
`../` resolves to the parent directory. If a script is located at `C:\Game\CLEO\mod1\extra\addon.js` and it contains `import { foo } from '../bar.js'`, the runtime will try to load `C:\Game\CLEO\mod1\bar.js`. You can combine `../` to traverse multiple levels up.
13
18
14
19
To avoid running imported `.js` files as standalone scripts, either put them into a separate folder outside of the main [CLEO directory](./cleo-directory.md) (e.g. `CLEO/includes/`) or use the extension `.mjs`.
15
20
@@ -19,7 +24,6 @@ import func from "./other";
19
24
20
25
// imports named export PedType from types.js or types.mjs located in the CLEO/includes directory
Copy file name to clipboardExpand all lines: docs/en/installation.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
# Installation
2
2
3
+
-[CLEO Directory](#cleo-directory)
4
+
-[Dependency on ASI Loader](#dependency-on-asi-loader)
5
+
-[Note on re3 or reVC](#note-on-re3-or-revc)
6
+
-[Uninstallation](#uninstallation)
7
+
3
8
CLEO Redux comes with a hassle-free installer that identifies the selected game and downloads all the dependencies. Just run `cleo_redux_setup.exe` and follow its steps.
4
9
5
10
> Both CLEO Redux and its installer recognize the target game purely by the executable name in the selected/working directory.
Copy file name to clipboardExpand all lines: docs/en/other-features.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
CLEO Redux puts focus on improving dev experience and make scripting process easier.
4
4
5
+
-[Integration with Visual Studio Code](#integration-with-visual-studio-code)
6
+
-[SCM Log](#scm-log)
7
+
-[Hot Reload](#hot-reload)
8
+
-[Main Menu Information](#main-menu-information)
9
+
5
10
## Integration with Visual Studio Code
6
11
7
12
<iframewidth="560"height="315"src="https://www.youtube.com/embed/jqz8_lGnG4g"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen></iframe>
@@ -56,4 +61,4 @@ Hot reload for CS scripts does not work when CLEO Redux runs alongside CLEO Libr
56
61
57
62
## Main Menu Information
58
63
59
-
CLEO Redux displays the information such as the version and the amount of active scripts in the main menu of GTA III / Vice City and San Andreas. To disable this information set [`DisplayMenuInfo`](./config.md#general) to `0`.
64
+
`Frontend` plugin displays some extra information such as the CLEO version and the amount of active scripts in the main menu of GTA III, Vice City, and San Andreas. It also checks for available updates. If this information is not needed, delete `Frontend.cleo` file from the CLEO plugins directory.
0 commit comments