Quantcast

Jump to content

» «
Photo

[IV/EFLC|REL] SCO ToolBox

84 replies to this topic
flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#1

Posted 11 July 2011 - 12:06 AM Edited by flitskikker, 27 November 2011 - 01:26 PM.

user posted image
Current version: v1.2.7 (November 27th, 2011)


Hello all, here's my first modding tool here; SCO ToolBox. smile.gif

SCO ToolBox is designed for decoding, encoding and low level editing of SCO files.

As I always want to see screenshots of tools getting released, and you probably want that too, behold:

user posted image

user posted image


Shown are the main screen and the SCO editor. Yes, it can successfully decompile and compile code. However, in low level. See the Notes for why.


Usage

The usage of SCO ToolBox is rather obvious.
Just launch it and you will be able to open a single file (for decoding/encoding and editing) and batch decode/encode a bunch of files.
After you open a single file, information about the file is displayed in the properties box. To low level edit it, click the "Open Code Editor" button. Please select the correct script version for the natives mode.
The advanced editor offers line numbering, syntax coloring, auto completing and a bunch of other useful features. However, it will take a while to load large chuncks of code into the advanced editor (decompiling and compiling itself is fast though). It is advised to use the basic editor for large files (>50000 bytes).

Please see the following screenshots for the batch convert panel, and the basic editor:

user posted image

user posted image


Demonstration

I've made changes to the already cleaned script (by Shadow-Link) for GTA IV: San Andreas. I've added text, spawned a vehicle, added armor and changed the time of day. It works successfully on 1.0.7.0. You can view the result here:




Notes

Please keep in mind the following notes before using SCO ToolBox:
  • IV or EFLC should either be installed or be in the same directory as the tool. This is required for reading the AES cypher key for encrypting and decrypting the SCO files. It is legally not allowed to distribute this key with the program itself.
  • This is not Sanny Builder! SCO ToolBox only offers low level coding. It is certainly a bit harder, but after screwing around with it a while, you can create simple things such as spawning a car. But it works!
  • I didn't do high level editing because that's harder to do and the Russians are probably working on their editor, so it would be lost time and effort. However, if you want to give it a try, ask me the source.
  • As said above, you should really use the basic editor when opening a large file. The main.sco for example. It took 3 minutes to load it in on my quad core processor (1 second for the basic editor). I didn't make the advanced editor component (it is SyntaxBox by Roger Alsing), so I don't think it can be fixed. However, compiling and decompiling is fast. It processes main.sco in 4 seconds.
  • You can not fully compile for the new SCO type (e.g. 1.0.7.0). This is because the new hasing algorithm for the natives is still unknown. I've collected some of the new hashes by comparing the scripts for 1.0.4.0 and 1.0.7.0, so you can compile simple code for 1.0.7.0 with this tool. You can view the known and unknown hashes by opening Data\NativesNew.dat and Data\HashesNew.dat.
  • So, check the natives mode when you load and save files. Otherwise, the natives will be respectively displayed as hex values or compiled incorrectly.
  • Hover your mouse over the auto complete function list to see if you shoud, and, if yes, what parameters you should add to a function. You can open existing SCO files or check out the GTAModding wiki to get a general view of how things work.
  • Because this is actually more like a beta version, the tool may decompile and display things incorrectly. However, it will get compiled in the same (incorrect) way. I've decompiled and recompiled the full main.sco successfully. There were no binary differences (except float values).
  • I've added some stuff to the Tools folder. You will find and completely empty script file if you want to create a new file. I've also added a list of vehicle hashes if you want to spawn a vehicle.
  • Please note that this is a SCO utility, so it cannot extract it from or pack it into a IMG archive for you.
  • I am not a SCO coder, so I can not tell you why your script crashes or how to use all the natives and script features. I can certainly have a try on checking your code, though. First thing to check if your code crashes would be if the correct natives mode is selected.
Download

You can download the latest version of SCO ToolBox - v1.2.7 (November 27th, 2011) - here:

DOWNLOAD!


Download Source


Change Log

v1.2.7:
- Added 1.0.7.0 natives (Thanks OinkOink and sjaak327).
- Added description for code signature.
- Added update checker.
- Some other bug fixes.

