Post by Jey123456 » Wed, 27. Nov 13, 14:35

As i mentioned in some other posts, ive been working on fixing the game in general, first was the engineer and now the trading / economy.I have already fixed just about every trading issues i could find (cargo drone going crazy, trade ship getting stuck, mining ship getting stuck etc etc), altho it is not in the form of a mod yet, due to the large amount of changes and the fact i worked with full files to ease the workBut those fix revealed a much larger issue. The supply and demand in Albion (freeplay) is out of wack to say the least. If you let the universe run for a few hours, you end up with every station starving, and all freighters unable to find work because no station is able to produce much of anything (there is some small production going on, but ridiculously small, the kind that only use 10% of one large freighter to move).This cause a major problem, that is even more gamebreaking than the tradenetwork not working. With the trader fixed, you cannot do any trades anymore since there is no supply available anywhere heh (npc take it all, and the demand is way higher than the supply)I am currently running some tests / experiments to fix that, and get a proper trading network going on, not too much supply, not too much demand, in some form of self balancing system.Stuff like station eating more when they have too much food (people are swimming in food so they waste a lot) which in turn will stabilize the food supply/demand and a similar system for energy.Most other material have an outlet already, and that is the shipyard. The shipyard will take it upon itself to make ships whenever its not busy.The shipyard bring another problem, there is essentially no ship dieing, so you end up with even more traders all around the place. This is due to the lack of proper "attacks", you see a xenon destroyer now and then, but it generally end up outnumbered and killed too easily. But i do not plan on fixing that part before the trading is actually working enough to get some supply / demand that player can use to trade as well.For those interested in trying it out. While i did not make a mod of it yet, i can provide a work in progress archive of what i use to work on.To use it, you will need to add "-prefersinglefiles" without the quotes to your launch options otherwise, many things will not load properly. I also strongly suggest you backup your save file, as there is a chance it will **** it up (altho ideally you should start a new game but well, the fix should work on an existing game). http://www.jeypc.com/dl/tradeship_fix_wip_0.08.zip to download. Extract it in the root of your X Rebirth folder. To uninstall, delete the aiscripts, index ,assets/props and assets/units then restart your game.Keep in mind, this is a very raw WIP version, it include a lot of changes that did nothing, and debug value (shouldn't spam your error logs tho, since they need a debugging tag set on the pilot in most cases)Feel free to reuse/modify/ whatever the code. Credits would be apreciated, but are not required.The WIP only include the trader fixes currently. I am still analysing the economy so there is no changes on that side currently. http://www.jeypc.com/dl/tradeship_fix_wip_0.15.zip to download. (delete the old pck files first they were renamed to xml in 0.15)* Most likely not save compatible with 0.08, use at your own risk. (start a new universe)- include close to perfectly working (in my tests), non players trade ai the last remaining bug is when drones refuse to appear, but the worst scenario is 11min15sec of waiting before they undock and resume their merry way- AI will also use their booster a lot more (will be separated in another mod once in mod release, but highly recommended to use with it as it reduce by a lot the time the ai waste in a zone).- some wares production and cost were changed to help keep the economy stable (wares.xml included in the mod is not a diff, and include every wares for ease of editing).- Fully rewritten custom.findfreetraderun to buy things that another station wants (so that it actually trades instead of stockpiling).- construction ships are now given a special attention by tradeships.-- Large freighters and XL will take the construction ship deal in priority if its able to satisfy at least 5% of its storage capacity and make a proffit (no matter if the proffit is better than stations or not and the specific ware is picked at random from what the freighter trade).-- Small and Medium tradeships will take any offer no matter how small, from the construction ship, so long as it turn a proffit. They also do not use the reservation system (so quite a few will rush to you with random wares your ship request).-- In my test, it took about 45mins before the first traders showed up (at which point, a shit ton showed up shortly after xD), altho that will entirely depend on the state of the economy in your universe*** as with all my other WIP, this is not garanteed to be safe compatible with either vanilla or the other versions, it is strongly recommended you use it on a fresh universe to avoid issues.*** The proper mod release version will ensure to function over a vanilla 1.18 altho the process to uninstall it might be slightly complicated due to the numerous changes involved in the save and command structures.* each trader now have a watcher that keep an eye on them, if they stop moving / executing trades attempt (frozen in whatever state) for more than 20 minutes, they get a force reset done on them, which should keep everything moving quite nicely (freezes are pretty rare now, since most are either handled by my changes with interrupts, or fixed with 1.18 beta), but well, a few still happen, and until i catch them all, that at least, let the universe run (and in debug, give me info on where the ai was frozen).* player trade should now be fully functional. Altho still need some esthetic work (some dock are hard to reach using collision, so if they cant get to the park withing acceptable time (5mins once the docking actually start), they disable the collision and just get to the destination.** fixed the docking, the notification and 3 different case of trading getting stuck.- As with all my other WIP there is no garantee the save will be compatible, altho an universe from 0.20 should since most changes in between are compatible or player trade related (which you can generally reset easily by removing / adding to your squad).version 0.22 will most likely be the final WIP release. Everything should work at an acceptable level (minus a small bug where a trader with no tradenpc cannot accept ai reservation, but there is manual fix you can do about that on page 18 ).Once the mod is completed, it should also (in theory, could end up being impossible depending on how much i can cheat around the problem xD) be able to be "uninstalled" from a save by installing, and then removing the mod once its released