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

Elmruik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
I've managed to fix the agoods problem:

in \scripts\player\cmd\agoods.lua, the code should be:


Code: [Select]
if onServer() then
    package.path = package.path .. ";data/scripts/lib/?.lua"
    require ("goods")
end

function initialize(name, quantity, ...)
local player = Player()

name = string.gsub(name, "_", " ")

if goods[name] ~= nil then
local ship = Entity(player.craftIndex)
local good = tableToGood(goods[name])

ship:addCargo(good, quantity)
else
player:sendChatMessage("Server", 0, string.format("Error:%s is not a good!", name ))
end

terminate()
end


am i missing something i altered the code but still can use the command?



CaptPatrick01

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    18
    • View Profile
Eurekas were had! I found out how to add systems to the [/inventory upgrade] spawner
Look at lib\cmd\upgrades.lua. you'll find strings that essentially go: {function (str) return str:find("^{SEARCH WORD}") end, "{NAME OF UPGRADE found in the systems folder}", "{<<<repeat last}"},

As an example, I managed to get it to spawn the XSTN-Ks by adding these to the list
Code: [Select]
{function (str) return str:find("^teleporterkey1") end, "teleporterkey1", "teleporterkey1"},
{function (str) return str:find("^teleporterkey2") end, "teleporterkey2", "teleporterkey2"},
{function (str) return str:find("^teleporterkey3") end, "teleporterkey3", "teleporterkey3"},
{function (str) return str:find("^teleporterkey4") end, "teleporterkey4", "teleporterkey4"},
{function (str) return str:find("^teleporterkey5") end, "teleporterkey5", "teleporterkey5"},
{function (str) return str:find("^teleporterkey6") end, "teleporterkey6", "teleporterkey6"},
{function (str) return str:find("^teleporterkey7") end, "teleporterkey7", "teleporterkey7"},
{function (str) return str:find("^teleporterkey8") end, "teleporterkey8", "teleporterkey8"},

I will not try spawning them with a level lower than legendary though. Don't want to risk yerg-ing anything on my end mid-testing ;D.

Other snippets for the newly released vanilla systems:
Code: [Select]
{function (str) return str:find("^loot") end, "lootrangebooster", "lootrangebooster"},
{function (str) return str:find("^shieldimp") end, "shieldimpenetrator", "shieldimpenetrator"},

Good for DarkPaapi's Unique Xsotan Keys mod, now you don't have to type a long string of code and have to manually change the seed everytime if you want to try them.

so i added the booster and impenetrable code to the lib but i still cant spawn them is there some other code i have to modify?

Did you check the upgradegenerator.lua?
UpgradeGenerator.add("data/scripts/systems/shieldimpenetrator.lua", 1)
and
UpgradeGenerator.add("data/scripts/systems/lootrangebooster.lua", 1)
Should be listed there. If not, it is out of date, but should be rectified by adding them in. Also check the upgrades folder to see if the files are there.



Elmruik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
all the files and code are in the right place but everytime i add those to lines to the upgrades lua it breaks the mod



Dragaunus

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
My apologies in advance if this answer was listed amidst the several pages I read through, but:

Question:
I know the MOD Developer hasn't done work on this project for a while so is that why only the crew commands work while the spawn commands are buggy?  I'll spawn say either a turret or system upgrade, yet the only appear in my physical inventory but are not available to slot via the upgrades or build menu (weapons.) 

Has anyone found a way to resolve this themselves?

Any help would be much appreciated.  I did and still love the MOD least for the crew fulfillment option.  Thank you!



TenshiRyu

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    3
    • View Profile
My apologies in advance if this answer was listed amidst the several pages I read through, but:

Question:
I know the MOD Developer hasn't done work on this project for a while so is that why only the crew commands work while the spawn commands are buggy?  I'll spawn say either a turret or system upgrade, yet the only appear in my physical inventory but are not available to slot via the upgrades or build menu (weapons.) 

Has anyone found a way to resolve this themselves?

Any help would be much appreciated.  I did and still love the MOD least for the crew fulfillment option.  Thank you!

That sounds like you create/joined an alliance. When you add turrets and upgrades via this script they're placed in your personal inventory. If you're part of an alliance, flying an alliance ship, you need to move these upgrades to the alliance inventory first for them to become available for slotting.



King Arthur VII

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
Ive noticed some of the commands are a bit broken, in order to get a railgun turret, I need to enter /inventory turret bolter... and as for systems, im not sure how to even get a turret control system... any help?



unbekannt1984

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    158
    • View Profile
Hi,

the Mod is outdated. You can do most of the stuff with the entitydebug-tool, try to enter the following in your chat (Well, you need to be Admin on the Server or in a singleplayer-game):
Code: [Select]
/run Entity():addScript("lib/entitydbg.lua")But if I'm not mistaking, you won't be able to generate a specific upgrade that way.



Anexgohan

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
Hello everyone,
I managed to get the /inv turret part or the weapon spawning part of the the mod working again.
I have checked and all the current and new weapons are now spawnable. Credit goes to the original mod author only I just fixed a part.
I have also included a list of weapons and their weapon code to spawn them named "avorion-commands-master_List"
To Install just overwrite the scripts folder from this into your "Avorion/data/" folder , you need the original mod already installed before this.



Vrmithrax

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
The Fighter command still seems to be broken, in the same way the turret spawning was. For instance, I can't spawn a salvaging fighter, no matter what I try - anything above 12 (or even listing it specifically as SalvagingLaser) just spawns a Force Fighter. I imagine it's the same issue as the turrets, with the enum list being all out of whack?



TrueWrathChild

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
on: September 09, 2018, 08:07:11 PM
I tried this update and the RocketLauncher still feeding me Mining Lasers.  Same using command Rocket. Launcher isn't recognized.  Nevermind.. I wasn't using the enum.. was typing Rocket etc as I watched in outdated video.
« Last Edit: September 09, 2018, 10:37:20 PM by TrueWrathChild »



TrueWrathChild

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
on: September 09, 2018, 10:27:58 PM
Now, for All those who wanted to get Turret System Upgrades I found out how by messing around with commands and looking at the components themselves! The reason is you have different types of TCS - Turret Command Systems. There-in I started to think, you have Military and Civ, although it took me a minute till I plugged in "Civ" bc description shows All-Round lol. But here are your commands for the M-TCS and A-TCS:
M-TCS
/inv upgrade military (tier 1-5) (Qty)
A-TCS
/inv upgrade civ (tier 1-5) (Qty)
I still can't get the XSTN-K 1-8 to spawn but if you're just looking for the Turret Command Systems, Here you all go. Hope it finds it's way to someone! Cheers!
« Last Edit: September 09, 2018, 10:29:35 PM by TrueWrathChild »



Adsixnine

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: September 10, 2018, 01:43:34 PM
thx for mod Sweet work!  ;)



netdomon

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: September 10, 2018, 01:47:56 PM
thank you so much



Salminar

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    92
    • View Profile
When trying to add a few turrets types (All those with number above 10 if i remember) it always add tesla turrets.

Is this mod still supported or should i move to another package collection? (Is it worth fixing it if not maintained anymore?)



SneakyTacts

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    33
    • View Profile
Is this mod still supported or should i move to another package collection? (Is it worth fixing it if not maintained anymore?)

There's always the developer command

/run Entity():addScript("lib/entitydbg.lua")

that you can use to give yourself 10 random sets of 20 weapons, any cargo, any system, to spawn any station or factory, and to create any other of the dozens of odd things, too.