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:
- Maybe I am bad at searching and there is actually easily accessible data on unit’s properties?
- 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.
- 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)
- 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.