Skip to content

Commit

Permalink
0.8.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
x87 committed Dec 4, 2021
1 parent 2e61f30 commit ffb702f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
### 0.8.2 - Dec 4, 2021

- CLEO now uses AppData directory if there is no write permissions in the current game directory (see [First Time Setup](README.md#first-time-setup) note)
- add fluent interface for methods on constructible entities. See demo: https://www.youtube.com/watch?v=LLgJ0fWbklg
- fixed an issue when a script could run during game pause (when the game menu is active)

### 0.8.1 - Dec 1, 2021

- add support for San Andreas: The Definitive Edition v1.0.0.14718 (Title Update 1.03)

### 0.8.0 - Nov 25, 2021

- new 64-bit version of CLEO Redux (cleo_redux64.asi). It's intended to work only with remastered games.
- [initial support](#compatibility-with-the-trilogy-the-definitive-edition) for San Andreas: The Definitive Edition v1.0.0.14296 and v1.0.0.14388
- [initial support](README.md#compatibility-with-the-trilogy-the-definitive-edition) for San Andreas: The Definitive Edition v1.0.0.14296 and v1.0.0.14388
- fixed an issue when scripts might not reload after loading a save file

#### KNOWN ISSUES:
Expand Down
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ You should see the words "CLEO Redux" and the current version in the bottom-righ

There could be a noticeable lag during the first game run as CLEO Redux downloads the files necessary for [JavaScript support](#javascript-support). It won't happen on subsequent runs.

Also a new folder named `CLEO` should appear in the game directory. This is the primary location for all CLEO scripts, plugins and configs.
Also a new folder named `CLEO` should appear in the game directory\*. This is the primary location for all CLEO scripts, plugins and configs.

\*If CLEO fails to create new files in the game directory due to the lack of write permissions, it fallbacks to using alternate path at `C:\Users\<your_username>\AppData\Roaming\CLEO Redux`. `cleo_redux.log` and the `CLEO` directory can be found there.

### Compatibility with re3 and reVC

Expand All @@ -90,7 +92,7 @@ When running on `re3` and `reVC` make sure the game directory contains the file

At the moment CLEO Redux only supports San Andreas: The Definitive Edition `1.0.0.14296`, `1.0.0.14388`, `v1.0.0.14718` (Title Update 1.03). There are some key differences from other games:

- Ultimate ASI Loader by ThirteenAG is requred, see [Installation](#installation) notes
- Ultimate ASI Loader by ThirteenAG is required, see [Installation](#installation) notes
- there is no CLEO version displaying in the main menu
- function `showTextBox` does not work in JS scripts
- opcodes for custom commands are different, only a few are supported:
Expand All @@ -115,6 +117,8 @@ At the moment CLEO Redux only supports San Andreas: The Definitive Edition `1.0.

Use SA Mobile mode to compile CLEO scripts for San Andreas: The Definitive Edition.

For many people running their game with CLEO Redux installed results in the immediate crash. It happens if there is no write permissions in the current directory (`Win64`). To remediate this issue CLEO will fallback to using alternate path at `C:\Users\<your_username>\AppData\Roaming\CLEO Redux`. `cleo_redux.log`and the `CLEO` directory can be found there.

### Uninstallation

- Delete `cleo_redux.asi` (or `cleo_redux64.asi`).
Expand All @@ -130,7 +134,7 @@ CLEO Redux exposes some of the configurable settings in the file `CLEO\.config\c
- `AllowCs` - when set to `1` CLEO loads and executes `*.cs` files located in the CLEO directory. Enabled by default.
- `AllowJs` - when set to `1` CLEO loads and executes `*.js` files located in the CLEO directory. Enabled by default.
- `CheckUpdates` - when set to `1` CLEO check if there is a new update available for download during the game startup. Enabled by default.
- `LogOpcodes` - when set to `1` CLEO logs all executed opcodes in custom scripts. This log is part of the `cleo_redux.log` file that can be found in the game directory.
- `LogOpcodes` - when set to `1` CLEO logs all executed opcodes in custom scripts. This log is part of the `cleo_redux.log` file (see [Log](#log))
- `PermissionLevel` - sets the permission level for unsafe operations (see below). Default is `Lax`.

### Permissions
Expand Down Expand Up @@ -171,7 +175,7 @@ No unsafe operation is allowed.

## Log

CLEO logs important events and errors in the `cleo_redux.log` file located in the game directory. This file gets overwritten on each game run. If you experience any issue when using CLEO Redux, start investigating the root cause from this file.
CLEO logs important events and errors in the `cleo_redux.log` file located in the game directory (or `C:\Users\<your_username>\AppData\Roaming\CLEO Redux`, see [First Time Setup](#first-time-setup) note). This file gets overwritten on each game run. If you experience any issue when using CLEO Redux, start investigating the root cause from this file.

## Custom Scripts

Expand Down Expand Up @@ -292,6 +296,29 @@ Similarly to the `Object` class (see above), both the Library and native JavaScr

The priority was given to the native code in those cases where it provides the same functionality as script opcodes. For example, to calculate the absolute value of a number, use native [Math.abs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs), not [Math.Abs](https://library.sannybuilder.com/#/gta3?q=%22abs%22). See [Using Math](using-math.md) for more detailed information.

#### Fluent Interface

Methods on constructible entities (such as `Player`, `Car`, `Char` -- any entities created via a constructor method) support chaining (also known as Fluent Interface). It allows to write code like this:

```js
var p = new Player(0);

p.giveWeapon(2, 100)
.setHealth(5)
.setCurrentWeapon(2)
.getChar()
.setCoordinates(1144, -600, 14)
.setBleeding(true);
```

See demo: https://www.youtube.com/watch?v=LLgJ0fWbklg.

Destructor methods interrupt the chain. E.g. given the code:

`Char.Create(0, 0, 0, 0, 0).setCoordinates(0, 0, 0).delete()`

the chain can not continue after delete method as the character gets removed and its handle is not longer valid.

#### Examples

If you were to change the time of day to 22:00, run the following command
Expand Down
8 changes: 8 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## CLEO does not work with re3 or reVC

Check out [this information](https://github.com/cleolibrary/CLEO-Redux#compatibility-with-re3-and-revc).

## Game crash with CLEO on San Andreas: The Definitive Edition

- make sure you run the latest CLEO Redux version (0.8.2 and above)
- delete config files from `Documents\Rockstar Games\GTA San Andreas Definitive Edition\Config\WindowsNoEditor`
- run the game as administrator

If CLEO can't create files in `GTA San Andreas - Definitive Edition\Gameface\Binaries\Win64` it will use another directory at `C:\Users\<your_usename>\AppData\Roaming\CLEO Redux`. There should be `cleo_redux.log` and the CLEO folder where all your scripts go.
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h1 class="font-weight-bold d-flex justify-content-center">
href="https://github.com/cleolibrary/CLEO-Redux/releases/latest"
>Download</a
>
<small class="pt-1 text-muted">v0.8.1 | Dec 1, 2021</small>
<small class="pt-1 text-muted">v0.8.2 | Dec 4, 2021</small>
</div>
</div>
</div>
Expand Down

0 comments on commit ffb702f

Please sign in to comment.