Menu
 

OpenHeroSelect (Includes support for XML2 and the MUA 36 & 50 Character Mods!)

Started by Tony Stark, June 09, 2019, 03:59PM

Previous topic - Next topic
It's possible your herostat.cfg isn't formatted properly, and maybe that's breaking the xml file, but I'm not sure.

The 2 different 36 menulocation files are for the 2 different versions of the 36 character hack. There was an update that changed the locations.

Quote from: Tony Stark on August 15, 2020, 01:24PM
It's possible your herostat.cfg isn't formatted properly, and maybe that's breaking the xml file, but I'm not sure.

Here is my herostat.cfg.  I thought something might be wrong with Defaultman, but I just can't find any errors anywhere.  I have spent several more hours today, moving items around in my herostat, trying to complile different numbers of heroes, totally different herostats, etc.  The weird thing is that I get both xml and xmlb files for every amount of character options (27 thru 36) -- just not the 50!  Could someone take a look at this file and see if they spot the problem?

https://drive.google.com/file/d/1iNHVmXLlJus356UbP4NMB-dtIccd-8Mt/view?usp=sharing

I come somewhat late to the party, but I've been wrestling with the OpenHeroSelect tool myself and managed to distill some troubleshooting knowledge in the process.
I would be happy to look into your herostat.cfg file if you are still looking for helpl (I've sent you an access request).

On a sidenote, I've also taken the liberty to edit the OpenHeroSelect script to include some minor fixes, add flexibility in the herostat.cfg file parsing and a verbose mode to be more user friendly.
As I am fairly new to the forum I am not sure what the right way to go about sharing it might be (some of the rules point at "not hijacking posts", and another at respecting an original author's indications). If Tony Stark is ok with my posting it here (or even adding it as a branch to its git) please let me know!


Quote from: a50 on August 15, 2020, 03:39PM
Here is my herostat.cfg.  I thought something might be wrong with Defaultman, but I just can't find any errors anywhere.  I have spent several more hours today, moving items around in my herostat, trying to complile different numbers of heroes, totally different herostats, etc.  The weird thing is that I get both xml and xmlb files for every amount of character options (27 thru 36) -- just not the 50!  Could someone take a look at this file and see if they spot the problem?

https://drive.google.com/file/d/1iNHVmXLlJus356UbP4NMB-dtIccd-8Mt/view?usp=sharing

Quote from: Sagap on February 26, 2021, 05:51AM
On a sidenote, I've also taken the liberty to edit the OpenHeroSelect script to include some minor fixes, add flexibility in the herostat.cfg file parsing and a verbose mode to be more user friendly.
As I am fairly new to the forum I am not sure what the right way to go about sharing it might be (some of the rules point at "not hijacking posts", and another at respecting an original author's indications). If Tony Stark is ok with my posting it here (or even adding it as a branch to its git) please let me know!

Sent you a PM as well, but yeah open a merge request on github and I'll be happy to merge it in.

Merge request submitted!

If it gets greenlit I'll follow up with some instructive guides.

Here's an example of what you can get now with the new -list flag


And some examples on the different types of errors I encountered while messing around plus the new -verbose flag features.

I tested the updates by Sagap, and while they're nice (sort of), There is still no proper addition concerning the herostat setup.
I understand that there is a more advanced version planned. For this version or for ideas to work on, here some suggestions:

1)
Menulocation.cfg setup with the help of OHS*: Call each hero in the herostat.cfg and ask for a user-input for the menu location.
Somehow, the user should know when the limit for a stage (23/27/36/50) is reached.
It would be cool if we also can skip a hero, so we don't have to limit herostat.cfg to (50) heroes.
It would be awesome if skipped heroes are reflected in menulocation.cfg, like this:

48
25
skipped
01
47
02

or like this:

48
25

01
47
02

Basically each hero from herostat.cfg (even if unused, because there are too many heroes in it) will have his/her line in menulocation.cfg
This allows us to re-build herostat.engb with just a double-click next time.

2)
Add support to switch out heroes: In a similar interactive mode, ask for a user-input to select a currently "installed" hero.
The current "installed" heroes would be read from the menulocation.cfg. The user can select the hero by typing it's menu location number. OHS would then list all heroes from herostat.cfg with a number according to their location in herostat.cfg (01 top, 02 second, etc). The user can select the hero by typing it's number. Menulocation.cfg would then be updated by removing the number from the first input and then adding it to the new hero's line.

3)
The current use with menulocation.cfg and herostat.cfg should be kept in any case, because it allows us to use versions for different mod stages of the game and to save roster setups.




