Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** This is Version 2.451 of the LTD Systems Analysis Excel spreadsheet ***
- June 29, 2020
- Check here for updates:
- https://pastebin.com/wn58UUqe
- The spreadsheet was designed on the latest version of Excel (V16) in 2020. The functions may not work on older versions, or Excel for Mac.
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.41, June 13 2020
- After the Fleet Carrier update the structure of the data received from EDDB changed, leading to a large overestimation of systems in Public Holiday and Pirate Attack.
- For some reason the EDDN (and subsequently EDDB) is not syncing the 'system state' data with the 'controlling minor faction state' data, which is how we derived system states before the FC update.
- I have found another method to calculate system states and hopefully this will be accurate going forward.
- Please let me know if you encounter any bugs as I usually test an update for about 5 days, but in this case I've only tested for 24hrs.
- Also, the Live Public Holiday and Pirate Attack worksheets won't produce accurate results until the state data structure is fixed, as EDDB is currently using old system state data for PH/PA. In reality there are only 70-100 systems in Public Holiday but EDDB is reporting over 600. Hopefully this will be resolved soon.
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.42, June 13 2020
- A few CMDRs have requested I add back in separate analyses for pre-tick and post-tick data.
- Running a pre-tick analysis after you download the EDDB JSON file (assuming you download the file before the next tick) will greatly reduce double-checking of systems that have already been checked by another CMDR.
- Specifically, it excludes systems that have been checked after the most recent tick, which won't change until the next tick.
- After the tick you'll need to run a 'post-tick' analysis, and this list of candidate systems will be much larger since all system states have the potential to change after the tick.
- On the Action page, I've also added a 'Remove Small Population' button to remove systems with a population under 1,000,000. This is something I've been doing for a while manually, as small population systems rarely (if ever) have a high demand for LTDs.
- * Please note, after the FC update there are 5 times the number of systems with 'pending expansion'. It used to be around 200, now it's closer to 900.
- As such, the 'Post-tick Full Analysis' will have around 800 systems to check. Therefore I recommend only running the Full Analysis using the 'Pre-tick' button (approx 150 systems), and only run the Core Analysis using the 'Post-tick' button. Hopefully the BGS will settle down soon.
- Remember, after you remove the 'recovering' systems, and systems with a small population, the candidate lists become much more manageable.
- As always, please let me know if you find any bugs, thanks!
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.43, June 15 2020 - BETA UPDATE - TICK REVISION
- Using the knowledge that Expansion and Pending Expansion states are faction-wide (if one system controlled by a minor faction is in Expansion or Pending Expansion, then all their controlled systems will be in Expansion or Pending Expansion, respectively).
- Therefore, in between the server tick and the release of the EDDB JSON files, if a CMDR had detected a system is in Pending Expansion then we know all the systems under the control of that faction will also be in Pending Expansion, at least until the next tick. Therefore we can exclude all of those systems controlled by that faction as it will be impossible for any of their systems to be in the X4 state (since X4 requires Expansion, not Pending Expansion).
- I have added a button to remove systems in Confirmed Pending Expansion, in order to reduce search time. This will only apply to pre-tick analyses - in post-tick analyses (after the server tick) we don't know what changes in states have occurred so no systems will have confirmed Pending Expansion. This will make sense when you have been using the worksheet for a while, but in the meantime always click the 'Remove Pend Expan' button whenever you run an analysis.
- Also note, the server tick time has recently changed, it is now at (approx) 09:00 GMT. For this reason, all previous version of this worksheet are no longer accurate. Please download this version, thank you.
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.44, June 28 2020 - BUG FIX
- Fixed a minor bug in the Action sheet. Whenever a macro button was used to remove certain systems (i.e., remove low population, NPC faction, etc), if the table became empty after the systems were removed then Excel would fail to remove the filter that was used to identify the systems for removal.
- So for example, if you pressed the 'Remove Low Population' button and the Action sheet became empty (all systems in the Action sheet had a population under 1 million), then the low population filter (next to the Population header) would not be cleared.
- The error didn't actually affect any subsequent analyses, but the row numbers in the Action table would be highlighted in blue indicating a filter was present when it wasn't.
- This bug has now been fixed via a hard reset of all filters in the Action table after each filter is applied.
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.45, June 29 2020 - SERVER TICK UPDATE
- After the Fleet Carrier update the server tick time changed to 9am UTC. Over the past few weeks the server tick has become later and more variable, which messes with our commencement time to start checking systems for X4 states.
- In this update I have set the server tick to 11am UTC/GMT, which should cover most server ticks.
- Please keep an eye on
- https://elitebgs.app/tick
- And if the tick time changes again please PM me on reddit (psychicEgg) so I can update the worksheet, thank you.
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- UPDATE 2.451, June 29 2020 - LIVE P/H AND P/A DATA AVAILABLE AGAIN
- EDDB have fixed their live Public Holiday and Pirate Attack data tables, so I switched back on Live data import functions
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Introduction
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Hi CMDR, this tool will help you find stations that offer high prices for low-temperature diamonds (LTDs).
- The LTD price is determined by the state of the controlling faction in a system.
- Ideally we are looking for a combination of four states (aka X4 states):
- Boom (or Investment) + Expansion + Civil Liberty + Public Holiday
- This combination will activate an LTD price multiplier to around 1.6+ million/cr each.
- Slightly less ideal prices (around 1.1 million/cr can be found in systems that have Pirate Attack (instead of Public Holiday).
- * Note, a system can't be in Boom and Investment at the same time, nor in Public Holiday and Pirate Attack at the same time.
- Sometimes a 3-state pattern, such as Boom (or Investment) + Expansion + Public Holiday may offer prices equivalent to Pirate Attack (1.1 mil), but not always.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Data used in the analyses
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Unfortunately we can't search for multiple system states on the GalMap, so we need to use other sources.
- Specifically, we are going to use a large set of data that is graciously provided by EDDB.io (a HUGE thankyou to EDDB!).
- EDDB data is collected by CMDRs on PC running applications that connect to the Elite Dangerous Data Network (EDDN). If you're on PC, then please, please, please run either EDMC or ED Discovery to contribute your travel data to EDDB/Inara.
- - EDMC (https://github.com/Marginal/EDMarketConnector/wiki)
- - ED Discovery (https://github.com/EDDiscovery/EDDiscovery/wiki)
- Ask for help on Reddit, Facebook or the official forums if you're not sure how to connect your account
- https://www.reddit.com/r/EliteDangerous/
- https://www.facebook.com/groups/elitedangerouscommunity/
- https://forums.frontier.co.uk/forums/elite-dangerous-newcomers-guides-tutorials/
- By the end of this tutorial, you'll be able to analyse the EDDB database for systems that are in (or likely to move into) the four states that multiply the LTD price.
- ==================================================
- ==================================================
- These instructions are divided into two parts.
- Part 1 describes how to set up your spreadsheet to use data from EDDB.io, and you'll only need to go through the setup once.
- Part 2 describes how to run an analysis and check systems for high LTD prices.
- ==================================================
- ==================================================
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Part 1: Setting up the spreadsheet: Connecting the spreadsheet to the EDDB data sources
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Download the main spreadsheet from this link:
- https://drive.google.com/file/d/1Jl7kq3XhL1_6fF0E40CwIItiZoTx4BiU/view?usp=sharing
- Before you open the spreadsheet, we need to grab three database files from EDDB.io
- The spreadsheet uses three EDDB data sources:
- - systems_populated.json
- - stations.json
- - factions.json
- A JSON (JavaScript Object Notation) file is simply a database file, similar to an Excel .xls file but in a different format.
- We need our Excel spreadsheet to read data from these JSON files.
- Firstly, download the three files from EDDB.io, and save them in a location on your PC that is easy to find.
- https://eddb.io/api
- On the main API page of EDDB.io you will see heaps of files available.
- The files we want are:
- 1. systems_populated.json
- 2. stations.json
- 3. factions.json
- Make sure you download the correct files, don't get the .jsonl files!
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- 1.1 Setting the JSON files location and loading them into Excel
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Now that you have the files on your computer, we need to tell the spreadsheet where to find them.
- Load the spreadsheet LTD Systems Analysis V2.4.xlsm into Excel.
- You will probably receive a popup notification, "This workbook contains links to one or more external sources that could be unsafe", or a 'Microsoft Excel Security Notice' like this (https://i.imgur.com/KMUuBeD.jpg)
- This is for two reasons: First, the spreadsheet loads external data (the three EDDB files). And second, all the buttons in the spreadsheet activate macros that perform copy / paste / formula calculations / data clean up / and date & time refreshes.
- There is no way to accomplish these tasks without macros, and while I can assure you they don't do anything beyond the functions of the spreadsheet, I have attached all the macros to an Appendix at the end of these instructions so you can inspect them yourself. If you're worried about the security of the macros, when you're inside the spreadsheet go to the 'View' menu and 'Macros' to view and match each macro to those listed in the Appendix.
- Alternatively, you might receive a Security Warning because you will be loading external data (the three EDDB files). Select "Enable Content" to proceed, there is no risk, these files are directly from EDDB.
- If you're super paranoid then I've included a version of the spreadsheet without the macros, however none of the buttons will function.
- Once you've loaded the spreadsheet, click on the Settings tab (although it should open to Settings), and read the instructions.
- Next we will tell Excel where to find the EDDB files you downloaded to your PC.
- Scroll down to the green section entitled "EDDB JSON File Locations"
- You have probably already downloaded the three EDDB files, but if not click the link and download them now.
- We use the three large blue buttons to tell Excel where to find each file.
- Press the top blue button and locate 'stations.json' on your PC. When you have found the file, click on it, then press "Save".
- Next, press the middle blue button and locate 'systems_populated.json', click it and then press 'Save'.
- Next, press the lower blue button and locate 'factions.json', click it and then press 'Save'.
- The locations (directories) for these files should now appear to the left of these blue buttons.
- Now would be a good time to save the Excel file so you never have to locate the files again (unless you save them to a different location in the future).
- Fantastic! That's the hard part done! Excel now knows where to look for the EDDB data.
- To load the EDDB data into the spreadsheet, click the red "Refresh All Data" button.
- A "Queries & Connections" panel will open on the right side of the screen, and you will see each data query loading information from the EDDB files.
- This takes about 4-5 minutes on my 2-year-old PC, and really depends on the speed of your CPU (and number of cores).
- Please note: Excel will become unresponsive for a few minutes while it loads the 'Analysis' worksheet. It is performing over 250,000 calculations so please be patient. You can alt-TAB to work on something else while the data is loading, and a pop up notification will let you know when the data load is complete.
- After all the data loads it's probably a good idea to save the Excel file again. I save a new one each day after a data refresh, with the date in the title.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Part 2: Analysis, and checking systems for high LTD prices
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- The two worksheets where you will spend the most time are the Analysis and Action worksheets (see the tabs on the bottom left).
- Or if you run the automatic analyses from the Settings page, you will probably only spend time in the Action worksheet.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Automatic Analysis
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Let's start by running an automatic analysis.
- There are two analysis options on the Settings page: Core Analysis and Full Analysis.
- The Core Analysis runs the most critical analyses, and each is explained in the four CoreAnl tabs. Clicking the Core Analysis button grabs the systems from each of those four tabs and copies them to the Action worksheet.
- The Full Analysis also grabs systems from the Extra Analysis tab (ExtraAnl) in addition to the Core Analysis tabs. The systems in the Extra Analysis tab have some of the target states but also have one or more states 'pending', and pending states become active states after a short period of time (which varies). Sometimes when a system moves from 2 states + a pending state into 3 active states it can also activate a Public Holiday or Pirate Attack. But this sequence is a little less common than the other analyses and adds a lot of systems to check, so we call this an Extra Analysis (though still worthwhile).
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Manual Analysis
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- You can also run a manual (custom) analysis from the Analysis worksheet.
- In the Analysis worksheet you can find which systems are in a particular combination of states.
- You run an analysis by 'ordering' columns of data using the dropdown arrows at the top of the columns. Once you've done it a few times you'll get the hang of it.
- Let's run through an example.
- Go to the Analysis tab and start by looking at the Systems column.
- When you first open the spreadsheet it will likely be sorted in alphabetical order.
- And then to the right of the Systems you'll see a column for each faction state we're interested in, e.g., Boom, Investment, etc.
- To the right of these States is a column called Target States. This column simply counts the number of simultaneous target states for a particular system. Because there are 4 possible states: Boom (or Investment), Expansion, Civil Liberty and Public Holiday (or Pirate Attack) then each system will be in 0,1,2,3, or 4 of those states.
- * Note, as mentioned previously, a system can't be in Boom and Investment at the same time, and can't be in Public Holiday and Pirate Attack at the same time.
- It would be very interesting for us to see if any systems currently have all 4 target states.
- Go to the top of column N [Target States], left click the small drop down arrow, and then click 'Sort largest to smallest'.
- Hopefully you'll see some systems with '4' pop up.
- Let's quickly check if those X4 systems have already been found by other CMDRs.
- In a web browser, load up
- https://inara.cz/galaxy-commodity/144/
- Are all of those X4 state systems already listed on the Inara 'LTD best sell' page?
- If not, jump in your ship, load up EDMC or ED Discovery, and head over to any system not listed.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Checking systems in-game
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- When you arrive in the system you can check the current states of the system in the right-hand panel / Status tab.
- On that Status page (in the game)
- - Click on the top faction
- - Then scroll down to the bottom of that faction page where you will see a summary of the states for that faction (which represents the system states)
- If the system has 4 of the target states then you might like to visit a station (preferably a large one) and check the LTD prices
- (this is where it's important to be connected to EDMC or ED Discovery so these faction states and LTD prices will be automatically uploaded to Inara and EDDB)
- Please note, the states of each system can change slightly every day at the server 'tick' (refresh), which is usually about 12 hours after EDDB post their JSON files. For example, Public Holidays only last for a maximum of 2 days (2 server 'ticks').
- To determine when the server tick happens in your local time, check this page (column Tick At (Local)):
- https://elitebgs.app/tick
- States (and therefore, LTD prices) ONLY change at the server tick. States and prices will not change between ticks. (If you're delivering LTDs and you're seeing a different price than what's listed on Inara, that's a different issue)
- If all of the '4-state' systems are already listed on the Inara 'best sell' page then you can 'prospect' other systems that have 3 of the 4 states but are yet to be updated by other CMDRs (which means they might actually have all 4 states, they just haven't been checked yet).
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Action Worksheet
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- The Action worksheet is where you gather a list of candidate systems to check. If you run a Full Analysis there might be around 250 systems listed on the Action table, but don't be disheartened - there are many you won't need to check.
- Systems with purple font are those priority systems with 4 target states, and are likely to have good LTD prices. They will usually already be listed on the EDDB/Inara LTD pages, but sometimes they haven't been discovered.
- 1. The first step is to type or paste your current location (system) into the Reference System box in the top-left of the worksheet. All distances will be calculated from your position.
- Then press the purple 'Sort By Distance' button. This will change the order of the systems in the Action table, sorted by distance from your location. This sorting makes it efficient to jump around from system to system.
- 2. You may wish to remove systems 'In Recovery' by pressing the blue 'Remove Recovering' button. These are systems that recently had one of the four states but have now lost one of those states. Recovery is like a cooldown for states, so there's no chance you'll find an X4 state in a recovering system, so I usually exclude these systems from the candidate list. In the beginning you may wish to confirm this 'recovery theory' for yourself (and leave them in), and please do let me know if you notice any violations of the rule as we've only been using recovery exceptions for about a month.
- 3. If you're really short on time and want to focus your search, you may wish to remove systems that are controlled by non-player minor factions by pressing the blue 'Remove NPC Faction' button. I estimate 90-95% of X4 systems with high LTD prices are controlled by player factions, but very occasionally one will pop up with a non-player controlling faction. I don't usually exclude NPC controlling factions.
- 4. Before checking systems in-game (by visiting them in your ship), you should check on EDDB if that system has already been visited by another CMDR after the most recent tick. If you check the system on EDDB and observe it has already been checked after the last server tick, then you don't need to visit that system since its states can't change until the next tick.
- That's a very important point.
- It means that it's best to wait some hours after the tick before you start checking systems. Immediately after the tick we don't know the actual states of any systems (because every system can change). Therefore, if we started working our way through the candidate list immediately after the server tick, we would have to fly around to every system to check their states.
- I usually start checking about 8 hours after the tick (conveniently it's when I wake up in my part of the world). And when I pre-check systems on EDDB I often notice 40-80% of candidate systems have already been checked by other CMDRs - either through focused checking like we're doing here, or just by their natural movements throughout the bubble. Remember, every CMDR running ED Discovery or EDMC automatically uploads their system data as they fly around, so many of our candidate systems will be checked by chance.
- So to run a pre-check on the candidate list, there is a red button at the top 'Batch Open Hyperlinks (10)'. Pressing this button will open the EDDB web pages for the first 10 systems on your candidate list.
- Note: I've set a cooldown of 30 seconds on this button so as not to annoy EDDB with opening pages too quickly (one per 3 seconds should be ok).
- Before looking at the web pages, note the Hours and Minutes just above the 'Days Since Update' column. These are the hours and minutes since the last server tick. If a system has been checked within this range, we don't need to visit that system ourselves and can exclude it from the candidate list.
- Say for example, the 'time since last tick' is 10 hours. When you look at the EDDB page for a system, you'll see along the top (blue) line for the minor faction, on the far right, there is an Update: time provided in hours (or days) from the present.
- Therefore, if I look at a system on the EDDB web page and see Update: 4 hours ago, and the time since last tick is 10 hours, then someone else has already visited that system since the last tick, and I can exclude that system from my candidate list (but remember to check for X4 states on the EDDB page).
- When looking at the EDDB page, you only need to check the states for the controlling faction (the top one with the highest % influence). Non-controlling minor factions never have X4 states (or if they do, I've never seen one).
- Example pic
- https://i.imgur.com/PWDHmvP.jpg
- If you don't need to check the system, you can go back to the Action table, put your selection box on that system name (or the row containing that system), and then press the 'Red Font' button. This will mark the system with a red font to remind you that you don't need to check that system.
- However, if you look at the EDDB page and see that the Updated: time is greater than the hours since last tick, this means it hasn't been checked after the last tick, and might be in an X4 state without anyone knowing about it.
- So in that case, you can go back to your Action table and mark that system with the 'Green Font' button to remind you to check that system in-game.
- When you're actually doing this, I find the majority of my candidate systems have already been checked, so I don't go back and mark each one in red - I just mark those in green that need to be checked in-game. Saves a bit of time, but you'll get the hang of it.
- After you press the button to open the hyperlinks, you'll notice those links in the Action table are marked in khaki green. This is partly to let you know which systems you've already checked in EDDB, but also tells the 'open hyperlinks' button to skip those systems when you press it again.
- I usually pre-check the whole list of candidate systems before heading out into space. Once you've done it a few times you can do it very quickly, and I find it a lot faster to pre-check before launch than doing them while flying around. But everyone has their own style.
- 5. Let's say you've found some systems in EDDB that need to be checked in-game, and you've marked them with a green font on your candidate list. The system in green closest to the top of the list will be the system closest to your current location. So fire up your thrusters, raise your landing gear, and head over to the green font system to check it out.
- When you get there (and please make sure you're connected to ED Discovery or EDMC so other CMDRs don't have to check the same system twice!), go into your right-hand panel / Status / top faction, and check their system states. 99 times out of 100 you won't find an X4 system.
- So go back into your Action table, highlight the system that you have just travelled to, and then press the 'Next System' button.
- The Next System button marks the selected system in red (so you know it doesn't need to be visited again), copies that system to the Reference System in the top-left (so all distances are calculated from your current location), and then sorts the system list by distance from your current location.
- Now look at your candidate list, and fly to the next green system that needs to be checked.
- And then do that over and over and over again :)
- But when you do find an X4 system it feels like discovering gold! Hopefully that system will have a station with a large landing pad. Go ahead and dock, check the commodity market, and this will upload the LTD price to the Elite Dangerous Data Network. Then once you upload that LTD price to EDDB/Inara you'll see CMDRs flocking to your system like hungry seagulls chasing a chip! Congratulations, you've made a contribution to the community, and now you can rest :)
- 6. As you check systems on EDDB or in-game, take note if that system is in Expansion. Expansion is a unique state because it's the only one that's faction-wide.
- This means if you find one system in Expansion under the control of a particular minor faction, then all systems under their control will also be in Expansion. It also means that if you check a system on EDDB or in-game and it's NOT in Expansion, then all systems under that minor faction's control will NOT be in the X4 state (since the X4 state requires Expansion). Therefore, if we find one system without Expansion, we can exclude all others from the same minor faction on the candidate list.
- When you find a system on your candidate list without Expansion (or it might have Pending Expansion or Recovering Expansion .. these also need to be excluded) then highlight the faction (or the current system) and press the yellow "Mark No Expansion" button. This will apply red font to all instances of that minor faction in your candidate list, which will remind you to exclude their systems from checking (since it's impossible they will have the X4 state).
- You can also press the "Remove No Exp" button to delete all those systems with a minor faction marked in red, to declutter your Action table.
- 7. And that's essentially the way we check systems for high LTD prices. It might sound pretty straight forward but 3 months ago we didn't have a strategy at all, and everything you're reading here had to be discovered slowly over time.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Live Public Holiday (and PirateA) Data
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Most CMDRs aren't checking systems for X4 states. Therefore, many will roam around the bubble and accidentally uncover a Public Holiday (or Pirate Attack) system without ever knowing.
- Therefore, it would be useful for us to have a way to check if any Public Holidays have been uncovered in systems outside our candidate list.
- You can do this by clicking on the yellow LivePubH tab, and following the instructions on the page. It essentially involves copying and pasting the Public Holiday systems data from EDDB, and only takes about 20 seconds. I've found many X4 systems this way, so it's worth checking regularly.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Faction Analysis (experimental)
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- As you become familiar with the procedure, you'll notice there are a number of player factions that often appear in the candidate list. These player factions often have 10 to 20 systems under their control, and if they've created an X3 state (Boom+Exp+Civ Lib) it means they must be doing pretty well, and I call these factions 'hot factions'.
- If you click on the purple Faction tab you'll see a list of 'hot factions' down the left side, and a Research table in the middle.
- On the 'hot factions' list, click one of the factions you often see in the Action table and then press the Research button. This will display all the system controlled by that faction in the middle table.
- And you'll probably notice some of those systems are marked in yellow because they haven't been visited for over 2 days.
- It's my theory that those out-of-date systems controlled by a 'hot faction' may be hiding an X4 state. This does happen on occasion, so if you have some spare time it might be worthwhile checking the out-of-date systems for a few 'hot factions'.
- Please let me know if you have any thoughts on how to narrow the focus further to particular factions that are more likely to be hiding an X4 state.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Updating the JSON files from EDDB
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Each day you'll need to update the three JSON files from EDDB.io to keep the data current.
- After downloading the files, remember to press the red "Refresh All Data" button on the Settings worksheet to load the new EDDB data into Excel.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Extra Notes
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- The spreadsheet is set up to find LTD stations even in systems where the primary economy isn't a HIRTo economy (High-tech, Industrial, Refinery, Tourism). Originally I was only using HIRTo primary economies to locate candidate systems, and noticed I was missing high LTD sell prices in stations that had their own HIRTo economy status separate from the non-HIRTo primary economy of the system. In other words, sometimes a station's economy can be different to the system economy.
- (HIRTo primary economies) plus (HIRTo stations in non-HIRTo primary economies) ≈ 14,160 systems
- HIRTo primary economies ≈ 9,500 systems
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Sometimes when you find an X4 system and visit a station you'll look at the LTD price and be disappointed it's very low. What's going on there?
- Firstly, the station must have a HIRTo economy - you can check that in-game or on Inara or EDDB.
- Secondly, that station must be managed by the controlling faction (check it on EDDB). Sometimes there are many stations in a system, and only one or two are managed by the controlling faction. Stations that aren't managed by the controlling faction will always have low LTD prices.
- There's also an occasional low price in an Extraction/refinery economy but I'm not sure why (most X4 Extraction/refinery stations will have high LTD prices).
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Credits
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- I am truly grateful to my Excel guru, CMDR Sad Samurai (Johny_D_Doe on reddit) for catching and fixing a bug in the first version of the worksheet, and for teaching me how to manage power queries and table references.
- These new versions of the spreadsheet wouldn't exist without his input, so a sincere thank you CMDR o7
- Also, another huge thank you to EDDB for supplying the daily JSON files, without which none of this would be possible.
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Conclusion
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Thank you for taking the time to read through these instructions. If you found anything confusing please let me know.
- You're welcome to contact me if you need any help, or would like a spreadsheet that displays different data.
- Good hunting,
- o7
- Reddit: psychicEgg
- ED: CMDR GeorjCostanza
- PS. There's lots of other things you can do with the data
- - go into Analysis and order the Systems by Days Since Update. Some LTD systems haven't been updated for a looooong time! If you visit them and update their info you might find an LTD surprise :)
- - go into the Systems tab and find 'populated' systems with zero population..
- - have fun treasure hunting, and let us know on reddit if you have some success
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- ============ Appendix: List of Macros ===============
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Private Sub Workbook_Open()
- 'hides all arrows except list 1 column 2
- Dim Lst As ListObject
- Dim c As Range
- Dim i As Integer
- 'Application.ScreenUpdating = False
- Set Lst = ActiveWorkbook.Sheets("Factions").ListObjects("FactionResearch")
- i = 1
- For Each c In Lst.HeaderRowRange
- Lst.Range.AutoFilter Field:=i, _
- VisibleDropDown:=False
- i = i + 1
- Next
- 'Application.ScreenUpdating = True
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Range("J17").Calculate
- ' Detect GMT(UTC) time
- Dim dt As Object, utc As Date
- Set dt = CreateObject("WbemScripting.SWbemDateTime")
- dt.SetVarDate Now
- utc = dt.GetVarDate(False)
- 'strAddress = "Settings!B11"
- 'Range(strAddress).Value = utc
- Sheets("Settings").Range("B11") = utc
- End Sub
- Private Sub Worksheet_Activate()
- Range("B6").Calculate
- ' Detect GMT(UTC) time
- Dim dt As Object, utc As Date
- Set dt = CreateObject("WbemScripting.SWbemDateTime")
- dt.SetVarDate Now
- utc = dt.GetVarDate(False)
- strAddress = "B11"
- Range(strAddress).Value = utc
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Range("B6").Calculate
- ' Detect GMT(UTC) time
- Dim dt As Object, utc As Date
- Set dt = CreateObject("WbemScripting.SWbemDateTime")
- dt.SetVarDate Now
- utc = dt.GetVarDate(False)
- strAddress = "B11"
- Range(strAddress).Value = utc
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Set tbl = Sheets("LivePubH").ListObjects("PubHTable")
- strAddress = "H18"
- If IsEmpty(Range("A21").Value) = True Then
- lastRowPubH = 0
- Range(strAddress).Value = lastRowPubH
- Else
- lastRowPubH = tbl.Range.Rows.Count
- Range(strAddress).Value = lastRowPubH - 1
- End If
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Set tbl = Sheets("LivePirA").ListObjects("PirATable")
- strAddress = "H18"
- If IsEmpty(Range("A21").Value) = True Then
- lastRowPirA = 0
- Range(strAddress).Value = lastRowPirA
- Else
- lastRowPirA = tbl.Range.Rows.Count
- Range(strAddress).Value = lastRowPirA - 1
- End If
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- On Error Resume Next
- Dim cmdBtn As Shape
- Const iCOL_RESTR As Integer = 8
- Set cmdBtn = Me.Shapes("Button 1")
- With ActiveSheet.ListObjects("Analysis")
- cmdBtn.Left = Me.Range("Analysis[[Boom]]").Left
- cmdBtn.Top = ActiveWindow.VisibleRange.Top + 0.4 * ActiveWindow.VisibleRange.Height
- End With
- End Sub
- Sub Auto_Open()
- Range("Settings!B6").Calculate
- ' Detect GMT(UTC) time
- Dim dt As Object, utc As Date
- Set dt = CreateObject("WbemScripting.SWbemDateTime")
- dt.SetVarDate Now
- utc = dt.GetVarDate(False)
- Sheets("Settings").Range("B11") = utc
- End Sub
- Sub Redfont()
- On Error Resume Next
- Selection.End(xlToLeft).Select
- With Selection.Font
- .Color = -16776961
- .TintAndShade = 0
- End With
- End Sub
- Sub Greenfont()
- On Error Resume Next
- Selection.End(xlToLeft).Select
- With Selection.Font
- .Color = -11753472
- .TintAndShade = 0
- End With
- End Sub
- Sub ExportRngAsCSVFile()
- On Error Resume Next
- Dim CopyRng As Range, FileNm As String
- xTitleId = "LTD Systems Export"
- Set CopyRng = Application.Selection
- Set CopyRng = Application.InputBox("Range", xTitleId, CopyRng.Address, Type:=8)
- FileNm = ActiveWorkbook.Path & "\" & xTitleId & Format(Date, " ddmmmyyyy") & ".csv"
- Application.ScreenUpdating = False
- Workbooks.Add (1) 'A new workbook with a worksheet
- With ActiveWorkbook
- CopyRng.Copy
- .Sheets(1).Range("A2").PasteSpecial Paste:=xlPasteValues
- .SaveAs Filename:=FileNm, FileFormat:=xlCSV
- .Close SaveChanges:=True
- End With
- Application.ScreenUpdating = True
- MsgBox "Data exported to current workbook directory"
- End Sub
- Sub BatchOpenHyperLinks_SelectedRanges()
- On Error Resume Next
- Dim i As Integer
- Dim time1, time2
- 'Haz hyperlinks?
- If IsEmpty(Range("B21").Value) = True Then Exit Sub
- 'Cooldown
- Dim myshape As Shape: Set myshape = ThisWorkbook.Worksheets("Action").Shapes("HyperBatch")
- If myshape.TextFrame.Characters.Font.ColorIndex = 15 Then Exit Sub
- With myshape
- .TextFrame.Characters.Font.ColorIndex = 15 '---> Grey out button label
- End With
- 'Select Range
- Range("B21").Select
- If IsEmpty(Range("B22").Value) = True Then
- Range("B21").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- For Each xCell In Selection
- If i = 10 Then GoTo Cooldown
- If xCell.Font.ColorIndex = 12 Then
- Else
- xCell.Hyperlinks.Add Anchor:=xCell, Address:=xCell.Value
- xCell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
- xCell.Font.ColorIndex = 12
- i = (i + 1)
- End If
- Next xCell
- GoTo Cooldown
- Cooldown:
- ActiveSheet.ListObjects("ActionTable").Range.AutoFilter Field:=2, Criteria1 _
- :=RGB(128, 128, 0), Operator:=xlFilterFontColor
- Range("ActionTable[[#Headers],[Web Link]]").Select
- ActiveCell.Offset(1, 0).Range("A1").Select
- Selection.End(xlDown).Select
- ActiveCell.Offset(0, -1).Range("A1").Select
- ActiveSheet.ListObjects("ActionTable").Range.AutoFilter Field:=2
- 'Wait 30 seconds
- time1 = Now
- time2 = Now + TimeValue("0:00:30")
- Do Until time1 >= time2
- DoEvents
- time1 = Now()
- Loop
- With myshape
- .TextFrame.Characters.Font.ColorIndex = 2 '---> Restore button label
- End With
- i = 0
- End Sub
- Sub ResetHyper()
- On Error Resume Next
- Dim myshape As Shape: Set myshape = ThisWorkbook.Worksheets("Action").Shapes("HyperBatch")
- With myshape
- .TextFrame.Characters.Font.ColorIndex = 2 '---> Restore button label
- End With
- Range("B21:B1048576").Select
- With Selection.Font
- .ColorIndex = 41
- .TintAndShade = 0
- End With
- Range("A21").Select
- End Sub
- Sub CopyToTable()
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- End Sub
- Sub ResetTable()
- On Error Resume Next
- Range("B21:B1048576").Select
- With Selection.Font
- .ColorIndex = 41
- .TintAndShade = 0
- End With
- Range("F21:F1048576").Select
- With Selection.Font
- .ColorIndex = xlAutomatic
- .TintAndShade = 0
- End With
- Range("A21:A1048576").Select
- With Selection.Font
- .ColorIndex = xlAutomatic
- .TintAndShade = 0
- End With
- Application.CutCopyMode = False
- Selection.ClearContents
- ActiveSheet.Range("A21").Select
- With ActiveSheet.ListObjects("ActionTable")
- .Range.AutoFilter Field:=1, Criteria1:="="
- .DataBodyRange.EntireRow.Delete
- .Range.AutoFilter Field:=1
- End With
- End Sub
- Sub DelBlankRows()
- On Error Resume Next
- With ActiveSheet.ListObjects("ActionTable")
- .Range.AutoFilter Field:=1, Criteria1:="="
- Set ws = Sheets("Action").ListObjects("ActionTable")
- Rowz = ws.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- .DataBodyRange.EntireRow.Delete
- End If
- .Range.AutoFilter Field:=1
- End With
- End Sub
- Sub NextSystem()
- On Error Resume Next
- Selection.End(xlToLeft).Select
- With Selection.Font
- .Color = -16776961
- .TintAndShade = 0
- End With
- Selection.Copy
- Range("A2").Select
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
- :=False, Transpose:=False
- Application.CutCopyMode = False
- ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort.SortFields. _
- Clear
- ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort.SortFields. _
- Add2 Key:=Range("ActionTable[[#All],[Distance LY]]"), SortOn:=xlSortOnValues, _
- Order:=xlAscending, DataOption:=xlSortNormal
- With ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Range("ActionTable[[#Headers],[Systems]]").Offset(1).Select
- End Sub
- Sub SortDistance()
- On Error Resume Next
- ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort.SortFields. _
- Clear
- ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort.SortFields. _
- Add2 Key:=Range("ActionTable[[#All],[Distance LY]]"), SortOn:=xlSortOnValues, _
- Order:=xlAscending, DataOption:=xlSortNormal
- With ActiveWorkbook.Worksheets("Action").ListObjects("ActionTable").Sort
- .Header = xlYes
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Range("ActionTable[[#Headers],[Systems]]").Offset(1).Select
- End Sub
- Sub RemoveRecovery()
- On Error Resume Next
- If WorksheetFunction.CountA(Range("ActionTable[Systems]")) = 0 Then
- Exit Sub
- End If
- Set rData = Sheets("Action").ListObjects("ActionTable")
- rData.DataBodyRange.AutoFilter Field:=rData.ListColumns("In Recovery").Index, Criteria1:="Yes"
- ' Empty filtered ActionTable fix
- Rowz = rData.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- rData.DataBodyRange.EntireRow.Delete
- End If
- rData.DataBodyRange.AutoFilter Field:=rData.ListColumns("In Recovery").Index
- Range("ActionTable[[#Headers],[Systems]]").Offset(1).Select
- End Sub
- Sub RemoveNPCfaction()
- On Error Resume Next
- If WorksheetFunction.CountA(Range("ActionTable[Systems]")) = 0 Then
- Exit Sub
- End If
- Set rData = Sheets("Action").ListObjects("ActionTable")
- rData.DataBodyRange.AutoFilter Field:=rData.ListColumns("Player Faction").Index, Criteria1:="No"
- ' Empty filtered ActionTable fix
- Rowz = rData.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- rData.DataBodyRange.EntireRow.Delete
- End If
- rData.DataBodyRange.AutoFilter Field:=rData.ListColumns("Player Faction").Index
- Range("ActionTable[[#Headers],[Systems]]").Offset(1).Select
- End Sub
- Sub MarkAsPendingExp()
- On Error Resume Next
- Dim iCol
- iCol = Range("ActionTable[Faction]").Column
- OriginalCell = ActiveCell.Address
- Cells(ActiveCell.Row, iCol).Activate
- PendingFaction = ActiveCell.Value
- Set ActionData = Sheets("Action").ListObjects("ActionTable")
- ActionData.DataBodyRange.AutoFilter Field:=ActionData.ListColumns("Faction").Index, Criteria1:=PendingFaction
- Rowz = ActionData.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- Range("ActionTable[Faction]").SpecialCells(xlCellTypeVisible).Select
- With Selection.Font
- .Color = -16776961
- .TintAndShade = 0
- End With
- End If
- ActionData.DataBodyRange.AutoFilter Field:=ActionData.ListColumns("Faction").Index
- Range(OriginalCell).Select
- End Sub
- Sub RemoveNoExpansion()
- 'On Error Resume Next
- OriginalCell = ActiveCell.Address
- If WorksheetFunction.CountA(Range("ActionTable[Systems]")) = 0 Then
- Exit Sub
- End If
- Set FactionData = Sheets("Action").ListObjects("ActionTable")
- FactionData.DataBodyRange.AutoFilter Field:=FactionData.ListColumns("Faction").Index, Criteria1 _
- :=RGB(255, 0, 0), Operator:=xlFilterFontColor
- ' Empty filtered ActionTable fix
- Rowz = FactionData.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- FactionData.DataBodyRange.EntireRow.Delete
- End If
- FactionData.DataBodyRange.AutoFilter Field:=FactionData.ListColumns("Faction").Index
- Range(OriginalCell).Select
- End Sub
- Sub locateSystems()
- Dim varResult As Variant
- 'displays the save file dialog
- varResult = Application.GetSaveAsFilename( _
- InitialFileName:="", FileFilter:="JSON Files (*.json), *.json", Title:="Locate systems_populated.json on your PC")
- 'checks to make sure the user hasn't canceled the dialog
- If varResult <> False Then
- Cells(47, 3) = varResult
- End If
- End Sub
- Sub locateStations()
- Dim varResult As Variant
- 'displays the save file dialog
- varResult = Application.GetSaveAsFilename( _
- InitialFileName:="", FileFilter:="JSON Files (*.json), *.json", Title:="Locate stations.json on your PC")
- 'checks to make sure the user hasn't canceled the dialog
- If varResult <> False Then
- Cells(46, 3) = varResult
- End If
- End Sub
- Sub locateFactions()
- Dim varResult As Variant
- 'displays the save file dialog
- varResult = Application.GetSaveAsFilename( _
- InitialFileName:="", FileFilter:="JSON Files (*.json), *.json", Title:="Locate factions.json on your PC")
- 'checks to make sure the user hasn't canceled the dialog
- If varResult <> False Then
- Cells(48, 3) = varResult
- End If
- End Sub
- Sub CoreAnl()
- ' Empty ActionTable check
- If IsEmpty(Range("Action!B21").Value) = False Then
- Sheets("Action").Select
- Range("A21").Select
- MsgBox "Please reset the Action Table before running an automated analysis"
- Exit Sub
- End If
- ' CoreAnl1
- Sheets("CoreAnl1").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl2
- Sheets("CoreAnl2").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow1 = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow1).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl3
- Sheets("CoreAnl3").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl4
- Sheets("CoreAnl4").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- Range("A" & lastRow1).Offset(19).Select
- Range(Selection, Selection.End(xlUp).Offset(1)).Select
- With Selection.Font
- .Color = -6279056
- .TintAndShade = 0
- End With
- Range("A21").Select
- End Sub
- Sub FullAnl()
- ' Empty ActionTable check
- If IsEmpty(Range("Action!B21").Value) = False Then
- Sheets("Action").Select
- Range("A21").Select
- MsgBox "Please reset the Action Table before running an automated analysis"
- Exit Sub
- End If
- ' CoreAnl1
- Sheets("CoreAnl1").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl2
- Sheets("CoreAnl2").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow1 = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow1).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl3
- Sheets("CoreAnl3").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl4
- Sheets("CoreAnl4").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- Range("A" & lastRow1).Offset(19).Select
- Range(Selection, Selection.End(xlUp).Offset(1)).Select
- With Selection.Font
- .Color = -6279056
- .TintAndShade = 0
- End With
- ' ExtraAnl
- Sheets("ExtraAnl").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- Range("A21").Select
- End Sub
- Sub CoreAnlPreTick()
- ' Empty ActionTable check
- If IsEmpty(Range("Action!B21").Value) = False Then
- Sheets("Action").Select
- Range("A21").Select
- MsgBox "Please reset the Action Table before running an automated analysis"
- Exit Sub
- End If
- ' CoreAnl1
- Sheets("CoreAnl1").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl2
- Sheets("CoreAnl2").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow1 = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow1).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl3
- Sheets("CoreAnl3").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl4
- Sheets("CoreAnl4").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- Range("A" & lastRow1).Offset(19).Select
- Range(Selection, Selection.End(xlUp).Offset(1)).Select
- With Selection.Font
- .Color = -6279056
- .TintAndShade = 0
- End With
- With ActiveSheet.ListObjects("ActionTable")
- .Range.AutoFilter Field:=9, Criteria1:=">" & Range("Settings!B32").Value
- ' Empty filtered ActionTable fix
- On Error Resume Next
- Set ws = Sheets("Action").ListObjects("ActionTable")
- Rowz = ws.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- .DataBodyRange.EntireRow.Delete
- End If
- .Range.AutoFilter Field:=9
- End With
- Range("A21").Select
- End Sub
- Sub FullAnlPreTick()
- ' Empty ActionTable check
- If IsEmpty(Range("Action!B21").Value) = False Then
- Sheets("Action").Select
- Range("A21").Select
- MsgBox "Please reset the Action Table before running an automated analysis"
- Exit Sub
- End If
- ' CoreAnl1
- Sheets("CoreAnl1").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl2
- Sheets("CoreAnl2").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow1 = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow1).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl3
- Sheets("CoreAnl3").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' CoreAnl4
- Sheets("CoreAnl4").Select
- 'Select Range
- Range("B2").Select
- If IsEmpty(Range("B3").Value) = True Then
- Range("B2").Select
- Else
- Range(Selection, Selection.End(xlDown)).Select
- End If
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- Range("A" & lastRow1).Offset(19).Select
- Range(Selection, Selection.End(xlUp).Offset(1)).Select
- With Selection.Font
- .Color = -6279056
- .TintAndShade = 0
- End With
- ' ExtraAnl
- Sheets("ExtraAnl").Select
- Range("B2").Select
- Range(Selection, Selection.End(xlDown)).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- With ActiveSheet.ListObjects("ActionTable")
- .Range.AutoFilter Field:=9, Criteria1:=">" & Range("Settings!B32").Value
- ' Empty filtered ActionTable fix
- On Error Resume Next
- Set ws = Sheets("Action").ListObjects("ActionTable")
- Rowz = ws.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- .DataBodyRange.EntireRow.Delete
- End If
- .Range.AutoFilter Field:=9
- End With
- Range("A21").Select
- End Sub
- Sub PastePubHValues()
- On Error GoTo ErrorHandler
- Range("PubHTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("LivePubH").ListObjects("PubHTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Range("PubHTable[Systems]").Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
- False, NoHTMLFormatting:=True
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' Tidy up EDDB leading characters
- Columns("A:A").Select
- Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
- SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
- ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
- Range("A21").Select
- ErrorHandler:
- Application.CutCopyMode = False
- Exit Sub
- End Sub
- Sub ResetPubHTable()
- On Error Resume Next
- Range("A21:A1048576").Select
- Application.CutCopyMode = False
- Selection.ClearContents
- ActiveSheet.Range("A21").Select
- With ActiveSheet.ListObjects("PubHTable")
- .Range.AutoFilter Field:=1, Criteria1:="="
- .DataBodyRange.EntireRow.Delete
- .Range.AutoFilter Field:=1
- End With
- Range("A20").Select
- Range("A21").Select
- End Sub
- Sub PastePirAValues()
- On Error GoTo ErrorHandler
- Range("PirATable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("LivePirA").ListObjects("PirATable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Range("PirATable[Systems]").Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
- False, NoHTMLFormatting:=True
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- ' Tidy up EDDB leading characters
- Columns("A:A").Select
- Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
- SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
- ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
- Range("A21").Select
- ErrorHandler:
- Application.CutCopyMode = False
- Exit Sub
- End Sub
- Sub ResetPirATable()
- On Error Resume Next
- Range("A21:A1048576").Select
- Application.CutCopyMode = False
- Selection.ClearContents
- ActiveSheet.Range("A21").Select
- With ActiveSheet.ListObjects("PirATable")
- .Range.AutoFilter Field:=1, Criteria1:="="
- .DataBodyRange.EntireRow.Delete
- .Range.AutoFilter Field:=1
- End With
- Range("A20").Select
- Range("A21").Select
- End Sub
- Sub CopyMinorFaction()
- On Error Resume Next
- FactionCell = ActiveCell.Address
- Selection.Copy
- Range("D8").Select
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
- :=False, Transpose:=False
- Application.CutCopyMode = False
- Range(FactionCell).Offset(1).Select
- End Sub
- Sub FactionToAction()
- On Error Resume Next
- FactionCell = ActiveCell.Address
- With ActiveSheet.ListObjects("FactionResearch")
- .Range.AutoFilter Field:=3, Criteria1:=">=" & Range("J8").Value
- ' Empty filtered ActionTable fix
- On Error Resume Next
- Set ws = ActiveSheet.ListObjects("FactionResearch")
- Rowz = ws.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
- If Rowz >= 1 Then
- Range("FactionResearch[[Systems]]").SpecialCells(xlCellTypeVisible).Select
- Selection.Copy
- Sheets("Action").Select
- Range("ActionTable[[#Headers],[Systems]]").Select
- Set tbl = Sheets("Action").ListObjects("ActionTable")
- lastRow = tbl.Range.Rows.Count
- If IsEmpty(Range("B21").Value) = True Then
- Selection.End(xlDown).Select
- Else
- Range("A" & lastRow).Offset(20).Select
- End If
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
- Range("A" & Rows.Count).End(xlUp).Offset(1).Select
- Application.CutCopyMode = False
- End If
- Sheets("Factions").Select
- Range("FactionResearch[[#Headers],[Systems]]").Select
- .Range.AutoFilter Field:=3
- 'MsgBox Rowz
- End With
- Range(FactionCell).Select
- End Sub
- #If Win64 Then 'If the system is in 64b
- Private Declare PtrSafe Function MsgBoxTimeout _
- Lib "user32" _
- Alias "MessageBoxTimeoutA" ( _
- ByVal hwnd As LongPtr, _
- ByVal lpText As String, _
- ByVal lpCaption As String, _
- ByVal wType As VbMsgBoxStyle, _
- ByVal wlange As Long, _
- ByVal dwTimeout As Long) _
- As Long
- #Else 'if it's in 32b
- Private Declare Function MsgBoxTimeout _
- Lib "user32" _
- Alias "MessageBoxTimeoutA" ( _
- ByVal hwnd As Long, _
- ByVal lpText As String, _
- ByVal lpCaption As String, _
- ByVal wType As VbMsgBoxStyle, _
- ByVal wlange As Long, _
- ByVal dwTimeout As Long) _
- As Long
- #End If
- Sub Workbook_RefreshAll()
- Application.Calculation = xlManual
- Dim SrchRng1 As Range
- Dim SrchRng2 As Range
- Dim SrchRng3 As Range
- Set SrchRng1 = Range("D46")
- Set SrchRng2 = Range("D47")
- Set SrchRng3 = Range("D48")
- If InStr(SrchRng1.Value, "Missing") > 0 Then
- MsgBox "Missing file. Please locate stations.json"
- Exit Sub
- End If
- If InStr(SrchRng2.Value, "Missing") > 0 Then
- MsgBox "Missing file. Please locate systems_populated.json"
- Exit Sub
- End If
- If InStr(SrchRng3.Value, "Missing") > 0 Then
- MsgBox "Missing file. Please locate factions.json"
- Exit Sub
- End If
- Application.CommandBars("Queries and Connections").Visible = True
- Application.CommandBars("Queries and Connections").Width = 300
- With ActiveWorkbook.Connections("Query - Systems").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - Boom").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - Investment").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - Expansion").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - CivLib").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PublicH").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PirateA").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PendBoom").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PExpansion").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PendCivL").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - Recovering").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - SystemFilter").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- Call MsgBoxTimeout(0, "Excel will pause for a few minutes on the Anaysis data load. Performing 226,672 calculations.", "Auto Close MsgBox", vbInformation, 0, 4000)
- With ActiveWorkbook.Connections("Query - Analysis").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - CoreAnl1").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - CoreAnl2").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - CoreAnl3").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - CoreAnl4").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - ExtraAnl").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - PlayerFactions").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- With ActiveWorkbook.Connections("Query - ExpansionFactions").OLEDBConnection
- .BackgroundQuery = False
- .Refresh
- End With
- Application.Wait (Now + TimeValue("0:00:05"))
- Application.Calculation = xlAutomatic
- Beep
- MsgBox "EDDB Data Load Complete"
- End Sub
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Add Comment
Please, Sign In to add comment