Modding Help Forcing a mod through the server

Discussion in 'Starbound Modding' started by Opalium, Dec 11, 2017.

  1. Opalium

    Opalium Pangalactic Porcupine

    Hey there. Long time no see. :nuruwink:

    I have a question regarding my first mod attempt. I may be completely off (literally my first attempt) so please bear with me.

    I created a very simple Lua mod that freezes the player's hunger when they are not on a terrestrial world. It's a really simple Lua script, all it does is check if world.terrestrial() is false, and if so lock the food resource.

    This is how my mod structure looks so far:
    [​IMG]

    player.config.patch:
    Code:
    [
        // Run the hunger script
        {
            "op" : "add",
            "path" : "/statusControllerSettings/primaryScriptSources/-",
            "value" : "/hunger.lua"
        }
    ]
    pak.modinfo:
    Code:
    {
        "name" : "No Hunger On Ship",
        "version" : "Whatever it is right now",
        "path" : ".",
        "dependencies" : [],
        "metadata" : {
            "author" : "Opalium",
            "version" : "0.1",
            "description" : "Disables hunger changes when a player is on their ship."
        }
    }
    Now, for my question:
    I want this mod to run on my dedicated Starbound server, and have its effect automatically applied to every player who connects to my server.
    How would I go about doing that? Would simply adding the mod to the mods folder in the server be enough? Or is it not so simple? Am I even approaching this correctly?

    Thank you, and have a pleasant day.
    ~Opalium
     
  2. lazarus78

    lazarus78 The Waste of Time

    A mod like this would need to be on every person's computer in order to work.. There is no current way to automatically have mods downloaded to whoever connects.
     
  3. Opalium

    Opalium Pangalactic Porcupine

    Ah, I see. That's unfortunate.
    However, I wonder: is hunger handling done server side? I mean, it doesn't seem reasonable that every client can control his values at will, right? (that's easy cheating)
    And if so, wouldn't running such a script on the server, that'll lock that value for every player, will be enough? Without the player having said script on their client?
     
  4. lazarus78

    lazarus78 The Waste of Time

    Hunger is per player, because you can mix characters of different difficulty modes together, so it would have to be controlled client side.
     

Share This Page