Jump to content
Aki

[Mod] Avorion Commands Package (/inventory, /crew, /sethome and more)

Recommended Posts

Hi there,

 

Good mod by the looks of it, however, I can't work out how to add ranked crew.  Such as a general for example.

 

I enter

 

/crew add General 1 1 11

 

For 11 generals. However, it comes up with rank null

 

How do I add crew.  I can add me general, but I'm going to need to copy and past 1000s of times for the other crew members!!

 

Help please.

Share this post


Link to post
Share on other sites

oki sorry for asking mabye i can see it but how do i get it in to a server i have aliances , factions , players , sectors map and i have the maps from your download comands and lib and player where do copy or how what to do plz help

Share this post


Link to post
Share on other sites

Hi there,

 

Good mod by the looks of it, however, I can't work out how to add ranked crew.  Such as a general for example.

 

I enter

 

/crew add General 1 1 11

 

For 11 generals. However, it comes up with rank null

 

How do I add crew.  I can add me general, but I'm going to need to copy and past 1000s of times for the other crew members!!

 

Help please.

 

use the command /list - i also struggled with this until i fully read the documentation.

it will list you all the variables used in the other commands. weapons, ranks, materials, etc.

Share this post


Link to post
Share on other sites

more commands to regulate factions relationship, firstly with player. It's very easy to lost relation, but very hard, almost impossible, to get relation when the faction already hostile.

Share this post


Link to post
Share on other sites

Actually, sitting in a hostile faction's territory and waiting for Xsotan and Pirates to show up is a good way to get a little bit of a reputation boost. Also, if you've gotten up to the point where you can build Factories yourself, setting those up will still get their traders to come to your Factories and use them, improving relations with every trade. It took me 1 hour of AI trading to get my reputation back up from Abhorrent to Neutral, and from thereon it was very easy to push back into Friendly and higher ranges, since I could interact with them again. Also completing Bulletin Board messages is a way to get relation status (back) up.

 

But yes, I can imagine you'd want a command to fix that. Restoring relations after a mistake can take some effort that you might not be interested in investing.

Share this post


Link to post
Share on other sites

Is it possible to spawn in Xsotan Artifacts using this mod? I tried but it just says "Could not identify upgradeScript: teleporterkey1.lua"

 

EDIT (To avoid Double-Posting): BTW, managed to add Pulse Cannons to the Turret WeaponType spawn list.

Just add

{function (str) return str:find("^[pP]ul") end, 13, "PulseCannon"},

to scripts/lib/cmd/weapons.lua

and then change line 82 of inventory.lua from "...tonumber(w), 12" to "...tonumber(w), 13" so that it adds it to the search list.

Share this post


Link to post
Share on other sites

hi, will this be updated for the new weapons?

 

I think the author Aki has given up modding, this mod still works to a degree for now but with each update, it breaks a little bit. I hope someone else picks it up.

Share this post


Link to post
Share on other sites

Yeah, I'm currently dead, sorry for inconvenience. I'm awaiting for some necromancer to raise my corpse or something.

Share this post


Link to post
Share on other sites

If it helps, this is the updated weapons list:

 

