Opcodes Restoration Project
The Opcodes Restoration Project is a plugin for CLEO v2.0.0.4 and above for GTA III and Vice City that aims to restore functionality to many unsupported opcodes. Only US v1.0 has been thoroughly tested for both games. US v1.1 and Steam versions of Vice City are supported but they have not been tested.
Files
- III.Opcodes.cleo: The plugin for GTA III. Place in III\CLEO\CLEO_PLUGINS.
- VC.Opcodes.cleo: The plugin for Vice City. Place in VC\CLEO\CLEO_PLUGINS.
- dllmain.cpp: The primary source code for the plugin.
- III.OpcodesTest.cs: The test script for the plugin for GTA III. Place in III\CLEO.
- III.OpcodesTest.txt: The source code for the test script for GTA III.
- VC.OpcodesTest.cs: The test script for the plugin for Vice City. Place in VC\CLEO.
- VC.OpcodesTest.txt: The source code for the test script for Vice City.
- scm.txt: Let Sanny Builder recognize the new opcodes. Add onto SCM.INI in SB\data\gta3 and VCSCM.INI in SB\data\vc.
- opcodes.txt: For reference. Add onto opcodes.txt in SB\data\gta3 and SB\data\vc.
Building
You can rebuild the plugin for yourself if you want to. Use git (e.g. through Git Shell) to clone the repository and the submodules.
git clone --recursive https://github.com/cleolibrary/opcodes-restoration-project
Use Microsoft Visual Studio to open Opcode\Opcodes.sln
. Change the active solution configuration to either III
or VC
, then build the solution. The plugin will be located in Opcodes\Release\CLEO\CLEO_PLUGINS\
.
Restored opcodes
GTA III
This is a list of opcodes that have been restored and extended in GTA III.
Opcode | Command name | Notes |
---|---|---|
0116 | IS_ |
|
02BD | SET_ |
|
02BE | SET_ |
|
050F | GET_ |
|
0511 | PRINT_ |
|
0546 | IS_ |
|
0547 | IS_ |
Vice City
This is a list of over 100 opcodes that have been restored in Vice City. The "non-plugin alternative" column offers an equivalent or closely similar behavior of the opcode independent of the plugin.
Opcode | Command name | Non-plugin alternative |
Notes |
---|---|---|---|
00A2 | IS_ |
✓ | Exactly the same as 8118 |
00AC | IS_ |
✓ | Exactly the same as 8119 |
00C5 | RETURN_ |
✓ | Same as 0485 for most versions |
00C6 | RETURN_ |
✓ | Same as 059A for most versions |
00E2 | GET_ |
✓ | CLEO code snippet alternative |
0113 | ADD_ |
✓ | Similar to 0114 with player character |
0116 | IS_ |
||
0130 | HAS_ |
✓ | CLEO code snippet alternative |
0135 | CHANGE_ |
✓ | Exactly the same as 020A |
0136 | SHAKE_ |
✓ | CLEO code snippet alternative |
013B | IS_ |
||
013C | IS_ |
||
0155 | SET_ |
||
0156 | SET_ |
||
015E | IS_ |
✓ | CLEO code snippet alternative |
0163 | ADD_ |
||
016F | DRAW_ |
||
0178 | IS_ |
||
0179 | IS_ |
||
017B | SET_ |
✓ | CLEO code snippet alternative |
01C6 | DONT_ |
✓ | CLEO code snippet alternative |
01EE | ACTIVATE_ |
||
01EF | DEACTIVATE_ |
||
0218 | PRINT_ |
||
021D | SET_ |
✓ | CLEO code snippet alternative |
021F | SET_ |
✓ | CLEO code snippet alternative |
0220 | IS_ |
✓ | CLEO code snippet alternative |
0228 | IS_ |
✓ | CLEO code snippet alternative |
023A | IS_ |
||
023B | IS_ |
||
023E | FLASH_ |
||
023F | FLASH_ |
||
0240 | FLASH_ |
||
0242 | ARM_ |
✓ | CLEO code snippet alternative |
024B | SET_ |
||
024C | SET_ |
||
024D | HAS_ |
||
0250 | DRAW_ |
||
0251 | STORE_ |
||
0252 | RESTORE_ |
||
0255 | RESTART_ |
||
0295 | IS_ |
||
0299 | ACTIVATE_ |
✓ | CLEO code snippet alternative |
029C | IS_ |
||
02A0 | IS_ |
||
02A1 | MESSAGE_ |
||
02A2 | ADD_ |
||
02A4 | ADD_ |
||
02A5 | ADD_ |
||
02A6 | ADD_ |
||
02B9 | DEACTIVATE_ |
✓ | CLEO code snippet alternative |
02BC | SET_ |
||
02BD | SET_ |
||
02BE | SET_ |
||
02C3 | START_ |
Model and coordinates can be modified through a file named pacman.dat
| |
02C5 | GET_ |
||
02C6 | CLEAR_ |
||
02C7 | START_ |
Model can be modified through a file named pacman.dat
| |
02C8 | GET_ |
||
02C9 | CLEAR_ |
||
02CD | GOSUB_ |
||
02D6 | IS_ |
||
02D9 | CLEAR_ |
||
02DA | ADD_ |
||
02EE | IS_ |
||
02EF | DESTROY_ |
||
02F0 | DROP_ |
✓ | Similar to 0213 with model barrel1 type 9
|
02F1 | DROP_ |
✓ | Similar to 0213 with model barrel2 type 11
|
02FB | ACTIVATE_ |
||
02FC | PRINT_ |
||
0300 | PRINT_ |
||
0303 | PRINT_ |
||
0305 | PRINT_ |
||
0306 | PRINT_ |
||
0309 | PRINT_ |
||
031B | IS_ |
✓ | CLEO code snippet alternative |
031C | IS_ |
✓ | CLEO code snippet alternative |
032D | SET_ |
Has the same bug as GTA III | |
0338 | SET_ |
||
0344 | SET_ |
||
0346 | SET_ |
||
0349 | SET_ |
||
0351 | IS_ |
||
0356 | IS_ |
||
0357 | IS_ |
||
0367 | START_ |
✓ | CLEO code snippet alternative |
0368 | ACTIVATE_ |
||
036E | PRINT_ |
||
036F | PRINT_ |
||
0370 | PRINT_ |
||
0371 | PRINT_ |
||
0378 | SET_ |
||
0379 | SET_ |
||
037A | SET_ |
||
037B | SET_ |
||
037C | SET_ |
||
037D | SET_ |
||
037F | GIVE_ |
||
0386 | SET_ |
||
0387 | SET_ |
||
0388 | SET_ |
||
0389 | SET_ |
||
0393 | SET_ |
||
03A0 | IS_ |
||
03A5 | CHANGE_ |
Opcode is implemented but garage type 7 is buggy in Vice City | |
03C2 | IS_ |
||
03C6 | IS_ |
Checks the current level number instead, essentially the same behavior | |
03C9 | IS_ |
✓ | CLEO code snippet alternative |
03DB | ADD_ |
||
03DD | ADD_ |
||
03E9 | IS_ |
||
03EC | HAS_ |
||
03FB | SET_ |
||
03FC | SET_ |
||
0410 | SET_ |
||
0413 | SET_ |
✓ | CLEO code snippet alternative |
0415 | IS_ |
✓ | CLEO code snippet alternative |
041B | REGISTER_ |
||
041C | SET_ |
||
041F | OVERRIDE_ |
||
0420 | OVERRIDE_ |
||
0421 | FORCE_ |
||
0422 | DOES_ |
Has the same bug as GTA III | |
042A | IS_ |
||
0432 | GET_ |
||
0438 | SET_ |
||
0444 | SET_ |
||
0447 | IS_ |
||
044E | SET_ |
||
044F | MAKE_ |
||
0452 | ENABLE_ |
||
047B | LOCATE_ |
Has the same bug as GTA III | |
047C | LOCATE_ |
Has the same bug as GTA III | |
047D | GET_ |
||
0491 | HAS_ |
✓ | CLEO code snippet alternative |
04A0 | GET_ |
✓ | CLEO code snippet alternative |
04A7 | IS_ |
||
04A9 | IS_ |
||
04AB | IS_ |
||
04C8 | IS_ |
||
04CC | ADD_ |
||
04CD | ADD_ |
||
050F | GET_ |
✓ | CLEO code snippet alternative |
0511 | PRINT_ |
||
0513 | PRINT_ |
||
052D | GET_ |
||
0530 | ADD_ |
||
0532 | ADD_ |
Displays as a value "out of 0" in the stats menu | |
0535 | ADD_ |
||
0537 | SET_ |
||
0538 | ADD_ |
||
0547 | IS_ |
||
056F | ADD_ |
||
059D | SHUFFLE_ |
||
059E | FETCH_ |