Post: Basics of C# RTM Tool Coding Tutorial SUPER NOOB FRIENDLY!
02-15-2014, 03:28 AM #1
RatchetBooty
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({}); Part 2 is now available! : You must login or register to view this content.

Hey guys, I've finally thought that I should create a thread about the basics of C# and how to use them into coding a RTM Tool for any game. This is a SUPER NOOB friendly tutorial, meaning people that don't know a thing about C# can learn from this. We will be using the game Call of Duty : Ghosts as a example today. But you can follow my steps and create it for any other game as long as you have the offsets. So lets get started off!

First you will need Visual Studios, you can get any version you want. But if you want to keep up to date get Visual Studios 2013 Ultimate, Click You must login or register to view this content.to download it.

Now while you're waiting for it to download (will take around a hour) you can go to this thread for the Ghosts 1.07 Offsets You must login or register to view this content. Credit to Mango_Knife for posting all of these offsets.There are a couple more offset threads around NGU, or just simply Google Ghosts 1.07 Offsets.

After Visual Studios has downloaded open it up, it should look like this:

You must login or register to view this content.


If you're wondering how I got the color of VS to be dark all you have to do is go to Tools, and click "Options"
Example: You must login or register to view this content.
and you should see the very first option is called "Color Theme", there are 3 different ones, look at them all and see which one you like most.

Alright so now back to the coding, click "New Project" on the top left of Visual Studios and a windows like so shall pop up.
You must login or register to view this content.
Click on "Windows Form Application" and where it says "Name" you can name it anything you want like My First RTM Tool or Ghosts RTM Tool.

Now you should get a form looking like this:
You must login or register to view this content.
You can change it's size to whatever you want simply by dragging the little white squares around the Form.

Now you might of seen other people using TMAPI, we're going to be using PS3Lib. It's a shorter version of TMAPI and its compatible with CCAPI. So you're coding will work for DEX users and CEX users. Click You must login or register to view this content. to download PS3Lib.Dll

Once you have download PS3Lib.Dll you need to add it as a reference, same goes with other dll's. If you ever wanted to make your program have a nice design you use DevComponents, it's a dll, so you would add it as reference. Remember that you can't add CCAPI.dll as a reference but you do need it in the same folder as your program.

To add it as a reference go to: Project on the top of Visual Studios, click on it. Go down to Add a reference. A box should pop up looking like this:
You must login or register to view this content.

Click "Browse" and find the PS3Lib.Dll and add it as a reference.
Now once you have added PS3Lib, double click on the Form and it should look like this:
You must login or register to view this content.

Where it says "using System; using System.Collections.Generic; and so on, under those. Add "using PS3Lib;" without the quotation marks.

Now under "InitializeComponent();" add this code:
    
public static PS3API PS3 = new PS3API();

What this code is doing is declaring the 3 letter word "PS3" as a API. And where it says new PS3API(); If you wanted your tool to be just CCAPI compatible or just DEX compatible you would put either new PS3API(SelectAPI.TargetManager); or new PS3API(SelectAPI.ControlConsole);

So now that we have that out of our way lets go back to the form. The design of your form should be at the top, click Form1.cs[Design]*

Now click on the form once, and you will see a properties windows pop up & and toolbox. If the toolbox isn't there. Go to the top of Visual Studios and click "View" and then click toolbox.

Now drag 2 buttons to the form and size them to however you like. Name one "Connect" and name one "Attach". You can rename them simply by clicking on the button and on the properties windows find "Text" and you can change the text there.
You must login or register to view this content.

