Difference between revisions of "Opcodes Restoration Project"

From GTAMods Wiki
Jump to navigation Jump to search
(mention that SB already has these opcodes)
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
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 [[List of unsupported opcodes|unsupported opcodes]]. Only US v1.0 has been thoroughly tested. v1.1 for Vice City is supported and Steam for Vice City is partially supported but none have been tested.
+
The '''Opcodes Restoration Project''' is a plugin for [[CLEO]] v2.0.0.5 and above for [[GTA III]] and [[Vice City]] that aims to restore functionality to many [[List of unsupported opcodes|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 ==
 
== Files ==
*[https://www.dropbox.com/s/yw34xo81j902lxt/III.Opcodes.cleo?dl=0 III.Opcodes.cleo]: The plugin for GTA III. Place in III\CLEO\CLEO_PLUGINS.
+
*[http://spaceeinstein.altervista.org/III.Opcodes.cleo III.Opcodes.cleo]: The plugin for GTA III. Place in III\CLEO\CLEO_PLUGINS.
*[https://www.dropbox.com/s/7niqd0us5u1s1j2/VC.Opcodes.cleo?dl=0 VC.Opcodes.cleo]: The plugin for Vice City. Place in VC\CLEO\CLEO_PLUGINS.
+
*[http://spaceeinstein.altervista.org/VC.Opcodes.cleo VC.Opcodes.cleo]: The plugin for Vice City. Place in VC\CLEO\CLEO_PLUGINS.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/demo_plugins/Opcodes/Opcodes/dllmain.cpp dllmain.cpp]: The source code for the plugin.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/test_scripts/III.OpcodesTest.cs III.OpcodesTest.cs]: The test script for the plugin for GTA III. Place in III\CLEO.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/test_scripts/III.OpcodesTest.cs III.OpcodesTest.cs]: The test script for the plugin for GTA III. Place in III\CLEO.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/test_scripts/III.OpcodesTest.txt III.OpcodesTest.txt]: The source code for the test script for GTA III.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/test_scripts/III.OpcodesTest.txt III.OpcodesTest.txt]: The source code for the test script for GTA III.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/test_scripts/VC.OpcodesTest.cs VC.OpcodesTest.cs]: The test script for the plugin for Vice City. Place in VC\CLEO.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/test_scripts/VC.OpcodesTest.cs VC.OpcodesTest.cs]: The test script for the plugin for Vice City. Place in VC\CLEO.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/test_scripts/VC.OpcodesTest.txt VC.OpcodesTest.txt]: The source code for the test script for Vice City.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/test_scripts/VC.OpcodesTest.txt VC.OpcodesTest.txt]: The source code for the test script for Vice City.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/scm.txt scm.txt]: Let [[Sanny Builder]] recognize the new opcodes. Add onto [[Sanny Builder/SCM.INI|SCM.INI]] in SB\data\gta3 and [[Sanny Builder/VCSCM.INI|VCSCM.INI]] in SB\data\vc{{note|*}}.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/scm.txt scm.txt]: Let [[Sanny Builder]] recognize the new opcodes. Add onto [[Sanny Builder/SCM.INI|SCM.INI]] in SB\data\gta3 amd [[Sanny Builder/VCSCM.INI|VCSCM.INI]] in SB\data\vc.
+
*[https://raw.githubusercontent.com/cleolibrary/opcodes-restoration-project/master/opcodes.txt opcodes.txt]: For reference. Add onto opcodes.txt in SB\data\gta3 and SB\data\vc.
*[https://raw.githubusercontent.com/spaceeinstein/III.VC.CLEO/master/CLEO_SDK/opcodes.txt opcodes.txt]: For reference. Add onto opcodes.txt in SB\data\gta3 and SB\data\vc.
 
  
== GTA III ==
+
{{ref|*}} As of v3.7 Sanny Builder ships these opcodes as the [https://docs.sannybuilder.com/edit-modes/extension Restoration extension] in the Vice City mode.
 +
 
 +
== Building ==
 +
You can rebuild the plugin for yourself if you want to. Use git (e.g. through [https://desktop.github.com/ Git Shell]) to clone the repository and the submodules.
 +
<pre>git clone --recursive https://github.com/cleolibrary/opcodes-restoration-project</pre>
 +
 
 +
Run <code>premake5.bat</code> to generate project files for Microsoft Visual Studio 2015. If you use a different version of Visual Studio, open the file with a text editor and change vs2015 to your preferred version. A folder named <code>build</code> is created with the generated project files. Open <code>build\opcodes-restoration-project.sln</code>, change the active solution configuration to <code>Release</code>, then build <code>III.Opcodes</code> or <code>VC.Opcodes</code>. The plugin will be located in <code>bin\CLEO\CLEO_PLUGINS</code>.
 +
 
 +
== Restored opcodes ==
 +
=== GTA III ===
 
This is a list of opcodes that have been restored and extended in GTA III.
 
This is a list of opcodes that have been restored and extended in GTA III.
 
{|class="wikitable mw-collapsible mw-collapsed sortable"
 
{|class="wikitable mw-collapsible mw-collapsed sortable"
Line 18: Line 26:
 
|-
 
|-
 
|[[0116]] ||IS_<wbr>PLAYER_<wbr>STILL_<wbr>ALIVE ||
 
|[[0116]] ||IS_<wbr>PLAYER_<wbr>STILL_<wbr>ALIVE ||
 +
|-
 +
|01E6 ||PRINT_<wbr>WITH_<wbr>NUMBER_<wbr>SOON ||
 
|-
 
|-
 
|[[02BD]] ||SET_<wbr>FBI_<wbr>REQUIRED ||
 
|[[02BD]] ||SET_<wbr>FBI_<wbr>REQUIRED ||
 
|-
 
|-
 
|[[02BE]] ||SET_<wbr>ARMY_<wbr>REQUIRED ||
 
|[[02BE]] ||SET_<wbr>ARMY_<wbr>REQUIRED ||
 +
|-
 +
|0301 ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>SOON ||
 +
|-
 +
|0304 ||PRINT_<wbr>WITH_<wbr>4_<wbr>NUMBERS_<wbr>SOON ||
 +
|-
 +
|0307 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS_<wbr>SOON ||
 +
|-
 +
|030A ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>SOON ||
 +
|-
 +
|0385 ||PRINT_<wbr>STRING_<wbr>IN_<wbr>STRING_<wbr>SOON ||
 +
|-
 +
|048F ||REMOVE_<wbr>ALL_<wbr>CHAR_<wbr>WEAPONS ||
 
|-
 
|-
 
|[[050F]] ||GET_<wbr>MAX_<wbr>WANTED_<wbr>LEVEL ||
 
|[[050F]] ||GET_<wbr>MAX_<wbr>WANTED_<wbr>LEVEL ||
Line 32: Line 54:
 
|}
 
|}
  
== Vice City ==
+
=== 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.
+
This is a list of over 170 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.
 
{|class="wikitable center-col-3 mw-collapsible mw-collapsed sortable"
 
{|class="wikitable center-col-3 mw-collapsible mw-collapsed sortable"
 
!Opcode ||Command name ||Non-plugin<br>alternative ||Notes
 
!Opcode ||Command name ||Non-plugin<br>alternative ||Notes
Line 40: Line 62:
 
|-
 
|-
 
|[[00AC]] ||IS_<wbr>CAR_<wbr>STILL_<wbr>ALIVE ||&#x2713; ||Exactly the same as [[0119|8119]]
 
|[[00AC]] ||IS_<wbr>CAR_<wbr>STILL_<wbr>ALIVE ||&#x2713; ||Exactly the same as [[0119|8119]]
 +
|-
 +
|00BD ||PRINT_<wbr>SOON || ||
 
|-
 
|-
 
|[[00C5]] ||RETURN_<wbr>TRUE ||&#x2713; ||Same as [[0485]] for most versions
 
|[[00C5]] ||RETURN_<wbr>TRUE ||&#x2713; ||Same as [[0485]] for most versions
Line 55: Line 79:
 
|[[0135]] ||CHANGE_<wbr>CAR_<wbr>LOCK ||&#x2713; ||Exactly the same as [[020A]]
 
|[[0135]] ||CHANGE_<wbr>CAR_<wbr>LOCK ||&#x2713; ||Exactly the same as [[020A]]
 
|-
 
|-
|[[0136]] ||SHAKE_<wbr>CAM_<wbr>WITH_<wbr>POINT || ||
+
|[[0136]] ||SHAKE_<wbr>CAM_<wbr>WITH_<wbr>POINT ||&#x2713; ||CLEO [[0136#For Vice City|code snippet]] alternative
 
|-
 
|-
 
|013B ||IS_<wbr>CAR_<wbr>DEAD_<wbr>IN_<wbr>AREA_<wbr>2D || ||
 
|013B ||IS_<wbr>CAR_<wbr>DEAD_<wbr>IN_<wbr>AREA_<wbr>2D || ||
Line 68: Line 92:
 
|-
 
|-
 
|[[0163]] ||ADD_<wbr>BLIP_<wbr>FOR_<wbr>OBJECT_<wbr>OLD || ||
 
|[[0163]] ||ADD_<wbr>BLIP_<wbr>FOR_<wbr>OBJECT_<wbr>OLD || ||
 +
|-
 +
|016F ||DRAW_<wbr>SHADOW || ||
 
|-
 
|-
 
|[[0178]] ||IS_<wbr>PLAYER_<wbr>TOUCHING_<wbr>OBJECT || ||
 
|[[0178]] ||IS_<wbr>PLAYER_<wbr>TOUCHING_<wbr>OBJECT || ||
Line 75: Line 101:
 
|[[017B]] ||SET_<wbr>CHAR_<wbr>AMMO ||&#x2713; ||CLEO [[017B#For Vice City|code snippet]] alternative
 
|[[017B]] ||SET_<wbr>CHAR_<wbr>AMMO ||&#x2713; ||CLEO [[017B#For Vice City|code snippet]] alternative
 
|-
 
|-
|[[01C6]] ||DONT_<wbr>REMOVE_<wbr>CAR || ||
+
|[[01C6]] ||DONT_<wbr>REMOVE_<wbr>CAR ||&#x2713; ||CLEO [[01C6#For Vice City|code snippet]] alternative
 +
|-
 +
|01E6 ||PRINT_<wbr>WITH_<wbr>NUMBER_<wbr>SOON || ||
 +
|-
 +
|[[01EE]] ||ACTIVATE_<wbr>CRANE || ||
 +
|-
 +
|[[01EF]] ||DEACTIVATE_<wbr>CRANE || ||
 
|-
 
|-
|0218 ||PRINT_<wbr>WITH_<wbr>NUMBER_<wbr>BIG_<wbr>Q || ||
+
|[[0218]] ||PRINT_<wbr>WITH_<wbr>NUMBER_<wbr>BIG_<wbr>Q || ||
 
|-
 
|-
 
|[[021D]] ||SET_<wbr>FREE_<wbr>BOMBS ||&#x2713; ||CLEO [[021D#For Vice City|code snippet]] alternative
 
|[[021D]] ||SET_<wbr>FREE_<wbr>BOMBS ||&#x2713; ||CLEO [[021D#For Vice City|code snippet]] alternative
Line 90: Line 122:
 
|-
 
|-
 
|[[023B]] ||IS_<wbr>CHAR_<wbr>TOUCHING_<wbr>OBJECT_<wbr>ON_<wbr>FOOT || ||
 
|[[023B]] ||IS_<wbr>CHAR_<wbr>TOUCHING_<wbr>OBJECT_<wbr>ON_<wbr>FOOT || ||
 +
|-
 +
|023E ||FLASH_<wbr>CAR || ||
 +
|-
 +
|023F ||FLASH_<wbr>CHAR || ||
 +
|-
 +
|0240 ||FLASH_<wbr>OBJECT || ||
 
|-
 
|-
 
|[[0242]] ||ARM_<wbr>CAR_<wbr>WITH_<wbr>BOMB ||&#x2713; ||CLEO [[0242#For Vice City|code snippet]] alternative
 
|[[0242]] ||ARM_<wbr>CAR_<wbr>WITH_<wbr>BOMB ||&#x2713; ||CLEO [[0242#For Vice City|code snippet]] alternative
Line 98: Line 136:
 
|-
 
|-
 
|[[024D]] ||HAS_<wbr>PHONE_<wbr>DISPLAYED_<wbr>MESSAGE || ||
 
|[[024D]] ||HAS_<wbr>PHONE_<wbr>DISPLAYED_<wbr>MESSAGE || ||
 +
|-
 +
|0250 ||DRAW_<wbr>LIGHT || ||
 +
|-
 +
|[[0251]] ||STORE_<wbr>WEATHER || ||
 +
|-
 +
|[[0252]] ||RESTORE_<wbr>WEATHER || ||
 
|-
 
|-
 
|[[0255]] ||RESTART_<wbr>CRITICAL_<wbr>MISSION || ||
 
|[[0255]] ||RESTART_<wbr>CRITICAL_<wbr>MISSION || ||
Line 104: Line 148:
 
|-
 
|-
 
|[[0299]] ||ACTIVATE_<wbr>GARAGE ||&#x2713; ||CLEO [[0299#For Vice City|code snippet]] alternative
 
|[[0299]] ||ACTIVATE_<wbr>GARAGE ||&#x2713; ||CLEO [[0299#For Vice City|code snippet]] alternative
 +
|-
 +
|029A ||SWITCH_<wbr>TAXI_<wbr>TIMER || ||
 
|-
 
|-
 
|[[029C]] ||IS_<wbr>BOAT || ||
 
|[[029C]] ||IS_<wbr>BOAT || ||
 
|-
 
|-
 
|[[02A0]] ||IS_<wbr>CHAR_<wbr>STOPPED || ||
 
|[[02A0]] ||IS_<wbr>CHAR_<wbr>STOPPED || ||
 +
|-
 +
|02A1 ||MESSAGE_<wbr>WAIT || ||
 +
|-
 +
|02A2 ||ADD_<wbr>PARTICLE_<wbr>EFFECT || ||
 
|-
 
|-
 
|[[02A4]] ||ADD_<wbr>SPRITE_<wbr>BLIP_<wbr>FOR_<wbr>CAR || ||
 
|[[02A4]] ||ADD_<wbr>SPRITE_<wbr>BLIP_<wbr>FOR_<wbr>CAR || ||
Line 122: Line 172:
 
|-
 
|-
 
|[[02BE]] ||SET_<wbr>ARMY_<wbr>REQUIRED || ||
 
|[[02BE]] ||SET_<wbr>ARMY_<wbr>REQUIRED || ||
 +
|-
 +
|[[02C3]] ||START_<wbr>PACMAN_<wbr>RACE || ||Model and coordinates can be modified through a file named <code>pacman.dat</code>
 +
|-
 +
|[[02C5]] ||GET_<wbr>NUMBER_<wbr>OF_<wbr>POWER_<wbr>PILLS_<wbr>EATEN || ||
 +
|-
 +
|[[02C6]] ||CLEAR_<wbr>PACMAN || ||
 +
|-
 +
|[[02C7]] ||START_<wbr>PACMAN_<wbr>SCRAMBLE || ||Model can be modified through a file named <code>pacman.dat</code>
 +
|-
 +
|[[02C8]] ||GET_<wbr>NUMBER_<wbr>OF_<wbr>POWER_<wbr>PILLS_<wbr>CARRIED || ||
 +
|-
 +
|[[02C9]] ||CLEAR_<wbr>NUMBER_<wbr>OF_<wbr>POWER_<wbr>PILLS_<wbr>CARRIED || ||
 +
|-
 +
|02CD ||GOSUB_<wbr>FILE || ||
 +
|-
 +
|02D2 ||SET_<wbr>COMEDY_<wbr>CONTROLS || ||
 
|-
 
|-
 
|[[02D6]] ||IS_<wbr>CHAR_<wbr>SHOOTING_<wbr>IN_<wbr>AREA || ||
 
|[[02D6]] ||IS_<wbr>CHAR_<wbr>SHOOTING_<wbr>IN_<wbr>AREA || ||
 +
|-
 +
|[[02D9]] ||CLEAR_<wbr>NUMBER_<wbr>OF_<wbr>POWER_<wbr>PILLS_<wbr>EATEN || ||
 +
|-
 +
|[[02DA]] ||ADD_<wbr>POWER_<wbr>PILL || ||
 
|-
 
|-
 
|[[02EE]] ||IS_<wbr>PROJECTILE_<wbr>IN_<wbr>AREA || ||
 
|[[02EE]] ||IS_<wbr>PROJECTILE_<wbr>IN_<wbr>AREA || ||
Line 132: Line 202:
 
|-
 
|-
 
|[[02F1]] ||DROP_<wbr>NAUTICAL_<wbr>MINE ||&#x2713; ||Similar to [[0213]] with model <code>barrel2</code> type 11
 
|[[02F1]] ||DROP_<wbr>NAUTICAL_<wbr>MINE ||&#x2713; ||Similar to [[0213]] with model <code>barrel2</code> type 11
 +
|-
 +
|[[02FB]] ||ACTIVATE_<wbr>CRUSHER_<wbr>CRANE || ||
 
|-
 
|-
 
|02FC ||PRINT_<wbr>WITH_<wbr>2_<wbr>NUMBERS || ||
 
|02FC ||PRINT_<wbr>WITH_<wbr>2_<wbr>NUMBERS || ||
 +
|-
 +
|02FE ||PRINT_<wbr>WITH_<wbr>2_<wbr>NUMBERS_<wbr>SOON || ||
 
|-
 
|-
 
|0300 ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>NOW || ||
 
|0300 ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>NOW || ||
 +
|-
 +
|0301 ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>SOON || ||
 
|-
 
|-
 
|0303 ||PRINT_<wbr>WITH_<wbr>4_<wbr>NUMBERS_<wbr>NOW || ||
 
|0303 ||PRINT_<wbr>WITH_<wbr>4_<wbr>NUMBERS_<wbr>NOW || ||
 +
|-
 +
|0304 ||PRINT_<wbr>WITH_<wbr>4_<wbr>NUMBERS_<wbr>SOON || ||
 
|-
 
|-
 
|0305 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS || ||
 
|0305 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS || ||
 
|-
 
|-
 
|0306 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS_<wbr>NOW || ||
 
|0306 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS_<wbr>NOW || ||
 +
|-
 +
|0307 ||PRINT_<wbr>WITH_<wbr>5_<wbr>NUMBERS_<wbr>SOON || ||
 
|-
 
|-
 
|0309 ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>NOW || ||
 
|0309 ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>NOW || ||
 
|-
 
|-
|031B ||IS_<wbr>FIRST_<wbr>CAR_<wbr>COLOUR || ||
+
|030A ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>SOON || ||
 
|-
 
|-
|031C ||IS_<wbr>SECOND_<wbr>CAR_<wbr>COLOUR || ||
+
|[[031B]] ||IS_<wbr>FIRST_<wbr>CAR_<wbr>COLOUR ||&#x2713; ||CLEO [[031B#For Vice City|code snippet]] alternative
 +
|-
 +
|[[031C]] ||IS_<wbr>SECOND_<wbr>CAR_<wbr>COLOUR ||&#x2713; ||CLEO [[031C#For Vice City|code snippet]] alternative
 
|-
 
|-
 
|[[032D]] ||SET_<wbr>CAR_<wbr>BLOCK_<wbr>CAR || ||Has the same bug as GTA III
 
|[[032D]] ||SET_<wbr>CAR_<wbr>BLOCK_<wbr>CAR || ||Has the same bug as GTA III
 +
|-
 +
|0338 ||SET_<wbr>CAR_<wbr>VISIBLE || ||
 +
|-
 +
|[[0344]] ||SET_<wbr>TEXT_<wbr>CENTRE_<wbr>SIZE || ||
 
|-
 
|-
 
|[[0346]] ||SET_<wbr>TEXT_<wbr>BACKGROUND_<wbr>COLOUR || ||
 
|[[0346]] ||SET_<wbr>TEXT_<wbr>BACKGROUND_<wbr>COLOUR || ||
 +
|-
 +
|[[0349]] ||SET_<wbr>TEXT_<wbr>FONT || ||
 
|-
 
|-
 
|0351 ||IS_<wbr>NASTY_<wbr>GAME || ||
 
|0351 ||IS_<wbr>NASTY_<wbr>GAME || ||
Line 160: Line 248:
 
|-
 
|-
 
|[[0367]] ||START_<wbr>KILL_<wbr>FRENZY_<wbr>HEADSHOT ||&#x2713; ||CLEO [[0367#For Vice City|code snippet]] alternative
 
|[[0367]] ||START_<wbr>KILL_<wbr>FRENZY_<wbr>HEADSHOT ||&#x2713; ||CLEO [[0367#For Vice City|code snippet]] alternative
 +
|-
 +
|[[0368]] ||ACTIVATE_<wbr>MILITARY_<wbr>CRANE || ||
 
|-
 
|-
 
|[[036E]] ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>BIG || ||
 
|[[036E]] ||PRINT_<wbr>WITH_<wbr>3_<wbr>NUMBERS_<wbr>BIG || ||
Line 168: Line 258:
 
|-
 
|-
 
|[[0371]] ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>BIG || ||
 
|[[0371]] ||PRINT_<wbr>WITH_<wbr>6_<wbr>NUMBERS_<wbr>BIG || ||
 +
|-
 +
|0375 ||PRINT_<wbr>STRING_<wbr>IN_<wbr>STRING || ||
 
|-
 
|-
 
|[[0378]] ||SET_<wbr>2_<wbr>REPEATED_<wbr>PHONE_<wbr>MESSAGES || ||
 
|[[0378]] ||SET_<wbr>2_<wbr>REPEATED_<wbr>PHONE_<wbr>MESSAGES || ||
Line 181: Line 273:
 
|[[037D]] ||SET_<wbr>4_<wbr>PHONE_<wbr>MESSAGES || ||
 
|[[037D]] ||SET_<wbr>4_<wbr>PHONE_<wbr>MESSAGES || ||
 
|-
 
|-
|037F ||GIVE_<wbr>PLAYER_<wbr>DETONATOR || ||
+
|[[037F]] ||GIVE_<wbr>PLAYER_<wbr>DETONATOR || ||
 +
|-
 +
|0385 ||PRINT_<wbr>STRING_<wbr>IN_<wbr>STRING_<wbr>SOON || ||
 
|-
 
|-
 
|0386 ||SET_<wbr>5_<wbr>REPEATED_<wbr>PHONE_<wbr>MESSAGES || ||
 
|0386 ||SET_<wbr>5_<wbr>REPEATED_<wbr>PHONE_<wbr>MESSAGES || ||
Line 191: Line 285:
 
|0389 ||SET_<wbr>6_<wbr>PHONE_<wbr>MESSAGES || ||
 
|0389 ||SET_<wbr>6_<wbr>PHONE_<wbr>MESSAGES || ||
 
|-
 
|-
|0393 ||SET_<wbr>CHAR_<wbr>ANIM_<wbr>SPEED || ||
+
|[[0393]] ||SET_<wbr>CHAR_<wbr>ANIM_<wbr>SPEED ||&#x2713; ||CLEO [[0393#For Vice City|code snippet]] alternative
 
|-
 
|-
 
|[[03A0]] ||IS_<wbr>CRANE_<wbr>LIFTING_<wbr>CAR || ||
 
|[[03A0]] ||IS_<wbr>CRANE_<wbr>LIFTING_<wbr>CAR || ||
Line 203: Line 297:
 
|[[03C9]] ||IS_<wbr>CAR_<wbr>VISIBLY_<wbr>DAMAGED ||&#x2713; ||CLEO [[03C9#For Vice City|code snippet]] alternative
 
|[[03C9]] ||IS_<wbr>CAR_<wbr>VISIBLY_<wbr>DAMAGED ||&#x2713; ||CLEO [[03C9#For Vice City|code snippet]] alternative
 
|-
 
|-
|03DB ||ADD_<wbr>BLIP_<wbr>FOR_<wbr>PICKUP_<wbr>OLD || ||
+
|[[03DB]] ||ADD_<wbr>BLIP_<wbr>FOR_<wbr>PICKUP_<wbr>OLD || ||
 
|-
 
|-
|03DD ||ADD_<wbr>SPRITE_<wbr>BLIP_<wbr>FOR_<wbr>PICKUP || ||
+
|[[03DD]] ||ADD_<wbr>SPRITE_<wbr>BLIP_<wbr>FOR_<wbr>PICKUP || ||
 
|-
 
|-
 
|03E9 ||IS_<wbr>CHAR_<wbr>IN_<wbr>CONTROL || ||
 
|03E9 ||IS_<wbr>CHAR_<wbr>IN_<wbr>CONTROL || ||
 
|-
 
|-
 
|[[03EC]] ||HAS_<wbr>MILITARY_<wbr>CRANE_<wbr>COLLECTED_<wbr>ALL_<wbr>CARS || ||
 
|[[03EC]] ||HAS_<wbr>MILITARY_<wbr>CRANE_<wbr>COLLECTED_<wbr>ALL_<wbr>CARS || ||
 +
|-
 +
|03FB ||SET_<wbr>CAR_<wbr>STAYS_<wbr>IN_<wbr>CURRENT_<wbr>LEVEL || ||
 +
|-
 +
|03FC ||SET_<wbr>CHAR_<wbr>STAYS_<wbr>IN_<wbr>CURRENT_<wbr>LEVEL || ||
 
|-
 
|-
 
|0410 ||SET_<wbr>GANG_<wbr>PED_<wbr>MODEL_<wbr>PREFERENCE || ||
 
|0410 ||SET_<wbr>GANG_<wbr>PED_<wbr>MODEL_<wbr>PREFERENCE || ||
 
|-
 
|-
 
|[[0413]] ||SET_<wbr>GET_<wbr>OUT_<wbr>OF_<wbr>JAIL_<wbr>FREE ||&#x2713; ||CLEO [[0413#For Vice City|code snippet]] alternative
 
|[[0413]] ||SET_<wbr>GET_<wbr>OUT_<wbr>OF_<wbr>JAIL_<wbr>FREE ||&#x2713; ||CLEO [[0413#For Vice City|code snippet]] alternative
 +
|-
 +
|[[0415]] ||IS_<wbr>CAR_<wbr>DOOR_<wbr>CLOSED ||&#x2713; ||CLEO [[0415#For Vice City|code snippet]] alternative
 +
|-
 +
|041A ||GET_<wbr>AMMO_<wbr>IN_<wbr>CHAR_<wbr>WEAPON || ||
 
|-
 
|-
 
|[[041B]] ||REGISTER_<wbr>KILL_<wbr>FRENZY_<wbr>PASSED || ||
 
|[[041B]] ||REGISTER_<wbr>KILL_<wbr>FRENZY_<wbr>PASSED || ||
Line 230: Line 332:
 
|-
 
|-
 
|0432 ||GET_<wbr>CHAR_<wbr>IN_<wbr>CAR_<wbr>PASSENGER_<wbr>SEAT || ||
 
|0432 ||GET_<wbr>CHAR_<wbr>IN_<wbr>CAR_<wbr>PASSENGER_<wbr>SEAT || ||
 +
|-
 +
|0438 ||SET_<wbr>CHAR_<wbr>IGNORE_<wbr>LEVEL_<wbr>TRANSITIONS || ||
 
|-
 
|-
 
|[[0444]] ||SET_<wbr>SCRIPT_<wbr>FIRE_<wbr>AUDIO || ||
 
|[[0444]] ||SET_<wbr>SCRIPT_<wbr>FIRE_<wbr>AUDIO || ||
 
|-
 
|-
 
|[[0447]] ||IS_<wbr>PLAYER_<wbr>LIFTING_<wbr>A_<wbr>PHONE || ||
 
|[[0447]] ||IS_<wbr>PLAYER_<wbr>LIFTING_<wbr>A_<wbr>PHONE || ||
 +
|-
 +
|044E ||SET_<wbr>CAR_<wbr>IGNORE_<wbr>LEVEL_<wbr>TRANSITIONS || ||
 +
|-
 +
|044F ||MAKE_<wbr>CRAIGS_<wbr>CAR_<wbr>A_<wbr>BIT_<wbr>STRONGER || ||
 +
|-
 +
|0452 ||ENABLE_<wbr>PLAYER_<wbr>CONTROL_<wbr>CAMERA || ||
 +
|-
 +
|[[047B]] ||LOCATE_<wbr>SNIPER_<wbr>BULLET_<wbr>2D || ||Has the same bug as GTA III
 +
|-
 +
|[[047C]] ||LOCATE_<wbr>SNIPER_<wbr>BULLET_<wbr>3D || ||Has the same bug as GTA III
 
|-
 
|-
 
|[[047D]] ||GET_<wbr>NUMBER_<wbr>OF_<wbr>SEATS_<wbr>IN_<wbr>MODEL || ||
 
|[[047D]] ||GET_<wbr>NUMBER_<wbr>OF_<wbr>SEATS_<wbr>IN_<wbr>MODEL || ||
 +
|-
 +
|[[0491]] ||HAS_<wbr>CHAR_<wbr>GOT_<wbr>WEAPON ||&#x2713; ||CLEO [[0491#For Vice City|code snippet]] alternative
 +
|-
 +
|[[04A0]] ||GET_<wbr>OBJECT_<wbr>DISTANCE_<wbr>ALONG_<wbr>PATH ||&#x2713; ||CLEO [[049F#Getting the distance|code snippet]] alternative
 
|-
 
|-
 
|[[04A7]] ||IS_<wbr>CHAR_<wbr>IN_<wbr>ANY_<wbr>BOAT || ||
 
|[[04A7]] ||IS_<wbr>CHAR_<wbr>IN_<wbr>ANY_<wbr>BOAT || ||
Line 248: Line 366:
 
|-
 
|-
 
|04CD ||ADD_<wbr>SHORT_<wbr>RANGE_<wbr>BLIP_<wbr>FOR_<wbr>COORD || ||
 
|04CD ||ADD_<wbr>SHORT_<wbr>RANGE_<wbr>BLIP_<wbr>FOR_<wbr>COORD || ||
 +
|-
 +
|04D4 ||GET_<wbr>NTH_<wbr>CLOSEST_<wbr>CHAR_<wbr>NODE || ||
 +
|-
 +
|04DC ||HAS_<wbr>PHOTOGRAPH_<wbr>BEEN_<wbr>TAKEN || ||
 +
|-
 +
|0505 ||GET_<wbr>NEAREST_<wbr>TYRE_<wbr>TO_<wbr>POINT || ||
 
|-
 
|-
 
|[[050F]] ||GET_<wbr>MAX_<wbr>WANTED_<wbr>LEVEL ||&#x2713; ||CLEO [[050F#For GTA III and Vice City|code snippet]] alternative
 
|[[050F]] ||GET_<wbr>MAX_<wbr>WANTED_<wbr>LEVEL ||&#x2713; ||CLEO [[050F#For GTA III and Vice City|code snippet]] alternative
Line 254: Line 378:
 
|-
 
|-
 
|[[0513]] ||PRINT_<wbr>HELP_<wbr>FOREVER_<wbr>WITH_<wbr>NUMBER || ||
 
|[[0513]] ||PRINT_<wbr>HELP_<wbr>FOREVER_<wbr>WITH_<wbr>NUMBER || ||
 +
|-
 +
|051F ||DISPLAY_<wbr>TEXT_<wbr>WITH_<wbr>3_<wbr>NUMBERS || ||
 +
|-
 +
|052A ||ADD_<wbr>MONEY_<wbr>SPENT_<wbr>ON_<wbr>AUTO_<wbr>PAINTING || ||
 
|-
 
|-
 
|052D ||GET_<wbr>PLAYER_<wbr>DRUNKENNESS || ||
 
|052D ||GET_<wbr>PLAYER_<wbr>DRUNKENNESS || ||
Line 268: Line 396:
 
|-
 
|-
 
|0547 ||IS_<wbr>CHAR_<wbr>TOUCHING_<wbr>VEHICLE || ||
 
|0547 ||IS_<wbr>CHAR_<wbr>TOUCHING_<wbr>VEHICLE || ||
 +
|-
 +
|0555 ||REMOVE_<wbr>WEAPON_<wbr>FROM_<wbr>CHAR || ||
 +
|-
 +
|056E ||DOES_<wbr>VEHICLE_<wbr>EXIST || ||
 
|-
 
|-
 
|[[056F]] ||ADD_<wbr>SHORT_<wbr>RANGE_<wbr>BLIP_<wbr>FOR_<wbr>CONTACT_<wbr>POINT || ||
 
|[[056F]] ||ADD_<wbr>SHORT_<wbr>RANGE_<wbr>BLIP_<wbr>FOR_<wbr>CONTACT_<wbr>POINT || ||
 +
|-
 +
|0577 ||SET_<wbr>FADE_<wbr>AND_<wbr>JUMPCUT_<wbr>AFTER_<wbr>RC_<wbr>EXPLOSION || ||
 +
|-
 +
|[[059D]] ||SHUFFLE_<wbr>CARD_<wbr>DECKS || ||
 +
|-
 +
|[[059E]] ||FETCH_<wbr>NEXT_<wbr>CARD || ||
 
|}
 
|}
  
 
[[Category:Mission Scripting]]
 
[[Category:Mission Scripting]]

Latest revision as of 13:55, 15 August 2021

The Opcodes Restoration Project is a plugin for CLEO v2.0.0.5 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

[*] As of v3.7 Sanny Builder ships these opcodes as the Restoration extension in the Vice City mode.

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

Run premake5.bat to generate project files for Microsoft Visual Studio 2015. If you use a different version of Visual Studio, open the file with a text editor and change vs2015 to your preferred version. A folder named build is created with the generated project files. Open build\opcodes-restoration-project.sln, change the active solution configuration to Release, then build III.Opcodes or VC.Opcodes. The plugin will be located in bin\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_PLAYER_STILL_ALIVE
01E6 PRINT_WITH_NUMBER_SOON
02BD SET_FBI_REQUIRED
02BE SET_ARMY_REQUIRED
0301 PRINT_WITH_3_NUMBERS_SOON
0304 PRINT_WITH_4_NUMBERS_SOON
0307 PRINT_WITH_5_NUMBERS_SOON
030A PRINT_WITH_6_NUMBERS_SOON
0385 PRINT_STRING_IN_STRING_SOON
048F REMOVE_ALL_CHAR_WEAPONS
050F GET_MAX_WANTED_LEVEL
0511 PRINT_HELP_WITH_NUMBER
0546 IS_PLAYER_TOUCHING_VEHICLE
0547 IS_CHAR_TOUCHING_VEHICLE

Vice City

This is a list of over 170 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_CHAR_STILL_ALIVE Exactly the same as 8118
00AC IS_CAR_STILL_ALIVE Exactly the same as 8119
00BD PRINT_SOON
00C5 RETURN_TRUE Same as 0485 for most versions
00C6 RETURN_FALSE Same as 059A for most versions
00E2 GET_PAD_STATE CLEO code snippet alternative
0113 ADD_AMMO_TO_PLAYER Similar to 0114 with player character
0116 IS_PLAYER_STILL_ALIVE
0130 HAS_PLAYER_BEEN_ARRESTED CLEO code snippet alternative
0135 CHANGE_CAR_LOCK Exactly the same as 020A
0136 SHAKE_CAM_WITH_POINT CLEO code snippet alternative
013B IS_CAR_DEAD_IN_AREA_2D
013C IS_CAR_DEAD_IN_AREA_3D
0155 SET_CAR_DENSITY
0156 SET_PED_DENSITY
015E IS_CAR_IN_AIR CLEO code snippet alternative
0163 ADD_BLIP_FOR_OBJECT_OLD
016F DRAW_SHADOW
0178 IS_PLAYER_TOUCHING_OBJECT
0179 IS_CHAR_TOUCHING_OBJECT
017B SET_CHAR_AMMO CLEO code snippet alternative
01C6 DONT_REMOVE_CAR CLEO code snippet alternative
01E6 PRINT_WITH_NUMBER_SOON
01EE ACTIVATE_CRANE
01EF DEACTIVATE_CRANE
0218 PRINT_WITH_NUMBER_BIG_Q
021D SET_FREE_BOMBS CLEO code snippet alternative
021F SET_ALL_TAXI_LIGHTS CLEO code snippet alternative
0220 IS_CAR_ARMED_WITH_ANY_BOMB CLEO code snippet alternative
0228 IS_CAR_ARMED_WITH_BOMB CLEO code snippet alternative
023A IS_PLAYER_TOUCHING_OBJECT_ON_FOOT
023B IS_CHAR_TOUCHING_OBJECT_ON_FOOT
023E FLASH_CAR
023F FLASH_CHAR
0240 FLASH_OBJECT
0242 ARM_CAR_WITH_BOMB CLEO code snippet alternative
024B SET_REPEATED_PHONE_MESSAGE
024C SET_PHONE_MESSAGE
024D HAS_PHONE_DISPLAYED_MESSAGE
0250 DRAW_LIGHT
0251 STORE_WEATHER
0252 RESTORE_WEATHER
0255 RESTART_CRITICAL_MISSION
0295 IS_TAXI
0299 ACTIVATE_GARAGE CLEO code snippet alternative
029A SWITCH_TAXI_TIMER
029C IS_BOAT
02A0 IS_CHAR_STOPPED
02A1 MESSAGE_WAIT
02A2 ADD_PARTICLE_EFFECT
02A4 ADD_SPRITE_BLIP_FOR_CAR
02A5 ADD_SPRITE_BLIP_FOR_CHAR
02A6 ADD_SPRITE_BLIP_FOR_OBJECT
02B9 DEACTIVATE_GARAGE CLEO code snippet alternative
02BC SET_SWAT_REQUIRED
02BD SET_FBI_REQUIRED
02BE SET_ARMY_REQUIRED
02C3 START_PACMAN_RACE Model and coordinates can be modified through a file named pacman.dat
02C5 GET_NUMBER_OF_POWER_PILLS_EATEN
02C6 CLEAR_PACMAN
02C7 START_PACMAN_SCRAMBLE Model can be modified through a file named pacman.dat
02C8 GET_NUMBER_OF_POWER_PILLS_CARRIED
02C9 CLEAR_NUMBER_OF_POWER_PILLS_CARRIED
02CD GOSUB_FILE
02D2 SET_COMEDY_CONTROLS
02D6 IS_CHAR_SHOOTING_IN_AREA
02D9 CLEAR_NUMBER_OF_POWER_PILLS_EATEN
02DA ADD_POWER_PILL
02EE IS_PROJECTILE_IN_AREA
02EF DESTROY_PROJECTILES_IN_AREA
02F0 DROP_MINE Similar to 0213 with model barrel1 type 9
02F1 DROP_NAUTICAL_MINE Similar to 0213 with model barrel2 type 11
02FB ACTIVATE_CRUSHER_CRANE
02FC PRINT_WITH_2_NUMBERS
02FE PRINT_WITH_2_NUMBERS_SOON
0300 PRINT_WITH_3_NUMBERS_NOW
0301 PRINT_WITH_3_NUMBERS_SOON
0303 PRINT_WITH_4_NUMBERS_NOW
0304 PRINT_WITH_4_NUMBERS_SOON
0305 PRINT_WITH_5_NUMBERS
0306 PRINT_WITH_5_NUMBERS_NOW
0307 PRINT_WITH_5_NUMBERS_SOON
0309 PRINT_WITH_6_NUMBERS_NOW
030A PRINT_WITH_6_NUMBERS_SOON
031B IS_FIRST_CAR_COLOUR CLEO code snippet alternative
031C IS_SECOND_CAR_COLOUR CLEO code snippet alternative
032D SET_CAR_BLOCK_CAR Has the same bug as GTA III
0338 SET_CAR_VISIBLE
0344 SET_TEXT_CENTRE_SIZE
0346 SET_TEXT_BACKGROUND_COLOUR
0349 SET_TEXT_FONT
0351 IS_NASTY_GAME
0356 IS_EXPLOSION_IN_AREA
0357 IS_EXPLOSION_IN_ZONE
0367 START_KILL_FRENZY_HEADSHOT CLEO code snippet alternative
0368 ACTIVATE_MILITARY_CRANE
036E PRINT_WITH_3_NUMBERS_BIG
036F PRINT_WITH_4_NUMBERS_BIG
0370 PRINT_WITH_5_NUMBERS_BIG
0371 PRINT_WITH_6_NUMBERS_BIG
0375 PRINT_STRING_IN_STRING
0378 SET_2_REPEATED_PHONE_MESSAGES
0379 SET_2_PHONE_MESSAGES
037A SET_3_REPEATED_PHONE_MESSAGES
037B SET_3_PHONE_MESSAGES
037C SET_4_REPEATED_PHONE_MESSAGES
037D SET_4_PHONE_MESSAGES
037F GIVE_PLAYER_DETONATOR
0385 PRINT_STRING_IN_STRING_SOON
0386 SET_5_REPEATED_PHONE_MESSAGES
0387 SET_5_PHONE_MESSAGES
0388 SET_6_REPEATED_PHONE_MESSAGES
0389 SET_6_PHONE_MESSAGES
0393 SET_CHAR_ANIM_SPEED CLEO code snippet alternative
03A0 IS_CRANE_LIFTING_CAR
03A5 CHANGE_GARAGE_TYPE_WITH_CAR_MODEL Opcode is implemented but garage type 7 is buggy in Vice City
03C2 IS_PHONE_DISPLAYING_MESSAGE
03C6 IS_COLLISION_IN_MEMORY Checks the current level number instead, essentially the same behavior
03C9 IS_CAR_VISIBLY_DAMAGED CLEO code snippet alternative
03DB ADD_BLIP_FOR_PICKUP_OLD
03DD ADD_SPRITE_BLIP_FOR_PICKUP
03E9 IS_CHAR_IN_CONTROL
03EC HAS_MILITARY_CRANE_COLLECTED_ALL_CARS
03FB SET_CAR_STAYS_IN_CURRENT_LEVEL
03FC SET_CHAR_STAYS_IN_CURRENT_LEVEL
0410 SET_GANG_PED_MODEL_PREFERENCE
0413 SET_GET_OUT_OF_JAIL_FREE CLEO code snippet alternative
0415 IS_CAR_DOOR_CLOSED CLEO code snippet alternative
041A GET_AMMO_IN_CHAR_WEAPON
041B REGISTER_KILL_FRENZY_PASSED
041C SET_CHAR_SAY
041F OVERRIDE_HOSPITAL_LEVEL
0420 OVERRIDE_POLICE_STATION_LEVEL
0421 FORCE_RAIN
0422 DOES_GARAGE_CONTAIN_CAR Has the same bug as GTA III
042A IS_THREAT_FOR_PED_TYPE
0432 GET_CHAR_IN_CAR_PASSENGER_SEAT
0438 SET_CHAR_IGNORE_LEVEL_TRANSITIONS
0444 SET_SCRIPT_FIRE_AUDIO
0447 IS_PLAYER_LIFTING_A_PHONE
044E SET_CAR_IGNORE_LEVEL_TRANSITIONS
044F MAKE_CRAIGS_CAR_A_BIT_STRONGER
0452 ENABLE_PLAYER_CONTROL_CAMERA
047B LOCATE_SNIPER_BULLET_2D Has the same bug as GTA III
047C LOCATE_SNIPER_BULLET_3D Has the same bug as GTA III
047D GET_NUMBER_OF_SEATS_IN_MODEL
0491 HAS_CHAR_GOT_WEAPON CLEO code snippet alternative
04A0 GET_OBJECT_DISTANCE_ALONG_PATH CLEO code snippet alternative
04A7 IS_CHAR_IN_ANY_BOAT
04A9 IS_CHAR_IN_ANY_HELI
04AB IS_CHAR_IN_ANY_PLANE
04C8 IS_CHAR_IN_FLYING_VEHICLE
04CC ADD_SHORT_RANGE_BLIP_FOR_COORD_OLD
04CD ADD_SHORT_RANGE_BLIP_FOR_COORD
04D4 GET_NTH_CLOSEST_CHAR_NODE
04DC HAS_PHOTOGRAPH_BEEN_TAKEN
0505 GET_NEAREST_TYRE_TO_POINT
050F GET_MAX_WANTED_LEVEL CLEO code snippet alternative
0511 PRINT_HELP_WITH_NUMBER
0513 PRINT_HELP_FOREVER_WITH_NUMBER
051F DISPLAY_TEXT_WITH_3_NUMBERS
052A ADD_MONEY_SPENT_ON_AUTO_PAINTING
052D GET_PLAYER_DRUNKENNESS
0530 ADD_LOAN_SHARK_VISITS
0532 ADD_MOVIE_STUNTS Displays as a value "out of 0" in the stats menu
0535 ADD_GARBAGE_PICKUPS
0537 SET_TOP_SHOOTING_RANGE_SCORE
0538 ADD_SHOOTING_RANGE_RANK
0547 IS_CHAR_TOUCHING_VEHICLE
0555 REMOVE_WEAPON_FROM_CHAR
056E DOES_VEHICLE_EXIST
056F ADD_SHORT_RANGE_BLIP_FOR_CONTACT_POINT
0577 SET_FADE_AND_JUMPCUT_AFTER_RC_EXPLOSION
059D SHUFFLE_CARD_DECKS
059E FETCH_NEXT_CARD