Jump to content

How do I actually start modding/learning how to create mods?


CrazyJakeLane

Recommended Posts

Hello API LSPDFR community. I am a wannabe Grand Theft Auto Five/LSPDFR modder, however, I do not know where to actually start my modding career/experience. I realize that there is an LSPDFR API, which I am completely clueless about, and that here is also mods for Rage Hook that work together with LSPDFR (Not dependant on LSPDFR to run) to increase the police realism (that I am also clueless about). For the beginning of my modding career, I am not sure whether or not to create (or if you guys can help/support) Rage Hook based mods or LSPDFR plugins which depend on LSPDFR to run. This however, is merely my first question to start with.

As I have no modding experience whatsoever, I am confused on how to actually start. Note that I am currently learning the basics of C# via a Crash Course that an unnamed person linked me to. I plan to do approximately twenty tutorials, and i am on my twelfth so far. I also have prior, very basic java experience, so I find that what I am learning relates very much so with C#. I realize that twenty tutorials is a very small amount to learn, however, I want to learn this much, then go into/look at examples of code/start to try to mod, then learn more C# as I progress. I'm not too sure if this is the best idea, however, I know that it has worked exceptionally well for another person. What are your thoughts on this idea? 

Now it is time for me to get into my meat and potatoes of my original question. With this much C# knowledge (little, but enough to get me started, I believe) I want to actually start learning how to mod. Whether it be learning how to control a pedestrian, tell a ped to get out a vehicle, make it run at you then spontaneously blow up. Where do I actually start to learn Grand Theft Auto Five related knowledge (Functions, how GTA works, how LSPDFR works)? I realize that this is awkwardly phrased, however, I can't seem to come up with a different wording. If you are confused about what I am trying to get across, ask me specifically below, and I will answer to you. 

I deeply appreciate the time and effort that anyone takes into helping me out, as I begin what I hope is a very long, and exciting journey. 

Link to comment
Share on other sites

There's a good C# crash course here, but that may be the one you're talking about.

If you want to look at some examples, there are a few in the RPH download. Just open the SDK folder and take a look at them. I'd also recommend taking a look at FinKone's tutorial, as he shows the basics of starting a plugin.

I can't add more as I'm in a rush right now, but I'm sure others will be able to give you more information than I have.

Link to comment
Share on other sites

I'd recommend you to get familiar with RAGE Plugin Hook documentation:

http://ragepluginhook.net/ - temporarily offline, in the "Documentation" section you'll find a complete info about how to create a working plugin from scratch and a full reference of RPH. I recommend to start with writing simple scripts which tests how different functions and entities work.

and with native functions database:

http://www.dev-c.com/nativedb/

which I find VERY important. It collects everything you can do with the game no matter what hook you use etc. Most of functions are not added and sooner or later you'll need a function which is not implemented by a hook.

With some knowledge about how a single plugin works and what kind of operation you can perform in the gameworld you can check the API examples of LSPD:FR.

Link to comment
Share on other sites

Thank you for both of your answers. LtFlash, despite Rage Hook being down, I kept a link to the documentation, and it sems to be up and running. http://docs.ragepluginhook.net/html/45b6225d-7c4d-4289-991a-93a73c1e83fb.htm

However, after looking at FinKone's tutorial, the documentation, and the dev-c link, this still doesn't really show me how to code mods. 

I'd recommend you to get familiar with RAGE Plugin Hook documentation:

http://ragepluginhook.net/ - temporarily offline, in the "Documentation" section you'll find a complete info about how to create a working plugin from scratch and a full reference of RPH. I recommend to start with writing simple scripts which tests how different functions and entities work.

and with native functions database:

http://www.dev-c.com/nativedb/

which I find VERY important. It collects everything you can do with the game no matter what hook you use etc. Most of functions are not added and sooner or later you'll need a function which is not implemented by a hook.

With some knowledge about how a single plugin works and what kind of operation you can perform in the gameworld you can check the API examples of LSPD:FR.

When you talked about, "you'll find a complete info about how to create a working plugin from scratch", were you talking about this link? http://docs.ragepluginhook.net/html/51ce7151-4a76-4b21-be90-34d114769311.htm

The reason that I ask is because the above link merely teaches a person how to set up their workspace, and not actually how to make a working plugin from scratch. Possibly with the documentation link you could show me what you meant, if you didn't mean the link above. 

There's a good C# crash course here, but that may be the one you're talking about.

