Jump to content

Nexus

Members
  • Posts

    68
  • Joined

  • Last visited

Posts posted by Nexus

  1. about your first question, you might want to check out the scripts from Carrier commands, it assigns the player's owned fighters to salvage.

     

    https://www.avorion.net/forum/index.php/topic,1032.0.html

     

    It does so by getting all of the fighters in a sector, then figuring out which ones belong to the player. That's functional, but we're hoping to figure out if there are any lua functions that will access whatever the game uses internally when a carrier gives commands to its fighters.

    This is pretty much what I'm trying to achieve, and you are correct the mod does not do that atm. I have been dumping lua tables left right and center in an attempt to find out what is and isn't possible. Tbh, what you want is pretty much what i need to take the carrier commands to the next level.

  2.  

    Here is the serverlog If I start the game without any mods (fresh installation):

     

    Thu Feb 02 01:08:28 2017| Client started: "C:\Games\steamapps\common\Avorion\bin\Avorion.exe" "--serverpath=bin/AvorionServer.exe" 
    Thu Feb 02 01:08:28 2017| Enabled Traces: 
    Thu Feb 02 01:08:28 2017| Client Beta 0.10.2 r7420, running on Windows 8.1+.
    Thu Feb 02 01:08:28 2017| CPU: GenuineIntel 4 Cores
    Thu Feb 02 01:08:28 2017| Init Steamworks...Init Steamworks... ok
    Thu Feb 02 01:08:28 2017| Init Steamworks ok
    Thu Feb 02 01:08:28 2017| Init SDL2... ok
    Thu Feb 02 01:08:28 2017| Getting display mode... ok
    Thu Feb 02 01:08:28 2017| Current display mode: 1920 x 1080
    Thu Feb 02 01:08:28 2017| Creating settings... loading... setting language...setting language file "data/localization/deutsch.po"
    Thu Feb 02 01:08:28 2017|  ok
    Thu Feb 02 01:08:28 2017| Creating client window...Detected 1 displays
    Thu Feb 02 01:08:28 2017| Display 0: x: 0, y: 0, w: 1920, h: 1080
    Thu Feb 02 01:08:28 2017| Using display 0
    Thu Feb 02 01:08:28 2017| Creating window, x: 0, y: 0, w: 1920, h: 1080... ok
    Thu Feb 02 01:08:29 2017| Creating GL context... ok
    Thu Feb 02 01:08:29 2017| Setting window mode WindowedSeamless... ok
    Thu Feb 02 01:08:29 2017| Creating client window ok
    Thu Feb 02 01:08:29 2017| Init rendering... starting rendering... initialize...OpenGL Context Information:
    Thu Feb 02 01:08:29 2017| Version: 4.5
    Thu Feb 02 01:08:29 2017| VersionString: 4.5.0 NVIDIA 378.49
    Thu Feb 02 01:08:29 2017| Vendor: NVIDIA Corporation
    Thu Feb 02 01:08:29 2017| Renderer: GeForce GTX 950M/PCIe/SSE2
    Thu Feb 02 01:08:29 2017| GLSL Version: 4.50 NVIDIA
    Thu Feb 02 01:08:29 2017| Init GLEW... ok
    Thu Feb 02 01:08:29 2017| Init Debug Message Callback... ok
    Thu Feb 02 01:08:29 2017| Set VSync... ok
    Thu Feb 02 01:08:29 2017| Secure BackBuffer... ok
    Thu Feb 02 01:08:29 2017| Init Canvas...Create canvas of size 1920 x 1080... ok
    Thu Feb 02 01:08:29 2017| Init Canvas ok
    Thu Feb 02 01:08:29 2017| Init Refraction Texture... ok
    Thu Feb 02 01:08:29 2017| Init Post Processing... ok
    Thu Feb 02 01:08:29 2017| Init Debug Renderers... ok
    Thu Feb 02 01:08:29 2017| Rendering initialized
    Thu Feb 02 01:08:29 2017| Init rendering ok
    Thu Feb 02 01:08:29 2017| Check problematic drivers... ok
    Thu Feb 02 01:08:29 2017| Init shader level... ok
    Thu Feb 02 01:08:29 2017| Init loading screen... ok
    Thu Feb 02 01:08:29 2017| Draw first loading screen... draw... ok
    Thu Feb 02 01:08:29 2017| Init SFX... ok
    Thu Feb 02 01:08:29 2017| Init Input... ok
    Thu Feb 02 01:08:29 2017| Init GameInput... ok
    Thu Feb 02 01:08:29 2017| Init Main Menu... ok
    Thu Feb 02 01:08:31 2017| Init Music... ok
    Thu Feb 02 01:08:31 2017| Apply loaded settings... ok
    Thu Feb 02 01:08:31 2017| Client initialized
    Thu Feb 02 01:08:31 2017| Received stats and achievements from Steam
    Thu Feb 02 01:08:34 2017| Starting server 'bin/AvorionServer.exe' with arguments '--galaxy-name defaultgalaxy --server-name Freaky's Server --port 27000 --public 0 --listed 0 --authentication 0 --exit-on-last-admin-logout --admin 76561198031583794 --use-steam-networking 1 --threads 3 '
    Thu Feb 02 01:08:36 2017| Waiting for Online polling threads
    Thu Feb 02 01:08:36 2017| Online polling threads finished
    Thu Feb 02 01:08:36 2017| Waiting for LAN polling threads
    Thu Feb 02 01:08:36 2017| LAN polling threads finished
    Thu Feb 02 01:08:36 2017| remote address: ip, init: steam
    Thu Feb 02 01:08:36 2017| Connecting to server at 127.0.0.1:27000
    Thu Feb 02 01:08:36 2017| Client UDP: Error receiving from 127.0.0.1, error: Eine vorhandene Verbindung wurde vom Remotehost geschlossen, received bytes: 0
    Thu Feb 02 01:08:41 2017| Initiating connection with server ID 90106644372345864
    Thu Feb 02 01:08:45 2017| Authentication successful!
    Thu Feb 02 01:08:49 2017| Received system error: Ein interner Fehler ist aufgetreten. Verbindung wird beendet. Server Version: Beta 0.10.2 r7420
    Thu Feb 02 01:08:49 2017| Client received DC message: 
    Thu Feb 02 01:08:53 2017| UDP closed
    Thu Feb 02 01:08:53 2017| Client UDP: Connection closed
    Thu Feb 02 01:08:53 2017| Client UDP: Error receiving from 127.0.0.1, error: Eine vorhandene Verbindung wurde vom Remotehost geschlossen, received bytes: 0
    Thu Feb 02 01:08:54 2017| Server shutdown successful.
    Thu Feb 02 01:08:54 2017| UDP closed
    Thu Feb 02 01:08:54 2017| Client UDP: Connection closed
    Thu Feb 02 01:08:55 2017| Exiting client.
    Thu Feb 02 01:08:55 2017| Exited client main loop.
    Thu Feb 02 01:08:56 2017| Waiting for Online polling threads
    Thu Feb 02 01:08:56 2017| Online polling threads finished
    Thu Feb 02 01:08:56 2017| Waiting for LAN polling threads
    Thu Feb 02 01:08:56 2017| LAN polling threads finished
    Thu Feb 02 01:08:56 2017| Stopping local server ...

     

    Translation: The connection was closed by remotehost.

    A intern error happened. Connection was closed.

     

    And If I add only your scriptloader.lua into data/scripts/player everything works fine again.

    (it doesn't matter if I use the beta version or not). Maybe you can reproduce the error with your savegame too (backup!). You need a savegame which used your mod. Than you delete the game (also the scriptloader.lua) and redownload it. I hope it's only something wrong with me :/

     

    Ok, it finally replicated for me and its....annoying. You will need to unregister the script.

     

    First off, download the script uninstaller off of the main post, then load up the save once with scriptloader.lua sill in its place. After that, save and exit. Now removal of the scriptloader.lua file should be possible...also I'm going to search for a better solution to this.

     

    your salvage fighters may follow you to some salvage that is closer to the ship

    It is possible to toggle this feature via menu ?

    Sometimes it is useful, sometimes not like you you salvage self a big wreck while you release your fighter on cloud of wrecks.

     

    Not atm, It would be possible if i could attach the script directly to the fighters but that seems impossible, the script applies but is immediately removed it seems.

     

    EDIT: That being said, i did just have an idea, ill see if i can base the carriers next salvage target upon its previous target position...that should give the effect your looking for to an extent

  3. Possible to add a Mining Button?

     

    I know, you cants have mining and salvage at the same time, but if i give salvage ships in, and the mining out, i can go mine, or?

    Would you implement them like you captains mod?

     

    I could try to see if the mining fighters will work in the same way, Not sure though. Remember im using an oddity i noticed in the salvage fighters for this to work..since i cant seem to attach scripts to them or command there AI directly. But ill check to see if miners can work in the same way.

  4. I have a problem. I tried to remove your mod but I got error message (no connection to server). So I deleted the whole game and all the files and load it again, but I got still the same error message. After some experiments I reproduce the error if I only delete your scriptloader.lua.

    I saw in the player_1.dat (part of the save) file that there is a connection to your scriptloader.lua... any solutions? Or I do something wrong?

     

    Check data/scripts/server/server.lua and remove the line "player:addScriptOnce("player/scriptloader.lua")" if it is still present, other than that I would have no clue why it is causing you not to load and i would need to see the server log.

     

    @balabalalde, is the mod installed on both the client and the server? As that should not be happening..unless i goofed somewhere...Server log would also be helpful.

     

    Also the command was  /run local ship = Entity() ship:addScriptOnce("data/scripts/entity/carriercraftorders.lua") but i would like to see a server log first.

  5. Works great so far, the only thing i noticed is that if enemies come withing the "defender" range they will try to attack enemies instead.

     

    Maybe you can easily do this for mining ships as well?

     

    there is a fairly similar script in mine.lua, on line 45 maybe that can help you out  ;)

     

    Oh i know, my Captained ship salvage commands mod is based on a modification of the mine.lua. I do intend to add that, the only problem is that currently both salvaging fighters, and mining fighters count as unarmed. And currently because i cant seem to get the weaponType the fighter has for comparison I'm just checking if the entity counts as unarmed.

     

    This means both mining, and salvaging fighters will obey the salvage commands. Once i get this worked out...if i get it worked out...I can hopefully add in the command for miners as well.

     

    And as for the salvage fighters attempting to defend you..yah lol. It would be better if i could make them work under the 'attack' mode instead of the 'defend' mode. But it seems that attack mode fights me for control thus fighters just act all conflicted when set to that.

  6. Working great in multiplayer so far, just two players though. While both of us have the scripts installed, I'm the only one to have used them so far, due to my friend not finding any salvage fighters in time to use em before calling it a night.

     

    hehe, I have made several updates today. Hopefully most of the annoying problems are fixed now.

  7. Working only after entering /run local ship = Entity() ship:addScriptOnce("data/scripts/entity/carriercraftorders.lua"), jumped a sector before attempting to use, but the extra puzzle piece showed up immediately.

     

    Yes, i just managed to replicate the issue on my end as well..seems finicky ill look for a better solution to applying the script.

     

    EDIT: oh..its not finicky.....it just defaultscript.lua seems to only be applied on ship founding...which is what i did, ill add something to the login code to check the playercraft for the script.

  8. That's where I first checked, nothing. Nothing after getting back in, either.

    humm, ss by chance?

     

    if all else fails try to run this command:

    /run local ship = Entity() ship:addScriptOnce("data/scripts/entity/carriercraftorders.lua")

     

    You may still have to jump a sector and come back though

  9. There is. It's also the ship I'm usually flying myself, but still had no extra orders when I switched to drone and seleced it.

    ahh, thats the problem, you need to be inside the ship for the orders to show up. So get back in your carrier and check the upper right hand corner for a second puzzle piece.

  10. Yes, replaced the defaultscripts.lua with your own. Lemme know if that's the wrong log, haven't yet poked at this games logging stuff.

     

    All that matters is that its the most recent one =P

     

    I see no errors in it....you know on a hunch is their a captain in the ship your in? This script only works on the ship your currently flying.

  11. Removed the old scripts, installed the updated stuff... exact same lack of orders/new puzzle piece in top right. Have hopped out and back into ship, jumped sectors, restarted game, nothing, still.

     

    Humm strange, can you put up your log file by chance?

     

    Also when you installed the mod, were you asked to replace defaultscripts.lua? i overwrite that file to add in the ship menu

  12. Not working for me, dunno why.  Installed as you said to, launched game, no new orders, lack the extra puzzle piece you mentioned that should be in top right.  Double checked install locations, looked good there, restarted game, still nothing. Reinstalled the script, still nothing. Fighters just ignore wreckage unless I target it and tell them to attack.

     

    Would your earlier captained ship salvage script be interfering? I do have that script installed, haven't tried yanking it out to try without, yet.

     

    There both independent, humm, ill have to check the files, i did do some trimming just before i put up the files. I may have broken something.

     

    EDIT: HA oops, damn it...typed '!=' instead of '~=' in a single spot, this is probably a good reason why i should not post mods while half asleep =P

  13. DISCLAMER: When the 1.8 mod update is released, this mod install will be one way only. It will make non-reversable changes to your universe. A more detailed explanation will be added to the post as 1.8 nears

     

    This mod adds a new UI to ships with hangars that will allow you to issue commands to launched fighters. While not perfect, it does aim to solve some of the issues with fighters and their limitations the best that it can. At least until koonchi gets a chance to work on them more.

     

    The mod currently supports mining and salvaging fighters. The mod cant differentiate between the two, so it would be best if you limit your launched fighter type to one at a time. I am attempting to solve this, but its proving difficult. Most likely there is a API limitation preventing me from determining if a fighter is a miner or a salvager.

     

    One thing I should note though, there can be intermittent problems with fighters not obeying commands. Also fighters wont go after loot directly like captained ships can, I tried and am still working on getting that part working. They will still pickup stuff if they get close enough though.

     

    Installation:

    Go to your Avorion installation directory, and drag the data folder into it. It will ask you to overwrite server.lua, do it the server.lua overwrite is needed to apply the new scripts I added.

     

    The script should automatically apply to all ships with a hanger.

     

    How to use:

    The menu is only selectable from within the ship, so you must be currently piloting the carrier you wish to issue orders from. When you look in the upper right hand corner of the screen you should now see a second puzzle piece, that second puzzle piece will allow you access to the commands. Currently there are two commands, Salvage and Idle, hitting idle will disable the script. Maybe there will be more in the future =)

     

    (1.7 Update) New command, Mine, fighters will seek out and mine ore rich asteroids only. An option will come later that will allow them to strip a sector.

     

    Launch your fighters in defensive stance, it will only work if they are in this stance.

     

    (1.5 Update) Now the commands will only be issued to fighters of the unarmed type, so miners and salvage. You can mix combat ships with salvage ships now.

     

    Btw, if there is anyone who wants to suggest changes/optimizations to the code I'm all for it.

     

    Uninstalling

    Go to a close by empty sector before uninstalling, also your ship will most likely vanish after uninstalling..so break it down first

     

    Due to the fact I'm binding a script to the player, if you uninstall this script you will need to do a few steps. First download the uninstaller script then install that like you would the mod, and leave the scriptloader.lua in its place. Then run the game once and load up the save, after it loads save and exit. You should now be able to remove scriptloader.lua safely.

     

    If your installing this on a dedicated server, you should only have to run the uninstaller on the server itself.

     

    Known Issues:

    Putting fighters into 'attack my target' mode will cause them to stop working, that's an effect of the state, Keep them in defensive.

    The salvage command effects all fighters not only salvage ones, working on it.(1.5 Update)Mostly fixed, commands only effect unarmed fighters now, so miners and salvagers.

    The menu is available to ships without a hanger equipped.

    Fighters wont go after drops directly, they will still pick up stuff they get close enough to, but that's it.

     

    Changelog:

    1.7(Current):

    - Added mining Option, it currently only mines asteroids with resources.

    - First iteration of a fighter settings menu.

    - First set of *possible* fighter settings, at the time of this writing there are two settings being worked on.

        The first setting limits the number of fighters per wreck target -Has too many issues, need more time

        The second setting changes how wrecks are targeted, from the carrier position, to the fighter position. This disables the fighter limit per wreck as fighters will begin to spread out on there own anyways.

    NOTICE: Only the menu UI for these options have been made, their programming hasn't been finished yet.

    -Added tooltips for each option.

    -Redid how the automatic unloader for scriptloader.lua. Instead of iterating through EVERY entity, it only gets those with the scripts attached.

    -The salvage script for carriers auto terminates itself now when there is no wreckage left in the sector.

     

    1.6:

    Before installing 1.6, validate your files to remove the changes to defaultscripts.lua

    -Removed changes to defaultscripts.lua(they are no longer needed)

    -Script is now installed in the ship using onShipChanged rather than onSectorEntered, this means you no longer need to jump to another sector to enable the commands, they auto enable when you start/login to the map since each time you do that you 'enter your ship' so it always applies.

    -Script now disables itself after the user logs off the server/world they are on. This is to assist with uninstalling

    -Script now will clear itself from NPC ships..which where never meant to have it in the first place.

    -Any galaxy created from 1.6 and up should not have any uninstall issues (ships vanishing/sectors being empty etc) so long as instructions are followed.

    -Any galaxy created before 1.6 you will need to visit each sector you where in prior to uninstalling to remove the scripts from the NPC ships. If you don't your ship may randomly vanish when entering a sector, as a sector loading error will occur.

    -You will notice a delay in logging off due to the script removal, this is normal.

     

    1.5- MAJOR, Managed to get it so only non armed fighters will listen to salvage commands. So you can mix salvage fighters with combat fighters now. But don't mix salvage and mining fighters, as mining fighters count as unarmed.

    1.4- Cleaned the script that handles attaching the new script to pre-existing ships. Faction issues should be completely solved with commanding fighters.

    1.3- Scripts will now be properly applied to ships when jumping to another sector.

    1.1- Cleaned up carriercraftorders.lua, fixed a derp with the code that was preventing the menu from showing up

    1.0- Released

    Uninstaller.zip

    CarrierCommandsv1.6.zip

    CarrierCommandsv1.7.zip

  14. Thank you so much!  Someone linked me this on Reddit, so I immediately installed it and am now watching my salvage ship go nuts on a map.  Least I can do with all my new found free time is say thanks!!

     

    Your welcome, A new version of the mod will pop up shortly that addresses salvage fighters, its not perfect but its a major improvement.

  15. Seeing as a system doesn't even exist until you visit it and it's generated, clearing the "Entire galaxy" is literally clearing the currently loaded sectors. Which, as they're already loaded, running a script that iterates through each one to clear the wrecks across the server isn't going to do much at all -- seeing as the server will already be keeping those sectors in memory. As long as you don't do something stupid, like try to clean all the sectors in one single process and instead iterate through them, say one every 250 microseconds, it'll not even be noticeable on performance.

     

    From my understanding, sectors are not constantly loaded, they unload after around...what was it 5 minutes? after all players leave the sector. So the chances of all the sectors that have been visited by players being already loaded isn't very high. Most likely you will have a small number of sectors loaded over the total number of sectors visited. The other issue is he wants to do this on a restart, that is when the fewest number of sectors is loaded.

     

    The better option would be attaching something to the sector loading operation to 'trim' the number of wrecks when someone jumps into the sector...although that may screw up scrapyards O_O

     

    EDIT: lol Kane beat me

  16. Would there be a way to get similar from salvage fighters? As (AFAIK) they currently only go for something that is directly ordered and usually cut it into parts that they then ignore.

     

    I'm currently working on a version that should hopefully add a 'Carrier Command Menu' to ships with hangers. Simply put it attaches the lua to the deployed fighter rather than the ship itself. This would allow the fighter to automatically detect and go after salvage targets like a captained ship can.

     

    But there are some technical hurdles to overcome for me. I has been years since i have touched lua, so I'm about as rusty as a car left in a barn to rot for about 20-30 years...oh and the barn had no roof the whole time lol.

     

    I have some of the scripts made, but not tested, I'm still trying to decide how I want the fighters to be assigned their targets. Do I want the carrier to assign them? or do I want the fighters to figure it out themselves? And how should I handle the fighters when there finished? Oh and don't forget the fun one, How the hell do I know I'm applying this to a salvage fighter and not a attack fighter?

     

    Also this last patch has thrown me another curve ball, before the patch I almost never had sp server crash issues...now its happening all the time. And no log to show what happens, it just cuts off after posting a timestamp...makes me wonder if its a logging action itself that's making it crash *shrug*

     

    But ill see how much of it I can get done tomorrow. I really want to start testing the scripts, knowing my luck I'll spend all day tomorrow attempting to apply a script to a fighter and fail miserably. =P

     

    The script itself is quite nice, but I've found there is such a thing as too big of an automated salvage ship, cause of how AI ships fly, combined with knife fight range of salvage turrets.

     

    Yes..build small, also try to put the turrets around the 'root' block, im staring to notice that the salvaging turrets seems to have an issue tracking targets while the salvaging ship is moving around....it is in some cases just completely missing the part by a long shot. Seems to be more of an issue the further away the salvaging laser is from the root block, and the scale of the ship seems to effect it as well.

     

     

  17. I originally posted this on the steam forums, thought I would post this here as well, incase anyone else finds it useful.

     

    This is a small mod I made that adds a salvage mode for ships with captains in them.

     

    I should note that as with mining, when told to salvage the ship is literally told to 'attack' the wreck it has targeted. It does this without checking what weapons it has equipped. As such to avoid any issues, it's best to have a dedicated salvaging ship use the commands.

     

    The mod adds two commands, Salvage and Clean Sector.

     

    The Salvage command works as intended, it will only salvage wrecks that have a listed resource content and value. Which not all pieces have so some will be missed.

     

    The Clean sector command no longer cares if the wreckage has a resource content of value. It will mine away ALL wrecks.

     

    Go to your install directory, using steam right click on the game and to go Properties->Local Files->Browse Local files

     

    And place the data folder in the zip file inside that directory that pops up. Then run the game

    Salvage_Command.zip

×
×
  • Create New...