Jump to content

phezzan

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by phezzan

  1. 13 hours ago, Maoman said:

    It's the little button in the mirrors window. I didn't know about it either until I saw it mentioned in this post... I'm guessing you probably use the hotkey to toggle symmetry like I do instead of clicking through the menus
    spacer.png

    At first I used the mouse (now I use the keyboard) - but I never imagined that was a button that set the mirror block. I thought it was just a graphic.

  2. Attempting to rewrite the antismuggle scripts.

    They appear to repeat a lot of work:
     - every antismuggle entity scans faction inventory (for licenses) for every ship within detection range every second (until a 'suspicious' ship is found)

    - every antismuggle entity scans every ship's cargo within range (until a 'suspicious' ship is found)

    So if you have a license - a ton of work is being done and ignored every second.

    By caching the license found and ignoring ships that have a maxed out license, most of the work disappears when a player has the best license.

    License cache is updated 10% of the time, or if the requesting faction license was not cached. It would be better to wrap the license purchase / loss events... but I don't know how.

    Once a suspicious ship is found our 'stillSuspicious' check can stop at the first unlicensed good.

    This has radically improved the playability of the game.  The server is not disappearing for minutes at a time.

    Sometimes better - but not fixed.

     

    New beta version is massively better. :D

    antismuggle.zip

  3. There's a block type for building turrets - and there are rules about how to use that block type (as in hull and cargo are block types, so is 'turret base')

    I remember seeing instructions somewhere, but they made no sense to me and I've spent 300+hours in game and never ever attempted to make a turret.

    Making a fighter is also annoying - but I figured it out.

  4. Same problem - was trying to build a batch file to set the priority and affinity at the start.  This might also help the client avoid spawning 12 threads when I'm only giving it 4.

    I'm suspicious that much lag relates to waiting for a long running network request.  Steam networking would fit that bill.

  5. hd - harddisk. The place all your data is stored.

    Before my SSD - I was suspicious of IO being a problem so I loaded the game into a ramdisk. Fortunately it's not very big. 4GB of RamDisk is plenty.

    I did my research and selected imdisk - (64bit, free, opensource, fast, feature-ful, and the author uses ISO date format proving he's smart)
    http://www.ltr-data.se/opencode.html/

     

    Feel free to do your own research, 
    I'll give you a touchpoint https://en.wikipedia.org/wiki/List_of_RAM_drive_software

  6. How about this:

    Put any number of turrets into the research slots.   
    Press 'Auto Fill' to fill the remaining slots with similar turrets.

    'Auto Fill' prefers Trash over unmarked over Favorite.

    'Auto Fill' prefers Rarity over Type over Tech Level.

    Review the choices as you see fit.

    Press Research.

     

    If no turret is in the slots 'Auto Fill' picks the lowest rarity and tech level and ignores type.

    NOTE: one or two mods implement something similar.

  7. This particular problem may have been related to a very innocuous looking change in sector/background/warzone (deleted the mod's file - problem stopped)

     

    Correction, the problem is still occurring.  Also I wish I had a way to tell the client to limit itself to 4 cores (so I could separate it cleanly from the server's cores).

     

    Update: The problem started again - I was doing 2 'Investigate missing freighters' missions given by the same station at the same time. 
    They were in different sectors (after the first). The performance problem ended when I destroyed all pirates in the final sector of the first mission.
    It started again around the time I found the 'missing freighters' in the second mission and made them aggressive through dialogue.

    That mission was modded with 2 numeric edits: credit multiplier increased and punishment divided by 2.
    That file is now removed. Testing continues.
    ...
    Still a problem.

    ... 
    It seems like some sectors are a problem, but not all. - I've left sectors and had the terrible performance abate, if only temporarily.

    ...

    Inspection suggests Anti-Smuggle script might be the cause. 
     

    serverlog 2020-09-26 07-45-52 - Copy.7z server-perfstats 2020-09-26.7z

  8. After playing a while server updates started to take forever. AvorionServer using 17% (2 cores pegged at 100%)

    Repro - no idea. I've seen it happen in an hour, and I've seen it not happen in 6 hours.

    Soon after it started I ran /benchmark (attached). Galaxy is about 1GB. 1 active player. Very little jumping.

     

    Win64. Ryzen 1600 8 threads for the server /HIGH /AFFINITY 0xFF0

    4 cores for the client (High priority, 4 cores not available to the server via taskmgr)

    Client was responsive, but stuck (waiting for server, plenty of fps, sound)

    server-perfstats 2020-09-22 00-37-13.7z serverlog 2020-09-21 22-33-25.7z

  9. You might disable automatic time updates - Windows will ask the internet for the time and then adjust the time to the new time.
    In theory it wouldn't change more than a second or two, but either your hardware or the internet could mess that up.

     

    Your PC would slowly be more and more off the real time, but time should go back to consistently increasing...

    I'm imagining that events are scheduled in walltime and a sudden jump forward is causing many heavy events to trigger at the same time.

    I suggest rate limiting any heavy(or even medium) processing - put it all into a time sorted queue and only do one per second/frame/etc.
    Otherwise you'll have unpredictable jitter... and jitter is so much pain.

  10. Commands file: S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\commands.txt
    Initializing sector database...
    FileSecurer error: Reading of file "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\sectors\archive2.db" failed, moving on to the next instance. Error: Unexpected end of file
    FileSecurer error: Reading of all instances of S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\sectors\archive2.db failed.
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\sectors\meta.db": All instances have the same timestamp. This can lead to issues when loading.
    Initializing faction database...
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\players\player_1.dat": All instances have the same timestamp. This can lead to issues when loading.
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\players\player_1.dat": All instances have the same timestamp. This can lead to issues when loading.

    Steps

    Enable clustering

    Load
    Quit  (Error disk full: 1GB galaxy and ?1GB? free)

    Load - errors as shown.

    Load (restored galaxy from a complete backup and freed up space)

    Quit (no errors)

    Load - errors as shown below.

    Initializing sector database...
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\sectors\meta.db": All instances have the same timestamp. This can lead to issues when loading.
    Initializing faction database...
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\alliances\alliance_43.dat": All instances have the same timestamp. This can lead to issues when loading.
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\players\player_1.dat": All instances have the same timestamp. This can lead to issues when loading.
    "S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod\players\player_1.dat": All instances have the same timestamp. This can lead to issues when loading.
    Starting up 10 worker threads...

     

    Avorion clustering appears to build the archive files, then copy them and it requires a lot of free space? 
    Why not just rename them?

    The game seems to run fine despite the timestamp warnings - but they (timestamp warnings) appear to come and go.

  11. Yeah - I have a number of strange performance problems running a 1 person server on localhost in Windows on a Ryzen 1600.

    It's confusing and quite awful.

    Glad you narrowed yours down.  
    Seems like the fix is to create buckets of time when spawning stuff in a small area, and total up everything to be spawned into those buckets.  Then one big ores/scrap can be spawned instead of hundreds of tiny ones.

    • Like 1
  12. Problems loading / saving config files to %APPDATA%/Avorion/galaxies/NAME/moddata

    2020-09-06 21-39-34| #0: ResearchStation.initialize data/scripts/entity/merchants/researchstation.lua
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| Error calling checkReadSecureFilename: boost::filesystem::weakly_canonical: The request is not supported
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| stack traceback:
    2020-09-06 21-39-34|     [C]:-1: in function readable
    2020-09-06 21-39-34|     [string "..."]:95: in function open
    2020-09-06 21-39-34|     ...\445220\1722652757\data/scripts/lib/azimuthlib-basic.lua:419: in function loadConfig
    2020-09-06 21-39-34|     S:\Steam\steamapps\workshop\content\445220\1731575231\data/scripts/entity/merchants/researchstation.lua:461: in function ?
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| [ERROR][AutoResearch]: Failed to load config file 'S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod/moddata/AutoResearch.lua': filename is not secure
    2020-09-06 21-39-34| Object: N2cp13ServerScriptsE
    2020-09-06 21-39-34| Execution Context (inner to outer):
    2020-09-06 21-39-34| #0: ResearchStation.initialize data/scripts/entity/merchants/researchstation.lua
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| Error calling checkWriteSecureFilename: boost::filesystem::weakly_canonical: The request is not supported
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| stack traceback:
    2020-09-06 21-39-34|     [C]:-1: in function writable
    2020-09-06 21-39-34|     [string "..."]:97: in function open
    2020-09-06 21-39-34|     ...\445220\1722652757\data/scripts/lib/azimuthlib-basic.lua:520: in function saveConfig
    2020-09-06 21-39-34|     S:\Steam\steamapps\workshop\content\445220\1731575231\data/scripts/entity/merchants/researchstation.lua:480: in function ?
    2020-09-06 21-39-34| 
    2020-09-06 21-39-34| [ERROR][AutoResearch]: Failed to save config file 'S:\phezz\AppData\Roaming\Avorion\galaxies\Kmod/moddata/AutoResearch.lua': filename is not secure

    NOTE: %APPDATA%\Avorion\galaxies is a mount point for a 2GB (NTFS) RAM Drive.

    NOTE: Admin group has full control. Server is run by the admin user

    function Azimuth.saveConfig(modName, config, options, isSeedDependant, modFolder, minify)
        local dir = "moddata"
        if onServer() then
            dir = Server().folder .. "/" .. dir
        end
        if modFolder then
            if modFolder == true then
                modFolder = modName
            end
            dir = dir .. "/" .. modFolder
            if onClient() then
                --createDirectory(modFolder)
                createDirectory(dir)
            else
                createDirectory(dir)
            end
        end
        local filename = dir .. "/" .. modName .. (isSeedDependant and '_' .. GameSettings().seed or "") .. ".lua"
        local file, err = io.open(filename, "wb")
        if err then
            eprint("[ERROR]["..modName.."]: Failed to save config file '"..filename.."': " .. err)
            return false, err
        end
        file:write(Azimuth.serialize(config, options, "", true, minify))
        file:close()
        return true
    end

    The client is able to save just fine into %APPDATA%\Avorion\moddata (identical permissions)

×
×
  • Create New...