mysteryx Posted February 8, 2017 Share Posted February 8, 2017 With the additions and edits below the equipment dock is worth visiting it. And Turret factories can produce higher quality turrets. And every shop has more items in stock now! Ive posted the code for this, to edit the files by hand, in case you have to redo things or koonschi updated files. ---------- \data\scripts\entity\merchants\turretfactory.lua (client + serverside) Starting Line 348 rarityCombo:addEntry("Common"%_t) rarityCombo:addEntry("Uncommon"%_t) rarityCombo:addEntry("Rare"%_t) rarityCombo:addEntry("Exceptional"%_t) Add rarityCombo:addEntry("Exotic"%_t) or even rarityCombo:addEntry("Legendary"%_t) When you want to to build these quality turrets Screenshot: https://i.gyazo.com/248fcb74fb7a79cde329be96225c849c.png ---------- \data\scripts\lib\shop.lua (serverside) Starting Line 529 item.name = item.name or "" item.price = item.price or 0 item.amount = amount item.amount = amount * x Replace x for any wished number (Thanks to LordHavoc! >> Link <<) Screenshot: see below ---------- \data\scripts\lib\fightergenerator.lua (serverside) Starting line 42 rarities[5] = 0.2 -- legendary rarities[4] = 1 -- exotic rarities[3] = 4 -- exceptional rarities[2] = 8 -- rare rarities[1] = 16 -- uncommon rarities[0] = 64 -- common Remove rarity you dont want or set it to 0, and adjust the other values if needed/wanted. All remove rarities will not shown in the shop again! Screenshot: https://i.gyazo.com/c6cda516183f3bb8b92ba31c337dd88d.png ---------- \data\scripts\lib\turretgenerator.lua (serverside) Starting line 42 rarities[5] = 0.2 -- legendary rarities[4] = 1 -- exotic rarities[3] = 4 -- exceptional rarities[2] = 8 -- rare rarities[1] = 16 -- uncommon rarities[0] = 64 -- common Remove rarity you dont want or set it to 0, and adjust the other values if needed/wanted. All remove rarities will not shown in the shop again! Screenshot: https://i.gyazo.com/539cf1a11918437576980ffa41ef88d5.png ---------- \data\scripts\lib\upgradegenerator.lua (serverside) starting line 63 table.insert(weights, 16) table.insert(weights, 48) -- common table.insert(weights, 16) -- uncommon table.insert(weights, 8) -- rare table.insert(weights, 4) -- exceptional table.insert(weights, 1) -- exotic table.insert(weights, 0.2) -- legendary starting line 88 table.insert(weights, 2 + pos * 14) -- 16 at edge, 2 in center table.insert(weights, 8 + pos * 40) -- 48 at edge, 8 in center, common table.insert(weights, 8 + pos * 8) -- 16 at edge, 8 in center, uncommon table.insert(weights, 8) -- rare table.insert(weights, 4) -- exceptional table.insert(weights, 1) -- exotic table.insert(weights, 0.2) -- legendary Set rarities you don't want to 0, adjust the other values if needed/wanted. All remove rarities will not shown in the shop again! Screenshot: https://i.gyazo.com/b6b7025c2d9645d6346b18f43ccf1af6.png Link to comment Share on other sites More sharing options...
Tarantel Posted February 8, 2017 Share Posted February 8, 2017 Dude this is a Tutorial and no Mod xD The turretfactory.lua is also modified by me for a long time xD I changed the Raritys and the Materials ^^ Link to comment Share on other sites More sharing options...
Devious Posted February 8, 2017 Share Posted February 8, 2017 One odd thing I noticed after making these changes is that when putting in more materials at turret factories or upgrade factories is that the stats go down, while it seems to me that they should go up when you put more materials in them. Might be just a coïncidence but I didn't notice it before :p Link to comment Share on other sites More sharing options...
mysteryx Posted February 8, 2017 Author Share Posted February 8, 2017 You mean like this? http://www.avorion.net/forum/index.php/topic,1329.0.html Link to comment Share on other sites More sharing options...
Devious Posted February 8, 2017 Share Posted February 8, 2017 Yes, exactly that! Luckily it seems easy to fix :) Link to comment Share on other sites More sharing options...
LordHavoc Posted February 9, 2017 Share Posted February 9, 2017 Starting Line 529 item.name = item.name or "" item.price = item.price or 0 item.amount = amount item.amount = amount * x Replace x for any wished number (Thanks to random dude, can't remember his name) You is very welcome http://www.avorion.net/forum/index.php/topic,1071.msg4856.html#msg4856 Link to comment Share on other sites More sharing options...
mysteryx Posted February 9, 2017 Author Share Posted February 9, 2017 Thank you LordHavoc, edited :) Link to comment Share on other sites More sharing options...
mysteryx Posted February 15, 2017 Author Share Posted February 15, 2017 updated Tarantel, would be nice if you add this to you ModList Link to comment Share on other sites More sharing options...
howimineforfish Posted March 19, 2017 Share Posted March 19, 2017 As far as I know, changing turretgenerator.lua and upgradegenerator.lua will affect more than just the equipment dock. It will also affect boss loot, faction thank-you rewards and maybe ai ships? Can't tell. There's a call to UpgradeGenerator.getSectorProbabilities(...) in equipmentdock.lua. Just change the weights variable after the call rather than globally. For turrets, it seems they are using TurretGenerator.generate(...) in turretmerchant.lua. Unfortunately that will probably affect the turret merchant as well. I'm not sure if it's possible to make the equipment dock use a custom script. I think currently the equipment dock just has the turret merchant script slapped on. Either way, just pass the rarities to the generate function from turretmerchant.lua. Also watch for the 0th element gotcha with the arrays. For whatever reason UpgradeGenerator uses an array starting with 1 and turret generation starts with 0. EDIT: Apparently you can use a custom script for the turret part of the equipment dock; "createEquipmentDock" in SectorGenerator.lua but I haven't tested it. 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