Author Topic: [MOD] Weapon Engineering (Turret Editor)  (Read 36047 times)

darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    105
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: February 24, 2018, 08:42:17 AM
ABOUT

Quote
By the time we reach Jupiter Station, I don't want their engineers to have a thing to do but give us a wash and a wax.

No longer must you play research station lottery or the shopping list game to fill a factory if you already have a turret you like. This mod allows you to cannibalize other turrets to upgrade an existing one. Please consider this mod BETA - while I have play tested it myself quite a bit, nevertheless it is still new and doing things nothing else is and nobody else documented.

Latest Version: v1.3.0 (2019-03-09)
See the Install/Update section for updating instructions.


Last Tested On: v0.21.2 (2019-03-09)
Minimum Version: v0.21.0



You select the turret you want to upgrade and drag it to the big box. Then you can select up to 5 additional turrets to destroy and drag them to the smaller boxes. The more turrets you select, the bigger the upgrade performed to the selected turret. The tech level of the turrets you scrap is also part of the upgrade math, use turrets greater than or equal to the tech level of the turret you want to upgrade for maximum effect. The rarity of the turrets you are scrapping also affects the final result.

The better the turret you are trying to upgrade, and the better weapons you use to upgrade it, the bigger the upgrade will be. Here I upgraded the damage on a crappy turret using more crappy turrets.



Additionally, autotargeting can be added, and the colour of the projectiles and beam can be customised for credits. You want red beams and bullets? Then get some red beams and bullets.



Upgrade Options

  • Heat Sinks - Reduces the heat generated per shot, and increases the cooldown speed.
  • Capacitors - Reduces the base power requirement of a turret.
  • Transformers - Reduces the rate the energy use climbs.
  • Ammunition / Power Amps - Increase the flat damage of the turret.
  • Drive Motors - Increase how fast the turret can turn.
  • Barrel / Lenses - Increase the range a turret can hit at.
  • Trigger Mechanism - Increase the rate of fire.
  • Stabilizers - Increase the accuracy rating.
  • Phase Filters - Increase the efficiency rating of mining or scav gun.
  • Targeting - Add or remove self targeting for the turret.
  • Colour HSV - Drag the sliders to change the colour of the beam or projectiles.



Install / Update

If you don't read and follow these simple install instructions I will tell the Xsotan where you sleep.

DOWNLOAD: v1.3.0

Github Page (watch it, report bugs, contribute, etc): https://github.com/darkconsole/avorion-turret-editor/
[do not download Github master. always use the above DOWNLOAD link.]

Multiplayer Server Admin

  • Copy the data and mods folder into the game directory. This must be installed on both the client and the server, unless the players do not intend to use it then they don't have to install it. This mod does not overwrite any stock files at this time.
  • Copy [NOT rename] the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua [in the same folder] and tweak if you want.
  • To allow players to use the /tmod command you will need to add it to the admin.xml file for the galaxy. See this post for info.

Single Player

  • Copy the the data and mods folders into your game
  • Copy [NOT rename] the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua [in the same folder] and tweak if you want.

Updating

  • Overwrite all the files. Any custom config you have will be safe because Config.lua is not included. See now?
  • Check ConfigDefault.lua to see if there are any new options you care about and add them to Config.lua if you want.
  • Rerun the /tmod command on your ship to make sure the scripts get updated.



COPY PASTE ConfigDefault.lua and name it Config.lua, DO NOT JUST RENAME ConfigDefault.lua.

The reason I tell you to make a copy of the file is that every time you update you do not lose your custom settings, second, if the Config.lua is missing newly added options, it will pull them from ConfigDefault.lua instead. At all times you should have BOTH a ConfigDefault and Config file. Are we good on this?



Usage

While in one of your ships use the chat command /tmod this will attach the Engineering Weapons Bay to your ship, adding an icon to open the main window in the top right corner of the screen. It looks like a little turret with a wrench on top of it.


1) Drag the turret you want to upgrade to the big box.

2) Drag 1 to 5 more turrets to the smaller boxes. These are the turrets you will destroy to upgrade the selected turret. Each turret you add will change the percentage displayed above the scrap bin. For example, if this says 2%, and you want to upgrade a turret that does 10 damage, after it will do 10.2 damage. If the turret does 20 damage, after it will do 20.4 damage.

