Avorion

Avorion

Not enough ratings
Beefier AI x 5
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod
File Size
Posted
Updated
55.981 KB
20 Feb, 2021 @ 9:22am
8 Sep, 2021 @ 9:12am
7 Change Notes ( view )

Subscribe to download
Beefier AI x 5

Description
This mod makes every AI ship and station be 5 times as strong. It is as simple as that!

Why did I make this mod?
I wanted bigger ai ships and there were no mods that did what I wanted. The closest mod that I could find did that but modified the game in several ways that reduced performance. So here we are with a mod that just makes the ships and stations stronger with the exception of several bosses with the exception of the wormhole guardian, which got a health boost.

This mod requires a new game to work and its modifications cant be undone mid-game because the game only accesses the files it modifies when the game creates the galaxy for the first time.

This mod modified these files

pirategenerator.lua (for the pirates)
plangenerator.lua (for the stations)
shipgenerator.lua (for the faction ships)
shiputility.lua (to adjust the naming convention of standard ships)
xsotan.lua (for the xsotan ships and the guardian)

REPORTING BUGS
If there are any bugs then just post the bug below in chat and try to be as clear as possible so I can fix it.
As in if you think this mod broke something in the game, please mention what that was so I can go digging in the game files and find the file that contains that feature. On top of that it will help me replicate the bug so I can see if I fixed it before I launch an update claiming it is fixed.
The best way to do this is open the command window and copy and paste the error message since I know that message contains the name and address of the file that is misbehaving.

HARD CODE INSTALLATION FOR THOSE WHO WANT SOMETHING SIMILAR
Since this mod is very simple to make... (finding the files that did what I wanted took the most time)
Here are some instructions if you are someone who wants tougher ai ships but do not want the 5x version and are willing to do some modding yourself.
Just replace the 5s that I tell you to type in with whatever number you want.

If you have a hard time finding the lines of code in these files then try using tricks like CTRL F and just copy and paste the code into the search window to tell the computer to find the line of code for you.

1. since what you are doing is hard coding a modification into the game I would recommend making backups of all the files this mod modifies. you can find these files in
C:\Program Files (x86)\Steam\steamapps\common\Avorion\data\scripts\lib
for windows
and the xsotan file is in the story folder
The reason is just in case something breaks and you do not know how to fix it.
2. Once you have backups lets start by opening the pirategenerator.lua and look for the line with the text
local scaling = PirateGenerator.getScaling()
and make it:
local scaling = PirateGenerator.getScaling() * 5
3. scroll down until you find the line
local plan = PlanGenerator.makeShipPlan(faction, volume)
and make it:
local plan = PlanGenerator.makeShipPlan(faction, volume * 5)
4. save and close the file (by now every pirate in the game is 5 times as strong)
5. Now open the plangenerator.lua
6. look for the line
volume = volume * Balancing_GetStationVolumeDeviation()
and make it:
volume = volume * Balancing_GetStationVolumeDeviation() * 5
7. save and close the file (by now every station should be 5 times as strong)
8. Now open the shipgenerator.lua
9. look for the line
local ship = ShipGenerator.createShip(faction, position, volume)
and make it:
local ship = ShipGenerator.createShip(faction, position, volume * 5)
10. Now you can repeat step 9 for these lines of code which adjust the size(health) of each ship type
local plan = PlanGenerator.makeCarrierPlan(faction, volume)
local ship = ShipGenerator.createShip(faction, position, volume)
local ship = ShipGenerator.createShip(faction, position, volume)
local plan = PlanGenerator.makeFreighterPlan(faction, volume)
local plan = PlanGenerator.makeMinerPlan(faction, volume)
11. Now save and close that file (by now every faction ship civilian and military are * 5 stronger)
12. Now open the xsotan.lua in the story folder
13. look for the line
volume = volume * 0.5 -- xsotan ships aren't supposed to be very big
and make it be
volume = volume * 2.5 -- xsotan ships aren't supposed to be very big
14. look for the line (this part is where you buff the wormhole guardian)
volume = volume * (volumeFactor or 10)
and make it
volume = volume * 5 * (volumeFactor or 10)
15. Save and close the file
Technically you could be done but we still have to readjust the scaling for faction ships or corvettes will be classified as cruisers
16. Now open the shiputility.lua
17. look for the line
local base = 2000
and make it:
local base = 10000
18. save and exit the file

If these instructions seem too daunting to understand what I am doing, all I did was looking for the word volume and added a * 5 next to it when it was for the a function that sounded like it created the ship. When I could not find one I skimmed the code for the functions that sounded like they created the object I am trying to improve and used trial and error to find out where the * 5 needed to be placed.

OTHER WAY TO HARD CODE IT IN(Easier in my opinion)
if following these instructions seems to hard then you could try copying this mod and pasting it in your mod folder since when Avorion adds a mod into the game it adds the code of that mod onto the file rather then replacing the file. This means this mods folder only contains the function I modified in the files I modified, thus reducing a LOT of the searching for what part to mess with. The catch is you can only modify the functions I modified this way since they are the only functions that exist.

You should find my mod at:
...\Steam\steamapps\workshop\content\445220
just copy the folder named "2402291297" into Avorion's mod folder which for Windows 10 is found at
...\AppData\Roaming\Avorion\mods
Once there I would recommend openning the folder and changing contents of the file
modinfo.txt by changing the name to whatever name you want it to be so you can identify it in game.
Once done you should have created a duplicate mod that you can modify to your hearts content.
6 Comments
KnifeHeart 24 Feb, 2021 @ 7:44am 
Hats off for doing this in a way that makes sense and doesn't ruin compatibility with a bunch of other mods. I wish more people took this approach.
Okabig  [author] 20 Feb, 2021 @ 2:44pm 
Worked out a unexpected bug with the aid of Discord, on the off chance this mod loads an empty galaxy I would recommend resubscribing to it.
Raxos149 20 Feb, 2021 @ 11:37am 
OK. I will test it out later... I absolutely love Avorion's salvage mechanic... both in yield and aesthetic.
Okabig  [author] 20 Feb, 2021 @ 10:19am 
What I do know is this mod is telling Avorion's random design generator to make the ships and stations 5 times as big. I did not mess with anything else beyond that. :)
Okabig  [author] 20 Feb, 2021 @ 10:09am 
In theory it should since bigger ships = more blocks = more salvage.

Either that or the game is just making ships bigger which means more resources per a ship destroyed, I have not looked at upgrade drop chances.
Raxos149 20 Feb, 2021 @ 10:05am 
Dumb question, but bigger size == bigger salvaging reward right? I am always looking for maxing out salvage gains so that would be the appeal of the mod.