Jump to content

Aki

Members
  • Posts

    166
  • Joined

  • Last visited

Posts posted by Aki

  1. I didn't find anything for targeting but you can order AI ships to target other Entity: ShipAI():setAttack(Entity), but I'm pretty sure it is not what you were looking for.

     

    As of reloading scripts. Again, nothing that really reloads your script, but let you load certain script from file each time you want to use it: loadfile(filepath). Note that root directory of Avorion is also root directory of lua instance, so you will need to use data/scripts/ as prefix most of the time in filepath. This will load that certain ship each time you will want to execute it. It returns function. Body of this function is file content.

  2. The way the help with the inventory command worked was tedious. I made some alterations to make it more simple and easy to find how to get the help you would need.

    I never coded in this lua stuff. But it does work.

     

    /inventory <null> "Usage: /inventory help , upgrades? , turrets? , materials?, rarity?"

     

    /inventory help  "Modifies inventory of a player. Usage:\n/inventory turret <type> [rarity] [material] [tech] [amount]\n/inventory upgrade <script> [rarity] [amount]\n/inventory available <turrets|upgrades|materials|rarities>"

    and..

    /inventory upgrades? as well as the rest print out the available lists.

     

    having to type out /inventory available  , over and over was inefficient.

     

    also by adding in the null agr it rendered most if not all of your invalid inputs obsolete.

    I mean, it still works in the same way. The main reason behind "available" action was to avoid additional actions you have just added. It can be changed to something shorter ("list"?) or maybe work with short aliases for each action, but the general design won't be changed, because it is there to make command readable and structured not fast. Notes taken, I will make it shorter and probably add aliases. I won't use your code though.

     

    Your code indeed works, but it is not entirely valid (null).

     

    On a side note, you don't need to type it over and over. Just type it once then use history. ;)

     

    Thank you for your feedback.

  3. I want to give some messages to the player like:

    "Restart in x seconds, Minutes, Hours"

     

    That isn't possible with a external script. I would do it external, wich is pretty easy, but then i dont have the messages.

    I mean, such a small script, wouldn't do much to server performance.

     

    But that is possible. You can send CLI commands to server console in e.g. tmux.

  4. First issue I see is:

    then = now + 3600

     

    You can't use then as identifier.

     

    You could use os.execute([command]) to use external commands as far as I tested - it works.

     

    But putting server restarting script into the server itself is a bad design. There are tools that allows you to schedule tasks on most OSes. Using external scripts to manage server is easier to use and to configure, is more secure and more fault proof.

  5. Oh we taking requests :P I like to see all these ;)

    http://imgur.com/a/1o4jf

    Yeah, because giving permissions to debug panel and attaching it to every creative ship, especially on multiplayer is a great idea. ;)

    The whole idea of this commands is to make them manageable via `admin.xml` and give proper rights to selected groups of players. Another nice thing is that they are server-side only, so you can have custom commands on the server without players downloading them.

     

    Hello~ Would you mind making a lua file to download? I have no clue how to implement this into the game file  :(

    Once the package will have good amount of commands or steam workshop will be available.

    For now, just download the files listed in first post with e.g. RMB > "Save link as..." and then just put them to the paths listed also in the first post. You can get to the root of Avorion via Steam. In library, Avorion properties > Local files > Browse local files.

  6. In commands scripts currently it works like this (in this example my player is id 1):

    Galaxy():findFaction(1) returns Faction of Aki,

    Galaxy():findFaction("The Uhvoocgjoiqt Church") returns Faction of that Church,

    Galaxy():findFaction("Aki") returns nil

    Galaxy():findFaction("76561198082681701") returns nil

    Galaxy():findFaction(Player(sender).name) returns nil

     

    I have tried it with Player() in scope it was available:

    Galaxy():findFaction(Player().name) returns nil

     

    I'm pretty sure I could use it previously with player name as faction name.

  7. Avorion Community Commands Package

    This mod is currently outdated, please use it with caution.

    Sadly for now I don't have enough time to sit down and release new version of this package, sorry. I'm planning to update it but the date is unknown.

     

    Description:

    This package contains commands for use of server administrators and general use of players. All commands are meant to be server-side only to avoid incompatibility with clients and make it easier to install and use on servers.

     

    Package repository is hosted on github. We are open for any kind of contribution. Further details available on github page.

     

    Commands:

    /crew

    Adds or removes crew to currently boarded ship. Usage:

    /crew help or /crew for help

    /crew add <profession> [rank] [level] [amount]

    /crew fill

    /crew clear

     

    /inventory also: /inv

    Modifies inventory of a player. Usage:

    /inventory turret <type> [rarity] [material] [tech] [amount]

    /inventory upgrade <script> [rarity] [amount]

     

    /price

    Prints price of currently boarded ship. Usage: /price

     

    /sethome

    Allows player to change home sector to current if friendly or own station is present. Usage: /sethome

     

    /whereis

    Gets the position of a player. Usage: /whereis <name>

     

    /list

    Lists possible variables for /inventory or /crew. Usage:

    /list <type>

    /list help or /list for help.

     

    /agoods

    Adds goods to currently boarded ship. Usage:

    /agoods <good name> <quantity>

     

    Must capitalize all names

    Must replace spaces with _(underscore)

    Can not add more then your hold can handle

     

    /agood Steel 100

    /agood Steel_Tube 10

     

    /fighter

    Adds a fighter to the payers hanger. Usage:

    /fighter add <weapons> [rarity] [material] [tech]

     

     

    Files:

    scripts/
    ├───commands/
    │       crew.lua
    │       inv.lua
    │       inventory.lua
    │       list.lua
    │       price.lua
    │       sethome.lua
    │       whereis.lua
    │       agoods.lua
    │       fighter.lua
    │
    ├───lib/cmd/
    │       common.lua
    │       materials.lua
    │       professions.lua
    │       ranks.lua
    │       rarities.lua
    │       upgrades.lua
    │       weapons.lua
    │
    └───player/cmd/
            crew.lua
            price.lua
            sethome.lua
            tellposition.lua
            whereis.lua
            agoods.lua
            fighter.lua
    

     

    Installation:

    You can download current package from GitHub: download link.

    Once you have downloaded and unpacked, move scripts/ directory into your <Avorion>/data/ directory.

     

    If you plan to host a public server with some of these commands available for players/moderators/other groups, you will need to configure admin.xml located in your galaxy root directory.

     

    If you want you can clone it into <Avorion>/data. and then use git for updating.

     

     

    Suggestions for new commands, feedback, bug reports or pull requests are welcome. Enjoy!

  8. Server start:

    Tue Jan 24 10:03:38 2017| Avorion server Beta 0.10.1 r7302 running on Ubuntu 14.04.5 LTS starting up in "~/.avorion/galaxies/FreshGalaxy"
    Tue Jan 24 10:03:38 2017| CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz 8 Cores
    Tue Jan 24 10:03:38 2017| name: Persistent Vanilla
    Tue Jan 24 10:03:38 2017| seed: VGrFTZZgEi
    Tue Jan 24 10:03:38 2017| port: 24000
    Tue Jan 24 10:03:38 2017| max online players: 30
    Tue Jan 24 10:03:38 2017| save interval: 1200
    Tue Jan 24 10:03:38 2017| broadcast interval: 5
    Tue Jan 24 10:03:38 2017| max loaded sector time: 300
    Tue Jan 24 10:03:38 2017| weak update: yes
    Tue Jan 24 10:03:38 2017| worker threads: 1
    Tue Jan 24 10:03:38 2017| difficulty: Veteran
    Tue Jan 24 10:03:38 2017| infiniteResources: no
    Tue Jan 24 10:03:38 2017| collision: 1
    Tue Jan 24 10:03:38 2017| access list: Blacklist
    Tue Jan 24 10:03:38 2017| public: yes
    Tue Jan 24 10:03:38 2017| listed: no
    Tue Jan 24 10:03:38 2017| steam networking & authentication: yes
    Tue Jan 24 10:03:38 2017| administrators: 
    Tue Jan 24 10:03:38 2017| Warning: Your server does not have an administrator assigned.
    Tue Jan 24 10:03:38 2017| Starting up 1 worker threads.
    Tue Jan 24 10:03:38 2017| no file "~/.avorion/galaxies/FreshGalaxy/jumps.dat" found
    Tue Jan 24 10:03:38 2017| Game Port: 27000
    Tue Jan 24 10:03:38 2017| Steam Port: 27021
    Tue Jan 24 10:03:38 2017| Steam Query Port: 27020
    Tue Jan 24 10:03:38 2017| Polling Port: 27003
    Tue Jan 24 10:03:38 2017| 
    Tue Jan 24 10:03:39 2017| Server connected to Steam successfully
    Tue Jan 24 10:03:39 2017| Server is VAC Secure!
    Tue Jan 24 10:03:39 2017| Game Server Steam ID: 90106464047587328
    Tue Jan 24 10:20:59 2017| OnP2PSessionRequest from 76561198038199516
    Tue Jan 24 10:21:00 2017| Steam authentication confirmed for 76561198038199516
    Tue Jan 24 10:21:00 2017| Authentication successful for 76561198038199516
    Tue Jan 24 10:21:00 2017| Connection to player established
    Tue Jan 24 10:21:03 2017| New Player registered: 76561198038199516 [Private AJ "Skippy" Hops] index: 1
    Tue Jan 24 10:21:03 2017| <Server> Player Private AJ "Skippy" Hops created!
    Tue Jan 24 10:21:03 2017| Creating sector at (444:-68)
    Tue Jan 24 10:21:03 2017| <Server> Player Private AJ "Skippy" Hops joined the galaxy
    Tue Jan 24 10:21:03 2017| Player logged in: Private AJ "Skippy" Hops, index: 1
    Tue Jan 24 10:21:15 2017| player events roughly every 11.82 minutes
    Tue Jan 24 10:21:15 2017| Creating sector at (447:-68)
    Tue Jan 24 10:21:15 2017| Creating sector at (436:-67)
    Tue Jan 24 10:26:28 2017| Tue Jan 24 10:26:28 2017| Creating sector at (437:-72)
    Tue Jan 24 10:26:28 2017| Creating sector at (430:-61)
    Tue Jan 24 10:28:00 2017| <Server> Player Private AJ "Skippy" Hops left the galaxy
    Tue Jan 24 10:28:00 2017| Player logged off: Private AJ "Skippy" Hops, index: 1: 
    Tue Jan 24 10:28:01 2017| Ending authentication session of 76561198038199516

    These two are flooding log all the time:

    Tue Jan 24 10:27:08 2017| error constructing Player: No player with index 2000767 found at 	[C]:-1: in function Player
    Tue Jan 24 10:27:08 2017| 	data/scripts/entity/ai/passsector.lua:27: in function ?

    Posting these because I have seen them in other logs, too. Player indexes may vary, but they are usually above 2000000.

     

    Disconnect here:

    Tue Jan 24 13:32:19 2017| OnP2PSessionRequest from 76561198019576130
    Tue Jan 24 13:32:23 2017| Steam authentication confirmed for 76561198019576130
    Tue Jan 24 13:32:23 2017| Authentication successful for 76561198019576130
    Tue Jan 24 13:32:23 2017| Connection to player established
    Tue Jan 24 13:32:25 2017| New Player registered: 76561198019576130 [Worm] index: 3
    Tue Jan 24 13:32:25 2017| <Server> Player Worm created!
    Tue Jan 24 13:32:25 2017| <Server> Player Worm joined the galaxy
    Tue Jan 24 13:32:25 2017| Player logged in: Worm, index: 3
    Tue Jan 24 13:32:25 2017| player events roughly every 10.87 minutes
    Tue Jan 24 13:39:00 2017| <> You have no sector selected.
    Tue Jan 24 13:42:55 2017| <> You have no sector selected.
    Tue Jan 24 13:46:53 2017| starting event convoidistresssignal
    Tue Jan 24 13:47:58 2017| Player's playtime is below 30 minutes (933s), cancelling pirate attack.
    Tue Jan 24 14:02:40 2017| <> You have no sector selected.
    Tue Jan 24 14:07:01 2017| starting event alienattack
    Tue Jan 24 14:22:59 2017| starting event convoidistresssignal
    Tue Jan 24 14:23:15 2017| <> This sector is out of reach with this ship.
    Tue Jan 24 14:36:23 2017| Client 76561198019576130 lost connection
    Tue Jan 24 14:36:23 2017| <Server> Player Worm left the galaxy
    Tue Jan 24 14:36:23 2017| Player logged off: Worm, index: 3: 
    Tue Jan 24 14:36:24 2017| Ending authentication session of 76561198019576130
    Tue Jan 24 14:36:49 2017| OnP2PSessionRequest from 76561198019576130
    Tue Jan 24 14:36:53 2017| received a message from client 76561198019576130 but it's not in the list.
    >> <snip> just add here these "received a message (...)" entries here - over 20 each second <<
    Tue Jan 24 14:37:03 2017| received a message from client 76561198019576130 but it's not in the list.
    Tue Jan 24 14:37:06 2017| Ending authentication session of 76561198019576130
    Tue Jan 24 14:38:56 2017| online players: 
    Tue Jan 24 14:39:07 2017| OnP2PSessionRequest from 76561198019576130
    Tue Jan 24 14:39:12 2017| Steam authentication confirmed for 76561198019576130
    Tue Jan 24 14:39:12 2017| Authentication successful for 76561198019576130
    Tue Jan 24 14:39:12 2017| Connection to player established
    Tue Jan 24 14:39:14 2017| <Server> Player Worm joined the galaxy
    Tue Jan 24 14:39:14 2017| Player logged in: Worm, index: 3
    Tue Jan 24 14:39:14 2017| player events roughly every 11.13 minutes

    Basically what I think that happened is: Player got disconnected but continued playing and sending packets while the server already cleaned up player's session.

  9. It is not really a crash anymore but I have noticed few weird things:

    Avorion server Beta 0.10.1 r7302 running on Ubuntu 14.04.5 LTS starting up in "/<snip>/"
    CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz 8 Cores
    name: Persistent Vanilla
    seed: VGrFTZZgEi
    port: 24000
    max online players: 30
    save interval: 1200
    broadcast interval: 5
    max loaded sector time: 300
    weak update: yes
    worker threads: 1
    difficulty: Veteran
    infiniteResources: no
    collision: 1
    access list: Blacklist
    public: yes
    listed: no
    steam networking & authentication: yes
    administrators:
    Warning: Your server does not have an administrator assigned.
    [s_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
    Setting breakpad minidump AppID = 445220
    Game Port: 27000
    Steam Port: 27021
    Steam Query Port: 27020
    Polling Port: 27003
    
    Server startup complete.
    Server connected to Steam successfully
    Server is VAC Secure!
    Game Server Steam ID: 90106464047587328

     

    1.

    port: 24000

    Game Port: 27000

     

    2.

    [s_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.

    Server connected to Steam successfully

    Server is VAC Secure!

    Game Server Steam ID: 90106464047587328

  10. Script for quick server deployment on linux-based operating system.

    Tested on Ubuntu 16.04, 14.04.

     

    I don't feel like this forum's category is right for it, but eh... I could only choose between Modding and Troubleshooting. Later is for game and server software and the "guide" seems fitting but on the other hand "modding" and "custom server script" seems to go well, too. Feel free to move this thread to Troubleshooting if it seems more appropriate there.

    If you have successfully run this script on any os that is not listed above then tell me, so we can expand this list together. Any suggestions are welcome, I will try to improve this script in my free time. Enjoy.

     

    You don't need to own Avorion on Steam to use this.

     

    [*]Make sure that you have dependencies installed: lib32gcc1 (for steamcmd), tmux

    [*]Create new user and switch to it:

    sudo adduser avorion

    sudo su - avorion

     

    [*]Download manager (open in browser if you want to verify content):

    wget https://aki.ovh/dl/manager

     

    [*]Make manager executable:

    chmod +x manager

     

    [*](optional) Open manager in favourite text editor and verify config.

    [*]Install steamcmd and Avorion Server:

    ./manager install

     

    [*]If installation is successful then you can launch server:

    ./manager start

     

    [*]Check help for more commands:

    ./manager help

     

    FAQ:

    Q: How do I see server's console and use commands?

    A: Attach to it with ./manager attach.

     

    Q: How do I safely detach from server's console?

    A: Press Ctrl+B and then D.

     

    Q: I have a "steamclient.so: wrong ELF class: ELFCLASS32" error!

    A: Copy steamclient.so from linux64 to server's root. For default configuration:

     

    cd serverfiles

    cp linux64/steamclient.so .

     

    Q: Installation/update is stuck in a loop!

    A: Press Ctrl+C to stop it, then check for errors. If you can't solve them try posting them here.

     

  11. If you are referring to an sci-fi variant then, in my opinion, you need to take into account that changes in hull classifications may appear over time. Just look how different hull sizes are currently used and how this have changed since e.g. 1920.

    Even if the changes over time were small then different nations may use different doctrines and different hull classification system, they may build their ships differently and focus on technology they know. There are so much more circumstances that this discussion is almost pointless without further information from Koonschi.

    Having different sizes, but staying somehow in the general concepts of given ship class, like in example showed by Koon-san, is quite immersive and can act as some of those things I mentioned earlier.

    I like to believe that the classes we see in Avorion are just names that are translated from the language of the race which is using them. Translation. Localization, if you prefer that word. So they are not "destroyers" or "frigates" but they are their counterparts or ships that use similar concepts in their design.

     

    Edit, edit, edit, read it again if you see this message for the first time.

  12. There are still other types of interiors that you could possibly make. Even now. Docks, big stations with parts accessible for smaller ships. The only problem is lack of good camera for this kind of stuff, buggy (partially due to camera) building mode and shaders acting weird sometimes.

     

    On demo server we constructed (mostly, I, kek) bigger stations in populated sectors to leave ships inside them to prevent their destruction while being offline and sector being active.

×
×
  • Create New...