Creating an RTM ('RTE Tool'.)

Freezee

Veteran
Messages
180
Reaction score
226
Points
848
Note: I ported this tutorial over from another site, Yes, I did create this Thread on NGU, I didn't steal it. But I will re-upload it here, I fixed them up some when porting over.

I'll post the other tutorial later today/tomorrow, feeling kind of lazy.

Creating an Real Time Modding Tool, the basics. (#1).
Introduction


Hello, I wrote this tutorial for everyone that wants to learn how to make a Real Time (Modding/Editing) Tool in C#.

This tutorial will explain (almost) everything, It does have code snippets, But explanations also.


Getting Ready!


Firstly, You want to open up your Visual Studio(I use 2012.) "IDE". For those who don't know what IDE stands for/means, It stands for "Integrated Development Environment". Usually a Source Code Editor, Compiler, Debugger and other features.

Secondly. In your Visual Studio IDE. Go to the very top left click File > New Project. It (should) look like this.

572059a4895f630b99915e8cc8e28b04.png

If the above does not look like so. Go to File > New Project. On the left side click Installed > Templates > Visual C#.

Note: I am using Visual Studio 2012, The above Image MAY be different.

After you successfully do that, you will be greeted with a Simple White Form.
acdfd045ddde113b0730e370a0087a80.png

You can design the Form your way by using the "Properties" Section"
dd1f41dc5ab5b9eaab572c0456dcc31b.png



Adding CCAPI and PS3Lib .dlls
.dll stands for Dynamic Link Library!



On your Visual Studio IDE, Go to the top right and click Project > Add Reference. Go to the directory your PS3Lib.dll is in.

In order to add CCAPI.dll, You need to go to your Visual Studio Project Directory, By default mine is "C:/Users/Username/Documents/Visual Studio 2012/Projects/ProjectName/bin/debug" this could be different for you.

Your CCAPI.dll would go in your projects "bin/debug" folder.

Go back to Visual Studio, Go to "Form1.cs < This is the default name, Your Form may be different" Go to the top and add a "using" statement, put "using PS3Lib;" After you have done so.

You want to define a PS3 API, So between "public partial class Form1 : Form" You want to define it like so "PS3API YourAPIName = new PS3API();".

Now you can hit "Start" and build the program!




Adding Connect/Attach Buttons and Modifications.

We firstly want to start with a Connect and Attach Button.

Obviously, We can use a number of Toolbox Objects to make a CCAPI or TMAPI Connection. A few include: Button, Check-Box(s), Radio-Button(s) and so on.

Since this is a CEX RTE Tool, We will use a Button (You can use Radio-Button(s) if you are making a Control Console API/Target Manager API Tool.

After you drag the item(s) to your Form. You can name the Item(s) Design Name If you truly want. Design Name is the Name of your Object. If you named it "IAmObject" and you clicked it, It would bring up the IAmObject_Click Event. Although this is NOT necessary, I just do it because It makes things easier too remember.

Now you can click on your "CCAPI" Object (or whatever you called it), Now you would want to have it "Change" the API to Control Console or Target Manager.

Changing the API to CCAPI.
Code:
YourAPIName.ChangeAPI(SelectAPI.ControlConsole);

Changing the API to TMAPI.
Code:
YourAPIName.ChangeAPI(SelectAPI.TargetManager);.

Now create an Object ("Item") called Connect (You can name it anything you want), If you have already made it just click it and add the following.

Code:
Note: I recommend you use a(n) if/else statement (more information below).[/SIZE][/COLOR][/CENTER]
[COLOR=#B22222][SIZE=3]
[CENTER]
if (YourAPIName.ConnectTarget(0))
{
      MessageBox.Show("Input Message-box Message here", "Input Message-box Title here");
      //Note, you can always change it, using things like YourAPIName.RingBuzzer etc..
}
else
{
      MessageBox.Show("Input Message-box Message here", "Input Message-box Title here");
      }
}


There is a number of things you could do IF you wanted to make sure the User has Connected. This is pretty self explanatory, I won't go into any detail.

Now before we can start Adding Modifications, We need to make an "Attach" Button. What It does is let you "Connect" to your game process. And after you create/click your "Attach" Button, You can add the following code.

Code:
if (YourAPIName.AttachProcess())[/SIZE][/COLOR][/CENTER]
[COLOR=#B22222][SIZE=3]
[CENTER]{
      MessageBox.Show("Input Message-box Message here", "Input Message-box Title here");
}
else
{
      MessageBox.Show("Input Message-box Message here", "Input Message-box Title here");
      }
}


That's It!



Adding Modifications!

Now we can start adding our Modifications. I will choose the game MW3 for Example.

I will just add a "Advanced UAV" Function for the sake of this tutorial.

Firstly, add a "Check-box" Object onto the Form so we can enable and disable this Modification.

Now click on the Check-box and write the following.

Code:
We are going to use an if/else statement for this Modification so we can enable or disable it.[/SIZE][/COLOR][/CENTER]
[COLOR=#B22222][SIZE=3][CENTER]
if (YourCheckboxName.Checked) //If your Check-box is clicked 'checked' do the following
{
      Byte[] advanceduavon = new Byte[] { 02 };
      YourAPIName.SetMemory(0x5F067, advanceduavon);
}
else // If Check-box was unchecked then do the following
{
      Byte[] advanceduavoff = new Byte[] { 0x01 };
      YourAPIName.SetMemory(0x5F067, advanceduavoff);
      }
}


That's It!, The Definitions and Links down below.

You can load MW3, Connect & Attach. Then enable the Modification and It will work!




Miscellaneous Stuff!

Help!


Q: Where do I find "CCAPI and PS3Lib.dll"?
A: Search the Internet for them.

Q: What is "PS3API"
A: PS3API defines an API which will let you interact with your PS3 and Let you do things like making it beep, letting you change the memory and other things.

Q:A What is an if/else statement?
A: Basically what it says. For example. Lets say you have a button on your form. Name it Hello, Click on it. Write something like.
Code:
if (button1.Text == "Hello") //If buttons text name = hello.
{
      button1.Text = "World!"; //Then change the text name to world.
}
else // If button text does not equal Hello
{
       button1.Text = "Bye!"; //Change the text to Bye!
      }
}


Definitions!
Definition: "using PS3Lib"

Answer: "Using" Statements provide a way to access various parts of the .NET Framework (or other .dlls) that you might use in your program.
 
Last edited:

Freezee

Veteran
Messages
180
Reaction score
226
Points
848
Question what if were doing this for an Xbox Program?
I haven't done any of this stuff for XBOX because I don't have one, It should work somewhat the same, but you need too find other libraries since CCAPI and TMAPI only work for PS3, just search for Modding Libraries on XBOX 360.
 

Freezee

Veteran
Messages
180
Reaction score
226
Points
848
da --- d1d u jus7 s8 m9? u ju$t ------ up r33334444l b44444444d, g3t 420 n0sc0p3d fgt
 
Last edited by a moderator:
Top