I'm basically finished with set of 1.0 features that I want, but before I show off the final teaser screenshots, I should report on my analysis regarding the event system accuracy.
The event system has been shown to be missing events, duplicating events, and sometimes giving the event out of order. The heuristic system in the external analyzer app has been able to cope with this to the point that I can reasonably blame the apparent errors on the df hack lua eventful system. It's a great tool, but unfortunately with its polling mechanics, I don't think it will be able to achieve 100% accuracy. Repeat, I think that is OKAY for our uses.
I did experiment with turning down the calculation fps to 1, and it had no effect on the error rate.
I did experiment with pausing and stepping forward one frame at a time, it had no effect.
I did experiment with the unit.actions pattern that Roses suggested. In the end, I decided that our accuracy level is fine without having to resort to taking live samples every tick to ascertain my own high level events.
That said, I just made the external analyzer app detect missing events and highlight them for you. If we are going to be wrong, at least we can know we are wrong
Furthermore, if any great and altruistic person ever took it upon themselves to try to increase the accuracy of eventful, then our tool might be a helpful aide.
With out further ado, I will now show the design I finally went with.
There are two parts to the solution.
The first is a combat sniffer lua script that you drop in %DF%/hack/scripts. To use the script, you go into arena mode and design whatever kind of battle you would like to record. When ready to start, you run the sniffer in the df hack window. This creates a "session", which is just a helpful way to group your combat data. You can also optionally give the session a name.
The result of running the sniffer is a combat-sniffer-log.txt that gets dropped in your %DF% directory next to game log.
The second part of the solution is the external analyzer app. With it, you can open sniffer log file, and it will show the results in exploded form for your analysis. I will let the screenshots answer the big questions for me, and you guys can point anything confusing. The ui design is basically just a 3 tab display, and here they are in order.
Report log display:
The Report Log tab highlights any combat log text that looks like combat information. If we were able to map it to a discrete event, then it is highlighted green. If we failed to find an event for the line, it is highlighted red. Sometimes it is red just because I haven't written a black list rule for things like "the elephant gives into pain", but most of the time it is because of the lua event system dropping data. My analysis of nearly 40 fights has shown ~95% accuracy, which I think is good enough.
The highlighted lines hyper link to the discrete strike data.
Strikes display:
This tab shows the stream of recognized attack strikes (no ranged yet), and you can see the resulting wound information, per body part tissue layer.
The attacker/defender lines hyper link to the units display.
Units display:
This tab lets you see all the body part information about the units involved, including body parts, tissue layer properties, attacks, armors, and weapons.
Anyway, thanks for anybody still hanging on to this thread. I can't wait to get it out in beta test so I can see how you guys use/break it
I will report back with links and things once I'm ready for launch.