Jump to content

[MOD] Easier Turret Factory


bobisback

Recommended Posts

Easier Turret Factory

This mod makes some simple QoL changes to how the turret factory functions to allow the user to build turrets in an easier way. This mod does two primary things, first it allows the user to hold ctrl, shift, or alt, while hitting the plus and minus buttons on the turret factory to give +5, +10, +50 respectively. This mod also only refreshes the UI when you build a new turret instead of resetting all the values for everything. So once you have the turret you want, you can just keep clicking build until there are no more resources left.

 

The changes are pretty simple, but unfortunately will not work unless loaded on the server and the client.

 

Installation instructions

- Download the mod from the bottom of this post.

- Extract the contents to your root Avorion folder. Aka: "\Steam\steamapps\common\Avorion"

- Assuming the file structure stayed in tact it should ask to overwrite turretfactory.lua, just click yes to replace the file.

 

How to use

Once installed all turret factories will now have the ability to change different amounts by holding down ctrl, shift, or alt and clicking the plus or minus. Also when you build the turret it will not reset any values.

 

Files changed

 

Overwritten

Avorion\data\scripts\entity\merchants\turretfactory.lua

 

Known Issues

If you hold more then one down at a time you can get weirdness. Don't really care tbh lol

 

Inside the technical changes

The biggest change was changing the line in the buildTurret function that looks like

this: invokeClientFunction(player, "onShowWindow")

to this: invokeClientFunction(player, "refreshUI").

 

I also added in some code to handle the key presses.

 

Credits

_OMAR_ For turret fix code

Rinaldo (Rinart73) For code help

Dirtyredz For code help

 

Edit: Removed turret values fix.

 

Easier_Turret_Factory.zip

Link to comment
Share on other sites

Great mod! Thank you :D:D

 

Clicking x40 times per turret build was maddening... my flag ship has 60 weapons to build each time I wanted to upgrade -_-

 

I spliced back in the original broken weapon stat calculation that gives higher damage / range for lower ingredients because... well... I think it's fun to break the game! If anyone reading this wants to do the same you simply copy line 66 to line 226 from your original turretfactory.lau and paste it over the same lines in Bobisback's turretfactory.lau.

 

Thanks again for your work.

Link to comment
Share on other sites

I have re-uploaded without the turret value fixes. If you would like to read up on these changes and reincorporate them please see this thread and merge the files: http://www.avorion.net/forum/index.php/topic,4362.msg23191.html

 

Here is a better implementation of this mod that is client side only, going to see if he wants to incorporate my hotkey changes and we can merge them: https://www.avorion.net/forum/index.php/topic,4421.0.html

Link to comment
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...