bobisback Posted January 25, 2018 Share Posted January 25, 2018 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 More sharing options...
TheGoodDoctor Posted January 30, 2018 Share Posted January 30, 2018 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 More sharing options...
Shrooblord Posted January 30, 2018 Share Posted January 30, 2018 TheGoodDoctor, thank you for posting instructions on how to modify the file. Do you think you could post a diff using DiffChecker, though? That way, also users in the future will be able to make the modifications you propose, as line numbers alone are subject to change during the process of development. Link to comment Share on other sites More sharing options...
bobisback Posted January 30, 2018 Author Share Posted January 30, 2018 Honestly probably going to revert those changes anyway. I only put them in on a request and so far I am not to happy with them. Nor do I truly understand the code behind it, me being a programmer by trade that breaks a major rule of mine. Link to comment Share on other sites More sharing options...
bobisback Posted February 2, 2018 Author Share Posted February 2, 2018 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now