Deji Posted July 1, 2011 Share Posted July 1, 2011 (edited) 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. 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 Edited September 10, 2012 by Deji MarjinaL -TR and cl55684 2 Link to comment Share on other sites More sharing options...
Deji Posted July 17, 2011 Author Share Posted July 17, 2011 * Updated * Link to comment Share on other sites More sharing options...
Deji Posted March 14, 2012 Author Share Posted March 14, 2012 * Updated * (If anyone cares... It seems people don't want to keep their mods bugless ) Link to comment Share on other sites More sharing options...
Kalvin Posted March 14, 2012 Share Posted March 14, 2012 Ha, i bet people are/will be using it as always, magnificent job Deji Shine o' Vice | Vice City BETA Edition | Grand Theft Auto 3D Link to comment Share on other sites More sharing options...
_Rob_ Posted March 14, 2012 Share Posted March 14, 2012 Could you maybe explain a little more what it helps do? I would imagine that is the reason of the lack of response Link to comment Share on other sites More sharing options...
Deji Posted March 14, 2012 Author Share Posted March 14, 2012 (edited) "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: 00CC: 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. Edited March 14, 2012 by Deji Link to comment Share on other sites More sharing options...
HeresOtis Posted March 16, 2012 Share Posted March 16, 2012 So this will find the cause of a crash from a modded main.scm? Link to comment Share on other sites More sharing options...
Deji Posted March 16, 2012 Author Share Posted March 16, 2012 Yes, of course. It will automatically scan your entire main.scm file and find the exact line that crashes Of course not. It's merely gives you more power when debugging your scripts and also allows you to play around with R*'s main.scm debug scripts, which have the ability to skip missions and such. If you don't know how to use this tool efficiently, you can look for the opcodes in the main.scm and see how R* used them. Link to comment Share on other sites More sharing options...
elMarcoPL Posted March 17, 2012 Share Posted March 17, 2012 I don't know what to say, cause I can't understand way to use this tool, but I can say that it is awesome. Link to comment Share on other sites More sharing options...
Deji Posted September 3, 2012 Author Share Posted September 3, 2012 An interesting bit of code I noticed in the main.scm... :BLACKJ_4551IF IS_KEYBOARD_KEY_JUST_PRESSED 0x55 ELSE_GOTO @BLACKJ_4646 $BJACK_Flag_Card_Cheat += 1 IF $BJACK_Flag_Card_Cheat > 1 ELSE_GOTO @BLACKJ_4626 $BJACK_Flag_Card_Cheat = 0 PRINTINT "CARD_CHEAT_OFF" $BJACK_Flag_Card_Cheat GOTO @BLACKJ_4646 :BLACKJ_4626PRINTINT "CARD_CHEAT_ON" $BJACK_Flag_Card_Cheat Press U during a Blackjack game to activate a card hack! lpgunit 1 Link to comment Share on other sites More sharing options...
Deji Posted September 10, 2012 Author Share Posted September 10, 2012 (edited) ScrDebug update! Download the version 0.4 on the mod page: http://gtag.gtagaming.com/mods/81-sa-scrdebug/ Additions: 091A (gets cheat input), 091B (clears cheat input) Used for debugging the girlfriend agent. There are plenty of commands to teleport to different GF's, increase stats, enter certain situations (girlfriend driving CJ around the block was something I'd never seen/done before). Also updated a lot of the information on the page, though it looks nicer in the readme.txt file cause for a web designer, I suck at designing topics Will try to add some more screenshots and make a list of GFAGNT commands tomorrow. Tired. Edited September 10, 2012 by Deji Link to comment Share on other sites More sharing options...
TheGodfather. Posted September 10, 2012 Share Posted September 10, 2012 Will it help me in completing my TC ? I guess it will be useful for me for completing & debugging my TC.Good job.. Link to comment Share on other sites More sharing options...
Gramps Posted September 10, 2012 Share Posted September 10, 2012 (girlfriend driving CJ around the block was something I'd never seen/done before). Could be useful for your Black Market mod .. Link to comment Share on other sites More sharing options...
Deji Posted September 10, 2012 Author Share Posted September 10, 2012 This was meant to be more informal then it turned out, but I ran out of disk space for footage so I thickened the whole thing up with a hint of humor. ScrDebug: A GFAGNT Story A bit more relevant... A full list of GFAGNT debug commands:DOCOOCHIE - Sets the current girlfriend to Denise DOMICHELLE - Sets the current girlfriend to Michelle DOKYLIE - Sets the current girlfriend to Helena DOBARBARA - Sets the current girlfriend to Barbara DOSUZIE - Sets the current girlfriend to Katie DOMILLIE - Sets the current girlfriend to Millie FASTDATE - Skips the next date and goes straight to the coffee invite. GOCOOCHIE - Teleports to Denise's house GOMICHELLE - Teleports to Michelle's house GOKYLIE - Teleports to Helena's house GOBARBARA - Teleports to Barbara's house GOMILLIE - Teleports to Millie's house DATEFOOD - Makes the girlfriend want to go for a meal for the next date DATEDRIVE - Makes the girlfriend want to be driven around the block for the next date DATEDANCE - Makes the girlfriend want to go dancing for the next date DATESPANK - Makes the girlfriend want some freaky sh*t for the next date DATESHEDRIVES - Makes the girlfriend drive CJ around the block for the next date MEETMICHELLE - Teleports near Michelle's meeting location MEETKYLIE - Teleports near Helena's meeting location MEETBARBARA - Teleports near Barbara's meeting location MEETSUZIE - Teleports near Katie's meeting location GIMPSUIT - Dresses CJ in gimp suit TWOTIMING - Causes jealous girlfriend scenario? ELEGANTMAN - Minimises the desired sex appeal of all girlfriends SHOWENTRY - Shows date location entrances HIDEENTRY - Hides date location entrances UNCENSORED - Enables Hot Caffeinated Drinks STATSUP - Increases stats for current girlfriend STATSDOWN - Decreases stats for current girlfriend DUMPME - Minimises stats for current girlfriend Link to comment Share on other sites More sharing options...
lpgunit Posted September 11, 2012 Share Posted September 11, 2012 Are the cheats mentioned present (albeit hidden) in vanilla SA? Link to comment Share on other sites More sharing options...
Deji Posted September 11, 2012 Author Share Posted September 11, 2012 If by vanilla you mean plain, yeah Else there would've been no way for me to determine what these opcodes originally did. Here's the topic where I was originally posting my discoveries: http://gtag.gtagaming.com/forums/index.php?showtopic=529 lpgunit 1 Link to comment Share on other sites More sharing options...
Deji Posted September 11, 2012 Author Share Posted September 11, 2012 Made a stability update for 0.4. So the 5 of you who downloaded it may wish to go back and download 0.4r2 Oh, and here's another topic much earlier on in the development of ScrDebug, when it was a CLEO called "Project: R.A.O.R.O.S.O.A.F.S.W.C.U.M.S.". I've come a long way: http://gtag.gtagaming.com/forums/index.php?showtopic=462 As well as some debug keys I'd found already in the SA main.scm at that point: https://pastebin.com/ZtvYVJmh Link to comment Share on other sites More sharing options...
Deji Posted September 20, 2012 Author Share Posted September 20, 2012 ScrDebug Update! (Triple post!) At the usual place: http://gtag.gtagaming.com/mods/81-sa-scrdebug/ If anyone has an idea what any of the NOP's I've not implemented might've done, please let me know as I've run out of ideas now. Especially here: {1588618} IF {1588622} IS_CAR_STOPPED [email protected] {1588627} ELSE_GOTO @SYN2_21601 {1588634} IF {1588638} 06AA: NOP_false [email protected] // wtf? debug opcode that checked something about the car?{1588643} ELSE_GOTO @SYN2_21601 {1588650} 0752: NOP [email protected] // debug opcodes that did something with the car?{1588655} GET_CAR_COORDINATES [email protected] $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 {1588669} GET_CAR_HEADING [email protected] $tempvar_Angle {1588677} SAVE_NEWLINE_TO_DEBUG_FILE {1588681} 05B6: 100 // RICH CAR STOPPED AT {1588809} SAVE_FLOAT_TO_DEBUG_FILE $TEMPVAR_FLOAT_1 {1588814} SAVE_FLOAT_TO_DEBUG_FILE $TEMPVAR_FLOAT_2 {1588819} SAVE_FLOAT_TO_DEBUG_FILE $TEMPVAR_FLOAT_3 {1588824} SAVE_FLOAT_TO_DEBUG_FILE $tempvar_Angle Who knows... Link to comment Share on other sites More sharing options...
MarjinaL -TR Posted January 26, 2016 Share Posted January 26, 2016 Perfect work, you continue? Link to comment Share on other sites More sharing options...
Deji Posted January 28, 2016 Author Share Posted January 28, 2016 Perfect work, you continue? I did, for a while, until the point where the interest in it wasn't enough to drive it any further and I'd already done the stuff I wanted from it. If I were to work on it again though it'd be purely for SCRambl. Link to comment Share on other sites More sharing options...
cl55684 Posted September 10, 2020 Share Posted September 10, 2020 On 7/1/2011 at 4:55 PM, Deji said: SA ScrDebug. can you update the mod and leave it like this? https://www.mixmods.com.br/2018/08/curiosidades-maior-perda-da-historia-do.html?m=1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now