Hey people, I figured how to do the custom fighters finally.
Here's my method as I explained it over at Reddit.
OK, I'm going to explain how I did this.
Installation
First you need the Avorion Community Commands Package and install it.
We're basically using his "/fighter" command but we need the other files that it relies on.
Next you're going to need to swap out part of the code in the file inside your Avorion folder located at
\data\scripts\player\cmd\fighter.lua
Just open it up in notepad, Line 28 should start
function addFighter(player ....blah
Replace it with
function addFighter(player, weapontype, rarity, material, tech, amount, xmltype)
Scroll down to line 54 which starts
local fighter = GenerateFighterTemplate
After this line, add the following code
fighter.plan = LoadPlanFromFile("data/plans/" .. xmltype .. ".xml")
end
Now you can download my fighter plans from my Dropbox or get your own XML files and put them in the correct folder.
Put these in the avorion/data/ folder, ensure the files are correctly located in "plans" and not a subfolder.
That's it.
Usage
The way this works, I've added an argument that is passed to the fighter.lua which tells the game which plan to load for the fighter. So boot up your game, in the chat you can use the /fighter command
/fighter add <weapons> [rarity] [material] [tech] [qty] [xmltype]
For example
/fighter add chaingun uncommon trinium 20 1 BSG_ViperMk2
Adds an uncommon trinium Viper Mk2 with chaingun into your hanger. The quantity function doesn't work, not sure why.
The valid arguments that can be passed to Avi's script can be found on the link at the top of this post. I only added the xmltype.
xmltype is the name of the plan file you want to load without the .xml extension
You should be able to see the code and modify it for your own use, go nuts kids!