Jump to content

Dirtyredz

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by Dirtyredz

  1. LogLevels

     

    UyQU5y2.png


    This mod is designed for Modders and Server owners.

     

    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.

     

    Weve been using this mod for several months now on the Rusty Servers, and im starting to see modders implement there own versions of log levels inside thier own scripts.

     

    However these methods are not very clean, and easily used accross multiple mods/files

     

    That is why I have decided to release this mod to the public.

     

    YP4RuRg.png


     

    As you can see LogLevels has many features.

     

    Let me show you how you can start useing LogLevels in your mod or server today!

     

    SETUP


    There are two ways of using LogLevels, Basic and Advanced.

     

    Basic Usage:

    Open any file you wish to silent output from, say a mod you have installed.

    once open, drag and drop these couple of lines at the top of the file:

     

       

        --LogLevels - Dirtyredz|David McClain
        package.path = package.path .. ";mods/LogLevels/scripts/lib/?.lua"
        require("PrintLog")
        

     

    This will give Every print function in the file a standard level of INFO.

    Then from console or ingame, set the consolelevel with the command:

     

       

        /consolelevel warning
        

     

    as WARN is lower then INFO, anything in that file is now silenced in the console, but still being printed to the server log.

     

    Advanced Usage:

    Open any file you wish to silent output from, say a mod you have installed.

    once open, drag and drop these couple of lines at the top of the file:

     

       

        --LogLevels - Dirtyredz|David McClain
        package.path = package.path .. ";mods/LogLevels/scripts/lib/?.lua"
        require("PrintLog")
        local logLevels = require("LogLevels")
        

     

    This will give Every print function in the file a standard level of INFO, and give you access to the loglevels table.

    Now its time to specify what level you want each print function to be at, hers an example:

     

       

        function initialize()
          print('MOD initialize', logLevels.trace)
          local X = 10
          if X >= 10 then
            print('All good, no problems here.', logLevels.debug)
          else
            --Loglevel supports standard print arguments
            print('Weve got an issue, X is:',X, logLevels.warning)
          end
        end
        

     

    Thats it, now we set the level we wish to display

    Then from console or ingame, set the consolelevel with the command:

     

       

        /consolelevel trace
        

     

    Will display every print in the example above

    while:

     

       

        /consolelevel warning
        

     

    will only display prints with warning and below.

     

    Thats it, your now using LogLevels giving you a clean and easy to read console.

     

     

    DEFAULTS


     

    Here are the default LogLevels (can be configured to what you want)

     

    off

     

    fatal

     

    error

     

    warning

     

    info

     

    debug

     

    trace

     

    all

     

     

    Downloads


    LogLevels v1.1.0

     

     

     

     

    Changelog


    1.1.0

      -Inserting Level type infront of message instead on concatenate, fixs erros when printing nil variables.

      -introduced new command /consolelevel, now when wanting to adjust whats shown on the console, use /consolelevel

    /loglevel will now restrict whats printed to the log in the case the console message is not printed

     

    ie:

     

    /consolelevel warning

    /loglevel debug

     

    the console will only show console messages warning,error,fatel

    and the serverLog will show debug,info,warning,error,fatel

     

    note:

    setting the /loglvel lower then /consolelevel, will have no effect since all console messages are automatically sent to the server log (this cannot be changed)

     

    1.0.1

      -Moved files to a new directory, in preperation for steam support of mods.

     

     

    GITHUB


    https://github.com/dirtyredz/LogLevels

     

     

    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.

     

     

     

  2. Releasing Version 1.2.2

    fixed Player data retrieval script, was not getting all players
    fixed Alliance data retrieval script, was not getting all alliances
    added 3 options to the install script, StopWait,SaveWait, and StopDelay, that was previously missed in last update
    player,alliance, and group scripts now use variables passed by the manager script
    **update_manager now uses the same script for editing configs via web interface, the script will re add any missing comments and any missing options to the configs
    Restart command now displays a message between stopping and Starting
    removed password lockout on server config editor. (until I settup password protection on installation)
    Added DeletePlayer button in console.(server needs to be offline)
    Added -v option to start-web script, will output more information when failing to start webserver
    Fixed bug when using the -d and -b options "DynamichEcho not found"
    **Note:
    when you update to this version, youll still be using the old Update_manager script, the updated script wont take effect until the next update for you.

    MAKE SURE YOU REVIEW BOTH manager-config.ini and PHPConfig.ini, and remove any leading + symbols, this patch fixs this issue, so future updates will no longer make your configs look like shit.

     

    Im expecting another DSM within a few days, as Avorion has announced an upcoming patch to the game, which will include RCON interface.

     

    Using RCON I can have a more reliable commands interaction with the console,

    Accurate number of online players on the home screen,

    less dependancy on a specific apache module.

     

    Avorion hasnt released anything more as to whats in the update, as soon as it comes out I will be working on it. So I can push another DSM update ASAP.

  3. Meant to post this earlier sry:

     

        -- create station
        --[[local desc = StationDescriptor()
        desc.factionIndex = asteroid.factionIndex
        desc:setPlan(plan)
        desc.position = asteroid.position
        desc:addScript("data/scripts/entity/crewboard.lua")
        desc.name = ship.name
    
        ship.name = ""
    
        local station = Sector():createEntity(desc)]]
    
        local station = Sector():createStation(Faction(asteroid.factionIndex), plan, asteroid.position, "data/scripts/entity/crewboard.lua")
    
    

     

    if you cant tell every is commented out except for the last line.

  4. UPDATE:

     

    1.2.1

      Fix editing server.ini with web interface, from breaking your server.ini

      Editing any config through the web interface will now create a copy of the config for backup

      Added complete Params to log and echo when starting server with -v

      Fixed bug in stop command that was not updating the status banner

      Added a message to profile parser page, notifing when the server has profiling disabled

      Added StopWait,SaveWait, and StopDelay to stop command and manager-config.ini

      Using the web interface will now add double qoutes around any string containing special charectors.

      Fixed manager logger to display the files its exectuing and not repeating the command that was run.

     

    1.2.0

      Moves Apache installer to avorion-manager/manager

      separated commands from manager and added to avorion-manager/manager

      updated todo link on about page to direct to github issues

      fixed grep error when running status command with an offline server.

      send command now checks if a `/command` was sent ie `/say` or `/stop`

      Added Parser scripts to manager commands

      Added parser verbose output when manually running scripts

      Added verbose output for start command, will display additional info if server cant start, and more

      Added (help)  `-h` optional parameter, will display name/description of function

      Added optional parameter `-f` to force specific features, like running update with -f will ignore current version checks, and reinstall

      Added custom names for status banners, in PHPConfig.ini

      Moved Banner Generator script to its own script, removed netstat dependency(will now use last reported /players from console).

      Updated install script, to install all options and comments properly

      Added Timed Broadcast's Options/script

      Added Message Of The Day options

      Added Sorting Option to PHPConfig.ini for players list on home screen

      Added send mail to all members of a group, select the group from the drop down and hit send

      Migrated Admins.xml parser into its own function

      Refined Restart command to attempt restart 10 times, aswell as other improvments in the script

      Added new option GalaxyDirectory, allowing you to set the location of your galaxies directory.

      Fixed bug where redirects would send you to wrong address

      Added Inputs on console page to delete a sector from the galaxies/sectors/ directory

      Extended input on console to show last 100 lines of manager and status log when toggled

      Added Start/Stop/Status buttons on console page, commands sent to the manager not the console.

      Added Backup command: backup_galaxy, which will backup the entire galaxy directory. The command will only keep 10 backups.

      Fixed a bug causing the php-server to crash if there was no playerchatlog available.

      Fixed php-server saying it wasn't starting.

      forced update command to perform the update twice in succession, to catch any thing missed during first update.

      Removed Sudo command prefix from apacheInstall script for VM users.

  5. Now that alliances are out i thought i should update the forums to reflect this mod now with name spacing added.

     

    Version 1.4.0

      -Moved configuration to /configs/

     

    Version 1.3.0

      -Added Namespacing

     

    WARNING, if you have a non default configs file, youll need to move it to the new directory, otherwise the script will use default

  6. Im working on version 1.2.0

    Should contain extended compatibility for older versions of tmux, which will grant compatibility to other server OS.

    Restructure of the functions, to allow for better documentation and debugging

    More commands to facilitate new features

    Better output on server not starting

    and multiple bug fixes, especially those oriented around installation.

  7. @Devious

     

    Could explain these two server settings? and what they do exactly?

     

    workerThreads=1

    generatorThreads=2

     

    Worker threads is the number of threads the game uses for all frame calculations inside of a sector.

     

    Generator Threads is the number of threads used to calculate generating new sectors (ie jumping to an undiscovered sector)

  8. ok so the default login in for the web interface is admin/admin (make sure you change that in the account page)

     

    your gallaxy should deffinetly NOT be named --max-players, sounds like your manager-config.ini is messed up, make sure review the file, you can use the default on the github page, or re running ./manager install will re install the file.

     

    in order to figure out why the maps arnt working for you, you would need to Manually run the parser scripts and report any errors. I can help you with this directly on my recently created discord channel:

    https://discord.gg/52YZMPt

     

    Anyone is welcome to join the channel and leave bug reports/ issues/ concerns/ or feature request.

×
×
  • Create New...