Jump to content

unbekannt1984

Members
  • Posts

    204
  • Joined

  • Last visited

Posts posted by unbekannt1984

  1. Hi,

     

    : ERROR: Can't dock to Moyouwua using Transporters. Calculated Distance is -2257.4322414398 meters.
    

    hmm, how big are the ships and stations? Since the ship was able to "dock" at the other stations, I'd guess Moyouwua is big (compared to the other stations).

     

    In alpha2 I calculated the possible distance in line 416:

    local Distance = (range - ((ship.radius + station.radius)/2))

    I don't see how to further reduce that... (And if it's radius even that formula is wrong, the radius-values shouldn't be divided by 2)

     

    If you could find the sector-file, compress it to a zip and upload it here, so I could take a look myself, it would be a great help.

    I am looking forward to 0.10.0alpha4.

    Well, first I need to finish it, then I'll need to run tests for hours... And after that I'll think about releasing it.

     

    I didn't release alpha3, the reason is: It didn't change a lot for the players. I introduced shortcuts - if a ship receives a route and has got the needed goods in the cargobay, it can skip flying to the selling station. The result was:

    torsten@debian:~/.avorion/galaxies/avorion_galaxy$ cat serverlog\ 2019-02-14\ 17-00-59.txt | grep directly
    2019-02-14 17-21-37| Goods Hauler v0.10.0-alpha3 17:21:37 (Frachter 1) : Amount is in the cargobay, directly moving to buyer.
    2019-02-14 18-05-37| Goods Hauler v0.10.0-alpha3 18:05:37 (Frachter 3) : Amount is in the cargobay, directly moving to buyer.
    2019-02-14 18-57-37| Goods Hauler v0.10.0-alpha3 18:57:37 (Allianz-Frachter 1) : Amount is in the cargobay, directly moving to buyer.
    2019-02-14 20-26-45| Goods Hauler v0.10.0-alpha3 20:26:45 (Frachter 3) : Amount is in the cargobay, directly moving to buyer.
    2019-02-14 20-51-20| Goods Hauler v0.10.0-alpha3 20:51:20 (Allianz-Frachter 2) : Amount is in the cargobay, directly moving to buyer.
    2019-02-14 21-10-09| Goods Hauler v0.10.0-alpha3 21:10:09 (Frachter 1) : Amount is in the cargobay, directly moving to buyer.
    torsten@debian:~/.avorion/galaxies/avorion_galaxy$

    The shortcut was used 6 times during 4 hours of testing in a sector with 20 stations and 5 Goods Hauler controlled freighters - as I said before, it didn't change a lot for the players.

     

    There was also another shortcut: If a route is received and the updated amount of goods is 0, then the route is reset. That didn't happen at all during the test.

  2. Hi,

     

    Thanks for the mod.

    I tested 0.10.0-alpha2. And in the case without Transporters it did a nice operation.

    Improved dispatchers are great.

    However, it seems that the ship with Transporters is stuck when leaving the station.

     

    The part considered to be the log at that time is below.

    Execution Context (inner to outer):
    #0: updateServer data/scripts/entity/ai/haulgoods.lua
    
    could not execute function 'updateServer' in '"data/scripts/entity/ai/haulgoods.lua"':
    
    data/scripts/entity/ai/haulgoods.lua:425: attempt to concatenate local 'station' (a userdata value)
    stack traceback:
         data/scripts/entity/ai/haulgoods.lua:425: in function 'haulGoodsMoveToStation'
         data/scripts/entity/ai/haulgoods.lua:576: in function <data/scripts/entity/ai/haulgoods.lua:548>
    

     

    I didn't touch the dispatcher so far, I just updated the data (amount) before buying anything.

     

    Well, the Error you found is a bug in one of the only Error-Messages at the moment. In line 425 the variable station needs to be replaced with station.name. If you changed that, you would get the following output:

    ERROR: Can't dock to <Enter station-name here> using Transporters. Calculated Distance is <some negative value here> meters.

    The Transporter-Software is limiting the range, in your case the Freighter would need to park somewhere inside the station - and I dislike crashing your ships into stations.

     

    During my tests with transporters, I saw that 500m range are not sufficient, even on smaller stations.  However, the transporter-code in 0.9.3 is even worse, it needs about twice the range to work (compared to 0.10.0alpha2).

     

    I'm currently working on 0.10.0alpha4, so I can't release a fixed alpha2 version at the moment.

  3. Hi,

     

    Shrooblord had to wait more then a year for a reply now...

    Sometimes Goods Haulers try to do one or both of the following problematic things:

    • Buy more goods than the Cargo Hauler has stock for, usually as simple as 1 over the total amount they could carry.
    • Push more goods to the receiving Station than that Station has space for.

     

    Whenever they decide they want to do either, they don't let up and continue to try and perform this behaviour somewhere between 5 and 10 times in a row, which spams both the Console and the main game screen itself full of error messages (Console says something along the lines of "Expected to buy 5 goods but bought only 4", while the game screen shows an error in the typical red "You can't do that" message with a red cross, on the right) every second or so. With multiple Goods Haulers at work in one Sector, this gets very spammy very quickly, but more importantly, your Goods Haulers aren't doing anything, because they load up their Cargo Bays with goods they can now no longer push, because the receiving Station doesn't accept more goods of that type anymore.

     

    Is there anything you can do to include some sort of check that wouldn't trigger this behaviour anymore? It's made me steer clear of giving my craft the Goods Hauler orders inside my own Sector, because they keep trying to push Aluminium from my Alu Mine to my Shipyard, which doesn't want it anymore, instead of acting as my handy cargo shuttle between production chains as I intended for them to do.

     

    Furthermore, Goods Haulers with cargo already with them will never try and push these items for profit, which I think isn't in the spirit of how this mod operates.

     

    "Buys more then fits into the cargobay"

    The dispatcher decided in 0.9.x versions of Goods Hauler how much to buy. That data is simply old at some point.

     

    "Push more goods to the receiving Station than that Station has space for."

    Goods Hauler always tries to sell as much as possible. That's not a bug, it was the only way for the 0.9.x versions to try to keep the cargobay free. Well, I'm not going to change that.

     

    "Whenever they decide they want to do either, they don't let up and continue to try and perform this behaviour somewhere between 5 and 10 times in a row, ..."

    That's actually a bug, the 0.9.x versions were missing 2 "undocking" stages - one after buying and one after selling stuff - , so the updateServer-function ran the same code again and again.

     

    "...your Goods Haulers aren't doing anything, because they load up their Cargo Bays with goods they can now no longer push, because the receiving Station doesn't accept more goods of that type anymore."

    Well, 0.10.0-alpha1 took a look at the cargobay before buying anything, so it should maximize free cargospace over time. Problem is: It still relied on old (inaccurate) data.

    0.10.0-alpha2 now updates the amount of goods in the cargobays of your ship, selling station and buying station and decides then how much to transport.

     

    So, now I'm talking about 0.10.0 again... alpha2 is still missing features I'd like in the final 0.10.0, but in hours of testing I didn't come across a single bug, it works much better then the old 0.9.x versions. What has changed? - Spoiler :)

     

     

    These changes should slowly free your cargospace - or at least keep the cargobay free as good as possible:

    Ships don't buy stuff that's already in the cargobay

    Amount of goods to transport is determined just before buying - previous versions used the dispatcher-information (old data - very likely wrong)

     

    Added limitation to transporterrange (35km range should be enough - or do people equip ships with 10 legendary Transporter-Software now?)

    Changed docking distance calculation for ships with transporters

     

    Introduced Log-Levels, haulGoodsLogThreshold (default 2):

    5 and higher values should suppress all messages,

    choose 4 for Errors,

    choose 3 for Errors and Warnings,

    choose 2 for Errors, Warnings and Notifications,

    choose 1 for all the beauty of console- and log-spamming that you know from previous versions: Errors, Warnings, Notifications and the rest of the Spam.

    Also changed Log-Entry format.

     

    Ships without transporters: Properly resetting DockAI.dockStage and .undockStage, and waiting until ships are fully undocked

    Fixes: Ships without transporters are sometimes going mad and fly thousands of kilometers away

     

    Added additional stages for undocking - this reduces spamming of buy- and sell-stages

     

     

     

    EDIT: Removed old 0.10.0-alpha2 version of the Mod.

  4. Hi,

     

    spoiler-alert :)

     

     

    2019-02-12 22-15-20| Goodshauler v0.10.0-alpha1 12.02.2019 22:15:20 (Frachter 2) : haulGoodsGetRoute (Stage 1) finished. Starting to transport 420 Platinum from Goldgrube 1 to Prozessorfabrik
    2019-02-12 22-17-58| Goodshauler v0.10.0-alpha1 12.02.2019 22:17:58 (Frachter 2) : BuyGoods Data: 420 Platinum size 0.5 requested, 97 in the cargobay, room for 2939 more. Decided to buy 323 more.
    2019-02-12 22-21-06| Goodshauler v0.10.0-alpha1 12.02.2019 22:21:06 (Frachter 2) : Finished trade from Goldgrube 1 to Prozessorfabrik

    Well, that's all the default-level logging of the current development-version (of a successful trade-run)... Server-Admins will love it :)

     

    If anybody is interested, I could share the latest dev-version.

    Disclaimer: This is experimental software, you can expect some unintended behavior.

     

  5. Hi,

     

    the tickrate of weak loaded sectors is reduced, this means that the miners in other sectors may produce less materials (Well, they should work slowly) for you.

     

    It might work better, if you put all miners in one sector, get all materials from there and move on. It is simply less data (3 sectors vs. 1) to keep around.

    And if you are traveling around or have ships in other sectors, too, nobody can tell you exactly which sectors are kept alive (or weak loaded).

  6. Hi,

     

    While a gentleman's agreement is nice, I was wondering if it was possible to artificially restrict materials/galaxy zone ranges serverside to prevent players from either entering certain coordinates/coordinate ranges or from using/mining certain materials.

    well, I think you can't restrict areas and materials directly. But you could use the server-settings to restrict all players in ship-volume. That way they would need to run, if they are moving too far into the center.

     

    There is one more possibility: You could make your own MOD, that calculates the distance to the center and makes your players pay, if they move too far into the center. An ingame mail-notification would be possible, too.

  7. Hi,

     

    I've been thinking about further improvements of Goods Hauler. What would you think about some kind of priority queue instead of the current list of traderoutes?

    Well, since that requires some kind of sorting, it would need a little more CPU-time, compared to the current system.

     

    Have you got other ideas for the Mod?

  8. Hi koonschi,

     

    I'm afraid you'll have to be more specific than "It's not waterproof" and "there were issues in a mod". I also can't see where in the docking code your code fragment would be placed.

    just like every ai-faction freighter, Goods Hauler is using DockAI.flyToDock.

     

    If you put the code I posted in Line 25 of Avorion/data/scripts/entity/ai/dock.lua, transporters and normal docking should work if any Entity is using DockAI.flyToDock.

     

    "It's not waterproof" means, that a ship with transporter got stuck, if it was using DockAI.flyToDock.

  9. Hi,

     

    Avorion/data/scripts/entity/ai/dock.lua function flyToDock is not waterproof. Well, there were issues in the Goods Hauler Mod, that could have been prevented by adding something as stupid as the following in the code:

        -- New in Avorion 0.20.x: Transporters
        -- A Transporter with software makes real docking impossible - No fallback here
        if (ship.transporterRange or 0) > 0 then
            -- We're doomed; How close do we need to get?
            local range = ship.transporterRange
            -- range should be 350 => 3.5km for highest quality transporter-software, 50 => 0.5km for lowest
    
            local dir = normalize(ship.translationf - station.translationf)
            local Distance = (range - (ship.radius + station.radius))
            local target = station.translationf + (dir * Distance)
    
            if (Distance >= 0) then
            -- just make sure we don't crash into the station, before we move there
                ShipAI(ship):setFly(target, 0)
            else
            -- Well, don't try to park inside the station
                return false
            end
    
            if station:isDocked(ship) then 
            -- We've reached our destination, shutdown the engines and get back to business
                ShipAI(ship):setPassive()
                return true 
            end
        else
        -- Continue old style docking
    

  10. Hi,

     

    I'm prolly blind but I can't find anything about the production effort or materials cost of fighter. I'm looking to change the prod.efforts/mats for cheaper fighters productions.

     

    Any hints would be appreciated.

    ~/.steam/SteamApps/common/Avorion/data/scripts/entity/merchants/fighterfactory.lua and fightermerchant.lua are the files of the fighterfactory and the fightermechant.

     

    Prices are calculated in ~/.steam/SteamApps/common/Avorion/data/scripts/lib/inventoryitemprice.lua lines 61 .. 87:

    function FighterPrice(fighter)

    There are also the files ~/.steam/SteamApps/common/Avorion/data/scripts/lib/sellableinventoryitem.lua and sellablefighter.lua.

  11. Hi,

    Last night I decided to get a dedicated server through nodecraft and thought I was doing fine by deleting the  pre-generated Galaxy, and replacing it with the non dedicated Galaxy files that we have been using for weeks, and it worked.

    however when we logged in no one had the right ships, it flipped who had what and some didn't have anything..  I ended up with the leaders stuff..  he ended up with nothing.. 

    which files did you copy to the server? Sounds like the player-database was missing/corrupted... The logfiles of the server would be a great help.

     

    How did you transfer the files to the server? Using FTP? Did you use compression (zip-archive or anything like that)?

     

    Did you take a look at the servers character-encoding/charset and the character-encoding/charset of your savegame?

    FTP has modes for binary-transfer and text-transfer - in text-mode FTP tries to keep the files readable, but that's bad for binary files...

  12. Hi Laser,

     

    • A player can never load more sectors than the `aliveSectorsPerPlayer`-config option in the server.ini (located in your galaxies save folder). Let's call it threshold. By default for singleplayer it's at 500, for multiplayer it's 5
    • The sectors with the highest weight get and are kept loaded first. The weight is calculated as follows:
       

      •  
    • +1 for every ship you own in that sector
       
    • +3 for every station you own in that sector
       

      (I couldn't find the source to the exact scores, so if they are wrong or incomplete notify me!)

    found the source, but it seems to be 500+1 (singleplayer) or 5+1 (multiplayer), or whatever the serveradmin felt happy with:

     

    Out-of-sector simulation

     

    "We'll be adding some more means for better control of which sectors will actually get updated on multiplayer servers. For now, sectors with lots of stuff will have a higher priority."

    • Sectors with player and alliance content are updated while the player is not inside the sector
    • Default amount of updated sectors per player on multiplayer is 6 (the sector the player is in, plus 5)
      • This value can be configured in the server.ini settings and will be a lot higher for singleplayer

      [*]If a player has property in more than 6 sectors, this happens:

      • Each sector will have a priority score
      • The 5 sectors with the highest scores will be updated
      • The score in the sectors is 3 for each player station, plus 1 for each player ship

     

    from the 0.12.7 (Alliance-Update) Patchnotes...

  13. Hi koonschi,

     

    nice to see the Xsotan/Pirate-Attacks fixed.

     

    Gameplay

    • Attacking ships check for free line of sight before firing (considering allies)

    Sounds like more ships are useful now  :)

    BTW: Do independent-targeting turrets check for free line of sight now, too? I just don't want those big seeker-rockets to destroy allied ships again...

  14. Hi,

     

    I've got 2 big Seeker-Missile Launchers with Independent Targeting and 30km range and 2 PDCs (10km range) on a ship. But I can't enable those in populated areas, those weapons simply hit non-enemies way too frequently.

    In non-populated areas (or in the middle of a pirate-sector) those weapons are useful.

  15. Hi Qui_Sum,

     

    Thank you for reporting, will be fixed in the next update!

    maybe a little suggestion... How about splitting that Bonus into 2 parts, one part for the player and one for the ship-faction (in my case the alliance)?

    It wouldn't change anything, if you pilot your own ship. But if you are using an alliance-ship, you could improve the relations for both (alliance and player) at the same time.

     

    EDIT:

    I think I found more of those bugs... In Avorion/data/scripts/lib/entitydbg.lua, lines 2560 to 2579:

    function onLikePressed()
        if onClient() then
            invokeServerFunction("onLikePressed")
            return
        end
    
        local faction, ship, player = getInteractingFaction(callingPlayer)
        Galaxy():changeFactionRelations(faction, Faction(), 5000)
    end
    
    function onDislikePressed()
        if onClient() then
            invokeServerFunction("onDislikePressed")
            return
        end
    
        local faction, ship, player = getInteractingFaction(callingPlayer)
        Galaxy():changeFactionRelations(faction, Faction(), -5000)
    
    end

    doesn't work for alliance-ships either.

     

    I think there are more of these bugs around...

  16. Hi,

     

    I tried to improve my alliances' relations to an ai-faction by doing some missions and defeating pirate-attacks. Well, at least for pirate-attacks it seems that an alliance doesn't get that bonus at the end of the event...

     

    I think, I found the cause for this in Avorion/data/scripts/events/pirateattack.lua line 199:

                Galaxy():changeFactionRelations(player, faction, reputation)

    Shouldn't that be something like in other scripts:

    local shipFaction, ship = getInteractingFactionByShip(shipIndex, callingPlayer)
    ...
    Galaxy():changeFactionRelations(shipFaction, stationFaction, relationsChange)

×
×
  • Create New...