Gathering complete data on units' characteristics

I’ve only started playing CodeCombat a couple days ago. I’m already an amateur programmer, so I play mostly for fun and code practice. I subscribed for premium. Currently finishing Backwood Forest. I’m using Python.
Most of enjoyment comes for me from coding survival logic. I want to optimize my hero’s actions as much as I can, and here I have a problem: most of every unit’s characteristics, list of unit types, etc. are hidden from in-game API.

Just examples. I don't need an answer for these points
  • I coded a logic for my warrior to prioritize throwers in Cavern Survival and submitted it. Later I watched several games where I died to fangrider or shaman, running around them for munchkins, so I had to manually check their types and add them to a list of ranged enemies.
  • What is thrower’s range? Had to estimate it by calculating distance between and his target when he starts attacking. Guessed right, it’s 25m.
  • When there are several enemies in attack range, I want my hero to focus one with highest “dps / hitsNeededToKill” ratio. How the heck am I supposed to calculate that without numbers?
  • What do the Damage, Health and Speed bars on hero selection screen actually mean? It is very unobvious for a player who is considering buying a new hero.
    Turns out, Health is a coefficient for total health, same item will give different amount of health to different heroes.
    Speed seem to be a constant for each hero though, and bonus speed from boots is flat.

So, I started googling a wiki, or list of enemies, or smth like that, and all I found were two 2 years old spreadsheets.
Finally, I reached a source of all data I need: thang editor, but it’s super inconvenient for gathering and assembling information. Each thang’s info can be found in it’s Components tab. They’re quite messy and contain excess info.
Also there is source code on github, of course, but I’m too lazy to see into it.

So, to sum all this up:

  1. Maybe I am bad at searching and there is actually easily accessible data on unit’s properties?
  2. Best way: unlock all possible properties of units for API to read, at least the constant ones. Just hide specific ones in specific levels, if needed. And list these properties somewhere.
  3. Anyway way, the game needs a proper documentation for players. Some in-game methods and properties I found were explained in some levels, and not even mentioned anywhere else. Some I could only find using google (maybe they can be found in later levels, I dunno)
  4. So, assuming 2 and 3 will not be done any soon, I am going to make gathering myself
    Can I easily access needed data in the source code, or is it better to parse thang editor content?
    In what format should I post what I get, to share with others?
    For myself I’m planning to create a python dict with all that and copypaste it in beginning of code everywhere.

If you really would like to automate finding that data, you could try web scraping.

Web Scraping

Disclaimer: I haven’t attempted to web scrape anything yet.

Good intro video to web scraping

Instead of manually writing a python dictionary, why not have that scraped data automatically written into a spreadsheet like in that thread you mentioned?

Keep in mind that each level can have custom-tailored components (Example: a level might specify that an Ogre Thrower has an attack range of 15 units instead of the default of 25 units).
You can find the components that levels use by going to that level’s page in the level editor.

I don’t think the thang component details are on GitHub. It seems like the thang editor is the only place that contains that info.

Well, web scraping is exactly what I was going to do. I haven’t tried it either (haven’t even heard this term before, that’s so I just called it parsing), so thanks for the links!
Of couse I didn’t even think about making a python dict manually, that’d be stupid. I plan to collect all the data into a dict with python script, filter all excess stuff that’s not needed for in-game logic, then just output it as it is, or maybe serialize it.
The same script might also export that data as a spreadsheed. But I’d focus on gathering it first =)

Yeah, that’s another problem. Can you (or someone else) tell me where exactly these changes can be found (which tab, which part of the tab)?

On the “Thangs” tab of the level editor, just double-click the thang to see the components it uses.