avorion/data/scripts/lib/cmd/weapons.lua

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("^[pP]la") end,  5, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  7, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
{function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
{function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
{function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
{function (str) return str:find("^[pP]ul") end, 15, "PulseCannon"},
{function (str) return str:find("^[cC]ar") end, 16, "CargoShuttle"}
}

Share this post


Link to post
Share on other sites

I've managed to fix the agoods problem:

 

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

 

 

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

Share this post


Link to post
Share on other sites

If it helps, this is the updated weapons list:

 

avorion/data/scripts/lib/cmd/weapons.lua

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("^[pP]la") end,  5, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  7, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
{function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
{function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
{function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
{function (str) return str:find("^[pP]ul") end, 15, "PulseCannon"},
{function (str) return str:find("^[cC]ar") end, 16, "CargoShuttle"}
}

Thanks, for this, i had spent 20 mins writing out a conversion table to use for the past few days.

Share this post


Link to post
Share on other sites

It's sad that this mod is abandoned as it was useful, especially for testing out new ship designs in creative.

 

more commands to regulate factions relationship, firstly with player. It's very easy to lost relation, but very hard, almost impossible, to get relation when the faction already hostile.

...But yes, I can imagine you'd want a command to fix that. Restoring relations after a mistake can take some effort that you might not be interested in investing.

 

This! I've wanted either an admin code or a mod to do this for so long! I was shocked to learn that neither the dev nor the modding community had made something like this.

 

In earlier versions, there were bugs that made it terribly easy to ruin relations with a faction just by defending oneself from pirates or from one stupid blunder. Before, bountyhunter ships and several other types of ships were classified as "civilian", meaning that destroying just one made any witnessing faction hate your guts no matter how high your standing was. And pirates could befriend any faction by attacking unknown ships on sight,ruining relations just by defending yourself from them.

Share this post


Link to post
Share on other sites

If it helps, this is the updated weapons list:

 

avorion/data/scripts/lib/cmd/weapons.lua

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("^[pP]la") end,  5, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  7, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
{function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
{function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
{function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
{function (str) return str:find("^[pP]ul") end, 15, "PulseCannon"},
{function (str) return str:find("^[cC]ar") end, 16, "CargoShuttle"}
}

 

What about Anti-fighter Cannons? AFCs?

Share this post


Link to post
Share on other sites

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

	{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:

{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.

Share this post


Link to post
Share on other sites

No idea what cargo shuttle is doing in a weapons list, but this is the list version i'm currently using. Works for all current weapon types afaik.

Pretty sure would need something different for torpedoes or cargo shuttles, given i'm almost certain they're part of a different enum.

{function (str) return str:find("^[cC]ha") end,  0, "ChainGun"},
{function (str) return str:find("nse[cC]") end,  1, "PointDefenseChainGun"},
{function (str) return str:find("nse[lL]") end,  2, "PointDefenseLaser"},
{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("^[pP]la") end,  5, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  7, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
{function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
{function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
{function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
{function (str) return str:find("^[pP]ul") end,  15, "PulseCannon"},
{function (str) return str:find("^[aA]nt") end,  16, "AntiFighter"},

Share this post


Link to post
Share on other sites

For some reason I can't seem to get above the number 12 when trying this out, 12 is Tesla Gun and after that, any number adds a Tesla gun. Anyone know what I'm doing wrong?

Share this post


Link to post
Share on other sites

For some reason I can't seem to get above the number 12 when trying this out, 12 is Tesla Gun and after that, any number adds a Tesla gun. Anyone know what I'm doing wrong?

 

try insteed the number the full name.

 

ForceGun

SalvagingLaser

PulseCannon

Share this post


Link to post
Share on other sites

No idea what cargo shuttle is doing in a weapons list, but this is the list version i'm currently using. Works for all current weapon types afaik.

Pretty sure would need something different for torpedoes or cargo shuttles, given i'm almost certain they're part of a different enum.

{function (str) return str:find("^[cC]ha") end,  0, "ChainGun"},
{function (str) return str:find("nse[cC]") end,  1, "PointDefenseChainGun"},
{function (str) return str:find("nse[lL]") end,  2, "PointDefenseLaser"},
{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("^[pP]la") end,  5, "PlasmaGun"},
{function (str) return str:find("^[rR]oc") end,  6, "RocketLauncher"},
{function (str) return str:find("^[cC]an") end,  7, "Cannon"},
{function (str) return str:find("^[rR]ai") end,  8, "RailGun"},
{function (str) return str:find("^[rR]ep") end,  9, "RepairBeam"},
{function (str) return str:find("^[bB]ol") end,  10, "Bolter"},
{function (str) return str:find("^[lL]ig") end,  11, "LightningGun"},
{function (str) return str:find("^[tT]es") end, 12, "TeslaGun"},
{function (str) return str:find("^[fF]or") end, 13, "ForceGun"},
{function (str) return str:find("^[sS]al") end, 14, "SalvagingLaser"},
{function (str) return str:find("^[pP]ul") end,  15, "PulseCannon"},
{function (str) return str:find("^[aA]nt") end,  16, "AntiFighter"},

 

I tried spawning the Cargo Shuttle thing, the game gave me an anti-fighter turret. The flak one.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...