1. We've removed some functionality from SMD in preparation for a migration to new forum software. We expect to make the move before August.

    Mega's SMModLoader

    Discussion in 'Releases' started by Megacrafter127, Oct 30, 2014.

    1. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      http://starmadedock.net/content/megas-smmodloader.1597/
      A plain and simple modloader.
      Please keep in mind SM will feature an integrated modloader, and it won't work similar to this one. This is nothing more than a temporary bridge made of air.

      Loads mods placed in a certain folder within the StarMade folder.
      It is very plain and doesn't do much, since the modding API is going to be a part of StarMade itself.

      How to install:
      1. Download the jar
      2. Run the jar and follow the given instructions
      Similar to a normal Java program. All this modloader does is call the main(String[]) method of the main class specified in the mod's jar's manifest. The mod will have to register itself at
      Code:
      org.schema.game.common.Starter.modManager

      Mods are to be placed in the SMMods folder in the StarMade folder. If the folder does not exist, make it.
       
      #1 Megacrafter127, Oct 30, 2014
      Last edited: Oct 31, 2014
      • Like Like x 1
    2. Draeke_Forther

      Joined:
      Jul 6, 2013
      Messages:
      48
      Thanks for making this, it provides a nice entry point so that you don't need to mess around with replacing class files. At least at first.
       
      • Friendly Friendly x 1
    3. HunterzCZ

      Joined:
      Feb 23, 2014
      Messages:
      26
      Is there any Tutorial "Hello world" mod?
       
    4. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      Not really.
      However, there is a documentation on some parts of the StarMade.jar if that's what you're asking for.
      (Please be aware, that parts of it may be outdated by now)
       
      #4 Megacrafter127, Apr 30, 2015
      Last edited: Apr 30, 2015
    5. HunterzCZ

      Joined:
      Feb 23, 2014
      Messages:
      26
      Thanks, I am trying learn from yours disableentities mod. Looks like I can make for example Player Listener, but cannot find howto catch when player use command or write to chat.
       
    6. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      There is no hook for that yet, I believe. Also, the disabled-entities mod ended up not working properly for some reason, and I put it in halt.
       
    7. HunterzCZ

      Joined:
      Feb 23, 2014
      Messages:
      26
      Hm, I would like start some kind of server mod, but without making own custom commands is not possible now. :-(
       
      • Agree Agree x 1
    8. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      However, you can catch the STDout, and interpret that, and then you can do stuff with it, that a normal script simply can't do.
       
    9. HunterzCZ

      Joined:
      Feb 23, 2014
      Messages:
      26
      Yeah, I am using grawypods starmadewrapper now, but if there is yours modloader, will be better use mod interface in the starmade instead.
       
    10. astronouth7303

      Joined:
      Jun 23, 2013
      Messages:
      24
      Any chance of releasing the source on this?
       
    11. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      If I still have it some where on one of my HDDs, I might release it, although it is nothing big, and probably ugly.
       
    12. Draeke_Forther

      Joined:
      Jul 6, 2013
      Messages:
      48
      The source code for this project isn't that important if I recall. Doesn't it just load all of the classes from the mods folder into the runtime?
       
    13. Megacrafter127

      Joined:
      Jul 21, 2013
      Messages:
      2,934
      Yup, that is all it does. Apart from also running a method specified in the manifest.mf of each mod-jar, but that's nothing, really.
       
    Loading...