Jump to content

w00zla

Members
  • Posts

    79
  • Joined

  • Last visited

Posts posted by w00zla

  1.  

    Modules for gun range or auto enemy target acquisition.

    Modules for accuracy or some sort of targeting lead reticule?

    Adding the ability to have various levels of mod slots for different purposes.

    So that there would be a systems modules and gun modules and crew modules that went into different slots?

     

    I would love to see additional types of ship modules that affected different stats and went into a different set of module slots.

     

    Handling modules.. (not usable in ships over a certain mass or with diminishing returns)

     

    The scanner module (an essentially useless module) could go into the new module slot area! Same as mining modules.

     

    Mining and salvaging efficiency modules that gave micro % increases!

     

    I love the loot system in this game. Would be spectacular to see it expanded immensely!!!!

     

    you are right, new upgrades and new useful loot would be awesome ;D

    but unfortunatelly, you cannot alter the "ship menu" yet (maybe never) to add those new modules the way you imagine, and like Laserzwei depicted, you cannot upgrade/modify just any stat with modules, sadly...

  2. here another tip to add (its not that obvious):

     

    if you call invokeServerFunction() or invokeClientFunction() you get an implicit global var called callingPlayer which holds the index of the player entity which called that function!

     

    I also think it would be a good idea to collect all the "special" entity script functions called by the engine if they are declared (this Wiki page lists most of them I think, but that page is hard to find in the wiki...):

     

     

  3. Good news for all the server admins ;D

     

    I updated the OP and released version 0.5alpha:

     

    - mod now supports linux servers!

    - new configs maxconcurrent and searchdelay for anti-flood/-spam on servers (see "HOW TO - Advanced server configuration" section in OP)

    - minor changes and bugfixes

    - decided to introduce proper versioning, as i did not plan to release this many updates for the mod ;)

     

  4. nice! now it only needs to get tied to the merchant dialogue after 'where's your home sector', so that it feels part of the game itself. bonus point if each station has a chance of not being known based off distance.

     

    dont really know what you mean by integrating it into the merchant dialogues, as the mod is intended to provide galaxy-wide search for all sectors.

    same goes for your second point. but i already thought of creating another mod which could be a system upgrade (something like a "super scanner" ;D) which integrates the search, and has properties like i.e. maximum search distance, max results, power consumption...

  5. updated the OP and released version alpha4:

     

    - new command /findstationui to enable fancy new UI for station search

    - the /findstationconfig command checks now if given galaxy or galaxypath is valid (valid means a "server.ini" file is found)

    - minor changes and bugfixes

    - additional mod structure and code refactoring (sry guys, but please delete old mod-files again!)

     

    Preview of the new UI:

     

    Qh97

  6. Nice to see that you are making progress on the mod :)

     

    Would it be viable to test this on a busy and heavily modded server yet?

    Our server is sometimes near 100% server load so I'm curious towards the performance if there is not much headroom left for the search.

     

    I think you can already start testing it!

     

    the new method of sector-checking is really fast and has no performance cost at all, and you can configure how many sectors are loaded by the server per-frame for each search (see "Performance Tweaking" in the HOW TO section of op).

    Give the config framesectorloads a value of i.e. 1 and the server will only load and search one sector per frame which will make the searches pretty slow, but should have like no impact on performance (depends a bit on disks and iops of the server).

     

    BUT: the described limit only applies per search and per player atm! A single player cannot execute multiple searches in parallel, meaning only one at a time, but multiple players could spam the findstation command and thus produce (heavy) load on the server independently from the configs. On the other side, when players dont abuse stuff i am pretty sure the searches do well  ;)

     

    EDIT:

    decided to add the integration of anti-spam/-flood features and configs to the TODOs

  7. My mapgen scripts were pretty rough and eating more cycles than I expected,  so I had to make some server upgrades this evening.  Game host (not the website) changed to  freerealms.mutant.enterprises

     

    would you mind sharing your code?

  8. with little modifications to your code i managed implement the directory scan nicely and now the check for existing sectors is so much faster and takes like no performance hit ;D

    thats just perfect! and a bit sad that game API calls are so slow in comparison...

     

    updated the OP and released version alpha3:

    • added super fast sector checking routine, now searches finish in few seconds and only have little performance cost
    • refactored mod files and code (please delete all old mod files if you are upgrading!)

  9. Something like I have implemented at the Free Realms Avorion server

     

    On the website I currently have maps for:

    • Explored Sectors (5min updates)
    • Faction Strength (5min updates)
    • Resources!!        (15min updates)

     

    thats pretty cool  :D

    how do you do that, parse the binary data files directly?

  10. this is great!

     

    btw why do you check sector existence with the game api instead of iterating trough all the files that ends in v in the sector folder?

     

     

    function scandir(directory)
        local i, t, popen = 0, {}, io.popen
        local BinaryFormat = package.cpath:match("%p[\\|/]?%p(%a+)")
        if BinaryFormat == "dll" then    --am bit rusty, might not be reliable when embedded, but you get the gist of it
        local cmd =   'dir "'..directory..'" /b /ad'
        else
        local cmd = 'ls -a "'..directory..'"'
        end
        local pfile = popen(cmd)
        for filename in pfile:lines() do
            if string.sub(filename,-1) == "v" then
                i = i + 1
                t[i] = filename
            end
        end
        pfile:close()
        return t
    end
    
    

     

     

    i also came up with this idea, but decided for the api variant for two reasons:

     

    the api calls should in theory be faster than file reads (we do a million(!) checks after all) because the engine providing the api should have some kind of cached data of the sectors in memory or the data/binary files, but that does not have to be the case actually.

     

    i also was not aware of a good function in LUA to scan directory files or check file existence without opening/reading the file, or installing some LUA modules and stuff. BUT your code looks very promising and I will try that of course, maybe we get even better performance then, what would be damn great  :D

  11. Dunno if the scripting apis are even available: but I'd love to be able to synchronize maps with other players

     

    the information about found sectors is saved in the players.dat or maybe even the index file of the galaxy ... those are binary and we cant read them atm.

    unfortunatelly this is also what the standard galaxy-map uses, and we dont have acces to this data yet via scripts  :-\

  12. Good news everyone ;D

     

    I found a way to read the sector XML files in an usable way within ingame scripts :)

    This means i managed to create a mod which can be used to search for specific stations in every found/created sector in your galaxy!

     

    SCREENSHOTS:

     

    Search UI

    Bddn

     

    Search Command

    9wjq

     

     

    The mod stays alpha until sector data is provided by game API!

    This implementation is a workaround until proper access to sector data is provided by the game for scripts, and some functions used for file access by this script even may be permitted in the future due to security/performance reasons (mods being able to read/write any file on the system is never good in terms of security)!

    BACKUP YOUR FILES/GALAXY!

     

     

    FINDSTATION v0.6alpha:

    Commands:

     

     

    /findstationui

    Enables/disables the UI (menu item & window) for station search.

     

    Usage:

    /findstationui

    /findstationui enable

    /findstationui disable

     

     

    /findstation

    Finds near stations in any of the found/created sectors in the galaxy and displays them in chat-window.

     

    Usage:

    /findstation <SEARCHTERM>

    Parameters:

    <SEARCHTERM> = term to search in station names (spaces possible, case-insensitive)

     

     

    /findstationconfig

    Used to set the configuration values for /findstation command.

     

    Usage:

    /findstationconfig galaxy <GALAXYNAME>

    /findstationconfig galaxypath <GALAXYPATH>

    /findstationconfig searchmode <MODE>

    /findstationconfig maxresults <NUMBER>

    /findstationconfig framesectorloads <NUMBER>

    /findstationconfig maxconcurrent <NUMBER>

    /findstationconfig searchdelay <NUMBER>

    Parameters:

    <GALAXYNAME> = name of current galaxy

    <GALAXYPATH> = full directory path for galaxy

    <MODE> = one of the available search modes player or galaxy

    <NUMBER> = any positive number or 0

     

     

    INSTALLATION:

    Download ZIP for latest release from GitHub and extract it to <Avorion>\data\ directory, like with other mods.

    No vanilla script files will be overwritten, so there should be no problem with other mods or file changes due to game updates!

     

    Server/Client:

    The scripts are server- and client-side by now!

    Following files have to be available on the client for multiplayer games:

    scripts\entity\findstation\searchui.lua
    scripts\lib\findstation\common.lua
    scripts\lib\findstation\config.lua
    scripts\lib\findstation\sectorssearch.lua
    textures\icons\findstation\searchstation.png
    

    TIP: If you disable the /findstationui command on your server (and thus not using the search UI), no client files need to be installed at all!

     

     

    HOW TO:

     

     

    First use in galaxy:

    The mod tries to auto-detect the configuration when first search is executed in a galaxy. 

    If the auto-configuration fails, you must execute /findstationconfig and configure the name of the galaxy manually (this has only to be done once per galaxy).

     

    /findstationconfig galaxy <GALAXYNAME>

    Example:

    /findstationconfig galaxy myfirstgalaxy

     

    If you want to use the search UI, you must enable it first by using:

    /findstationui

    If you want to hide/disable the UI and remove or uninstall the script, then use:

    /findstationui disable

     

     

    First use in galaxy (dedicated server with "--datapath"):

    The mod tries to auto-detect the configuration when first search is executed in a galaxy. 

    If the auto-configuration fails, and you use the --datapath parameter for your server, you must execute /findstationconfig and configure the directory path of the galaxy (this has only to be done once per galaxy). Just use the same path as for "--datapath" plus the galaxy name.

     

    /findstationconfig galaxypath <GALAXYPATH>

    Example:

    /findstationconfig galaxypath C:\avorionserver\galaxies\myfirstgalaxy

     

     

    Search modes

    The available search modes define which sectors are searched for stations.

     

    searchmode:

    - defines the search mode to be used for all searches

    - possible values:

        - player (search only in sectors discovered by player)

        - galaxy (search in all sectors created in the galaxy)

    - default: player

     

     

    Performance tweaking

    If your searches are too slow or performance cost of searches is too high then you can modify some of the configs to tune the behavior (use /findstationconfig for this):

     

    framesectorloads:

    - defines the maximum number of searched/loaded sector files per frame (quite like "file reads per frame")

    - higher values mean faster search but more performance cost

    - possible values: 0 - 1000000 (0 disables the limit)

    - default: 10

     

    maxresults:

    - defines after how many found results the search will stop

    - lower values means faster search in some cases, but also gives you less output obviously

    - possible values: 0 - 99999999 (0 disables the limit)

    - default: 30

     

     

    Advanced server configuration

    These configs will help server admins to keep impact of searches on server load at a minumum and to prevent flood/spam!

     

    maxconcurrent:

    - defines the maximum number of concurrent searches, meaning how many players can have a search running at the same time

    - possible values: 0 - 99999999 (0 disables the limit)

    - default: 0

     

    searchdelay:

    - defines the minimum time (in seconds) a player has to wait before he can start a new search, after each search

    - possible values: 0 - 99999999 (0 disables the limit)

    - default: 0

     

     

     

     

     

    CHANGELOG & TODOs:

     

     

    Changelog:

     

    0.6a

    - introduced search modes and related config (by default, the mod now searches only in sectors discovered by the player)

    - mod now tries to auto-detect its configuration for a galaxy (this may fail so you would have to configure manually with /findstationconfig)

     

    0.5a

    - mod now supports linux servers *insert penguin here*

    - new configs maxconcurrent and searchdelay for anti-flood/-spam on servers (see "HOW TO - Advanced server configuration" section)

    - minor changes and bugfixes

    - decided to introduce proper versioning

     

    alpha4

    - new command /findstationui to enable fancy new UI for station search (means menu item and window, check the screenshots)

    - the /findstationconfig command checks now if given galaxy or galaxypath is valid (valid means a "server.ini" file is found)

    - minor changes and bugfixes

    - additional mod structure and code refactoring (sry guys)

     

    alpha3

    - implemented much faster way of checking for existing sectors (credit to LoSboccacc, screw the API!)

    - mod structure and code refactoring

     

    alpha2

    - added per-frame processing of sector checks and station search

     

    alpha1

    - initial experimental release

     

     

    TODOs:

    - split up workload of search into multiple frame-steps to minimize impact on performance

    - improve and optimize "sector picking"code for better general performance of searches

    - create nice dialog/window and menu item for the search

    - integration of anti-spam/-flood features and configs

    - linux support

    - (localization support for other game languages?)

     

     

     

     

    And now have fun searching those pesky hyperdrive-overloader parts ;D

     

    Feedback of any kind and bug-reports are of course welcome!

  13. ... I am also unclear how to save that data to persist between sessions.

     

    This is where I got stuck... I'm trying to make a mod that records what goods are for sale/purchase in each sector the player enters. But... I couldn't see if I could save data to the players inner db, or whatever.

     

    ...

     

    You could try the secure() and restore() functions of entity scripts (like described here in the wiki), they seem to be the built-in hooks for easy persistence...

  14. Great mod, and I love the additional features you've added to this idea. Is this server clientside or serverside or both? I could just look at the file I suppose but maybe you could edit the OP and include this information?

     

    EDIT: is it possible to add a /showdisthelp command that prints out the commands for players in chat? That would be pretty useful for servers. Thanks

     

    Very happy that you like my mod  ;D

     

    I have just uploaded a new version 0.3 which improves the output of the standard /help command for showdist and showdistjump!

    Just type "/help showdist" or "/help showdistjump" in your chat-window and you will get detailed info about the commands 8)

    And btw, you can now also name the user-defined sectors so the output can be more usefull!

     

    Also updated the post so it contains info about server-/client-side.

×
×
  • Create New...