v1.2.6:
- First public release.

(Didn't log previous versions)


I hope you like it. smile.gif

Cheers,
Flitskikker

nkjellman
  • nkjellman

    Boss

  • Members
  • Joined: 28 Aug 2008

#2

Posted 11 July 2011 - 01:16 AM

It's about time! Great job.

ziggyYardie
  • ziggyYardie

    Player Hater

  • Members
  • Joined: 18 Apr 2011
  • None

#3

Posted 11 July 2011 - 01:18 AM

GREAT!!! is this able to do HIGH level editing or still at "low level" like you said in a other forum?
none the less,its progess great work on this even if its in the modest

nkjellman
  • nkjellman

    Boss

  • Members
  • Joined: 28 Aug 2008

#4

Posted 11 July 2011 - 06:19 AM

Now that we have .sco editing, we need a script like liveless but it let will us customize save game locations with an .ini for each GTA IV install due to the fact that you can't pick a save to load or start a new game like III, VC, and SA. It would also be a great way to keep the saves organized. Who agrees with me?

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#5

Posted 11 July 2011 - 06:53 AM

This is good news. What are your plans for future releases?

sjaak327
  • sjaak327

    Big Homie

  • Members
  • Joined: 01 Dec 2008

#6

Posted 11 July 2011 - 07:02 AM

Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).


Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Members
  • Joined: 19 Aug 2006
  • European-Union

#7

Posted 11 July 2011 - 07:04 AM

Finally, I might love making script mods for GTAIV. Good job, mate! icon14.gif

gamerzworld
  • gamerzworld

    Why did I move here? I guess it was to bounce.

  • Members
  • Joined: 29 Nov 2005

#8

Posted 11 July 2011 - 10:30 AM

QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

sjaak327
  • sjaak327

    Big Homie

  • Members
  • Joined: 01 Dec 2008

#9

Posted 11 July 2011 - 12:13 PM

QUOTE (gamerzworld @ Monday, Jul 11 2011, 12:30)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

Oh that's a bummer, he did send me his updated version of sprakiv that actually works, not sure if he included the source though

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#10

Posted 11 July 2011 - 12:16 PM

Thanks for your replies!

QUOTE
GREAT!!! is this able to do HIGH level editing or still at "low level" like you said in a other forum?
none the less,its progess great work on this even if its in the modest


It's still low level unfortunately. See the screenshots in the OP. But you can make simple edits with it. See below.

QUOTE
Now that we have .sco editing, we need a script like liveless but it let will us customize save game locations with an .ini for each GTA IV install due to the fact that you can't pick a save to load or start a new game like III, VC, and SA. It would also be a great way to keep the saves organized. Who agrees with me?


Are you sure that is handled through SCO?

QUOTE
This is good news. What are your plans for future releases?


- If "OinkOink" replies, adding all natives for 1.0.7.0.
- Adding sample files.
- Maybe adding high level editing.

---

Here's another example of what you can do with it. biggrin.gif
In roman1.sco, I've replaced the hashes for Roman's Taxi with the one for the Infernus, added armor and changed the time.

user posted image

user posted image

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#11

Posted 11 July 2011 - 12:18 PM

QUOTE (sjaak327 @ Monday, Jul 11 2011, 12:13)
QUOTE (gamerzworld @ Monday, Jul 11 2011, 12:30)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

Oh that's a bummer, he did send me his updated version of sprakiv that actually works, not sure if he included the source though

Could you send it to me? I can extract it from it.

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#12

Posted 11 July 2011 - 12:23 PM

Great tool! Great work, flitskikker! Wish you best luck with it and more future releases! smile.gif

One question: which one of all .sco files is the one that is for "starting a new game", also, which one is after the first save? Or the spawn coordinates after this save are ruled by the save file (like in SA)? smile.gif

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#13

Posted 11 July 2011 - 12:27 PM

Nice work flitskikker!, also, is it possible to change home co-ords in missions? cuz i'd like to play a good life in iv tounge.gif
Like, spawn in alderney, and to drive and live in the apartment you have there before playboys tounge.gif and use a diff building for roman's depo xD

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#14

