|
 |
|
|
|
|
|
Attention:
|
The Mod Showroom is only for posting previews/downloads of completed or near finished mods. All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
|
|
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials
|
SA ScrDebug Restoration of Rockstar Debugging opcode
 |
|
 |
| |
Deji  |
|
Coding like a Rockstar!

Group: Members
Joined: Dec 24, 2007


|
SA ScrDebug(Aside from the missing 's', I actually managed to fit most of the topic description in this time..) Finally, Rockstar-style SCM Debugging for San Andreas. | QUOTE | During the development of GTA: San Andreas, Rockstar North used many features built-in to their scripting engine to aid debugging of scripts. Hacks, hidden modes, teleportation cheats, mission skippers, they had used them all. Obviously these features had to be locked away before San Andreas was released. This mods purpose is to re-implement them.
Little is known of Rockstars original debugging opcodes aside from what can be found in the GTA IV natives list and their usage within the main.scm and scripts in the script.img archive. However, I believe ScrDebug reimplements most opcodes with near exact functionality (if not, better).
There are several reasons to use this mod. One is that it enables certain "cheats" while playing San Andreas (gaining lives in arcade games, auto-aiming in pool game, skipping missions, increasing stats etc). Another is that, with some edits of SCM, it can be made to output information about SA Levels never before understood (see sapool.log in the ScrDebug folder).
But the best reason is for debugging of your own script mods. You can happily setup debug scripts and leave the debug code in there. The debug code is only enabled for those who have ScrDebug, thus not ruining a mod users gameplay with unexpected happenings. Even if you do want to remove the debug code after, most of these additional opcodes are very handy. | ScrDebug This post has been edited by Deji on Monday, Sep 10 2012, 03:11
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Deji  |
Posted: Wednesday, Mar 14 2012, 22:00
|
Coding like a Rockstar!

Group: Members
Joined: Dec 24, 2007


|
"Everything explained in the readme file. It took me ages, so read it..." All the information I could possibly tell is on the download page. But I'll save people 1 click by putting the main description in the first post. Also, a few of the opcodes: 0662: printstring "OUTPUT_TEXT_OFF" R*N had this nifty opcode to output text in-game. I gave ScrDebug the ability to output these in a list of the last 12 (which is the max, but you can specify less in the INI file) messages. As the screenshot shows, it can be used to print helpful debug messages which you can leave in the script without the end-user seeing them, unless they have ScrDebug (in which case they're opting to see the info). 0663: printint "IGFIDX" $GIRLFRIEND In this example, R*N probably wanted to output the current 'integer girlfriend index'. You can use it to output whatever text you want, followed by an integer, as seen in the screenshot. A space is auto-added (cause that's how it would've originally worked). 0736: is_keyboard_key_just_pressed 0x20 One of the greatest things to re-enable... It was used for debug keypresses by R*N. This can be evidenced by installing ScrDebug, going into a game of pool and pressing the spacebar (0x20) key. The cue will automatically be aimed according to what the 'AI' thinks is the best ball for the shot. Unlike 0735 (is_keyboard_key_pressed) this only returns true when the key is JUST pressed. 03A7: save_int_to_debug_file $CURRENT_WANTED_LIST There are also a few opcodes to save values to a debug file. A file entitled "pool.log" comes with ScrDebug as a demo of is outputted when these opcodes are enabled and the Pool game is played. A lot of info in that file, which R*N would have found useful during development. So this is basically a mod for those who wanna develop as good as (or preferably better than) Rockstar North. As a bonus, ScrDebug can also add 00CC. This is a completely new opcode which R*N didn't have. Usage: So what does that do? Well, it's a breakpoint. When encountered, a html file with information about the script will be created (as well as listing all local variables and a handful of global variables). I'm still working on adding more to this opcode. A message box will pop up which allows you to disable the breakpoint or just continue. This is opcode is powerful in the right hands. This post has been edited by Deji on Wednesday, Mar 14 2012, 22:17
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|