If you want to look at some examples, there are a few in the RPH download. Just open the SDK folder and take a look at them. I'd also recommend taking a look at FinKone's tutorial, as he shows the basics of starting a plugin.

I can't add more as I'm in a rush right now, but I'm sure others will be able to give you more information than I have.

As for the crash course FtDLulz, yes, that is the same one that I am currently learning from. 

I appreciate all of your work trying to help me, however, I don't seem to think that this will help me create full operation mods, just by looking at other's code examples. Is there any other way to learn the Grand Theft Auto Five and Rage Hook code/functions? Is this the way that most people learn to create mods; by looking at other people's work? http://www.dev-c.com/nativedb/ I understand that this link will come in very useful, however, it still does not teach me how to use it. Is there somewhere, where I can learn to actually put the following into practise? 

Also, another side question if you do not mind. Is this ( http://www.dev-c.com/nativedb/ ) the main website that mod creators use to create their mods? 

Link to comment
Share on other sites

You need to gain a basic level of understanding of C# first. Otherwise, you won't get anywhere, and the simplest of programming concepts will confuse you.

Once you're comfortable with programming, then you'll know what it is you're looking at when you open one of the Rage documentation pages. The "how to use it" part comes with programming experience. Any programmer can look at a Software Development Kit and get a feel for how the API works.

That being said, there are a lot of useful examples in the Rage SDK to get you going. If you want to develop an LSPDFR plugin, Luke has created an excellent API example project to work from. It, along with many other examples and resources, can be found on the GitHub repository: https://github.com/LMSDev/LSPDFR-API

Programmers that are new to an SDK or API, like I was when I first started modding for GTA, do, in fact look at code examples a lot. The first step is learning the structure of the API and getting a feel for where all the classes and functions are. Then I personally looked at the examples, and started off coding a simple plugin that would simply start up and display a message...known as a Hello World program in the software development world. And it's snowballed from there...I've now got three active plugins that I've released and are improving each day.

Now that being said, I do this stuff for a living, so I'm a fairly experienced developer. But once you learn C#, start looking at the MSDN documentation, and learn how the documentation itself is structured. Guess what? The Rage docs are structured in the exact same way. That's what I meant when I said that a .NET developer can look at the API and almost immediately get a feel for where everything is. For example, when I first started, the first classes I noticed were Ped and Vehicle. Each have their own properties and functions, and both inherit the Entity class. 

For example, if you want a Ped to enter a vehicle, the Tasks property of the Ped class is where you want to look. Ped.Tasks is just an instance of the TaskInvoker class...inside TaskInvoker, you'll find functions like EnterVehicle, CruiseWithVehicle, etc.

The Object Browser in Visual Studio is very useful in helping you map out the structure of the Rage SDK. The code examples then show you what a complete plugin looks like, so you can then put your own plugin together.

None of what we're saying is going to help you just jump in and make your first mod in 15 minutes. Its impossible to do that.

When you learn to drive, you can't just hop into a Bugatti Veyron and rip around a racetrack. Or even a Honda Civic down your local streets. First you need to learn where the pedals are; where to keep your hands on the steering wheel; how to change gears, etc.

Similarly, you can't dive in head first and have your own plugin ready in half an hour.

Baby steps, my friend. Once you learn to crawl, then you can learn to get up and walk and run.

Edited by Stealth22

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

Thank you all very much for your help. I thought that there was a method of putting all of the functions etc. together, that was unique to GTA 5 and LSPDFR, however, now I know that that all just comes with programming experience. Again, thank you for your help. 

Link to comment
Share on other sites

Stealth22 has included every important aspect. When you get more practice with C# (console apps!) you'll be able to read the documentation with more consciousness.

(...) were you talking about this link? http://docs.ragepluginhook.net/html/51ce7151-4a76-4b21-be90-34d114769311.htm

The reason that I ask is because the above link merely teaches a person how to set up their workspace, and not actually how to make a working plugin from scratch. 

It is actually a working plugin, a "Hello World!" kind of plugin. It does nothing but you can go deeper and use the RHP classes to fill it with your code and create almost everything you want. In RAGE SDK pack you'll find a couple of examples how to call natives. I recommend to regularly read the RAGE forum where there were resolved many issues of using natives and many more. You might also check our GitHub repo: https://github.com/LMSDev/LSPDFR-API Don't be affraid to ask, we'll help or show a good source of knowledge. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...