Package: aa-buybackprogram
Buyback ProgramAn Alliance Auth app for creating buyback programs and to allow users calculate prices for buyback contracts. Designed to be very transparent for the user and fast to use for the managers.ContentsImagesFeaturesInstallationProgram SettingsChange LogImagesFeaturesMultiple programs with their own settingsMultiple ownersSupports corporation and character ownersFlexible program settings:Allow all itemsAllow only specific itemsCustom location namesGlobal program taxItem specified taxHauling fuel costDynamic low price density taxNPC price for NPC buy ordersBest price variant for ore:Supports raw, compressed, refined and any combination of the 3.Will calculate price by the best available pricing methodAllow / disallow unpacked itemsRestrict program to:StatesGroupsOpen for everyonePersonal buyback static tracking for:Outstanding contractsFinished contractsProgram tracking for owners:Outstanding contractsTotal bought valueContract abuse checker and notificationsCheck if items do not match the calculated contractCheck if price does not match the calculated contractCheck if contract is made at wrong locationCheck if contract is made incorrectly to corporation or characterCheck extra characters in contract titleCheck if contract contains donationsCheck for scam contracts mimicing buyback contractsContract tracking historySupports base price sources from:Fuzzwork APIJanice APIUse buy, sell or split price as sourceUse 5% top average or instant prices for sourceSupports discord notificationsNotifications for accepted contractsNotifications for new contractsForaa-discordbotFordiscordproxyInstallationStep 1 - PrerequisitesBuyback program is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the officialAA installation guidefor details)Buyback program needs the appdjango-eveuniverseto function. Please make sure it is installed, before before continuing.Step 2 - Install AppActivate your venvsource /home/allianceserver/venv/auth/bin/activateInstall the pluginpip install aa-buybackprogramAdd'buybackprogram',into your settings/local.py installed apps sectionRun migrationspython manage.py migrateCollect static filespython manage.py collectstaticReload supervisorStep 3 - Update EVE Online API ApplicationUpdate the Eve Online API app used for authentication in your AA installation to include the following scopes:esi-contracts.read_character_contracts.v1esi-contracts.read_corporation_contracts.v1esi-universe.read_structures.v1Step 4 - Data PreloadBuybackprogram requires a lot of data to function as it is designed to allow your clients to sell you any items that exists in EVE. For this reason pre-loading all the date will take a while. Data pre-loading is used to decrease the amount of API calls made to type and price fetches.Preload Load Type DataTo load type data run the commandpython manage.py buybackprogram_load_data. This will start the preload of allEveType,SolarSystem,EveMarketGroupandEveTypeMaterialobjects.You can follow the progress of the load from your auth dashboard. This task can spike up easily over 100.000 tasks at a time so it is very normal that the queue grows very large while running this task.:warning: You will need to wait for the type data to load up before you can start to use the plugin. Trying to adjust program settings while the required data has not been yet loaded may result in failure of adjusting the settings.Preload Price DataAfter you have preloaded the type data you can preload price data into the database. Price data preloading is not mandatory but will speed up the first buyback calculations.:information_source: If price information is not found for items when the prices are calculated the first time the prices for that item will be fetched during the calculation process. This will increase the calculation time for the contract.To preload price data runpython manage.py buybackprogram_load_pricesStep 5 - Configure Auth settingsBuyback program requires a few periodic tasks to operate and update its data.Buybackprogram is designed to use locally stored prices to speed up the price calculations. It is important that you have the price update task in your periodic tasks so that your prices will update.By adding the following lines in yourlocal.pysetting file the program will update the stored item prices at midnight. This same task is also responsible for maintenance tasks such as removing unlinked tracking objects. It will also check for any new contracts and update the statistics page with them every 15 minutes:# Buybackprogram price updatesCELERYBEAT_SCHEDULE['buybackprogram_update_all_prices']={'task':'buybackprogram.tasks.update_all_prices','schedule':crontab(minute=0,hour='0'),}# Buybackprogram contract updatesCELERYBEAT_SCHEDULE['buybackprogram_update_all_contracts']={'task':'buybackprogram.tasks.update_all_contracts','schedule':crontab(minute='*/15'),}Additional settingsYou may change the following settings by adding the lines in yourlocal.pysetting filesNameDescriptionDefaultOptionsBUYBACKPROGRAM_TRACKING_PREFILLThis is the prefill tag you will have on the tracking description for your contractsaa-bbp.Free text inputBUYBACKPROGRAM_PRICE_SOURCE_IDStation ID for fetching base prices. Supports IDs listed onFuzzwork API. Does not work with Janice API!60003760See ID listBUYBACKPROGRAM_PRICE_SOURCE_NAMEDisplay name of your price source. Has no effect on the actual price fetch which uses the ID.JitaFree text inputBUYBACKPROGRAM_PRICE_AGE_WARNING_LIMITLimit in hours when an item price is considered as outdated48BUYBACKPROGRAM_PRICE_METHODBy default Fuzzwork API will be used for pricing, if this is set to "Janice" then the Janice API will be used.FuzzworkFuzzwork,JaniceBUYBACKPROGRAM_PRICE_INSTANT_PRICESOn default we use top 5% average prices. Set totrueto change to instant pricesFalseFalse,TrueBUYBACKPROGRAM_PRICE_JANICE_API_KEYThe API key to access Janice API.nullG9KwKq3465588VPd6747t95Zh94q3W2EBUYBACKPROGRAM_UNUSED_TRACKING_PURGE_LIMITTime limit to remove unlinked tracking objects from the database. Set to 0 to never purge any tracking objects.48Any number in hoursBUYBACKPROGRAM_TRACK_PREFILL_CONTRACTSDetermines if we will track and store contracts that starts with the prefill phrase but do not have any actual tracking hits in databaseTrueTrue,FalseNote: If you change your price source for an old install you need to wait for the price update task to run or manually run it to update your current database prices.Note: Using Janice API, Jita 4-4 prices will be used with the top 5% average price of the 5 day median price for buy and sell orders. No other price sources can be used with JaniceStep 6 - Adjust PermissionsOverview of all permissions in this program. Note that all permissions are in the "general" section.NamePurposeExample Target Audiencebasic_accessCan access this app and see own statics. Can use buyback programs that are allowed by the buyback restriction rules.Member Statemanage_programsCan create new locations and buyback programs and manage their own buyback programs. Can see own buyback programs statics.Buyback managerssee_leaderboardCan see the leaderboard stats for the programs that are visible for the userMember Statesee_performanceCan see the performance stats for the programs that are visible to the userMember / Managerssee_all_staticsCan see all statistics in all buyback programsLeadershipStep 7 - Program SetupAfter you have preloaded all the needed data you can start to setup programs.Each user withmanage_programspermission is able to setup their own buyback programs.ManagersEach buyback program is operated by a manager. To add a new manager click on thesetup managerbutton.LocationsEach buyback program operates at a location that is constructed ofSolarSystemand aCustom nameand an optionalStructure ID. To add a new location click on theadd locationbutton on the buyback page.Solar System & NameFind a solar system by typing in the solar system box. Then determine a name for the structure. Most often you want to use the actual in-game name of the structure so that people are able to identify the location.The solar system name will indicate your sellers where the program contract structure is located. The name will describe the structure name in where the contracts should be created and most often should be identical to the actual structure name in-game.Structure IDStructure ID is optional and will enable contract location tracking in the program statistics page. If a program location has been given a structure ID the statistics page will display a warning if the user has made the actual contract from some other structure than the one that was determined in the buyback program.The easiest way to find the actual structure id is to link the structure name into any chat box and post the structure name into the chat. This can be done in any channel or the structure name can be also copied from any MOTDs.After you have posted the structure name in the chat right click it and press copy. You can now paste the structure into notepad or any other text editor and your output should look like this:[17:37:54] Ikarus Cesaille > <url=showinfo:35826//1037962518481>Oisio - LinkNet Central Station</url> `The unique structure ID for your structure is then1037962518481. Adding the ID to the location ID field will check if the contract creation location matches this ID.Step 8 - Create ProgramOnce you have created a location and added at least one manager you can setup the actual program. Click on thecreate programbutton to create a new program.Program settingsEach program can be customized based on your needs. When setting up select the settings you wish to use.Name/DescriptionA display name for your programManagerThis is the character or the characters corporation which will be used as the assign to target for buyback contracts at this location. To add more owners use theadd managerbutton. You can only see your own characters.Is CorporationIf you wish that the contracts are assigned to the owners corporation instead of the character tick this box.LocationThe location where contracts should be created at. Only these locations are acceptedExpirationExpiration time the contracts should bet set to.Price typeYou can select what price type is used as the base price for your calculations. You can select from either buy, sell or split prices.Default taxThis is a general tax which is applied on all items in this program. If you wish to not allow all items in this program you can leave this to 0.General tax is applied on all items sold via the buyback. You can add additional taxes on individual items or ban them from being accepted to the program once you have created the program.Hauling fuel costYou can add a fuel cost expense that is applied on each item sold via this program based on the volume of the item.:information_source: This setting is aimed more to null sec buyback programs to make it easier to calculate your taxes and display your members the expenses you have when selling.Price density modifierYou can use a price density modifier which will add a additional tax on items with low price per volume ratio such as T1 ships.:information_source: This setting is aimer more at high sec buyback programs.Compressible price density modifierYou can select to ignore price density calculations for items that can be compressed. This is helpful when the compressed variants do not have proper buy orders in Jita. If you set this to True then the compressible item density will be calculated based on the isk / volume of the compression variant of the sold item.Price density thresholdThis is the lowest isk/m^3 ratio for items that are accepted to the program without the price density tax. Finding your own limits depends on your logistical department.For example: Tritanium is 500 ISK/m³ @ 5 ISK per unit price. PLEX is 14,5Trillion ISK/m³ @2.9M per unit price.Price density taxThis is the tax which will be applied to items with a price density below the price density threshold:warning: You should avoid using both the hauling fuel cost and the price density modifier at the same time as their function is fairly similar.Allow all itemsIf you wish to allow any types of items to be sold via this program keep this box ticker.You can determine individual increased taxes or ban items from being accepted to this program after creating the program.If you do not want to accept all items you can set this box to False. By doing this you will need to set up a tax for each item you wish to accept into the program individually.Ore settingsOre type items such as asteroid, moon goo and ice have additional pricing methods you can use. You can use a mix of any of the three pricing models.:information_source: When using more than one pricing model the best price will be used as the buy value.Use Refined valueIf you wish to calculate ore buyback value based on the mineral values tick this box.Use compressed valueIf you want to use compressed value as a pricing method tick this box.Use raw ore valueIf you want to use raw ore value as a pricing method you can tick this box. Note that some ores such as Kernite and Moon Goo do not represent the real mineral value of the ores.You can also individually ban raw ore types from the program. If you have an other option than the raw ore value selected the price will be calculated based on the other pricing models.Allow unpacked itemsMost often you want to buy only items that are packed. This will ensure that people do not sell items such as broken ammo crystals for you.Refining rateThe refining rate is used in combination with the use refined value option.Blue loot npc priceIf you cant to use NPC buy order prices for blue loot (Sleeper loot) instead of Jita prices check this box. NPC price for these items will always be used even when Jita price would be higher.Red loot npc priceIf you cant to use NPC buy order prices for red loot (Triglavian loot) instead of Jita prices check this box. NPC price for these items will always be used even when Jita price would be higher.RestrictionsYou can restrict the visibility of the buyback programs to groups and states with the restriction options.If no options are selected the program will be visible for everyone with thebasic_accessrole.:no_entry: Do not mix group and state restrictions as this may lead into logic error. If you need to mix then create a separate programs for them.Discord DM messagesIf you want to receive messages over discord for every new contract you can tick this box.:information_source: Requires theaa-discordbot pluginordiscordproxy appto workShow list of items on discord messageThis option will determine if a list of all contract items is added into the discord message description field. If you are accepting all items the list may become very long. If set to false will show a link to the tracking page instead.Discord channel messagesYou can send notifications about new contracts directly into the discord channel which is linked to AUTH,:information_source: Requires theaa-discordbot pluginordiscordproxy appto workStep 9 - Special TaxesYou can modify individual item settings or allow items for a program that has setallow all items = Falsevia thespecial taxesmenu for each program.Set a item specific tax for each item. The tax wil be applied on top of the default tax for the program. You can also disallow an item from being accepted in the contract completely.:information_source: The item specific tax can also be a negative value allowing you to decrease taxes on certain items.To adjust individual item taxes inside a program click on theSpecial taxesbutton next to your program.You can either add items one by one with theadd itembutton or add all items that belongs to a market group and every sub-child market group of that group withadd market groupYou can edit an item on the taxation table simply by adding it again. To delete the item press the delete button next to it or to delete all items in the program click on the delete all items button.Market GroupsWhen you add an market group each item inside that market group, the child of the market group and the child of the child group will be added to the item taxes (3 steps down)The easiest way to check which items are under which market group is to open the market window in-game or third party programs such ashttps://evemarketer.com/Example:Market groupMineralsis the bottom market group that includes the standard minerals. Adding this market group to the taxation will add 8 items to the taxes (Tritanium, Pyerite etc.)Market groupStandard oresis a parent category and there are no direct items under this category. However this category has child categories such as Veldspar, Jaspet, Scordite which each includes multiple variations of the ores. Adding theStandard orescategory will add each ore type to the special tax section.Most Common GroupsName | Includes | Items
-- | --
Standard Ores | Normal ores from belts and anomalies | Veldspar, Hedbergite, Compressed Arkonor ...
Moon Ores | Ores from moon mining | Cobaltite, Loparite, Pollucite
Ice Ores | Ores from ice mining | Blue Ice, Dark Glitter, Compressed Blue Ice ....
Minerals | Contains materials for refining Standard Ore | Tritanium, Pyerite ....
Salvage Materials | Salvage from loot | Armor Plates, Trigger Unit, Ancient Radar Decorrelator ...