What's new

Tools [RELEASE] Red Dead XSC Editor [PRE-EDITOR] [+SOURCE]

  • Thread starter XBLToothPik
  • Start date
  • Views 4,469
X

XBLToothPik

Contributor
Messages
577
Reaction score
1,069
Red Dead Redemption: XSC Editor [PRE-EDITOR]
Release Version: 0.0.1

Information
This release thread is mainly targeted for releasing the source to this program, but the binary is also included. This is an early stage of the RDR XSC Editor; taking up the research left behind by Listener and Twisted89 (from RPFTool). This tool cannot fully edit/recompile XSC files as is, but I may add full support for that in the future. This is titled PRE-EDITOR for the reason it can't fully edit as of now.

Q&A
Q: RPFTool already has an XSC Viewer, why make another one?
A: You're right. However, the XSC viewer that has been built into RPFTool (by Twisted89) isn't as far along in development as this tool is; much more features are added here.

Q: Like what features?
A: Quite a bit. Recompiling can be done at any time if I really feel like it. Calling functions have been implemented in this program, and so have labels, jumps, and switches, unlike in RPFTool.
Q: You said editor, but this isn't an editor!
A: I started working on the recompiling function, but never built up enough desire to finish it, after a while of working on the tool, it actually gets boring; even knowing what the result of the finished product will be. I would like to see this progress, but I don't want to be the only one to have to do it. This is the reason for the source release.

Q: Does this mean we can script mod GTAV?
A: No, GTAV uses a different XSC format and a different opCode set. This tool will not work with V-XSC or CSC

The program
The program isn't fully complete, and to be able to open an RDR XSC correct, you must unpack it from the resource container it is in. As of now, the program does not have support for unpacking the script resource from it's container, so you have to do it from another tool. The best option as of now is to unpack it with RPFTool, which you can get from http://www.tmacdev.com/. Then open the script.unpacked file in the RDR XSC Editor.
Program Download: (EXE)
[REMOVED]


What It Looks Like
22fba533b86596766a107c75b9653890.png

cb18219e37c57c1e555a2a6c164c18f3.png

74d4ad70fc23436816f378ad58014fa1.png

The Source
This program was written in C#, which uses the .NET Framework (this was targeted for .NET Framework V3.5 for better compatibility reasons). Not all the code was done by me. Some functions in the program were from the RPFTool, however, I did not use the RPFTool source code to build this program, I started this project a while back based on the OpCode list release by Listener @ Xentax Forums. Functions that were taken from the RPFTool and used in this program have been marked with the credits above the function in the source, and the names of anyones' code that I used has been put in the About section of the program. There are some functions I have taken out of the program for my own reasons.
Source Download: (C#)
[REMOVED]


XSC
XSC, or Xenon Script Container; which can also be abbreviated differently depending upon the platform the script was built for. Extensions can be as follows:
  • XSC - Xenon Script Container (Xbox 360)
  • CSC - Cell Script Container (PS3)
These files are binary files that have been compiled with Rockstar Games' Script Compiler. It is unknown to me what language was used to program these scripts, although I assume it was Lua seeing as Lua was used in earlier Rockstar games for script controllers. These files consist of a few different things (as of Red Dead Redemption's XSCs):
  • Header - Holds information pertaining to the format of the file, code size, local size, extern function calls (native functions), code pages and other script related data.
  • Code Block - A list of instructions (opCodes) defined by Rockstar. The XSC is a Rockstar custom Virtual Machine (not sure if they use a 3rd party VM)
XSC Documentation:
XSC Documentation HERE (Coming soon)

Other Program Information
#self note, set up tutorial goes here (natives..ect..)

Virus Scans
I will be providing two virus scans, but only of the .EXE. Will keep these updated following any changes made to the program release.
Virus Total Scan
Jotti Scan
 
Last edited:
M

Matt Denton

Enthusiast
Messages
1,361
Reaction score
292
VERY useful :smile:
 
C

cain683

Enthusiast
Messages
49
Reaction score
3
Slight edit to my post, I found the xsc files, but using this tool, I keep getting an error, and I assume it has to do with the XTF section. But I can't find any information on XTF anywhere
 
Last edited:
D

DonutMan456

Newbie
Messages
1
Reaction score
0
I know this post is ancient, but could anyone help me finish the “decompiling” aspect to this tool?
 
Top Bottom