Avorion

Avorion

Share Your Creations
Browse the collection of community-built stations, battleships, cruisers and carriers and submit your own creations for others to enjoy!
Learn More
Protato 18 21 Jul, 2017 @ 9:01am
Making a Custom Turret
It's kind of hard to explain, so just keep with me.

Download and/or read the .txt files and .lua file. You'll know what to do.
https://github.com/Nscmichael/Avorion-Custom-Turret-Tutor-for-Noobs/tree/master
< >
Showing 1-6 of 6 comments
Moonlightfox 18 Dec, 2017 @ 9:17am 
Originally posted by nscmichael:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1085217847 lel
Macross micro missile massacre go!
Moonlightfox 18 Dec, 2017 @ 9:34am 
The properties are all listed in the documentation pages 'TurretTemplate" and "Weapon". Some of the same entries are on both. I've played with them a little while messing with the turret factory.

One I can specifically contribute is the boolean turret stat 'simultaneousShooting' which tells turrets with numVisibleWeapons > 1 to fire a shot from each barrel or not, or as Detailed Turret Tooltips calls it, "synchronized weapons." And then of course shotsPerFiring is "multiple projectiles."

Like many games, "reach" or range is a *derived* stat, which is why it only calibrates the reticule when changed. The actual range is simply the product of the weapon stats pmaximumTime and pvelocity.
Protato 18 23 Dec, 2017 @ 10:58am 
Yeah... I forgot about that already. XD
Ive been trying to use a derrivative of this for making all my mining and salvaging lasers longer reaching (as I find the base game reach to be cripplinging short and super frustrating) I had been putting it in the weapon generation script loop, and it works... sort of. All the mining lasers and salvagers in the game have the reach I was looking for, but the game no longer generates torps or sattelites. (there might be other side effects that I havent noticed) any ideas whats going on?
(script located in Avorion\my mods\data\scripts\lib\turretgenerator.lua)

local rarity = rarity_in or Rarity(getValueFromDistribution(rarities)) --mod start local template = GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material) local weapons = {template:getWeapons()} template:clearWeapons() for _, weapon in pairs(weapons) do -- if salvager or miner, double blength and adjust reach if weaponType == WeaponType.MiningLaser then weapon.blength = weapon.blength * 4 weapon.reach = weapon.blength elseif weaponType == WeaponType.SalvagingLaser then weapon.reach = weapon.isBeam and weapon.blength * 4 or weapon.pvelocity*weapon.pmaximumTime end template:addWeapon(weapon) end template.automatic = true return template --mod end --return GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material)
Protato 18 23 Sep, 2018 @ 5:59am 
Originally posted by Stalwart Pachyderm:
Ive been trying to use a derrivative of this for making all my mining and salvaging lasers longer reaching (as I find the base game reach to be cripplinging short and super frustrating) I had been putting it in the weapon generation script loop, and it works... sort of. All the mining lasers and salvagers in the game have the reach I was looking for, but the game no longer generates torps or sattelites. (there might be other side effects that I havent noticed) any ideas whats going on?
(script located in Avorion\my mods\data\scripts\lib\turretgenerator.lua)

local rarity = rarity_in or Rarity(getValueFromDistribution(rarities)) --mod start local template = GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material) local weapons = {template:getWeapons()} template:clearWeapons() for _, weapon in pairs(weapons) do -- if salvager or miner, double blength and adjust reach if weaponType == WeaponType.MiningLaser then weapon.blength = weapon.blength * 4 weapon.reach = weapon.blength elseif weaponType == WeaponType.SalvagingLaser then weapon.reach = weapon.isBeam and weapon.blength * 4 or weapon.pvelocity*weapon.pmaximumTime end template:addWeapon(weapon) end template.automatic = true return template --mod end --return GenerateTurretTemplate(seed, weaponType, dps, tech, rarity, material)

I'ven't played Avorion in such a long time. Also I thought I updated one of these tutors... forgot to mention there was an index.html in Avorion libraries.

If you could explain what torps are and what satellites mean in the game now, cool.
Just saying, you might need to ask my good friend Aki, via Avorion Forums. (avorion.net)
< >
Showing 1-6 of 6 comments
Per page: 1530 50