dnightmare Posted September 13, 2017 Share Posted September 13, 2017 ScrapyardPlus Description Your salvaging ops are longer then 60 minutes? You want to get something in return for grinding all the precious reputation? With ScrapyardPlus you can: buy up to 8 hours total (depending on your reputation) increment your current license in variable intervals from 5 minutes all the way up to 3 hours per order get discounts for bulk orders and your current standing with the owner of the scrapyard buy a personal license even as a member of an alliance earn a lifetime-license for yourself or your alliance and never have to bother with buying an extension again (lifetime status is granted faction-wide!) configure all important things to suit your (or your servers) needs mods/ScrapyardPlus/config.lua Installation - download & extract the mod into %AppData%\Avorion\mods\ folder on Windows or ~/.avorion/mods/ on Unix-based systems - done Default Config -- general ScrapyardPlus.enableDebug = false -- [Default: false] Enable/Disable detailed log output ScrapyardPlus.alliancePriceFactor = 4.5 -- [Default: 4.5] How much alliances have to pay more for a salvaging license ScrapyardPlus.pricePerMinute = 175 -- [Default: 175] Price per one minute of salvaging -- timers / announcements ScrapyardPlus.advertisementTimer = 120 -- [Default: 120] Time (in seconds) when the scrapyard will spam the system with "get a license now" ScrapyardPlus.expirationTimeNotice = 600 -- [Default: 600] Time (in seconds) at which the first reminder will be send to players/alliances about their license running out ScrapyardPlus.expirationTimeWarning = 300 -- [Default: 300] Time (in seconds) at which the second reminder will be send to players/alliances about their license running out ScrapyardPlus.expirationTimeCritical = 120 -- [Default: 120] Time (in seconds) at which the third reminder will be send to players/alliances about their license running out ScrapyardPlus.expirationTimeFinal = 30 -- [Default: 30] Time (in seconds) at which the FINAL reminder will be send to players/alliances about their license running out -- lifetime ScrapyardPlus.allowLifetime = true -- [Default: true] Enable/Disable the ability to get lifetime salvaging licenses ScrapyardPlus.lifetimeRepRequired = 100000 -- [Default: 100000] Minimum required reputation before you start to gather experience towards lifetime ScrapyardPlus.lifetimeExpTicks = 1000 -- [Default: 1000] Actions (in ticks) after the player/alliance will get experience ScrapyardPlus.lifetimeExpRequired = 100000 -- [Default: 100000] Amount of experience to unlock lifetime-license ScrapyardPlus.lifetimeExpFactor = 0.75 -- [Default: 0.75] Factor to de-/increase the base experience calculation ScrapyardPlus.lifetimeAllianceFactor = 0.5 -- [Default: 0.5] Factor to de-/increase the amount an alliance will get compared to a player ScrapyardPlus.lifetimeExpBaseline = 7 -- [Default: 7] Base value of experience that's always granted -- high traffic system ScrapyardPlus.highTrafficChance = 0.3 -- [Default: 0.3] Chance that a discovered system is regenerative ScrapyardPlus.enableRegen = true -- [Default: true] Enable/Disable the regeneration of wrecks inside a system ScrapyardPlus.regenSpawntime = 15 -- [Default: 15] Time (in minutes) how often new event will start to spawn wrecks -- events ScrapyardPlus.enableDisasters = false -- [Default: true] Enable/Disable events from the (G)lobal (O)rganization of (D)isasters ScrapyardPlus.disasterChance = 0.03 -- [Default: 0.03] Chance that something bad will happen ScrapyardPlus.disasterSpawnTime = 20 -- [Default: 30] Time (in minutes) how often it's checked if bad things will happen Screenshots Solo player after getting his first license Alliance pilot with a normal reputation Nearly reached lifetime status but lost reputation before finishing it (old version) Finally reached lifetime status (old version) Roadmap Implemented: - extend your current license instead of overwriting it - longer maximum duration for your license - reputation based benefits (max duration and discount) - flexible duration selection via slider - add support for mod-configuration - split the license system into private & alliance so you can buy a personal one even if you are in an alliance - lifetime license - regenerating wrecks / events to support lifetime licenses Planned: - polishing current implementation with more texts, events, interactions Notes As I was not satisfied with the current salvaging-license model, I got to work and learned a bit of lua and modified the original script. So far you can stack your licenses, so if you buy 5 minutes two times, you get 10 minutes total. As this is my first mod for Avorion apart from some small private things here and there, don't expect the cleanest code in the world but I did my best to test it on my local machine and my dedicated server and haven't encountered anything game-breaking so far. It's available at GitHub if someone wants to contribute. Constructive feedback what I could change/implement/extend upon or fix in case you find a bug is more than welcome! Project-URL: https://github.com/ctcDNightmare/avorion-scrapyardplus Shoutout to Dirtyredz - We're working together on each others mods now and without him I wouldn't have gotten into publishing this mod at all. Changelog Version 2.1.0 "immunogenetical-transfashion" fix issues with alliance license add spawning of new wrecks in high-traffic systems (*finally!*) add new icons for solo & alliance licenses add more translations enable high traffic systems by default Version 2.0.0 "xenomorphic-cobblestone" steam workshop integration is here! updated vanillacode to 0.26.x Version 1.4.1 "profanatory-narcotisation" added travis.ci chain updated vanillacode to 0.19.x removed duplicated vanilla code refactored code-structure split config and modinfo added more testcases Version 1.3.2 "kangaroolike-bowman" fixed selling of ship updated for 0.17 (works with 0.19.x as well code-documentation Version 1.3.1 "unassimilable-demodulator" fixed lifetime initialization on newly discovered scrapyards Version 1.3.0 "preelementary-reptile" restructured file-layout changed nicerNumbers helper to vanilla equivalent refactored modConfig add lifetime license feature Version 1.2.1 "bushless-intimidation" port of vanilla functions from 0.14.2 add missing getUpdateInterval() & onCloseWindow() Version 1.2.0 "purebred-terrestrial" buy personal licenses even as alliance member fixed vanilla notifications notify all online members of an alliance if time is running out pricePerMinute and alliancePriceFactor are now configurable add clickable coordinates to notifications Version 1.0.0 "preantiseptic-lingual" variable maxDuration based on reputation revamped UI with discounts for bulk-order & reputation bought time is added to current one instead of overwriting it AWS Release Mirror Version 1.4.3 Version 2.1.0 DNightmare out! ScrapyardPlus-1.4.1.zip ScrapyardPlus-2.1.0.zip Link to comment Share on other sites More sharing options...
Dirtyredz Posted September 14, 2017 Share Posted September 14, 2017 Looks promising, cant wait to try it out. As we discussed earlier, im hoping to get the MoveUI ScrapyardLicense up and running, Just today, I lost track of time and ran out of time on my pathetic 60 min license. costed me my ship and faction rep. This Mod and ScrapyardLicense that you started will be a big help. Thanks again Link to comment Share on other sites More sharing options...
Hammelpilaw Posted September 15, 2017 Share Posted September 15, 2017 The roadmap looks great. We already use extended license times, up to a lifetime license. It makes you able to put some captain controlled ships into scrapyard and let them farm without killing reputation. Link to comment Share on other sites More sharing options...
dnightmare Posted September 17, 2017 Author Share Posted September 17, 2017 Version 1.2.0 is out now! - buy personal licenses even as alliance member - fixed vanilla notifications - notify all online members of an alliance if time is running out - pricePerMinute and alliancePriceFactor are now configurable - add clickable coordinates to notifications Link to comment Share on other sites More sharing options...
dnightmare Posted September 23, 2017 Author Share Posted September 23, 2017 Version 1.2.1 released. Compatible with v0.14.2 of Avorion! Link to comment Share on other sites More sharing options...
Lonewolf79 Posted September 24, 2017 Share Posted September 24, 2017 Sorry posted in the wrong thread, should be in MoveUI obviously :) Hi! Using your latest version with the beta branch of Avorion I am getting this error everytime I try to get a license: 2017-09-24 22-58-37| mods/MoveUI/scripts/player/ScrapyardLicenses.lua:46: in function ? 2017-09-24 22-58-37| error constructing Entity: Entity with index doesn't exist at [C]:-1: in function Entity I can salvage away to my hearts content, they don't seem to care but I cannot buy the license Link to comment Share on other sites More sharing options...
Dirtyredz Posted September 25, 2017 Share Posted September 25, 2017 Sorry posted in the wrong thread, should be in MoveUI obviously :) Hi! Using your latest version with the beta branch of Avorion I am getting this error everytime I try to get a license: 2017-09-24 22-58-37| mods/MoveUI/scripts/player/ScrapyardLicenses.lua:46: in function ? 2017-09-24 22-58-37| error constructing Entity: Entity with index doesn't exist at [C]:-1: in function Entity I can salvage away to my hearts content, they don't seem to care but I cannot buy the license This bug is actually a MoveUI bug, of which ive just fixed: http://www.avorion.net/forum/index.php/topic,3834.0.html Link to comment Share on other sites More sharing options...
Lonewolf79 Posted September 25, 2017 Share Posted September 25, 2017 This bug is actually a MoveUI bug, of which ive just fixed: http://www.avorion.net/forum/index.php/topic,3834.0.html Aye noticed that just after I posted, sorry about that! Bad idea to try and do such things in the middle of the night :) Thanks for the fix! Link to comment Share on other sites More sharing options...
dnightmare Posted September 25, 2017 Author Share Posted September 25, 2017 Well better posted in the wrong spot than not at all :) Dirty & Me are actually working together back & forth on those two mods, so it was only semi-wrong anyway. I will take a closer look at my current version to and see if there's any other issues I overlooked when testing. Want to get more stuff done for lifetime license anyway (+ regenerating scrapyards to support lifetime licenses) Link to comment Share on other sites More sharing options...
dnightmare Posted October 1, 2017 Author Share Posted October 1, 2017 Sooo, v1.3.0 is finally out! We now have working lifetime licenses yay They are quite hard to get with default settings BUT they work for the whole faction and not just a single scrapyard. If you are at max reputation (100k) you start earning experience towards the lifetime status when you are salvaging with a valid, regular license until you reach enough to permanently activate your lifetime-status. Of course the amount, speed, etc can all be adjusted in the modconfig for your personal preference. To make lifetime licenses worth using, I've also started to work on regenerating wrecks so you don't run out of scrapmetal after a while but this will go into 1.4+. o/ DNightmare Link to comment Share on other sites More sharing options...
Shrooblord Posted October 8, 2017 Share Posted October 8, 2017 Wow, what with the lifetime licenses mod, this adds simple, yet clean and amazing functionality to the game I didn't even knew I missed, until I found this thread. Thanks a bunch for this! Also, looking at your mods/ folder structure and the mod hooks you're implementing by writing them into the original scripts files is giving me massive inspiration on how to actually handle the ModLoader / ModManager I'm working on in secret for my personal use, but plan to release once functional. Thanks a bunch for that!! EDIT: I added your installation instructions to the .zip file as a README.txt, for convenience when downloading. Literally just a copy-pasta of the first post's instructions, but here's the .zip file anyway. ScrapyardPlus-1.3.1-1a.zip Link to comment Share on other sites More sharing options...
dnightmare Posted October 9, 2017 Author Share Posted October 9, 2017 Also, looking at your mods/ folder structure and the mod hooks you're implementing by writing them into the original scripts files is giving me massive inspiration on how to actually handle the ModLoader / ModManager I'm working on in secret for my personal use, but plan to release once functional. Credit where credit is due: That's totally the idea from DirtyRedz who got me hooked with the whole modding in the first place. But glad you enjoy my little mod :) Once I find the time to get the events in there as well I'm sure it'll be another thing you didn't know you wanted :D Link to comment Share on other sites More sharing options...
Shrooblord Posted October 9, 2017 Share Posted October 9, 2017 I've been playing with this active for a couple of hours now, and I have a question: when I'm out-of-Sector, my ships at the Scrapyard still seem to be mining away: I'm still constantly collecting resources and guns and stuff, and when I return to the Scrapyard, lots of dead ships have been cleared away. How does this work? I thought Sectors weren't loaded while you weren't in them, yourself. I also have Fleet Control (0.4 - Modified) (thanks Hammel! You seem to be keeping all the dead mods alive (y) ) installed. Maybe that's introducing the change, rather than this mod? Whatever is causing it, I'm finding it very, very cool. There is only one problem though: you need to be at the Scrapyard to tell your "drones" to stop, as you cannot issue them commands while OoS (even with Fleet Control). I got a lot of angry messages from my most prized ally while I was in a mad dash through gates and hyperdrive warps trying to get there in time, and managed to literally on the last second before they'd destroy aaaalll of my baby ships to buy a new license. Hahaha that won't happen anytime soon, now, thanks to MoveUI's floating timer to keep me reminded. Man, all these mods are mega-cool. Thanks for all your work, guys and gals! Link to comment Share on other sites More sharing options...
dnightmare Posted October 9, 2017 Author Share Posted October 9, 2017 How does this work? I thought Sectors weren't loaded while you weren't in them, yourself. Since a couple of versions, Avorion will keep the last X sectors alive when you leave. For singleplayer it's 500 or so, for multiplayer the serverowner can set it, default to 5 iirc. There is only one problem though: you need to be at the Scrapyard to tell your "drones" to stop, as you cannot issue them commands while OoS (even with Fleet Control). I got a lot of angry messages from my most prized ally while I was in a mad dash through gates and hyperdrive warps trying to get there in time, and managed to literally on the last second before they'd destroy aaaalll of my baby ships to buy a new license. At the moment there's no way to remotely tell them to stop. I'm working on something like that: https://github.com/ctcDNightmare/avorion-remotecontrol The proof of concept works so far: (watch in fullscreen to read the console & chat output from the remote ships) But it's still far away from getting done / I'm busy with RL or ScrapyardPlus Man, all these mods are mega-cool. Thanks for all your work, guys and gals! Thanks :) Glad there's people out there who like my (and others') work. Link to comment Share on other sites More sharing options...
Shrooblord Posted October 10, 2017 Share Posted October 10, 2017 Sweet, that looks nice. I'm assuming it remotely gives Orders to Captained ships? Is there any way it could be combined / interfaced with by the FleetControl mod? It's the first mod I installed for this game and I don't know if it's first girlfriend nostalgia syndrome or something, but I'm super madly enjoying having *it* as the interface to my cronies rather than the "find ship somewhere in this godforsaken Sector full of distracting clutter...>press F...>find the option Orders...>select Order...>rinse and repeat 15 times for all my other ships... ugh." methodology of vanilla Avorion. Also I was not aware of the fact that they'd already implemented the change in Sector keep-alive behaviour that they've been promising / looking forward to adding as a feature in the game. That's great news. But it's still far away from getting done / I'm busy with RL or ScrapyardPlus What is RL? Real Life? Rural Lollygagging? Reticular Larson (god I hope not!)? EDIT: Avorion was just updated and I diffed some files just to be sure. Looks like scrapyard.lua in data/scripts/entity/merchants had some rework, according to this diff I made. I don't know what that means for your mod specifically - just thought I'd point it out. EDIT II: Just had a more in-depth comparison of the two versions of scrapyard.lua, the old one the mod is based off of and the newly updated one. It looks at surface level as if not too much has changed, just some Faction logic to differentiate Alliances from individual Players, and a new method that modifies chat messages based on whether or not you're in the Sector the message is being posted from i.e. it tells you the coords of the Sector if you're not in it, and else it's just the same message we already know from before the update. From looking at that, it feels like it shouldn't break your mod too much. But I don't know: maybe the Faction logic actually screws over whatever you are doing behind the scenes. Check it out. Link to comment Share on other sites More sharing options...
Dirtyredz Posted October 10, 2017 Share Posted October 10, 2017 You can use the updated data/scripts/entity/merchants/scrapyard.lua Just remember to transfer the lines at the bottom if not pcall(require, "mods/ScrapyardPlus/scripts/entity/merchants/scrapyard") then print("Failed to load ScrapyardPlus") end -- DNightmare/ScrapyardPlus END if not pcall(require, 'mods.MoveUI.scripts.entity.merchants.scrapyard') then print('Mod: MoveUI, failed to extend scrapyard.lua!') end one line is for this mod, the other line is for my MoveUI mod. Link to comment Share on other sites More sharing options...
Shrooblord Posted October 10, 2017 Share Posted October 10, 2017 Hah, whups that would explain why the update broke the mod. I only replaced the MoveUI line, not the scrapheap line, too. :P The good news, however, is that even with the script inactivated, the previous timer (in my case 4 h or so) is left as-is. Link to comment Share on other sites More sharing options...
dnightmare Posted October 10, 2017 Author Share Posted October 10, 2017 Well yeah, the update replaced my hook / loading so that's why there were issues. On the flipside: ScrapyardPlus only extends the vanilla logic and saves to the same tables etc., that's why the extended timers will always be there and even work, once purchased, w/o the mod. (and why MoveUI works with and without my mod. No witchcraft needed) The things that got changed (faction-fixes and chat messages) were included in 1.3.1 while we were on 0.14.x Beta so everything should be running smooth. Will look into the details nontheless when back home. RL = real life :P doing 60-70hrs/week kinda takes away the time from modding and recharging my batteries. About the remote control: It's based on two "channels" which I use to communicate between player and the captained ships. You have to visit the systems where your fleet resides in to get the corresponding script attached, after that they report back if the system/fleet is active or inactive, etc. The UI will include a dropdown of all active ships + maybe a small plan-displayer so you see what is what. After selecting a ship you could select the possible command on the right side, a bit like in the PoC. About fleetcommand: I'll try and make mine work as hazzlefree as possible. If it's in a stable state, I'm looking into how to extend the options, or incorporate stuff form the other mod, we'll see... For now, my focus lies on ScrapyardPlus 1.4 and getting the events done. After that, I'll switch back to RemoteControl. Link to comment Share on other sites More sharing options...
Shrooblord Posted October 10, 2017 Share Posted October 10, 2017 60-70 hours a week?! That's crazysauce! Yeah, you keep at it and make sure you don't burn through yourself, mate. I'll be here. Waiting. alone send help So if I understand correctly, your RC mod will eventually give Orders to ships in faraway Sectors, which is possible because of the keep-alive functionality that's now in the game? That's mega cool. I'll be looking forward to seeing that pop up in the future. Link to comment Share on other sites More sharing options...
cyrusblaze Posted October 10, 2017 Share Posted October 10, 2017 Love this mod. Been spending more and more time in scrapyard lately (especially with the custom fighters update!) Randomish Idea.. (not sure if remotely possible) For the replenishing of a scrap yard would you be able to have the faction spawn in random ships over time then have them get destroyed nearby to create new wreckage? Maybe have it spawn 3 ships at a time - two smaller 'tugboats' plus a larger ship to 'scrap' ? To simulate them bringing old defunct ships to the scrap yard? EDIT: Maybe look into the way certain events happen like when a ship warps in followed by enemies? (Also not sure how that works either) but have the first ship be the one to be scrapped, followed by ships of that faction to finish it off then leave? Link to comment Share on other sites More sharing options...
dnightmare Posted October 10, 2017 Author Share Posted October 10, 2017 That's exactly what I'm working on with the 1.4 event-system :) Link to comment Share on other sites More sharing options...
Devious Posted November 21, 2017 Share Posted November 21, 2017 After starting playing again I was hoping Dirty would have installed this on our server already but appearently not. Can't wait to try it out, stacking the licenses is something we've been waiting for since the game launched :) Looking forward to the respawning scrapyards! Link to comment Share on other sites More sharing options...
dnightmare Posted November 21, 2017 Author Share Posted November 21, 2017 Dirty and me kinda fell into a black-hole called "Factorio" xD He's on track with updating the modpack again and i'll prolly take a look if something needs fixing for 0.15 over the weekend... maybe even make some progress on the events / respawning system Link to comment Share on other sites More sharing options...
Shrooblord Posted January 10, 2018 Share Posted January 10, 2018 I ran into an issue while using this mod: I can't seem to sell my ship to a Scrapyard. I click the button "Sell", but nothing happens. Is this a bug caused by the mod? Link to comment Share on other sites More sharing options...
dnightmare Posted October 7, 2018 Author Share Posted October 7, 2018 I ran into an issue while using this mod: I can't seem to sell my ship to a Scrapyard. I click the button "Sell", but nothing happens. Is this a bug caused by the mod? yay for thread-necro but: I've fixed your issue and updated the mod along the way.. v1.3.2 out now :) Have fun. 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