Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C2 Special Combat Moves #197

Open
skiaslu opened this issue Feb 13, 2023 · 5 comments
Open

C2 Special Combat Moves #197

skiaslu opened this issue Feb 13, 2023 · 5 comments
Labels
need info for the bugs that don't have a clear reproduction or miss critical info

Comments

@skiaslu
Copy link

skiaslu commented Feb 13, 2023

Hey, good work there. I'd like to report what looks to be an issue between xOBSE and the mod C2 Special Combat Moves. When using the moves "Mugetsu Bloodmess" or "Izayoi Moonflower" there's meant to be a short sequence of the player character unleashing a flurry of strikes on the target, but when using xOBSE no attacks play out and you just stand there in place.

Note that the problem starts with xOBSE 22.2, everything works as intended when using version 22.1 or earlier.

@llde
Copy link
Owner

llde commented Feb 13, 2023

thanks for the report. Can you provide the exact instructions to reproduce?

@skiaslu
Copy link
Author

skiaslu commented Feb 14, 2023

Use the Misc. Item in the player's inventory to open a menu, click Power Attacks, and pick out Izayoi Moonflower from the list.
This will add a Lesser Power that's scripted so that upon using it the player has a short period of time to hit the enemy with a power attack in order for the move to work.
A small scene will play out with player controls turned off. If everything works as intended there should be a flurry of sped up punches or weapon strikes, but for me with the latest xOBSE that part has the character standing still, sped up but in his idle animation with his fists up or weapon drawn.

@llde
Copy link
Owner

llde commented Feb 22, 2023

Hi @skiaslu , I did test C2 both Izayoi Moonflower and Mugetsu Bloodmess and I think they work as intended following your description. Can you check wethever one of the latest Artifacts from here works to you.
Do you per chance use the japanese patch?

@llde llde added the need info for the bugs that don't have a clear reproduction or miss critical info label Feb 28, 2023
@kuroko137
Copy link
Contributor

kuroko137 commented Mar 1, 2023

Hi. I tried it myself because I was curious. It seems that the scripts for "Mugetsu Bloodmess" and "Izayoi Moonflower" (zzzZMugetsuFC, zzzZIzayoiFC) achieve the continuous attack effect by using the "TapKey" command to press the button obtained with the "GetControl 4" command. The actual code looks like this:

set Btn to GetControl 4
---
TapKey Btn

However, if you have not assigned the attack key to any keyboard key, the GetControl command cannot obtain the key code of the mouse button, and the returned key code will be 255, so this effect will not work correctly (The author need to use the GetAltControl2 command in addition to GetControl).
This means that it is not a bug in xOBSE, but rather a problem with the method of obtaining key codes in the mod.
However, for some reason, in xOBSE22.1 and earlier versions, the attack key seems to be pressed with "TapKey 255".
Note that in my case, whether or not to use the unofficial Japanese patch was irrelevant.

Anyway, if you want to use these powers of the mod in xOBSE22.2 or later, it would be a good idea to assign some keyboard key to the attack key in the in-game settings.

@llde
Copy link
Owner

llde commented Mar 1, 2023

you are right: old code had this
if(keycode%256==255&&keycode<2048) keycode=255+(keycode+1)/256;
where basically if keycode have the form k * 255 then it's assigned as 255 + (k * 255 + 1) /256
So it's roundable to 255 + k (where if code is exactly 255 k is 1 and the new result is 256)

This is horrible. I'm not even sure why that was added, it doesn't make any sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info for the bugs that don't have a clear reproduction or miss critical info
Projects
None yet
Development

No branches or pull requests

3 participants