Posted 11 July 2011 - 12:31 PM

QUOTE (hristobg @ Monday, Jul 11 2011, 12:23)
Great tool! Great work, flitskikker! Wish you best luck with it and more future releases! smile.gif

One question: which one of all .sco files is the one that is for "starting a new game", also, which one is after the first save? Or the spawn coordinates after this save are ruled by the save file (like in SA)? smile.gif

Thanks a lot! smile.gif

The first mission (drive Roman) is called roman1.sco, which I modified (see above). I don't know which one for the boat intro.
I think the saves are handled through ambsavebed.sco, but I think the spawn coords are saved in the savegame and loaded from that.

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#15

Posted 11 July 2011 - 12:33 PM

QUOTE (ManDog @ Monday, Jul 11 2011, 12:27)
Nice work flitskikker!, also, is it possible to change home co-ords in missions? cuz i'd like to play a good life in iv tounge.gif
Like, spawn in alderney, and to drive and live in the apartment you have there before playboys tounge.gif and use a diff building for roman's depo xD

I think everything is possible, I just wouldn't know how to do it. tounge2.gif

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#16

Posted 11 July 2011 - 12:35 PM Edited by ManDog, 11 July 2011 - 12:50 PM.

QUOTE (flitskikker @ Monday, Jul 11 2011, 12:33)
QUOTE (ManDog @ Monday, Jul 11 2011, 12:27)
Nice work flitskikker!, also, is it possible to change home co-ords in missions? cuz i'd like to play a good life in iv tounge.gif
Like, spawn in alderney, and to drive and live in the apartment you have there before playboys tounge.gif and use a diff building for roman's depo xD

I think everything is possible, I just wouldn't know how to do it. tounge2.gif

Great biggrin.gif
I've never scripted before, but for iv, i'd try anythin xP
Oh, btw.
Where can i find the code to change roman's taxi in roman1.sco? tounge.gif
(What section, line, etc. If it's not too much trouble, as i stated, i haven't scripted in my entire life, and this could be a start tounge.gif )

sjaak327
  • sjaak327

    Big Homie

  • Members
  • Joined: 01 Dec 2008

#17

Posted 11 July 2011 - 12:54 PM

QUOTE (flitskikker @ Monday, Jul 11 2011, 14:18)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 12:13)
QUOTE (gamerzworld @ Monday, Jul 11 2011, 12:30)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

Oh that's a bummer, he did send me his updated version of sprakiv that actually works, not sure if he included the source though

Could you send it to me? I can extract it from it.

Sure, when I get home, will pm you the link.

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#18

Posted 11 July 2011 - 12:54 PM

QUOTE (ManDog @ Monday, Jul 11 2011, 12:35)
QUOTE (flitskikker @ Monday, Jul 11 2011, 12:33)
QUOTE (ManDog @ Monday, Jul 11 2011, 12:27)
Nice work flitskikker!, also, is it possible to change home co-ords in missions? cuz i'd like to play a good life in iv tounge.gif
Like, spawn in alderney, and to drive and live in the apartment you have there before playboys tounge.gif and use a diff building for roman's depo xD

I think everything is possible, I just wouldn't know how to do it. tounge2.gif

Great biggrin.gif
I've never scripted before, but for iv, i'd try anythin xP
Oh, btw.
Where can i find the code to change roman's taxi in roman1.sco? tounge.gif

You will find the hashes for vehicles in Tools\Vehicle Hashes.txt;

ROM = 0x8CD0264C
INFERNUS = 0x18F25AC7

After I saw in the code that Roman's Taxi is only created, spawned, deleted, etc, I simply used the advanced editor to find and replace all the instances of the hash above with the one from the Infernus.
But, of course, you can replace it with the hash for any other vehicle from the Vehicle Hashes.txt file.

To change to color, simply search for CHANGE_CAR_COLOUR. For example:

CODE
PushS 525
LocalVar
RefGet
PushD 0
PushD 1
CallNative CHANGE_CAR_COLOUR 3 0


The 3 after the native means it requires 3 parameters from above (0 = zero return values). According to GTAModding.com's documentation, these are the Vehicle Handle and two colors.