3) Click one of the avaialble upgrade choices. If your weapon heats up too fast, then upgrade the heat sinks. If your turret fires too slow, upgrade the trigger mechanism. Hover over each button, the tooltip tells you what will happen. Clicking one of these buttons will consume the turrets in the scrap bin and upgrade the selected turret.

Stats which are already maxed out, or do not apply to the selected turret, will be greyed out.

4) You can add targeting and change the colour of the weapon for money. If you if you are just doing targeting and colour, you do not need to add any turrets to the scrap bin.



Notes

Targeting only costs money because I believe if you are paying the gunners to sit there then they can do their one job of pointing the damn gun for you. Consider the money an investment in a really comfortable chair for the douche that's gonna sit there and aim it.

The colour you set will change after clicking the button. That is because the code takes the colour you choose, and then modifies it a bit to try and produce laser beams that won't look as stupid as the colour you picked.

Item rarity and tech level are both used as part of the math to try and keep the usage of the Weapons Bay balanced. To get a good upgrade you are going to have to sacrifice good parts.

If you think a turret disappeared, double and triple check your inventory to be sure it did not stack with another. Avorion does a little bit of a dumb with the inventory where it stacks items after rounding their values, so if a turret is really close to another one in stats but not exact it can still be stacked. To combat this problem, every time a turret is upgraded it will have a Mark Number added to the name. "Double Mining Mk 2 Turret" means this is a turret you have upgraded twice, but I've totally stacked Mk 2 turrets before. It is not perfect.



Future Plans

Make it a system upgrade chip that drops from combat/scavving instead of the chat command to attach it to your ship.

If they ever allow adding custom blocks via mods, it will become an actual weapons bay where the quality of the mods is determined by how much weapons bay you build. Probably shouldn't hold our breath on this though.



Changelogue

v1.3.0 -2019-03-09
* Fix upgrading mining laser efficiency with the 0.21 mining changes that introduce a new type of mining laser.
* Enabling Coaxial on a turret will now scale its damage the same amount as the game originally would have generated it. IF YOU HAVE USED THE WEAPONS BAY TO TURN SOMETHING COAXIAL, TURN IT BACK TO NORMAL BEFORE INSTALLING THIS UPDATE TO GET THE DAMAGE SCALED PROPERLY. ELSE THE DAMAGE IT IS NOW IS WHAT IT IS.
* New ability: edit turret size with new server side config option.

v1.2.1 -2019-02-24
* Add coaxial toggle. If You Are Playing On A Multi Player Server Your Server Must Update Before This Will Work Fam

v1.2.0 - 2019-02-11
* Update for the scripting API callable stuff in 0.20.0+

v1.1.1 - 2018-03-13
* Fix Accumulating Energy (Transformers) buffing the wrong direction.

v1.1.0 - 2018-03-09
* The Config.lua thing is now technically optional.
* Values missing from Config.lua are pulled from ConfigDefault.lua
* Clients now fetch config values from server side so admins can set the settings.
* Tweaked colour settings to try and produce slightly nicer beams.
* Made the colour tweaks settings that can be tweaked in the config file.
* Lot of little optimizations.
* Fix where it wouldn't work for alliance ships.

v1.0.0 - 2018-02-24
* Initial release

« Last Edit: March 09, 2019, 08:39:00 PM by darkconsole »



Loony Liberator

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: February 24, 2018, 10:15:51 AM
Umm

2. Copy the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua and tweak if you want.

Please clarify where its going (folder location) or if its just a renaming of the file from ConfigDefault.lua to Config.lua while maintaining its location in the DccTurretEditor folder  ;)

EDIT: Ahh it's 2. Rename the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua and tweak if you want.
« Last Edit: February 24, 2018, 10:22:11 AM by Loony Liberator »



A.Wolfrick

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    19
  • Why make ships with pointy ends? RAMMING SPEED!
    • View Profile
on: February 24, 2018, 04:54:31 PM
Thank you sir, you officially have a number one fan.


I am.. so blown away by this. Thank you! A million times thank you! I LOVE THIS!
To defeat an enemy you must know them. Not simply their battle tactics but their history, philosophy, art. -Grand Admiral Thrawn



darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    105
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: February 24, 2018, 06:05:21 PM
Umm

2. Copy the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua and tweak if you want.

Please clarify where its going (folder location) or if its just a renaming of the file from ConfigDefault.lua to Config.lua while maintaining its location in the DccTurretEditor folder  ;)

