Author Topic: [Mod] Avorion Commands Package (/inventory, /crew, /sethome and more)  (Read 145291 times)

Aki

  • Moderator
  • *****
  • Status:
    Offline
    Posts:
    165
  • Please, ignore.
    • View Profile
    • Ignore
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:
Code: [Select]
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!
« Last Edit: August 13, 2017, 03:44:09 AM by Aki »



Kane Hart

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    271
  • The Talk Too Much Guy!
    • View Profile
    • My Youtube
on: January 27, 2017, 07:08:41 PM



/sethome one worked though I could not figure out the other 2. There is no help command in game for them if you just use their base command, etc.
Thanks.
« Last Edit: January 28, 2017, 02:15:22 AM by Kane Hart »



Aki

  • Moderator
  • *****
  • Status:
    Offline
    Posts:
    165
  • Please, ignore.
    • View Profile
    • Ignore
on: January 27, 2017, 07:47:30 PM
/sethome one worked though I could not figure out the other 2. There is no help command in game for them if you just use their base command, etc.
Thanks.
There is /help <command name>. But I guess I could include more information on how to use them.



RosyUnicorn

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    37
    • View Profile
on: January 27, 2017, 10:28:18 PM
Could you write out where to put this stuff for us newbies? It all looks very fancy!



thedamngod

  • Moderator
  • *****
  • Status:
    Offline
    Posts:
    392
  • Who is this guy anyway?
    • View Profile
on: January 27, 2017, 11:08:22 PM
If you are in the install directory of the game you should put them into the places as specified in the lines below each "Files:" in the top post.
You can navigate to the install directory from your steam library. Right-click on avorion and click Properties->Local Files -> Browse Local Files.
FAQ    Infos for bug reports

Want a post moved, locked, deleted? Think something is wrong or not appropriate? Then use the "Report to moderator" button



Korhaka

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: January 28, 2017, 12:22:23 AM
For the /sethome command it seems as if the server has it but not the client, then nothing happens.



Aki

  • Moderator
  • *****
  • Status:
    Offline
    Posts:
    165
  • Please, ignore.
    • View Profile
    • Ignore
on: January 28, 2017, 01:00:35 AM
For the /sethome command it seems as if the server has it but not the client, then nothing happens.
I have just tested it and it worked. Client had no scripts from /sethome and server had all of them configured and it worked just fine. Did you allow default group to use this command? Or did log/console show anything?



Korhaka

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: January 28, 2017, 01:39:11 AM
Ok, I got it working, I had done something wrong on my end.



RosyUnicorn

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    37
    • View Profile
on: January 28, 2017, 02:50:22 AM
I got the /turret working, but the /system command yields nothing. /system help sends "You have been give (a) system upgrade (s)."

Any ideas?

EDIT: The formatting in turret.lua after pasting it was a mess for me. After re-copying the code from the source I get (when typing /turret help) "You have been given (a) turret (s)." + the type of turret I last added. I can still add turrets with /turret 1 1 1 1 RosyUnicorn.

EDIT2: And to add further clarity, I am also copy / pasting the examples in the first post. Even if I missed the order, I still find it intriguing that I get a weird response from /system help, and that /turret help gives more turrets, without specifying player even.
« Last Edit: January 28, 2017, 03:01:43 AM by RosyUnicorn »



Kane Hart

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    271
  • The Talk Too Much Guy!
    • View Profile
    • My Youtube
on: January 28, 2017, 02:54:13 AM
I got the /turret working, but the /system command yields nothing. /system help sends "You have been give (a) system upgrade (s)."

Any ideas?

/help system and there is an example in the main post and I also made a video as well.



Semaphorism

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    24
    • View Profile
on: January 28, 2017, 02:59:28 AM
Some requests for commands if you can:
 - Add crew command
 - insta warp to sector location
 - ?? probably more, will think about it

(Click) Tip: You can hide thrusters, and they will work.



Kane Hart

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    271
  • The Talk Too Much Guy!
    • View Profile
    • My Youtube
on: January 28, 2017, 03:03:35 AM
Oh we taking requests :P I like to see all these ;)
http://imgur.com/a/1o4jf



ThunderDodge

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    46
    • View Profile
    • Steam
on: January 28, 2017, 03:42:14 AM
@Kane type:
Code: [Select]
/run Entity():addScript("lib/entitydbg.lua")
in chat. ( only works with moderator rights )



Kane Hart

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    271
  • The Talk Too Much Guy!
    • View Profile
    • My Youtube
on: January 28, 2017, 03:45:23 AM
@Kane type:
Code: [Select]
/run Entity():addScript("lib/entitydbg.lua")
in chat. ( only works with moderator rights )

Thank you :)



Rennzen

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: January 28, 2017, 05:58:44 AM
As some one else said, PLEASE do a 'add crew' command.
« Last Edit: January 28, 2017, 06:00:16 AM by Rennzen »