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

NovaBreaker

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    10
    • View Profile
on: February 28, 2019, 07:24:57 AM
i feel like this mod or at least its commands  should be integrated into the game as working commands

here is an updated weapons.lua for the mining update that is currently in beta
Code: [Select]
-- Table of system upgrade scripts for use with `findString()` from `lib.cmd.common`
return
{
{function (str) return str:find("^[cC]ha") end,  0, "ChainGun"},
{function (str) return str:find("^[pP]dc") end,  1, "PdChainGun"},
{function (str) return str:find("^[pP]dl") end,  2, "PdLaser"},
{function (str) return str:find("^[lL]as") end,  3, "Laser"},
{function (str) return str:find("^[mM]in") end,  4, "MiningLaser"},
{function (str) return str:find("^[rR]awm") end,  5, "RawMiningLaser"},
{function (str) return str:find("^[sS]al") end,  6, "SalvagingLaser"},
{function (str) return str:find("^[rR]aws") end,  7, "RawSalvagingLaser"},
{function (str) return str:find("^[pP]la") end,  8, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  9, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  10, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  11, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  12, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  13, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  14, "LightningGun"},
{function (str) return str:find("^[tT]es") end,  15, "TeslaGun"},
{function (str) return str:find("^[fF]or") end,  16, "ForceGun"},
{function (str) return str:find("^[pP]ul") end,  17, "PulseCannon"},
{function (str) return str:find("^[aA]nt") end,  18, "AntiFighter"},
}

i might update the upgrades list later if i have time.



Elmruik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    13
    • View Profile
I'm using the new beta branch and the inv turret command seems to have broken. it wont spawn any turrets anymore or give me an error. Anyone have any help?



fordhamflash

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    17
    • View Profile
So I have been pouring over this information and the lua files. It seems that COAXIAL weapons are merely a type of "toggle" - GetWeaponsCoaxial or something like that. I am trying to figure out how to "toggle" that code so I can command a coaxial weapon into my inventory. Any thoughts?



fordhamflash

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    17
    • View Profile
In case anyone is interested, I managed to create custom coaxial weapons using this "customized" version of the mod:

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

The command /INVENTORY MYTURRET allows you to create a customized turret by physically editing the inventory.lua file before running the command. At lines 213 and 214, add the following:

Code: [Select]
--Make Turret A CoAxial Weapon
item.coaxial = true

This will make the weapon a coaxial weapon.

If you want to go back to making turrets just add "--" at the beginning of line 214.



k7755g

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    3
    • View Profile
Due to the most recent updates, the Turret generation this script used has been changed.
The following Changes need to be made in 'inventory.lua' in 'data/scripts/commands/'

Line 10
Code: [Select]
Add
  TurretGenerator = require("turretgenerator")

Line 46
Code: [Select]
Replace
  GenerateTurretTemplate(random():createSeed(), weapontype, dps, tech, rarity, material)
with
  TurretGenerator.generateSeeded(random():createSeed(), weapontype, dps, tech, rarity, material)

This will allow the script to spawn turrets again.



ChipPatton

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    20
    • View Profile
The author seems to have abandoned this so I have made all of he relevant updates to the current release of the game to ensure all commands are working as intended.

This incorporates:

Code: [Select]
Dictionary Update by Chip Patton: https://www.avorion.net/forum/index.php/topic,830.msg25728.html#msg25728
Agoods Fix by Vweegit: https://www.avorion.net/forum/index.php/topic,830.msg25794.html#msg25794
Dictionary Update by CaptPatrick01: https://www.avorion.net/forum/index.php/topic,830.msg26457.html#msg26457
Dictionary Update by NovaBreaker: https://www.avorion.net/forum/index.php/topic,830.msg29872.html#msg29872
Compatibility Fix by k7755g: https://www.avorion.net/forum/index.php/topic,830.msg30321.html#msg30321
Dictonary Update by Chip Patton: (Transporter Software Added to this package)

Have fun and fly safe!
« Last Edit: April 27, 2019, 03:18:18 AM by ChipPatton »



HardStyle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
The update posted by ChipPatton doesn't work for me, I am on the beta branch and I am not sure if that is why it doesn't work. Will check

Edit, doesn't work on the main update either. I can only give myself everything on the turret side of things to 12, I can't get anything over type 12

« Last Edit: May 12, 2019, 05:30:37 PM by HardStyle »



ChipPatton

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    20
    • View Profile
The update posted by ChipPatton doesn't work for me, I am on the beta branch and I am not sure if that is why it doesn't work. Will check

Edit, doesn't work on the main update either. I can only give myself everything on the turret side of things to 12, I can't get anything over type 12

It's working on my server with the release.

Some things may need to be renamed - I think for upgrades there was an upgrade or two where the search strings conflicted (such as ShieldBooster and ShieldImpen, I had to rename the ShieldImpen to Impen).



HardStyle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
But I don't know shit about coding.... So I don't really know what is wrong but I know I can spawn some stuff but not all.



ChipPatton

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    20
    • View Profile
I'm doing mother's day stuff right now, but when I get back this evening, I'll re-upload the version I'm using.



ChipPatton

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    20
    • View Profile
Actually, forgot I had a SSH client on my phone.  Here ya go :)



HardStyle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
nope, still not working, when I try to add any turret over type 12 I get a repair beam instead.

but types from 0 to 11 still work properly

Edit: Verifying game integrity right now, I will then reinstall the mod. Hopefully, that fixes it.

Edit 2: Nope, still doesn't work properly.




« Last Edit: May 12, 2019, 11:13:19 PM by HardStyle »



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    305
  • Discord: Rinart73#7304
    • View Profile
Try this one (changed line 84)



HardStyle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    4
    • View Profile
YES! thank you very much Rinart73 ! ! it works perfectly now :D