Log in to reply
 

Learning C# For scripts mod. Where to start?



  • I've been looking some tutorials on youtube and using this 'sololearn' app.
    But i still doesn't understand the basics of C#

    Any suggestion or help. Would be much appreciated.



  • C#. C++ is easy but C#



  • @AHK1221 What about C# is it hard to learn or what?

    Also where do i start to learn it i suppose?



  • Hmmm.

    Use C# with Microsoft Visual Studio (Community). You'll be getting all the IDE help you didn't know you wanted, there'll be no pointer shit to worry about and there are some nice libraries out there (especially for GTA V, like NativeUI and of course ScriptHookVDotNet itself!).

    To get started with these languages you can probably use any resource to get you going. Take no shame in searching a lot, since there are plenty of people who have wondered the same thing, and probably got good answers too. An important aspect of these languages (and more so in C#) is Object-Oriented programming. You might want to look up what this means and which concepts are connected to it.

    HTML is a whole other thing, which is just a markup language. It hasn't got anything to do with programming.

    On what resource you want to use - none! Although I'm sure there are good resources, they generally end up in you just typing over what's said, executing it, trying to understand the explanations and then skip forward, while forgetting what you just did. The best way to get started is just to get started. Pick a project (a simple mod for yourself perhaps?), download an IDE (VS 2017 Community since we're dealing with GTA V + C#), and get going!



  • Hmm. I have an idea, let me get back to the people that I am working with right now.



  • @ikt Thanks for the info, i really appreciate it.

    Also Can you define the 'pick a project'?
    Maybe like editing someone else 'open source' code?
    I already got Visual studio enterprise trial. And the visual community.



  • @VancityD I think he meant to decide what to make as a project.



  • @VancityD
    No, just start out with something entirely of your own. Like something simple you think the game could be lacking, or something you just want to try to make that's not too hard.

    You don't need an "Enterprise" VS, Community will do as well. There's not much difference in normal use. Nothing wrong with it though, but don't let the IDE/trial be a deterrent or feel as a deadline ;)

    Looking and using open sourced mods is fine as well, but do try to understand what the parts you use actually do. Also mind the license, but I don't think anybody in the community who released their sources gives a rats ass about legality and stuff.



  • @ikt Sorry but seriously, i still doesn't understand.
    I read a tutorial on the forums, and the requirements is intermediate knowledge of C#. The question is how to find that 'Knowledge' or where to start.



  • @VancityD Well, you can look up tutorials of C# if you have 0 experience with the language. There are a lot of good ones out there.





  • @Rarefacer Well, i don't think i suppose to start scripting in GTA 5. Yet.
    I Need to learn C# First. Any video recommendations?



  • @VancityD Is not problem if you don't know how to do scripting in C#, in the videos explain the required knowledge related to GTA V and is usefull.

    Personally, I think, the best, fast and funny way to learn C# is developing games in a game engine with that language support, like Unity 3D.
    Is well documented, exists lot of tutorial and examples and you can learn all things related in the creation of video games to understand a game like GTA V to create new contents.



  • @Rarefacer I still doesn't understand. i mean, like i already watched the video(s) and yeah it works on mygame.
    But i suppose i should create another script like 'chokehold/grab peds'.
    or Drag corpses
    But i don't know how.



  • @VancityD The scripting is a creative art, to understand how to tell to machine an order, is necessary to know wich pre-orders have the machine. I mean, the called Native Functions.
    They are instructions in the game and each event in the game is managed/controlled by one native function. This is the List of Native Functions discovered in GTA V.

    To explain the usage in a simple way: Each function has parameters to fill and mixing functions you can create desired behaviors in game. To understand this, you need to look how in the videos the modder takes native functions from the game and mix them to obtain desired results.

    To create a grab peds, you need to use one function called ATTACH_ENTITY_TO_ENTITY (in the Native database in the link, exists info about how to fill the parameters).

    Is just necessary understand the structure of a C# script (see tutorials about starting from scratch in C#) and you can be able to understand the GTA V script structure.



  • @Rarefacer said in Learning C++ or C# For scripts mod. Where to start?:

    @VancityD The scripting is a creative art, to understand how to tell to machine an order, is necessary to know wich pre-orders have the machine. I mean, the called Native Functions.
    They are instructions in the game and each event in the game is managed/controlled by one native function. This is the List of Native Functions discovered in GTA V.

    To explain the usage in a simple way: Each function has parameters to fill and mixing functions you can create desired behaviors in game. To understand this, you need to look how in the videos the modder takes native functions from the game and mix them to obtain desired results.

    To create a grab peds, you need to use one function called ATTACH_ENTITY_TO_ENTITY (in the Native database in the link, exists info about how to fill the parameters).

    Is just necessary understand the structure of a C# script (see tutorials about starting from scratch in C#) and you can be able to understand the GTA V script structure.

    Thank you for your response. I'm going to Learn C# first then.


  • TRANSLATOR

    @Rarefacer said in Learning C++ or C# For scripts mod. Where to start?:

    @VancityD

    I started with the tutorials from this guy, and without knowing C#. Maybe not the best idea, but I learned some stuff working directly on GTA V scripting. Start with simple ideas and then keep them growing up. You can also search some source code around, read it, improve it or change stuff on there...



  • @EnforcerZhukov said in Learning C++ or C# For scripts mod. Where to start?:

    @Rarefacer said in Learning C++ or C# For scripts mod. Where to start?:

    @VancityD

    Start with simple ideas and then keep them growing up. You can also search some source code around, read it, improve it or change stuff on there...

    I already did the 'idea'. But it's not working, since i have zero knowledge in C#.
    So i'm kinda dead end.



  • @VancityD I learned the same way as @EnforcerZhukov, and I also looked at basic C# tutorials to learn the syntax, best practices, and whatnot. It also really helps to look at source code; when starting out I learned a lot by looking at @Eddlm's pastebin.



  • @VancityD said in Learning C++ or C# For scripts mod. Where to start?:

    @EnforcerZhukov said in Learning C++ or C# For scripts mod. Where to start?:

    @Rarefacer said in Learning C++ or C# For scripts mod. Where to start?:

    @VancityD

    Start with simple ideas and then keep them growing up. You can also search some source code around, read it, improve it or change stuff on there...

    I already did the 'idea'. But it's not working, since i have zero knowledge in C#.
    So i'm kinda dead end.

    I learned the same way as @stillhere and @EnforcerZhukov :P , I also started following that tutorial with 0 C# knowedge, so its a pretty good start.

    I also, like @EnforcerZhukov , started learning directly by coding for GTA V, no beginner projects before that.

    I might be able to help you get started, once you have the basics you'll get everything you need to start coding your own stuff, GTA V is somewhat well documented by now.

    @stillhere is right, looking up sourcecodes is very important, helps you understand how certain things can be done, you also learn by literal examples how scripts are coded for this game. Very useful, they are.



  • @Eddlm said in Learning C# For scripts mod. Where to start?:

    @VancityD said in Learning C++ or C# For scripts mod. Where to start?:

    @EnforcerZhukov said in Learning C++ or C# For scripts mod. Where to start?:

    @Rarefacer said in Learning C++ or C# For scripts mod. Where to start?:

    @VancityD

    Start with simple ideas and then keep them growing up. You can also search some source code around, read it, improve it or change stuff on there...

    I already did the 'idea'. But it's not working, since i have zero knowledge in C#.
    So i'm kinda dead end.

    I learned the same way as @stillhere and @EnforcerZhukov :P , I also started following that tutorial with 0 C# knowedge, so its a pretty good start.

    I also, like @EnforcerZhukov , started learning directly by coding for GTA V, no beginner projects before that.

    I might be able to help you get started, once you have the basics you'll get everything you need to start coding your own stuff, GTA V is somewhat well documented by now.

    @stillhere is right, looking up sourcecodes is very important, helps you understand how certain things can be done, you also learn by literal examples how scripts are coded for this game. Very useful, they are.

    Thanks for the suggestions guys. I'll do my best to learn



  • @stillhere said in Learning C# For scripts mod. Where to start?:

    @VancityD I learned the same way as @EnforcerZhukov, and I also looked at basic C# tutorials to learn the syntax, best practices, and whatnot. It also really helps to look at source code; when starting out I learned a lot by looking at @Eddlm's pastebin.

    Also can i look into your 'Captain America' Source Code Via PM?
    I'm trying to make grab&throw peds but it doesn't work.
    The only simple script that i done it before, is spawn shark with desired key (E)


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.