*What I miss in OpenHeroSelect, is a userfriendly menulocation setup. Doesn't matter if with a program (even original Hero Select with GUI) or manually in the cfg-files with notepad (or notepad++ or whatever). It takes a while and you don't want to  set it up too often. You can save it to use again. BUT, you can just as well set up a herostat.engb. This can also be saved for some custom rosters, no real difference, and you don't even have to compile or decompile anything. The only good thing about it is that you can edit the herostat entry in herostat.cfg and the herostat.engb will be updated with the next build with OHS. But even then, I'm currently faster with manually decompile/edit/re-compile herostat.engb.




I made some brainstorming here. Basically, I put out the thought of combining HeroSelect with stage selection, because it depends on the stage, how many heroes can be selected. The stage files would have to be part of the setup, either coming with the HeroSelect program or installed already. Preview files of stages are available for most (I think Outsider has collected some empty stage previews too). So it would be cool if there was ever a HeroSelect with GUI again, if it had stage previews with a mask of the hero locations (numbers).

Quote from: ak2yny on March 02, 2021, 01:27PM
I tested the updates by Sagap, and while they're nice (sort of), There is still no proper addition concerning the herostat setup.
I understand that there is a more advanced version planned. For this version or for ideas to work on, here some suggestions:
[...]

I'm actually not planning a GUI or anything interactive, the future update is for compatibility/stability. The idea with OHS was to modify files quickly with a text-editor and have a one-click method to get your setup running. What you're suggesting would be nice to have but would add way too much complexity. The reason the original HeroSelect could have a GUI was it wasn't trying to be extensible, it was only meant for the original 27 size, so everything could be hardcoded.

The future update's setup should be a little more convenient though, I'm intending to have all the hero stats in separate files with a single file that contains ordering, to simplify the entire process. That way you don't have to mess with a single monolithic file to add a character.

On the suggestions:

Manual hero input: I could easily implement a "mode" that parses in all heroes in herostat and subsequently asks for user input for each of them. I foresee this becoming somewhat cumbersome as you would have to input 27/36/50 menu position numbers which are not intuitive. Skipping heroes is not a problem either - in fact it is currently being done when you have more heroes in herostat than spots in menuselection.

Menulocation remarks: I don't quite see the point of changing the menulocation file - those files are meant as maps for the weird number entries to their physical positions in the selection menu. They tell OHS what number to assign to a character for MUA to show it at a specific place in the selection menu. Deleting numbers here to show "skipped"/"blank" heroes would mean loosing spots in the roster if not amended, and also potential savegame issues due to having less than a full roster (this remark coming from the 50R installation instructions).

What could be done, is adding some sort of inline comment that tells you which hero has been associated to that position or has been skipped after a successful run of OHS. Yet, this is already achieved with the list mode I added. If wanted, I could also add an option to save the list printed by the list mode to some sort of  external file so it's not lost after the console closes.

Specific locations: If I understand correctly what you mean by "each hero from herostat.cfg will have his/her line in menulocation.cfg" - that you would like heroes to have a stored "specific/preferred location" - you can achieve this without having to rearrange them in the herostat.cfg file through the "keep" mode. This mode lets you type the number you want in the herostat.cfg "menulocation" stat entry, and then OHS will respect it (meaning will not override it with those in menulocations.cfg). The downside of this is that you have to ensure no collisions exist as OHS will only keep the first it finds.

Comment from Tony Stark: I have to agree that the main purpose of this tool was to quickly compile heroes into a roster rather than providing in-depth menu editing capabilities. In my workflow, I can add&remove heroes by simply commenting their name once in the herostat.cfg initial namelist, then run OPH in automatic mode and have MUA fire up once the compiling is done. This, added to the quick-game mod to skip the cut-scenes means I am seeing the in-game selection menu in ~10 seconds. Granted, this way the hero positions might fall in somewhat random places, but it's great for testing whether everything went well.

Random comment: While working on this project my mind did wonder a little and I did see the potential to have a nice GUI with menu representations, hero icons, drag&drop features, costume swapping, roster saving, stats quickediting, automatic file pulling from mod .rars and backups (i.e. independent herostat files as you mentioned in your brainstorming) and whatnot. Yet this would indeed be a tremendous amount of work.

