Jump to content

Splutty

Members
  • Posts

    258
  • Joined

  • Last visited

Everything posted by Splutty

  1. When the game is busy initializing your ship and player data, it can take a long time. I have a rather crazy beast of a machine, but when my player had 4300 unique items in its inventory, it wouldn't load in for me either. If the game is working on a specific task (generally things like traversing tables, or sorts), then it won't respond to the queries Windows tries to see if it's still alive (the rotating blue circle thing if you're running Aero). That means that Windows thinks it's dead, while instead it's just really busy. Hence my advice to ignore windows. Unless and until your client log actually shows a crash, or the game disappears from the task manager, it's not dead yet. You can also check in the task manager if it's using up CPU cycles. Some of the loading stages look an awful lot like the game is hanging.
  2. I've been trying to rewrite dock.lua for this, but it's not as easy as I'd hoped. lol
  3. If you start your server standalone, you can run commands from the console. Make a backup before running this (obviously). (Edit: Default location: %APPDATA%\Avorion) but I think you'd already found that one since you posted the galaxy :) This is the command I use to start a galaxy: bin\AvorionServer.exe --galaxy-name dedicated_server --server-name "Splutty's Server" --datapath g:\games\avorion\servers --max-players 10 --use-steam-networking 1 galaxy_name should be the name of your single player galaxy, datapath you probably don't need if you have it saved in default, server-name is what shows up when you search for it. This script will remove ALL items from your ship's inventory that are blue or lower quality: /run player=Player(1); inv = player:getInventory(); inventory = inv:getItems(); for k,v in pairs(inventory) do i = inventory[k].item; r = i.rarity.value; if (r < 3) then inv:removeAll(k) end end The 1 in Player(1) is the number of your playerfile. Which if it's single player, should be 1 :) But you can check in your galaxy's 'players' directory. I take no responsibility for you completely destroying your galaxy, blowing up the ship's cat, or getting lost in a Hawking Hole. This helped for me when I had 4300+ unique items in my ship's inventory, and I couldn't load in anymore.
  4. You can check my haulgoods.lua script in http://www.avorion.net/forum/index.php/topic,2896.0.html It calls functions in the same script in other objects and has some simple things in there to check/test/set/return values in other objects. Basically you make functions in the object that set or return the values in that object. Example to set or get the debuglevel in an object that's running my script: function getDebugLevel() return debugLevel end function setDebugLevel(arg) debugLevel = tonumber(arg) end Which will set the global debugLevel in the script this function is called in. Called like this: local retval, level = ship:invokeFunction(haulscript, "getDebugLevel") local retval = ship:invokeFunction(haulscript, "setDebugLevel", debugLevel) You need to let go of the C++ type OOP implementations, where "object" is just the name of a blob of code, and start thinking as objects being *actual* objects, like a ship, or a station, or a sector. To find all ships in a sector, you will call a function in the sector that will return a list of ship objects. Each of these ship objects have a number of scripts attached to them that will have certain functionality. In my example, "haulscript" is the global variable I've defined that contains the definition of the script that provides the setDebugLevel and getDebugLevel functions for JUST that script. local haulscript = "data/scripts/entity/ai/haulgoods.lua" Another script can have exactly the same functions, but will still only work in the context of that script attached to that specific ship object. Within the script, Entity() will be the object it's attached to. There is a lot of function documentation (very unfinished) in the Documentation folder of your Avorion install.
  5. My HaulGoods mod should probably go in the QoL list. Let's ships automatically do all the trading within a sector. http://www.avorion.net/forum/index.php/topic,2896.0.html
  6. Might an if check which looks for what the hauler has in its cargo and all the things it can sell in the sector before it starts doing trade routes alleviate the problem? I must confess, i havent looked at your script yet. And after i am done doing these trade runs, i will have a look 8). if i have better ideas, i will let you know. It might, but that's not really what the mod was for :) I've thought about building in a 'recovery' mode, which saves and loads what it was doing last and tries to continue doing that, but haven't gotten around to that yet. I mainly built all this for my own sector with my own factories, so it's not really very multi purpose. It will work in a sector where you can do trade between NPC stations as well, since that was only a small adjustment to make. A bigger problem is ships getting stuck on each other when they're at the same docking port. Since getting a 'random' docking port doesn't seem to be random at all :)
  7. The hoster should already be an admin, and can add admins from in-game. List and examples (most likely already outdated :): https://steamcommunity.com/sharedfiles/filedetails/?id=852704603
  8. This question comes up every so often. No. There isn't. Which is a good thing, because editing that file and getting strange behaviour in an EA game.. Not good. You won't be able to distinguish what's caused by your meddling and what's an actual bug. Most of the editing you'd want to do, there are in-game tools for to begin with.
  9. Step one: Ignore Windows. Just let it run. Step two: Keep ignoring Windows. Step three: Profit! Or at least a usable client log when it actually crashes :)
  10. Aha. That looks suspiciously like a similar 'just hang' that was fixed in the last patch. This might be on unloading a sector? In which case, if a mod gets into an eternal loop, this would explain the error and the hanging of the server.
  11. Nope. Neither affects the other really. Since the only traderoutes currently in existence are actual players. NPCs don't trade, they just randomly buy and sell. And if you, as a player, buy 500 somethings from a station, then jump out, those 500 somethings will never be replenished (unless you run a mod like OutOfSector Production) From what I understand, all this is in the planning to do, but there are some mods that solve this issue. The game itself however doesn't provide a reliable way for NPC traderoutes, or for that matter, PC traderoutes. I wrote a mod that will run traderoutes within one sector (mainly because I have a sector with 30 of my factories/farms/etc in it), but it's impossible to do it across multiple sectors for now.
  12. Traders have nothing to do with this mod. The only thing this mod does is check the factories when you warp in, and based on the time passed since your previous warp in, determines whether factories need to have produced something in the meantime (which they won't have, since they weren't actually loaded due to game mechanics). It then adjusts the values of all the trade items in the factory to reflect the status as it should be.
  13. Short answer: They're random scripts being spawned. Long answer: At random a hauler is spawned, which will check all stations in the sector it's spawned in, pick one and pick a good, and then either buy it or deliver it. That's how you get Coal when Coal doesn't actually exist anywhere. Complicated answer: data/scripts/sector/traders.lua
  14. For the coding part: Once a script in a ship has failed, it won't be re-enabled unless the whole ship is reloaded. In normal speak: If you leave a sector for 5 minutes, it'll be removed from memory, which means that when you jump back in, it'll be completely reloaded, including the buggy ships, which will then have all their commands back. For aliens vs pirates. If you just let them go, the aliens will kill the pirates. Just dodge the pirates until the aliens have killed them :) Once your ship stops responding, you can hit ' (quote) and you'll get the top half of your screen as debug output. If there's a notice in there relating to a ship, you can safely assume it bugged out on you (quote again to close that screen). If you play in single player, it might be quicker to just restart the game than do the 5 minute thing.
  15. It's a well known nautical rule that as a little ship, you better get out of the way of that oil tanker :D On the shields part, not at all strange. Deflection light or projectiles is on a whole different level than deflecting either an enormous station mass or a whole ship. I personally have just dialed back collision damage to 0.25 and that seems to work. You still get damage if you hit something, but at least you don't blow up straight away in most cases.
  16. There's another bug where if you click the 'transfer 25' button and you have less than 25 it'll just start transfering whatever's next.
  17. It needs to replace the 'transfercrewgoods.lua' file, so you can check if it did. On the server side, either just restart the server, or otherwise make sure that the ships you're testing it with have been reloaded.
  18. Okay. Now that you mention it, I can just about make out the turrets. lol And that's bizarre behaviour! Does it go away when you quit building mode, or do they just keep floating?
  19. It would be nice if we could just colour it, including 'invisible'. That would help greatly.
  20. This is something I've been wondering about as well, whether it's possible to put the 'needed crew' as something actually in relation to what your crew at that moment is. As you've noticed, right now it just takes 1 crew 1 slot, and doesn't take into account any training for any crew. You can still open the ship menu in build mode to see what the actual numbers are, but it would help if it showed in the build menu itself.
  21. There is a relatively simple mod for that in the Mods section :) http://www.avorion.net/forum/index.php/topic,1895.0.html
  22. Of course! That's where it can actually earn money ;D I also built in a check where it only transfers the largest amount possible. So if 1000 is needed somewhere, and a station sells 500 and another 100, it'll always pick the 500. I'll have to think about how to implement a limitation on what stations it's allowed to visit. As to 1: There's not much I can do about that :( I've had NPC haulers squish my ships as well, and when I'm running 3 of them at once, they squish each other. The 'get a docking port' routine seems to always pick the same one, so everything piles up there. I've been messing around a bit with the dock code, but I'm not sure if I can fix it in such a way that it doesn't affect a lot of other things. And I can't fix the 'playership getting crushed' issue at all. For number 2, yes. If it's bought things and gets interrupted, then depending on who's the actual dispatcher and at what point it picks up again, it won't sell it. I've tried to alleviate this problem somewhat by making it so the hauler tries to sell everything if there's more in the cargo bay than what was originally planned, but that doesn't always work either. For those things, there's still some manual intervention required, unfortunately. Thanks for using it and posting the issues :)
  23. Shhh. Don't spoil it :D
  24. And that's where your ship stopped responding to commands. I've had similar issues with a script failing, and the ship completely stopping or just endlessly continuing the last command. Reloading the sector works to fix that (jump out, wait for 5 minutes, or whatever you unload time is, jump back in). If you check your console log, you will almost certainly see an error there when you run into this issue again. And I actually do my ship building in one of my friendly faction's home system, which has plenty of defenders and I never get attacked by anything :)
×
×
  • Create New...