Learning to mod

Discussion in 'Rust Development' started by Flaymar, Oct 26, 2015.

  1. Hello all,

    To start. My current coding ability is limited to VBA which ive been doing for a few years now. Mainly exel and access code.

    I want to get into making mods for rust. Can anyone point out a few resources and/or guides to see if its within my grasp to pursue this path.

    Thanks.
     
  2. Thanks, thats a good place to start.
     
  3. Easiest way is to read the source code of existing plugins and make sense of it.
     
  4. I recommend reading at least about the basics before looking at other plugins.
     
  5. do we need to understand Unity and its API? like where do I find info on SendReply(arg, ""); ?
     
  6. SendReply can be found in several plugins and I think it comes from Oxide.
     
  7. I am about to install the oxide/rust bits on my machine so I can get the references in VS2015. problem is the docs on oxide do not seem to have a pure api reference that list all APIs like SendReply. or maybe I am just getting blind!
    [DOUBLEPOST=1446325555][/DOUBLEPOST]so until Wulf fix his healcurefeed mod or you add console commands for healall or heal player. I am working on my own mod RATHealer (Rust Admin Tools - Healer) :)
     
  8. Wulf

    Wulf Community Admin

    Oxide is open-source, so you can see everything available there. You can also use IntelliSense if you have a proper setup in Visual Studio.
     
  9. where do I get a list of properties for ConsoleSystem?

    thanks
     
  10. Wulf

    Wulf Community Admin

    You can find them using a decompiler such as JustDecompile and the Assembly-CSharp.dll.
     
  11. surely someone must have a list of all the player attributes?
    example:
    targetPlayer.metabolism.hydration.value =
    targetPlayer.metabolism.calories.value =
    targetPlayer.InitializeHealth(100, 100);

    targetPlayer.metabolism.poison.value = 0
    targetPlayer.metabolism.radiation.value = 0
    targetPlayer.metabolism.oxygen.value = 1
    targetPlayer.metabolism.bleeding.value = 0
    targetPlayer.metabolism.wetness.value = 0
    targetPlayer.metabolism.dirtyness.value
    is there one that does everything like (feed/cure/heal/stop bleeds, etc.) or do I have to set each one?
     
  12. Wulf

    Wulf Community Admin

    You can find them in the DLL, just search using the decompiler for "metabolism". You have to set each one that you want to change.
     
  13. I figured by now someone would have already documented all of these :)

    instead of decompiling, can't I just include the DLLs in my VS2015 and see the properties?
    [DOUBLEPOST=1446352212][/DOUBLEPOST]Question (C#): from my mod (console command) how do I send a broadcast message to everyone? like "Console: You have all been healed."
    Puts, etc. see to only write to the console.

    thanks
     
  14. Wulf

    Wulf Community Admin

    They are documented, but they may not be 100% updated. I have my plugin semi-updated locally, just not to the point of release.

    For broadcasting, I'd recommend looking at the API docs, it tells you how. ;)
     
  15. ok I uploaded my first mod last night. RATHealer (Rust Admin Tool - Healer). at this time it only does Console based single player heal and heal all, including cure/feed/heal/etc.

    it is C# and I think there is an error with handling blanks. it was working fine where it returned an example but now it just generates an error, strange.

    Comments and suggestions are welcome! I have not written code in years! :)
     
  16. ive been getting closer to understanding modding. Was able to fix the TwigDecay addon that wasn't decaying external high walls which is my only achievement to date lol.

    Im getting there, thanks for all the info guys, its defiantly got me going in the right direction.