{"action":"created","issue":{"url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/849","repository_url":"https://api.github.com/repos/Interkarma/daggerfall-unity","labels_url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/849/labels{/name}","comments_url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/849/comments","events_url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/849/events","html_url":"https://github.com/Interkarma/daggerfall-unity/pull/849","id":353434331,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNDg3MzU5","number":849,"title":"Match enemy attack animations to classic","user":{"login":"Allofich","id":19624336,"node_id":"MDQ6VXNlcjE5NjI0MzM2","avatar_url":"https://avatars2.githubusercontent.com/u/19624336?v=4","gravatar_id":"","url":"https://api.github.com/users/Allofich","html_url":"https://github.com/Allofich","followers_url":"https://api.github.com/users/Allofich/followers","following_url":"https://api.github.com/users/Allofich/following{/other_user}","gists_url":"https://api.github.com/users/Allofich/gists{/gist_id}","starred_url":"https://api.github.com/users/Allofich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Allofich/subscriptions","organizations_url":"https://api.github.com/users/Allofich/orgs","repos_url":"https://api.github.com/users/Allofich/repos","events_url":"https://api.github.com/users/Allofich/events{/privacy}","received_events_url":"https://api.github.com/users/Allofich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-23T15:25:45Z","updated_at":"2018-08-24T01:45:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Interkarma/daggerfall-unity/pulls/849","html_url":"https://github.com/Interkarma/daggerfall-unity/pull/849","diff_url":"https://github.com/Interkarma/daggerfall-unity/pull/849.diff","patch_url":"https://github.com/Interkarma/daggerfall-unity/pull/849.patch"},"body":"This one is a nice improvement. I figured out how to read the `.ANC` files in `MONSTER.BSA`, which define the frame sequences of animations and frames on which damage attempts or arrow shots occur, and probabilities for different frame sequences. I added this information in to the enemy definitions and use it now for enemy attack animations. This allowed me to remove the \"hit frame\" stopgap solution I put in earlier. In removing that I needed to adjust the calculation for attack timing, and that ended up with raising the distance from which enemies will attempt attacks. It could still use refinements but it makes enemy attacks less predictable and IMO more realistic, and makes it not so easy to just mow them down and never get hit by melee attacks. (Although the game may be tough in the beginning when your attacks are slow and missing a lot, I think in current master it may be too easy once you can start reliably hitting opponents. This should help with that.)\r\n\r\nWe could read in the  `.ANC` files but I don't see an advantage to doing so. Also if we used it exactly like classic we would inherit some animation bugs from classic, so it was easier to just re-create the data in the enemy definitions. The only data in those files that is of interest to us is the attack animations.\r\n\r\nThere are also sequences for each spell-casting enemy for their casting animations. I'll add those when enemy spells are in.\r\n\r\nAs a bit of a side-note, I'd like to get enemy classes and the player to start shooting 3d arrows (as in classic, although it's not easy to see them because of the lower resolution) instead of just doing instant hits. Has the progress on spells made it easy to create projectiles in the world? Are you interested in implementing 3d arrow projectiles yourself, Interkarma?\r\n\r\nBTW, some mistakes in the classic files I found were:\r\n\r\n1) The rat is unusual in having more than 4 animation frames in its walk, but it only uses 4 in classic. Since everything else uses 4, they probably forgot to configure the rat to use them all. You'll see in classic it has a jerky animation because of this, unlike in DF Unity.\r\n\r\n2) The orc shaman has the most possible types of attack frame sequences at 5 types, but 2 of them aren't used in classic. For some reason when those 2 would be used, instead the spell casting or standing still animations are used. I configured DF Unity to use those 2 unused animation sequences as was probably intended.\r\n"},"comment":{"url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/comments/415625713","html_url":"https://github.com/Interkarma/daggerfall-unity/pull/849#issuecomment-415625713","issue_url":"https://api.github.com/repos/Interkarma/daggerfall-unity/issues/849","id":415625713,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTYyNTcxMw==","user":{"login":"Interkarma","id":10426244,"node_id":"MDQ6VXNlcjEwNDI2MjQ0","avatar_url":"https://avatars3.githubusercontent.com/u/10426244?v=4","gravatar_id":"","url":"https://api.github.com/users/Interkarma","html_url":"https://github.com/Interkarma","followers_url":"https://api.github.com/users/Interkarma/followers","following_url":"https://api.github.com/users/Interkarma/following{/other_user}","gists_url":"https://api.github.com/users/Interkarma/gists{/gist_id}","starred_url":"https://api.github.com/users/Interkarma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Interkarma/subscriptions","organizations_url":"https://api.github.com/users/Interkarma/orgs","repos_url":"https://api.github.com/users/Interkarma/repos","events_url":"https://api.github.com/users/Interkarma/events{/privacy}","received_events_url":"https://api.github.com/users/Interkarma/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T01:45:46Z","updated_at":"2018-08-24T01:45:46Z","author_association":"OWNER","body":"This is very awesome. Good work working out the ANC format and adapting it across. "}}
{"actor":{"display_login":"Interkarma"}}