The first three lines get the Vehicle Handle (it gets the value from the 525th local variable, appearantly it's stored there).
The two colors are 0 and 1. I changed them both to 131 (reference).

There are more CHANGE_CAR_COLOUR calls and some calls for changing the additional colors. I've changed them all to 131.


I hope you understand it smile.gif

chasez
  • chasez

    GTAV? Haven't played it!

  • Members
  • Joined: 21 Nov 2008
  • None

#19

Posted 11 July 2011 - 01:11 PM

Is it possible to add police bike to police unit with this one? not replacing but adding. Like the cops drive police, police2 and as an addition Police bike.

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#20

Posted 11 July 2011 - 01:41 PM

Hmm, i tried doing it, but it stops on the "LOADING..." text. I know it hasen't crashed, because the white bar keeps going across.
Have i done something wrong? here's what i do:
I start extract SCO Editor (tools, data, .txt, etc) into IV root folder.
Then later open OpenIV and extract roman1.sco
Then i do "new - 1.0.7.0", then "Advanced"
Then i click Find and Replace, i put in Roman's taxi code, then put in the one i want (Banshee in this case, for a test), then click Replace All.
I do save as, and export it into a folder, i go back in OpenIV and replace Roman1.sco
but i went ingame, did that loading thing, so i did Decode option, and exported it.
then i went ingame, still did the "Loading...", did i do something wrong?

Threepwood
  • Threepwood

    Calm like a bomb.

  • Members
  • Joined: 13 Jul 2008

#21

Posted 11 July 2011 - 01:42 PM

Flit, have you found any hint if the SCO files start or execute CUT scenes?
Have you seen any hint for car manipulating in matter of objects besides attaching blips?
I am actually going through every SCO which is involved with Brucie missions, no luck yet. But maybe there is a common SCO file which does any of the above?

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Members
  • Joined: 24 May 2008

#22

Posted 11 July 2011 - 01:47 PM

Well it's about time that we do a script editor besides hooking stuff up with C++.

sjaak327
  • sjaak327

    Big Homie

  • Members
  • Joined: 01 Dec 2008

#23

Posted 11 July 2011 - 02:04 PM Edited by sjaak327, 11 July 2011 - 02:10 PM.

QUOTE (Threepwood @ Monday, Jul 11 2011, 15:42)
Flit, have you found any hint if the SCO files start or execute CUT scenes?
Have you seen any hint for car manipulating in matter of objects besides attaching blips?
I am actually going through every SCO which is involved with Brucie missions, no luck yet. But maybe there is a common SCO file which does any of the above?

Cutscenes are started from mission scripts, the native you are looking for would bbe either start_cutscene, or Start_cutscene_now

You should decompile all the sco's into a single directory (using scruff or whatever the sparkiv tool is called) and then searching using wingrep.

Oh wait, I remember what you are trying to do here smile.gif you need to examine the cut files for that, mission scripts just start the cutscenes, nothing more.

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#24

Posted 11 July 2011 - 02:07 PM

QUOTE (Threepwood @ Monday, Jul 11 2011, 13:42)
Flit, have you found any hint if the SCO files start or execute CUT scenes?
Have you seen any hint for car manipulating in matter of objects besides attaching blips?
I am actually going through every SCO which is involved with Brucie missions, no luck yet. But maybe there is a common SCO file which does any of the above?

I don't understand what you're trying to achieve. What would be changed in Brucie's missions?

QUOTE
Hmm, i tried doing it, but it stops on the "LOADING..." text. I know it hasen't crashed, because the white bar keeps going across.
Have i done something wrong? here's what i do:
I start extract SCO Editor (tools, data, .txt, etc) into IV root folder.
Then later open OpenIV and extract roman1.sco
Then i do "new - 1.0.7.0", then "Advanced"
Then i click Find and Replace, i put in Roman's taxi code, then put in the one i want (Banshee in this case, for a test), then click Replace All.
I do save as, and export it into a folder, i go back in OpenIV and replace Roman1.sco
but i went ingame, did that loading thing, so i did Decode option, and exported it.
then i went ingame, still did the "Loading...", did i do something wrong?


Could you send me your edited SCO file?

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#25

Posted 11 July 2011 - 02:37 PM

W00t! my first ever script! simple, but i'm proud of myself biggrin.gif
from Taxi, to Banshee!
user posted image
biggrin.gif

Threepwood
  • Threepwood

    Calm like a bomb.

  • Members
  • Joined: 13 Jul 2008

#26

Posted 11 July 2011 - 02:53 PM

But do not forget, there is a taxi mission where you need a 4door car wink.gif

sjaak327
  • sjaak327

    Big Homie

  • Members
  • Joined: 01 Dec 2008

#27

Posted 11 July 2011 - 03:04 PM Edited by sjaak327, 11 July 2011 - 03:12 PM.

QUOTE (flitskikker @ Monday, Jul 11 2011, 14:18)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 12:13)
QUOTE (gamerzworld @ Monday, Jul 11 2011, 12:30)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

