Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Splutty

  1. Thank you guys for keeping this alive. I've been otherwise busy on a lot of things, and don't actively play Avorion at the moment, although I'm sure that will change again in the future :) Glad to see people are still using my mod, even though it's mostly been rewritten by now it looks like. ;D
  2. I've added your message to the original post for now. Thanks for updating things in my absence!
  3. Good to see people provide updates for my mod while I was AWOL :) I'm not sure if I'm coming back to Avorion any time soon. This mod was the thing I wrote while I was stuck sick at home, just to see if I still could. It was mainly meant to be used by myself, but I decided to post it. Good to see people have been using it and thanks from everyone for those who modified it to make things work with newer versions!
  4. There's a list of all the stationscripts used in determining what's a station, so that should be easy to do, as long as Laser has a script that defines the combined station as an actual station.
  5. If you use the / commands to control your ships, the mod shouldn't interfere with any other mods at all, since it doesn't modify any source files. Not sure which mod you mean that gives problems, though :)
  6. Makes perfect sense to me. How would a hyperdrive blocking field distinguish between friendlies or enemies?
  7. It must be some other mod interfering with mine, since there's no way my mod uses up any sort of significant CPU even with 100 haulers. (And yes, I've tried that :) So not sure what's affecting it. But each sector only has 1 ship building the actual list, and if it fails that it'll try to rebuild it in increments of 5 seconds, and the rest basically does nothing and will also increase their polling interval by 5 seconds up to 60 seconds. So the most impact you can possibly have is one goods rebuild every 5 seconds if there's nothing to haul (and with my system with 50 stations that takes a very short time), and one inter-object call for each of the haulers doing nothing every 60 seconds. If they actually *are* doing something, they do a check every 5 seconds if the previous step has finished, and kick off a new flying or docking step. That's about it. I can't see how any of that has any impact. I'll build some timings in my next version, though. Always interesting to see what might be causing this sort of stuff :)
  8. For completeness sake, this is the bit of code that Laser and I are talking about: function setProduction(production_in, size) factorySize = size or 1 maxNumProductions = 1 + factorySize maxNumProductions is used to determine the maximum amount of productions the factory can run at the same time, so it's completely dependent on the size of the factory. Try cloning an XXL Solar Power Plant, and you'll see what we mean. ps. How this ties in with your original question/suggestion: We just need to be able to make player stations different sizes! :)
  9. Do they have weird stuff sticking out of them? In that case they're infected by Xsotan and not claimable anymore. And if you're playing on a server, someone else might have already claimed and sold them.
  10. I end up organizing them in the folder itself, and immediately renaming the templates I want to use to an actual template name that isn't the name of the ship, so it doesn't get cluttered with autosaves. That's about all you can do right now. Sorting, Renaming, Folders, all those would be great to have, though. The same for build templates, actually.
  11. The game actually does do this. Depending on the size of the station you will have more max production slots, so they will produce more. An XL station will run 4 productions (might be XXL), whereas an S station will only run 1.
  12. Read the notes about the asteroid mod, and make sure you have the same versions on client and server, and read the notes about the different installs for client and server if you're running them separately.
  13. That's because most mod coders make no such distinction, and just have you install it on both the client and server. For Single Player games, that's exactly what it does as well, with the difference that the server install and the client install actually *is* the exact same install. As I said, everything that makes changes to the UI needs a client component. And most mods don't bother making two different files for client and server.
  14. the function is not safe related to your concerns, as every invoked function should be prepared for invocation and you could produce errors with wrong parameters or timing ... BUT i think thats not really an issue, since a normal function call can fuck up the same way! plan the functions, invoke only functions that should be invoked and which have onClient() / onServer() conditions ... with producing "bad" code you are always at risk of corrupting things in the game... and invokeServerFunction is just essential to use, since many important function/properties are not available client-side I totally agree that invokeServerFunction is essential, but it would be good to just implement some sort of 'flags' or 'labels' in Lua for the functions that can be invoked. Like public/private but in the client-server terms. Doesn't exist, will never exist, is impossible to do in LUA. Since that's simply not how LUA works. LUA is a single pass script interpreter, basically, and the invoke functions are something that is implemented in Avorion and not standard LUA. LUA has no concepts of objects, private or public functions, or anything like that. Even 'worse' from your point of view is that you can actually store functions in variables, and call them through those variables.
  15. Glad I could help out. This one had me frustrated as well, until I started experimenting a bit, and putting my thoughts to the test.
  16. Hehe. I'll address the part you crossed out regardless. The check for salvageable materials happens every 'tick'. And yes, this is not ideal. The mods I run myself have variable ticks generally, depending on what's going on. But in this case, it happens every second, so it's not that huge of an impact if there's nothing to actually find to salvage.
  17. Hehe. I know exactly what you mean. While I was developing my hauling scripts, the change was implemented with the new thrusters. And my stations were pretty much flying all over the place because of my haulers ramming into them. :o
  18. So you managed to recover your player now? I know it's all a bit complicated ;D
  19. Another good adjustment of the script is removing these lines of code: ShipAI(ship.index):setPassive() ship:invokeFunction("craftorders.lua", "setAIAction") terminate() Those will cause the ship to stop salvaging when there's nothing left, normally. But you have to manually set them to salvage again. Removing these lines will keep them searching for salvage, so when any new salvage appears, they'll go right for it.
  20. You need to run the server from a dos window :) The galaxy-name is what the single player galaxy is called. If you called your single player game "Tuttomenui" then that's correct. This should be shown in %APPDATA%\Avorion\galaxies by default. If it's there, you don't need to do anything with your datapath. Make a backup of your galaxy! So the folder in that galaxies folder that contains your galaxy. To run the server, open a command prompt, and navigate to where your avorion install is, steamapps\common\avorion in the steam install directory, generally. Then run the command, and it should start up the server. If the server is started up, you can give it commands through that same command prompt. Here's how that looks for me: At that point I can type commands into that window, like /status for example, which for me gives the following output: And to check your player type the following command: /run print(Player(1).name) If all that works, then you can start running commands on your galaxy instance. You can save and stop the server with: /save /stop I hope this can get you started. Logging in to this server, you can start your client and go to 'Join LAN', which should list this server if it's running.
  21. Not really. In the case of ships, loading the sector will just invalidate the script in the ship to begin with. Implementing some sort of maintenance mechanic where you can globally remove a script while no one's online would be a good idea, though.
  22. The basic rule of thumb is that mods that do UI changes need to also be on the client side. Most others only run on the server and don't require a client component to be installed.
  23. If you have all the stuff in the appdata path, make a backup of that galaxy. Your server name is as far as I know mostly cosmetic, but doesn't really matter. When you start the server from the commandline like that (from the Avorion steam directory), then you can paste the command into the window it started from. You can directly give it console commands basically. You don't even have to log on or start a client for that.
  24. removeScript removed a script that isn't the current one, terminate() removes the script that is the current one. That's exactly the way you're supposed to do it. For commands for example it's best practice to finish the attached script with a terminate() so they don't stay with the player or entity when they're not used. There are a bunch of examples in this mod forum that use that.
  25. Either your server isn't running, or it crashed. So you'd need to post the server log instead of the client log :) 2017-04-03 18-11-17| Client UDP: Error receiving from, error: No connection could be made because the target machine actively refused it, received bytes: 0 That means it can't contact the local server.
  • Create New...