Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Deji

SA ScrDebug

Recommended Posts

Deji

 

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 by Deji

Share this post


Link to post
Share on other sites
Deji

* Updated *

Share this post


Link to post
Share on other sites
Deji

* Updated *

(If anyone cares... It seems people don't want to keep their mods bugless tounge2.gif)

Share this post


Link to post
Share on other sites
Kalvin

Ha, i bet people are/will be using it biggrin.gif as always, magnificent job Deji icon14.gif

Share this post


Link to post
Share on other sites
_Rob_

Could you maybe explain a little more what it helps do? I would imagine that is the reason of the lack of response smile.gif

Share this post


Link to post
Share on other sites
Deji

"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 by Deji

Share this post


Link to post
Share on other sites
HeresOtis

So this will find the cause of a crash from a modded main.scm?

Share this post


Link to post
Share on other sites
Deji

Yes, of course. It will automatically scan your entire main.scm file and find the exact line that crashes tounge2.gif

 

 

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.

Share this post


Link to post
Share on other sites
elMarcoPL

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.

Share this post


Link to post
Share on other sites
Deji

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!

Share this post


Link to post
Share on other sites
Deji

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 tounge.gif

 

Will try to add some more screenshots and make a list of GFAGNT commands tomorrow. Tired.

Edited by Deji

Share this post


Link to post
Share on other sites
TheGodfather.

Will it help me in completing my TC ?

I guess it will be useful for me for completing & debugging my TC.Good job..

Share this post


Link to post
Share on other sites
Gramps
(girlfriend driving CJ around the block was something I'd never seen/done before).

 

Could be useful for your Black Market mod ..

Share this post


Link to post
Share on other sites
Deji

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

Share this post


Link to post
Share on other sites
lpgunit

Are the cheats mentioned present (albeit hidden) in vanilla SA?

Share this post


Link to post
Share on other sites
Deji

Made a stability update for 0.4. So the 5 of you who downloaded it may wish to go back and download 0.4r2 tounge2.gif

 

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

Share this post


Link to post
Share on other sites
Deji

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...

Share this post


Link to post
Share on other sites
MarjinaL -TR

Perfect work, you continue?

Share this post


Link to post
Share on other sites
Deji

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.