Beginner programing mods

Discussion in 'Programming' started by CrazySnaipăr, Dec 27, 2021.

  1. CrazySnaipăr

    CrazySnaipăr
    Expand Collapse

    Joined:
    Dec 27, 2021
    Messages:
    3
    Hello everybody,
    I would like to start modding but i have a rough time starting, I am not interested in making new vehicles, but curious to add behaviours and systems but i couldn't find any tutorial available, i saw we have kinda like a game engine(i thing it is level editor) in game but i don't think i can add scripts to add or remove various parts from a vehicle for example or to simulate a air compressor by modifying the tire pressure. If someone has any tutorial available or is kind to help I really want to start modding.
     
  2. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    Hi and welcome to the forums :)
    Modding this game is not easy. And everyone has their own certain wishes of what to bring in-game. So it's hard to find detailed tutorials on specified subjects. If you have little or no experience I would suggest to start small, make little changes and work your way up. Tutorials on LUA or other programming languages for the game are very sparse (like if you want to simulate stuff like an air comp :) ) , even tutorials in general are, but there are some and you can learn a lot from questions asked and answered on the forums too.

    Hope this helps and hesitate not to ask more questions if needed.
     
    • Agree Agree x 1
  3. lellolillili

    lellolillili
    Expand Collapse

    Joined:
    Nov 29, 2021
    Messages:
    128
    Hi,

    I was in the same boat as you a few weeks ago. Here's what I did

    1) read the lua documentation if you don't know lua

    2) as already suggested, start small and pick something you want to do

    3) skim the code (the .lua files). Depending on what you want to do, you're going to have to learn different files. If you're interested in the game engine, the following files are really important

    utils.lua (important regardless actually)
    main.lua
    extensions.lua
    scenarios.lua
    waypoints.lua

    4) in the console, use the dump command a lot to see the content of the various tables that the game uses

    5) Search the whole lua library for keywords and code snippets to see how the various functions are used (e.g., 'grep' if you're on Linux)

    6) figure out how the hooks work, like onPreloader(), onScenarioLoaded() etc etc.

    7) ask specific questions. I PMd a mod author with a list of really specific questions, and not only they replied in a very detailed manner, but they taught me a lot of stuff
     
    • Like Like x 1
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice