Jump to content

Laserzwei

Members
  • Posts

    399
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Laserzwei

  1. my brief jump into 0.16 was all the scav and miner guns on my ship also were recognized as armed. additionally, the unarmed ship system was being counted as armed, so loading up i had 8 armed slots instead of 4.

    sadly your issue is very unlikely related.

    The issue of cargo drones being counted as WeaponType.Armed was already in 0.15.x, my Carrier command mod even has some code to work around that.

    But I've read about civilian turrets being counted as military all of the sudden in 0.16

  2. So, not sure if this has been answered yet or not but I've installed the mod and made sure both hooks from the sectorgenorator.lua and the eventsceduler.lua are there and I'm able to spawn the mines and claim and upgrade them but once I own them they are not generating any resource. I do have some other mods installed (BiB modpack and fleetcontrol) so I did have to insert the code. Am I missing something or is this a bug?

    I don't know where the BiB mods change vanilla files. You might want to look in  %Appdata%/Roaming/Avorion/galaxies/galaxyname/ serverlog ... .txt if there are any errors

  3. What are you looking at? This mod is:

    Deprecated

    As of 0.16.1 ALL features of oosp are included in vanilla. Therefore no update for 0.16 or later will occur.

     

     

     

     

    (...) I'd prefer a delay of a few hours.  Do you think adding a table value to the station to control the station refresh times would work?

    Since equipment docks don't keep track of their operation-time (/scripts/entity/merchants/equipmentdock.lua), one would require to combinate

    updateServer(timestep)
    

    and the callback

    onRestoredFromDisk(timeSinceLastSimulation)
    

    A table would most likely not be needed. Always depends on the actual implementation though...

     

  4. Perhaps there is one more feature you could make.  With your knowledge, could you make a mod that would restock the Trade Equipment after certain amount of time?

    Somewhere out there is a mod that restocks EQ-Dock equipment every time a sector gets loaded

  5. When using either broadcastInvokeClientFunction or invokeClientFunction and sending tables as payload, there can occur the following crash:

    2018-02-17 16-48-26| could not execute function 'send' in '"mods/invtest/new.lua"':

    2018-02-17 16-48-26| stof

    2018-02-17 16-48-26|    [C]:-1: in function invokeClientFunction

    2018-02-17 16-48-26|    mods/invtest/new.lua:23: in function ?

    2018-02-17 16-48-26| Setting state to invalid.

    The error is reproducable in 0.16 and 0.15.8 (not tested earlier, but most likely also present there).

    Affected are all lists, where string- AND number-keys are used. Specifically only if these "mixed keys" are used in the very same list- Having a string-key only list with a nested number-key list is totally fine. Having a mixed-keys list somewhere nested within the payload will throw said error.

     

    lists that are fine (divided by underscores):

    li[1] = 1
    li[2] =  "a"
    ________________
    li[1] = 1
    li[20] = "a"
    ________________
    li[1] = 1
    li[math.huge] = "a"
    ________________
    li[1] = 1
    li["2"] = "a"
    ________________
    {1,2,{vec3(4,5,6), vec2(1,2)}, "test", ["10"]=1}
    

     

    lists that don't work:

    data[1] = {["name"] = "Name1", [1] = 2}
    data[2] = {["name"] = "Name2", [2] = 2}
    ________________
    data[1] = 1
    data["a"] = "b"
    

     

    While testing some of the lists I noticed a 2nd most likely related unexpected behaviour/bug:

    When sending:

    li[1] = 1
    li[20] = 2
    li["4"] = 3
    

    The client will not receive      li["4"]

     

    When sending:

    li[1] = 1
    li["4"] = 3
    li[20] = 2
    

    the client will receive:

    li[1] = 1

    li[4] = 2

    li[20] is missing and li[4] has the wrong value!

    There is some serious weirdness going on

     

     

  6. Cargo drone storage is set to 5. And it's not modifyable by any means.

    Allowing Cargo-drone cargo space to be modifyable, would open extend the existing in sector trading by a lot. That also requires changes to factory.lua, in a way thtat the drones actually load their cargo with more than 1 good at a time.

     

    Also who wouldn't want to have some cargo-drones in its own ship that auto-buy/sell goods when found with the trading-overview?

  7. Could you guys make it possible to properly add an Energy-consumer, which also shows up in the ship's power menu?- Like so (photomontage):

    1eSxUel.jpg

    Something along this:

    EnergySystem:addEnergyConsumer(double  amount, string  IconPath)

     

    If that is not possible atm. (e.g. because the main-UI is not easily available for scripts), then making EnergySystem().requiredEnergy writable would help a lot too.

  8. (...)and I see now Laserzwei added a 1.6 now for carrier commnand. that wasnt there when I was doing all this.

     

    I did?

    I sure have not been able to make Carrier Commands run in Avorion 0.16.x  :-\

    Minecorp however got its update.

  9. Thanks for the Mod and making npc traders work again. I tried to figure out how exactly the npc trade spawning works, maybe you have some insight. As I see it there are 3 reasons to built stations. Get Mats for turret building, get mats for manual trading for free and passivly generate money from npc traders. For passive money the complex seem to be actually worse than single stations in some situations as they only spawn as many traders as a single station would. This would mean that its better to only sell the most valuable stuff so the cargo ships dont waste their trip on energy cells, water etc. Or is it dependent on the amount of different ressources you sell?

     

    There are 2 different ways  Traders spawn:

    1) via the discussed Sector-script: traders.lua

    2) Factories - and only factories - have a 2nd mechanic that allows them to spawn more traders:

    In the config menu you can tell your factory to request and sell goods to traders. This mechanic will spawn additional traders. iirc this is independant of the contents of the sector and happens in /lib/tradingutility.lua (it is also dependand on the price margin)

     

    Complexes for Money were ment to produce high tech goods that can be sold at many places:

    Processors: guaranteed at every repair-station and some tradingposts

    Mining robots, Anti-Grav Unit, Fusion generator, Drill: At many mines around the Galaxy

    War Robots, Body Armor, Vehicle, electromagn. Charge ... etc. : At Militarty Outposts

    Edit:

    The complex mod is not updated for 0.16.x.

    It is also undergoing a lot of behind the scenes changes, which will take a lot of time, so don't expect any fixes, when something breaks

  10. Many awesome big and little things were added with 0.16. Thank you very much  :)

    I have another request though:

    Could you guys make it possible to properly add an Energy-consumer, which also shows up in the ship's power menu?- Like so (photomontage):

    1eSxUel.jpg

    Something along this:

    EnergySystem:addEnergyConsumer(double  amount, string  IconPath)

  11. Well judging on an a -very- quick initial test of downloading the updated mod from GitHub and dirtily smashing them into the /data and /mods folders, it looks like you fixed it!

     

    I'll do more thorough testing though.

     

    Issues :

    1) I have immediately noticed is that complex's do not have the `Buy/Sell Goods` menu item until one of the other menu options is chosen on the complex first. This resets each time you enter a new sector it seems. Doesn't seem breaking at the moment, I've had traders sell to complex's that I've not opened the menu for when jumping into the sector.

     

    2) There is no chat notification that your complex's are buying or selling any items from traders. However there is a resource change notification and faction status change notification on the right of the screen when the complex's buy and sell.

     

    2a update) There -is- a chat notification of complex station buy/sells if you are out-of-sector, but conversely there is -no- resource or faction notification on the right side of the screen.

     

    3) I've had a couple of empty trade ships dock with a complex that does not buy goods. This complex has max stock of energy cells, yet zero stock of both other sellable items, warheads and scrap metal.

     

    4) Existing complex's built before installing the mod do not seem to trade. This however could be because both existing 'old' complex's in my game are built in empty sectors and you've addressed this in your previous post.

     

    5) Extending on 4) In an empty sector with an 'old' mine and an 'old' complex, the mine trades but the complex does not. This seems to indicate that the script 'traders.lua' is present(?). The complex is old however and existed before updating the mod.

     

     

    I'll let you know if I encounter any breaking bugs and I might put a pull-request in for item 2) above if I get time to investigate more.

     

    Cheers for fixing it so fast ! :)

     

    1) I noticed it too, while testing yesterday. Nothing big to worry about though

    2-3) are vanilla behaviour. The complex mod just registers into the selection-list. No further changes to traders are made

    4) I thought about manually adding that script, when a complex gets build and it's not present for the sector yet.

    5) Mines are technically factories as well. And factories have their own trader script running in addition to the sector-wide one (which the complex mod uses)

  12. Edited the tradingultility.lua lines 26 and 27 (added comma and reference to complexFactory.lua script):

    The moment I realized, you know what you're doing.

     

    Notes :

    1) I am using an existing galaxy that I backed up before installing the mod - no complex stations exist, just the mine.

    2) The complex station does not have a full compliment of crew and is suffering normal damage over time due to lack of maintenance.

    3) The complex station does not have a captain.

    4) The station is set up inside of the barrier at [-32,40]

    5) The sector was initially completely empty of all entities. No asteroids, no wrecks, no containers etc.

    6) Can confirm that the config still has 'config.enableNPCTrading = true'

    7) I have tried removing all existing docks from the merged complex station, exited build mode, entered build mode again and reapplied a single dock.

    (...)

    8 ) Looking at the logs when the station is constructed :

        Warning: Couldn't add script from stream: index is already taken
    

     

    1-4) should not matter.

    5) I'm not 100% certain, but the sector has to have the script :

    "data/scripts/sector/traders.lua"

    From a rough look at the sector generator-files the following sector-types support traders (or you could add the script yourself):

    • asteroidfieldminer
    • colony
    • factoryfield
    • gates
    • loneconsumer
    • lonescrapyard
    • loneshipyard
    • lonetrader
    • lonetradingpost
    • lonewormhole
    • miningfield
    • neutralzone
    • basefactories
    • lowfactories
    • midfactories
    • highfactories

     

    6) while following my little guide, you made that obsolete

    7) there is a vanilla script that periodicly adds those back (called "(...)/entity/regrowdocks.lua")

     

    8 ) That always happens due to the mod adding that script twice, from both ends (client and server). Otherwise things would go out of synch, since the Multi-Thrading-Upgrade

     

    Also I accidentally changed a little bit of code in 0.90c, which would prevent traders from spawning.

    So I put the correct  /data/scripts/lib/tradingutility.lua as an attachment here

    tradingutility.zip

  13. Try the following:

    Get the vanilla /lib/tradingutility.lua and save it somewhere else

    Install the mod

    Overwrite /lib/tradingutility.lua with the vanilla one you just held back

    Add at the top of the scripts-list the following line:

    "mods/complexMod/scripts/entity/merchants/complexFactory.lua"

    report back, if it helped (at least 15 min. are required in an empty sector , +5min for every other station)

  14. Error while adding file "mods/oosp/scripts/player/oosproduction.lua":
    
    mods/oosp/scripts/player/oosproduction.lua:15: bad argument #1 to 'max' (number expected, got nil)

     

    Did Steps as you said. Help Pls

     

     

     

    Maybe oospConfig.consumptionTime is not available or nil...

     

    Avorion 0.15.7 or 0.15.8?

    On 0.15.7: See if "mods/oosp/config/oosp.lua" exists. And if "config.consumptionTime = 86400" is set within.

    On 0.15.8: Properly install oosp_0.99_5b.zip

  15. I installed the latest version, but it does not seem to add any resource to resource depot. Also I couldnt find anything in code where adding resources is done. Function ResourceDepot.onRestoredFromDisk set a few variables, prints out the result, but does not add anything? Or am I blind?

    I accidentally only changed a test-variable instead of the actual one. See 0.99_5b

  16. I have performed the installation steps you mention, but I run into a different problem. Whenever I boot the game, and periodically through playing, I'll get error messages in Console that table.insert is being used wrong, all to do with the resourcetrader.lua.

     

    See this bug report I made for the vanilla code. Your code is triggering this same behaviour four times per execution. Basically, table.insert expects two arguments. You can pass it three, but then it expects the second to be a number, which it's not, so the code freaks out. Please read the original bug report. There's a link to a question on StackOverflow and everything where this is explained in further detail.

    This bug is inherited from vanilla and I can't reproduce it. So I can't fix it either

  17. I couldn't reproduce this error on a newly created 0.15.8 (0.15.7 would be the same, since the file didn't change) Galaxy. And the code has nothing in it that can produce the key "currentProductions".

     

    Personally I think this is either some mod badly interacting or something that got ported from an older version of the file.

     

    @Shrooblord, Since I can't reproduce it, would you be so kind and add the following in line 55:

    printTable(data)

    and post the result?

×
×
  • Create New...