Torpedo Assembly

If you liked this item, please rate it up on Steam Workshop page.

Author: WarStalkeR

Last revision: 21 Aug, 2022 at 17:03 UTC

File size: 901.46 KB

On Steam Workshop

Description:

Torpedo Assembly expands the original idea of assembly blocks and turns them into necessary part of ship even on starting ships. It allows player to produce torpedoes based on unlocked material knowledge, if ship has installed relevant blocks: Assembly and Torpedo Storage. Do remember that it will not deposit produced torpedoes into launchers directly. In addition, torpedo production lines are completely separate from hangar production lines, so you can use both of them at the same time.

Torpedo Parts Unlocks:
Iron – Orca-Class Body, Nuclear Warhead and Common Rarity.
Titanium – Hammerhead-Class Body, Neutron & Fusion Warheads.
Naonite – Stingray & Ocelot-Class Bodies, Kinetic Warhead and Uncommon Rarity.
Trinium – Lynx & Panther-Class Bodies, Plasma & Ion Warheads and Rare Rarity.
Xanion – Osprey-Class Body, Tandem Warhead and Exceptional Rarity.
Ogonite – Eagle-Class Body, EMP & Sabot Warheads and Exotic Rarity.
Avorion – Hawk-Class Body, Anti-Matter Warhead and Legendary Rarity.

Torpedo Production:
I’ll leave up to the player to discover exact torpedo productions costs (and I’m pretty sure they will need more balancing), but do remember that beside body and warhead, rarity and tech level also affect torpedo’s cost and production time. If you acquired new material knowledge, be sure to enter drone and return back to ship to update list of available torpedo parts!

Backend Work Logic:
The script of the Torpedo Assembly is attached to player and not to the entity. Script will automatically register every ship you’ve switched to and iterate through every production line on the server side. And will continue to deposit new torpedoes into ships’ torpedo storages as long as there is available space. All processing and torpedo generation is done on the server side as well, while server only sends to player UI-related update data so it will look seamless. I haven’t actually tested if it properly works over all registered ships spread through different sectors, but in theory it should.

Error/Lags Instructions:
If you started seeing that game excessively slows down or Torpedo Assembly stopped working, it means error has occurred. In that case, follow these instructions (script’s data will be reset):
1) Verify that you’re running latest stable/release version of the game.
2) Verify that you’re running latest version of mod on client and server.
3) Via chat send command: /run Player():removeScript(‘lib/torpedo_assembly.lua’)
4) Via chat send command: /run Player():addScriptOnce(‘lib/torpedo_assembly.lua’)
5) Take client log from: %userprofile%AppDataRoamingAvorion
6) Take server log from: %userprofile%AppDataRoamingAvoriongalaxiessave_name
7) Go to Avorion’s official discord, #mod-discussion channel.
8) Upload these log files there and ping me @WarStalkeR#0001

P.S. When I started playing Avorion for the first time, I felt very uncomfortable that I can build Assemblies, Torpedo Storages and Torpedo Launchers from Iron, but they can only decorate ship as props due to lack of usefulness. Also, thanks to The Devil, whose code I’ve used as reference to make neat looking UI and some other neat functions.

Sadly, right now I’m lacking in free time, so any development of this mod is on hold. If anybody is eager, you can update it and re-release, so it will be compatible with latest game version.