What is the shortest method to get most gold pieces (gp)

Discussion in 'Card Hunter General Chat' started by ClimbHigh, Oct 20, 2013.

  1. Sir Veza

    Sir Veza Farming Deity

    Whoooaaa... Talk about a wall of text, verbose is what it says. Thank goodness for ctrl-F.
    This could give a great picture of what drops where and how often. You could write the CH Farmer's Almanac!
     
  2. Kalin

    Kalin Begat G'zok

    Huh, I never tried that. I've just been logging everything by hand.

    Yesterday I tried to make a spreadsheet on Google Docs where you could paste the verbose output from entering your keep and it would compare with Equipment.csv and spit out bbcode for your collection. But I ran into a couple problems:
    • Verbose produces over 90 lines of other stuff before listing your collection.
    • Item counts are on the line below the item ID, instead of same line.
    • All the values start with "(int) " and I don't know how to write a formula that filters that out. (It wouldn't be a problem if there was some way to tell Google that the text I'm pasting is space-delimited not tab-delimited.)
     
  3. Jarmo

    Jarmo Snow Griffin

    Can you replace the spaces with tabs before you start? This can be done in e.g. Word, it allows special characters with control codes (^t or similar = tab).

    In Excel, there are functions to extract substrings from text. Usually you specify which character to start from (zero based index usually) and how many characters to copy. Some functions like RIGHT() copy until the end of the line. You could use something like that to get rid of the "(int) ".

    I'm sure you can find the command/function syntax details with Google once you know what to look for.
     
  4. Jarmo

    Jarmo Snow Griffin

    Why are the 90 extra lines at the beginning a problem? Can't you just leave empty room for them?
     
  5. Kalin

    Kalin Begat G'zok

    Yes, but I wanted something that was easy for other people to use, so I was trying to minimize how many steps were needed to get to the results.

    Yeah, but I'm not sure if it's the same number of lines every time, so I'd probably have to search for "collection" and offset from there.

    I'm sure this is possible, but it's beyond my current skills.
     
  6. Jarmo

    Jarmo Snow Griffin

    A good approach. One way of getting there would be to have a region reserved in the spreadsheet for the maximum possible amount of filler lines at the top and have a function (on every line which potentially can hold actual data) which extracts the IDs if they are there and does nothing if it's filler (with an IF clause). That way the form does not need to be any more intelligent than that and it can still handle a variable amount of filler.
     
  7. Kalin

    Kalin Begat G'zok

    Problem here is that the lines containing item IDs look identical to lines containing item amounts.
    Here's my current inventory so you can see what it looks like:
     

    Attached Files:

  8. Jarmo

    Jarmo Snow Griffin

    Ok, this is getting into more complicated territory, but maybe this could be one approach for the item ID extractor function:
    - set up a separate function for each line in the filler/possible filler top area which checks if the line contains the text "Received extension response: collection"
    - if it does, activate a flag (boolean variable = TRUE, a number = 1 etc.)
    - a second function checks if the line above has the flag set and sets the same flag for this line
    - a third function checks if the line above has the flag set and increments a number field with one when it is set (adds one to the same number field from the above line)
    - these three functions produce the effects that for each line we know 1) if the line signifying the start of the collection data was already found 2) how many lines above the signifying line is to the line under examination
    - now, the data extractor function looks at the two bits of data generated by the above functions and when the flag is set it takes the number following "int() " (if this text exists on the line) and if it is an even number of lines below the signifying line (the count is evenly divisible by two) it is the item ID, if it is an odd number of lines below it, it is the item count for the item ID on the line above.

    Easy and simple, eh :D?
     
  9. Jarmo

    Jarmo Snow Griffin

    Kalin, if you get your system working it could also be used to track the results from a farming session. Just run the inventory analysis before the session and after it and compare the results. The difference between them is the loot gotten in the session. This would have many benefits over using the loot per chest log data during the session. The files involved would be a lot smaller. There would be no need to remember to turn on the verbose mode before the session. You couldn't lose the session data due to the computer or Flash crashing. The huge verbose log file generated during a long session wouldn't slow down or crash Flash. All in all, a clearly better way.
     
    Sir Veza likes this.
  10. Kalin

    Kalin Begat G'zok

    Another way you can do it (that I've used in the past):
    1. Add a column and fill it with the numbers 1,2,3...
    2. Use VLOOKUP() and that column to get the row number of the whatever you're searching for
    3. Plug the results of #2 into an OFFSET() to get the data you want
    But I still need to learn the text manipulation stuff.
     
    Jarmo and Sir Veza like this.
  11. Sir Veza

    Sir Veza Farming Deity

    Good luck with this! Any automated, semi-automated, or simplified data collection method would be great.
     
  12. neoncat

    neoncat Feline Outline

    Here's your text parsing. Let me know what data you want to be cross-referenced from the equipment file, and what output format would work best.
     

    Attached Files:

    Sir Veza and Jarmo like this.
  13. Jarmo

    Jarmo Snow Griffin

    Thank you very much for the tool, Neoncat, much appreciated! That's already very useful.

    Used with Excel, tab-separated data would be most convenient as that's the default character used to separate data into columns when importing a text file. Based on Kalin's post above Google Docs is the same way.

    A keyword like "AdventureBattleName" added to the lines with the adventure / battle name would help parsing the results.
    A separate keyworded line with the adventure level (or a tab-separated entry on the same line as the adventure name) would be useful.
    I'd pick item ID, name, level, rarity and slot from the Equipment.csv file for each item. These would be very useful for sorting and further analysis.

    If you want still more to do :), I'd suggest parsing the item collection data following the keyphrases "Received extension response: collection" and "(sfs_object) inventory". Like we discussed above, creating a compact data file from that analysis, running the analysis before and after a session and then comparing the results * would have benefits over analysing the drop data from single chests (which is still very useful, I hesitate to add!).

    * The comparison would be easiest if the inventory analysis produces lines for each possible item in the Equipment.csv file no matter whether the player inventory contains it or not, and in the same order for both runs (the order they are in the Equipment.csv file is fine, no sorting needed). This way the automatic comparison could be made much simpler as it would be assured the line placings would match with no further manipulation, you could do just a simple subtraction to get the gained item amounts.

    I'm sure Kalin has his own ideas about this, but these are what I would consider essential components for further work.
     
  14. Sir Veza

    Sir Veza Farming Deity

    Hmm. I can't get any output in Chrome or FF. Do I need something else installed?
     
  15. Jarmo

    Jarmo Snow Griffin

    Did you try clicking in the output field and pressing Ctrl-A (select all), then copying the selected text to Notepad or something? Maybe the output just had empty lines at the top so the field looked empty? Works fine for me with Firefox.
     
  16. Jarmo

    Jarmo Snow Griffin

    Do you have Javascript disabled? The tool needs it on.
     
  17. Sir Veza

    Sir Veza Farming Deity

    I made sure Java was allowed. Now I'm getting an error message in chrome -
    TypeError: Cannot call method 'trim' of undefined
    - and a different one in FF -
    TypeError: data|(rowID + 8)|.split(...)|1| is undefined

    I'll check the format of my log vs. Kalin's log when my brain stops hurting.
     
  18. Jarmo

    Jarmo Snow Griffin

    One thing to try could be to not cut anything from the verbose session log, just copy everything in it to the tool. The latter error might refer to the copied log having been cut off at a place the code was not expecting.
     
  19. neoncat

    neoncat Feline Outline

    Post your logs and I'll take a look. (And yes, it's just supposed to eat all the raw data, so you don't have to.)
     
  20. Sir Veza

    Sir Veza Farming Deity

    AHA! I was starting verbose mode before I left the keep. When I started it at the beginning of the adventure and clipped it at the end, it worked. :) I take it this is how it's supposed to function.

    Edit: It works well when I don't screw it up. :cool: I'll see if I can mine some data tonight.
     

Share This Page