Jump to content

Dirtyredz

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by Dirtyredz

  1. 1.4.0

      --Added Clock UI, Thxs  DNightmare

      --Added FactionNotifier UI

      --Added ability to delete scrapyard licenses data from the UI

      --Removed Vanilla files from zip, follow installation instructions please

     

    I am currently working on version 2.0.0 which i hope will have far better performance on the client, aswell as a some more UIs

  2. and to help clarify why your method doesnt work, your "Loading" your file into the original server.lua at which point the c engine has already parsed server.lua and did not detect any namespace, since the "Loading" of your mod is done after the fact.

     

    The namespaeing isnt true namespacing as other programming languages would have it. Whats happening is the game engine is parsing the files before their even loaded detecting the namespace, and launching the scripts in its own isolated lua engine.

     

     

  3. the best method ive found to having your own server.lua for your mod and changing as little as possible in the original file is to do this:

     

    local s, b = pcall(require, 'mods/MoveUI/scripts/server/server')
    if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function(c) a(c); b.onPlayerLogIn(c); end end else print(b); end
    

     

    As you can see this is designed to attach itself to the onPlayerLogin event, but this can be adjusted to any of the other functions.

     

    see my mod here: http://www.avorion.net/forum/index.php/topic,3834.0.html

     

    This mod uses this example.

    Here is what the mods server.lua looks like

     

    local MoveUI = {}
    
    function MoveUI.onPlayerLogIn(playerIndex)
      -- Adding script to player when they log in
      local player = Player(playerIndex)
      player:addScriptOnce("mods/MoveUI/scripts/player/MoveUI.lua")
    end
    
    return MoveUI
    

     

    as you can see I have my own onPlayerLogin event in my own server.lua file, here i can do ALOT more then just add a script without worrying about messing up the original server.lua

     

    not to mention its easy for installation, with instructions saying "Drop these two lines at the bottom of server.lua"

    thats it you dont need to worry about explaining where to put a specific line or any of that nonesense.

     

    I hope this helps.

     

     

     

  4. system (modules) are attached to the entity not the player, so you want to use:

     

    local craft = Entity()
    

     

    there are a few places inside an entity where you can call Player() particularly on client side functions like onPreRender and onInstalled to name a few

     

    In which case if you want the players craft you need to do this

     

    local craftIndex = Player().craftIndex
    

     

        local ship = Entity()
        local player = Player()
        if not player.craftIndex == ship.index then return end
    

     

  5. Feel free to contact me via my discord https://discord.gg/52YZMPt I would like to see your client logs, you shoulent be having any major issue with this mod on beta. The version im working on now for beta has minor changes/bugfixs plus a new UI

     

    Anyways Ill hopefully be releasing this new version tonight maybe tomorrow.

  6. I didnt realize you guys were spending so much time on the test/public server. I hope your using Dirty Server Manager to handle your auto restart needs. My manager has handles thousands of server crashes flawlessly restarting when a server hangs or crashes.

  7. Ive developed an autocomplete for the avorion scripting api

     

    68747470733a2f2f696d6775722e636f6d2f56696478746f4f2e676966

     

    Features

     

    Autocomplete on all objects, and thier members/properties

    Autocomplete on all enums

    Autocomplete on all callbacks

    Snippets for commenly used Avorion functions. ie: initialize

    Descriptions, Server/Client usage (Copied from documentation, will expand on my own experience later)

     

    you can see more here:

     

    https://atom.io/packages/autocomplete-avorion

     

    wanna help maintain this do a PR here:

     

    https://github.com/dirtyredz/autocomplete-avorion

     

    DONATE

     

    Wanna show your appreciation? http://dirtyredz.com/donate

     

    Become a patron: https://www.patreon.com/Dirtyredz

     

     

     

  8. Maybe split it into subforums like: (Mods WIP is for mods that are not finished and need tests)

     

    The idea isnt bad, but would mean lot of work for admins to move topics when mods stable version gets released. So it would be better not to do this imo... it would not work. Creating a new topic when mod gets stable makes all older discussions from beta version abandoned... not the nice way too i think.

     

    I agree, sticking to

     

    Mods

    Modders resources

    Modding questions

     

    would be best

  9. I would imagine a mod like Carrier commands could benefit from this as you currently have to exit/enter the ship for commands to appear and this seems to correct that issue :)

     

    Exactly what those mod is best at,  any mod that has a menu/interface has to be attsched to the players ship. For example carrier commands, sector overview to name a few.

     

    That is why this mod is primarily a modders resource.

  10. ShipScriptLoader

     

    A small mod designed to automatically load a script onto the players ship, regardless of if they change ships or not.

    The script will always be loaded.

     

    This mod will be extremly usefull to other modders and server owners.

     

    INSTALLATION


     

    Step 1.

    Unzip the zip file and drag/drop the contents into the avorion directory.

     

    Step 2.

    Navigate to:

       

    data/scripts/server/server.lua

     

    and place these 2 lines of code at the bottom of the file:

     

       

        local s, b = pcall(require, 'mods/ShipScriptLoader/scripts/server/server')
        if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function(c) a(c); b.onPlayerLogIn(c); end end end
        

     

    Step 3.

    Navigate to:

       

    mods/ShipScriptLoader/config/ShipScriptLoader.lua

     

    and add the script path of the script you want to autoload using the Config.Add() function

     

    DOWNLOAD


    ShipScriptLoader v1.1.0

     

    ShipScriptLoader v1.0.0

     

     

    GITHUB


    https://github.com/dirtyredz/ShipScriptLoader

     

     

    DONATE


    Wanna show your appreciation?

    http://dirtyredz.com/donate

     

    Become a patron:

    https://www.patreon.com/Dirtyredz

     

    MY OTHER MODS


     

     

    DSM

    -A project dedicated to server deployment, management, and exposing features to a web interface.

    http://www.avorion.net/forum/index.php/topic,3507.0.html

     

    Reganerative Asteroid Fields

    -Regenerates designated sectors, and randomly appearing sectors, of minable asteroids.

    http://www.avorion.net/forum/index.php/topic,3055.0.html

     

    MoveUI

    -A mod for adding custom UIs to the screen.

    http://www.avorion.net/forum/index.php/topic,3834.0.html

     

    Subspace Corridor

    -A modders recources, designed to mimick /teleport, due to server commands not being available through the api.

    http://www.avorion.net/forum/index.php/topic,3148.0.html

     

    Dirty Buoy's

    -Allows players to spawn Navigational and Sentry Buoys, More to come soon.

    -These buoys have unique features players cant get in normal game play, for example: Navigational buoys are invincible and cannot be moved. A great way to mark a distance wreckage or minarable rich asteroid field.

    --Rusty Servers only at the moment.

     

    LogLevels

    -LogLevels gives modders the ability to set levels for there print functions.

    -Aswell as allowing server owners to clean up there consoles, making it easier to read.

    http://www.avorion.net/forum/index.php/topic,3799.0.html

     

    NoNeutralCore

    -A small script for stopping the creation of neutral zones inside the core.

    http://www.avorion.net/forum/index.php/topic,3472.0.html

     

    DirtyCargoExtender

    -Extends the cargo hold of any NPC station discovered with low cargo holds.

    --Patreon Members only

     

    DirtySecure

    -A mod which assigned PVP or PVE sectors based on distance from core.

    -Provides Offline Protection to Players ships.

    -Provides protection for NPC stations.

    --Rusty Servers only at the moment

     

    Reganerative Claimable Asteroids

    -A mod which respawns claimable asteroids, when theyve been moved or turned into a mine.

    -Also will unclaim or unsell an asteroid after a configured number of days

    -Keeps the galaxy alive, providing claimable asteroids for new players.

    --Rusty Servers only at the moment

     

    Death Info

    -Used to track cords of a players death point, assigning player values, for other mods to use.

    --Rusty Servers only at the moment.

     

    /Back

    -A command using DeathInfo and Subspace Corridor, to teleport a players drone BACK to there death point.

    --Rusty Servers only at the moment.

     

    DistCore HUD

    -Displays distance to the core on the players hud

    --Rusty Servers only at the moment.

     

    Any mod listed as Rusty Servers only, are live and active on the Rusty Servers.

    Want the mod for your server? Lets talk and ill see about releasing the mod to you/public.

    Not all mods on Rusty will remain there, they will eventually be released to the public.

     

     

     

  11. yeah the project still has a long way to go, but im working on it. Trying to get more features into it.

     

    About your mod loader tbh im not that excited about it, Could you give me some kind of preview?

    Alot of the modders for avorion talk here on my discord: https://discord.gg/fbW2kB

     

    We have put alot of work into molding the modding community here to a set of standards, and even still its still evolving.

    We all would be curious to learn more and help mold the project.

×
×
  • Create New...