You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
982 B

  1. ---
  2. uid: articles.start.dev
  3. title: Making your own mod
  4. ---
  5. # Making a mod
  6. ## Overview
  7. What follows is a *very* barebones, and frankly not very useful plugin class, even as a starting point,
  8. but it should be enough to give a decent idea of how to do quick upgrades of existing mods for those who want to.
  9. [!code-cs[Plugin.cs](./dev-resources/Plugin.cs?range=1-3,6-8,12-16,29-37,39,44-45,46-49,54-57,59-)]
  10. There are basically 4 major concepts here:
  11. 1. <xref:IPA.Logging.Logger>, the logging system.
  12. 2. <xref:IPA.PluginAttribute>, which declares that this class is a plugin and how it should behave.
  13. 3. <xref:IPA.InitAttribute>, which declares the constructor (and optionally other methods) as being
  14. used for initialization.
  15. 4. The lifecycle event attributes <xref:IPA.OnStartAttribute> and <xref:IPA.OnExitAttribute>.
  16. Read the docs at those links for a better idea of what they do.
  17. TODO: expand this to explain more, and expand on the base example