Quote from: Sagap on March 03, 2021, 07:40AM
Yet this would indeed be a tremendous amount of work.

I agree, and I think I will have to cut a bit back from what I'm suggesting. (It's nice to dream though.)

Quote from: Tony Stark on March 02, 2021, 02:57PM
I'm intending to have all the hero stats in separate files with a single file that contains ordering, to simplify the entire process.

I think this would be a very useful addition. While it's nice to have a neat herostat.cfg, the proplem of user errors is present. Also, each mod comes with the herostat in such a file which hopefully can be used directly. So with OHS you would't have to manually add herostats anymore (except maybe erase some lines and readmes from the files).
I also hope that menu location swapping (hero swapping) and adding heroes further down the line will be possible with this. I guess the single file that contains ordering should be able to store all heroes (more than 50/36/27/23).

Quote from: Sagap on March 03, 2021, 07:40AM
Yet, this is already achieved with the list mode I added.

I absolutely love the list mode.

Quote from: Sagap on March 03, 2021, 07:40AM
In my workflow, I can add&remove heroes by simply commenting their name once in the herostat.cfg initial namelist[...]

I am slow. I never discovered this method to use heroes further down the herostat.cfg (tbh, I was never sure if I would break functionality of HeroSelect if the order was different than in the entries below). The randomness you also mention can be avoided. This is how we can do it:


Quote from: Sagap on March 03, 2021, 07:40AM
Skipping heroes is not a problem either - in fact it is currently being done when you have more heroes in herostat than spots in menuselection.
Quote from: Sagap on March 03, 2021, 07:40AM
I don't quite see the point of changing the menulocation file - [...] Deleting numbers here to show "skipped"/"blank" heroes would mean loosing spots in the roster if not amended, [...]
Quote from: Sagap on March 03, 2021, 07:40AM
If I understand correctly what you mean by "each hero from herostat.cfg will have his/her line in menulocation.cfg" - that you would like heroes to have a stored "specific/preferred location" - you can achieve this without having to rearrange them in the herostat.cfg file through the "keep" mode. [...] The downside of this is that you have to ensure no collisions exist as OHS will only keep the first it finds.

No, I was talking about something else: I assumed that the hero-list in top part of herostat.cfg is set in stone and only arrangement within menulocations.cfg was possible. Therefore I thought it's best to have an equal amount of lines in menulocations, as there are heroes in herostat.cfg. That would allow for using heroes from beyond lines (50/36/27/23), if (blank) lines in menulocations.cfg would be skipped. But since I discovered that we can work with the hero-list, we can forget about this.
Btw. I don't see much use in the keep mode, because "manual" edits are easier done on herostat.engb directly.
Talking about herostat.engb: This is the only file used by the game. The only working translation is Italian (herostat.itab), but this is only working for the default game and default herostat.itab. In other words all other files (than herostat.engb) created are useless on a modded game (even xmlb, since all files that have engb don't use xmlb). The only translation in the works for a modded game is Brazilian Portuguese, which uses herostat.engb.

Quote from: Sagap on March 03, 2021, 07:40AM
[...]somewhat cumbersome as you would have to input 27/36/50 menu position numbers which are not intuitive[...]

I agree, but you could have the same layout while asking for the inputs, that the list mode has. Once set up, the created menulocations will be saved, overwriting current menulocations.cfg. So next time you can just double-click OHS (after changing skins in herostat.cfg and such). Combined with the above comment, you should understand where I was going with this, but same applies here: We don't have to talk about this, since I discovered that I can rearrange the hero-list.




I think I have to apologize for how I wanted to make OHS look kinda useless with the comment before.

It's cool, I understand there are things that would make it easier. I'm hoping that the upcoming split file version with an order file will simplify things.

Since I forgot to mention it before, the new version of OpenHeroSelect with Sagap's fantastic improvements is now live!

I am struggling to open hero select on windows 10. It shows quick CMD like command and then it just goes off it wont even start any ideas? :/

That's how it's supposed to run, but if you run it through CMD you can see the output and see if there's an error.

Quote from: Tony Stark on March 07, 2021, 11:52AM
That's how it's supposed to run, but if you run it through CMD you can see the output and see if there's an error.

I am so confused as to how to open it through cmd tbh xD

Quote from: Psylocker102 on March 09, 2021, 01:20AM
I am so confused as to how to open it through cmd tbh xD
I an in the same boat when open it in cmd it says ModuleNotFoundError: No module named 'colorama' on role 8