CLASSIC BUG - Magic Axes have wrong attacks [RESOLVED]

Bug topics that have been resolved.
User avatar
Hazelnut
Posts: 1977
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by Hazelnut » Wed Sep 04, 2019 6:35 pm

It would be helpful if someone could work out them post the frame mapping required to fix this issue. I might take a stab at this if I don't have to figure that part out myself.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
King of Worms
Posts: 2743
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by King of Worms » Wed Sep 04, 2019 6:41 pm

Hazelnut wrote:
Wed Sep 04, 2019 6:35 pm
It would be helpful if someone could work out them post the frame mapping required to fix this issue. I might take a stab at this if I don't have to figure that part out myself.
Ok I will try to do that. Will reply when I have the working results. It needs some testing.

User avatar
Hazelnut
Posts: 1977
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by Hazelnut » Wed Sep 04, 2019 10:13 pm

My idea is this. Basically the loop in FPSWeapon.GetWeaponTextureAtlas() that loads the frames for each file record uses a for loop to go from frame 0 to n. I plan to change the loop to user a list of integer frame numbers in sequence. Then for any filenames that we need to, a custom list of frame numbers in the specific sequence required to re-order the frames to match the normal weapons can be used instead.

I could be mistaken, but this seems like a very easy way to adjust the data as it's read into DFU. Feel free to point out any flaws in the plan if you like, but I am happy to just try it. If it doesn't work it can wait until someone more knowledgable gets around to it, as Interkarma said it's hardly the most pressing issue we have. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Interkarma
Posts: 5126
Joined: Sun Mar 22, 2015 1:51 am

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by Interkarma » Wed Sep 04, 2019 10:16 pm

I've just fixed this in DFU so it maps the correct frames to attack directions for magic battle-axe.

KoW - this doesn't change anything with modding on your end. You still need to replace the animations in the order they're present in WEAPO108.CIF. DFU will just draw the correct animation for each gesture now.

For reference the record orders in WEAPO108.CIF are:

Code: Select all

0	idle
1	down
2	diagonal-left
3	diagonal-right
4	left
5	right
6	thrust
Whereas the standard order is:

Code: Select all

0	idle
1	down
2	diagonal-left
3	left
4	right
5	diagonal-right
6	thrust
Daggerfal Unity remaps these record indices as follows so they are drawn correctly in-game and use the same gesture order as other standard weapons:

Code: Select all

0	idle
1	down
2	diagonal-left
4	left
5	right
3	diagonal-right
6	thrust

User avatar
Interkarma
Posts: 5126
Joined: Sun Mar 22, 2015 1:51 am

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by Interkarma » Wed Sep 04, 2019 10:19 pm

Sorry Hazelnut, while trying to get some good information for you, I ended up fixing it in the process. The best way to do this is just to remap the record order in a unique set of weapon anims for the magic battle-axe. Fix pushed now.

Also while writing the above, I had this in my head the whole time. :D

https://youtu.be/8cuihrjLNAo

User avatar
Hazelnut
Posts: 1977
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by Hazelnut » Wed Sep 04, 2019 10:41 pm

Aha, that's very nice. Better than my plan. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
King of Worms
Posts: 2743
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: CLASSIC BUG - Magic Axes have wrong attacks

Post by King of Worms » Thu Sep 05, 2019 6:42 am

Im happy this is solved! It was not so easy to identify the bug, and having all magic axes bugged is non marginal to me.

Great job, thank you 😊

Locked