EDIT: Ahh it's 2. Rename the file mods\DccTurretEditor\ConfigDefault.lua to Config.lua and tweak if you want.

same folder. i say copy so that you always have a backup of the original. updated the main post, thanks.



Lonewolf79

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    11
    • View Profile
on: February 26, 2018, 09:32:24 AM
This is a fantastic idea imo :) Thank you very much! Working like a charm



Ravien

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    256
    • View Profile
on: February 26, 2018, 11:16:53 AM
Wow.

This is not only useful and really cool, but looks REALLY well done too!

Question: is it compatible with the combat update currently on the beta branch?



darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    105
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: February 26, 2018, 06:24:08 PM
Question: is it compatible with the combat update currently on the beta branch?

probably, most of it is self contained. i didn't stay on 0.16 long it wasn't too playable for me. make a backup of the saves if you're feeling frisky. edit a crap turret and pull down the scripting error console (the ' key for me) to check for lua errors if you get there before me.
« Last Edit: February 26, 2018, 06:29:18 PM by darkconsole »



Ravien

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    256
    • View Profile
on: February 27, 2018, 12:36:58 AM
I will let you know what I find. :D

Really looking forward to trying this out. Especially being able to change the color of the weapons. Something like this should be added into the base game as an option at turret factories!



LordHavoc

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    145
    • View Profile
on: February 27, 2018, 01:57:31 PM
Would you be able to create a similar mod for turret copying?
Requiring material and credit input in order to copy a turret you've found - perhaps even using the assembly blocks (similar to fighter production)



darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    105
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: February 27, 2018, 08:19:23 PM
Would you be able to create a similar mod for turret copying?
Requiring material and credit input in order to copy a turret you've found - perhaps even using the assembly blocks (similar to fighter production)

i will have to research finding the sell cost of a turret and decide on a way to make it immersive. don't want this to become a cheat engine so it can be used in multiplayer. the price is not a pre-calculated property on the turret itself according to the documentation.
« Last Edit: February 27, 2018, 08:23:34 PM by darkconsole »



LordHavoc

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    145
    • View Profile
on: February 28, 2018, 01:47:16 PM
That's right, the prices are controlled in the 'inventoryitemprice.lua'
« Last Edit: March 01, 2018, 01:26:12 PM by LordHavoc »



TinchoX

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    29
    • View Profile
on: March 03, 2018, 03:28:41 PM
Boy am I lovin this mod already, I had so many useless turrets lying around, I just sacrificed them all for a greater cause thanks to this mod!!  8)

The turret factory mod (One can create dozens of excotic turrets, at various costs), AND THIS MOD... I am the ruler of the ... MY galaxy.



Ravien

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    256
    • View Profile
on: March 03, 2018, 07:24:37 PM
Seemed to work on the beta branch but I didn't check for any errors.

My one piece of feedback is that this mod allows you to add auto targeting to any turret without any reduction in damage. I'm not exactly opposed to this since in the future you'd expect everything to be auto targeting but it does mean there's no point in building auto targeting turrets in a turret factory or seek them out at an equipment dock since you can just add it with this mod.



darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    105
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: March 03, 2018, 09:51:35 PM
My one piece of feedback is that this mod allows you to add auto targeting to any turret without any reduction in damage.

if this is true then i am glad, the gunners are being paid to do one job, gun a gun, the fact that i have to have a reduction in damage for this is stupid. it is bad enough i have to pay a bunch of morons EVERY TWO HOURS with the title "gunner" and then they don't even do that one job. no the vanilla game gunners only know how to point where you point, and don't understand the concept of "fire at will" come on give me a break koon!

however, i do not believe it, because the tooltips still say it and that should be handled by the game code, because you can still manually target guns and get the damage back before this mod. the reduction in my experience was only while autofire was engaged. manual targeting the same turret always presented full damage.

if i am wrong and it doesn't really work like that and my tests have just been placebo, then koon can fix it in the game code where it should be fixed if they wanna keep punishing us for making gunners do their job heheh

this gunner thing is the entire reason i even started this mod. then i was like "well, while we are here, what else can i screw with"
« Last Edit: March 03, 2018, 10:37:53 PM by darkconsole »



Ravien

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    256
    • View Profile
on: March 04, 2018, 04:25:38 AM
Our gunners are lazy!