Mega's SMModLoader

    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    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.
     
    Last edited:
    • Like
    Reactions: JimmyJamba
    Joined
    Jul 6, 2013
    Messages
    48
    Reaction score
    7
    • Purchased!
    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.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    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.
    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.
     
    Joined
    Feb 23, 2014
    Messages
    26
    Reaction score
    15
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Hm, I would like start some kind of server mod, but without making own custom commands is not possible now. :-(
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Hm, I would like start some kind of server mod, but without making own custom commands is not possible now. :-(
    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.
     
    Joined
    Feb 23, 2014
    Messages
    26
    Reaction score
    15
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Yeah, I am using grawypods starmadewrapper now, but if there is yours modloader, will be better use mod interface in the starmade instead.
     
    Joined
    Jul 6, 2013
    Messages
    48
    Reaction score
    7
    • Purchased!
    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?
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    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?
    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.