otaniemi-triforce / M.A.T.C.H.

Mugen Automated Tournament Creation Host
1 stars 0 forks source link

Mugenoperator.py character selection reliant on specific selection screen structure #2

Closed Yarb closed 3 years ago

Yarb commented 3 years ago

Currently, the mugenoperator.py assumes specific structure of MUGEN character selection to properly select the character. The structure cannot be changed easily or the used structure is not explained either. When system is combined with structure/configuration that is not expected, the character selection will not function properly or fail altogether.

I propose two fixes.

  1. Supplying a theme/motif to go with this or at the very least the definition of selection structure.
  2. Adding configuration for how the selection system is handled. This clarifies the method used and allows some customization.
princessGasmask commented 3 years ago

Edit: nvm I'm stupid.

princessGasmask commented 3 years ago

New issue report that's probably related to this. M.A.T.C.H will always default to certain characters and get stuck selecting ONLY them very often. I'm not sure how to fix.

Mulusu commented 3 years ago

Does the system give any warning about character ID mismatch or other issues in the console when this happens?

princessGasmask commented 3 years ago

Yes, that's right. Here's the exact output in case you need it. It doesn't quite explain why there's a mismatch, though.

https://i.imgur.com/YfHIf42.png

Mulusu commented 3 years ago

I made an update, make sure to fill the config.py carefully, and please let me know if the problem still persists.

Few things I found out when trying to replicate your issue with a fresh download of MUGEN:

In the system.def of mugen, it is important to set the row number under [Select Info] to high enough so that all your characters will be included in to the character grid.

The buttons in the config.py need to match the buttons of player 1. Having them match player 2 will cause the system to load the characters in incorrect order due to how mugen chooses which player character is picked first.

The cursor starting position in the character grid is apparently not the same between various mugen versions / themes. Added parameters for setting those into the config. Check your system.def for the values your mugen instance uses.

princessGasmask commented 3 years ago

With the new update, I've made sure everything matches what's specified in the new update config. Now I can get through more matches before it gets stuck selecting the same characters, but eventually it still happens. Is there a such thing as having TOO MANY rows of characters before things get borked?

princessGasmask commented 3 years ago

Update: I do get a new error message in the console that I've never gotten before as well.

https://i.imgur.com/vebs3VT.png

Yarb commented 3 years ago

The new error is related to character encoding when writing the information files. That should be fixed now.

As for the selection problem: Yes, too many characters can be a problem if they don't fit the defined rows and columns in system.def. Mugen will happily load quite a number of characters and tries to fit them to the defined selection grid. When the grid runs out of space, the rest of the characters are skipped. This results in characters that cannot be selected by operator or the user but are listed as loaded.

This can be checked by comparing the defined grid size to number of characters MATCH/operator reports as loaded. Rows * Columns should always be larger than the number of loaded characters. If this is not the case, some characters will be left out. This can be verified by comparing the last character in the grid with the data of the last character defined in the select.def.

Getting around this problem is pretty straightforward: Increase the number of rows and/or columns until characters fit. Mugen does not care if the characters don't fit the screen and thus they can be selected even off screen. Fixing the visual problems that may result is another ballgame and require adjusting the other layout parameters in system.def (cell.size being the most useful here).

Yarb commented 3 years ago

If the characters do fit...well, more information is required.

princessGasmask commented 3 years ago

I have a screenpack that fits way more than the amount of characters I have. My screenpack is 256 x 100, but I only have 45 characters so far just to test MATCH. For the first 3 rounds of the tournament, it will run fine but after that, it ways picks the same match over and over with the highest and lowest character slots 0 and 44. The console reports it's attempting to select [the number that was input by the user], but [0 or 44] was selected instead.

Yarb commented 3 years ago

Interesting. If got this right, the tournament system runs the exact same match over and over? Does not proceed, does not finish, repeats the same match while trying to pick the same character IDs and failing to do so? And all this happens when you have more than 3 rounds in a division -> more than 4 registered players?

If so this is a peculiar situation as the characters are chosen by operator and all errors stating mismatches in the selection originate from that part of the system. However, the system stuck in repeating a same match would indicate a problem with the tournament subsystem.

Can you provide a more complete output of MATCH console from the situation and the tournament parameters (number of divisions, number of players). That should help me get better picture what the system is trying to do and what might cause it to fail.

princessGasmask commented 3 years ago

The tournament still "proceeds" in a sense that it does register the numbers that were actually chosen. So for example if I chose numbers 12 and 15, the console will output that it was SUPPOSED to select 12 and 15, but it chose 0 and 44 instead. Theoretically it would eventually finish running the tourney but I always stop it once it starts repeating because I don't want to watch the same fight 10 times.

I've tried this with both solo testing by myself and with 2 people. I've also tried doing 3 divisions as well as 1 single division. Eventually it goes back to selecting 0 and 44 (example numbers) at some point. I'll run a tourney in a bit here so I can send you some console output.

Yarb commented 3 years ago

Alright. Hopefully the output will give us some hints regarding the issue as so far we have been unable to replicate the issue with our tests on two different Mugen installations (and with various ways of breaking the system).

While collecting the data, try to observe what the cursors are doing in the selection screen (movement, lack of movement, sounds of movement, etc.). Especially after the system gets stuck, you could try to manually move the cursor to different character during the selection and see if the system will "recover" back to same character as before after one round. If the system repeats the new character...well then the input system is doing something wrong.

princessGasmask commented 3 years ago

pythonw_DEmHql7vue

The start of the 2nd round, character 44 is ALWAYS rolled against a random opponent. On the fight after that, 44 is hard-locked and character 0 is always rolled in next vs 44.

pythonw_Podd1yeaJE

As pictured, the numbers that were actually picked by chat still show, but they are essentially bruteforce locked into characters 0 and 44.

pythonw_pxY369Jzlm

This continues until all fights are completed. Also, the bot insta-locks these character picks with no time for cursor movement.

Yarb commented 3 years ago

That looks like an old version of MATCH and probably of the operator as well. Try upgrading to the latest version of the entire system and see if that solves the issues.

Yarb commented 3 years ago

Also if you were running the old Discord only version of the system, upgrade to the maintained MATCH version (that used to be the multibot). The Discord only version was deprecated as the multibot now allows you to pick and choose bots you wish to use.

For comparison: In the latest version of the system, the console output should look like: console

princessGasmask commented 3 years ago

Sweet. The new version seems to have fixed the problem.

Yarb commented 3 years ago

As it should...Excellent.

Yarb commented 3 years ago

This ticket will now be closed as the selection screen customization support now exists.