Oh that's a bummer, he did send me his updated version of sprakiv that actually works, not sure if he included the source though

Could you send it to me? I can extract it from it.

Ok, I just extracted about 3000 hashes from ragelib.scripting.dll, I am pretty sure I got the right version (I have several sparkIV versions on my server).

Click here

Edit: yes it's the correct one, there in hex though, as opposed to your newhashes file which are dec, I cross checked a few of them, so it looks allright.

GTARandom
  • GTARandom

    Unfortunate piece of meat

  • Members
  • Joined: 15 Jun 2009

#28

Posted 11 July 2011 - 03:05 PM

QUOTE (Threepwood @ Monday, Jul 11 2011, 14:53)
But do not forget, there is a taxi mission where you need a 4door car wink.gif

"Three's a crowd". Drive Michelle/Karen and Mallorie to Rotterdam Hill....

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#29

Posted 11 July 2011 - 03:07 PM

I might use Sultan RS for that biggrin.gif tounge.gif

flitskikker
  • flitskikker

    The Forums Frog

  • Members
  • Joined: 25 Nov 2006

#30

Posted 11 July 2011 - 05:32 PM

QUOTE (sjaak327 @ Monday, Jul 11 2011, 15:04)
QUOTE (flitskikker @ Monday, Jul 11 2011, 14:18)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 12:13)
QUOTE (gamerzworld @ Monday, Jul 11 2011, 12:30)
QUOTE (sjaak327 @ Monday, Jul 11 2011, 02:02)
Oinkoink does have a spark IV version that decompiles all natives for 1.0.7.0 except the TBOGT specific natives (a few natives that were apparently not on Xbox).

He was supposed to send me the code last year so I could update SparkIV with it, never got anything. Messaged him a few days ago asking for it again so it could be added to SCO ToolBox, no response yet.

Oh that's a bummer, he did send me his updated version of sprakiv that actually works, not sure if he included the source though

Could you send it to me? I can extract it from it.

Ok, I just extracted about 3000 hashes from ragelib.scripting.dll, I am pretty sure I got the right version (I have several sparkIV versions on my server).

Click here

Edit: yes it's the correct one, there in hex though, as opposed to your newhashes file which are dec, I cross checked a few of them, so it looks allright.

Thanks! I already got the file from OinkOink himself so nothing new could be added.
However I still have some differences:

CODE
TASK_COMBAT_HATED_TARGETS_AROUND_CHAR_TIMED - FOUND, *****BUT DIFFERENT!!!******. In file: 352397392, From log: 309750227

TASK_COMBAT_HATED_TARGETS_AROUND_CHAR - FOUND, *****BUT DIFFERENT!!!******. In file: 309750227, From log: 352397392

CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED - FOUND, *****BUT DIFFERENT!!!******. In file: 1168863631, From log: 648683727

REGISTER_TRACK_NUMBER - FOUND, *****BUT DIFFERENT!!!******. In file: 1369125124, From log: 1300107943

GET_LENGTH_OF_STRING_WITH_THIS_TEXT_LABEL - FOUND, *****BUT DIFFERENT!!!******. In file: 1836670656, From log: 1593968717


In file = my file
From log = your file

Don't which ones are correct. ph34r.gif





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users