Double click on the "Connect" button or whatever you've named it.
And put the following code:

    
try
{
PS3.ConnectTarget(0);
MessageBox.Show("Successfully Connected to Target!", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch
{
MessageBox.Show("Failed to Connect", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}


"try" & "catch" is for exception handling meaning that it will try the block of code in the first { } brackets and if it succeeds, in our case if its connects successfully a messagebox will pop up saying we've successfully connected. But if it fails, it will "catch" it, meaning it wont leave the program unresponding. It will catch the error with a messagebox saying it failed.

Now it's same thing for the "Attach" button, use the same code but instead of PS3.ConnectTarget(0); use PS3.AttachProcess();

Your code would look something like this:
    
try
{
PS3.AttachProcess();
MessageBox.Show("Successfully Attached to Proccess!", "Attached", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch
{
MessageBox.Show("Failed to Attached", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}


Now before we continue hit the "Save All" button on the top of Visual Studios just in case Visual Studios crashes.
Click the box circled in grey in the following picture:
You must login or register to view this content.

Ok, now we have to add 2 radio buttons so the user can select weather they want to Connect using "DEX" or "CEX". Go into the toolbox and drag 2 radio buttons and name once "DEX and the other one "CEX". Now double click on "DEX" and add the following code:
    
PS3.ChangeAPI(SelectAPI.TargetManager);

And now go back and double click on the "CEX" radio button and add the following code:
    
PS3.ChangeAPI(SelectAPI.ControlConsole);

You must login or register to view this content.
You're probably getting a error on the "Control Console" bit because it's saying that PS3Lib doesn't contain "Control Console" that's because you have to add CCAPI.Dll to the debug folder. It won't let you add it as a reference. Download CCAPI.Dll You must login or register to view this content.
Now find where your "Visual Studios" folder is located, mine is in my documents folder. Once you have found it, open it. Click "Projects", find your project. Open it. There should be another folder inside it named the same thing so open that folder. Then open the folder "Bin", then open the folder "Debug" and drag the CCAPI.Dll in the debug folder. If you're still getting the error build the solution so it refreshes. Click "Build" at the top of Visual Studios and click "Build Solution"
You must login or register to view this content.
What these codes are doing is changing the API or Kernel the user is connecting to, as specified earlier in the thread, we didn't say weather on load our API method will be TargetManager or Control Console. In this code with the 2 radio buttons you can change between target types.



Now add another 2 buttons to the Form and name one "No Recoil ON" & then other one "No Recoil OFF".
You can still follow the tutorial if you have a different offset for lets say red boxes, or chrome players, or anything like that. So these are the No Recoil ON and OFF bytes including the address.
    
Red Boxes: 0x14492C (On - 0x60, 0x00, 0x00, 0x00 | Off - 0x41, 0x82,0x00, 0x0c)


Double click the "No Recoil ON" button and put the following code:
    
byte[] norecoilon = new byte[] { 0x60, 0x00, 0x00, 0x00 };
PS3.SetMemory(0x14492C, norecoilon);

What you're doing here is declaring a byte named "norecoilon" remember that the name of the byte doesn't really matter, you can name it "34itji43tjj4" because it doesn't really matter. Then the ON bytes for No Recoil are 0x60, 0x00, 0x00, 0x00 so you're putting the bytes into hex format.
Then your setting the memory with the No Recoil address which is 0x14492C, and then beside it your putting the byte norecoilon. So lets conclude this: You've made a byte named norecoilon, that byte has the bytes in hex: 0x60, 0x00, 0x00, 0x00. Then your setting the memory to your PS3 by setting the bytes in "norecoilon" to the offset 0x14492C.

Now you do the same thing for No Recoil OFF but its different bytes. Your code for No Recoil OFF would look like:
    
byte[] norecoiloff = new byte[] { 0x41, 0x82,0x00, 0x0c };
PS3.SetMemory(0x14492C, norecoiloff);


Now you're finally finished, all you have to do now is run the .exe. You can debug it meaning if any random error occurs in the code the program will stop or run it without debugging meaning just running it straight from the .exe. To debug all you have to do is click "Start" at the top of Visual Studios or if you want to run it without debugging click the little arrow beside "Start" and it will drop down with another Start feature, click that start.
You must login or register to view this content.

Now you're finally done, to distribute your file click "Save All" (there was a pic earlier in the thread) and find the Visual Studios 2013 folder. Mine is located in my documents, once you have found it. Click on it, click "Projects" and find the folder with your tool that you've just created. You're tool will be in the debug folder. Remember if you're going to send people the tool remember to send them with the dll's. You can add a lot more non host mods or anything you would like from this offset thread:
You must login or register to view this content.

But some of the offsets like changing name and lobby settings require a bit different kind of coding as coding requires encodings and array reversing. I will be making a part 2 tutorial soon, comment what you guys would like to see.
If you guys want the download for the project we just did. You can see how everything's coded if you're getting a error.
Open Source: You must login or register to view this content.
Last edited by RatchetBooty ; 03-28-2014 at 02:26 AM.

The following 88 users say thank you to RatchetBooty for this useful post:

::iAmDemoN::, /SneakerStreet/, ❇❥⛺Cerberus⛺❤❇, A Friend, A_Gen_Fiasco, AlabamaHit, aleeeex, bearl, CallMeDex, Chirra92, cl_21, delta_12, Deversi, Haley, Dog88Christian, DS, Eat_Ur_Food, eazyb, ExhaleXhale, Exploited, Frank Ryan, Franky, GangDePlot, Hate, Hori_By_Nature, iBuMxURxMuM, ilasthope, Invose, iRnZ, Jayomu, JIewka, joni_djESP, KareraHekku, KING_ZOO, KINGMANI, libra7ry, LizzoOo, LucaTurilli, Luphox, Mauzey, Meshoo_x3, Moreuseinatool, MrMoan, Otaku Modder, OutKast3k, Phreaker, PO10C_, RambosNGU, Rank_One, Deleted-User0000000012210, ResistTheMoon, ResistTheSun, rocketforce, romolo, ryane7, samet2013, ShinigamiUzi, Skonafid, Kronos, Slinky, smoochy1993, Jon Snow, stianrustad, SwaggyLV, Taylors Bish, ThatsWhatLoveIs, The★A1★HAXO_oR, TheLastHelmet, TotalModzHD, Toxic, tunde1992, Vatinj, vhromero, vicious_results, wajdi9, witchery, worrorfight, xDebugKiller, Fatality, xGsc-_-Funzo, XILE_, xKasper, XxBlud23xX, yomen9, zMarcusHD
01-06-2016, 06:55 AM #92
Fatpabs
Gym leader
Originally posted by RatchetBooty View Post
Part 2 is now available! : You must login or register to view this content.

Hey guys, I've finally thought that I should create a thread about the basics of C# and how to use them into coding a RTM Tool for any game. This is a SUPER NOOB friendly tutorial, meaning people that don't know a thing about C# can learn from this. We will be using the game Call of Duty : Ghosts as a example today. But you can follow my steps and create it for any other game as long as you have the offsets. So lets get started off!

First you will need Visual Studios, you can get any version you want. But if you want to keep up to date get Visual Studios 2013 Ultimate, Click You must login or register to view this content.to download it.

Now while you're waiting for it to download (will take around a hour) you can go to this thread for the Ghosts 1.07 Offsets You must login or register to view this content. Credit to Mango_Knife for posting all of these offsets.There are a couple more offset threads around NGU, or just simply Google Ghosts 1.07 Offsets.

After Visual Studios has downloaded open it up, it should look like this:

You must login or register to view this content.


If you're wondering how I got the color of VS to be dark all you have to do is go to Tools, and click "Options"
Example: You must login or register to view this content.
and you should see the very first option is called "Color Theme", there are 3 different ones, look at them all and see which one you like most.

Alright so now back to the coding, click "New Project" on the top left of Visual Studios and a windows like so shall pop up.
You must login or register to view this content.
Click on "Windows Form Application" and where it says "Name" you can name it anything you want like My First RTM Tool or Ghosts RTM Tool.

Now you should get a form looking like this:
You must login or register to view this content.
You can change it's size to whatever you want simply by dragging the little white squares around the Form.

Now you might of seen other people using TMAPI, we're going to be using PS3Lib. It's a shorter version of TMAPI and its compatible with CCAPI. So you're coding will work for DEX users and CEX users. Click You must login or register to view this content. to download PS3Lib.Dll

Once you have download PS3Lib.Dll you need to add it as a reference, same goes with other dll's. If you ever wanted to make your program have a nice design you use DevComponents, it's a dll, so you would add it as reference. Remember that you can't add CCAPI.dll as a reference but you do need it in the same folder as your program.

To add it as a reference go to: Project on the top of Visual Studios, click on it. Go down to Add a reference. A box should pop up looking like this:
You must login or register to view this content.

Click "Browse" and find the PS3Lib.Dll and add it as a reference.
Now once you have added PS3Lib, double click on the Form and it should look like this:
You must login or register to view this content.

Where it says "using System; using System.Collections.Generic; and so on, under those. Add "using PS3Lib;" without the quotation marks.

Now under "InitializeComponent();" add this code:
    
public static PS3API PS3 = new PS3API();

What this code is doing is declaring the 3 letter word "PS3" as a API. And where it says new PS3API(); If you wanted your tool to be just CCAPI compatible or just DEX compatible you would put either new PS3API(SelectAPI.TargetManager); or new PS3API(SelectAPI.ControlConsole);

So now that we have that out of our way lets go back to the form. The design of your form should be at the top, click Form1.cs[Design]*

Now click on the form once, and you will see a properties windows pop up & and toolbox. If the toolbox isn't there. Go to the top of Visual Studios and click "View" and then click toolbox.

Now drag 2 buttons to the form and size them to however you like. Name one "Connect" and name one "Attach". You can rename them simply by clicking on the button and on the properties windows find "Text" and you can change the text there.
You must login or register to view this content.

Double click on the "Connect" button or whatever you've named it.
And put the following code:

    
try
{
PS3.ConnectTarget(0);
MessageBox.Show("Successfully Connected to Target!", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch
{
MessageBox.Show("Failed to Connect", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}


"try" & "catch" is for exception handling meaning that it will try the block of code in the first { } brackets and if it succeeds, in our case if its connects successfully a messagebox will pop up saying we've successfully connected. But if it fails, it will "catch" it, meaning it wont leave the program unresponding. It will catch the error with a messagebox saying it failed.

Now it's same thing for the "Attach" button, use the same code but instead of PS3.ConnectTarget(0); use PS3.AttachProcess();

Your code would look something like this:
    
try
{
PS3.AttachProcess();
MessageBox.Show("Successfully Attached to Proccess!", "Attached", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch
{
MessageBox.Show("Failed to Attached", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}


Now before we continue hit the "Save All" button on the top of Visual Studios just in case Visual Studios crashes.
Click the box circled in grey in the following picture:
You must login or register to view this content.

Ok, now we have to add 2 radio buttons so the user can select weather they want to Connect using "DEX" or "CEX". Go into the toolbox and drag 2 radio buttons and name once "DEX and the other one "CEX". Now double click on "DEX" and add the following code:
    
PS3.ChangeAPI(SelectAPI.TargetManager);

And now go back and double click on the "CEX" radio button and add the following code:
    
PS3.ChangeAPI(SelectAPI.ControlConsole);

You must login or register to view this content.
You're probably getting a error on the "Control Console" bit because it's saying that PS3Lib doesn't contain "Control Console" that's because you have to add CCAPI.Dll to the debug folder. It won't let you add it as a reference. Download CCAPI.Dll You must login or register to view this content.
Now find where your "Visual Studios" folder is located, mine is in my documents folder. Once you have found it, open it. Click "Projects", find your project. Open it. There should be another folder inside it named the same thing so open that folder. Then open the folder "Bin", then open the folder "Debug" and drag the CCAPI.Dll in the debug folder. If you're still getting the error build the solution so it refreshes. Click "Build" at the top of Visual Studios and click "Build Solution"
You must login or register to view this content.
What these codes are doing is changing the API or Kernel the user is connecting to, as specified earlier in the thread, we didn't say weather on load our API method will be TargetManager or Control Console. In this code with the 2 radio buttons you can change between target types.



Now add another 2 buttons to the Form and name one "No Recoil ON" & then other one "No Recoil OFF".
You can still follow the tutorial if you have a different offset for lets say red boxes, or chrome players, or anything like that. So these are the No Recoil ON and OFF bytes including the address.
    
Red Boxes: 0x14492C (On - 0x60, 0x00, 0x00, 0x00 | Off - 0x41, 0x82,0x00, 0x0c)


Double click the "No Recoil ON" button and put the following code:
    
byte[] norecoilon = new byte[] { 0x60, 0x00, 0x00, 0x00 };
PS3.SetMemory(0x14492C, norecoilon);

What you're doing here is declaring a byte named "norecoilon" remember that the name of the byte doesn't really matter, you can name it "34itji43tjj4" because it doesn't really matter. Then the ON bytes for No Recoil are 0x60, 0x00, 0x00, 0x00 so you're putting the bytes into hex format.
Then your setting the memory with the No Recoil address which is 0x14492C, and then beside it your putting the byte norecoilon. So lets conclude this: You've made a byte named norecoilon, that byte has the bytes in hex: 0x60, 0x00, 0x00, 0x00. Then your setting the memory to your PS3 by setting the bytes in "norecoilon" to the offset 0x14492C.

Now you do the same thing for No Recoil OFF but its different bytes. Your code for No Recoil OFF would look like:
    
byte[] norecoiloff = new byte[] { 0x41, 0x82,0x00, 0x0c };
PS3.SetMemory(0x14492C, norecoiloff);


Now you're finally finished, all you have to do now is run the .exe. You can debug it meaning if any random error occurs in the code the program will stop or run it without debugging meaning just running it straight from the .exe. To debug all you have to do is click "Start" at the top of Visual Studios or if you want to run it without debugging click the little arrow beside "Start" and it will drop down with another Start feature, click that start.
You must login or register to view this content.

Now you're finally done, to distribute your file click "Save All" (there was a pic earlier in the thread) and find the Visual Studios 2013 folder. Mine is located in my documents, once you have found it. Click on it, click "Projects" and find the folder with your tool that you've just created. You're tool will be in the debug folder. Remember if you're going to send people the tool remember to send them with the dll's. You can add a lot more non host mods or anything you would like from this offset thread:
You must login or register to view this content.

But some of the offsets like changing name and lobby settings require a bit different kind of coding as coding requires encodings and array reversing. I will be making a part 2 tutorial soon, comment what you guys would like to see.
If you guys want the download for the project we just did. You can see how everything's coded if you're getting a error.
Open Source: You must login or register to view this content.


No l-l-linux...? Sal
01-11-2016, 02:28 AM #93
noob questions but , to use a RTM tool does ps3 need to be jailbroken ? Gasp
01-11-2016, 03:02 AM #94
Blessings
Do a barrel roll!
Originally posted by SynixHD View Post
How do you add this offset into the button? 0x026C0658

What is that offset for? Change Name, Change Prestige?

Originally posted by beatboy36 View Post
noob questions but , to use a RTM tool does ps3 need to be jailbroken ? Gasp

Yes you do.
01-11-2016, 03:12 AM #95
Winter
Purple God
Originally posted by Blessings View Post
What is that offset for? Change Name, Change Prestige?


Yes you do.

it is for change name.

Originally posted by SynixHD View Post
How do you add this offset into the button? 0x026C0658

You can put it in like so;
     
PS3.Extension.WriteString(0x026C0658, "SynixHD"); //keep in mine that WriteString is for 'string'.
01-11-2016, 03:15 AM #96
Blessings
Do a barrel roll!
Originally posted by Winter View Post
it is for change name.


You can put it in like so;
     
PS3.Extension.WriteString(0x026C0658, "SynixHD"); //keep in mine that WriteString is for 'string'.


Oh.. Well you could also do it like this

    
PS3.SetMemory(0x026C0658, textBox1.Text);


Or whatever your textbox name might be.
01-11-2016, 03:48 AM #97
Winter
Purple God
Originally posted by Blessings View Post
Oh.. Well you could also do it like this

    
PS3.SetMemory(0x026C0658, textBox1.Text);


Or whatever your textbox name might be.


Now Blessings, it doesn't work like that. You see, PS3.SetMemory's prototypes are (uint, byte[]) and .Text from a normal .net textBox has no implicit method to support byte[]. That's gonna error.
01-11-2016, 03:50 AM #98
Blessings
Do a barrel roll!
Originally posted by Winter View Post
Now Blessings, it doesn't work like that. You see, PS3.SetMemory's prototypes are (uint, byte[]) and .Text from a normal .net textBox has no implicit method to support byte[]. That's gonna error.


Oh! Wrote the wrong thing, I meant to put:

    byte[] name= Encoding.ASCII.GetBytes(textBox1.Text + "\0");
PS3.SetMemory(0x026C0658, name);
01-11-2016, 06:39 AM #99
Winter
Purple God
Originally posted by Blessings View Post
Oh! Wrote the wrong thing, I meant to put:

    byte[] name= Encoding.ASCII.GetBytes(textBox1.Text + "\0");
PS3.SetMemory(0x026C0658, name);

or you could just do what I said and not be a scrub

PS3.Extension.WriteString(0x26C0658, textBox1.Text);
01-11-2016, 09:59 AM #100
SynixMods
Little One
Thank you, although I have already figured it out thank you both.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo